diff --git a/boards/default/micropython/build/lib/ci130x.py b/boards/default/micropython/build/lib/ci130x.py index 4235d73a..11152caa 100644 --- a/boards/default/micropython/build/lib/ci130x.py +++ b/boards/default/micropython/build/lib/ci130x.py @@ -15,6 +15,7 @@ _CI_ID_SET = const(0x03) _CI_ID_NUM = const(0x06) _CI_ID_CLE = const(0x07) _CI_ID_PACTRL = const(0x09) +_CI_ID_ASREN = const(0x0A) _CI_ID_END = const(0x5A) _TIME_SNUM = const(0x75) @@ -23,6 +24,7 @@ class CI130X: self._device = i2c_bus self._address = addr self._cmd_id = None + self._enable = True try: self._rreg(_CI_ID_GET, 3) except: @@ -118,3 +120,10 @@ class CI130X: def pa_ctrl(self, value=True, delay=10): self._wreg(bytes([_CI_ID_PACTRL, int(value), 0, _CI_ID_END])) if value: time.sleep_ms(delay) + + def asr_en(self, value=None): + if value is None: + return self._enable + else: + self._enable = bool(value) + self._wreg(bytes([_CI_ID_ASREN, self._enable, 0, _CI_ID_END])) diff --git a/boards/default/micropython/build/lib/map.json b/boards/default/micropython/build/lib/map.json index 8ae0d02b..5019d091 100644 --- a/boards/default/micropython/build/lib/map.json +++ b/boards/default/micropython/build/lib/map.json @@ -248,7 +248,7 @@ "micropython" ], "__file__": true, - "__size__": 3484, + "__size__": 3722, "__name__": "ci130x.py" }, "debugnet": { @@ -946,7 +946,7 @@ "framebuf" ], "__file__": true, - "__size__": 22364, + "__size__": 22512, "__name__": "uframebuf.py" }, "umqtt": { diff --git a/boards/default/micropython/build/lib/uframebuf.py b/boards/default/micropython/build/lib/uframebuf.py index b2a17661..c5678999 100644 --- a/boards/default/micropython/build/lib/uframebuf.py +++ b/boards/default/micropython/build/lib/uframebuf.py @@ -417,6 +417,7 @@ class FrameBuffer_Uincode(FrameBuffer_Base): if sync: self.fill(bg_color, sync=False) self.set_buffer(data, sync) else: + yy = y if size is None: font_len, font_buffer = self._take_buffer(str(data), space, 1) size = min((self.width // font_len) if font_len > 0 else 1, self.height // self._font.height) @@ -424,7 +425,11 @@ class FrameBuffer_Uincode(FrameBuffer_Base): font_len, font_buffer = self._take_buffer(str(data), space, size) x = (self.width - font_len + space) // 2 if center else x y = (self.height - self._font.height * size) // 2 if y is None else y - if sync: self.fill(bg_color, sync=False) + if sync: + if yy is None: + self.fill(bg_color, sync=False) + else: + self.fill_rect(0, y - 1, self.width, self._font.height * size + 2, bg_color, sync=False) for buffer in font_buffer: #Display character self.bitmap(buffer, x, y, size, bold, color) x = buffer[1][0] * size + x + space diff --git a/boards/default/micropython_educore/index.xml b/boards/default/micropython_educore/index.xml index 5155f994..4808558f 100644 --- a/boards/default/micropython_educore/index.xml +++ b/boards/default/micropython_educore/index.xml @@ -1 +1 @@ -02000attachInterrupt_funcattachInterrupt_func10,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!ms10timtim1000tim_callbacktim_callback5000200090x151100a10.998124.82997110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxcontentmylistmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}mydicts11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyMixly,HelloMixlyprompt02MixlyMixly0XFF00FFcodebMixlyMixlyxsensoraccaccbutton0rfidinfo1attachInterrupt_func1attachInterrupt_funcattachInterrupt_func00Mixly0Mixly2022711420452023,1,1,12,0,0180292023,1,1,12,0,0speaker2000speaker20001000speakerrgb0000rgbbleblebleMixlyMixly0MixlyMixly500MixlyMixly50010.50car100carcarcar1001001000interrupt_funcinterrupt_functurnsdistancewifinamewifipassword8080AUTH TOKEN0_value02000notify0Your Target Emailsubjectbodycolor#FF0000wifinamewifipassword0mixio.mixly.cn1883client_idusernamepasswordtopicreceievd_messagetopicmsgreceievd_messageEQtopicmessage1wifinamewifipasswordcsub_cb31444082183.230.40.3914109261n63JySRowo13ZLDBKw6y896E0=MixlyRobotsub_cbEQmsg1ciot_dict"sound"ciot_dictccwifinamewifipasswordclientEnter Your API_KEYEnter Your SECRET_KEYclient1clientS72099北京今天天气如何?wifinamewifipasswordSVa3S0UKHIy9dDArs北京SVa3S0UKHIy9dDArs北京10000ble_cble_pMixlyble_cble_cMixlyble_cble_xble_xble_xMixlyble_xble_xble_methodble_methodEQdataMixlyhandlehandle_methodhandle_methodkey1key2key3keyxble_keyboard_mouse10Hello, Mixly!1002000001000009000,4500,563,5630x1234callbackcmdaddrrawpulsesi2c2221100000i2c00i2c00i2ci2ci2cspi2000004512spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345buf1Mixlyow12owowow12345ow12345owmy_now0my_nowmy_nowmy_nowFFFFFFFFFFFFmixlymy_nowmy_nowcbcbEQmsg1spi10000004512spi8my_lora433.925716my_loramy_loramy_loraMixlyxsensor000humiture00button0ultrasonic00cameracamerai2c_extend45100000xsensori2c_extendxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor1013.25xsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor5000500xsensorxsensorxsensorxsensorxsensorxsensorspi10000004512spi8ysensorysensorysensor0ysensor0ysensor0Mixlyysensor0Mixlyysensorysensor39,119.96,31.67ysensorysensorstation45ps2_handle24512ps2_handle50ps2_handleps2_handlews_wr0121ws_wrws_wrws_wr360002zsensorzsensorzsensorzsensorweight12500weight0pin0servo900parrot0i2c_extend45400000matrixi2c_extendmatrixmatrixmatrixMixly0matrixMixlymatrixMixly500matrixMixlymatrixMixly500matrixmatrix>matrixmatrix1matrixmatrixmatrix0.5matrixmatrixi2c_extend45100000dispi2c_extenddisp2333dispdisp1i2c_extend45100000lcdi2c_extend0x27lcdMixly00lcdMixly005lcdlcdi2c_extend45100000oledi2c_extend0x3coledoled001oledMixlyoledMixly0010oledMixlyoledMixly0550oledMixlyoledMixly5500oled0020oled005050oled20202015oled1oled00oled00oledspi1000000450spi78tft_st7789135240tft_st7789001#ffffff255,255,0tft_st7789Mixly0050#ffffff255,255,0tft_st7789Mixly0550#ffffff255,255,0tft_st7789Mixly5500#ffffff255,255,0tft_st7789004040#ffffff255,255,0tft_st778912ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor'ni-hao','hong-se','lv-se','lan-se','bai-se','hei-se'0.1ai_sensor1.wav5ai_sensor1.wav100ai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsai_sensor'猫','狗','笔记本','笔'mixgo5自模型训练infoai_sensor'猫','狗','笔记本','笔'mixgo自模型识别objectsinfoai_sensor0.1606, 0.3562, 0.4712, 0.9568, 0.9877, 1.9108, 1.8761, 3.5310, 3.4423, 5.6823/sd/masks.kmodel外部模型加载objects12ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor1.wav5ai_sensor1.wav100infoai_sensorlicensePlateinfoai_sensorfaceinfoai_sensor20objectsai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsfilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0wifinamewifipasswordwlanwlanwlanwlanwlan127.16.0.801234567wlanwlanwlanwlanwlan127.16.0.81connect_wifiwlanAPwlanTruewlanwlanSmallCabbage1WHILETRUEEQ0wlan0.0.0.0ms1000TRUEss0.0.0.080s192.168.0.180s5ss1024sbMixlyresponses1024sbMixlyresponse127.0.0.180sntp.aliyun.comwifinamewifipassword0responsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponsehttp://192.168.1.1:11434qwen2.5-coder:0.5b5https://api.deepseek.comAPI Keydeepseek-chat5请介绍一下米思齐?content_callbackcontent_callbackcontent请介绍一下米思齐? \ No newline at end of file +02000attachInterrupt_funcattachInterrupt_func10,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!ms10timtim1000tim_callbacktim_callback5000200090x151100a10.998124.82997110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxcontentmylistmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}mydicts11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyMixly,HelloMixlyprompt02MixlyMixly0XFF00FFcodebMixlyMixlyxsensoraccaccbutton0rfidinfo1attachInterrupt_func1attachInterrupt_funcattachInterrupt_func00Mixly0Mixly2022711420452023,1,1,12,0,0180292023,1,1,12,0,0speaker2000speaker20001000speakerrgb0000rgbbleblebleMixlyMixly0MixlyMixly500MixlyMixly50010.50car100carcarcar1001001000interrupt_funcinterrupt_functurnsdistancewifinamewifipassword8080AUTH TOKEN0_value02000notify0Your Target Emailsubjectbodycolor#FF0000wifinamewifipassword0mixio.mixly.cn1883client_idusernamepasswordtopicreceievd_messagetopicmsgreceievd_messageEQtopicmessage1wifinamewifipasswordcsub_cb31444082183.230.40.3914109261n63JySRowo13ZLDBKw6y896E0=MixlyRobotsub_cbEQmsg1ciot_dict"sound"ciot_dictccwifinamewifipasswordclientEnter Your API_KEYEnter Your SECRET_KEYclient1clientS72099北京今天天气如何?wifinamewifipasswordSVa3S0UKHIy9dDArs北京SVa3S0UKHIy9dDArs北京10000ble_cble_pMixlyble_cble_cMixlyble_cble_xble_xble_xMixlyble_xble_xble_methodble_methodEQdataMixlyhandlehandle_methodhandle_methodkey1key2key3keyxble_keyboard_mouse10Hello, Mixly!1002000001000009000,4500,563,5630x1234callbackcmdaddrrawpulsesi2c2221100000i2c00i2c00i2ci2ci2cspi2000004512spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345buf1Mixlyow12owowow12345ow12345owmy_now0my_nowmy_nowmy_nowFFFFFFFFFFFFmixlymy_nowmy_nowcbcbEQmsg1spi10000004512spi8my_lora433.925716my_loramy_loramy_loraMixlyxsensor000humiture00button0ultrasonic00cameracamerai2c_extend45100000xsensori2c_extendxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor1013.25xsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor5000500xsensorxsensorxsensorxsensorxsensorxsensorspi10000004512spi8ysensorysensorysensor0ysensor0ysensor0Mixlyysensor0Mixlyysensorysensor39,119.96,31.67ysensorysensorstation45ps2_handle24512ps2_handle50ps2_handleps2_handlews_wr0121ws_wrws_wrws_wr360002zsensorzsensorzsensorzsensorweight12500weight0pin0servo900parrot0i2c_extend45400000matrixi2c_extendmatrixmatrixmatrixMixly0matrixMixlymatrixMixly500matrixMixlymatrixMixly500matrixmatrix>matrixmatrix1matrixmatrixmatrix0.5matrixmatrixi2c_extend45100000dispi2c_extenddisp2333dispdisp1i2c_extend45100000lcdi2c_extend0x27lcdMixly00lcdMixly005lcdlcdi2c_extend45100000oledi2c_extend0x3coledoled001oledMixlyoledMixly0010oledMixlyoledMixly0550oledMixlyoledMixly5500oled0020oled005050oled20202015oled1oled00oled00oledspi1000000450spi78tft_st7789135240tft_st7789001#ffffff255,255,0tft_st7789Mixly0050#ffffff255,255,0tft_st7789Mixly0550#ffffff255,255,0tft_st7789Mixly5500#ffffff255,255,0tft_st7789004040#ffffff255,255,0tft_st778912ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor'ni-hao','hong-se','lv-se','lan-se','bai-se','hei-se'0.1ai_sensor1.wav5ai_sensor1.wav100ai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsai_sensor'猫','狗','笔记本','笔'mixgo5自模型训练infoai_sensor'猫','狗','笔记本','笔'mixgo自模型识别objectsinfoai_sensor0.1606, 0.3562, 0.4712, 0.9568, 0.9877, 1.9108, 1.8761, 3.5310, 3.4423, 5.6823/sd/masks.kmodel外部模型加载objects12ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor1.wav5ai_sensor1.wav100infoai_sensorlicensePlateinfoai_sensorfaceinfoai_sensor20objectsai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsfilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0wifinamewifipasswordwlanwlanwlanwlanwlan127.16.0.801234567wlanwlanwlanwlanwlan127.16.0.81connect_wifiwlanAPwlanTruewlanwlanSmallCabbage1WHILETRUEEQ0wlan0.0.0.0ms1000TRUEss0.0.0.080s192.168.0.180s5ss1024sbMixlyresponses1024sbMixlyresponse127.0.0.180sntp.aliyun.comwifinamewifipassword0responsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponsehttp://192.168.1.1:11434qwen2.5-coder:0.5b5https://api.deepseek.comAPI Keydeepseek-chat5请介绍一下米思齐?content_callbackcontent_callbackcontent请介绍一下米思齐? \ No newline at end of file diff --git a/boards/default/micropython_educore/main.bundle.a5d45b4a.js b/boards/default/micropython_educore/main.bundle.a5d45b4a.js deleted file mode 100644 index f3abcd02..00000000 --- a/boards/default/micropython_educore/main.bundle.a5d45b4a.js +++ /dev/null @@ -1,21 +0,0 @@ -(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>Ft,controls_typeLists:()=>Pt,lists_zip:()=>vt,lists_zip_container:()=>Yt,lists_zip_item:()=>Xt,unpack_iterable_object:()=>yt,variables_change:()=>Dt,variables_get:()=>Lt,variables_global:()=>ft,variables_set:()=>Nt});var i={};t.r(i),t.d(i,{base_setup:()=>Vt,controls_delay:()=>Bt,controls_end_program:()=>Gt,controls_except:()=>Zt,controls_finally:()=>te,controls_flow_statements:()=>Kt,controls_for:()=>Jt,controls_forEach:()=>kt,controls_for_range:()=>qt,controls_if:()=>Ut,controls_if_else:()=>jt,controls_if_elseif:()=>Qt,controls_if_if:()=>zt,controls_lambda:()=>ie,controls_main:()=>bt,controls_pass:()=>ne,controls_range:()=>wt,controls_repeat_ext:()=>ee,controls_thread:()=>se,controls_try:()=>$t,controls_try_finally:()=>Wt,controls_whileUntil:()=>Ht,datetime_fromtimestamp:()=>re,do_while:()=>_e,garbage_collection:()=>oe,gene_unique_identifier:()=>le,get_mem_alloc:()=>pe,get_mem_free:()=>ae,get_unique_identifier:()=>ue});var n={};t.r(n),t.d(n,{base_map:()=>ve,generate_cartesian_product:()=>Xe,math_arithmetic:()=>he,math_bit:()=>Ee,math_constant:()=>Te,math_constant_mp:()=>Me,math_constrain:()=>Ae,math_dec:()=>Re,math_degree_to_radian:()=>xe,math_indexer_number:()=>Ne,math_map:()=>Le,math_max_min:()=>ge,math_number:()=>Ie,math_number_base_conversion:()=>Ce,math_radian_to_degree:()=>ye,math_random:()=>Se,math_random_seed:()=>De,math_round:()=>fe,math_selfcalcu:()=>me,math_to_int:()=>ce,math_trig:()=>Oe,text_to_number:()=>Fe,text_to_number_skulpt:()=>Pe,turn_to_int:()=>Ye});var s={};t.r(s),t.d(s,{ascii_to_char:()=>we,char_to_ascii:()=>ke,number_to_text:()=>He,os_system:()=>Mi,text:()=>Ve,text_capital:()=>Ze,text_center:()=>ti,text_char:()=>Ge,text_char_at:()=>Je,text_char_at2:()=>Ke,text_char_at3:()=>li,text_compareTo:()=>ri,text_compare_to:()=>$e,text_create_with_container:()=>pi,text_create_with_item:()=>ai,text_encode:()=>Ii,text_equals_starts_ends:()=>je,text_eval:()=>Ti,text_find:()=>ei,text_format:()=>oi,text_format_noreturn:()=>di,text_join:()=>Ue,text_join_seq:()=>ii,text_length:()=>We,text_random_char:()=>qe,text_replace:()=>ni,text_split:()=>si,text_strip:()=>_i,text_substring:()=>Qe,text_substring2:()=>ze,text_substring3:()=>ui,text_textarea:()=>Be});var _={};t.r(_),t.d(_,{ENUMERATE:()=>ji,content_in_lists:()=>Zi,enumerate:()=>$i,list_many_input:()=>Vi,list_tolist:()=>wi,list_tolist2:()=>Qi,list_trig:()=>yi,lists_2d_get_col_row_data:()=>Ri,lists_2d_get_data_with_col_row:()=>Oi,lists_append_extend:()=>Li,lists_change_to:()=>bi,lists_change_to_general:()=>Gi,lists_clear:()=>Pi,lists_create_with:()=>ci,lists_create_with2:()=>ki,lists_create_with_container:()=>Ci,lists_create_with_item:()=>Si,lists_create_with_noreturn:()=>Bi,lists_create_with_text:()=>gi,lists_create_with_text2:()=>Hi,lists_del_general:()=>Ui,lists_find:()=>Xi,lists_getIndex3:()=>Wi,lists_getSublist3:()=>Ki,lists_get_index:()=>mi,lists_get_random_item:()=>Ni,lists_get_random_sublist:()=>Di,lists_get_sublist:()=>Ei,lists_insert_value:()=>fi,lists_insert_value2:()=>qi,lists_pop:()=>Yi,lists_remove_at:()=>vi,lists_remove_at2:()=>zi,lists_reverse:()=>Fi,lists_setIndex3:()=>Ji,lists_set_index:()=>Ai,lists_sort:()=>xi});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>hn,dicts_add_or_change:()=>an,dicts_clear:()=>ln,dicts_create_with:()=>en,dicts_create_with_container:()=>nn,dicts_create_with_item:()=>sn,dicts_create_with_noreturn:()=>On,dicts_deldict:()=>Mn,dicts_delete:()=>un,dicts_get:()=>on,dicts_get_default:()=>pn,dicts_items:()=>dn,dicts_keys:()=>_n,dicts_length:()=>Tn,dicts_pop:()=>mn,dicts_setdefault:()=>En,dicts_to_json:()=>cn,dicts_to_json2:()=>Sn,dicts_to_to:()=>Cn,dicts_todict:()=>Rn,dicts_update:()=>rn,dicts_values:()=>In,json_to_dicts:()=>gn});var p={};t.r(p),t.d(p,{logic_boolean:()=>Fn,logic_compare:()=>Ln,logic_compare_continous:()=>Nn,logic_is:()=>Xn,logic_is_in:()=>Yn,logic_negate:()=>fn,logic_null:()=>Pn,logic_operation:()=>Dn,logic_tobool:()=>yn,logic_true_or_false:()=>vn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>ss,sdcard_use_spi_init:()=>ns,storage_can_write_ornot:()=>Hn,storage_change_dir:()=>es,storage_close_file:()=>Kn,storage_delete_file:()=>qn,storage_file_seek:()=>jn,storage_file_tell:()=>Qn,storage_file_write:()=>Gn,storage_fileopen:()=>bn,storage_fileopen_new:()=>Vn,storage_fileopen_new_encoding:()=>Bn,storage_get_a_line:()=>kn,storage_get_contents:()=>wn,storage_get_contents_without_para:()=>Un,storage_get_current_dir:()=>$n,storage_get_file_size:()=>zn,storage_get_filename:()=>Wn,storage_is_file:()=>is,storage_list_all_files:()=>Jn,storage_make_dir:()=>Zn,storage_open_file_with_os:()=>xn,storage_rename:()=>ts});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>us,procedures_callreturn:()=>rs,procedures_defnoreturn:()=>_s,procedures_defreturn:()=>os,procedures_ifreturn:()=>ls,procedures_mutatorarg:()=>as,procedures_mutatorcontainer:()=>ps,procedures_return:()=>ds});var r={};t.r(r),t.d(r,{tuple_change_to:()=>Ss,tuple_create_with:()=>Ts,tuple_create_with_container:()=>Ms,tuple_create_with_item:()=>hs,tuple_create_with_noreturn:()=>Ds,tuple_create_with_text2:()=>ms,tuple_create_with_text_return:()=>Es,tuple_del:()=>cs,tuple_find:()=>As,tuple_getIndex:()=>Os,tuple_getSublist:()=>Ns,tuple_get_random_item:()=>Fs,tuple_get_sublist:()=>fs,tuple_input:()=>vs,tuple_join:()=>gs,tuple_length:()=>Rs,tuple_max:()=>Cs,tuple_totuple:()=>Ps,tuple_trig:()=>Ls});var l={};t.r(l),t.d(l,{set_add_discard:()=>ws,set_clear:()=>Bs,set_create_with:()=>Xs,set_create_with_container:()=>ys,set_create_with_item:()=>xs,set_create_with_text_return:()=>Ws,set_length:()=>bs,set_operate:()=>Gs,set_operate_update:()=>Us,set_pop:()=>Vs,set_sub:()=>ks,set_toset:()=>Ks,set_update:()=>Hs});var d={};t.r(d),t.d(d,{html_content:()=>js,html_content_more:()=>$s,html_document:()=>qs,html_form:()=>t_,html_head_body:()=>Qs,html_style:()=>Zs,html_style_color:()=>i_,html_style_content:()=>e_,html_text:()=>n_,html_title:()=>zs});var I={};t.r(I),t.d(I,{attribute_access:()=>m_,function_call:()=>T_,function_call_container:()=>M_,function_call_item:()=>h_,raw_block:()=>o_,raw_empty:()=>a_,raw_expression:()=>p_,raw_table:()=>__,text_comment:()=>u_,text_print_multiple:()=>l_,text_print_multiple_container:()=>d_,text_print_multiple_item:()=>I_,type_check:()=>r_});var T={};t.r(T),t.d(T,{controls_type:()=>g_,controls_typeLists:()=>C_,lists_zip:()=>S_,unpack_iterable_object:()=>A_,variables_change:()=>R_,variables_get:()=>E_,variables_global:()=>c_,variables_set:()=>O_});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>y_,base_setup:()=>N_,controls_delay:()=>X_,controls_flow_statements:()=>Y_,controls_for:()=>F_,controls_forEach:()=>G_,controls_for_range:()=>P_,controls_if:()=>D_,controls_interrupts:()=>V_,controls_lambda:()=>w_,controls_main:()=>L_,controls_millis:()=>x_,controls_nointerrupts:()=>B_,controls_pass:()=>H_,controls_range:()=>U_,controls_repeat:()=>$_,controls_repeat_ext:()=>J_,controls_thread:()=>W_,controls_try_finally:()=>f_,controls_whileUntil:()=>v_,datetime_fromtimestamp:()=>Z_,do_while:()=>K_,garbage_collection:()=>q_,gene_unique_identifier:()=>to,get_mem_alloc:()=>z_,get_mem_free:()=>Q_,get_unique_identifier:()=>j_,reset:()=>b_,time_sleep:()=>k_});var h={};t.r(h),t.d(h,{base_map:()=>go,generate_cartesian_product:()=>So,math_arithmetic:()=>_o,math_bit:()=>so,math_constant:()=>io,math_constant_mp:()=>no,math_constrain:()=>Mo,math_dec:()=>uo,math_degree_to_radian:()=>Lo,math_indexer_number:()=>Eo,math_map:()=>To,math_max_min:()=>lo,math_number:()=>eo,math_number_base_conversion:()=>ho,math_radian_to_degree:()=>Ao,math_random:()=>Io,math_random_seed:()=>mo,math_round:()=>Oo,math_selfcalcu:()=>oo,math_single:()=>po,math_to_int:()=>ro,math_trig:()=>ao,text_to_number:()=>Ro,text_to_number_skulpt:()=>co,turn_to_int:()=>Co});var m={};t.r(m),t.d(m,{ascii_to_char:()=>Po,char_to_ascii:()=>vo,number_to_text:()=>Yo,os_system:()=>ip,text:()=>No,text_capital:()=>wo,text_center:()=>ko,text_char:()=>fo,text_char_at:()=>xo,text_char_at2:()=>yo,text_char_at3:()=>Zo,text_compareTo:()=>$o,text_compare_to:()=>Bo,text_encode:()=>tp,text_equals_starts_ends:()=>Vo,text_eval:()=>ep,text_find:()=>Ho,text_format:()=>zo,text_format_noreturn:()=>Qo,text_join:()=>Fo,text_join_seq:()=>Wo,text_length:()=>Xo,text_random_char:()=>bo,text_replace:()=>Ko,text_split:()=>Jo,text_strip:()=>qo,text_substring:()=>Uo,text_substring2:()=>Go,text_substring3:()=>jo,text_textarea:()=>Do});var E={};t.r(E),t.d(E,{content_in_lists:()=>xp,enumerate:()=>yp,list_many_input:()=>gp,list_tolist:()=>Yp,list_tolist2:()=>Xp,list_trig:()=>Op,lists_2d_get_col_row_data:()=>_p,lists_2d_get_data_with_col_row:()=>sp,lists_append_extend:()=>rp,lists_change_to:()=>cp,lists_change_to_general:()=>Sp,lists_clear:()=>Mp,lists_create_with:()=>op,lists_create_with2:()=>Lp,lists_create_with_noreturn:()=>Cp,lists_create_with_text:()=>pp,lists_create_with_text2:()=>Np,lists_del_general:()=>Ap,lists_find:()=>hp,lists_getIndex3:()=>Dp,lists_getSublist3:()=>fp,lists_get_index:()=>ap,lists_get_random_item:()=>lp,lists_get_random_sublist:()=>dp,lists_get_sublist:()=>np,lists_insert_value:()=>Ip,lists_insert_value2:()=>Pp,lists_pop:()=>Ep,lists_remove_at:()=>mp,lists_remove_at2:()=>vp,lists_reverse:()=>Tp,lists_setIndex3:()=>Fp,lists_set_index:()=>up,lists_sort:()=>Rp});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>zp,dicts_add_or_change:()=>Up,dicts_clear:()=>Hp,dicts_create_with:()=>bp,dicts_create_with_noreturn:()=>$p,dicts_deldict:()=>qp,dicts_delete:()=>wp,dicts_get:()=>Bp,dicts_get_default:()=>Gp,dicts_items:()=>Wp,dicts_keys:()=>Vp,dicts_length:()=>Jp,dicts_pop:()=>Qp,dicts_setdefault:()=>jp,dicts_to_json:()=>ta,dicts_to_json2:()=>na,dicts_to_to:()=>ia,dicts_todict:()=>Zp,dicts_update:()=>kp,dicts_values:()=>Kp,json_to_dicts:()=>ea});var R={};t.r(R),t.d(R,{logic_boolean:()=>aa,logic_compare:()=>sa,logic_compare_continous:()=>_a,logic_is:()=>da,logic_is_in:()=>la,logic_negate:()=>pa,logic_null:()=>ua,logic_operation:()=>oa,logic_tobool:()=>Ia,logic_true_or_false:()=>ra});var c={};t.r(c),t.d(c,{sdcard_mount:()=>xa,sdcard_use_spi_init:()=>ya,storage_can_write_ornot:()=>ga,storage_change_dir:()=>Fa,storage_close_file:()=>Sa,storage_delete_file:()=>La,storage_file_seek:()=>fa,storage_file_tell:()=>Da,storage_file_write:()=>Ea,storage_fileopen:()=>Ma,storage_fileopen_new:()=>ha,storage_fileopen_new_encoding:()=>ma,storage_get_a_line:()=>ca,storage_get_contents:()=>Ra,storage_get_contents_without_para:()=>Oa,storage_get_current_dir:()=>Pa,storage_get_file_size:()=>Na,storage_get_filename:()=>Ca,storage_is_file:()=>Xa,storage_list_all_files:()=>Aa,storage_make_dir:()=>va,storage_open_file_with_os:()=>Ta,storage_rename:()=>Ya});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Ga,procedures_callreturn:()=>Ba,procedures_defnoreturn:()=>Va,procedures_defreturn:()=>ba,procedures_ifreturn:()=>Ua,procedures_return:()=>wa});var C={};t.r(C),t.d(C,{tuple_change_to:()=>ja,tuple_create_with:()=>ka,tuple_create_with_noreturn:()=>eu,tuple_create_with_text2:()=>Ha,tuple_create_with_text_return:()=>Wa,tuple_del:()=>qa,tuple_find:()=>$a,tuple_getIndex:()=>Ka,tuple_getSublist:()=>tu,tuple_get_random_item:()=>nu,tuple_get_sublist:()=>iu,tuple_input:()=>_u,tuple_join:()=>za,tuple_length:()=>Ja,tuple_max:()=>Qa,tuple_totuple:()=>su,tuple_trig:()=>Za});var S={};t.r(S),t.d(S,{set_add_discard:()=>du,set_clear:()=>uu,set_create_with:()=>ou,set_create_with_text_return:()=>Mu,set_length:()=>pu,set_operate:()=>ru,set_operate_update:()=>lu,set_pop:()=>au,set_sub:()=>Iu,set_toset:()=>hu,set_update:()=>Tu});var A={};t.r(A),t.d(A,{html_content:()=>Ru,html_content_more:()=>cu,html_document:()=>mu,html_form:()=>Cu,html_head_body:()=>Ou,html_style:()=>gu,html_style_content:()=>Su,html_text:()=>Au,html_title:()=>Eu});var L={};t.r(L),t.d(L,{attribute_access:()=>vu,function_call:()=>Pu,raw_block:()=>Lu,raw_empty:()=>Du,raw_expression:()=>Nu,raw_table:()=>fu,type_check:()=>Fu});var N={};t.r(N),t.d(N,{PIN_init:()=>br,actuator_extern_get_led_bright:()=>Ku,actuator_extern_get_led_state:()=>Ju,actuator_extern_led_bright:()=>Wu,actuator_extern_led_brightness:()=>qu,actuator_ms32006_dcmotor:()=>nr,actuator_ms32006_init:()=>ir,actuator_ms32006_stepper:()=>sr,actuator_neopixel_init:()=>_r,actuator_neopixel_rgb:()=>or,actuator_neopixel_rgb_all:()=>pr,actuator_neopixel_rgb_show_all_chase:()=>rr,actuator_neopixel_rgb_show_all_rainbow:()=>ur,actuator_neopixel_write:()=>ar,actuator_use_uart_init:()=>lr,esp32_music_get_tempo_extern:()=>wu,esp32_music_pitch:()=>Vu,esp32_music_pitch_init:()=>bu,esp32_music_pitch_with_time:()=>Bu,esp32_music_play_list:()=>Gu,esp32_music_reset_extern:()=>ku,esp32_music_set_tempo_extern:()=>Uu,esp32_music_stop:()=>Hu,mixbot_actuator_extern_get_addr:()=>yr,mixbot_actuator_extern_set_addr:()=>xr,mixbot_addr_extern:()=>gr,parrot_PIN_init:()=>Ur,parrot_move_speed:()=>wr,pin_led_bright:()=>Vr,player_insert_music:()=>mr,player_play_music:()=>hr,player_set_mode:()=>Mr,player_set_play:()=>Ir,player_set_volume:()=>Tr,player_whether_stop:()=>dr,robot_led_extern:()=>Lr,robot_led_extern_get_value:()=>Nr,robot_motor_extern:()=>Cr,robot_motor_extern_get_speed:()=>Sr,robot_servo_extern_absolute_run:()=>Pr,robot_servo_extern_get_status:()=>Dr,robot_servo_extern_relative_continue:()=>Xr,robot_servo_extern_relative_origin:()=>vr,robot_servo_extern_relative_run:()=>Yr,robot_servo_extern_stop:()=>Fr,robot_servo_extern_stop_mode:()=>fr,robot_traffic_light_extern:()=>Ar,servo_PIN_init:()=>Br,servo_get_angle:()=>tr,servo_get_speed:()=>er,servo_init:()=>zu,servo_move:()=>Qu,servo_move_angle:()=>Gr,servo_set_angle:()=>$u,servo_set_speed:()=>Zu,servo_speed_360:()=>ju,syn6288_builtin_voice:()=>Rr,syn6288_get_voice:()=>Or,syn6288_set_voice:()=>Er,syn6288_tts_play:()=>cr});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>Rl,actuator_dc_motor_stop:()=>cl,actuator_get_led_bright:()=>Jr,actuator_get_led_state:()=>qr,actuator_led_bright:()=>Kr,actuator_led_brightness:()=>zr,actuator_mixbot_buzzer_on_off:()=>Ll,actuator_mixgo_nova_mic_get:()=>Pl,actuator_mixgo_nova_mic_set:()=>Fl,actuator_mixgo_nova_onboard_music_pitch:()=>bl,actuator_mixgo_nova_onboard_music_stop:()=>Vl,actuator_mixgo_nova_play_audio:()=>yl,actuator_mixgo_nova_play_online_audio:()=>xl,actuator_mixgo_nova_record_audio:()=>Xl,actuator_mixgo_nova_voice_get:()=>Yl,actuator_mixgo_nova_voice_set:()=>vl,actuator_mixgo_zero_led_color:()=>Qr,actuator_onboard_neopixel_rgb:()=>il,actuator_onboard_neopixel_rgb_all:()=>nl,actuator_onboard_neopixel_rgb_show_all_chase:()=>_l,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>sl,actuator_onboard_neopixel_write:()=>ol,actuator_rm_onboard_neopixel_rgb:()=>pl,actuator_rm_onboard_neopixel_rgb_all:()=>al,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>ul,actuator_stepper_keep:()=>El,actuator_stepper_stop:()=>Ol,analog_ble_keyboard_init:()=>jl,analog_ble_keyboard_input:()=>td,analog_ble_keyboard_mouse_init:()=>ad,analog_ble_keyboard_mouse_input:()=>dd,analog_ble_keyboard_mouse_send_battery:()=>ld,analog_ble_keyboard_mouse_str:()=>Id,analog_ble_keyboard_send_battery:()=>id,analog_ble_keyboard_str:()=>ed,analog_ble_mouse_init:()=>nd,analog_ble_mouse_input:()=>od,analog_ble_mouse_keyboard_input:()=>Td,analog_ble_mouse_send_battery:()=>pd,analog_keyboard_input:()=>wl,analog_keyboard_str:()=>Ql,analog_mouse_input:()=>ql,bitbot_motor:()=>fl,bitbot_move:()=>Nl,bitbot_stop:()=>Dl,ble_keyboard_connect:()=>Zl,ble_keyboard_get_mac:()=>$l,ble_keyboard_mouse_connect:()=>rd,ble_keyboard_mouse_get_mac:()=>ud,ble_mouse_connect:()=>_d,ble_mouse_get_mac:()=>sd,cc_number:()=>el,educore_ble_keyboard_input:()=>Sd,educore_ble_sensor_connected:()=>Cd,educore_ble_sensor_init:()=>gd,educore_buzzer:()=>Md,educore_buzzer_play_tone:()=>hd,educore_buzzer_play_tone_time:()=>md,educore_buzzer_stop:()=>Ed,educore_neopixel_clear:()=>cd,educore_neopixel_rgb:()=>Rd,educore_rgb_light:()=>Od,esp32_music_get_tempo:()=>ll,esp32_music_reset:()=>dl,esp32_music_set_tempo:()=>rl,esp32_onboard_music_pitch:()=>Il,esp32_onboard_music_pitch_with_time:()=>Tl,esp32_onboard_music_play_list:()=>hl,esp32_onboard_music_stop:()=>Ml,general_key:()=>Hl,general_key_tuple:()=>Wl,generalkey_container:()=>Kl,generalkey_create_with_item:()=>Jl,get_keyboard_light:()=>Ad,get_power_output:()=>Gl,ledswitch:()=>Wr,mixbot_motor:()=>Al,mixbot_motor_status:()=>gl,mixbot_move:()=>Cl,mixbot_stop:()=>Sl,mouse_key:()=>zl,number:()=>Hr,rm_actuator_get_led_bright:()=>$r,rm_actuator_get_led_state:()=>Zr,rm_actuator_led_bright:()=>jr,rm_actuator_led_brightness:()=>tl,rm_motor:()=>ml,set_all_power_output:()=>Ul,set_power_output:()=>Bl,special_key:()=>kl});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>_I,ai_sensor_ailocal_class:()=>qd,ai_sensor_ailocal_class_result:()=>zd,ai_sensor_ailocal_train:()=>Jd,ai_sensor_asr_recognize:()=>tI,ai_sensor_audio_play:()=>jd,ai_sensor_audio_record:()=>Qd,ai_sensor_barcode:()=>Yd,ai_sensor_circle:()=>Bd,ai_sensor_classifier_faces:()=>sI,ai_sensor_color:()=>kd,ai_sensor_color_chases:()=>Kd,ai_sensor_color_chases_result:()=>Wd,ai_sensor_config:()=>Pd,ai_sensor_face:()=>nI,ai_sensor_find_20objects:()=>oI,ai_sensor_find_barcodes:()=>Xd,ai_sensor_find_circles:()=>Gd,ai_sensor_find_colors:()=>Hd,ai_sensor_find_licenseplates:()=>iI,ai_sensor_find_lines:()=>Vd,ai_sensor_find_qrcodes:()=>Fd,ai_sensor_find_rects:()=>wd,ai_sensor_find_tags:()=>xd,ai_sensor_licenseplate:()=>eI,ai_sensor_line:()=>bd,ai_sensor_qrcode:()=>Dd,ai_sensor_qrcode_lite:()=>fd,ai_sensor_rect:()=>Ud,ai_sensor_rgb:()=>vd,ai_sensor_tag:()=>yd,ai_sensor_use_uart_init:()=>Nd,ai_sensor_yolo_recognize:()=>$d,ai_sensor_yolo_recognize_result:()=>Zd});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>uI,MICROPYTHON_AI_Speech_unit:()=>aI,MICROPYTHON_AI_client:()=>pI});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>SI,mpython_blynk_app_notify:()=>mI,mpython_blynk_email:()=>RI,mpython_blynk_get_timers:()=>cI,mpython_blynk_on_connected:()=>TI,mpython_blynk_on_disconnected:()=>II,mpython_blynk_run:()=>hI,mpython_blynk_sensor_data_to_app:()=>CI,mpython_blynk_set_property:()=>OI,mpython_blynk_setup:()=>AI,mpython_blynk_stop_timers:()=>EI,mpython_blynk_sync_virtual:()=>dI,mpython_blynk_terminal_widget_vpin:()=>lI,mpython_blynktimer:()=>gI,mpython_blynktimer_run:()=>MI});var v={};t.r(v),t.d(v,{cc_g1_init:()=>LI,cc_g1_read_bat:()=>NI,cc_g1_read_joystick:()=>DI,cc_g1_read_key:()=>fI,cc_g1_turnoff:()=>FI});var Y={};t.r(Y),t.d(Y,{ce_go_dc_motor:()=>BI,ce_go_get_led_bright:()=>XI,ce_go_get_led_state:()=>yI,ce_go_hall_attachInterrupt:()=>GI,ce_go_hall_data:()=>wI,ce_go_hall_initialize:()=>UI,ce_go_led_bright:()=>YI,ce_go_led_brightness:()=>xI,ce_go_light_number:()=>vI,ce_go_pin_light:()=>JI,ce_go_pin_near:()=>HI,ce_go_pin_near_line:()=>kI,ce_go_pin_near_state_change:()=>WI,ce_go_stepper_keep:()=>bI,ce_go_stepper_stop:()=>VI,educore_car:()=>qI,educore_car_pin_near:()=>$I,educore_car_pin_near_line:()=>jI,educore_car_stepper_keep:()=>zI,educore_car_stepper_stop:()=>QI,sensor_mixgome_eulerangles:()=>KI});var X={};t.r(X),t.d(X,{communicate_bluetooth_central_init:()=>XT,communicate_bluetooth_connect:()=>VT,communicate_bluetooth_disconnect:()=>BT,communicate_bluetooth_handle:()=>HT,communicate_bluetooth_is_connected:()=>UT,communicate_bluetooth_mac:()=>bT,communicate_bluetooth_peripheral_init:()=>yT,communicate_bluetooth_recv:()=>wT,communicate_bluetooth_recv_only:()=>kT,communicate_bluetooth_scan:()=>xT,communicate_bluetooth_send:()=>GT,communicate_espnow_init:()=>WT,communicate_espnow_init_new:()=>KT,communicate_i2c_available:()=>hT,communicate_i2c_init:()=>iT,communicate_i2c_master_read:()=>MT,communicate_i2c_onboard:()=>tT,communicate_i2c_read:()=>nT,communicate_i2c_scan:()=>_T,communicate_i2c_write:()=>sT,communicate_ir_recv_init:()=>ST,communicate_ir_send_init:()=>fT,communicate_ow_init:()=>ET,communicate_ow_read:()=>RT,communicate_ow_reset:()=>CT,communicate_ow_scan:()=>OT,communicate_ow_select:()=>gT,communicate_ow_write:()=>cT,communicate_spi_buffer:()=>aT,communicate_spi_init:()=>oT,communicate_spi_onboard:()=>eT,communicate_spi_read:()=>uT,communicate_spi_read_output:()=>rT,communicate_spi_readinto:()=>lT,communicate_spi_readinto_output:()=>dT,communicate_spi_set:()=>pT,communicate_spi_write:()=>IT,communicate_spi_write_readinto:()=>TT,espnow_radio_channel:()=>$T,espnow_radio_channel_new:()=>tM,espnow_radio_on_off:()=>eM,espnow_radio_rec:()=>nM,espnow_radio_recv:()=>_M,espnow_radio_recv_certain_msg:()=>oM,espnow_radio_recv_certain_msg_new:()=>aM,espnow_radio_recv_msg:()=>sM,espnow_radio_recv_new:()=>pM,espnow_radio_send:()=>iM,espnow_radio_txpower:()=>ZT,i2c_available:()=>FM,i2c_init:()=>hM,i2c_master_reader2:()=>fM,i2c_read:()=>mM,i2c_scan:()=>OM,i2c_slave_onreceive:()=>mT,i2c_write:()=>EM,internal_variable:()=>AT,ir_recv_timeout:()=>DT,ir_transmit_busy:()=>YT,ir_transmit_conventional_data:()=>FT,ir_transmit_raw_code:()=>vT,ir_transmit_study_code:()=>PT,ir_whether_recv:()=>NT,lora_init:()=>uM,lora_packet:()=>rM,lora_recv:()=>dM,lora_send:()=>lM,network_espnow_info:()=>qT,network_espnow_mac:()=>JT,network_espnow_recv:()=>zT,network_espnow_recv_handle:()=>jT,network_espnow_send:()=>QT,recv_fun:()=>LT,spi_buffer:()=>gM,spi_init:()=>RM,spi_read:()=>CM,spi_read_output:()=>SM,spi_readinto:()=>AM,spi_readinto_output:()=>LM,spi_set:()=>cM,spi_write:()=>NM,spi_write_readinto:()=>DM,urequests_attribute:()=>TM,urequests_get:()=>IM,urequests_method:()=>MM});var y={};t.r(y),t.d(y,{display_animate:()=>ah,display_blink_rate:()=>sh,display_circle:()=>uh,display_color_seclet:()=>ch,display_draw_4strings:()=>$M,display_fill:()=>ph,display_get_screen_image:()=>nh,display_help:()=>lh,display_image_size:()=>ZM,display_lcd_use_i2c_init:()=>Nh,display_line:()=>eh,display_line_arbitrarily:()=>ih,display_matrix_extern_bright_point:()=>HM,display_matrix_extern_bright_screen:()=>KM,display_matrix_extern_clear:()=>JM,display_matrix_extern_get_pixel:()=>kM,display_matrix_extern_get_screen_pixel:()=>WM,display_matrix_extern_image_builtins:()=>qM,display_matrix_extern_scroll_string:()=>VM,display_matrix_extern_scroll_string_delay:()=>BM,display_matrix_extern_shift:()=>wM,display_matrix_extern_show_frame_string:()=>GM,display_matrix_extern_show_frame_string_delay:()=>UM,display_matrix_extern_show_image:()=>xM,display_matrix_extern_show_image_or_string_delay:()=>bM,display_matrix_use_i2c_init:()=>yM,display_oled_drawPixel:()=>Ih,display_oled_showBitmap:()=>dh,display_oled_use_i2c_init:()=>vh,display_onoff:()=>oh,display_rect:()=>th,display_rgb_color:()=>_h,display_tm1650_power:()=>Mh,display_tm1650_set_brightness:()=>Eh,display_tm1650_show_dot:()=>mh,display_tm1650_show_num:()=>hh,display_tm_use_i2c_init:()=>Th,display_triangle:()=>rh,display_use_i2c_init:()=>jM,extern_oled_bright_point:()=>kh,extern_oled_clear:()=>Hh,extern_oled_get_pixel:()=>wh,extern_oled_hvline:()=>Kh,extern_oled_line:()=>Jh,extern_oled_scroll_string:()=>bh,extern_oled_scroll_string_delay:()=>Vh,extern_oled_shape_rect:()=>Wh,extern_oled_shift:()=>Uh,extern_oled_show_frame_string:()=>Bh,extern_oled_show_frame_string_delay:()=>Gh,extern_oled_show_image:()=>Yh,extern_oled_show_image_or_string_delay:()=>xh,extern_oled_show_image_xy:()=>Xh,extern_oled_show_string:()=>yh,lcd_backlight:()=>Fh,lcd_clear:()=>Ph,lcd_print_string:()=>fh,lcd_show_image_or_string_delay:()=>Dh,matrix_extern_image_arithmetic:()=>zM,matrix_extern_image_invert:()=>QM,tft_fill:()=>Ah,tft_line_arbitrarily:()=>Lh,tft_scroll_string_delay:()=>Ch,tft_show_frame_string_delay:()=>Sh,tft_show_image_or_string_delay:()=>gh,tft_show_image_xy:()=>Rh,tft_use_spi_init:()=>Oh});var x={};t.r(x),t.d(x,{bitbot_display_bitmap_create:()=>Gm,bitbot_display_image_create:()=>Bm,display_available:()=>Tm,display_bitmap_create:()=>nm,display_bright_point:()=>rm,display_bright_screen:()=>dm,display_clear:()=>Im,display_get_pixel:()=>um,display_get_screen_pixel:()=>lm,display_image_builtins:()=>sm,display_image_builtins_all:()=>_m,display_image_create:()=>im,display_scroll_string:()=>jh,display_scroll_string_delay:()=>$h,display_shift:()=>am,display_show_frame_string:()=>tm,display_show_frame_string_delay:()=>em,display_show_image:()=>zh,display_show_image_or_string_delay:()=>Qh,draw_pointer:()=>nE,image_arithmetic:()=>om,image_invert:()=>pm,mixbot_display_bitmap_create:()=>Xm,mixbot_display_bright_screen:()=>bm,mixbot_display_get_ambientbright:()=>xm,mixbot_display_get_screen_pixel:()=>ym,mixbot_display_image_create:()=>Ym,mixbot_display_rotate:()=>Vm,mixgo_display_bitmap_create:()=>Rm,mixgo_display_image_create_new:()=>Om,mixgome_display_bitmap_create:()=>hm,mixgome_display_font:()=>cm,mixgome_display_image_create:()=>Mm,mixgomini_display_bitmap_create:()=>Em,mixgomini_display_image_create:()=>mm,mpython_display_hvline:()=>Fm,mpython_display_line:()=>Pm,mpython_display_shape_rect:()=>fm,mpython_pbm_image:()=>vm,nova_draw_pointer:()=>sE,onboard_oled_bright_point:()=>Dm,onboard_oled_scroll_string_delay:()=>Lm,onboard_oled_show_frame_string_delay:()=>Nm,onboard_oled_show_image:()=>gm,onboard_oled_show_image_or_string_delay:()=>Am,onboard_oled_show_image_xy:()=>Cm,onboard_oled_show_string:()=>Sm,onboard_tft_bright_point:()=>zm,onboard_tft_bright_screen:()=>lE,onboard_tft_clear:()=>dE,onboard_tft_clock_clear:()=>eE,onboard_tft_clock_draw:()=>tE,onboard_tft_clock_get_rtctime:()=>$m,onboard_tft_clock_init:()=>jm,onboard_tft_clock_set_time:()=>Zm,onboard_tft_display_hvline:()=>Km,onboard_tft_display_line:()=>Jm,onboard_tft_display_shape_circle:()=>iE,onboard_tft_display_shape_rect:()=>Wm,onboard_tft_fill:()=>Qm,onboard_tft_get_pixel:()=>qm,onboard_tft_get_screen_pixel:()=>rE,onboard_tft_scroll_string:()=>pE,onboard_tft_scroll_string_delay:()=>Zh,onboard_tft_shift:()=>uE,onboard_tft_show_frame_string:()=>aE,onboard_tft_show_frame_string_delay:()=>Hm,onboard_tft_show_image:()=>oE,onboard_tft_show_image_or_string_delay:()=>km,onboard_tft_show_image_xy:()=>Um,onboard_tft_show_image_xy_direct:()=>wm,onboard_tft_show_texts:()=>_E});var b={};t.r(b),t.d(b,{factory_block:()=>FE,factory_block_return:()=>PE,factory_block_return_with_textarea:()=>YE,factory_block_with_textarea:()=>vE,factory_callMethod_noreturn:()=>DE,factory_callMethod_return:()=>fE,factory_create_with_container:()=>SE,factory_create_with_item:()=>AE,factory_declare:()=>NE,factory_from_import:()=>cE,factory_function_noreturn:()=>CE,factory_function_return:()=>LE,factory_import:()=>gE,folding_block:()=>XE});var V={};t.r(V),t.d(V,{controls_pin_attachInterrupt:()=>iO,inout_analog_atten:()=>HE,inout_analog_read:()=>kE,inout_analog_read_init:()=>QE,inout_analog_write:()=>GE,inout_analog_write_init:()=>zE,inout_analog_write_set:()=>UE,inout_analog_write_set_freq:()=>ZE,inout_digital_init:()=>JE,inout_digital_read:()=>VE,inout_digital_write:()=>bE,inout_highlow:()=>xE,inout_pinMode:()=>$E,inout_pin_attachInterrupt:()=>KE,inout_pin_pressed:()=>WE,inout_pin_pressed_init:()=>jE,inout_pwm_analog_write:()=>BE,inout_pwm_analog_write_init:()=>qE,inout_pwm_analog_write_set_freq:()=>wE,pin_pressed:()=>eO,pin_pressed_init:()=>tO});var B={};t.r(B),t.d(B,{IOT_CONNECT_OLLAMA:()=>BO,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>LO,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>AO,IOT_EMQX_PING:()=>CO,IOT_FORMATTING:()=>cO,IOT_FORMAT_STRING:()=>gO,IOT_MIXIO_NTP:()=>SO,IOT_MIXIO_PUBLISH:()=>TO,IOT_MIXIO_SUBSCRIBE:()=>MO,iot_checkonenet:()=>xO,iot_client_onboard:()=>DO,iot_connect_ollama:()=>VO,iot_connect_openai:()=>GO,iot_create_with_item:()=>dO,iot_http_client:()=>fO,iot_http_data:()=>FO,iot_mixio_check:()=>EO,iot_mixio_connect:()=>IO,iot_mixio_connect_only:()=>mO,iot_mixio_disconnect:()=>hO,iot_mixio_format_msg:()=>RO,iot_mixio_format_topic:()=>OO,iot_mixly_key:()=>NO,iot_mqtt_client:()=>PO,iot_mqtt_data:()=>vO,iot_onenet_check:()=>pO,iot_onenet_connect:()=>_O,iot_onenet_disconnect:()=>oO,iot_onenet_publish:()=>uO,iot_onenet_publish_dict:()=>aO,iot_onenetconnect:()=>XO,iot_onenetdisconnect:()=>yO,iot_publish:()=>bO,iot_publish_container:()=>rO,iot_publish_item:()=>lO,iot_wifi_connect:()=>sO,iot_wificonnect:()=>YO,ollama_empty_history:()=>kO,use_ollama_llm_to_chat:()=>UO,use_ollama_llm_to_chat_return:()=>wO});var G={};t.r(G),t.d(G,{educore_mqtt_connect:()=>gR,educore_mqtt_connect_success:()=>LR,educore_mqtt_subscribe_message:()=>CR,educore_mqtt_topic_publish:()=>AR,educore_mqtt_topic_subscribe:()=>SR,educore_wifi_connect:()=>cR,network_ap_connect:()=>tR,network_connect:()=>zO,network_get_connect:()=>jO,network_get_wifi:()=>ZO,network_init:()=>WO,network_is_active:()=>JO,network_open:()=>KO,network_scan:()=>qO,network_server:()=>eR,network_socket_accept:()=>oR,network_socket_bind:()=>nR,network_socket_close:()=>lR,network_socket_connect:()=>sR,network_socket_init:()=>iR,network_socket_listen:()=>_R,network_socket_receive:()=>pR,network_socket_receive_from:()=>uR,network_socket_send:()=>aR,network_socket_send_to:()=>rR,network_stop:()=>$O,network_wifi_connect:()=>QO,ntptime_address:()=>hR,ntptime_time:()=>MR,requests_attribute:()=>IR,requests_attribute2:()=>RR,requests_get:()=>dR,requests_get2:()=>ER,requests_method:()=>TR,requests_post:()=>OR});var U={};t.r(U),t.d(U,{CI130X_BROADCAST:()=>jR,CI130X_GET_THE_RECOGNIZED_CMD:()=>QR,CI130X_GET_WHETHER_IDENTIFY:()=>zR,CI130X_IDENTIFY_AND_SAVE:()=>qR,CI130X_SET_SYSTEM_CMD:()=>$R,HCSR04:()=>Gc,PS2_Button:()=>Hc,PS2_Buttons:()=>Kc,PS2_Buttons_new:()=>Qc,PS2_State:()=>Wc,PS2_init:()=>Uc,PS2_init_new:()=>qc,PS2_stk:()=>Jc,PS2_stk_new:()=>jc,PS2_vibration:()=>kc,PS2_vibration_new:()=>zc,camera_sensor_init:()=>Ng,camera_sensor_result:()=>Dg,column_tube_foot:()=>Yg,define_keyboards:()=>Xg,educore_body_sensor:()=>mg,educore_button_sensor_extern:()=>cg,educore_camera_sensor:()=>Lg,educore_infrared_sensor:()=>Rg,educore_soilhum_sensor:()=>Eg,educore_temp_sensor:()=>Ag,educore_temphum_sensor:()=>Og,educore_ultrasonic_sensor:()=>Cg,esp32_s2_weather_init:()=>xc,esp32_s2_weather_rain:()=>Vc,esp32_s2_weather_wd:()=>bc,esp32_s2_weather_ws:()=>Bc,extern_rfid_read:()=>gc,extern_rfid_readcontent:()=>Sc,extern_rfid_readid:()=>Cc,extern_rfid_status:()=>Nc,extern_rfid_write:()=>Ac,extern_rfid_write_return:()=>Lc,get_keboards_value:()=>yg,gnss_get_data:()=>eg,gnss_have_data:()=>tg,init_matrix_keyboard:()=>Pg,interaction_whether_to_interaction:()=>KR,interaction_whether_to_interaction_SANT:()=>JR,line_tube_foot:()=>vg,mixbot_sensor_extern_get_addr:()=>ug,mixbot_sensor_extern_set_addr:()=>rg,pm25_get_data:()=>Zc,radar_set_DETECTION_THRESHOLD:()=>HR,radar_set_DETECTION_THRESHOLD_SANT:()=>WR,robot_button_extern_get_value:()=>ng,robot_color_extern_get_value:()=>ag,robot_infrared_extern_get_value:()=>_g,robot_infrared_extern_grey_get_value:()=>og,robot_potentiometer_extern_get_value:()=>pg,robot_sonar_extern_get_value:()=>lg,robot_sonar_extern_led:()=>dg,robot_touch_extern_get_value:()=>sg,sensor_APDS9960_extern:()=>tc,sensor_DS18X20:()=>UR,sensor_LTR308_extern:()=>ec,sensor_LTR390UV_extern:()=>sc,sensor_MAX30102_extern:()=>ZR,sensor_QMC5883L_extern:()=>dc,sensor_VL530LX_extern:()=>_c,sensor_adxl345_get_acceleration:()=>YR,sensor_aht11_extern:()=>pc,sensor_bmp:()=>BR,sensor_compass_reset:()=>Rc,sensor_dht11:()=>yR,sensor_hp203_extern:()=>ac,sensor_light_level:()=>XR,sensor_lm35:()=>wR,sensor_ltr381_extern:()=>ic,sensor_mixgo_extern_button_attachInterrupt:()=>PR,sensor_mixgo_extern_button_get_presses:()=>FR,sensor_mixgo_extern_button_is_pressed:()=>DR,sensor_mixgo_extern_button_was_pressed:()=>fR,sensor_mixgo_extern_light:()=>xR,sensor_mixgo_extern_pin_near:()=>VR,sensor_mixgo_extern_sound:()=>bR,sensor_mixgoce_hot_wheel_degrees:()=>yc,sensor_mixgoce_hot_wheel_is_touched:()=>Xc,sensor_mpu9250_attachGestureInterrupt:()=>vR,sensor_mpu9250_calibrate_compass:()=>mc,sensor_mpu9250_field_strength:()=>Oc,sensor_mpu9250_gesture:()=>Ic,sensor_mpu9250_get_acceleration:()=>Tc,sensor_mpu9250_get_gyro:()=>hc,sensor_mpu9250_get_magnetic:()=>Mc,sensor_mpu9250_temperature:()=>Ec,sensor_ms5611_extern:()=>rc,sensor_ms5611_extern_altitude:()=>lc,sensor_read_humiture:()=>gg,sensor_sht:()=>GR,sensor_shtc3_extern:()=>oc,sensor_spl06_001_extern:()=>uc,sensor_ucs12071_extern:()=>nc,sensor_use_i2c_init:()=>kR,sensor_use_spi_init:()=>cc,sensor_use_uart_init:()=>$c,sensor_weather_solo_init:()=>Ig,sensor_weather_solo_rain:()=>hg,sensor_weather_solo_wd:()=>Tg,sensor_weather_solo_ws:()=>Mg,sensor_weigh_init:()=>fg,tvoc_get_data:()=>ig,ultrasonic_sensor_read_distance:()=>Sg,weather_data:()=>Dc,weather_have_data:()=>fc,weather_set_label:()=>Pc,weather_set_label_container:()=>vc,weather_set_label_item:()=>Yc,weather_uart_mixio:()=>Fc,weigh_sensor_get_weight:()=>Fg});var w={};t.r(w),t.d(w,{HCSR04:()=>$g,RTC_set_date:()=>jg,RTC_set_time:()=>Qg,bitbot_als_num:()=>pS,dht11:()=>TS,educore_button_sensor:()=>CS,educore_button_was_pressed:()=>SS,educore_gyroscope_sensor:()=>RS,educore_gyroscope_sensor_read:()=>cS,educore_gyroscope_sensor_shake:()=>gS,educore_light_sensor:()=>OS,educore_rfid_sensor:()=>AS,educore_rfid_sensor_scan:()=>LS,educore_rfid_sensor_scan_data:()=>NS,educore_voice_sensor:()=>mS,number1:()=>tC,number2:()=>eC,number3:()=>iC,number4:()=>nC,number5:()=>sC,number6:()=>_C,number7:()=>oC,onboard_RTC_get_time:()=>TC,onboard_RTC_get_time_str:()=>RC,onboard_RTC_get_timestamp:()=>MC,onboard_RTC_get_timetuple_to_str:()=>cC,onboard_RTC_set_datetime:()=>EC,onboard_RTC_settime_string:()=>mC,onboard_RTC_timestamp_totuple:()=>hC,rfid_readcontent:()=>DC,rfid_readid:()=>NC,rfid_status:()=>PC,rfid_write:()=>fC,rfid_write_return:()=>FC,sensor_LTR308:()=>gC,sensor_aht11:()=>SC,sensor_bitbot_ALS:()=>oS,sensor_button_get_presses:()=>rS,sensor_button_is_pressed:()=>aS,sensor_button_was_pressed:()=>uS,sensor_distance_hrsc04:()=>zg,sensor_eulerangles:()=>YC,sensor_field_strength:()=>MS,sensor_get_acceleration:()=>vC,sensor_get_temperature:()=>AC,sensor_get_the_coprocessor_version:()=>DS,sensor_hp203:()=>LC,sensor_light:()=>IS,sensor_mixbot_get_gyro:()=>_S,sensor_mixbot_patrol_calibrate:()=>iS,sensor_mixbot_patrol_value:()=>nS,sensor_mixbot_temperature:()=>sS,sensor_mixgo_LTR308:()=>dC,sensor_mixgo_button_attachInterrupt:()=>Gg,sensor_mixgo_button_get_presses:()=>Bg,sensor_mixgo_button_is_pressed:()=>bg,sensor_mixgo_button_was_pressed:()=>Vg,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>HC,sensor_mixgo_cc_mmc5603_get_angle:()=>kC,sensor_mixgo_cc_mmc5603_get_magnetic:()=>wC,sensor_mixgo_light:()=>Zg,sensor_mixgo_nova_LTR308:()=>lC,sensor_mixgo_nova_pin_near:()=>rC,sensor_mixgo_pin_near:()=>uC,sensor_mixgo_pin_near_double:()=>aC,sensor_mixgo_pin_near_single:()=>pC,sensor_mixgo_pin_pressed:()=>Wg,sensor_mixgo_sant_color:()=>IC,sensor_mixgo_touch_slide:()=>qg,sensor_mixgocar42_button_attachInterrupt:()=>Hg,sensor_mixgocar42_button_get_presses:()=>kg,sensor_mixgocar42_button_is_pressed:()=>Ug,sensor_mixgocar42_button_was_pressed:()=>wg,sensor_mixgocar_battery_left:()=>eS,sensor_mixgocar_pin_near:()=>ZC,sensor_mixgocar_pin_near_line:()=>$C,sensor_mixgocar_pin_near_state_change:()=>tS,sensor_mixgoce_pin_pressed:()=>Kg,sensor_mixgoce_temperature:()=>KC,sensor_mixgome_temperature:()=>WC,sensor_mpython_pin_pressed:()=>Jg,sensor_mpython_qmi8658_get_gyro:()=>JC,sensor_mpython_qmi8658_temperature:()=>qC,sensor_onboard_compass_reset:()=>UC,sensor_onboard_mpu9250_calibrate_compass:()=>VC,sensor_onboard_mpu9250_field_strength:()=>GC,sensor_onboard_mpu9250_gesture:()=>XC,sensor_onboard_mpu9250_get_acceleration:()=>yC,sensor_onboard_mpu9250_get_gyro:()=>bC,sensor_onboard_mpu9250_get_magnetic:()=>xC,sensor_onboard_mpu9250_temperature:()=>BC,sensor_pin_near:()=>dS,sensor_pin_pressed:()=>lS,sensor_read:()=>ES,sensor_rm_acc:()=>jC,sensor_rm_battery_left:()=>QC,sensor_rm_pin_near_double:()=>zC,sensor_rtc_init:()=>OC,sensor_sound:()=>CC,sensor_temperature:()=>hS});var k={};t.r(k),t.d(k,{serial_any:()=>VS,serial_begin:()=>kS,serial_print:()=>YS,serial_print_byte:()=>vS,serial_print_hex:()=>yS,serial_println:()=>XS,serial_read_from_ai:()=>$S,serial_readline:()=>BS,serial_readstr:()=>bS,serial_readstr_until:()=>GS,serial_receive_data_event:()=>xS,serial_send_to_ai:()=>jS,serial_softserial:()=>wS,serial_softserial_new:()=>US,system_input:()=>HS,system_print:()=>WS,system_print_container:()=>zS,system_print_end:()=>JS,system_print_inline:()=>KS,system_print_item:()=>QS,system_print_many:()=>qS});var H={};t.r(H),t.d(H,{Panic_with_status_code:()=>iA,Timer_init:()=>MA,base_delay:()=>EA,controls_delay:()=>eA,controls_delay_new:()=>tA,controls_millis:()=>sA,controls_uname:()=>oA,raw_block:()=>_A,reset:()=>nA,system_bitbot_shutdown:()=>TA,system_machine_reset:()=>IA,system_ticks_diff:()=>uA,system_timer:()=>aA,system_timer_init:()=>rA,system_wdt_feed:()=>dA,system_wdt_init:()=>lA,time_ticks_diff:()=>mA,timer:()=>pA,timer2:()=>hA});var W={};t.r(W),t.d(W,{Air_daily_content:()=>vA,Air_now_content:()=>AA,Geo_moon_content:()=>XA,Geo_sun_content:()=>YA,Life_suggestion_content:()=>NA,Location_search_content:()=>fA,Tide_daily_content:()=>DA,WEATHER_DAILY:()=>cA,WEATHER_HOUR:()=>gA,WEATHER_NOW:()=>RA,Weather_alarm_content:()=>LA,Weather_daily:()=>FA,Weather_daily_content:()=>PA,Weather_now:()=>CA,Weather_now_content:()=>SA});var K={};t.r(K),t.d(K,{PIN_init:()=>XL,actuator_extern_get_led_bright:()=>tL,actuator_extern_get_led_state:()=>eL,actuator_extern_led_bright:()=>ZA,actuator_extern_led_brightness:()=>iL,actuator_ms32006_dcmotor:()=>wA,actuator_ms32006_init:()=>UA,actuator_ms32006_stepper:()=>kA,actuator_neopixel_init:()=>nL,actuator_neopixel_rgb:()=>oL,actuator_neopixel_rgb_all:()=>sL,actuator_neopixel_rgb_show_all_chase:()=>pL,actuator_neopixel_rgb_show_all_rainbow:()=>aL,actuator_neopixel_write:()=>_L,actuator_use_uart_init:()=>uL,esp32_music_get_tempo_extern:()=>zA,esp32_music_pitch:()=>WA,esp32_music_pitch_init:()=>HA,esp32_music_pitch_with_time:()=>KA,esp32_music_play_list:()=>QA,esp32_music_reset_extern:()=>jA,esp32_music_set_tempo_extern:()=>qA,esp32_music_stop:()=>JA,mixbot_actuator_extern_get_addr:()=>vL,mixbot_actuator_extern_set_addr:()=>YL,mixbot_addr_extern:()=>OL,parrot_PIN_init:()=>VL,parrot_move_speed:()=>BL,pin_led_bright:()=>yL,player_play_music:()=>TL,player_set_mode:()=>IL,player_set_play:()=>lL,player_set_volume:()=>dL,player_whether_stop:()=>rL,robot_led_extern:()=>CL,robot_led_extern_get_value:()=>SL,robot_motor_extern:()=>RL,robot_motor_extern_get_speed:()=>cL,robot_servo_extern_absolute_run:()=>DL,robot_servo_extern_get_status:()=>AL,robot_servo_extern_relative_continue:()=>PL,robot_servo_extern_relative_origin:()=>fL,robot_servo_extern_relative_run:()=>FL,robot_servo_extern_stop:()=>NL,robot_servo_extern_stop_mode:()=>LL,robot_traffic_light_extern:()=>gL,servo_PIN_init:()=>xL,servo_get_angle:()=>BA,servo_get_speed:()=>GA,servo_init:()=>yA,servo_move:()=>$A,servo_move_angle:()=>bL,servo_set_angle:()=>bA,servo_set_speed:()=>VA,servo_speed_360:()=>xA,syn6288_builtin_voice:()=>mL,syn6288_get_voice:()=>hL,syn6288_set_voice:()=>ML,syn6288_tts_play:()=>EL});var J={};t.r(J),t.d(J,{actuator_dc_motor:()=>IN,actuator_dc_motor_stop:()=>TN,actuator_get_led_bright:()=>QL,actuator_get_led_state:()=>jL,actuator_led_bright:()=>zL,actuator_led_brightness:()=>$L,actuator_mixbot_buzzer_on_off:()=>ON,actuator_mixgo_nova_mic_get:()=>SN,actuator_mixgo_nova_mic_set:()=>CN,actuator_mixgo_nova_onboard_music_pitch:()=>FN,actuator_mixgo_nova_onboard_music_stop:()=>PN,actuator_mixgo_nova_play_audio:()=>DN,actuator_mixgo_nova_play_online_audio:()=>fN,actuator_mixgo_nova_record_audio:()=>NN,actuator_mixgo_nova_voice_get:()=>LN,actuator_mixgo_nova_voice_set:()=>AN,actuator_mixgo_zero_led_color:()=>ZL,actuator_onboard_neopixel_rgb:()=>oN,actuator_onboard_neopixel_rgb_all:()=>pN,actuator_onboard_neopixel_rgb_show_all_chase:()=>aN,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>uN,actuator_onboard_neopixel_write:()=>_N,actuator_stepper_keep:()=>lN,actuator_stepper_stop:()=>dN,analog_ble_keyboard_init:()=>wN,analog_ble_keyboard_input:()=>WN,analog_ble_keyboard_mouse_init:()=>ZN,analog_ble_keyboard_mouse_input:()=>nD,analog_ble_keyboard_mouse_send_battery:()=>iD,analog_ble_keyboard_mouse_str:()=>sD,analog_ble_keyboard_send_battery:()=>JN,analog_ble_keyboard_str:()=>KN,analog_ble_mouse_init:()=>qN,analog_ble_mouse_input:()=>jN,analog_ble_mouse_keyboard_input:()=>_D,analog_ble_mouse_send_battery:()=>$N,analog_keyboard_input:()=>yN,analog_keyboard_str:()=>GN,analog_mouse_input:()=>VN,bitbot_motor:()=>gN,bitbot_move:()=>RN,bitbot_stop:()=>cN,ble_keyboard_connect:()=>HN,ble_keyboard_get_mac:()=>kN,ble_keyboard_mouse_connect:()=>eD,ble_keyboard_mouse_get_mac:()=>tD,ble_mouse_connect:()=>QN,ble_mouse_get_mac:()=>zN,cc_number:()=>tN,educore_ble_keyboard_input:()=>MD,educore_ble_sensor_connected:()=>TD,educore_ble_sensor_init:()=>ID,educore_buzzer:()=>oD,educore_buzzer_play_tone:()=>pD,educore_buzzer_play_tone_time:()=>aD,educore_buzzer_stop:()=>uD,educore_neopixel_clear:()=>dD,educore_neopixel_rgb:()=>lD,educore_rgb_light:()=>rD,esp32_music_get_tempo:()=>UL,esp32_music_reset:()=>KL,esp32_music_set_tempo:()=>GL,esp32_onboard_music_pitch:()=>wL,esp32_onboard_music_pitch_with_time:()=>kL,esp32_onboard_music_play_list:()=>WL,esp32_onboard_music_stop:()=>HL,general_key:()=>bN,general_key_tuple:()=>UN,get_keyboard_light:()=>hD,get_power_output:()=>YN,ledswitch:()=>qL,mixbot_motor:()=>EN,mixbot_motor_status:()=>MN,mixbot_move:()=>hN,mixbot_stop:()=>mN,mouse_key:()=>BN,number:()=>JL,rm_actuator_get_led_bright:()=>iN,rm_actuator_get_led_state:()=>nN,rm_actuator_led_bright:()=>eN,rm_actuator_led_brightness:()=>sN,rm_motor:()=>rN,set_all_power_output:()=>XN,set_power_output:()=>vN,special_key:()=>xN});var q={};t.r(q),t.d(q,{ai_sensor_20object:()=>zD,ai_sensor_ailocal_class:()=>VD,ai_sensor_ailocal_class_result:()=>BD,ai_sensor_ailocal_train:()=>bD,ai_sensor_asr_recognize:()=>HD,ai_sensor_audio_play:()=>UD,ai_sensor_audio_record:()=>GD,ai_sensor_barcode:()=>CD,ai_sensor_circle:()=>fD,ai_sensor_classifier_faces:()=>qD,ai_sensor_color:()=>YD,ai_sensor_color_chases:()=>xD,ai_sensor_color_chases_result:()=>yD,ai_sensor_config:()=>OD,ai_sensor_face:()=>JD,ai_sensor_find_20objects:()=>QD,ai_sensor_find_barcodes:()=>SD,ai_sensor_find_circles:()=>FD,ai_sensor_find_colors:()=>XD,ai_sensor_find_licenseplates:()=>KD,ai_sensor_find_lines:()=>DD,ai_sensor_find_qrcodes:()=>gD,ai_sensor_find_rects:()=>vD,ai_sensor_find_tags:()=>LD,ai_sensor_licenseplate:()=>WD,ai_sensor_line:()=>ND,ai_sensor_qrcode:()=>cD,ai_sensor_qrcode_lite:()=>ED,ai_sensor_rect:()=>PD,ai_sensor_rgb:()=>RD,ai_sensor_tag:()=>AD,ai_sensor_use_uart_init:()=>mD,ai_sensor_yolo_recognize:()=>wD,ai_sensor_yolo_recognize_result:()=>kD});var z={};t.r(z),t.d(z,{MICROPYTHON_AI_Speech_asr:()=>ZD,MICROPYTHON_AI_Speech_unit:()=>$D,MICROPYTHON_AI_client:()=>jD});var Q={};t.r(Q),t.d(Q,{mpython_blynk_app_data:()=>df,mpython_blynk_app_notify:()=>pf,mpython_blynk_email:()=>If,mpython_blynk_get_timers:()=>uf,mpython_blynk_on_connected:()=>sf,mpython_blynk_on_disconnected:()=>nf,mpython_blynk_run:()=>of,mpython_blynk_sensor_data_to_app:()=>lf,mpython_blynk_set_property:()=>Tf,mpython_blynk_setup:()=>Mf,mpython_blynk_stop_timers:()=>af,mpython_blynk_sync_virtual:()=>ef,mpython_blynk_terminal_widget_vpin:()=>tf,mpython_blynktimer:()=>rf,mpython_blynktimer_run:()=>_f});var j={};t.r(j),t.d(j,{cc_g1_read_bat:()=>hf,cc_g1_read_joystick:()=>mf,cc_g1_read_key:()=>Ef,cc_g1_turnoff:()=>Of});var $={};t.r($),t.d($,{ce_go_dc_motor:()=>Nf,ce_go_get_led_bright:()=>gf,ce_go_get_led_state:()=>Cf,ce_go_hall_attachInterrupt:()=>Df,ce_go_hall_data:()=>Ff,ce_go_hall_initialize:()=>ff,ce_go_led_bright:()=>cf,ce_go_led_brightness:()=>Sf,ce_go_light_number:()=>Rf,ce_go_pin_light:()=>yf,ce_go_pin_near:()=>vf,ce_go_pin_near_line:()=>Pf,ce_go_pin_near_state_change:()=>Yf,ce_go_stepper_keep:()=>Af,ce_go_stepper_stop:()=>Lf,educore_car:()=>xf,educore_car_pin_near:()=>Gf,educore_car_pin_near_line:()=>Bf,educore_car_stepper_keep:()=>bf,educore_car_stepper_stop:()=>Vf,sensor_mixgome_eulerangles:()=>Xf});var Z={};t.r(Z),t.d(Z,{communicate_bluetooth_central_init:()=>cF,communicate_bluetooth_connect:()=>SF,communicate_bluetooth_disconnect:()=>AF,communicate_bluetooth_handle:()=>PF,communicate_bluetooth_is_connected:()=>NF,communicate_bluetooth_mac:()=>LF,communicate_bluetooth_peripheral_init:()=>gF,communicate_bluetooth_recv:()=>FF,communicate_bluetooth_recv_only:()=>fF,communicate_bluetooth_scan:()=>CF,communicate_bluetooth_send:()=>DF,communicate_espnow_init:()=>vF,communicate_espnow_init_new:()=>YF,communicate_i2c_available:()=>qf,communicate_i2c_init:()=>kf,communicate_i2c_master_read:()=>Jf,communicate_i2c_onboard:()=>Uf,communicate_i2c_read:()=>Hf,communicate_i2c_scan:()=>Kf,communicate_i2c_write:()=>Wf,communicate_ir_recv_init:()=>lF,communicate_ir_send_init:()=>hF,communicate_ow_init:()=>_F,communicate_ow_read:()=>aF,communicate_ow_reset:()=>pF,communicate_ow_scan:()=>oF,communicate_ow_select:()=>rF,communicate_ow_write:()=>uF,communicate_spi_buffer:()=>$f,communicate_spi_init:()=>Qf,communicate_spi_onboard:()=>wf,communicate_spi_read:()=>Zf,communicate_spi_read_output:()=>tF,communicate_spi_readinto:()=>eF,communicate_spi_readinto_output:()=>iF,communicate_spi_set:()=>jf,communicate_spi_write:()=>nF,communicate_spi_write_readinto:()=>sF,espnow_radio_channel:()=>BF,espnow_radio_channel_new:()=>UF,espnow_radio_on_off:()=>wF,espnow_radio_rec:()=>HF,espnow_radio_recv:()=>KF,espnow_radio_recv_certain_msg:()=>JF,espnow_radio_recv_certain_msg_new:()=>zF,espnow_radio_recv_msg:()=>WF,espnow_radio_recv_new:()=>qF,espnow_radio_send:()=>kF,espnow_radio_txpower:()=>GF,i2c_slave_onreceive:()=>zf,internal_variable:()=>dF,ir_recv_timeout:()=>MF,ir_transmit_busy:()=>RF,ir_transmit_conventional_data:()=>mF,ir_transmit_raw_code:()=>OF,ir_transmit_study_code:()=>EF,ir_whether_recv:()=>TF,lora_init:()=>QF,lora_packet:()=>jF,lora_recv:()=>ZF,lora_send:()=>$F,network_espnow_info:()=>yF,network_espnow_mac:()=>XF,network_espnow_recv:()=>xF,network_espnow_recv_handle:()=>VF,network_espnow_send:()=>bF,recv_fun:()=>IF,urequests_attribute:()=>eP,urequests_get:()=>tP,urequests_method:()=>iP});var tt={};t.r(tt),t.d(tt,{display_animate:()=>NP,display_circle:()=>DP,display_color_seclet:()=>BP,display_draw_4strings:()=>RP,display_fill:()=>LP,display_lcd_use_i2c_init:()=>WP,display_line:()=>CP,display_line_arbitrarily:()=>cP,display_matrix_extern_bright_point:()=>IP,display_matrix_extern_bright_screen:()=>MP,display_matrix_extern_clear:()=>rP,display_matrix_extern_get_pixel:()=>dP,display_matrix_extern_get_screen_pixel:()=>TP,display_matrix_extern_image_builtins:()=>hP,display_matrix_extern_scroll_string:()=>aP,display_matrix_extern_scroll_string_delay:()=>uP,display_matrix_extern_shift:()=>lP,display_matrix_extern_show_frame_string:()=>oP,display_matrix_extern_show_frame_string_delay:()=>pP,display_matrix_extern_show_image:()=>sP,display_matrix_extern_show_image_or_string_delay:()=>_P,display_matrix_use_i2c_init:()=>nP,display_oled_drawPixel:()=>PP,display_oled_showBitmap:()=>FP,display_oled_use_i2c_init:()=>QP,display_onoff:()=>SP,display_rect:()=>gP,display_tm1650_power:()=>YP,display_tm1650_set_brightness:()=>xP,display_tm1650_show_dot:()=>yP,display_tm1650_show_num:()=>XP,display_tm_use_i2c_init:()=>vP,display_triangle:()=>fP,display_use_i2c_init:()=>OP,extern_oled_bright_point:()=>av,extern_oled_clear:()=>_v,extern_oled_get_pixel:()=>pv,extern_oled_hvline:()=>rv,extern_oled_line:()=>lv,extern_oled_scroll_string:()=>nv,extern_oled_scroll_string_delay:()=>sv,extern_oled_shape_rect:()=>uv,extern_oled_shift:()=>ov,extern_oled_show_frame_string:()=>ev,extern_oled_show_frame_string_delay:()=>iv,extern_oled_show_image:()=>jP,extern_oled_show_image_or_string_delay:()=>tv,extern_oled_show_image_xy:()=>$P,extern_oled_show_string:()=>ZP,image_shift:()=>AP,lcd_backlight:()=>qP,lcd_clear:()=>zP,lcd_print_string:()=>JP,lcd_show_image_or_string_delay:()=>KP,matrix_extern_image_arithmetic:()=>mP,matrix_extern_image_invert:()=>EP,tft_fill:()=>kP,tft_line_arbitrarily:()=>HP,tft_scroll_string_delay:()=>wP,tft_show_frame_string_delay:()=>UP,tft_show_image_or_string_delay:()=>GP,tft_show_image_xy:()=>VP,tft_use_spi_init:()=>bP});var et={};t.r(et),t.d(et,{bitbot_display_bitmap_create:()=>nY,bitbot_display_image_create:()=>iY,display_available:()=>Sv,display_bitmap_create:()=>gv,display_bright_point:()=>fv,display_bright_screen:()=>Pv,display_clear:()=>Cv,display_get_pixel:()=>Dv,display_get_screen_pixel:()=>Fv,display_image_builtins:()=>Ov,display_image_builtins_all:()=>Rv,display_image_create:()=>cv,display_scroll_string:()=>hv,display_scroll_string_delay:()=>mv,display_shift:()=>Nv,display_show_frame_string:()=>Tv,display_show_frame_string_delay:()=>Mv,display_show_image:()=>dv,display_show_image_or_string_delay:()=>Iv,draw_pointer:()=>RY,image_arithmetic:()=>Av,image_invert:()=>Lv,mixbot_display_bitmap_create:()=>jv,mixbot_display_bright_screen:()=>tY,mixbot_display_get_ambientbright:()=>Zv,mixbot_display_get_screen_pixel:()=>$v,mixbot_display_image_create:()=>Qv,mixbot_display_rotate:()=>eY,mixgo_display_bitmap_create:()=>Vv,mixgo_display_image_create_new:()=>bv,mixgome_display_bitmap_create:()=>Yv,mixgome_display_font:()=>xv,mixgome_display_image_create:()=>vv,mixgomini_display_bitmap_create:()=>yv,mixgomini_display_image_create:()=>Xv,mpython_display_hvline:()=>qv,mpython_display_line:()=>zv,mpython_display_shape_rect:()=>Jv,mpython_pbm_image:()=>Bv,nova_draw_pointer:()=>cY,onboard_oled_bright_point:()=>Kv,onboard_oled_scroll_string_delay:()=>Wv,onboard_oled_show_frame_string_delay:()=>Hv,onboard_oled_show_image:()=>Gv,onboard_oled_show_image_or_string_delay:()=>kv,onboard_oled_show_image_xy:()=>Uv,onboard_oled_show_string:()=>wv,onboard_tft_bright_point:()=>dY,onboard_tft_bright_screen:()=>NY,onboard_tft_clear:()=>DY,onboard_tft_clock_clear:()=>EY,onboard_tft_clock_draw:()=>mY,onboard_tft_clock_get_rtctime:()=>MY,onboard_tft_clock_init:()=>TY,onboard_tft_clock_set_time:()=>hY,onboard_tft_display_hvline:()=>uY,onboard_tft_display_line:()=>rY,onboard_tft_display_shape_circle:()=>OY,onboard_tft_display_shape_rect:()=>aY,onboard_tft_fill:()=>IY,onboard_tft_get_pixel:()=>lY,onboard_tft_get_screen_pixel:()=>LY,onboard_tft_scroll_string_delay:()=>Ev,onboard_tft_shift:()=>AY,onboard_tft_show_frame_string:()=>SY,onboard_tft_show_frame_string_delay:()=>pY,onboard_tft_show_image:()=>CY,onboard_tft_show_image_or_string_delay:()=>oY,onboard_tft_show_image_xy:()=>sY,onboard_tft_show_image_xy_direct:()=>_Y,onboard_tft_show_texts:()=>gY});var it={};t.r(it),t.d(it,{factory_block:()=>xY,factory_block_return:()=>bY,factory_block_return_with_textarea:()=>BY,factory_block_with_textarea:()=>VY,factory_callMethod_noreturn:()=>XY,factory_callMethod_return:()=>yY,factory_declare:()=>YY,factory_from_import:()=>fY,factory_function_noreturn:()=>PY,factory_function_return:()=>vY,factory_import:()=>FY,folding_block:()=>GY});var nt={};t.r(nt),t.d(nt,{inout_analog_atten:()=>eX,inout_analog_read:()=>qY,inout_analog_read_init:()=>tX,inout_analog_write:()=>WY,inout_analog_write_init:()=>ZY,inout_analog_write_set:()=>KY,inout_digital_init:()=>jY,inout_digital_read:()=>kY,inout_digital_write:()=>wY,inout_highlow:()=>UY,inout_pin_attachInterrupt:()=>QY,inout_pin_pressed:()=>zY,inout_pin_pressed_init:()=>iX,inout_pwm_analog_write:()=>HY,inout_pwm_analog_write_init:()=>$Y,inout_pwm_analog_write_set_freq:()=>JY});var st={};t.r(st),t.d(st,{IOT_CONNECT_OLLAMA:()=>FX,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>cX,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>OX,IOT_EMQX_PING:()=>gX,IOT_FORMATTING:()=>mX,IOT_FORMAT_STRING:()=>EX,IOT_MIXIO_NTP:()=>CX,IOT_MIXIO_PUBLISH:()=>rX,IOT_MIXIO_SUBSCRIBE:()=>lX,iot_client_onboard:()=>SX,iot_connect_ollama:()=>fX,iot_connect_openai:()=>PX,iot_http_client:()=>AX,iot_http_data:()=>LX,iot_mixio_check:()=>TX,iot_mixio_connect:()=>uX,iot_mixio_connect_only:()=>IX,iot_mixio_disconnect:()=>dX,iot_mixio_format_msg:()=>hX,iot_mixio_format_topic:()=>MX,iot_mixly_key:()=>RX,iot_mqtt_client:()=>NX,iot_mqtt_data:()=>DX,iot_onenet_check:()=>pX,iot_onenet_connect:()=>sX,iot_onenet_disconnect:()=>_X,iot_onenet_publish:()=>aX,iot_onenet_publish_dict:()=>oX,iot_wifi_connect:()=>nX,ollama_empty_history:()=>XX,use_ollama_llm_to_chat:()=>vX,use_ollama_llm_to_chat_return:()=>YX});var _t={};t.r(_t),t.d(_t,{educore_mqtt_connect:()=>ly,educore_mqtt_connect_success:()=>My,educore_mqtt_subscribe_message:()=>dy,educore_mqtt_topic_publish:()=>Ty,educore_mqtt_topic_subscribe:()=>Iy,educore_wifi_connect:()=>ry,network_ap_connect:()=>kX,network_connect:()=>xX,network_get_connect:()=>VX,network_get_wifi:()=>wX,network_init:()=>yX,network_is_active:()=>UX,network_open:()=>GX,network_scan:()=>HX,network_server:()=>WX,network_socket_accept:()=>QX,network_socket_bind:()=>JX,network_socket_close:()=>ey,network_socket_connect:()=>qX,network_socket_init:()=>KX,network_socket_listen:()=>zX,network_socket_receive:()=>jX,network_socket_receive_from:()=>ZX,network_socket_send:()=>$X,network_socket_send_to:()=>ty,network_stop:()=>BX,network_wifi_connect:()=>bX,ntptime_address:()=>oy,ntptime_time:()=>_y,requests_attribute:()=>ny,requests_attribute2:()=>ay,requests_get:()=>iy,requests_get2:()=>py,requests_method:()=>sy,requests_post:()=>uy});var ot={};t.r(ot),t.d(ot,{CI130X_BROADCAST:()=>Vy,CI130X_GET_THE_RECOGNIZED_CMD:()=>by,CI130X_GET_WHETHER_IDENTIFY:()=>xy,CI130X_IDENTIFY_AND_SAVE:()=>yy,CI130X_SET_SYSTEM_CMD:()=>By,HCSR04:()=>mx,PS2_Button:()=>Rx,PS2_Buttons:()=>cx,PS2_Buttons_new:()=>fx,PS2_State:()=>gx,PS2_init:()=>Ex,PS2_init_new:()=>Nx,PS2_stk:()=>Cx,PS2_stk_new:()=>Fx,PS2_vibration:()=>Ox,PS2_vibration_new:()=>Dx,RTC_get_time:()=>Ax,RTC_set_date:()=>Cy,RTC_set_datetime:()=>Sx,RTC_set_time:()=>gy,camera_sensor_init:()=>pb,camera_sensor_result:()=>ab,column_tube_foot:()=>db,define_keyboards:()=>Ib,educore_body_sensor:()=>jx,educore_button_sensor_extern:()=>eb,educore_camera_sensor:()=>ob,educore_infrared_sensor:()=>tb,educore_soilhum_sensor:()=>$x,educore_temp_sensor:()=>_b,educore_temphum_sensor:()=>Zx,educore_ultrasonic_sensor:()=>nb,esp32_s2_weather_init:()=>Ix,esp32_s2_weather_rain:()=>Mx,esp32_s2_weather_wd:()=>Tx,esp32_s2_weather_ws:()=>hx,extern_rfid_read:()=>ex,extern_rfid_readcontent:()=>nx,extern_rfid_readid:()=>ix,extern_rfid_status:()=>ox,extern_rfid_write:()=>sx,extern_rfid_write_return:()=>_x,get_keboards_value:()=>Mb,gnss_get_data:()=>Yx,gnss_have_data:()=>Xx,init_matrix_keyboard:()=>Tb,interaction_whether_to_interaction:()=>Yy,interaction_whether_to_interaction_SANT:()=>Xy,line_tube_foot:()=>lb,mixbot_sensor_extern_get_addr:()=>Hx,mixbot_sensor_extern_set_addr:()=>Wx,pm25_get_data:()=>vx,radar_set_DETECTION_THRESHOLD:()=>Py,radar_set_DETECTION_THRESHOLD_SANT:()=>vy,robot_button_extern_get_value:()=>xx,robot_color_extern_get_value:()=>Ux,robot_infrared_extern_get_value:()=>Vx,robot_infrared_extern_grey_get_value:()=>Bx,robot_potentiometer_extern_get_value:()=>Gx,robot_sonar_extern_get_value:()=>wx,robot_sonar_extern_led:()=>kx,robot_touch_extern_get_value:()=>bx,sensor_APDS9960_extern:()=>Uy,sensor_DS18X20:()=>Qx,sensor_LTR308_extern:()=>wy,sensor_LTR390UV_extern:()=>zy,sensor_MAX30102_extern:()=>Gy,sensor_QMC5883L_extern:()=>Qy,sensor_VL530LX_extern:()=>Zy,sensor_aht11_extern:()=>$y,sensor_bmp:()=>Dy,sensor_dht11:()=>Lx,sensor_distance_hrsc04:()=>cy,sensor_hp203_extern:()=>ky,sensor_ltr381_extern:()=>Jy,sensor_mixgo_extern_button_attachInterrupt:()=>Oy,sensor_mixgo_extern_button_get_presses:()=>Ey,sensor_mixgo_extern_button_is_pressed:()=>hy,sensor_mixgo_extern_button_was_pressed:()=>my,sensor_mixgo_extern_light:()=>Sy,sensor_mixgo_extern_pin_near:()=>Ly,sensor_mixgo_extern_sound:()=>Ay,sensor_mixgoce_hot_wheel_degrees:()=>dx,sensor_mixgoce_hot_wheel_is_touched:()=>lx,sensor_mpu9250_attachGestureInterrupt:()=>Ry,sensor_ms5611_extern:()=>Wy,sensor_ms5611_extern_altitude:()=>Ky,sensor_read_humiture:()=>ib,sensor_rtc_init:()=>Ny,sensor_sht:()=>fy,sensor_shtc3_extern:()=>jy,sensor_spl06_001_extern:()=>Hy,sensor_ucs12071_extern:()=>qy,sensor_use_i2c_init:()=>Fy,sensor_use_spi_init:()=>tx,sensor_use_uart_init:()=>Px,sensor_weather_solo_init:()=>Kx,sensor_weather_solo_rain:()=>zx,sensor_weather_solo_wd:()=>Jx,sensor_weather_solo_ws:()=>qx,sensor_weigh_init:()=>ub,tvoc_get_data:()=>yx,ultrasonic_sensor_read_distance:()=>sb,weather_data:()=>px,weather_have_data:()=>ax,weather_set_label:()=>rx,weather_uart_mixio:()=>ux,weigh_sensor_get_weight:()=>rb});var pt={};t.r(pt),t.d(pt,{HCSR04:()=>Sb,bitbot_als_num:()=>KV,dht11:()=>tB,educore_button_sensor:()=>pB,educore_button_was_pressed:()=>aB,educore_gyroscope_sensor:()=>sB,educore_gyroscope_sensor_read:()=>_B,educore_gyroscope_sensor_shake:()=>oB,educore_light_sensor:()=>nB,educore_rfid_sensor:()=>uB,educore_rfid_sensor_scan:()=>rB,educore_rfid_sensor_scan_data:()=>lB,educore_voice_sensor:()=>eB,number1:()=>Ab,number2:()=>Lb,number3:()=>Nb,number4:()=>Db,number5:()=>fb,number6:()=>Fb,number7:()=>Pb,onboard_RTC_get_time:()=>gV,onboard_RTC_get_time_str:()=>AV,onboard_RTC_get_timestamp:()=>CV,onboard_RTC_get_timetuple_to_str:()=>LV,onboard_RTC_set_datetime:()=>RV,onboard_RTC_settime_string:()=>cV,onboard_RTC_timestamp_totuple:()=>SV,rfid_readcontent:()=>Jb,rfid_readid:()=>Kb,rfid_status:()=>Qb,rfid_write:()=>qb,rfid_write_return:()=>zb,sensor_LTR308:()=>Ub,sensor_adxl345_get_acceleration:()=>_V,sensor_aht11:()=>Hb,sensor_bitbot_ALS:()=>WV,sensor_button_get_presses:()=>zV,sensor_button_is_pressed:()=>JV,sensor_button_was_pressed:()=>qV,sensor_compass_reset:()=>lV,sensor_ds18x20:()=>Bb,sensor_eulerangles:()=>$b,sensor_get_acceleration:()=>jb,sensor_get_temperature:()=>Wb,sensor_get_the_coprocessor_version:()=>dB,sensor_hp203:()=>kb,sensor_light:()=>ZV,sensor_lm35:()=>Gb,sensor_mixbot_get_gyro:()=>HV,sensor_mixbot_patrol_calibrate:()=>UV,sensor_mixbot_patrol_value:()=>wV,sensor_mixbot_temperature:()=>kV,sensor_mixgo_LTR308:()=>xb,sensor_mixgo_button_attachInterrupt:()=>Ob,sensor_mixgo_button_get_presses:()=>Eb,sensor_mixgo_button_is_pressed:()=>hb,sensor_mixgo_button_was_pressed:()=>mb,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>fV,sensor_mixgo_cc_mmc5603_get_angle:()=>DV,sensor_mixgo_cc_mmc5603_get_magnetic:()=>NV,sensor_mixgo_light:()=>$V,sensor_mixgo_nova_LTR308:()=>Vb,sensor_mixgo_nova_pin_near:()=>yb,sensor_mixgo_pin_near:()=>Xb,sensor_mixgo_pin_near_double:()=>Yb,sensor_mixgo_pin_near_single:()=>vb,sensor_mixgo_pin_pressed:()=>nV,sensor_mixgo_sant_color:()=>bb,sensor_mixgo_touch_slide:()=>iV,sensor_mixgocar42_button_attachInterrupt:()=>Cb,sensor_mixgocar42_button_get_presses:()=>gb,sensor_mixgocar42_button_is_pressed:()=>Rb,sensor_mixgocar42_button_was_pressed:()=>cb,sensor_mixgocar_battery_left:()=>GV,sensor_mixgocar_pin_near:()=>VV,sensor_mixgocar_pin_near_line:()=>bV,sensor_mixgocar_pin_near_state_change:()=>BV,sensor_mixgoce_pin_pressed:()=>eV,sensor_mixgoce_temperature:()=>PV,sensor_mixgome_temperature:()=>FV,sensor_mpu9250_calibrate_compass:()=>aV,sensor_mpu9250_field_strength:()=>rV,sensor_mpu9250_gesture:()=>Zb,sensor_mpu9250_get_acceleration:()=>tV,sensor_mpu9250_get_gyro:()=>pV,sensor_mpu9250_get_magnetic:()=>oV,sensor_mpu9250_temperature:()=>uV,sensor_mpython_pin_pressed:()=>sV,sensor_mpython_qmi8658_get_gyro:()=>vV,sensor_mpython_qmi8658_temperature:()=>YV,sensor_onboard_compass_reset:()=>OV,sensor_onboard_mpu9250_calibrate_compass:()=>hV,sensor_onboard_mpu9250_field_strength:()=>EV,sensor_onboard_mpu9250_gesture:()=>dV,sensor_onboard_mpu9250_get_acceleration:()=>IV,sensor_onboard_mpu9250_get_gyro:()=>MV,sensor_onboard_mpu9250_get_magnetic:()=>TV,sensor_onboard_mpu9250_temperature:()=>mV,sensor_pin_near:()=>jV,sensor_pin_pressed:()=>QV,sensor_read:()=>iB,sensor_rm_acc:()=>xV,sensor_rm_battery_left:()=>yV,sensor_rm_pin_near_double:()=>XV,sensor_sound:()=>wb});var at={};t.r(at),t.d(at,{serial_any:()=>mB,serial_print:()=>IB,serial_print_byte:()=>TB,serial_print_hex:()=>hB,serial_println:()=>MB,serial_read_from_ai:()=>DB,serial_readline:()=>OB,serial_readstr:()=>EB,serial_send_to_ai:()=>NB,serial_softserial:()=>RB,serial_softserial_new:()=>cB,system_input:()=>gB,system_print:()=>CB,system_print_end:()=>AB,system_print_inline:()=>SB,system_print_many:()=>LB});var ut={};t.r(ut),t.d(ut,{Panic_with_status_code:()=>GB,Timer_init:()=>eG,base_delay:()=>sG,controls_delay:()=>WB,controls_delay_new:()=>KB,controls_end_program:()=>wB,controls_millis:()=>UB,controls_uname:()=>HB,reset:()=>kB,system_bitbot_shutdown:()=>tG,system_device_name:()=>VB,system_device_serial_number:()=>BB,system_event_bus_source:()=>xB,system_event_bus_value:()=>bB,system_machine_reset:()=>ZB,system_on_event:()=>YB,system_raise_event:()=>vB,system_reset:()=>FB,system_run_in_background:()=>fB,system_ticks_diff:()=>zB,system_timer:()=>qB,system_timer_init:()=>QB,system_timestamp:()=>XB,system_value:()=>yB,system_wait:()=>PB,system_wdt_feed:()=>$B,system_wdt_init:()=>jB,time_ticks_diff:()=>nG,timer:()=>JB,timer2:()=>iG});var rt={};t.r(rt),t.d(rt,{Air_daily_content:()=>mG,Air_now_content:()=>rG,Geo_moon_content:()=>OG,Geo_sun_content:()=>EG,Life_suggestion_content:()=>dG,Location_search_content:()=>TG,Tide_daily_content:()=>IG,WEATHER_DAILY:()=>oG,WEATHER_HOUR:()=>pG,WEATHER_NOW:()=>_G,Weather_alarm_content:()=>lG,Weather_daily:()=>MG,Weather_daily_content:()=>hG,Weather_now:()=>aG,Weather_now_content:()=>uG});var lt={};t.r(lt),t.d(lt,{controls_pin_attachInterrupt:()=>BG,inout_analog_atten:()=>fG,inout_analog_write:()=>NG,inout_analog_write_init:()=>YG,inout_analog_write_set:()=>DG,inout_analog_write_set_freq:()=>yG,inout_digital_init:()=>vG,inout_digital_read:()=>LG,inout_digital_write:()=>AG,inout_highlow:()=>SG,inout_pinMode:()=>xG,inout_pin_attachInterrupt:()=>PG,inout_pin_pressed:()=>FG,inout_pin_pressed_init:()=>XG,pin_pressed:()=>VG,pin_pressed_init:()=>bG});var dt={};t.r(dt),t.d(dt,{mini_g2_aht11:()=>UG,mini_g2_hp203:()=>wG,mini_g2_rfid_readcontent:()=>WG,mini_g2_rfid_readid:()=>HG,mini_g2_rfid_status:()=>qG,mini_g2_rfid_write:()=>KG,mini_g2_rfid_write_outcome:()=>JG,mini_g2_varistor:()=>kG});var It={};t.r(It),t.d(It,{me_go_dc_motor:()=>nU,me_go_get_led_bright:()=>$G,me_go_get_led_state:()=>ZG,me_go_hall_attachInterrupt:()=>sU,me_go_hall_data:()=>oU,me_go_hall_initialize:()=>_U,me_go_led_bright:()=>jG,me_go_led_brightness:()=>tU,me_go_light_number:()=>QG,me_go_pin_light:()=>lU,me_go_pin_near:()=>aU,me_go_pin_near_line:()=>pU,me_go_pin_near_state_change:()=>uU,me_go_stepper_keep:()=>eU,me_go_stepper_stop:()=>iU,sensor_mixgome_eulerangles:()=>rU});var Tt={};t.r(Tt),t.d(Tt,{analog_input:()=>RU,analog_output:()=>gU,espnow_channel:()=>mU,haskylens_model:()=>EU,i2c_A_pin:()=>CU,i2c_B_pin:()=>SU,pins_analog:()=>fU,pins_analog_pin:()=>FU,pins_axis:()=>JU,pins_brightness:()=>qU,pins_builtinimg:()=>GU,pins_builtinimg_extern:()=>UU,pins_button:()=>YU,pins_buttonB:()=>XU,pins_dac:()=>PU,pins_dac_pin:()=>vU,pins_digital:()=>IU,pins_digital_dot:()=>iw,pins_digital_pin:()=>TU,pins_exlcdh:()=>WU,pins_exlcdv:()=>KU,pins_imglist:()=>wU,pins_input_pin:()=>MU,pins_one_more:()=>ew,pins_output_pin:()=>hU,pins_playlist:()=>kU,pins_playlist_extern:()=>HU,pins_pwm:()=>yU,pins_pwm_pin:()=>xU,pins_radio_datarate:()=>tw,pins_radio_power:()=>ZU,pins_serial:()=>BU,pins_tone_notes:()=>$U,pins_touch:()=>VU,pins_touch_pin:()=>bU,pins_tts_bgmusic:()=>jU,pins_tts_builtin_music:()=>QU,pins_tts_voice:()=>zU,pwm_input:()=>OU,pwm_output:()=>cU,spi_A_pin:()=>AU,spi_B_pin:()=>LU,spi_C_pin:()=>NU,spi_D_pin:()=>DU});var Mt={};t.r(Mt),t.d(Mt,{inout_analog_atten:()=>dw,inout_analog_write:()=>ow,inout_analog_write_init:()=>lw,inout_analog_write_set:()=>pw,inout_digital_init:()=>rw,inout_digital_read:()=>_w,inout_digital_write:()=>sw,inout_highlow:()=>nw,inout_pin_attachInterrupt:()=>uw,inout_pin_pressed:()=>aw,inout_pin_pressed_init:()=>Iw});var ht={};t.r(ht),t.d(ht,{mini_g2_aht11:()=>Tw,mini_g2_hp203:()=>Mw,mini_g2_rfid_readcontent:()=>Ew,mini_g2_rfid_readid:()=>mw,mini_g2_rfid_status:()=>cw,mini_g2_rfid_write:()=>Ow,mini_g2_rfid_write_outcome:()=>Rw,mini_g2_varistor:()=>hw});var mt={};t.r(mt),t.d(mt,{me_go_dc_motor:()=>fw,me_go_get_led_bright:()=>Sw,me_go_get_led_state:()=>Aw,me_go_hall_attachInterrupt:()=>Fw,me_go_hall_data:()=>vw,me_go_hall_initialize:()=>Pw,me_go_led_bright:()=>Cw,me_go_led_brightness:()=>Lw,me_go_light_number:()=>gw,me_go_pin_light:()=>bw,me_go_pin_near:()=>Xw,me_go_pin_near_line:()=>Yw,me_go_pin_near_state_change:()=>yw,me_go_stepper_keep:()=>Nw,me_go_stepper_stop:()=>Dw,sensor_mixgome_eulerangles:()=>xw});var Et={};t.r(Et),t.d(Et,{analog_input:()=>Jw,analog_output:()=>zw,espnow_channel:()=>Ww,haskylens_model:()=>Kw,i2c_A_pin:()=>Qw,i2c_B_pin:()=>jw,pins_analog:()=>nk,pins_analog_pin:()=>ik,pins_axis:()=>mk,pins_brightness:()=>Rk,pins_builtinimg:()=>dk,pins_builtinimg_extern:()=>Ik,pins_button:()=>Bw,pins_buttonB:()=>Gw,pins_dac:()=>pk,pins_dac_pin:()=>ok,pins_digital:()=>Vw,pins_digital_dot:()=>Dk,pins_digital_pin:()=>Uw,pins_exlcdh:()=>Ek,pins_exlcdv:()=>Ok,pins_imglist:()=>Tk,pins_input_pin:()=>ww,pins_interrupt:()=>rk,pins_one_more:()=>Nk,pins_output_pin:()=>kw,pins_playlist:()=>Mk,pins_playlist_extern:()=>hk,pins_pwm:()=>_k,pins_pwm_input:()=>Hw,pins_pwm_pin:()=>sk,pins_radio_datarate:()=>Lk,pins_radio_power:()=>Ak,pins_serial:()=>lk,pins_tone_notes:()=>Sk,pins_touch:()=>uk,pins_touch_pin:()=>ak,pins_tts_bgmusic:()=>Ck,pins_tts_builtin_music:()=>gk,pins_tts_voice:()=>ck,pwm_output:()=>qw,spi_A_pin:()=>$w,spi_B_pin:()=>Zw,spi_C_pin:()=>tk,spi_D_pin:()=>ek});const Ot=Blockly,Rt=Mixly,ct={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(o+=n)):i=o}else i="i";return i}},gt=ct; -/** - * @license - * Visual Blocks Editor - * - * Copyright 2012 Google Inc. - * https://developers.google.com/blockly/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class Ct{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Ot.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Ot.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Ot.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_if_else");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Ot.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(Ot.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Ot.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},wt={init:function(){this.setColour(xt),this.appendValueInput("FROM").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.PYTHON_RANGE).appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Ot.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},kt={init:function(){this.setColour(xt),this.appendValueInput("LIST").setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Ot.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Ot.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Ht={init:function(){this.setColour(xt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Ot.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Ot.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Ot.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Ot.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Ot.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Wt={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Ot.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Ot.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Ot.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Ot.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Ot.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_finally");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Ot.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Ot.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Kt={init:function(){this.setColour(xt);var t=new Ot.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Ot.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Ot.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Ot.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Ot.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Ot.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Jt={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Ot.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Ot.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},qt={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Ot.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Ot.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Ht.OPERATORS=[[Ot.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Ot.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Kt.OPERATORS=[[Ot.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Ot.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const zt={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Ot.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Qt={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},jt={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Ot.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},$t={init:function(){this.setColour(xt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},Zt={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Ot.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},te={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Ot.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},ee={init:function(){this.jsonInit({message0:Ot.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:xt,tooltip:Ot.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Ot.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},ie={init:function(){this.setColour(xt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Ot.Msg.MIXLY_STAT),this.setOutput(!0)}},ne={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},se={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Ot.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},_e={init:function(){this.appendDummyInput().appendField(Ot.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Ot.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Ot.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Ot.FieldDropdown([[Ot.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Ot.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(xt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},oe={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pe={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},ae={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},ue={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Ot.Msg.PROCEDURES_DEFRETURN_RETURN+Ot.Msg.MIXLY_GET_UNIQUE_IDEN)}},re={init:function(){this.setColour(xt),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Ot.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},le={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},de=230;Ot.FieldTextInput.math_number_validator=function(t){return String(t)},Ot.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const Ie={init:function(){this.setColour(de),this.appendDummyInput().appendField(new Ot.FieldTextInput("0",Ot.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MATH_NUMBER_TOOLTIP)}},Te={init:function(){this.setColour(de);this.appendDummyInput("").appendField(Ot.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Ot.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Ot.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Ot.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Me={init:function(){this.setColour(de);this.appendDummyInput("").appendField(Ot.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Ot.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Ot.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Ot.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},he={init:function(){this.setColour(de),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Ot.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Ot.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},me={init:function(){this.setColour(de),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Ot.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Ot.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Ee={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Ot.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Oe={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Ot.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Ot.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Ot.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Ot.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Ot.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Ot.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Ot.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Ot.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Re={init:function(){var t=[[Ot.Msg.MATH_BIN,"bin"],[Ot.Msg.MATH_OCT,"oct"],[Ot.Msg.MATH_HEX,"hex"]];this.setColour(de),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Ot.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:Ot.Msg.MATH_DEC_TOOLTIP_BIN,oct:Ot.Msg.MATH_DEC_TOOLTIP_OCT,hex:Ot.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},ce={init:function(){var t=[[Ot.Msg.LANG_MATH_TO_ROUND,"round"],[Ot.Msg.LANG_MATH_TO_CEIL,"ceil"],[Ot.Msg.LANG_MATH_TO_FLOOR,"floor"],[Ot.Msg.MATH_ABS,"fabs"],[Ot.Msg.MATH_SQRT,"sqrt"]];this.setColour(de),this.appendValueInput("A").setCheck(Number).appendField(new Ot.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Ot.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Ot.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Ot.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Ot.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Ot.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Ot.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},ge={init:function(){var t=[[Ot.Msg.MIXLY_MAX,"max"],[Ot.Msg.MIXLY_MIN,"min"]];this.setColour(de),this.appendValueInput("A").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(new Ot.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Ot.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Ot.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Ot.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Ce={init:function(){var t=[[Ot.Msg.MATH_TWO,"two"],[Ot.Msg.MATH_EIGHT,"eight"],[Ot.Msg.MATH_TEN,"ten"],[Ot.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(de),this.appendDummyInput("").appendField(Ot.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Ot.FieldDropdown(t),"OP").appendField(Ot.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.MATH_ZHW).appendField(new Ot.FieldDropdown(t),"OP2").appendField(Ot.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:Ot.Msg.MATH_Before_two,eight:Ot.Msg.MATH_Before_eight,ten:Ot.Msg.MATH_Before_ten,sixteen:Ot.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:Ot.Msg.MATH_Behind_two,eight:Ot.Msg.MATH_Behind_eight,ten:Ot.Msg.MATH_Behind_ten,sixteen:Ot.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},Se={init:function(){var t=[[Ot.Msg.LANG_MATH_INT,"int"],[Ot.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(de),this.setOutput(!0,Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Ot.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:Ot.Msg.LANG_MATH_INT,float:Ot.Msg.LANG_MATH_FLOAT_RANDOM};return Ot.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Ae={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Ot.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Ot.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Ot.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MATH_CONSTRAIN_TOOLTIP)}},Le={init:function(){this.setColour(de),this.appendValueInput("NUM",Number).appendField(Ot.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Ot.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Ot.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Ne={init:function(){this.setColour(de),this.appendDummyInput().appendField(new Ot.FieldTextInput("0",Ot.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Ot.Msg.MATH_NUMBER_TOOLTIP)}},De={init:function(){this.setColour(de),this.appendValueInput("NUM").setCheck(Number).appendField(Ot.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},fe={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Ot.Msg.MATH_ROUND).appendField(Ot.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Ot.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MATH_ROUND_NEW_TOOLTIP)}},Fe={init:function(){var t=[[Ot.Msg.MIXLY_TO_INT,"int"],[Ot.Msg.MIXLY_TO_FLOAT,"float"],[Ot.Msg.MIXLY_TO_BITES,"b"],[Ot.Msg.LANG_MATH_BYTE+Ot.Msg.MIXLY_TO_INT,"bti"]];this.setColour(de),this.appendValueInput("VAR").appendField(new Ot.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Ot.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Ot.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Ot.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},Pe={init:function(){var t=[[Ot.Msg.MIXLY_TO_INT,"int"],[Ot.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(de),this.appendValueInput("VAR").appendField(new Ot.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Ot.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Ot.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},ve=Le,Ye={init:function(){this.setColour(de),this.appendValueInput("VAR").appendField(Ot.Msg.LANG_MATH_BYTE+Ot.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},Xe={init:function(){this.setColour(de),this.itemCount_=1,this.setMutator(new Ot.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(Ot.Msg.MIXLY_PRODUCT+Ot.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(Ot.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(Ot.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(Ot.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const Ge={init:function(){this.setColour(be),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Ot.FieldTextInput("",Ot.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new Ot.FieldImage(e,7,12,'"')}},Ue={init:function(){this.setColour(be),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Ot.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},we={init:function(){this.setColour(be),this.appendValueInput("VAR").setCheck(Number).appendField(Ot.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},ke={init:function(){this.setColour(be),this.appendValueInput("VAR").setCheck(String).appendField(Ot.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},He={init:function(){this.setColour(be),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},We={init:function(){this.setColour(be),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Ke={init:function(){this.WHERE_OPTIONS=[[Ot.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Ot.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Ot.Msg.TEXT_GET_INDEX_RANDOM+1+Ot.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Ot.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(be),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.LISTS_GET_INDEX_GET,"MODE"),Ot.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Ot.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=Ot.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=Ot.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=Ot.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=Ot.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+Ot.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Ot.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:Ot.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Ot.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Ot.Msg.TEXT_GET_INDEX_RANDOM};return Ot.Msg.PROCEDURES_DEFRETURN_RETURN+Ot.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+Ot.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==Ot.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),Ot.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Ot.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new Ot.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),Ot.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Je={init:function(){this.setHelpUrl(Ot.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(be),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Ot.Msg.LISTS_GET_INDEX_GET+" "+Ot.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Ot.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Ot.Msg.PROCEDURES_DEFRETURN_RETURN+Ot.Msg.MIXLY_MICROBIT_TYPE_STRING+Ot.Msg.LISTS_GET_INDEX_FROM_START+"n"+Ot.Msg.TEXT_CHARAT2)}},qe={init:function(){this.setHelpUrl(Ot.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(be),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Ot.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Ot.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},ze={init:function(){this.WHERE_OPTIONS_1=[[Ot.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Ot.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Ot.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Ot.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Ot.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Ot.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Ot.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(be),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(Ot.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==Ot.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==Ot.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),Ot.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(Ot.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new Ot.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Qe={init:function(){this.setHelpUrl(Ot.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(be),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Ot.Msg.LISTS_GET_INDEX_GET+" "+Ot.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Ot.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Ot.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Ot.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},je={init:function(){var t=[[Ot.Msg.MIXLY_EQUALS,"==="],[Ot.Msg.MIXLY_STARTSWITH,"startswith"],[Ot.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(be),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Ot.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},$e={init:function(){this.setColour(be),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Ot.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_COMPARETO_HELP)}},Ze={init:function(){var t=[[Ot.Msg.TEXT_UPPER,"upper"],[Ot.Msg.TEXT_TITLE,"title"],[Ot.Msg.TEXT_CAPITALIZE,"capitalize"],[Ot.Msg.TEXT_SWAPCASE,"swapcase"],[Ot.Msg.TEXT_LOWER,"lower"]];this.setColour(be),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Ot.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:Ot.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Ot.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Ot.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Ot.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Ot.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},ti={init:function(){var t=[[Ot.Msg.TEXT_LJUST,"ljust"],[Ot.Msg.TEXT_CENTER,"center"],[Ot.Msg.TEXT_RJUST,"rjust"]];this.setColour(be),this.appendValueInput("VAR").appendField(new Ot.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Ot.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Ot.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},ei={init:function(){this.setColour(be),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Ot.Msg.MIXLY_MID+Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Ot.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ii={init:function(){this.setColour(be),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Ot.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},ni={init:function(){this.setColour(be),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Ot.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Ot.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},si={init:function(){this.setColour(be),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Ot.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Ot.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Ot.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},_i={init:function(){var t=[[Ot.Msg.TEXT_TRIM_BOTH,"strip"],[Ot.Msg.TEXT_TRIM_LEFT,"lstrip"],[Ot.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(be),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Ot.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Ot.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(Ot.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:Ot.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Ot.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Ot.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},oi={init:function(){this.setColour(be),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Ot.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Ot.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Ot.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},nn={init:function(){this.setColour(tn),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Ot.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},sn={init:function(){this.setColour(tn),this.appendDummyInput().appendField(Ot.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},_n={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.DICT_KEYS),this.setTooltip(Ot.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},on={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Ot.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Ot.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Ot.Msg.DICTS_GET_TOOLTIP)}},pn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Ot.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Ot.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Ot.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Ot.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},an={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Ot.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Ot.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},un={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Ot.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Ot.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.DICTS_DELETE_TOOLTIP)}},rn={init:function(){this.setColour(tn),this.appendValueInput("DICT2").setCheck("Dict").appendField(Ot.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Ot.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MID),this.setTooltip(Ot.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ln={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.DICT_CLEAR),this.setTooltip(Ot.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.DICT_ITEMS),this.setTooltip(Ot.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},In={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.DICT_VALUES),this.setTooltip(Ot.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Tn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_LENGTH),this.setTooltip(Ot.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Mn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.DICT_DELDICT),this.setTooltip(Ot.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hn={init:function(){this.MODE=[[Ot.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Ot.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Ot.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Ot.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=Ot.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=Ot.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==Ot.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new Ot.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},mn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Ot.Msg.DICTS_ADD_VALUE),this.setTooltip(Ot.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},En={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Ot.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Ot.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.DICTS_SETDEFAULT_TOOLTIP)}},On={init:function(){this.setColour(tn),this.appendDummyInput("").appendField(new Ot.FieldLabel(Ot.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new Ot.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Ot.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Rn={init:function(){this.setColour(tn),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Ot.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},cn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_TO_JSON),this.setTooltip(Ot.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},gn={init:function(){this.setColour(tn),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Ot.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Cn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Sn={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_TO_JSON),this.setTooltip(Ot.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},An=210,Ln={init:function(){var t=Ot.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Ot.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:Ot.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Ot.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Ot.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Ot.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Ot.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Ot.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},Nn={init:function(){var t=Ot.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=Ot.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Ot.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new Ot.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Dn={init:function(){var t=[[Ot.Msg.LOGIC_OPERATION_AND,"AND"],[Ot.Msg.LOGIC_OPERATION_OR,"OR"],[Ot.Msg.LOGIC_OPERATION_NOR,"NOR"],[Ot.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Ot.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:Ot.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Ot.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Ot.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Ot.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},fn={init:function(){this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Ot.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Ot.Msg.LOGIC_NEGATE_TOOLTIP)}},Fn={init:function(){var t=[[Ot.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Ot.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Ot.FieldDropdown(t),"BOOL"),this.setTooltip(Ot.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Pn={init:function(){this.setColour(An),this.setOutput(!0),this.appendDummyInput().appendField(Ot.Msg.LOGIC_NULL),this.setTooltip(Ot.Msg.LOGIC_NULL_TOOLTIP)}},vn={init:function(){this.setColour(An),this.appendValueInput("A"),this.appendValueInput("B").appendField(Ot.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Ot.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},Yn={init:function(){var t=[[Ot.Msg.TEXT_APPEND_TO,"in"],[Ot.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(An),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Ot.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(Ot.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Ot.Msg.IN)}},Xn={init:function(){var t=[[Ot.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Ot.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(An),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Ot.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},yn={init:function(){this.setColour(An),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Ot.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},xn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Ot.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},bn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Ot.Msg.MIXLY_USE,n=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Ot.Msg.MIXLY_BELONG;return i+{r:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Vn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Ot.Msg.MIXLY_USE,n=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Ot.Msg.MIXLY_BELONG,o=Ot.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Ot.Msg.MIXPY_TEXT_ENCODE).appendField(new Ot.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Ot.Msg.MIXLY_USE,n=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Ot.Msg.MIXLY_BELONG,o=Ot.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},Gn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Ot.Msg.MIXLY_MICROBIT_TYPE_STRING+Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MICROBIT_PYTHON_TYPE)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Ot.Msg.HTML_FILE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Jn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const qn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},jn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},$n={init:function(){this.setColour(0),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Zn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Ot.Msg.MIXLY_ESP32_SET+{mkdir:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},ts={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Ot.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},es={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},is={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.HTML_FILE,"isfile"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},ns={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Ot.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SETUP+Ot.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Ot.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ss={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Ot.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},_s={init:function(){var t=Ot.Procedures.findLegalName("",this),e=new Ot.FieldTextInput(t,Ot.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new Ot.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Ot.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Ot.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(Ot.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(Ot.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(Ot.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=Ot.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),Ot.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{Ot.Events.enable()}},mutationToDom:function(t){var e=Ot.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(Ot.Msg.MIXLY_AIP_ATTR).setAlign(Ot.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zs={init:function(){this.setColour(Js),this.appendDummyInput().appendField(Ot.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},t_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(Ot.Msg.HTML_FORM_CONTENT).appendField(new Ot.FieldDropdown([[Ot.Msg.HTML_TEXT,"text"],[Ot.Msg.HTML_EMAIL,"email"],[Ot.Msg.HTML_NUMBER,"number"],[Ot.Msg.HTML_PASSWORD,"password"],[Ot.Msg.HTML_CHECKBOX,"checkbox"],[Ot.Msg.HTML_RADIOBUTTON,"radiobutton"],[Ot.Msg.HTML_BUTTON,"button"],[Ot.Msg.HTML_COLOUR,"colour"],[Ot.Msg.HTML_DATE,"date"],[Ot.Msg.HTML_LOCALTIME,"local time"],[Ot.Msg.HTML_FILE,"file"],[Ot.Msg.HTML_HIDDEN,"hidden"],[Ot.Msg.HTML_IMAGE,"image"],[Ot.Msg.HTML_MONTH,"month"],[Ot.Msg.HTML_RANGE,"range"],[Ot.Msg.HTML_RESET,"reset"],[Ot.Msg.HTML_SEARCH,"search"],[Ot.Msg.HTML_SUBMIT,"submit"],[Ot.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Ot.Msg.HTML_TIME,"time"],[Ot.Msg.HTML_URL,"url"],[Ot.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Ot.Msg.HTML_NAME).appendField(new Ot.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Ot.Msg.HTML_VALUE).appendField(new Ot.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Ot.Msg.MIXLY_AIP_ATTR).setAlign(Ot.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},e_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(new Ot.FieldTextInput("property"),"KEY").appendField(":").appendField(new Ot.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},i_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(new Ot.FieldTextInput("property"),"KEY").appendField(":").appendField(new Ot.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},n_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(Ot.Msg.HTML_TEXT).appendField(new Ot.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},s_=160,__={init:function(){this.setColour(s_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Ot.FieldTable(""),"TEXT")}},o_={init:function(){this.setColour(s_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Ot.FieldMultilineInput(""),"TEXT")}},p_={init:function(){this.setColour(s_),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Ot.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},a_={init:function(){this.setColour(s_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},u_={init:function(){this.setColour(s_),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Ot.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},r_={init:function(){this.setColour(s_),this.appendValueInput("VALUE").appendField(Ot.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},l_={init:function(){this.setColour(s_),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Ot.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Ot.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=Ot.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+t+", "+e+", "+i+")"},Ot.isNumber(n)&&Ot.isNumber(s)&&Ot.isNumber(_))n=parseFloat(n),s=parseFloat(s),_=Math.abs(parseFloat(_)),0==n%1&&0==s%1&&0==_%1?(n<=s?(s++,t=0==n&&1==_?s:n+", "+s,1!=_&&(t+=", "+_)):t=n+", "+--s+", -"+_,t="range("+t+")"):(t=n",GTE:">="};const oa=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",_=e.valueToCode(this,"B",n)||"False";if("AND"==i)var o=s+" and "+_;else if("OR"==i)o=s+" or "+_;else if("NOR"==i)o="not("+s+"^"+_+")";else o=s+"^"+_;return[o,n]},pa=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},aa=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},ua=function(t,e){return["None",e.ORDER_ATOMIC]},ra=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},la=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},da=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},Ia=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Ta=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Ma=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},ha=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},ma=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Ea=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Oa=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Ra=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ca=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ga=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Ca=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},Sa=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Aa=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},La=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Na=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Da=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},fa=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},Fa=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Pa=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},va=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Ya=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},Xa=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},ya=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},xa=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},ba=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),Ot.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var _=[],o=0;o\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},Eu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Ou=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},Ru=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},cu=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},gu=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Cu=function(t,e){return'"},Su=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Au=function(){return this.getFieldValue("TEXT")+"\n"},Lu=function(t){return t.getFieldValue("TEXT")+"\n"},Nu=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Du=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},fu=function(){return""},Fu=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Pu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n")},yu.scrubNakedValue=function(t){return t+"\n"},yu.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},yu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},yu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=Ot.utils.string.wrap(_,yu.COMMENT_WRAP-3),n+=yu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const xu="#74A55B",bu={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_RGB_PIN_COUNT)}},Vu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Ot.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Bu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Ot.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Gu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(Ot.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Uu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Ot.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Ot.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},wu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},ku={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_RESET)}},Hu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Wu={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING).appendField(Ot.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Ku={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Ot.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Ju={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Ot.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},qu={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING).appendField(Ot.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},zu={init:function(){this.setColour(xu),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_SETUP+Ot.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Qu={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_SERVO).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SERVO_MOVE)}},ju={init:function(){this.setColour(xu),this.appendValueInput("VAR").appendField("360°"+Ot.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_SETTING+Ot.Msg.blockpy_turtle_rotate+Ot.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},$u={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("180°"+Ot.Msg.MIXLY_SERVO).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SERVO_MOVE)}},Zu={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("360°"+Ot.Msg.MIXLY_SERVO).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},tr={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("180°"+Ot.Msg.MIXLY_SERVO).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},er={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("360°"+Ot.Msg.MIXLY_SERVO).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},ir={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new Ot.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(Ot.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},nr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Direction).appendField(new Ot.FieldDropdown([[Ot.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Ot.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[Ot.Msg.MOTOR_N,"ms32006.MOT_N"],[Ot.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},sr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new Ot.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Direction).appendField(new Ot.FieldDropdown([[Ot.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Ot.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},_r={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_RGB_PIN_COUNT)}},or={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},pr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},ar={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_WRI)}},ur={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.MIXLY_DURATION).appendField(Ot.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},rr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.PYTHON_RANGE_STEP).appendField(Ot.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},lr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new Ot.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SETUP+Ot.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Ot.FieldDropdown([["SYN6288"+Ot.Msg.MIXLY_AipSpeech_synthesis,"SYN6288"],["NS9300"+Ot.Msg.MIXLY_MUSIC_PLAYER,"NS9300"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},dr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_WHETHER).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_STOPPED,"0"],[Ot.Msg.MIXLY_PLAYING,"1"],[Ot.Msg.MIXLY_PAUSED,"2"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},Ir={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_STAT).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MP3_PLAY,"1"],[Ot.Msg.MIXLY_MP3_PAUSE,"2"],[Ot.Msg.MIXLY_STOP,"3"],[Ot.Msg.MIXLY_MP3_PREV,"4"],[Ot.Msg.MIXLY_MP3_NEXT,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendValueInput("volume").appendField(Ot.Msg.MIXLY_MP3_VOL+Ot.Msg.MIXLY_STAT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_PLAYER_SET_VOLUME_TOOLTIP)}},Mr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MODE+Ot.Msg.MIXLY_STAT).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MP3_LOOP_ALL,"0"],[Ot.Msg.MIXLY_MP3_LOOP_ONE,"1"],[Ot.Msg.MIXLY_PLAYER_DIRECTORY_LOOP,"2"],[Ot.Msg.MIXLY_MP3_LOOP_RAM,"3"],[Ot.Msg.MIXLY_PLAYER_SINGLE_STOP,"4"],[Ot.Msg.MIXLY_PLAYER_SEQUENTIAL_PLAY,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_START_MELODY,"play"],[Ot.Msg.MIXLY_PLAYER_INSERT_MUSIC,"insert"]]),"key"),this.appendValueInput("song"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_PLAYER_PLAY_MUSIC_TOOTIP)}},mr={},Er={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(Ot.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Or={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Rr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(Ot.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PROGRAM_BLOCK).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},cr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(Ot.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(Ot.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PROGRAM_BLOCK).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},gr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Cr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_MOTOR).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Sr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_MOTOR).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ar={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_TRAFFIC_LIGHT).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.LISTS_SET_INDEX_SET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Lr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN).appendField(new Ot.FieldDropdown([[Ot.Msg.COLOUR_RGB_WHITE,"W"],[Ot.Msg.COLOUR_RGB_RED,"R"],[Ot.Msg.COLOUR_RGB_YELLOW,"Y"],[Ot.Msg.COLOUR_RGB_GREEN,"G"],[Ot.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Nr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN).appendField(new Ot.FieldDropdown([[Ot.Msg.COLOUR_RGB_WHITE,"W"],[Ot.Msg.COLOUR_RGB_RED,"R"],[Ot.Msg.COLOUR_RGB_YELLOW,"Y"],[Ot.Msg.COLOUR_RGB_GREEN,"G"],[Ot.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET+Ot.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Dr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_SERVO_MOTOR).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[Ot.Msg.MIXLY_SPEED,"[1]"],[Ot.Msg.MATH_SINGLE_OP_ABSOLUTE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[Ot.Msg.MIXLY_RELATIVE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[Ot.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[Ot.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[Ot.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},fr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_SERVO_MOTOR).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[Ot.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[Ot.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Fr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_SERVO_MOTOR).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Pr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_SERVO_MOTOR).appendField(Ot.Msg.MATH_SINGLE_OP_ABSOLUTE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Ot.Msg.MSG.run).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MODE).setAlign(Ot.inputs.Align.RIGHT).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_SPEED+Ot.Msg.MIXLY_MODE,"0"],[Ot.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Ot.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Ot.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(Ot.inputs.Align.RIGHT).appendField(new Ot.FieldDropdown([[Ot.Msg.CLOCKWISE,"0"],[Ot.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[Ot.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},vr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_SERVO_MOTOR).appendField(Ot.Msg.MIXLY_RELATIVE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Ot.Msg.MSG.run).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Yr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_SERVO_MOTOR).appendField(Ot.Msg.MIXLY_RELATIVE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Ot.Msg.MSG.run).appendField("("+Ot.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MODE).setAlign(Ot.inputs.Align.RIGHT).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_SPEED+Ot.Msg.MIXLY_MODE,"0"],[Ot.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Ot.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Ot.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},Xr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_SERVO_MOTOR).appendField(Ot.Msg.MIXLY_RELATIVE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Ot.Msg.MSG.run).appendField("("+Ot.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MODE).setAlign(Ot.inputs.Align.RIGHT).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_SPEED+Ot.Msg.MIXLY_MODE,"0"],[Ot.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Ot.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Ot.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(Ot.inputs.Align.RIGHT).appendField(new Ot.FieldDropdown([[Ot.Msg.CLOCKWISE,"0"],[Ot.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},yr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.MIXBOT).appendField(Ot.Msg.ME_GO_MOTOR_EXTERN).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MOTOR,"ext_motor"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[Ot.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[Ot.Msg.COLOUR_RGB_RED+"LED","R_LED"],[Ot.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[Ot.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[Ot.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[Ot.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},xr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.MIXBOT).appendField(Ot.Msg.ME_GO_MOTOR_EXTERN).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MOTOR,"ext_motor"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[Ot.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[Ot.Msg.COLOUR_RGB_RED+"LED","R_LED"],[Ot.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[Ot.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[Ot.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[Ot.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},br={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_SETUP+Ot.Msg.MIXLY_AT).appendField(Ot.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Vr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING),this.appendValueInput("pin").appendField("LED"),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Br={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_SERVO+Ot.Msg.MIXLY_SETUP+Ot.Msg.MIXLY_AT).appendField(Ot.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Gr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_SERVO),this.appendValueInput("angle").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_DISPLAY_MATRIX_ROTATE),this.appendDummyInput().appendField(Ot.Msg.DRAW_POINTER_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ur={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_MOTOR+Ot.Msg.MIXLY_SETUP+Ot.Msg.MIXLY_AT).appendField(Ot.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},wr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MOTOR),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Ot.Msg.MIXLY_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},kr="#6C9858",Hr={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(new Ot.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},Wr={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_ESP32_ON,"1"],[Ot.Msg.MIXLY_ESP32_OFF,"0"],[Ot.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Kr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Ot.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_SETONOFF)}},Jr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Ot.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},qr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Ot.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},zr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Ot.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_SETTING+Ot.Msg.MIXLY_BUILDIN_LED+Ot.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},Qr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Ot.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_LCD_SETCOLOR).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LIGHT_RED,"1"],[Ot.Msg.MIXLY_LIGHT_GREEN,"2"],[Ot.Msg.MIXLY_LIGHT_BLUE,"3"],[Ot.Msg.MIXLY_LIGHT_YELLOW,"4"],[Ot.Msg.MIXLY_LIGHT_CYAN,"5"],[Ot.Msg.MIXLY_LIGHT_PURPLE,"6"],[Ot.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},jr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING).appendField(Ot.Msg.MIXLY_BUILDIN_LED).appendField(new Ot.FieldDropdown([[Ot.Msg.COLOUR_RGB_RED,"r"],[Ot.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_SETONOFF)}},$r={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Ot.Msg.MIXLY_BUILDIN_LED).appendField(new Ot.FieldDropdown([[Ot.Msg.COLOUR_RGB_RED,"r"],[Ot.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},Zr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Ot.Msg.MIXLY_BUILDIN_LED).appendField(new Ot.FieldDropdown([[Ot.Msg.COLOUR_RGB_RED,"r"],[Ot.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},tl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING).appendField(Ot.Msg.MIXLY_BUILDIN_LED).appendField(new Ot.FieldDropdown([[Ot.Msg.COLOUR_RGB_RED,"r"],[Ot.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_SETTING+Ot.Msg.MIXLY_BUILDIN_LED+Ot.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},el={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(new Ot.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},il={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Rt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(Ot.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(Ot.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(Ot.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},nl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},sl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.MIXLY_DURATION).appendField(Ot.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},_l={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.PYTHON_RANGE_STEP).appendField(Ot.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ol={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_WRI)}},pl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Rt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(Ot.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(Ot.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(Ot.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},al={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},ul={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.PYTHON_RANGE_STEP).appendField(Ot.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},rl={init:function(){this.setColour(kr),this.appendValueInput("TICKS").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Ot.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Ot.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},ll={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},dl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_RESET)}},Il={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Ot.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Tl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Ot.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Ml={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hl={init:function(){this.setColour(kr),this.appendValueInput("LIST").appendField(Ot.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},ml={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MOTOR_DC).appendField(new Ot.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Direction).appendField(new Ot.FieldDropdown([[Ot.Msg.CLOCKWISE,"CW"],[Ot.Msg.ANTI_CLOCKWISE,"CCW"],[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},El={init:function(){this.setColour(kr),this.appendDummyInput().appendField("MixGo Car").appendField(new Ot.FieldDropdown([[Ot.Msg.blockpy_forward,"F"],[Ot.Msg.blockpy_backward,"B"],[Ot.Msg.blockpy_left,"L"],[Ot.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ol={init:function(){this.setColour(kr),this.appendDummyInput("").appendField("MixGo Car").appendField(new Ot.FieldDropdown([[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Rl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MOTOR_DC).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[Ot.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Direction).appendField(new Ot.FieldDropdown([[Ot.Msg.CLOCKWISE,"CW"],[Ot.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MOTOR_DC).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[Ot.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_STOP).appendField(new Ot.FieldDropdown([[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},gl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Cl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXBOT).appendField(new Ot.FieldDropdown([[Ot.Msg.blockpy_forward,"F"],[Ot.Msg.blockpy_backward,"B"],[Ot.Msg.blockpy_left,"L"],[Ot.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[Ot.Msg.MIXLY_SPEED,"SPEED"],[Ot.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Sl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXBOT).appendField(new Ot.FieldDropdown([[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Al={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXBOT).appendField(Ot.Msg.MIXLY_MOTOR).appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"1"],[Ot.Msg.TEXT_TRIM_RIGHT,"2"],[Ot.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[Ot.Msg.MIXLY_SPEED,"SPEED"],[Ot.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Ll={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[Ot.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Nl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.BITBOT).appendField(new Ot.FieldDropdown([[Ot.Msg.blockpy_forward,"F"],[Ot.Msg.blockpy_backward,"B"],[Ot.Msg.blockpy_left,"L"],[Ot.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.BITBOT).appendField(new Ot.FieldDropdown([[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.BITBOT).appendField(Ot.Msg.MIXLY_MOTOR).appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"0"],[Ot.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Direction).appendField(new Ot.FieldDropdown([[Ot.Msg.CLOCKWISE,"CW"],[Ot.Msg.ANTI_CLOCKWISE,"CCW"],[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Fl={init:function(){this.setColour(kr),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_SETONOFF)}},Pl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},vl={init:function(){this.setColour(kr),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_SETTING+Ot.Msg.MIXLY_MIXBOT_BUZZER+Ot.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_SETONOFF)}},Yl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_MIXBOT_BUZZER+Ot.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},Xl={init:function(){this.setColour(kr),this.appendValueInput("PATH").appendField(Ot.Msg.MIXLY_RECORD_AUDIO).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(Ot.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},yl={init:function(){this.setColour(kr),this.appendValueInput("PATH").appendField(Ot.Msg.MIXLY_PLAY_AUDIO).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},xl={init:function(){this.setColour(kr),this.appendValueInput("PATH").appendField(Ot.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},bl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Ot.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Vl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.LISTS_SET_INDEX_SET+Ot.Msg.ME_GO_MOTOR_EXTERN).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([["1","1"],["2","2"],["3","3"],["4","4"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.blynk_IOT_IR_POWER+Ot.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Gl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET+Ot.Msg.ME_GO_MOTOR_EXTERN).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.blynk_IOT_IR_POWER+Ot.Msg.MIXLY_PINMODEOUT+Ot.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ul={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.LISTS_SET_INDEX_SET+Ot.Msg.ME_GO_MOTOR_EXTERN).appendField(Ot.Msg.MIXLY_ALL+Ot.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(Ot.ALIGN_RIGHT).appendField(Ot.Msg.blynk_IOT_IR_POWER+Ot.Msg.MIXLY_PINMODEOUT+Ot.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},wl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.ANALOG+Ot.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_RELEASE).appendField(new Ot.FieldDropdown([[Ot.Msg.MICROPYTHON_DISPLAY_YES,"True"],[Ot.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.ANALOG+Ot.Msg.MIXLY_KEYBOARD_INPUT)}},kl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SPECIAL_KEY).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[Ot.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[Ot.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[Ot.Msg.MIXLY_SPECIAL_KEY4,"0x04"],[Ot.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[Ot.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[Ot.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[Ot.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[Ot.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},Hl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GENERAL_KEY).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_SPECIAL_KEY0,"0x00"],["A","0x04"],["B","0x05"],["C","0x06"],["D","0x07"],["E","0x08"],["F","0x09"],["G","0x0A"],["H","0x0B"],["I","0x0C"],["J","0x0D"],["K","0x0E"],["L","0x0F"],["M","0x10"],["N","0x11"],["O","0x12"],["P","0x13"],["Q","0x14"],["R","0x15"],["S","0x16"],["T","0x17"],["U","0x18"],["V","0x19"],["W","0x1A"],["X","0x1B"],["Y","0x1C"],["Z","0x1D"],["1 !","0x1E"],["2 @","0x1F"],["3 #","0x20"],["4 $","0x21"],["5 %","0x22"],["6 ^","0x23"],["7 &","0x24"],["8 *","0x25"],["9 (","0x26"],["0 )","0x27"],["ENTER","0x28"],["ESC","0x29"],["BACKSPACE","0x2A"],["TAB","0x2B"],["SPACE","0x2C"],["- _","0x2D"],["= +","0x2E"],["[ {","0x2F"],["] }","0x30"],["\\ |","0x31"],["; :","0x33"],["' \"","0x34"],["` ~","0x35"],[", <","0x36"],[". >","0x37"],["/ ?","0x38"],["CAPS_LOCK","0x39"],["F1","0x3A"],["F2","0x3B"],["F3","0x3C"],["F4","0x3D"],["F5","0x3E"],["F6","0x3F"],["F7","0x40"],["F8","0x41"],["F9","0x42"],["F10","0x43"],["F11","0x44"],["F12","0x45"],["PRINTSCREEN","0x46"],["SCROLL_LOCK","0x47"],["PAUSE","0x48"],["INSERT","0x49"],["HOME","0x4A"],["PAGE_UP","0x4B"],["DELETE","0x4C"],["END","0x4D"],["PAGE_DOWN","0x4E"],["RIGHT","0x4F"],["LEFT","0x50"],["DOWN","0x51"],["UP","0x52"],["NUM_LOCK","0x53"],["/","0x54"],["*","0x55"],["-","0x56"],["+","0x57"],["ENTER","0x58"],["1","0x59"],["2","0x5A"],["3","0x5B"],["4","0x5C"],["5","0x5D"],["6","0x5E"],["7","0x5F"],["8","0x60"],["9","0x61"],["0","0x62"],[".","0x63"]]),"op"),this.setOutput(!0)}},Wl={init:function(){this.setColour(kr),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new Ot.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(Ot.Msg.GENERALKEY_TUPLE_CREATE_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("generalkey_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;nnew Array(32).fill(0)))},sm={init:function(){this.jsonInit({colour:qh,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:Ot.Msg.MIXLY_MICROBIT_Built_in_image1,message0:Ot.Msg.MIXLY_MICROBIT_Built_in_image})}},_m={init:function(){this.setColour(qh),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new Ot.FieldDropdown(Rt.Profile.default.builtinimg),"image"),this.setOutput(!0,["esp32_image","List"])}},om={init:function(){this.setColour(qh),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Ot.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Ot.FieldDropdown(om.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Ot.Msg.MIXLY_MICROBIT_image_add,"-":Ot.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Ot.Msg.MICROBIT_DISPLAY_UNION,"add"],[Ot.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},pm={init:function(){this.setColour(qh),this.appendValueInput("A").setCheck("esp32_image").appendField(Ot.Msg.MIXLY_MICROBIT_Invert_image1),this.setInputsInline(!0),this.setOutput(!0,"esp32_image")}},am={init:function(){this.setColour(qh),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Ot.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Ot.Msg.DISPLAY_IMAGE_LET2).appendField(new Ot.FieldDropdown(am.OPERATORS),"OP"),this.appendValueInput("val").appendField(Ot.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.DISPLAY_IMAGE_UNIT);Rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Ot.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Ot.Msg.DISPLAY_IMAGE_LET,n=Ot.Msg.DISPLAY_IMAGE_LET2,s=Ot.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:Ot.Msg.MIXLY_UP,shift_down:Ot.Msg.MIXLY_DOWN,shift_left:Ot.Msg.MIXLY_LEFT,shift_right:Ot.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Ot.Msg.MIXLY_UP,"shift_up"],[Ot.Msg.MIXLY_DOWN,"shift_down"],[Ot.Msg.MIXLY_LEFT,"shift_left"],[Ot.Msg.MIXLY_RIGHT,"shift_right"]]},um={init:function(){this.setColour(qh),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},rm={init:function(){this.setColour(qh),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},lm={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},dm={init:function(){this.setColour(qh),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},Im={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Clear_display);Rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Ot.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Clear_display)}},Tm={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SHOW+Ot.Msg.MIXLY_DISPLAY_MATRIX_WRITE_NOW),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Mm={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<8;i++)e.appendField(new Ot.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},hm={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Ot.inputs.Align.CENTRE).appendField(new Ot.FieldBitmap(hm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},mm={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new Ot.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Em={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Ot.inputs.Align.CENTRE).appendField(new Ot.FieldBitmap(Em.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},Om={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<16;i++)e.appendField(new Ot.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,"esp32_image"),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Rm={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Ot.inputs.Align.CENTRE).appendField(new Ot.FieldBitmap(Rm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},cm={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.OLED_SET_FONT).appendField(new Ot.FieldDropdown(cm.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+Ot.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+Ot.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+Ot.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},gm={init:function(){this.setColour(qh),this.appendValueInput("data").appendField(Ot.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.OLED_BITMAP_OR_STRING)}},Cm={init:function(){this.setColour(qh),this.appendValueInput("data").appendField(Ot.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.OLED_BITMAP_OR_STRING)}},Sm={init:function(){this.setColour(qh),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(Ot.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.OLED_BITMAP_OR_STRING)}},Am={init:function(){this.setColour(qh),this.appendValueInput("data").setCheck(String).appendField(Ot.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(Ot.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(Ot.Msg.TEXT_CENTER).appendField(new Ot.FieldDropdown([[Ot.Msg.MICROPYTHON_DISPLAY_YES,"True"],[Ot.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},Lm={init:function(){this.setColour(qh),this.appendValueInput("data").setCheck(String).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(Ot.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},Nm={init:function(){this.setColour(qh),this.appendValueInput("data").setCheck(String).appendField(Ot.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dm={init:function(){this.setColour(qh),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},fm={init:function(){this.jsonInit({colour:qh,args0:[{name:"state",options:[[Ot.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[Ot.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"shape",options:[[Ot.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[Ot.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"}],inputsInline:!0,helpUrl:Ot.Msg.mpython_HELPURL,tooltip:Ot.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:Ot.Msg.MPYTHON_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Fm={init:function(){this.jsonInit({colour:qh,args0:[{name:"state",options:[[Ot.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[Ot.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"dir_h_v",options:[[Ot.Msg.mpython_vertical,"0"],[Ot.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"}],inputsInline:!0,helpUrl:Ot.Msg.mpython_HELPURL,tooltip:Ot.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:Ot.Msg.MPYTHON_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},Pm={init:function(){this.jsonInit({colour:qh,args0:[{name:"state",options:[[Ot.Msg.mpython_display_hline_1,"1"],[Ot.Msg.mpython_display_hline_0,"0"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"}],inputsInline:!0,helpUrl:Ot.Msg.mpython_HELPURL,tooltip:Ot.Msg.mpython_display_line_TOOLTIP,message0:Ot.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},vm={init:function(){this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new Ot.FieldDropdown(vm.IMAGES),"path"),this.setColour(qh),this.setOutput(!0)},IMAGES:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]]},Ym={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<5;i++)e.appendField(new Ot.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Xm={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Ot.inputs.Align.CENTRE).appendField(new Ot.FieldBitmap(Xm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},ym={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},xm={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_AMBIENTBRIGHT),this.setInputsInline(!0),this.setOutput(!0,Number)}},bm={init:function(){this.setColour(qh),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},Vm={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new Ot.FieldDropdown(Vm.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[Ot.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[Ot.Msg.CLOCKWISE+"90"+Ot.Msg.blockpy_setheading_degree,"1"],[Ot.Msg.CLOCKWISE+"180"+Ot.Msg.blockpy_setheading_degree,"2"],[Ot.Msg.CLOCKWISE+"270"+Ot.Msg.blockpy_setheading_degree,"3"]]},Bm={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<12;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new Ot.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Gm={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Ot.inputs.Align.CENTRE).appendField(new Ot.FieldBitmap(Gm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},Um={init:function(){this.setColour(qh),this.appendValueInput("data").appendField(Ot.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(Ot.Msg.HTML_COLOUR);Rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Ot.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},wm={init:function(){this.setColour(qh),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.OLED_BITMAP).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("direct").setCheck(String).appendField(Ot.Msg.MIXLY_AipImageClassify_Image+Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},km={init:function(){this.setColour(qh),this.appendValueInput("data").setCheck(String).appendField(Ot.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(Ot.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(Ot.Msg.TEXT_CENTER).appendField(new Ot.FieldDropdown([[Ot.Msg.MICROPYTHON_DISPLAY_YES,"True"],[Ot.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.appendValueInput("VAR").appendField(Ot.Msg.HTML_COLOUR);Rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Ot.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},Hm={init:function(){this.setColour(qh),this.appendValueInput("data").setCheck(String).appendField(Ot.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.appendValueInput("VAR").appendField(Ot.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Wm={init:function(){this.jsonInit({colour:qh,args0:[{name:"shape",options:[[Ot.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[Ot.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Ot.Msg.mpython_HELPURL,tooltip:Ot.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:Ot.Msg.ONBOARD_TFT_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Km={init:function(){this.jsonInit({colour:qh,args0:[{name:"dir_h_v",options:[[Ot.Msg.mpython_vertical,"0"],[Ot.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Ot.Msg.mpython_HELPURL,tooltip:Ot.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:Ot.Msg.ONBOARD_TFT_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},Jm={init:function(){this.jsonInit({colour:qh,args0:[{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Ot.Msg.mpython_HELPURL,tooltip:Ot.Msg.mpython_display_line_TOOLTIP,message0:Ot.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},qm={init:function(){this.setColour(qh),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(Ot.Msg.HTML_COLOUR),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},zm={init:function(){this.setColour(qh),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.MIXLY_LCD_SETCOLOR).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("VAR").appendField(Ot.Msg.HTML_COLOUR);Rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Ot.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Qm={init:function(){this.setColour(qh),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_SCREEN_FILL);Rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Ot.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},jm={init:function(){this.setColour(qh),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_INIT_CLOCK),this.appendDummyInput().appendField(Ot.Msg.MIXLY_CENTER_POS),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.OLED_CIRCLE_RADIUS),this.appendValueInput("VAR").appendField(Ot.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},$m={init:function(){this.setColour(qh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Ot.Msg.GET_RTCTIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Zm={init:function(){this.setColour(qh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Ot.Msg.SET_TIME),this.appendValueInput("h").setCheck(Number).appendField(Ot.Msg.MIXLY_HOUR),this.appendValueInput("m").setCheck(Number).appendField(Ot.Msg.MIXLY_MINUTE),this.appendValueInput("s").setCheck(Number).appendField(Ot.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},tE={init:function(){this.setColour(qh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Ot.Msg.DRAW_CLOCK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},eE={init:function(){this.setColour(qh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Ot.Msg.CLEAR_CLOCK),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_STM32_TFT_BACKGROUND_COLOR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},iE={init:function(){this.jsonInit({colour:qh,args0:[{name:"shape",options:[[Ot.Msg.MPYTHON_DISPLAY_HOLLOW,"False"],[Ot.Msg.MPYTHON_DISPLAY_SOLID,"True"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"r",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Ot.Msg.mpython_HELPURL,message0:Ot.Msg.ONBOARD_TFT_DISPLAY_SHAPE_CIRCLE_MESSAGE0,nextStatement:null,previousStatement:null})}},nE={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.DRAW_POINTER).appendField(Ot.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_DRAW_POINTER_DU),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.DRAW_POINTER_TOOLTIP)}},sE={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.DRAW_POINTER).appendField(Ot.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_DRAW_POINTER_DU),this.appendValueInput("VAR").appendField(Ot.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.DRAW_POINTER_TOOLTIP)}},_E={init:function(){this.setColour(qh),this.appendValueInput("data").appendField(Ot.Msg.MIXLY_Display_long_text),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(Ot.Msg.HTML_COLOUR);Rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Ot.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},oE={init:function(){this.setColour(qh),this.appendValueInput("data").appendField(Ot.Msg.OLED_BITMAP),this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.OLED_BITMAP_OR_STRING),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},pE={init:function(){jh.init.call(this),this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},aE={init:function(){tm.init.call(this),this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},uE={init:function(){am.init.call(this),this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},rE={init:function(){lm.init.call(this),this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},lE={init:function(){dm.init.call(this),this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},dE={init:function(){Im.init.call(this),this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},IE=180,TE={init:function(){this.setColour(IE),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(Ot.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(Ot.Msg.DISPLAY_IMAGE_LET2).appendField(new Ot.FieldDropdown(TE.OPERATORS),"OP"),this.appendValueInput("val").appendField(Ot.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Ot.Msg.DISPLAY_IMAGE_LET,n=Ot.Msg.DISPLAY_IMAGE_LET2,s=Ot.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Ot.Msg.MIXLY_UP,down:Ot.Msg.MIXLY_DOWN,left:Ot.Msg.MIXLY_LEFT,right:Ot.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Ot.Msg.MIXLY_UP,"up"],[Ot.Msg.MIXLY_DOWN,"down"],[Ot.Msg.MIXLY_LEFT,"left"],[Ot.Msg.MIXLY_RIGHT,"right"]]},ME={init:function(){this.setColour(IE),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Ot.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Ot.FieldDropdown(ME.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Ot.Msg.MIXLY_MICROBIT_image_add,"-":Ot.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Ot.Msg.MICROBIT_DISPLAY_UNION,"+"],[Ot.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},hE={init:function(){this.setColour(IE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Ot.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Ot.FieldDropdown(hE.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Ot.Msg.MIXLY_MICROBIT_IMAGE+{height:Ot.Msg.MIXLY_HEIGHT,width:Ot.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Ot.Msg.MIXLY_HEIGHT,"height"],[Ot.Msg.MIXLY_WIDTH,"width"]]},mE={init:function(){this.setColour(IE),this.appendValueInput("VAR").appendField(Ot.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RECT).appendField(new Ot.FieldDropdown(mE.STATUS),"OP"),this.jsonInit({message0:Ot.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_OLED_RECT)},STATUS:[[Ot.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Ot.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},EE={init:function(){this.setColour(IE),this.appendValueInput("VAR").appendField(Ot.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Ot.FieldDropdown(EE.STATUS),"OP"),this.jsonInit({message0:Ot.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Ot.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Ot.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},OE={init:function(){this.setColour(IE),this.appendValueInput("VAR").appendField(Ot.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_DISPLAY_DRAW+Ot.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new Ot.FieldDropdown(OE.STATUS),"OP"),this.jsonInit({message0:Ot.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_DISPLAY_DRAW+Ot.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[Ot.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Ot.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},RE="#777777",cE={init:function(){this.setColour(RE),this.appendDummyInput("").appendField("from ").appendField(new Ot.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new Ot.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gE={init:function(){this.setColour(RE),this.appendDummyInput("").appendField("import ").appendField(new Ot.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},CE={init:function(){this.setColour(RE),this.appendDummyInput("").appendField(new Ot.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Ot.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},rO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Ot.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},lO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},dO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},IO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(Ot.Msg.MIXLY_EMQX_SERVER).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Ot.Msg.MIXLY_WIFI_USERNAME).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Ot.Msg.MIXLY_IOT_PASSWORD).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(Ot.Msg.MIXLY_EMQX_PROJECT).setAlign(Ot.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},TO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Ot.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},MO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Ot.Msg.MIXLY_EMQX_SUBSCRIBE+Ot.Msg.MIXLY_MICROBIT_MSG).appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Ot.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},hO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},EO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},OO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Ot.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},RO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},cO={init:function(){this.setColour(nO),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},gO={init:function(){this.setColour(nO),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},CO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},SO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO").appendField(Ot.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(Ot.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},AO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Ot.Msg.MIXLY_EMQX_SERVER).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Ot.Msg.CONTROLS_FOR_INPUT_WITH+Ot.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(Ot.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},LO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Ot.Msg.MIXLY_EMQX_SERVER).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Ot.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(Ot.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},NO={init:function(){this.VISITOR_ID=Rt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(nO),this.appendDummyInput("").appendField(new Ot.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},DO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO").appendField(Ot.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},fO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("HTTP"+Ot.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Ot.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(Ot.Msg.MIXLY_REQUESTS_GET).appendField(Ot.Msg.MIXLY_GET_CURRENT_TIME).appendField(Ot.Msg.MIXLY_OPEN_DEBUG).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},FO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("HTTP"+Ot.Msg.MIXLY_Client).appendField(Ot.Msg.MIXLY_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Ot.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Ot.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},PO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MQTT"+Ot.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Ot.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_INIT_SUBSCRIBE).appendField(Ot.Msg.MQTT_Topic).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(Ot.Msg.MIXLY_OPEN_DEBUG).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MQTT"+Ot.Msg.MIXLY_Client).appendField(Ot.Msg.MIXLY_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Ot.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Ot.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},YO=sO,XO=_O,yO=oO,xO=pO,bO=uO,VO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(Ot.Msg.MIXLY_EMQX_SERVER).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(Ot.Msg.MODEL_NAME).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(Ot.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},BO=VO,GO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(Ot.Msg.MIXLY_EMQX_SERVER).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Ot.Msg.MIXLY_API_PRIVATE_KEY).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(Ot.Msg.MODEL_NAME).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(Ot.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},UO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(Ot.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(Ot.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(Ot.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(Ot.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},kO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("Ollama "+Ot.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},HO=225,WO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(Ot.Msg.MIXLY_NETWORK_MODE).appendField(new Ot.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},KO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[Ot.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=Ot.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:Ot.Msg.MIXLY_NETWORK_WIFI_OPEN,False:Ot.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},JO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},qO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return Ot.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:Ot.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},zO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(Ot.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(Ot.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},QO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_NETWORK_WIFI_CONNECT+Ot.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},jO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[Ot.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[Ot.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return Ot.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:Ot.Msg.MIXLY_ESP32_NETWORK_IP,1:Ot.Msg.MIXLY_ESP32_NETWORK_MASK,2:Ot.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},$O={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},ZO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[Ot.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},tR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(Ot.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(Ot.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},eR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},iR={init:function(){this.setColour(HO),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new Ot.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},nR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},sR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},_R={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},oR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},pR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},aR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},uR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},rR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},lR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},dR={init:function(){this.setColour(HO),this.appendValueInput("DOMAIN").appendField(Ot.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Ot.Msg.blockpy_REQUESTS_GET).appendField(new Ot.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},IR={init:function(){this.appendValueInput("VAL"),this.setColour(HO),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Ot.FieldDropdown(IR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:Ot.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Ot.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Ot.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[Ot.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Ot.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Ot.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[Ot.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},TR={init:function(){this.appendValueInput("VAR").appendField(Ot.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(HO),this.appendDummyInput("").appendField(Ot.Msg.blockpy_CONDUCT).appendField(new Ot.FieldDropdown(TR.METHOD),"DIR"),this.appendDummyInput("").appendField(Ot.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:Ot.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:Ot.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},MR={init:function(){this.setColour(HO),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(Ot.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},hR={init:function(){this.setColour(HO),this.appendDummyInput("").appendField(new Ot.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},mR="#3288dd",ER={init:function(){this.setColour(mR),this.appendValueInput("URL").appendField(Ot.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Ot.Msg.blockpy_CONDUCT).appendField(new Ot.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(Ot.Msg.blockpy_REQUESTS).appendField(Ot.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},OR={init:function(){this.setColour(mR),this.appendValueInput("URL").appendField(Ot.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Ot.Msg.blockpy_CONDUCT).appendField(new Ot.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(Ot.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(Ot.Msg.blockpy_REQUESTS+Ot.Msg.OLED_STRING),this.appendDummyInput("").appendField(Ot.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},RR={init:function(){this.appendValueInput("VAL"),this.setColour(mR),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Ot.FieldDropdown(RR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[Ot.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Ot.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[Ot.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Ot.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[Ot.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},cR={init:function(){this.setColour(mR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(Ot.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Ot.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(Ot.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},gR={init:function(){this.setColour(mR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(Ot.Msg.MIXLY_EMQX_SERVER).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(Ot.Msg.MIXLY_EMQX_PORT).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(Ot.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Ot.Msg.MIXLY_WIFI_USERNAME).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Ot.Msg.MIXLY_IOT_PASSWORD).setAlign(Ot.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},CR={init:function(){this.setColour(mR),this.appendValueInput("TOPIC").appendField(Ot.Msg.MIXLY_EMQX_SUBSCRIBE+Ot.Msg.MIXLY_MICROBIT_MSG).appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(Ot.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},SR={init:function(){this.setColour(mR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Ot.Msg.MIXLY_EMQX_SUBSCRIBE+Ot.Msg.MIXLY_MICROBIT_MSG).appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Ot.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},AR={init:function(){this.setColour(mR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Ot.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},LR={init:function(){this.setColour(mR),this.appendDummyInput().appendField("mqtt"+Ot.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},NR="#A58C5B",DR={init:function(){this.setColour(NR),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_BUTTON).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(Ot.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_SENOR_IS_PRESSED)}},fR={init:function(){this.setColour(NR),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_BUTTON).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(Ot.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_SENOR_WAS_PRESSED)}},FR={init:function(){this.setColour(NR),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_BUTTON).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(Ot.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.PROCEDURES_DEFRETURN_RETURN+Ot.Msg.MIXLY_BUTTON+Ot.Msg.MIXLY_GET_PRESSES)}},PR={init:function(){this.setColour(NR),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_BUTTON).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Ot.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Ot.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},vR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_shake,"shake"],[Ot.Msg.MIXLY_UP,"up"],[Ot.Msg.MIXLY_DOWN,"down"],[Ot.Msg.MIXLY_LEFT,"left"],[Ot.Msg.MIXLY_RIGHT,"right"],[Ot.Msg.MIXLY_MICROBIT_face_up,"face up"],[Ot.Msg.MIXLY_MICROBIT_face_down,"face down"],[Ot.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=Ot.Msg.MIXLY_MICROBIT_JS_CURRENT,n=Ot.Msg.MSG.catSensor,s=Ot.Msg.MIXLY_MICROBIT_JS_STATE,_=Ot.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:Ot.Msg.MIXLY_MICROBIT_shake,up:Ot.Msg.MIXLY_UP,down:Ot.Msg.MIXLY_DOWN,left:Ot.Msg.MIXLY_LEFT,right:Ot.Msg.MIXLY_RIGHT,"face up":Ot.Msg.MIXLY_MICROBIT_face_up,"face down":Ot.Msg.MIXLY_MICROBIT_face_down,freefall:Ot.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+_}))}},YR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Ot.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Ot.Msg.MIXLY_MICROBIT_Direction,s=Ot.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Ot.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},XR={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},yR={init:function(){this.setColour(NR),this.appendValueInput("PIN",Number).appendField(new Ot.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Ot.FieldDropdown(yR.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Ot.Msg.MIXLY_GETHUMIDITY,"humidity"]]},xR={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},bR={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},VR={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"left"],[Ot.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(Ot.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=Ot.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=Ot.Msg.MIXLY_ESP32_NEAR;return i+{left:Ot.Msg.TEXT_TRIM_LEFT,right:Ot.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},BR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_ALTITUDE_SENSOR+" BMP280").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[Ot.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":Ot.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":Ot.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},GR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+" SHT20").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[Ot.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},UR={init:function(){this.setColour(NR),this.appendValueInput("PIN",Number).appendField("DS18X20 "+Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},wR={init:function(){this.setColour(NR),this.appendDummyInput("").appendField("LM35"+Ot.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_LM35)}},kR={init:function(){this.setColour(NR),this.appendValueInput("I2CSUB").appendField(Ot.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SETUP+Ot.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_ESP32_EXTERN_LIGHT+"(LTR308ALS)","LTR308"],[Ot.Msg.MIXLY_COLOR_SENSOR+"(LTR381RGB)","LTR381RGB"],[Ot.Msg.MIXLY_COLOR_SENSOR+"(UCS12071)","UCS12071"],[Ot.Msg.MIXLY_EXTERN_LIGHTUV+"(LTR390UV)","LTR390UV"],[Ot.Msg.MIXLY_ALTITUDE_SENSOR+"(HP203X)","HP203X"],[Ot.Msg.MIXLY_ALTITUDE_SENSOR+"(SPL06_001)","SPL06_001"],[Ot.Msg.MIXLY_ALTITUDE_SENSOR+"(MS5611)","MS5611"],[Ot.Msg.MIXLY_ALTITUDE_SENSOR+"(BMP280)","BMP280"],[Ot.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHTC3)","SHTC3"],[Ot.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(AHT21)","AHT21"],[Ot.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHT20)","SHT20"],[Ot.Msg.MIXLY_LASER_RANGE_SENSOR+"(VL53L0X)","VL53L0X"],[Ot.Msg.MIXLY_GEOMAGNETIC_SENSOR+"(QMC5883L)","QMC5883L"],[Ot.Msg.MIXLY_ESP32_MAX30102+"(MAX30102)","MAX30102"],[Ot.Msg.HTML_COLOUR+"、"+Ot.Msg.MIXLY_ENVIRONMENT_LIGHT+"、"+Ot.Msg.MIXLY_NEXT+"、"+Ot.Msg.MIXLY_ESP32_APDS9960+"(APDS9960)","APDS9960"],[Ot.Msg.MIXLY_NINE_AXIS_SENSOR+"(MPU9250)","MPU9250"],[Ot.Msg.MixGo_MPU9250+"(ADXL345)","ADXL345"],["RFID","RFID"],[Ot.Msg.MIXLY_RADAR_SENSOR+"(CBR817)","CBR817"],[Ot.Msg.MIXLY_AipSpeech_asr+"(CI130X)","CI130X"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},HR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.LISTS_SET_INDEX_SET+Ot.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(Ot.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+Ot.Msg.MIXLY_DELAY_TIME_RANGE)}},WR={init:function(){this.setColour(NR),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RADAR).appendField(Ot.Msg.LISTS_SET_INDEX_SET+Ot.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(Ot.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+Ot.Msg.MIXLY_DELAY_TIME_RANGE)}},KR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},JR={init:function(){this.setColour(NR),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RADAR).appendField(Ot.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},qR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_IDENTIFY_ONCE_AND_SAVE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},zR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_HELLO_XIAOZHI,"1"],[Ot.Msg.MIXLY_XIAOZHIXIAOZHI,"2"],[Ot.Msg.MIXLY_THE_FIRST,"3"],[Ot.Msg.MIXLY_THE_SECOND,"4"],[Ot.Msg.MIXLY_THE_THIRD,"5"],[Ot.Msg.MIXLY_THE_FOURTH,"6"],[Ot.Msg.MIXLY_THE_FIFTH,"7"],[Ot.Msg.MIXLY_THE_SIXTH,"8"],[Ot.Msg.MIXLY_THE_SEVENTH,"9"],[Ot.Msg.MIXLY_THE_EIGHTH,"10"],[Ot.Msg.MIXLY_THE_NINTH,"11"],[Ot.Msg.MIXLY_THE_TENTH,"12"],[Ot.Msg.MIXLY_THE_ELEVENTH,"13"],[Ot.Msg.MIXLY_THE_TWELFTH,"14"],[Ot.Msg.MIXLY_THE_13TH,"15"],[Ot.Msg.MIXLY_THE_14TH,"16"],[Ot.Msg.MIXLY_THE_15TH,"17"],[Ot.Msg.MIXLY_THE_16TH,"18"],[Ot.Msg.MIXLY_THE_17TH,"19"],[Ot.Msg.MIXLY_THE_18TH,"20"],[Ot.Msg.MIXLY_THE_19TH,"21"],[Ot.Msg.MIXLY_THE_20TH,"22"],[Ot.Msg.MIXLY_Turn_on_the_lights,"23"],[Ot.Msg.MIXLY_Turn_off_the_lights,"24"],[Ot.Msg.MIXLY_Turn_up_the_brightness,"25"],[Ot.Msg.MIXLY_Turn_down_the_brightness,"26"],[Ot.Msg.MIXLY_Set_it_to_red,"27"],[Ot.Msg.MIXLY_Set_it_to_orange,"28"],[Ot.Msg.MIXLY_Set_it_to_yellow,"29"],[Ot.Msg.MIXLY_Set_it_to_green,"30"],[Ot.Msg.MIXLY_Set_it_to_cyan,"31"],[Ot.Msg.MIXLY_Set_it_to_blue,"32"],[Ot.Msg.MIXLY_Set_it_to_purple,"33"],[Ot.Msg.MIXLY_Set_it_to_white,"34"],[Ot.Msg.MIXLY_Turn_on_the_fan,"35"],[Ot.Msg.MIXLY_Turn_off_the_fan,"36"],[Ot.Msg.MIXLY_First_gear,"37"],[Ot.Msg.MIXLY_Wind_speed_second,"38"],[Ot.Msg.MIXLY_Third_gear,"39"],[Ot.Msg.MIXLY_Previous,"40"],[Ot.Msg.MIXLY_Next_page,"41"],[Ot.Msg.MIXLY_Show_smiley_face,"42"],[Ot.Msg.MIXLY_Show_crying_face,"43"],[Ot.Msg.MIXLY_Show_love,"44"],[Ot.Msg.MIXLY_Close_display,"45"],[Ot.Msg.MIXLY_Start_execution,"46"],[Ot.Msg.MIXLY_FORWARD,"47"],[Ot.Msg.MIXLY_BACKWARD,"48"],[Ot.Msg.MIXLY_TURNLEFT,"49"],[Ot.Msg.MIXLY_TURNRIGHT,"50"],[Ot.Msg.MIXLY_STOP,"51"],[Ot.Msg.MIXLY_Accelerate,"52"],[Ot.Msg.MIXLY_retard,"53"],[Ot.Msg.ROTATION_FORWARD,"54"],[Ot.Msg.ROTATION_BACKWARD,"55"],[Ot.Msg.MIXLY_Query_temperature,"56"],[Ot.Msg.MIXLY_Query_humidity,"57"],[Ot.Msg.MIXLY_Query_brightness,"58"],[Ot.Msg.MIXLY_Query_sound,"59"],[Ot.Msg.MIXLY_Query_time,"60"],[Ot.Msg.MIXLY_Query_distance,"61"],[Ot.Msg.MIXLY_Query_pressure,"62"],[Ot.Msg.MIXLY_Query_key,"63"],[Ot.Msg.MIXLY_Query_touch,"64"],[Ot.Msg.MIXLY_Query_color,"65"]]),"cmd").appendField(Ot.Msg.MIXLY_WHETHER+Ot.Msg.MIXLY_BE_IDENTIFIED),this.setOutput(!0),this.setInputsInline(!0)}},QR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_RECOGNIZED_STATE,"status1"],[Ot.Msg.MIXLY_WHETHER_BROADCAST,"status2"],[Ot.Msg.MIXLY_THE_RECOGNIZED_CMD,"result"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_CI130X_GET_THE_RECOGNIZED_STATE_TOOLTIP)}},jR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MP3_PLAY).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[Ot.Msg.MIXLY_WIND_SPEED,"154"],[Ot.Msg.MIXLY_HYETAL,"155"],[Ot.Msg.MIXLY_TEMPERATURE,"156"],[Ot.Msg.MIXLY_Humidity,"157"],[Ot.Msg.MIXLY_Altitude,"158"],[Ot.Msg.MIXLY_SOUND,"159"],[Ot.Msg.MIXLY_BRIGHTNESS,"160"],[Ot.Msg.ME_GO_HALL_SENSOR_DISTANCE,"161"],[Ot.Msg.MIXLY_SERVO,"162"],[Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"163"],[Ot.Msg.MIXLY_BUTTON2,"164"],[Ot.Msg.MIXLY_ESP32_TOUCH,"165"],[Ot.Msg.MIXLY_PAY,"166"],[Ot.Msg.MIXLY_CARSH_CHANGE,"167"],[Ot.Msg.MIXLY_COUNTDOWN,"168"],[Ot.Msg.MIXLY_TIMING,"169"],[Ot.Msg.MIXLY_AT_THE_MOMENT,"170"],[Ot.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE,"171"],[Ot.Msg.MIXLY_FORWARD,"172"],[Ot.Msg.MIXLY_BACKWARD,"173"],[Ot.Msg.MIXLY_TURNLEFT,"174"],[Ot.Msg.MIXLY_TURNRIGHT,"175"],[Ot.Msg.MIXLY_STOP,"176"],[Ot.Msg.MIXLY_Accelerate,"177"],[Ot.Msg.MIXLY_retard,"178"],[Ot.Msg.ROTATION_FORWARD,"179"],[Ot.Msg.ROTATION_BACKWARD,"180"],[Ot.Msg.TUPLE_JOIN,"181"],[Ot.Msg.MIXLY_SHOW,"182"],[Ot.Msg.MIXLY_LAMPLIGHT,"183"],[Ot.Msg.MIXLY_ACCELERATION,"184"]]),"star"),this.appendValueInput("NUM").appendField(Ot.Msg.MIXLY_NUMBER),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_UNIT).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[Ot.Msg.MIXLY_YEAR,"117"],[Ot.Msg.MIXLY_MONTH,"118"],[Ot.Msg.MIXLY_DAY,"119"],[Ot.Msg.MIXLY_HOUR,"120"],[Ot.Msg.MIXLY_MINUTE,"121"],[Ot.Msg.MIXLY_SECOND,"122"],[Ot.Msg.MIXLY_WEEK2,"123"],[Ot.Msg.MIXLY_RMB_UNIT,"124"],[Ot.Msg.blockpy_setheading_degree,"125"],[Ot.Msg.MIXLY_GEAR,"126"],[Ot.Msg.MIXLY_LAYER,"127"],[Ot.Msg.MIXLY_GRAM,"128"],[Ot.Msg.MIXLY_METER,"129"],[Ot.Msg.MIXLY_CENTIMETER,"130"],[Ot.Msg.MIXLY_MILLIMETER,"131"],[Ot.Msg.MIXLY_LUMEN,"132"],[Ot.Msg.MIXLY_DECIBEL,"133"],[Ot.Msg.MIXLY_hectopascal,"134"],[Ot.Msg.MIXLY_PERCENT,"135"],[Ot.Msg.MIXLY_CELSIUS,"136"],[Ot.Msg.MIXLY_METER_PER_SEC,"137"],[Ot.Msg.MIXLY_MICROBIT_Turn_on_display,"138"],[Ot.Msg.MIXLY_MICROBIT_Turn_off_display,"139"],[Ot.Msg.MIXLY_SUCCESS,"140"],[Ot.Msg.MIXLY_FAILED,"141"],[Ot.Msg.MIXLY_WRONG,"142"],[Ot.Msg.MIXLY_GOOD,"143"],[Ot.Msg.MIXLY_blockpy_set_add,"144"],[Ot.Msg.MIXLY_DECREASE,"145"],[Ot.Msg.COLOUR_RGB_RED,"146"],[Ot.Msg.COLOUR_RGB_ORANGE,"147"],[Ot.Msg.COLOUR_YELLOW,"148"],[Ot.Msg.COLOUR_RGB_GREEN,"149"],[Ot.Msg.COLOUR_CYAN,"150"],[Ot.Msg.COLOUR_RGB_BLUE,"151"],[Ot.Msg.COLOUR_RGB_PURPLE,"152"],[Ot.Msg.COLOUR_RGB_WHITE,"153"]]),"end"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},$R={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.LISTS_SET_INDEX_SET+Ot.Msg.MIXLY_SYSTEM+Ot.Msg.MIXLY_CMD).appendField(new Ot.FieldDropdown([[Ot.Msg.MILXY_ENTER_WAKE_UP,"1"],[Ot.Msg.MIXLY_INCREASE_VOLUME,"202"],[Ot.Msg.MIXLY_REDUCE_VOLUME,"203"],[Ot.Msg.MIXLY_MAX_VOLUME,"204"],[Ot.Msg.MIXLY_MINIMUM,"205"],[Ot.Msg.MIXLY_OPEN_RESPONSE,"206"],[Ot.Msg.MIXLY_CLOSE_RESPONSE,"207"],[Ot.Msg.MIXLY_QUIT_WAKE_UP,"208"]]),"cmd"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ZR={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[Ot.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[Ot.Msg.MIXLY_ESP32_MAX30102_IR+","+Ot.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},tc={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[Ot.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[Ot.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ec={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308ALS"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},ic={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.HTML_COLOUR+Ot.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GET+Ot.Msg.HTML_COLOUR,"[2]"],[Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_IR_STRENGTH,"[1]"],[Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},nc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.HTML_COLOUR+Ot.Msg.MSG.catSensor+" UCS12071").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GET+"RGB"+Ot.Msg.HTML_COLOUR,"0"],[Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_RGB_RAW,"1"],[Ot.Msg.MIXLY_GET_ENV_LIGHT+Ot.Msg.MIXLY_BRIGHTNESS,"2"],[Ot.Msg.GET_IR_STRENGTH+Ot.Msg.MIXLY_BRIGHTNESS,"3"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},sc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GET_ENV_LIGHT,"E"],[Ot.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},_c={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},oc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Ot.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},pc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Ot.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},ac={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_Altitude+Ot.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETPRESSURE,"pressure()"],[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Ot.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},uc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_Altitude+Ot.Msg.MSG.catSensor+" SPL06_001").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETPRESSURE,"pressure()"],[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Ot.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},rc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_Altitude+Ot.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETPRESSURE,"pressure()"],[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Ot.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},lc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_Altitude+Ot.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_REF_TO_PRESSURE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_CAL_TO_ALTITUDE),this.setOutput(!0,Number),this.setInputsInline(!0)}},dc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MIXGOPE_FIELD+Ot.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[Ot.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ic={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_shake,"shake"],[Ot.Msg.MIXLY_UP,"up"],[Ot.Msg.MIXLY_DOWN,"down"],[Ot.Msg.MIXLY_LEFT,"left"],[Ot.Msg.MIXLY_RIGHT,"right"],[Ot.Msg.MIXLY_MICROBIT_face_up,"face up"],[Ot.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=Ot.Msg.MIXLY_MICROBIT_JS_CURRENT,n=Ot.Msg.MSG.catSensor,s=Ot.Msg.MIXLY_MICROBIT_JS_STATE,_=Ot.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:Ot.Msg.MIXLY_MICROBIT_shake,up:Ot.Msg.MIXLY_UP,down:Ot.Msg.MIXLY_DOWN,left:Ot.Msg.MIXLY_LEFT,right:Ot.Msg.MIXLY_RIGHT,"face up":Ot.Msg.MIXLY_MICROBIT_face_up,"face down":Ot.Msg.MIXLY_MICROBIT_face_down}[e]+_}))}},Tc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Ot.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Ot.Msg.MIXLY_MICROBIT_Direction,s=Ot.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Ot.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Mc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_JS_GET+Ot.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new Ot.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Ot.Msg.MIXLY_MICROBIT_Direction,s=Ot.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":Ot.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},hc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Ot.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Ot.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Ot.Msg.MIXLY_MICROBIT_Direction,s=Ot.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":Ot.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},mc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},Ec={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_GETTEMPERATUE)}},Oc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return Ot.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:Ot.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},Rc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},cc={init:function(){this.setColour(NR),this.appendValueInput("SPISUB").appendField(Ot.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SETUP+Ot.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Ot.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},gc={init:function(){this.setColour(NR),this.appendDummyInput().appendField("RFID"+Ot.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Ot.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[Ot.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Cc={init:function(){this.setColour(NR),this.appendDummyInput().appendField("RFID"+Ot.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},Sc={init:function(){this.setColour(NR),this.appendDummyInput().appendField("RFID"+Ot.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Ot.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},Ac={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Ot.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Ot.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Lc={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Ot.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Ot.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(Ot.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},Nc={init:function(){this.setColour(NR),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_RFID_SCAN_OK,"0"],[Ot.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[Ot.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Dc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Ot.FieldDropdown([["全部(元组)","data()[0]"],["全部(json)","data()[1]"],["全部(json,附带位置信息)","data()[2]"],["编号","data()[0][0]"],["电量","data()[0][1]"],["风速","data()[0][2]"],["阵风","data()[0][3]"],["风向","data()[0][4]"],["雨量","data()[0][5]"],["温度","data()[0][6]"],["湿度","data()[0][7]"],["光照","data()[0][8]"],["紫外线","data()[0][9]"],["大气压","data()[0][10]"],["信号强度","data()[0][11]"],["信噪比","data()[0][12]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip("返回气象数据元组 data= (设备id,电池状态,风速m/s,阵风m/s,风向°,雨量mm,温度℃,湿度%,光照Lux,UVI,大气压Pa,信号强度dB,信噪比dB)")}},fc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Fc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendValueInput("BASE").appendField("以主题"),this.appendDummyInput("").appendField("串口发送至MixIO"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Pc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Ot.icons.MutatorIcon(["weather_set_label_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("weather_set_label_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n>6),i.push(128|63&_)):(2048<=_&&_<=55295||57344<=_&&_<=65535)&&(n+=3,i.push(224|15&_>>12),i.push(128|63&_>>6),i.push(128|63&_))}for(s=0;s>8,255&n].concat(i)}(t,!0),i="",n=0;n=0?"0x700000":["mixgo_sant"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==o?(e.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+_+", font_address="+p+")\n"):"16x8 Matrix"==o&&(e.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+_+")\n"),i},sP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},_P=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},oP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},pP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},aP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},uP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},rP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},lP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},dP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},IP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},TP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},MP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},hP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},mP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_"+t.getFieldValue("OP")+"("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"B",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},EP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},OP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},RP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},cP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},gP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"width",e.ORDER_ATOMIC),o=e.valueToCode(this,"height",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP");switch(p){case"True":return i+".show_fill_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n";case"False":return i+".show_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n"}},CP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+_+", 1)\n"},SP=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},AP=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},LP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},NP=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},DP=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"r",e.ORDER_ATOMIC),o="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(o){case"True":return i+".show_fill_circle("+n+", "+s+", "+_+", "+p+")\n";case"False":return i+".show_circle("+n+", "+s+", "+_+", "+p+")\n"}},fP=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),_=e.valueToCode(this,"x1",e.ORDER_ATOMIC),o=e.valueToCode(this,"y1",e.ORDER_ATOMIC),p=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",r=this.getFieldValue("OP");switch(u){case"True":return i+".show_fill_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n"}},FP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+","+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+","+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},PP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},vP=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),_=this.getFieldValue("key");return"TM1650"==_?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+_+"("+s+")\n"):"TM1637"==_&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+_+"("+s+")\n"),i},YP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},XP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},yP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".showDP("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},xP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},bP=function(t,e){e.definitions_.import_st7789="import st7789";var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_sant"].indexOf(i)>=0?"0xE00000":"0x3A0000";var s=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),_=e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC),o=e.valueToCode(this,"PINCS",e.ORDER_ATOMIC),p=e.valueToCode(this,"PINDC",e.ORDER_ATOMIC);return s+" = st7789.ST7789("+_+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+", dc_pin="+p+", cs_pin="+o+", rotation="+this.getFieldValue("rotate")+", font_address="+n+")\n"},VP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".image("+n+", x="+s+", y="+_+", size="+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".image("+n+", x= "+s+",y="+_+", size="+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},BP=function(t,e){var i="0x"+this.getFieldValue("COLOR").slice(1);return["0x"+((16252928&i)>>8|(64512&i)>>5|(255&i)>>3).toString(16),e.ORDER_ATOMIC]},GP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==a.slice(0,2))var r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color="+a+")\n";else{const t=a.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},UP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p=i+".frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},wP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},kP=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},HP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"x1",e.ORDER_ATOMIC),s=e.valueToCode(this,"y1",e.ORDER_ATOMIC),_=e.valueToCode(this,"x2",e.ORDER_ATOMIC),o=e.valueToCode(this,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".line("+n+", "+s+", "+_+", "+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".line("+n+", "+s+", "+_+", "+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},WP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=this.getFieldValue("key"),_=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return e.definitions_.import_i2clcd="import i2clcd",i+" = i2clcd.LCD("+n+", lcd_width="+s+", i2c_addr="+_+")\n"},KP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+",center = "+this.getFieldValue("center")+")\n"},JP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".print("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},qP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},zP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},QP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC),_=this.getFieldValue("driver"),o=Rt.Boards.getSelectedBoardKey().split(":")[2],p="";return p=["mpython","mixgo_pe","mixgo_nova"].indexOf(o)>=0?"0x700000":["mixgo_sant"].indexOf(o)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+", address="+s+", font_address="+p+", types="+_+")\n"},jP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},$P=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+")\n"},ZP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},tv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},ev=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},iv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},nv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},sv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},_v=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},ov=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},pv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},av=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},uv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=t.getFieldValue("state");return i+"."+t.getFieldValue("shape")+"("+n+", "+s+", "+_+", "+o+", "+p+")\n"+i+".show()\n"},rv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=t.getFieldValue("state");return i+"."+("0"==t.getFieldValue("dir_h_v")?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\n"+i+".show()\n"},lv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".line("+e.valueToCode(t,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y2",e.ORDER_ATOMIC)+", "+t.getFieldValue("state")+")\n"+i+".show()\n"},dv=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("Python ESP32-S3"===Rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var s="onboard_tft.image("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff,sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n"}else if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled";s="oled.print("+n+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.shows("+n+")\n"}return s},Iv=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),_=this.getFieldValue("center");if("mixgo_sant"==i||"mixgo_nova"==i)return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+", space="+s+", center="+_+",sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n";if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled"}return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+", space="+s+", center="+_+")\n"},Tv=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var s="onboard_oled.frame("+n+")\n"}else if("Python ESP32-S3"===Rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";s="onboard_tft.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.frame("+n+")\n"}return s},Mv=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var _="onboard_oled.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", delay="+s+")\n"}else if("Python ESP32-S3"===Rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";_="onboard_tft.frame("+n+", size=5 , delay="+s+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";_="onboard_matrix.frame("+n+", delay="+s+")\n"}return _},hv=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else if("Python ESP32-S3"===Rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";n="onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},mv=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var o="onboard_oled.scroll("+n+", speed="+s+", space="+_+")\n"}else if("Python ESP32-S3"===Rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";o="onboard_tft.scroll("+n+", y=0, size=5, speed="+s+", space="+_+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";o="onboard_matrix.scroll("+n+", speed="+s+", space="+_+")\n"}return o},Ev=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},Ov=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},Rv=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Rt.JSFuncs.getPlatform()){const i=t.getFieldValue("image").split(".");if(2!==i.length)throw Error("pin value error");e.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`;var n=i[1]}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix."+t.getFieldValue("image")}return[n,e.ORDER_ATOMIC]},cv=function(t,e){var i={"#000000":"0","#ff0000":"1"};function n(t){let e="";if(t.length%2==1&&(t="0"+t),t.length<8){let e=8-t.length;for(let i=1;i<=e;i++)t="0"+t}for(let i=1;i<=t.length;i++)i%2==0&&i!==t.length?e=e+t[i-1]+",0x":e+=t[i-1];return"0x"+e}let s=[];for(let e=0;e<12;e++){let _="",o=0,p=0;for(let n=0;n<32;n++)n<8?p=7-n:n<16?p=23-n:n<24?p=39-n:n<32&&(p=55-n),o+=Number(i[t.getFieldValue(e+"-"+n)])*Math.pow(2,31-p);_+=n(o.toString(16)),s.unshift(_)}let _=[];for(let t=0;t>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},_Y=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.picture("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"direct",e.ORDER_ASSIGNMENT)+")\n"},oY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=this.getFieldValue("center"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True",r=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==r.slice(0,2))var l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color="+r+",sync="+u+")\n";else{const t=r.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color=0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+",sync="+u+")\n"}return l},pY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},aY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=t.getFieldValue("shape"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+",sync="+u+")\n";else{const t=p.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+",sync="+u+")\n"}return r},uY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("dir_h_v"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},rY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x1",e.ORDER_ATOMIC),s=e.valueToCode(t,"y1",e.ORDER_ATOMIC),_=e.valueToCode(t,"x2",e.ORDER_ATOMIC),o=e.valueToCode(t,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},lY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},dY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),o=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var p="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+",sync="+o+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+",sync="+o+")\n"}return p},IY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==n.slice(0,2))var _="onboard_tft.fill("+n+",sync="+s+")\n";else{const t=n.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_="onboard_tft.fill(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+",sync="+s+")\n"}return _},TY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=o+"=Clock("+n+", "+s+", "+_+", "+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=o+"=Clock("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},MY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},hY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_time("+e.valueToCode(this,"h",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"m",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"s",e.ORDER_ASSIGNMENT)+")\n"},mY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},EY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2))var _=n+".clear("+s+")\n";else{const t=s.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_=n+".clear(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+")\n"}return _},OY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"r",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("shape"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+", "+p+",sync="+a+")\n"}return u},RY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n="onboard_tft.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}return n},cY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2));else{const t=s.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)}return"onboard_tft.pointern(angle="+n+")\n"},gY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color="+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},CY=dv,SY=Fv,AY=Nv,LY=Fv,NY=Pv,DY=Cv,fY=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},FY=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},PY=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},FB=function(){return"control.reset()\n"},PB=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+")\n"},vB=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+")\n"},YB=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},XB=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},yB=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},xB=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},bB=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},VB=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},BB=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},GB=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},UB=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},wB=function(){return"while True:\n pass\n"},kB=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},HB=function(t,e){return e.definitions_.import_os="import os","os.uname()"},WB=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},KB=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},JB=function(t,e){return e.definitions_.import_mixgo="import mixgo",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period="+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=Timer."+(e.valueToCode(this,"mode",e.ORDER_NONE)||"None")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},qB=function(t,e){return e.definitions_.import_machine="import machine",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period = "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=machine.Timer."+this.getFieldValue("mode")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},zB=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},QB=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},jB=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},$B=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},ZB=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},tG=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},eG=QB,iG=qB,nG=zB,sG=WB,_G=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},oG=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},pG=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api.weather_hourly("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"hour",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},aG=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")\n"},uG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_now.analysis()";else n='Weather_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},rG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Air_now.analysis()";else n='Air_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},lG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_alarm.analysis()";else n='Weather_alarm.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},dG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Life_suggestion.analysis()";else n='Life_suggestion.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},IG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Tide_daily.analysis()";else n='Tide_daily.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},TG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Location_search.analysis()";else n='Location_search.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},MG=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")\n"},hG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Weather_daily.analysis("+n+")";else s="Weather_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},mG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Air_daily.analysis("+n+")";else s="Air_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},EG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_sun.analysis("+n+")";else s="Geo_sun.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},OG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_moon.analysis("+n+")";else s="Geo_moon.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},RG=new Ot.Generator("Python");RG.INDENT=" ",RG.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),RG.ORDER_ATOMIC=0,RG.ORDER_COLLECTION=1,RG.ORDER_STRING_CONVERSION=1,RG.ORDER_UNARY_POSTFIX=1,RG.ORDER_UNARY_PREFIX=2,RG.ORDER_MEMBER=2.1,RG.ORDER_FUNCTION_CALL=2.2,RG.ORDER_EXPONENTIATION=3,RG.ORDER_UNARY_SIGN=4,RG.ORDER_BITWISE_NOT=4,RG.ORDER_MULTIPLICATIVE=5,RG.ORDER_ADDITIVE=6,RG.ORDER_BITWISE_SHIFT=7,RG.ORDER_BITWISE_AND=8,RG.ORDER_BITWISE_XOR=9,RG.ORDER_BITWISE_OR=10,RG.ORDER_RELATIONAL=11,RG.ORDER_EQUALITY=11,RG.ORDER_LOGICAL_NOT=12,RG.ORDER_LOGICAL_AND=13,RG.ORDER_LOGICAL_OR=14,RG.ORDER_ASSIGNMENT=14,RG.ORDER_CONDITIONAL=15,RG.ORDER_LAMBDA=16,RG.ORDER_NONE=99,RG.ORDER_OVERRIDES=[[RG.ORDER_FUNCTION_CALL,RG.ORDER_MEMBER],[RG.ORDER_FUNCTION_CALL,RG.ORDER_FUNCTION_CALL],[RG.ORDER_MEMBER,RG.ORDER_MEMBER],[RG.ORDER_MEMBER,RG.ORDER_FUNCTION_CALL]],RG.init=function(){RG.PASS=this.INDENT+"pass\n",RG.definitions_=Object.create(null),RG.functionNames_=Object.create(null),RG.setups_=Object.create(null),RG.loops_=Object.create(null),RG.codeEnd_=Object.create(null),RG.variableDB_?RG.variableDB_.reset():RG.variableDB_=new St(RG.RESERVED_WORDS_)},RG.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var _=this.definitions_[s];0===s.indexOf("import")?e.push(_):0===s.indexOf("var_declare")?i.push(_):n.push(_)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var o=[];for(var s in RG.functions_)o.push(RG.functions_[s]);o.length&&o.push("\n");var p=[];for(var s in RG.setups_)p.push(RG.setups_[s]);p.length&&p.push("\n");var a=[];for(var s in RG.loops_)a.push(RG.loops_[s]);var u=[];for(var s in RG.codeEnd_)u.push(RG.codeEnd_[s]);0!==u.length&&u.push("\n");let r="";return r=a.length>0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n"),r},RG.scrubNakedValue=function(t){return t+"\n"},RG.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},RG.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},RG.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=Ot.utils.string.wrap(_,RG.COMMENT_WRAP-3),n+=RG.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const cG={};cG.mpython={description:"MicroPython[EDUCORE Edu Core]",digital_pin:Rt.Profile.generate(["0-10","18"]),input_pin:Rt.Profile.generate(["0-10","18"]),output_pin:Rt.Profile.generate(["0-10","18"]),pwm_input:Rt.Profile.generate(["0-10","18"],"pwm","pwm"),analog_input:Rt.Profile.generate(["0-4"],"adc","adc"),pwm_output:Rt.Profile.generate(["0-10","18"],"pwm","pwm"),analog_output:Rt.Profile.generate(["0-4"],"adc","adc"),espnow_channel:Rt.Profile.generate(["1-13"]),haskylens_model:Rt.Profile.generate(["0-4"]),digital:Rt.Profile.generate(["0-10","18"],"pin","pin"),pwm_pin:Rt.Profile.generate(["0-10","18"]),pwm:Rt.Profile.generate(["0-10","18"],"pwm","pwm"),analog_pin:Rt.Profile.generate(["0-4"]),analog:Rt.Profile.generate(["0-4"],"adc","adc"),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Rt.Profile.generate(["0-4"]),exlcdh:Rt.Profile.generate(["0-11"]),exlcdv:Rt.Profile.generate(["0-7"]),brightness:Rt.Profile.generate(["0-9"]),tts_voice:Rt.Profile.generate(["0-16"]),tts_builtin_music:Rt.Profile.generate(["0-47"]),tts_bgmusic:Rt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["ANGRY","onboard_matrix.ANGRY"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["DOOR_OPEN","onboard_matrix.DOOR_OPEN"],["DOOR_OPENING","onboard_matrix.DOOR_OPENING"],["DOOR_CLOSE","onboard_matrix.DOOR_CLOSE"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["BIRTHDAY","onboard_music.BIRTHDAY"],["BA_DING","onboard_music.BA_DING"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},cG["ESP32C2 Generic(2M)"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:Rt.Profile.generate(["0-11","18-21"]),input_pin:Rt.Profile.generate(["0-11","18-21"]),output_pin:Rt.Profile.generate(["0-11","18-21"]),pwm_input:Rt.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_input:Rt.Profile.generate(["0-5"],"adc","adc"),pwm_output:Rt.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_output:Rt.Profile.generate(["0-5"],"adc","adc"),espnow_channel:Rt.Profile.generate(["1-13"]),haskylens_model:Rt.Profile.generate(["0-4"]),digital:Rt.Profile.generate(["0-11","18-21"],"pin","pin"),pwm_pin:Rt.Profile.generate(["0-11","18-21"]),pwm:Rt.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_pin:Rt.Profile.generate(["0-5"]),analog:Rt.Profile.generate(["0-5"],"adc","adc"),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Rt.Profile.generate(["0-4"]),exlcdh:Rt.Profile.generate(["0-31"]),exlcdv:Rt.Profile.generate(["0-11"]),brightness:Rt.Profile.generate(["0-9"]),tts_voice:Rt.Profile.generate(["0-16"]),tts_builtin_music:Rt.Profile.generate(["0-47"]),tts_bgmusic:Rt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]};const gG=cG,CG=20,SG={init:function(){this.setColour(CG),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_HIGH,"HIGH"],[Ot.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},AG={init:function(){this.setColour(CG),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(Ot.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},LG={init:function(){this.setColour(CG),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Ot.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},NG={init:function(){this.setColour(CG),this.appendValueInput("PIN",Number).appendField("DAC"+Ot.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Ot.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_TOOLTIP)}},DG={init:function(){this.setColour(CG),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_JS_PERIOD_MIL).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_mSecond,"period"],[Ot.Msg.MIXLY_uSecond,"period_microseconds"]]),"key"),this.appendValueInput("NUM",Number).appendField(Ot.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_SET_TOOLTIP)}},fG={init:function(){this.setColour(CG),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_REF_VOLTAGE+Ot.Msg.MIXLY_STAT).appendField(new Ot.FieldDropdown([["3.3V","machine.ADC.ATTN_11DB"],["2.2V","machine.ADC.ATTN_6DB"],["1.5V","machine.ADC.ATTN_2_5DB"],["1.2V","machine.ADC.ATTN_0DB"]]),"atten"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_ANALOG_ATTEN_TOOLTIP)}},FG={init:function(){this.setColour(CG),this.appendValueInput("pin").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Ot.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_TOOLTIP)}},PG={init:function(){this.setColour(20),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_ATTACHINTERRUPT_PIN).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Ot.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Ot.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},vG={init:function(){this.setColour(20),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETUP).appendField(new Ot.FieldTextInput("pin#"),"PIN_OBJ"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROPYTHON_AS).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_Digital_PINMODEOUT,"machine.Pin.OUT"],[Ot.Msg.MIXLY_Digital_PINMODEIN,"machine.Pin.IN"],[Ot.Msg.MIXLY_PINMODEPULLUP,"machine.Pin.IN, machine.Pin.PULL_UP"],[Ot.Msg.MIXLY_PINMODEPULLDOWN,"machine.Pin.IN, machine.Pin.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)},getVars:function(){return["pin#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},YG={init:function(){this.setColour(CG),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SETUP).appendField(new Ot.FieldTextInput("dac#"),"PIN_OBJ").appendField(Ot.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("DAC"+Ot.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_INIT_TOOLTIP)},getVars:function(){return["dac#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},XG={init:function(){this.setColour(CG),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SETUP).appendField(new Ot.FieldTextInput("tc#"),"PIN_OBJ").appendField(Ot.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_INIT_TOOLTIP)},getVars:function(){return["tc#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},yG={init:function(){this.setColour(CG),this.appendValueInput("PIN",Number).appendField("PWM"+Ot.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Ot.Msg.MIXLY_FREQUENCY+Ot.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_SET_FREQ_TOOLTIP)}},xG=vG,bG=XG,VG=FG,BG=PG,GG=40,UG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput("").appendField(t).appendField(Ot.Msg.MIXLY_TEM_HUM+" AHT21").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Ot.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key");return{temperature:Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[t]}))}},wG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput("").appendField(t).appendField(Ot.Msg.MIXLY_Altitude+Ot.Msg.MSG.catSensor+" HP203X").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETPRESSURE,"pressure()"],[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Ot.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},kG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput().appendField(t).appendField(Ot.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM),this.setOutput(!0,Number),this.setInputsInline(!0)}},HG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput().appendField(t).appendField("RFID"+Ot.Msg.MIXLY_RFID_READ_CARD),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},WG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput().appendField(t).appendField("RFID"+Ot.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SECTOR").appendField(Ot.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,Number),this.setInputsInline(!0)}},KG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput().appendField(t).appendField(Ot.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Ot.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Ot.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},JG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput().appendField(t).appendField(Ot.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Ot.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Ot.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(Ot.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0)}},qG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput().appendField(t).appendField("RFID"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_RFID_SCAN_OK,"True"],[Ot.Msg.MIXLY_RFID_SCAN_NOTAGERR,"None"],[Ot.Msg.MIXLY_RFID_SCAN_ERROR,"False"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},zG=100,QG={init:function(){this.setColour(zG),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXGO_LEFT_FRONT+Ot.Msg.COLOUR_RGB_GREEN+Ot.Msg.MIXLY_EXTERN_LED,"GLED[0]"],[Ot.Msg.MIXGO_RIGHT_FRONT+Ot.Msg.COLOUR_RGB_GREEN+Ot.Msg.MIXLY_EXTERN_LED,"GLED[1]"],[Ot.Msg.MIXGO_LEFT_BACK+Ot.Msg.COLOUR_RGB_GREEN+Ot.Msg.MIXLY_EXTERN_LED,"GLED[3]"],[Ot.Msg.MIXGO_RIGHT_BACK+Ot.Msg.COLOUR_RGB_GREEN+Ot.Msg.MIXLY_EXTERN_LED,"GLED[2]"],[Ot.Msg.MIXGO_LEFT_FRONT+Ot.Msg.COLOUR_RGB_RED+Ot.Msg.MIXLY_EXTERN_LED,"RLED[0]"],[Ot.Msg.MIXGO_RIGHT_FRONT+Ot.Msg.COLOUR_RGB_RED+Ot.Msg.MIXLY_EXTERN_LED,"RLED[1]"],[Ot.Msg.MIXGO_LEFT_BACK+Ot.Msg.COLOUR_RGB_RED+Ot.Msg.MIXLY_EXTERN_LED,"RLED[3]"],[Ot.Msg.MIXGO_RIGHT_BACK+Ot.Msg.COLOUR_RGB_RED+Ot.Msg.MIXLY_EXTERN_LED,"RLED[2]"],[Ot.Msg.ME_GO_LIGHT_HEADLIGHT,"WLED"]]),"op"),this.setOutput(!0)}},jG={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField("ME GO"),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_SETONOFF)}},$G={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField("ME GO"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},ZG={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField("ME GO"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},tU={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField("ME GO"),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_SETTING+Ot.Msg.MIXLY_BUILDIN_LED+Ot.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},eU={init:function(){this.setColour(zG),this.appendDummyInput().appendField("ME GO").appendField(new Ot.FieldDropdown([[Ot.Msg.blockpy_forward,"F"],[Ot.Msg.blockpy_backward,"B"],[Ot.Msg.blockpy_left,"L"],[Ot.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},iU={init:function(){this.setColour(zG),this.appendDummyInput().appendField("ME GO").appendField(new Ot.FieldDropdown([[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},nU={init:function(){this.setColour(zG),this.appendDummyInput().appendField("ME GO").appendField(Ot.Msg.MOTOR_DC).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLYCAR_WHEEL_LEFT,"0"],[Ot.Msg.MIXLYCAR_WHEEL_RIGHT,"1"],[Ot.Msg.ME_GO_MOTOR_EXTERN,"2"]]),"wheel"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Direction).appendField(new Ot.FieldDropdown([[Ot.Msg.ROTATION_FORWARD,"CW"],[Ot.Msg.ROTATION_BACKWARD,"CCW"],[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},sU={init:function(){this.setColour(zG),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_INTERRUPT).appendField(Ot.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"A"],[Ot.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendValueInput("DO").appendField(Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},_U={init:function(){this.setColour(zG),this.appendDummyInput("").appendField(Ot.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"A"],[Ot.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SETUP),this.appendDummyInput("").appendField(new Ot.FieldDropdown([["turns","turns"],["distance","distance"],["turns,distance","all"]]),"args"),this.appendValueInput("num").setCheck(Number),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},oU={init:function(){this.setColour(zG),this.appendDummyInput("").appendField(Ot.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"A"],[Ot.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("").appendField(new Ot.FieldDropdown([["turns","turns"],["distance","distance"],["speed","speed"]]),"args"),this.setOutput(!0),this.setInputsInline(!0)}},pU={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"[0]"],[Ot.Msg.MIXGO_LEFT_MID,"[1]"],[Ot.Msg.MIXGO_RIGHT_MID,"[2]"],[Ot.Msg.TEXT_TRIM_RIGHT,"[3]"],[Ot.Msg.MIXLY_ALL,""]]),"key").appendField(Ot.Msg.MIXGO_LINE_SENSOR_VAL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Ot.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Ot.Msg.MIXLY_ESP32_NEAR}))}},aU={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXGO_LEFT_FRONT,"[0]"],[Ot.Msg.MIXGO_RIGHT_FRONT,"[1]"],[Ot.Msg.MIXGO_LEFT_BACK,"[3]"],[Ot.Msg.MIXGO_RIGHT_BACK,"[2]"],[Ot.Msg.MIXLY_ALL,""]]),"key").appendField(Ot.Msg.MIXGO_PROXIMITY_SENSOR),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Ot.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Ot.Msg.MIXLY_ESP32_NEAR}))}},uU={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXGO_CAR_SENSOR_ONBOARD_CHANGE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_ME_GO_CAR_SENSOR_ONBOARD_AUTO_CHANGE,"AS"],[Ot.Msg.MIXLY_MIXGO_CAR_USE_LINE_ONLY,"LP"],[Ot.Msg.MIXLY_MIXGO_CAR_USE_PROXIMITY_ONLY,"OA"],[Ot.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_ONLY,"LS"],[Ot.Msg.ME_GO_SENSOR_MODE_OFF,"CL"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},rU={init:function(){this.setColour(zG),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GET_GESTURE).appendField(new Ot.FieldDropdown([[Ot.Msg.ME_GO_PITCH,"[0]"],[Ot.Msg.ME_GO_ROLL,"[1]"],[Ot.Msg.ME_GO_PITCH+", "+Ot.Msg.ME_GO_ROLL,""]]),"angle"),this.appendDummyInput(""),this.setOutput(!0,Number),this.setInputsInline(!0)}},lU={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"[0]"],[Ot.Msg.MIXGO_LEFT_MID,"[1]"],[Ot.Msg.MIXGO_RIGHT_MID,"[2]"],[Ot.Msg.TEXT_TRIM_RIGHT,"[3]"],[Ot.Msg.MIXLY_ALL,""]]),"key").appendField(Ot.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_SENSOR),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Ot.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Ot.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_SENSOR}))}},dU=230,IU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.digital),"PIN"),this.setOutput(!0)}},TU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},MU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},hU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},mU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},EU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},OU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},RU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},cU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},gU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},CU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},SU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},AU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},LU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},NU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},DU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},fU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.analog),"PIN"),this.setOutput(!0)}},FU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},PU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.dac),"PIN"),this.setOutput(!0)}},vU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},YU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},XU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},yU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},xU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},bU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},VU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.touch),"PIN"),this.setOutput(!0)}},BU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},GU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},UU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},wU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},kU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},HU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},WU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},KU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},JU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},qU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},zU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},QU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},jU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},$U={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},ZU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},tw={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},ew={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},iw={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},nw=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},sw=function(t,e){e.definitions_.import_machine="import machine";var i="";return i+=e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value("+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},_w=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},ow=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".write("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},pw=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=e.valueToCode(this,"NUM",e.ORDER_ATOMIC);return i+".set_analog_"+this.getFieldValue("key")+"("+n+")\n"},aw=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},uw=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=this.getFieldValue("mode");return"machine.Pin("+i+").irq(handler = "+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+", trigger = "+n+")\n"},rw=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"pin#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),s=this.getFieldValue("MODE");return("pin#"==i?"pin"+n:e.variableDB_.getName(i,Ot.Variables.NAME_TYPE))+" = machine.Pin("+n+", "+s+")\n"},lw=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"dac#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("dac#"==i?"dac"+n:e.variableDB_.getName(i,Ot.Variables.NAME_TYPE))+" = machine.DAC(machine.Pin("+n+"))\n"},dw=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},Iw=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"tc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("tc#"==i?"tc"+n:e.variableDB_.getName(i,Ot.Variables.NAME_TYPE))+" = machine.TouchPad(machine.Pin("+n+"))\n"},Tw=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mini_g2="import mini_g2",["mini_g2.ext_ahtx0."+i+"()",e.ORDER_ATOMIC]},Mw=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mini_g2="import mini_g2",["mini_g2.ext_hp203x."+i,e.ORDER_ATOMIC]},hw=function(t,e){e.definitions_.import_mini_g2="import mini_g2";return["mini_g2.varistor()",e.ORDER_ATOMIC]},mw=function(t,e){if(e.definitions_.import_mini_g2="import mini_g2","mixgo_mini"==Rt.Boards.getSelectedBoardKey().split(":")[2]){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var i='ext_rfid.read_card(0, x="id")'}else{e.definitions_.import_mini_g2="import mini_g2";i='mini_g2.ext_rc522.read_card(0, x="id")'}return[i,e.ORDER_ATOMIC]},Ew=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC);if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var s="ext_rfid.read_card("+n+")"}else{e.definitions_.import_mini_g2="import mini_g2";s="mini_g2.ext_rc522.read_card("+n+")"}return[s,e.ORDER_ATOMIC]},Ow=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),s=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC);if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var _="ext_rfid.write_card("+s+","+n+")\n"}else{e.definitions_.import_mini_g2="import mini_g2";_="mini_g2.ext_rc522.write_card("+s+","+n+")\n"}return _},Rw=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),s=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC);if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var _="ext_rfid.write_card("+s+","+n+")"}else{e.definitions_.import_mini_g2="import mini_g2";_="mini_g2.ext_rc522.write_card("+s+","+n+")"}return[_,e.ORDER_ATOMIC]},cw=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("key");if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var s="ext_rfid.scan_card()=="+n}else{e.definitions_.import_mini_g2="import mini_g2";s="mini_g2.ext_rc522.scan_card()=="+n}return[s,e.ORDER_ATOMIC]},gw=function(t,e){return e.definitions_.import_me_go_car="from me_go import car",["car."+this.getFieldValue("op"),e.ORDER_ATOMIC]},Cw=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car","car.setonoff("+i+","+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},Sw=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car",["car.getrightness("+i+")",e.ORDER_ATOMIC]},Aw=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car",["car.getonoff("+i+")",e.ORDER_ATOMIC]},Lw=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car","car.setbrightness("+i+","+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},Nw=function(t,e){var i=this.getFieldValue("VAR");return e.definitions_.import_me_go_car="from me_go import car",'car.move("'+i+'",'+e.valueToCode(this,"speed",e.ORDER_ASSIGNMENT)+")\n"},Dw=function(t,e){var i=this.getFieldValue("VAR");return e.definitions_.import_me_go_car="from me_go import car",'car.move("'+i+'")\n'},fw=function(t,e){var i=this.getFieldValue("wheel");e.definitions_.import_me_go_car="from me_go import car";var n=this.getFieldValue("direction");return 0==i&&("CW"==n?n="CCW":"CCW"==n&&(n="CW")),"car.motor(car.MOTO["+i+'],"'+n+'",'+e.valueToCode(this,"speed",e.ORDER_ATOMIC)+")\n"},Fw=function(t,e){var i=this.getFieldValue("mode");return e.definitions_["import_me_go_hall_"+i]="from me_go import hall_"+i,"hall_"+i+".irq_cb("+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+")\n"},Pw=function(t,e){var i=this.getFieldValue("mode"),n=this.getFieldValue("args");e.definitions_["import_me_go_hall_"+i]="from me_go import hall_"+i;var s=e.valueToCode(this,"num",e.ORDER_ATOMIC);return"all"==n?"hall_"+i+".initial(turns="+s+",distance="+s+")\n":"hall_"+i+".initial("+n+"="+s+")\n"},vw=function(t,e){var i=this.getFieldValue("mode"),n=this.getFieldValue("args");return e.definitions_["import_me_go_hall_"+i]="from me_go import hall_"+i,["hall_"+i+"."+n,e.ORDER_ATOMIC]},Yw=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car",["car.patrol()"+i,e.ORDER_ATOMIC]},Xw=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car",["car.obstacle()"+i,e.ORDER_ATOMIC]},yw=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car","car.ir_mode(car."+i+")\n"},xw=function(t,e){return e.definitions_.import_mixgo_me_onboard_mxc6655xa="from mixgo_me import onboard_mxc6655xa",["onboard_mxc6655xa.eulerangles(upright=True)"+this.getFieldValue("angle"),e.ORDER_ATOMIC]},bw=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car",["car.light()"+i,e.ORDER_ATOMIC]},Vw=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},Bw=Vw,Gw=Vw,Uw=Vw,ww=Vw,kw=Vw,Hw=Vw,Ww=Vw,Kw=Vw,Jw=Vw,qw=Vw,zw=Vw,Qw=Vw,jw=Vw,$w=Vw,Zw=Vw,tk=Vw,ek=Vw,ik=Vw,nk=Vw,sk=Vw,_k=Vw,ok=Vw,pk=Vw,ak=Vw,uk=Vw,rk=Vw,lk=Vw,dk=Vw,Ik=Vw,Tk=Vw,Mk=Vw,hk=Vw,mk=Vw,Ek=Vw,Ok=Vw,Rk=Vw,ck=Vw,gk=Vw,Ck=Vw,Sk=Vw,Ak=Vw,Lk=Vw,Nk=Vw,Dk=Vw;Object.assign(Ot.Variables,gt),Object.assign(Ot.Procedures,Xu),Ot.Python=yu,Ot.generator=yu,Rt.Profile.default={},Object.assign(Rt.Profile,gG),Object.assign(Rt.Profile.default,gG["MixGo CC"]),Object.assign(Ot.Blocks,e,i,n,s,_,o,p,a,u,r,l,d,I,V,H,k,X,B,W,f,w,U,G,F,D,N,x,y,b,P,v,Y,lt,dt,It,Tt),Object.assign(Ot.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,nt,ut,at,Z,st,rt,q,pt,ot,_t,z,J,K,et,tt,it,Q,j,$,Mt,ht,mt,Et)})(); \ No newline at end of file diff --git a/boards/default/micropython_educore/main.bundle.d3e651a4.js b/boards/default/micropython_educore/main.bundle.d3e651a4.js new file mode 100644 index 00000000..fbf0e3c4 --- /dev/null +++ b/boards/default/micropython_educore/main.bundle.d3e651a4.js @@ -0,0 +1,21 @@ +(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>Ft,controls_typeLists:()=>Pt,lists_zip:()=>vt,lists_zip_container:()=>Yt,lists_zip_item:()=>Xt,unpack_iterable_object:()=>yt,variables_change:()=>Dt,variables_get:()=>Lt,variables_global:()=>ft,variables_set:()=>Nt});var i={};t.r(i),t.d(i,{base_setup:()=>Vt,controls_delay:()=>Bt,controls_end_program:()=>Gt,controls_except:()=>Zt,controls_finally:()=>te,controls_flow_statements:()=>Kt,controls_for:()=>Jt,controls_forEach:()=>kt,controls_for_range:()=>qt,controls_if:()=>Ut,controls_if_else:()=>jt,controls_if_elseif:()=>Qt,controls_if_if:()=>zt,controls_lambda:()=>ie,controls_main:()=>bt,controls_pass:()=>ne,controls_range:()=>wt,controls_repeat_ext:()=>ee,controls_thread:()=>se,controls_try:()=>$t,controls_try_finally:()=>Wt,controls_whileUntil:()=>Ht,datetime_fromtimestamp:()=>re,do_while:()=>_e,garbage_collection:()=>oe,gene_unique_identifier:()=>le,get_mem_alloc:()=>pe,get_mem_free:()=>ae,get_unique_identifier:()=>ue});var n={};t.r(n),t.d(n,{base_map:()=>ve,generate_cartesian_product:()=>Xe,math_arithmetic:()=>he,math_bit:()=>Ee,math_constant:()=>Te,math_constant_mp:()=>Me,math_constrain:()=>Ae,math_dec:()=>Re,math_degree_to_radian:()=>xe,math_indexer_number:()=>Ne,math_map:()=>Le,math_max_min:()=>ge,math_number:()=>Ie,math_number_base_conversion:()=>Ce,math_radian_to_degree:()=>ye,math_random:()=>Se,math_random_seed:()=>De,math_round:()=>fe,math_selfcalcu:()=>me,math_to_int:()=>ce,math_trig:()=>Oe,text_to_number:()=>Fe,text_to_number_skulpt:()=>Pe,turn_to_int:()=>Ye});var s={};t.r(s),t.d(s,{ascii_to_char:()=>we,char_to_ascii:()=>ke,number_to_text:()=>He,os_system:()=>Mi,text:()=>Ve,text_capital:()=>Ze,text_center:()=>ti,text_char:()=>Ge,text_char_at:()=>Je,text_char_at2:()=>Ke,text_char_at3:()=>li,text_compareTo:()=>ri,text_compare_to:()=>$e,text_create_with_container:()=>pi,text_create_with_item:()=>ai,text_encode:()=>Ii,text_equals_starts_ends:()=>je,text_eval:()=>Ti,text_find:()=>ei,text_format:()=>oi,text_format_noreturn:()=>di,text_join:()=>Ue,text_join_seq:()=>ii,text_length:()=>We,text_random_char:()=>qe,text_replace:()=>ni,text_split:()=>si,text_strip:()=>_i,text_substring:()=>Qe,text_substring2:()=>ze,text_substring3:()=>ui,text_textarea:()=>Be});var _={};t.r(_),t.d(_,{ENUMERATE:()=>ji,content_in_lists:()=>Zi,enumerate:()=>$i,list_many_input:()=>Vi,list_tolist:()=>wi,list_tolist2:()=>Qi,list_trig:()=>yi,lists_2d_get_col_row_data:()=>Ri,lists_2d_get_data_with_col_row:()=>Oi,lists_append_extend:()=>Li,lists_change_to:()=>bi,lists_change_to_general:()=>Gi,lists_clear:()=>Pi,lists_create_with:()=>ci,lists_create_with2:()=>ki,lists_create_with_container:()=>Ci,lists_create_with_item:()=>Si,lists_create_with_noreturn:()=>Bi,lists_create_with_text:()=>gi,lists_create_with_text2:()=>Hi,lists_del_general:()=>Ui,lists_find:()=>Xi,lists_getIndex3:()=>Wi,lists_getSublist3:()=>Ki,lists_get_index:()=>mi,lists_get_random_item:()=>Ni,lists_get_random_sublist:()=>Di,lists_get_sublist:()=>Ei,lists_insert_value:()=>fi,lists_insert_value2:()=>qi,lists_pop:()=>Yi,lists_remove_at:()=>vi,lists_remove_at2:()=>zi,lists_reverse:()=>Fi,lists_setIndex3:()=>Ji,lists_set_index:()=>Ai,lists_sort:()=>xi});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>hn,dicts_add_or_change:()=>an,dicts_clear:()=>ln,dicts_create_with:()=>en,dicts_create_with_container:()=>nn,dicts_create_with_item:()=>sn,dicts_create_with_noreturn:()=>On,dicts_deldict:()=>Mn,dicts_delete:()=>un,dicts_get:()=>on,dicts_get_default:()=>pn,dicts_items:()=>dn,dicts_keys:()=>_n,dicts_length:()=>Tn,dicts_pop:()=>mn,dicts_setdefault:()=>En,dicts_to_json:()=>cn,dicts_to_json2:()=>Sn,dicts_to_to:()=>Cn,dicts_todict:()=>Rn,dicts_update:()=>rn,dicts_values:()=>In,json_to_dicts:()=>gn});var p={};t.r(p),t.d(p,{logic_boolean:()=>Fn,logic_compare:()=>Ln,logic_compare_continous:()=>Nn,logic_is:()=>Xn,logic_is_in:()=>Yn,logic_negate:()=>fn,logic_null:()=>Pn,logic_operation:()=>Dn,logic_tobool:()=>yn,logic_true_or_false:()=>vn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>ss,sdcard_use_spi_init:()=>ns,storage_can_write_ornot:()=>Hn,storage_change_dir:()=>es,storage_close_file:()=>Kn,storage_delete_file:()=>qn,storage_file_seek:()=>jn,storage_file_tell:()=>Qn,storage_file_write:()=>Gn,storage_fileopen:()=>bn,storage_fileopen_new:()=>Vn,storage_fileopen_new_encoding:()=>Bn,storage_get_a_line:()=>kn,storage_get_contents:()=>wn,storage_get_contents_without_para:()=>Un,storage_get_current_dir:()=>$n,storage_get_file_size:()=>zn,storage_get_filename:()=>Wn,storage_is_file:()=>is,storage_list_all_files:()=>Jn,storage_make_dir:()=>Zn,storage_open_file_with_os:()=>xn,storage_rename:()=>ts});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>us,procedures_callreturn:()=>rs,procedures_defnoreturn:()=>_s,procedures_defreturn:()=>os,procedures_ifreturn:()=>ls,procedures_mutatorarg:()=>as,procedures_mutatorcontainer:()=>ps,procedures_return:()=>ds});var r={};t.r(r),t.d(r,{tuple_change_to:()=>Ss,tuple_create_with:()=>Ts,tuple_create_with_container:()=>Ms,tuple_create_with_item:()=>hs,tuple_create_with_noreturn:()=>Ds,tuple_create_with_text2:()=>ms,tuple_create_with_text_return:()=>Es,tuple_del:()=>cs,tuple_find:()=>As,tuple_getIndex:()=>Os,tuple_getSublist:()=>Ns,tuple_get_random_item:()=>Fs,tuple_get_sublist:()=>fs,tuple_input:()=>vs,tuple_join:()=>gs,tuple_length:()=>Rs,tuple_max:()=>Cs,tuple_totuple:()=>Ps,tuple_trig:()=>Ls});var l={};t.r(l),t.d(l,{set_add_discard:()=>ws,set_clear:()=>Bs,set_create_with:()=>Xs,set_create_with_container:()=>ys,set_create_with_item:()=>xs,set_create_with_text_return:()=>Ws,set_length:()=>bs,set_operate:()=>Gs,set_operate_update:()=>Us,set_pop:()=>Vs,set_sub:()=>ks,set_toset:()=>Ks,set_update:()=>Hs});var d={};t.r(d),t.d(d,{html_content:()=>js,html_content_more:()=>$s,html_document:()=>qs,html_form:()=>t_,html_head_body:()=>Qs,html_style:()=>Zs,html_style_color:()=>i_,html_style_content:()=>e_,html_text:()=>n_,html_title:()=>zs});var I={};t.r(I),t.d(I,{attribute_access:()=>m_,function_call:()=>T_,function_call_container:()=>M_,function_call_item:()=>h_,raw_block:()=>o_,raw_empty:()=>a_,raw_expression:()=>p_,raw_table:()=>__,text_comment:()=>u_,text_print_multiple:()=>l_,text_print_multiple_container:()=>d_,text_print_multiple_item:()=>I_,type_check:()=>r_});var T={};t.r(T),t.d(T,{controls_type:()=>g_,controls_typeLists:()=>C_,lists_zip:()=>S_,unpack_iterable_object:()=>A_,variables_change:()=>R_,variables_get:()=>E_,variables_global:()=>c_,variables_set:()=>O_});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>y_,base_setup:()=>N_,controls_delay:()=>X_,controls_flow_statements:()=>Y_,controls_for:()=>F_,controls_forEach:()=>G_,controls_for_range:()=>P_,controls_if:()=>D_,controls_interrupts:()=>V_,controls_lambda:()=>w_,controls_main:()=>L_,controls_millis:()=>x_,controls_nointerrupts:()=>B_,controls_pass:()=>H_,controls_range:()=>U_,controls_repeat:()=>$_,controls_repeat_ext:()=>J_,controls_thread:()=>W_,controls_try_finally:()=>f_,controls_whileUntil:()=>v_,datetime_fromtimestamp:()=>Z_,do_while:()=>K_,garbage_collection:()=>q_,gene_unique_identifier:()=>to,get_mem_alloc:()=>z_,get_mem_free:()=>Q_,get_unique_identifier:()=>j_,reset:()=>b_,time_sleep:()=>k_});var h={};t.r(h),t.d(h,{base_map:()=>go,generate_cartesian_product:()=>So,math_arithmetic:()=>_o,math_bit:()=>so,math_constant:()=>io,math_constant_mp:()=>no,math_constrain:()=>Mo,math_dec:()=>uo,math_degree_to_radian:()=>Lo,math_indexer_number:()=>Eo,math_map:()=>To,math_max_min:()=>lo,math_number:()=>eo,math_number_base_conversion:()=>ho,math_radian_to_degree:()=>Ao,math_random:()=>Io,math_random_seed:()=>mo,math_round:()=>Oo,math_selfcalcu:()=>oo,math_single:()=>po,math_to_int:()=>ro,math_trig:()=>ao,text_to_number:()=>Ro,text_to_number_skulpt:()=>co,turn_to_int:()=>Co});var m={};t.r(m),t.d(m,{ascii_to_char:()=>Po,char_to_ascii:()=>vo,number_to_text:()=>Yo,os_system:()=>ip,text:()=>No,text_capital:()=>wo,text_center:()=>ko,text_char:()=>fo,text_char_at:()=>xo,text_char_at2:()=>yo,text_char_at3:()=>Zo,text_compareTo:()=>$o,text_compare_to:()=>Bo,text_encode:()=>tp,text_equals_starts_ends:()=>Vo,text_eval:()=>ep,text_find:()=>Ho,text_format:()=>zo,text_format_noreturn:()=>Qo,text_join:()=>Fo,text_join_seq:()=>Wo,text_length:()=>Xo,text_random_char:()=>bo,text_replace:()=>Ko,text_split:()=>Jo,text_strip:()=>qo,text_substring:()=>Uo,text_substring2:()=>Go,text_substring3:()=>jo,text_textarea:()=>Do});var E={};t.r(E),t.d(E,{content_in_lists:()=>xp,enumerate:()=>yp,list_many_input:()=>gp,list_tolist:()=>Yp,list_tolist2:()=>Xp,list_trig:()=>Op,lists_2d_get_col_row_data:()=>_p,lists_2d_get_data_with_col_row:()=>sp,lists_append_extend:()=>rp,lists_change_to:()=>cp,lists_change_to_general:()=>Sp,lists_clear:()=>Mp,lists_create_with:()=>op,lists_create_with2:()=>Lp,lists_create_with_noreturn:()=>Cp,lists_create_with_text:()=>pp,lists_create_with_text2:()=>Np,lists_del_general:()=>Ap,lists_find:()=>hp,lists_getIndex3:()=>Dp,lists_getSublist3:()=>fp,lists_get_index:()=>ap,lists_get_random_item:()=>lp,lists_get_random_sublist:()=>dp,lists_get_sublist:()=>np,lists_insert_value:()=>Ip,lists_insert_value2:()=>Pp,lists_pop:()=>Ep,lists_remove_at:()=>mp,lists_remove_at2:()=>vp,lists_reverse:()=>Tp,lists_setIndex3:()=>Fp,lists_set_index:()=>up,lists_sort:()=>Rp});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>zp,dicts_add_or_change:()=>Up,dicts_clear:()=>Hp,dicts_create_with:()=>bp,dicts_create_with_noreturn:()=>$p,dicts_deldict:()=>qp,dicts_delete:()=>wp,dicts_get:()=>Bp,dicts_get_default:()=>Gp,dicts_items:()=>Wp,dicts_keys:()=>Vp,dicts_length:()=>Jp,dicts_pop:()=>Qp,dicts_setdefault:()=>jp,dicts_to_json:()=>ta,dicts_to_json2:()=>na,dicts_to_to:()=>ia,dicts_todict:()=>Zp,dicts_update:()=>kp,dicts_values:()=>Kp,json_to_dicts:()=>ea});var R={};t.r(R),t.d(R,{logic_boolean:()=>aa,logic_compare:()=>sa,logic_compare_continous:()=>_a,logic_is:()=>da,logic_is_in:()=>la,logic_negate:()=>pa,logic_null:()=>ua,logic_operation:()=>oa,logic_tobool:()=>Ia,logic_true_or_false:()=>ra});var c={};t.r(c),t.d(c,{sdcard_mount:()=>xa,sdcard_use_spi_init:()=>ya,storage_can_write_ornot:()=>ga,storage_change_dir:()=>Fa,storage_close_file:()=>Sa,storage_delete_file:()=>La,storage_file_seek:()=>fa,storage_file_tell:()=>Da,storage_file_write:()=>Ea,storage_fileopen:()=>Ma,storage_fileopen_new:()=>ha,storage_fileopen_new_encoding:()=>ma,storage_get_a_line:()=>ca,storage_get_contents:()=>Ra,storage_get_contents_without_para:()=>Oa,storage_get_current_dir:()=>Pa,storage_get_file_size:()=>Na,storage_get_filename:()=>Ca,storage_is_file:()=>Xa,storage_list_all_files:()=>Aa,storage_make_dir:()=>va,storage_open_file_with_os:()=>Ta,storage_rename:()=>Ya});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Ga,procedures_callreturn:()=>Ba,procedures_defnoreturn:()=>Va,procedures_defreturn:()=>ba,procedures_ifreturn:()=>Ua,procedures_return:()=>wa});var C={};t.r(C),t.d(C,{tuple_change_to:()=>ja,tuple_create_with:()=>ka,tuple_create_with_noreturn:()=>eu,tuple_create_with_text2:()=>Ha,tuple_create_with_text_return:()=>Wa,tuple_del:()=>qa,tuple_find:()=>$a,tuple_getIndex:()=>Ka,tuple_getSublist:()=>tu,tuple_get_random_item:()=>nu,tuple_get_sublist:()=>iu,tuple_input:()=>_u,tuple_join:()=>za,tuple_length:()=>Ja,tuple_max:()=>Qa,tuple_totuple:()=>su,tuple_trig:()=>Za});var S={};t.r(S),t.d(S,{set_add_discard:()=>du,set_clear:()=>uu,set_create_with:()=>ou,set_create_with_text_return:()=>Mu,set_length:()=>pu,set_operate:()=>ru,set_operate_update:()=>lu,set_pop:()=>au,set_sub:()=>Iu,set_toset:()=>hu,set_update:()=>Tu});var A={};t.r(A),t.d(A,{html_content:()=>Ru,html_content_more:()=>cu,html_document:()=>mu,html_form:()=>Cu,html_head_body:()=>Ou,html_style:()=>gu,html_style_content:()=>Su,html_text:()=>Au,html_title:()=>Eu});var L={};t.r(L),t.d(L,{attribute_access:()=>vu,function_call:()=>Pu,raw_block:()=>Lu,raw_empty:()=>Du,raw_expression:()=>Nu,raw_table:()=>fu,type_check:()=>Fu});var N={};t.r(N),t.d(N,{PIN_init:()=>br,actuator_extern_get_led_bright:()=>Ku,actuator_extern_get_led_state:()=>Ju,actuator_extern_led_bright:()=>Wu,actuator_extern_led_brightness:()=>qu,actuator_ms32006_dcmotor:()=>nr,actuator_ms32006_init:()=>ir,actuator_ms32006_stepper:()=>sr,actuator_neopixel_init:()=>_r,actuator_neopixel_rgb:()=>or,actuator_neopixel_rgb_all:()=>pr,actuator_neopixel_rgb_show_all_chase:()=>rr,actuator_neopixel_rgb_show_all_rainbow:()=>ur,actuator_neopixel_write:()=>ar,actuator_use_uart_init:()=>lr,esp32_music_get_tempo_extern:()=>wu,esp32_music_pitch:()=>Vu,esp32_music_pitch_init:()=>bu,esp32_music_pitch_with_time:()=>Bu,esp32_music_play_list:()=>Gu,esp32_music_reset_extern:()=>ku,esp32_music_set_tempo_extern:()=>Uu,esp32_music_stop:()=>Hu,mixbot_actuator_extern_get_addr:()=>yr,mixbot_actuator_extern_set_addr:()=>xr,mixbot_addr_extern:()=>gr,parrot_PIN_init:()=>Ur,parrot_move_speed:()=>wr,pin_led_bright:()=>Vr,player_insert_music:()=>mr,player_play_music:()=>hr,player_set_mode:()=>Mr,player_set_play:()=>Ir,player_set_volume:()=>Tr,player_whether_stop:()=>dr,robot_led_extern:()=>Lr,robot_led_extern_get_value:()=>Nr,robot_motor_extern:()=>Cr,robot_motor_extern_get_speed:()=>Sr,robot_servo_extern_absolute_run:()=>Pr,robot_servo_extern_get_status:()=>Dr,robot_servo_extern_relative_continue:()=>Xr,robot_servo_extern_relative_origin:()=>vr,robot_servo_extern_relative_run:()=>Yr,robot_servo_extern_stop:()=>Fr,robot_servo_extern_stop_mode:()=>fr,robot_traffic_light_extern:()=>Ar,servo_PIN_init:()=>Br,servo_get_angle:()=>tr,servo_get_speed:()=>er,servo_init:()=>zu,servo_move:()=>Qu,servo_move_angle:()=>Gr,servo_set_angle:()=>$u,servo_set_speed:()=>Zu,servo_speed_360:()=>ju,syn6288_builtin_voice:()=>Rr,syn6288_get_voice:()=>Or,syn6288_set_voice:()=>Er,syn6288_tts_play:()=>cr});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>Rl,actuator_dc_motor_stop:()=>cl,actuator_get_led_bright:()=>Jr,actuator_get_led_state:()=>qr,actuator_led_bright:()=>Kr,actuator_led_brightness:()=>zr,actuator_mixbot_buzzer_on_off:()=>Ll,actuator_mixgo_nova_mic_get:()=>Pl,actuator_mixgo_nova_mic_set:()=>Fl,actuator_mixgo_nova_onboard_music_pitch:()=>bl,actuator_mixgo_nova_onboard_music_stop:()=>Vl,actuator_mixgo_nova_play_audio:()=>yl,actuator_mixgo_nova_play_online_audio:()=>xl,actuator_mixgo_nova_record_audio:()=>Xl,actuator_mixgo_nova_voice_get:()=>Yl,actuator_mixgo_nova_voice_set:()=>vl,actuator_mixgo_zero_led_color:()=>Qr,actuator_onboard_neopixel_rgb:()=>il,actuator_onboard_neopixel_rgb_all:()=>nl,actuator_onboard_neopixel_rgb_show_all_chase:()=>_l,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>sl,actuator_onboard_neopixel_write:()=>ol,actuator_rm_onboard_neopixel_rgb:()=>pl,actuator_rm_onboard_neopixel_rgb_all:()=>al,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>ul,actuator_stepper_keep:()=>El,actuator_stepper_stop:()=>Ol,analog_ble_keyboard_init:()=>jl,analog_ble_keyboard_input:()=>td,analog_ble_keyboard_mouse_init:()=>ad,analog_ble_keyboard_mouse_input:()=>dd,analog_ble_keyboard_mouse_send_battery:()=>ld,analog_ble_keyboard_mouse_str:()=>Id,analog_ble_keyboard_send_battery:()=>id,analog_ble_keyboard_str:()=>ed,analog_ble_mouse_init:()=>nd,analog_ble_mouse_input:()=>od,analog_ble_mouse_keyboard_input:()=>Td,analog_ble_mouse_send_battery:()=>pd,analog_keyboard_input:()=>wl,analog_keyboard_str:()=>Ql,analog_mouse_input:()=>ql,bitbot_motor:()=>fl,bitbot_move:()=>Nl,bitbot_stop:()=>Dl,ble_keyboard_connect:()=>Zl,ble_keyboard_get_mac:()=>$l,ble_keyboard_mouse_connect:()=>rd,ble_keyboard_mouse_get_mac:()=>ud,ble_mouse_connect:()=>_d,ble_mouse_get_mac:()=>sd,cc_number:()=>el,educore_ble_keyboard_input:()=>Sd,educore_ble_sensor_connected:()=>Cd,educore_ble_sensor_init:()=>gd,educore_buzzer:()=>Md,educore_buzzer_play_tone:()=>hd,educore_buzzer_play_tone_time:()=>md,educore_buzzer_stop:()=>Ed,educore_neopixel_clear:()=>cd,educore_neopixel_rgb:()=>Rd,educore_rgb_light:()=>Od,esp32_music_get_tempo:()=>ll,esp32_music_reset:()=>dl,esp32_music_set_tempo:()=>rl,esp32_onboard_music_pitch:()=>Il,esp32_onboard_music_pitch_with_time:()=>Tl,esp32_onboard_music_play_list:()=>hl,esp32_onboard_music_stop:()=>Ml,general_key:()=>Hl,general_key_tuple:()=>Wl,generalkey_container:()=>Kl,generalkey_create_with_item:()=>Jl,get_keyboard_light:()=>Ad,get_power_output:()=>Gl,ledswitch:()=>Wr,mixbot_motor:()=>Al,mixbot_motor_status:()=>gl,mixbot_move:()=>Cl,mixbot_stop:()=>Sl,mouse_key:()=>zl,number:()=>Hr,rm_actuator_get_led_bright:()=>$r,rm_actuator_get_led_state:()=>Zr,rm_actuator_led_bright:()=>jr,rm_actuator_led_brightness:()=>tl,rm_motor:()=>ml,set_all_power_output:()=>Ul,set_power_output:()=>Bl,special_key:()=>kl});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>_I,ai_sensor_ailocal_class:()=>qd,ai_sensor_ailocal_class_result:()=>zd,ai_sensor_ailocal_train:()=>Jd,ai_sensor_asr_recognize:()=>tI,ai_sensor_audio_play:()=>jd,ai_sensor_audio_record:()=>Qd,ai_sensor_barcode:()=>Yd,ai_sensor_circle:()=>Bd,ai_sensor_classifier_faces:()=>sI,ai_sensor_color:()=>kd,ai_sensor_color_chases:()=>Kd,ai_sensor_color_chases_result:()=>Wd,ai_sensor_config:()=>Pd,ai_sensor_face:()=>nI,ai_sensor_find_20objects:()=>oI,ai_sensor_find_barcodes:()=>Xd,ai_sensor_find_circles:()=>Gd,ai_sensor_find_colors:()=>Hd,ai_sensor_find_licenseplates:()=>iI,ai_sensor_find_lines:()=>Vd,ai_sensor_find_qrcodes:()=>Fd,ai_sensor_find_rects:()=>wd,ai_sensor_find_tags:()=>xd,ai_sensor_licenseplate:()=>eI,ai_sensor_line:()=>bd,ai_sensor_qrcode:()=>Dd,ai_sensor_qrcode_lite:()=>fd,ai_sensor_rect:()=>Ud,ai_sensor_rgb:()=>vd,ai_sensor_tag:()=>yd,ai_sensor_use_uart_init:()=>Nd,ai_sensor_yolo_recognize:()=>$d,ai_sensor_yolo_recognize_result:()=>Zd});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>uI,MICROPYTHON_AI_Speech_unit:()=>aI,MICROPYTHON_AI_client:()=>pI});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>SI,mpython_blynk_app_notify:()=>mI,mpython_blynk_email:()=>RI,mpython_blynk_get_timers:()=>cI,mpython_blynk_on_connected:()=>TI,mpython_blynk_on_disconnected:()=>II,mpython_blynk_run:()=>hI,mpython_blynk_sensor_data_to_app:()=>CI,mpython_blynk_set_property:()=>OI,mpython_blynk_setup:()=>AI,mpython_blynk_stop_timers:()=>EI,mpython_blynk_sync_virtual:()=>dI,mpython_blynk_terminal_widget_vpin:()=>lI,mpython_blynktimer:()=>gI,mpython_blynktimer_run:()=>MI});var v={};t.r(v),t.d(v,{cc_g1_init:()=>LI,cc_g1_read_bat:()=>NI,cc_g1_read_joystick:()=>DI,cc_g1_read_key:()=>fI,cc_g1_turnoff:()=>FI});var Y={};t.r(Y),t.d(Y,{ce_go_dc_motor:()=>BI,ce_go_get_led_bright:()=>XI,ce_go_get_led_state:()=>yI,ce_go_hall_attachInterrupt:()=>GI,ce_go_hall_data:()=>wI,ce_go_hall_initialize:()=>UI,ce_go_led_bright:()=>YI,ce_go_led_brightness:()=>xI,ce_go_light_number:()=>vI,ce_go_pin_light:()=>JI,ce_go_pin_near:()=>HI,ce_go_pin_near_line:()=>kI,ce_go_pin_near_state_change:()=>WI,ce_go_stepper_keep:()=>bI,ce_go_stepper_stop:()=>VI,educore_car:()=>qI,educore_car_pin_near:()=>$I,educore_car_pin_near_line:()=>jI,educore_car_stepper_keep:()=>zI,educore_car_stepper_stop:()=>QI,sensor_mixgome_eulerangles:()=>KI});var X={};t.r(X),t.d(X,{communicate_bluetooth_central_init:()=>XT,communicate_bluetooth_connect:()=>VT,communicate_bluetooth_disconnect:()=>BT,communicate_bluetooth_handle:()=>HT,communicate_bluetooth_is_connected:()=>UT,communicate_bluetooth_mac:()=>bT,communicate_bluetooth_peripheral_init:()=>yT,communicate_bluetooth_recv:()=>wT,communicate_bluetooth_recv_only:()=>kT,communicate_bluetooth_scan:()=>xT,communicate_bluetooth_send:()=>GT,communicate_espnow_init:()=>WT,communicate_espnow_init_new:()=>KT,communicate_i2c_available:()=>hT,communicate_i2c_init:()=>iT,communicate_i2c_master_read:()=>MT,communicate_i2c_onboard:()=>tT,communicate_i2c_read:()=>nT,communicate_i2c_scan:()=>_T,communicate_i2c_write:()=>sT,communicate_ir_recv_init:()=>ST,communicate_ir_send_init:()=>fT,communicate_ow_init:()=>ET,communicate_ow_read:()=>RT,communicate_ow_reset:()=>CT,communicate_ow_scan:()=>OT,communicate_ow_select:()=>gT,communicate_ow_write:()=>cT,communicate_spi_buffer:()=>aT,communicate_spi_init:()=>oT,communicate_spi_onboard:()=>eT,communicate_spi_read:()=>uT,communicate_spi_read_output:()=>rT,communicate_spi_readinto:()=>lT,communicate_spi_readinto_output:()=>dT,communicate_spi_set:()=>pT,communicate_spi_write:()=>IT,communicate_spi_write_readinto:()=>TT,espnow_radio_channel:()=>$T,espnow_radio_channel_new:()=>tM,espnow_radio_on_off:()=>eM,espnow_radio_rec:()=>nM,espnow_radio_recv:()=>_M,espnow_radio_recv_certain_msg:()=>oM,espnow_radio_recv_certain_msg_new:()=>aM,espnow_radio_recv_msg:()=>sM,espnow_radio_recv_new:()=>pM,espnow_radio_send:()=>iM,espnow_radio_txpower:()=>ZT,i2c_available:()=>FM,i2c_init:()=>hM,i2c_master_reader2:()=>fM,i2c_read:()=>mM,i2c_scan:()=>OM,i2c_slave_onreceive:()=>mT,i2c_write:()=>EM,internal_variable:()=>AT,ir_recv_timeout:()=>DT,ir_transmit_busy:()=>YT,ir_transmit_conventional_data:()=>FT,ir_transmit_raw_code:()=>vT,ir_transmit_study_code:()=>PT,ir_whether_recv:()=>NT,lora_init:()=>uM,lora_packet:()=>rM,lora_recv:()=>dM,lora_send:()=>lM,network_espnow_info:()=>qT,network_espnow_mac:()=>JT,network_espnow_recv:()=>zT,network_espnow_recv_handle:()=>jT,network_espnow_send:()=>QT,recv_fun:()=>LT,spi_buffer:()=>gM,spi_init:()=>RM,spi_read:()=>CM,spi_read_output:()=>SM,spi_readinto:()=>AM,spi_readinto_output:()=>LM,spi_set:()=>cM,spi_write:()=>NM,spi_write_readinto:()=>DM,urequests_attribute:()=>TM,urequests_get:()=>IM,urequests_method:()=>MM});var y={};t.r(y),t.d(y,{display_animate:()=>ah,display_blink_rate:()=>sh,display_circle:()=>uh,display_color_seclet:()=>ch,display_draw_4strings:()=>$M,display_fill:()=>ph,display_get_screen_image:()=>nh,display_help:()=>lh,display_image_size:()=>ZM,display_lcd_use_i2c_init:()=>Nh,display_line:()=>eh,display_line_arbitrarily:()=>ih,display_matrix_extern_bright_point:()=>HM,display_matrix_extern_bright_screen:()=>KM,display_matrix_extern_clear:()=>JM,display_matrix_extern_get_pixel:()=>kM,display_matrix_extern_get_screen_pixel:()=>WM,display_matrix_extern_image_builtins:()=>qM,display_matrix_extern_scroll_string:()=>VM,display_matrix_extern_scroll_string_delay:()=>BM,display_matrix_extern_shift:()=>wM,display_matrix_extern_show_frame_string:()=>GM,display_matrix_extern_show_frame_string_delay:()=>UM,display_matrix_extern_show_image:()=>xM,display_matrix_extern_show_image_or_string_delay:()=>bM,display_matrix_use_i2c_init:()=>yM,display_oled_drawPixel:()=>Ih,display_oled_showBitmap:()=>dh,display_oled_use_i2c_init:()=>vh,display_onoff:()=>oh,display_rect:()=>th,display_rgb_color:()=>_h,display_tm1650_power:()=>Mh,display_tm1650_set_brightness:()=>Eh,display_tm1650_show_dot:()=>mh,display_tm1650_show_num:()=>hh,display_tm_use_i2c_init:()=>Th,display_triangle:()=>rh,display_use_i2c_init:()=>jM,extern_oled_bright_point:()=>kh,extern_oled_clear:()=>Hh,extern_oled_get_pixel:()=>wh,extern_oled_hvline:()=>Kh,extern_oled_line:()=>Jh,extern_oled_scroll_string:()=>bh,extern_oled_scroll_string_delay:()=>Vh,extern_oled_shape_rect:()=>Wh,extern_oled_shift:()=>Uh,extern_oled_show_frame_string:()=>Bh,extern_oled_show_frame_string_delay:()=>Gh,extern_oled_show_image:()=>Yh,extern_oled_show_image_or_string_delay:()=>xh,extern_oled_show_image_xy:()=>Xh,extern_oled_show_string:()=>yh,lcd_backlight:()=>Fh,lcd_clear:()=>Ph,lcd_print_string:()=>fh,lcd_show_image_or_string_delay:()=>Dh,matrix_extern_image_arithmetic:()=>zM,matrix_extern_image_invert:()=>QM,tft_fill:()=>Ah,tft_line_arbitrarily:()=>Lh,tft_scroll_string_delay:()=>Ch,tft_show_frame_string_delay:()=>Sh,tft_show_image_or_string_delay:()=>gh,tft_show_image_xy:()=>Rh,tft_use_spi_init:()=>Oh});var x={};t.r(x),t.d(x,{bitbot_display_bitmap_create:()=>Gm,bitbot_display_image_create:()=>Bm,display_available:()=>Tm,display_bitmap_create:()=>nm,display_bright_point:()=>rm,display_bright_screen:()=>dm,display_clear:()=>Im,display_get_pixel:()=>um,display_get_screen_pixel:()=>lm,display_image_builtins:()=>sm,display_image_builtins_all:()=>_m,display_image_create:()=>im,display_scroll_string:()=>jh,display_scroll_string_delay:()=>$h,display_shift:()=>am,display_show_frame_string:()=>tm,display_show_frame_string_delay:()=>em,display_show_image:()=>zh,display_show_image_or_string_delay:()=>Qh,draw_pointer:()=>nE,image_arithmetic:()=>om,image_invert:()=>pm,mixbot_display_bitmap_create:()=>Xm,mixbot_display_bright_screen:()=>bm,mixbot_display_get_ambientbright:()=>xm,mixbot_display_get_screen_pixel:()=>ym,mixbot_display_image_create:()=>Ym,mixbot_display_rotate:()=>Vm,mixgo_display_bitmap_create:()=>Rm,mixgo_display_image_create_new:()=>Om,mixgome_display_bitmap_create:()=>hm,mixgome_display_font:()=>cm,mixgome_display_image_create:()=>Mm,mixgomini_display_bitmap_create:()=>Em,mixgomini_display_image_create:()=>mm,mpython_display_hvline:()=>Fm,mpython_display_line:()=>Pm,mpython_display_shape_rect:()=>fm,mpython_pbm_image:()=>vm,nova_draw_pointer:()=>sE,onboard_oled_bright_point:()=>Dm,onboard_oled_scroll_string_delay:()=>Lm,onboard_oled_show_frame_string_delay:()=>Nm,onboard_oled_show_image:()=>gm,onboard_oled_show_image_or_string_delay:()=>Am,onboard_oled_show_image_xy:()=>Cm,onboard_oled_show_string:()=>Sm,onboard_tft_bright_point:()=>zm,onboard_tft_bright_screen:()=>lE,onboard_tft_clear:()=>dE,onboard_tft_clock_clear:()=>eE,onboard_tft_clock_draw:()=>tE,onboard_tft_clock_get_rtctime:()=>$m,onboard_tft_clock_init:()=>jm,onboard_tft_clock_set_time:()=>Zm,onboard_tft_display_hvline:()=>Km,onboard_tft_display_line:()=>Jm,onboard_tft_display_shape_circle:()=>iE,onboard_tft_display_shape_rect:()=>Wm,onboard_tft_fill:()=>Qm,onboard_tft_get_pixel:()=>qm,onboard_tft_get_screen_pixel:()=>rE,onboard_tft_scroll_string:()=>pE,onboard_tft_scroll_string_delay:()=>Zh,onboard_tft_shift:()=>uE,onboard_tft_show_frame_string:()=>aE,onboard_tft_show_frame_string_delay:()=>Hm,onboard_tft_show_image:()=>oE,onboard_tft_show_image_or_string_delay:()=>km,onboard_tft_show_image_xy:()=>Um,onboard_tft_show_image_xy_direct:()=>wm,onboard_tft_show_texts:()=>_E});var b={};t.r(b),t.d(b,{factory_block:()=>FE,factory_block_return:()=>PE,factory_block_return_with_textarea:()=>YE,factory_block_with_textarea:()=>vE,factory_callMethod_noreturn:()=>DE,factory_callMethod_return:()=>fE,factory_create_with_container:()=>SE,factory_create_with_item:()=>AE,factory_declare:()=>NE,factory_from_import:()=>cE,factory_function_noreturn:()=>CE,factory_function_return:()=>LE,factory_import:()=>gE,folding_block:()=>XE});var V={};t.r(V),t.d(V,{controls_pin_attachInterrupt:()=>iO,inout_analog_atten:()=>HE,inout_analog_read:()=>kE,inout_analog_read_init:()=>QE,inout_analog_write:()=>GE,inout_analog_write_init:()=>zE,inout_analog_write_set:()=>UE,inout_analog_write_set_freq:()=>ZE,inout_digital_init:()=>JE,inout_digital_read:()=>VE,inout_digital_write:()=>bE,inout_highlow:()=>xE,inout_pinMode:()=>$E,inout_pin_attachInterrupt:()=>KE,inout_pin_pressed:()=>WE,inout_pin_pressed_init:()=>jE,inout_pwm_analog_write:()=>BE,inout_pwm_analog_write_init:()=>qE,inout_pwm_analog_write_set_freq:()=>wE,pin_pressed:()=>eO,pin_pressed_init:()=>tO});var B={};t.r(B),t.d(B,{IOT_CONNECT_OLLAMA:()=>BO,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>LO,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>AO,IOT_EMQX_PING:()=>CO,IOT_FORMATTING:()=>cO,IOT_FORMAT_STRING:()=>gO,IOT_MIXIO_NTP:()=>SO,IOT_MIXIO_PUBLISH:()=>TO,IOT_MIXIO_SUBSCRIBE:()=>MO,iot_checkonenet:()=>xO,iot_client_onboard:()=>DO,iot_connect_ollama:()=>VO,iot_connect_openai:()=>GO,iot_create_with_item:()=>dO,iot_http_client:()=>fO,iot_http_data:()=>FO,iot_mixio_check:()=>EO,iot_mixio_connect:()=>IO,iot_mixio_connect_only:()=>mO,iot_mixio_disconnect:()=>hO,iot_mixio_format_msg:()=>RO,iot_mixio_format_topic:()=>OO,iot_mixly_key:()=>NO,iot_mqtt_client:()=>PO,iot_mqtt_data:()=>vO,iot_onenet_check:()=>pO,iot_onenet_connect:()=>_O,iot_onenet_disconnect:()=>oO,iot_onenet_publish:()=>uO,iot_onenet_publish_dict:()=>aO,iot_onenetconnect:()=>XO,iot_onenetdisconnect:()=>yO,iot_publish:()=>bO,iot_publish_container:()=>rO,iot_publish_item:()=>lO,iot_wifi_connect:()=>sO,iot_wificonnect:()=>YO,ollama_empty_history:()=>kO,use_ollama_llm_to_chat:()=>UO,use_ollama_llm_to_chat_return:()=>wO});var G={};t.r(G),t.d(G,{educore_mqtt_connect:()=>gR,educore_mqtt_connect_success:()=>LR,educore_mqtt_subscribe_message:()=>CR,educore_mqtt_topic_publish:()=>AR,educore_mqtt_topic_subscribe:()=>SR,educore_wifi_connect:()=>cR,network_ap_connect:()=>tR,network_connect:()=>zO,network_get_connect:()=>jO,network_get_wifi:()=>ZO,network_init:()=>WO,network_is_active:()=>JO,network_open:()=>KO,network_scan:()=>qO,network_server:()=>eR,network_socket_accept:()=>oR,network_socket_bind:()=>nR,network_socket_close:()=>lR,network_socket_connect:()=>sR,network_socket_init:()=>iR,network_socket_listen:()=>_R,network_socket_receive:()=>pR,network_socket_receive_from:()=>uR,network_socket_send:()=>aR,network_socket_send_to:()=>rR,network_stop:()=>$O,network_wifi_connect:()=>QO,ntptime_address:()=>hR,ntptime_time:()=>MR,requests_attribute:()=>IR,requests_attribute2:()=>RR,requests_get:()=>dR,requests_get2:()=>ER,requests_method:()=>TR,requests_post:()=>OR});var U={};t.r(U),t.d(U,{CI130X_BROADCAST:()=>jR,CI130X_GET_THE_RECOGNIZED_CMD:()=>QR,CI130X_GET_WHETHER_IDENTIFY:()=>zR,CI130X_IDENTIFY_AND_SAVE:()=>qR,CI130X_SET_SYSTEM_CMD:()=>$R,HCSR04:()=>Gc,PS2_Button:()=>Hc,PS2_Buttons:()=>Kc,PS2_Buttons_new:()=>Qc,PS2_State:()=>Wc,PS2_init:()=>Uc,PS2_init_new:()=>qc,PS2_stk:()=>Jc,PS2_stk_new:()=>jc,PS2_vibration:()=>kc,PS2_vibration_new:()=>zc,camera_sensor_init:()=>Ng,camera_sensor_result:()=>Dg,column_tube_foot:()=>Yg,define_keyboards:()=>Xg,educore_body_sensor:()=>mg,educore_button_sensor_extern:()=>cg,educore_camera_sensor:()=>Lg,educore_infrared_sensor:()=>Rg,educore_soilhum_sensor:()=>Eg,educore_temp_sensor:()=>Ag,educore_temphum_sensor:()=>Og,educore_ultrasonic_sensor:()=>Cg,esp32_s2_weather_init:()=>xc,esp32_s2_weather_rain:()=>Vc,esp32_s2_weather_wd:()=>bc,esp32_s2_weather_ws:()=>Bc,extern_rfid_read:()=>gc,extern_rfid_readcontent:()=>Sc,extern_rfid_readid:()=>Cc,extern_rfid_status:()=>Nc,extern_rfid_write:()=>Ac,extern_rfid_write_return:()=>Lc,get_keboards_value:()=>yg,gnss_get_data:()=>eg,gnss_have_data:()=>tg,init_matrix_keyboard:()=>Pg,interaction_whether_to_interaction:()=>KR,interaction_whether_to_interaction_SANT:()=>JR,line_tube_foot:()=>vg,mixbot_sensor_extern_get_addr:()=>ug,mixbot_sensor_extern_set_addr:()=>rg,pm25_get_data:()=>Zc,radar_set_DETECTION_THRESHOLD:()=>HR,radar_set_DETECTION_THRESHOLD_SANT:()=>WR,robot_button_extern_get_value:()=>ng,robot_color_extern_get_value:()=>ag,robot_infrared_extern_get_value:()=>_g,robot_infrared_extern_grey_get_value:()=>og,robot_potentiometer_extern_get_value:()=>pg,robot_sonar_extern_get_value:()=>lg,robot_sonar_extern_led:()=>dg,robot_touch_extern_get_value:()=>sg,sensor_APDS9960_extern:()=>tc,sensor_DS18X20:()=>UR,sensor_LTR308_extern:()=>ec,sensor_LTR390UV_extern:()=>sc,sensor_MAX30102_extern:()=>ZR,sensor_QMC5883L_extern:()=>dc,sensor_VL530LX_extern:()=>_c,sensor_adxl345_get_acceleration:()=>YR,sensor_aht11_extern:()=>pc,sensor_bmp:()=>BR,sensor_compass_reset:()=>Rc,sensor_dht11:()=>yR,sensor_hp203_extern:()=>ac,sensor_light_level:()=>XR,sensor_lm35:()=>wR,sensor_ltr381_extern:()=>ic,sensor_mixgo_extern_button_attachInterrupt:()=>PR,sensor_mixgo_extern_button_get_presses:()=>FR,sensor_mixgo_extern_button_is_pressed:()=>DR,sensor_mixgo_extern_button_was_pressed:()=>fR,sensor_mixgo_extern_light:()=>xR,sensor_mixgo_extern_pin_near:()=>VR,sensor_mixgo_extern_sound:()=>bR,sensor_mixgoce_hot_wheel_degrees:()=>yc,sensor_mixgoce_hot_wheel_is_touched:()=>Xc,sensor_mpu9250_attachGestureInterrupt:()=>vR,sensor_mpu9250_calibrate_compass:()=>mc,sensor_mpu9250_field_strength:()=>Oc,sensor_mpu9250_gesture:()=>Ic,sensor_mpu9250_get_acceleration:()=>Tc,sensor_mpu9250_get_gyro:()=>hc,sensor_mpu9250_get_magnetic:()=>Mc,sensor_mpu9250_temperature:()=>Ec,sensor_ms5611_extern:()=>rc,sensor_ms5611_extern_altitude:()=>lc,sensor_read_humiture:()=>gg,sensor_sht:()=>GR,sensor_shtc3_extern:()=>oc,sensor_spl06_001_extern:()=>uc,sensor_ucs12071_extern:()=>nc,sensor_use_i2c_init:()=>kR,sensor_use_spi_init:()=>cc,sensor_use_uart_init:()=>$c,sensor_weather_solo_init:()=>Ig,sensor_weather_solo_rain:()=>hg,sensor_weather_solo_wd:()=>Tg,sensor_weather_solo_ws:()=>Mg,sensor_weigh_init:()=>fg,tvoc_get_data:()=>ig,ultrasonic_sensor_read_distance:()=>Sg,weather_data:()=>Dc,weather_have_data:()=>fc,weather_set_label:()=>Pc,weather_set_label_container:()=>vc,weather_set_label_item:()=>Yc,weather_uart_mixio:()=>Fc,weigh_sensor_get_weight:()=>Fg});var w={};t.r(w),t.d(w,{HCSR04:()=>$g,RTC_set_date:()=>jg,RTC_set_time:()=>Qg,bitbot_als_num:()=>pS,dht11:()=>TS,educore_button_sensor:()=>CS,educore_button_was_pressed:()=>SS,educore_gyroscope_sensor:()=>RS,educore_gyroscope_sensor_read:()=>cS,educore_gyroscope_sensor_shake:()=>gS,educore_light_sensor:()=>OS,educore_rfid_sensor:()=>AS,educore_rfid_sensor_scan:()=>LS,educore_rfid_sensor_scan_data:()=>NS,educore_voice_sensor:()=>mS,number1:()=>tC,number2:()=>eC,number3:()=>iC,number4:()=>nC,number5:()=>sC,number6:()=>_C,number7:()=>oC,onboard_RTC_get_time:()=>TC,onboard_RTC_get_time_str:()=>RC,onboard_RTC_get_timestamp:()=>MC,onboard_RTC_get_timetuple_to_str:()=>cC,onboard_RTC_set_datetime:()=>EC,onboard_RTC_settime_string:()=>mC,onboard_RTC_timestamp_totuple:()=>hC,rfid_readcontent:()=>DC,rfid_readid:()=>NC,rfid_status:()=>PC,rfid_write:()=>fC,rfid_write_return:()=>FC,sensor_LTR308:()=>gC,sensor_aht11:()=>SC,sensor_bitbot_ALS:()=>oS,sensor_button_get_presses:()=>rS,sensor_button_is_pressed:()=>aS,sensor_button_was_pressed:()=>uS,sensor_distance_hrsc04:()=>zg,sensor_eulerangles:()=>YC,sensor_field_strength:()=>MS,sensor_get_acceleration:()=>vC,sensor_get_temperature:()=>AC,sensor_get_the_coprocessor_version:()=>DS,sensor_hp203:()=>LC,sensor_light:()=>IS,sensor_mixbot_get_gyro:()=>_S,sensor_mixbot_patrol_calibrate:()=>iS,sensor_mixbot_patrol_value:()=>nS,sensor_mixbot_temperature:()=>sS,sensor_mixgo_LTR308:()=>dC,sensor_mixgo_button_attachInterrupt:()=>Gg,sensor_mixgo_button_get_presses:()=>Bg,sensor_mixgo_button_is_pressed:()=>bg,sensor_mixgo_button_was_pressed:()=>Vg,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>HC,sensor_mixgo_cc_mmc5603_get_angle:()=>kC,sensor_mixgo_cc_mmc5603_get_magnetic:()=>wC,sensor_mixgo_light:()=>Zg,sensor_mixgo_nova_LTR308:()=>lC,sensor_mixgo_nova_pin_near:()=>rC,sensor_mixgo_pin_near:()=>uC,sensor_mixgo_pin_near_double:()=>aC,sensor_mixgo_pin_near_single:()=>pC,sensor_mixgo_pin_pressed:()=>Wg,sensor_mixgo_sant_color:()=>IC,sensor_mixgo_touch_slide:()=>qg,sensor_mixgocar42_button_attachInterrupt:()=>Hg,sensor_mixgocar42_button_get_presses:()=>kg,sensor_mixgocar42_button_is_pressed:()=>Ug,sensor_mixgocar42_button_was_pressed:()=>wg,sensor_mixgocar_battery_left:()=>eS,sensor_mixgocar_pin_near:()=>ZC,sensor_mixgocar_pin_near_line:()=>$C,sensor_mixgocar_pin_near_state_change:()=>tS,sensor_mixgoce_pin_pressed:()=>Kg,sensor_mixgoce_temperature:()=>KC,sensor_mixgome_temperature:()=>WC,sensor_mpython_pin_pressed:()=>Jg,sensor_mpython_qmi8658_get_gyro:()=>JC,sensor_mpython_qmi8658_temperature:()=>qC,sensor_onboard_compass_reset:()=>UC,sensor_onboard_mpu9250_calibrate_compass:()=>VC,sensor_onboard_mpu9250_field_strength:()=>GC,sensor_onboard_mpu9250_gesture:()=>XC,sensor_onboard_mpu9250_get_acceleration:()=>yC,sensor_onboard_mpu9250_get_gyro:()=>bC,sensor_onboard_mpu9250_get_magnetic:()=>xC,sensor_onboard_mpu9250_temperature:()=>BC,sensor_pin_near:()=>dS,sensor_pin_pressed:()=>lS,sensor_read:()=>ES,sensor_rm_acc:()=>jC,sensor_rm_battery_left:()=>QC,sensor_rm_pin_near_double:()=>zC,sensor_rtc_init:()=>OC,sensor_sound:()=>CC,sensor_temperature:()=>hS});var k={};t.r(k),t.d(k,{serial_any:()=>VS,serial_begin:()=>kS,serial_print:()=>YS,serial_print_byte:()=>vS,serial_print_hex:()=>yS,serial_println:()=>XS,serial_read_from_ai:()=>$S,serial_readline:()=>BS,serial_readstr:()=>bS,serial_readstr_until:()=>GS,serial_receive_data_event:()=>xS,serial_send_to_ai:()=>jS,serial_softserial:()=>wS,serial_softserial_new:()=>US,system_input:()=>HS,system_print:()=>WS,system_print_container:()=>zS,system_print_end:()=>JS,system_print_inline:()=>KS,system_print_item:()=>QS,system_print_many:()=>qS});var H={};t.r(H),t.d(H,{Panic_with_status_code:()=>iA,Timer_init:()=>MA,base_delay:()=>EA,controls_delay:()=>eA,controls_delay_new:()=>tA,controls_millis:()=>sA,controls_uname:()=>oA,raw_block:()=>_A,reset:()=>nA,system_bitbot_shutdown:()=>TA,system_machine_reset:()=>IA,system_ticks_diff:()=>uA,system_timer:()=>aA,system_timer_init:()=>rA,system_wdt_feed:()=>dA,system_wdt_init:()=>lA,time_ticks_diff:()=>mA,timer:()=>pA,timer2:()=>hA});var W={};t.r(W),t.d(W,{Air_daily_content:()=>vA,Air_now_content:()=>AA,Geo_moon_content:()=>XA,Geo_sun_content:()=>YA,Life_suggestion_content:()=>NA,Location_search_content:()=>fA,Tide_daily_content:()=>DA,WEATHER_DAILY:()=>cA,WEATHER_HOUR:()=>gA,WEATHER_NOW:()=>RA,Weather_alarm_content:()=>LA,Weather_daily:()=>FA,Weather_daily_content:()=>PA,Weather_now:()=>CA,Weather_now_content:()=>SA});var K={};t.r(K),t.d(K,{PIN_init:()=>XL,actuator_extern_get_led_bright:()=>tL,actuator_extern_get_led_state:()=>eL,actuator_extern_led_bright:()=>ZA,actuator_extern_led_brightness:()=>iL,actuator_ms32006_dcmotor:()=>wA,actuator_ms32006_init:()=>UA,actuator_ms32006_stepper:()=>kA,actuator_neopixel_init:()=>nL,actuator_neopixel_rgb:()=>oL,actuator_neopixel_rgb_all:()=>sL,actuator_neopixel_rgb_show_all_chase:()=>pL,actuator_neopixel_rgb_show_all_rainbow:()=>aL,actuator_neopixel_write:()=>_L,actuator_use_uart_init:()=>uL,esp32_music_get_tempo_extern:()=>zA,esp32_music_pitch:()=>WA,esp32_music_pitch_init:()=>HA,esp32_music_pitch_with_time:()=>KA,esp32_music_play_list:()=>QA,esp32_music_reset_extern:()=>jA,esp32_music_set_tempo_extern:()=>qA,esp32_music_stop:()=>JA,mixbot_actuator_extern_get_addr:()=>vL,mixbot_actuator_extern_set_addr:()=>YL,mixbot_addr_extern:()=>OL,parrot_PIN_init:()=>VL,parrot_move_speed:()=>BL,pin_led_bright:()=>yL,player_play_music:()=>TL,player_set_mode:()=>IL,player_set_play:()=>lL,player_set_volume:()=>dL,player_whether_stop:()=>rL,robot_led_extern:()=>CL,robot_led_extern_get_value:()=>SL,robot_motor_extern:()=>RL,robot_motor_extern_get_speed:()=>cL,robot_servo_extern_absolute_run:()=>DL,robot_servo_extern_get_status:()=>AL,robot_servo_extern_relative_continue:()=>PL,robot_servo_extern_relative_origin:()=>fL,robot_servo_extern_relative_run:()=>FL,robot_servo_extern_stop:()=>NL,robot_servo_extern_stop_mode:()=>LL,robot_traffic_light_extern:()=>gL,servo_PIN_init:()=>xL,servo_get_angle:()=>BA,servo_get_speed:()=>GA,servo_init:()=>yA,servo_move:()=>$A,servo_move_angle:()=>bL,servo_set_angle:()=>bA,servo_set_speed:()=>VA,servo_speed_360:()=>xA,syn6288_builtin_voice:()=>mL,syn6288_get_voice:()=>hL,syn6288_set_voice:()=>ML,syn6288_tts_play:()=>EL});var J={};t.r(J),t.d(J,{actuator_dc_motor:()=>IN,actuator_dc_motor_stop:()=>TN,actuator_get_led_bright:()=>QL,actuator_get_led_state:()=>jL,actuator_led_bright:()=>zL,actuator_led_brightness:()=>$L,actuator_mixbot_buzzer_on_off:()=>ON,actuator_mixgo_nova_mic_get:()=>SN,actuator_mixgo_nova_mic_set:()=>CN,actuator_mixgo_nova_onboard_music_pitch:()=>FN,actuator_mixgo_nova_onboard_music_stop:()=>PN,actuator_mixgo_nova_play_audio:()=>DN,actuator_mixgo_nova_play_online_audio:()=>fN,actuator_mixgo_nova_record_audio:()=>NN,actuator_mixgo_nova_voice_get:()=>LN,actuator_mixgo_nova_voice_set:()=>AN,actuator_mixgo_zero_led_color:()=>ZL,actuator_onboard_neopixel_rgb:()=>oN,actuator_onboard_neopixel_rgb_all:()=>pN,actuator_onboard_neopixel_rgb_show_all_chase:()=>aN,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>uN,actuator_onboard_neopixel_write:()=>_N,actuator_stepper_keep:()=>lN,actuator_stepper_stop:()=>dN,analog_ble_keyboard_init:()=>wN,analog_ble_keyboard_input:()=>WN,analog_ble_keyboard_mouse_init:()=>ZN,analog_ble_keyboard_mouse_input:()=>nD,analog_ble_keyboard_mouse_send_battery:()=>iD,analog_ble_keyboard_mouse_str:()=>sD,analog_ble_keyboard_send_battery:()=>JN,analog_ble_keyboard_str:()=>KN,analog_ble_mouse_init:()=>qN,analog_ble_mouse_input:()=>jN,analog_ble_mouse_keyboard_input:()=>_D,analog_ble_mouse_send_battery:()=>$N,analog_keyboard_input:()=>yN,analog_keyboard_str:()=>GN,analog_mouse_input:()=>VN,bitbot_motor:()=>gN,bitbot_move:()=>RN,bitbot_stop:()=>cN,ble_keyboard_connect:()=>HN,ble_keyboard_get_mac:()=>kN,ble_keyboard_mouse_connect:()=>eD,ble_keyboard_mouse_get_mac:()=>tD,ble_mouse_connect:()=>QN,ble_mouse_get_mac:()=>zN,cc_number:()=>tN,educore_ble_keyboard_input:()=>MD,educore_ble_sensor_connected:()=>TD,educore_ble_sensor_init:()=>ID,educore_buzzer:()=>oD,educore_buzzer_play_tone:()=>pD,educore_buzzer_play_tone_time:()=>aD,educore_buzzer_stop:()=>uD,educore_neopixel_clear:()=>dD,educore_neopixel_rgb:()=>lD,educore_rgb_light:()=>rD,esp32_music_get_tempo:()=>UL,esp32_music_reset:()=>KL,esp32_music_set_tempo:()=>GL,esp32_onboard_music_pitch:()=>wL,esp32_onboard_music_pitch_with_time:()=>kL,esp32_onboard_music_play_list:()=>WL,esp32_onboard_music_stop:()=>HL,general_key:()=>bN,general_key_tuple:()=>UN,get_keyboard_light:()=>hD,get_power_output:()=>YN,ledswitch:()=>qL,mixbot_motor:()=>EN,mixbot_motor_status:()=>MN,mixbot_move:()=>hN,mixbot_stop:()=>mN,mouse_key:()=>BN,number:()=>JL,rm_actuator_get_led_bright:()=>iN,rm_actuator_get_led_state:()=>nN,rm_actuator_led_bright:()=>eN,rm_actuator_led_brightness:()=>sN,rm_motor:()=>rN,set_all_power_output:()=>XN,set_power_output:()=>vN,special_key:()=>xN});var q={};t.r(q),t.d(q,{ai_sensor_20object:()=>zD,ai_sensor_ailocal_class:()=>VD,ai_sensor_ailocal_class_result:()=>BD,ai_sensor_ailocal_train:()=>bD,ai_sensor_asr_recognize:()=>HD,ai_sensor_audio_play:()=>UD,ai_sensor_audio_record:()=>GD,ai_sensor_barcode:()=>CD,ai_sensor_circle:()=>fD,ai_sensor_classifier_faces:()=>qD,ai_sensor_color:()=>YD,ai_sensor_color_chases:()=>xD,ai_sensor_color_chases_result:()=>yD,ai_sensor_config:()=>OD,ai_sensor_face:()=>JD,ai_sensor_find_20objects:()=>QD,ai_sensor_find_barcodes:()=>SD,ai_sensor_find_circles:()=>FD,ai_sensor_find_colors:()=>XD,ai_sensor_find_licenseplates:()=>KD,ai_sensor_find_lines:()=>DD,ai_sensor_find_qrcodes:()=>gD,ai_sensor_find_rects:()=>vD,ai_sensor_find_tags:()=>LD,ai_sensor_licenseplate:()=>WD,ai_sensor_line:()=>ND,ai_sensor_qrcode:()=>cD,ai_sensor_qrcode_lite:()=>ED,ai_sensor_rect:()=>PD,ai_sensor_rgb:()=>RD,ai_sensor_tag:()=>AD,ai_sensor_use_uart_init:()=>mD,ai_sensor_yolo_recognize:()=>wD,ai_sensor_yolo_recognize_result:()=>kD});var z={};t.r(z),t.d(z,{MICROPYTHON_AI_Speech_asr:()=>ZD,MICROPYTHON_AI_Speech_unit:()=>$D,MICROPYTHON_AI_client:()=>jD});var Q={};t.r(Q),t.d(Q,{mpython_blynk_app_data:()=>df,mpython_blynk_app_notify:()=>pf,mpython_blynk_email:()=>If,mpython_blynk_get_timers:()=>uf,mpython_blynk_on_connected:()=>sf,mpython_blynk_on_disconnected:()=>nf,mpython_blynk_run:()=>of,mpython_blynk_sensor_data_to_app:()=>lf,mpython_blynk_set_property:()=>Tf,mpython_blynk_setup:()=>Mf,mpython_blynk_stop_timers:()=>af,mpython_blynk_sync_virtual:()=>ef,mpython_blynk_terminal_widget_vpin:()=>tf,mpython_blynktimer:()=>rf,mpython_blynktimer_run:()=>_f});var j={};t.r(j),t.d(j,{cc_g1_read_bat:()=>hf,cc_g1_read_joystick:()=>mf,cc_g1_read_key:()=>Ef,cc_g1_turnoff:()=>Of});var $={};t.r($),t.d($,{ce_go_dc_motor:()=>Nf,ce_go_get_led_bright:()=>gf,ce_go_get_led_state:()=>Cf,ce_go_hall_attachInterrupt:()=>Df,ce_go_hall_data:()=>Ff,ce_go_hall_initialize:()=>ff,ce_go_led_bright:()=>cf,ce_go_led_brightness:()=>Sf,ce_go_light_number:()=>Rf,ce_go_pin_light:()=>yf,ce_go_pin_near:()=>vf,ce_go_pin_near_line:()=>Pf,ce_go_pin_near_state_change:()=>Yf,ce_go_stepper_keep:()=>Af,ce_go_stepper_stop:()=>Lf,educore_car:()=>xf,educore_car_pin_near:()=>Gf,educore_car_pin_near_line:()=>Bf,educore_car_stepper_keep:()=>bf,educore_car_stepper_stop:()=>Vf,sensor_mixgome_eulerangles:()=>Xf});var Z={};t.r(Z),t.d(Z,{communicate_bluetooth_central_init:()=>cF,communicate_bluetooth_connect:()=>SF,communicate_bluetooth_disconnect:()=>AF,communicate_bluetooth_handle:()=>PF,communicate_bluetooth_is_connected:()=>NF,communicate_bluetooth_mac:()=>LF,communicate_bluetooth_peripheral_init:()=>gF,communicate_bluetooth_recv:()=>FF,communicate_bluetooth_recv_only:()=>fF,communicate_bluetooth_scan:()=>CF,communicate_bluetooth_send:()=>DF,communicate_espnow_init:()=>vF,communicate_espnow_init_new:()=>YF,communicate_i2c_available:()=>qf,communicate_i2c_init:()=>kf,communicate_i2c_master_read:()=>Jf,communicate_i2c_onboard:()=>Uf,communicate_i2c_read:()=>Hf,communicate_i2c_scan:()=>Kf,communicate_i2c_write:()=>Wf,communicate_ir_recv_init:()=>lF,communicate_ir_send_init:()=>hF,communicate_ow_init:()=>_F,communicate_ow_read:()=>aF,communicate_ow_reset:()=>pF,communicate_ow_scan:()=>oF,communicate_ow_select:()=>rF,communicate_ow_write:()=>uF,communicate_spi_buffer:()=>$f,communicate_spi_init:()=>Qf,communicate_spi_onboard:()=>wf,communicate_spi_read:()=>Zf,communicate_spi_read_output:()=>tF,communicate_spi_readinto:()=>eF,communicate_spi_readinto_output:()=>iF,communicate_spi_set:()=>jf,communicate_spi_write:()=>nF,communicate_spi_write_readinto:()=>sF,espnow_radio_channel:()=>BF,espnow_radio_channel_new:()=>UF,espnow_radio_on_off:()=>wF,espnow_radio_rec:()=>HF,espnow_radio_recv:()=>KF,espnow_radio_recv_certain_msg:()=>JF,espnow_radio_recv_certain_msg_new:()=>zF,espnow_radio_recv_msg:()=>WF,espnow_radio_recv_new:()=>qF,espnow_radio_send:()=>kF,espnow_radio_txpower:()=>GF,i2c_slave_onreceive:()=>zf,internal_variable:()=>dF,ir_recv_timeout:()=>MF,ir_transmit_busy:()=>RF,ir_transmit_conventional_data:()=>mF,ir_transmit_raw_code:()=>OF,ir_transmit_study_code:()=>EF,ir_whether_recv:()=>TF,lora_init:()=>QF,lora_packet:()=>jF,lora_recv:()=>ZF,lora_send:()=>$F,network_espnow_info:()=>yF,network_espnow_mac:()=>XF,network_espnow_recv:()=>xF,network_espnow_recv_handle:()=>VF,network_espnow_send:()=>bF,recv_fun:()=>IF,urequests_attribute:()=>eP,urequests_get:()=>tP,urequests_method:()=>iP});var tt={};t.r(tt),t.d(tt,{display_animate:()=>NP,display_circle:()=>DP,display_color_seclet:()=>BP,display_draw_4strings:()=>RP,display_fill:()=>LP,display_lcd_use_i2c_init:()=>WP,display_line:()=>CP,display_line_arbitrarily:()=>cP,display_matrix_extern_bright_point:()=>IP,display_matrix_extern_bright_screen:()=>MP,display_matrix_extern_clear:()=>rP,display_matrix_extern_get_pixel:()=>dP,display_matrix_extern_get_screen_pixel:()=>TP,display_matrix_extern_image_builtins:()=>hP,display_matrix_extern_scroll_string:()=>aP,display_matrix_extern_scroll_string_delay:()=>uP,display_matrix_extern_shift:()=>lP,display_matrix_extern_show_frame_string:()=>oP,display_matrix_extern_show_frame_string_delay:()=>pP,display_matrix_extern_show_image:()=>sP,display_matrix_extern_show_image_or_string_delay:()=>_P,display_matrix_use_i2c_init:()=>nP,display_oled_drawPixel:()=>PP,display_oled_showBitmap:()=>FP,display_oled_use_i2c_init:()=>QP,display_onoff:()=>SP,display_rect:()=>gP,display_tm1650_power:()=>YP,display_tm1650_set_brightness:()=>xP,display_tm1650_show_dot:()=>yP,display_tm1650_show_num:()=>XP,display_tm_use_i2c_init:()=>vP,display_triangle:()=>fP,display_use_i2c_init:()=>OP,extern_oled_bright_point:()=>av,extern_oled_clear:()=>_v,extern_oled_get_pixel:()=>pv,extern_oled_hvline:()=>rv,extern_oled_line:()=>lv,extern_oled_scroll_string:()=>nv,extern_oled_scroll_string_delay:()=>sv,extern_oled_shape_rect:()=>uv,extern_oled_shift:()=>ov,extern_oled_show_frame_string:()=>ev,extern_oled_show_frame_string_delay:()=>iv,extern_oled_show_image:()=>jP,extern_oled_show_image_or_string_delay:()=>tv,extern_oled_show_image_xy:()=>$P,extern_oled_show_string:()=>ZP,image_shift:()=>AP,lcd_backlight:()=>qP,lcd_clear:()=>zP,lcd_print_string:()=>JP,lcd_show_image_or_string_delay:()=>KP,matrix_extern_image_arithmetic:()=>mP,matrix_extern_image_invert:()=>EP,tft_fill:()=>kP,tft_line_arbitrarily:()=>HP,tft_scroll_string_delay:()=>wP,tft_show_frame_string_delay:()=>UP,tft_show_image_or_string_delay:()=>GP,tft_show_image_xy:()=>VP,tft_use_spi_init:()=>bP});var et={};t.r(et),t.d(et,{bitbot_display_bitmap_create:()=>nY,bitbot_display_image_create:()=>iY,display_available:()=>Sv,display_bitmap_create:()=>gv,display_bright_point:()=>fv,display_bright_screen:()=>Pv,display_clear:()=>Cv,display_get_pixel:()=>Dv,display_get_screen_pixel:()=>Fv,display_image_builtins:()=>Ov,display_image_builtins_all:()=>Rv,display_image_create:()=>cv,display_scroll_string:()=>hv,display_scroll_string_delay:()=>mv,display_shift:()=>Nv,display_show_frame_string:()=>Tv,display_show_frame_string_delay:()=>Mv,display_show_image:()=>dv,display_show_image_or_string_delay:()=>Iv,draw_pointer:()=>RY,image_arithmetic:()=>Av,image_invert:()=>Lv,mixbot_display_bitmap_create:()=>jv,mixbot_display_bright_screen:()=>tY,mixbot_display_get_ambientbright:()=>Zv,mixbot_display_get_screen_pixel:()=>$v,mixbot_display_image_create:()=>Qv,mixbot_display_rotate:()=>eY,mixgo_display_bitmap_create:()=>Vv,mixgo_display_image_create_new:()=>bv,mixgome_display_bitmap_create:()=>Yv,mixgome_display_font:()=>xv,mixgome_display_image_create:()=>vv,mixgomini_display_bitmap_create:()=>yv,mixgomini_display_image_create:()=>Xv,mpython_display_hvline:()=>qv,mpython_display_line:()=>zv,mpython_display_shape_rect:()=>Jv,mpython_pbm_image:()=>Bv,nova_draw_pointer:()=>cY,onboard_oled_bright_point:()=>Kv,onboard_oled_scroll_string_delay:()=>Wv,onboard_oled_show_frame_string_delay:()=>Hv,onboard_oled_show_image:()=>Gv,onboard_oled_show_image_or_string_delay:()=>kv,onboard_oled_show_image_xy:()=>Uv,onboard_oled_show_string:()=>wv,onboard_tft_bright_point:()=>dY,onboard_tft_bright_screen:()=>NY,onboard_tft_clear:()=>DY,onboard_tft_clock_clear:()=>EY,onboard_tft_clock_draw:()=>mY,onboard_tft_clock_get_rtctime:()=>MY,onboard_tft_clock_init:()=>TY,onboard_tft_clock_set_time:()=>hY,onboard_tft_display_hvline:()=>uY,onboard_tft_display_line:()=>rY,onboard_tft_display_shape_circle:()=>OY,onboard_tft_display_shape_rect:()=>aY,onboard_tft_fill:()=>IY,onboard_tft_get_pixel:()=>lY,onboard_tft_get_screen_pixel:()=>LY,onboard_tft_scroll_string_delay:()=>Ev,onboard_tft_shift:()=>AY,onboard_tft_show_frame_string:()=>SY,onboard_tft_show_frame_string_delay:()=>pY,onboard_tft_show_image:()=>CY,onboard_tft_show_image_or_string_delay:()=>oY,onboard_tft_show_image_xy:()=>sY,onboard_tft_show_image_xy_direct:()=>_Y,onboard_tft_show_texts:()=>gY});var it={};t.r(it),t.d(it,{factory_block:()=>xY,factory_block_return:()=>bY,factory_block_return_with_textarea:()=>BY,factory_block_with_textarea:()=>VY,factory_callMethod_noreturn:()=>XY,factory_callMethod_return:()=>yY,factory_declare:()=>YY,factory_from_import:()=>fY,factory_function_noreturn:()=>PY,factory_function_return:()=>vY,factory_import:()=>FY,folding_block:()=>GY});var nt={};t.r(nt),t.d(nt,{inout_analog_atten:()=>eX,inout_analog_read:()=>qY,inout_analog_read_init:()=>tX,inout_analog_write:()=>WY,inout_analog_write_init:()=>ZY,inout_analog_write_set:()=>KY,inout_digital_init:()=>jY,inout_digital_read:()=>kY,inout_digital_write:()=>wY,inout_highlow:()=>UY,inout_pin_attachInterrupt:()=>QY,inout_pin_pressed:()=>zY,inout_pin_pressed_init:()=>iX,inout_pwm_analog_write:()=>HY,inout_pwm_analog_write_init:()=>$Y,inout_pwm_analog_write_set_freq:()=>JY});var st={};t.r(st),t.d(st,{IOT_CONNECT_OLLAMA:()=>FX,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>cX,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>OX,IOT_EMQX_PING:()=>gX,IOT_FORMATTING:()=>mX,IOT_FORMAT_STRING:()=>EX,IOT_MIXIO_NTP:()=>CX,IOT_MIXIO_PUBLISH:()=>rX,IOT_MIXIO_SUBSCRIBE:()=>lX,iot_client_onboard:()=>SX,iot_connect_ollama:()=>fX,iot_connect_openai:()=>PX,iot_http_client:()=>AX,iot_http_data:()=>LX,iot_mixio_check:()=>TX,iot_mixio_connect:()=>uX,iot_mixio_connect_only:()=>IX,iot_mixio_disconnect:()=>dX,iot_mixio_format_msg:()=>hX,iot_mixio_format_topic:()=>MX,iot_mixly_key:()=>RX,iot_mqtt_client:()=>NX,iot_mqtt_data:()=>DX,iot_onenet_check:()=>pX,iot_onenet_connect:()=>sX,iot_onenet_disconnect:()=>_X,iot_onenet_publish:()=>aX,iot_onenet_publish_dict:()=>oX,iot_wifi_connect:()=>nX,ollama_empty_history:()=>XX,use_ollama_llm_to_chat:()=>vX,use_ollama_llm_to_chat_return:()=>YX});var _t={};t.r(_t),t.d(_t,{educore_mqtt_connect:()=>ly,educore_mqtt_connect_success:()=>My,educore_mqtt_subscribe_message:()=>dy,educore_mqtt_topic_publish:()=>Ty,educore_mqtt_topic_subscribe:()=>Iy,educore_wifi_connect:()=>ry,network_ap_connect:()=>kX,network_connect:()=>xX,network_get_connect:()=>VX,network_get_wifi:()=>wX,network_init:()=>yX,network_is_active:()=>UX,network_open:()=>GX,network_scan:()=>HX,network_server:()=>WX,network_socket_accept:()=>QX,network_socket_bind:()=>JX,network_socket_close:()=>ey,network_socket_connect:()=>qX,network_socket_init:()=>KX,network_socket_listen:()=>zX,network_socket_receive:()=>jX,network_socket_receive_from:()=>ZX,network_socket_send:()=>$X,network_socket_send_to:()=>ty,network_stop:()=>BX,network_wifi_connect:()=>bX,ntptime_address:()=>oy,ntptime_time:()=>_y,requests_attribute:()=>ny,requests_attribute2:()=>ay,requests_get:()=>iy,requests_get2:()=>py,requests_method:()=>sy,requests_post:()=>uy});var ot={};t.r(ot),t.d(ot,{CI130X_BROADCAST:()=>Vy,CI130X_GET_THE_RECOGNIZED_CMD:()=>by,CI130X_GET_WHETHER_IDENTIFY:()=>xy,CI130X_IDENTIFY_AND_SAVE:()=>yy,CI130X_SET_SYSTEM_CMD:()=>By,HCSR04:()=>mx,PS2_Button:()=>Rx,PS2_Buttons:()=>cx,PS2_Buttons_new:()=>fx,PS2_State:()=>gx,PS2_init:()=>Ex,PS2_init_new:()=>Nx,PS2_stk:()=>Cx,PS2_stk_new:()=>Fx,PS2_vibration:()=>Ox,PS2_vibration_new:()=>Dx,RTC_get_time:()=>Ax,RTC_set_date:()=>Cy,RTC_set_datetime:()=>Sx,RTC_set_time:()=>gy,camera_sensor_init:()=>pb,camera_sensor_result:()=>ab,column_tube_foot:()=>db,define_keyboards:()=>Ib,educore_body_sensor:()=>jx,educore_button_sensor_extern:()=>eb,educore_camera_sensor:()=>ob,educore_infrared_sensor:()=>tb,educore_soilhum_sensor:()=>$x,educore_temp_sensor:()=>_b,educore_temphum_sensor:()=>Zx,educore_ultrasonic_sensor:()=>nb,esp32_s2_weather_init:()=>Ix,esp32_s2_weather_rain:()=>Mx,esp32_s2_weather_wd:()=>Tx,esp32_s2_weather_ws:()=>hx,extern_rfid_read:()=>ex,extern_rfid_readcontent:()=>nx,extern_rfid_readid:()=>ix,extern_rfid_status:()=>ox,extern_rfid_write:()=>sx,extern_rfid_write_return:()=>_x,get_keboards_value:()=>Mb,gnss_get_data:()=>Yx,gnss_have_data:()=>Xx,init_matrix_keyboard:()=>Tb,interaction_whether_to_interaction:()=>Yy,interaction_whether_to_interaction_SANT:()=>Xy,line_tube_foot:()=>lb,mixbot_sensor_extern_get_addr:()=>Hx,mixbot_sensor_extern_set_addr:()=>Wx,pm25_get_data:()=>vx,radar_set_DETECTION_THRESHOLD:()=>Py,radar_set_DETECTION_THRESHOLD_SANT:()=>vy,robot_button_extern_get_value:()=>xx,robot_color_extern_get_value:()=>Ux,robot_infrared_extern_get_value:()=>Vx,robot_infrared_extern_grey_get_value:()=>Bx,robot_potentiometer_extern_get_value:()=>Gx,robot_sonar_extern_get_value:()=>wx,robot_sonar_extern_led:()=>kx,robot_touch_extern_get_value:()=>bx,sensor_APDS9960_extern:()=>Uy,sensor_DS18X20:()=>Qx,sensor_LTR308_extern:()=>wy,sensor_LTR390UV_extern:()=>zy,sensor_MAX30102_extern:()=>Gy,sensor_QMC5883L_extern:()=>Qy,sensor_VL530LX_extern:()=>Zy,sensor_aht11_extern:()=>$y,sensor_bmp:()=>Dy,sensor_dht11:()=>Lx,sensor_distance_hrsc04:()=>cy,sensor_hp203_extern:()=>ky,sensor_ltr381_extern:()=>Jy,sensor_mixgo_extern_button_attachInterrupt:()=>Oy,sensor_mixgo_extern_button_get_presses:()=>Ey,sensor_mixgo_extern_button_is_pressed:()=>hy,sensor_mixgo_extern_button_was_pressed:()=>my,sensor_mixgo_extern_light:()=>Sy,sensor_mixgo_extern_pin_near:()=>Ly,sensor_mixgo_extern_sound:()=>Ay,sensor_mixgoce_hot_wheel_degrees:()=>dx,sensor_mixgoce_hot_wheel_is_touched:()=>lx,sensor_mpu9250_attachGestureInterrupt:()=>Ry,sensor_ms5611_extern:()=>Wy,sensor_ms5611_extern_altitude:()=>Ky,sensor_read_humiture:()=>ib,sensor_rtc_init:()=>Ny,sensor_sht:()=>fy,sensor_shtc3_extern:()=>jy,sensor_spl06_001_extern:()=>Hy,sensor_ucs12071_extern:()=>qy,sensor_use_i2c_init:()=>Fy,sensor_use_spi_init:()=>tx,sensor_use_uart_init:()=>Px,sensor_weather_solo_init:()=>Kx,sensor_weather_solo_rain:()=>zx,sensor_weather_solo_wd:()=>Jx,sensor_weather_solo_ws:()=>qx,sensor_weigh_init:()=>ub,tvoc_get_data:()=>yx,ultrasonic_sensor_read_distance:()=>sb,weather_data:()=>px,weather_have_data:()=>ax,weather_set_label:()=>rx,weather_uart_mixio:()=>ux,weigh_sensor_get_weight:()=>rb});var pt={};t.r(pt),t.d(pt,{HCSR04:()=>Sb,bitbot_als_num:()=>KV,dht11:()=>tB,educore_button_sensor:()=>pB,educore_button_was_pressed:()=>aB,educore_gyroscope_sensor:()=>sB,educore_gyroscope_sensor_read:()=>_B,educore_gyroscope_sensor_shake:()=>oB,educore_light_sensor:()=>nB,educore_rfid_sensor:()=>uB,educore_rfid_sensor_scan:()=>rB,educore_rfid_sensor_scan_data:()=>lB,educore_voice_sensor:()=>eB,number1:()=>Ab,number2:()=>Lb,number3:()=>Nb,number4:()=>Db,number5:()=>fb,number6:()=>Fb,number7:()=>Pb,onboard_RTC_get_time:()=>gV,onboard_RTC_get_time_str:()=>AV,onboard_RTC_get_timestamp:()=>CV,onboard_RTC_get_timetuple_to_str:()=>LV,onboard_RTC_set_datetime:()=>RV,onboard_RTC_settime_string:()=>cV,onboard_RTC_timestamp_totuple:()=>SV,rfid_readcontent:()=>Jb,rfid_readid:()=>Kb,rfid_status:()=>Qb,rfid_write:()=>qb,rfid_write_return:()=>zb,sensor_LTR308:()=>Ub,sensor_adxl345_get_acceleration:()=>_V,sensor_aht11:()=>Hb,sensor_bitbot_ALS:()=>WV,sensor_button_get_presses:()=>zV,sensor_button_is_pressed:()=>JV,sensor_button_was_pressed:()=>qV,sensor_compass_reset:()=>lV,sensor_ds18x20:()=>Bb,sensor_eulerangles:()=>$b,sensor_get_acceleration:()=>jb,sensor_get_temperature:()=>Wb,sensor_get_the_coprocessor_version:()=>dB,sensor_hp203:()=>kb,sensor_light:()=>ZV,sensor_lm35:()=>Gb,sensor_mixbot_get_gyro:()=>HV,sensor_mixbot_patrol_calibrate:()=>UV,sensor_mixbot_patrol_value:()=>wV,sensor_mixbot_temperature:()=>kV,sensor_mixgo_LTR308:()=>xb,sensor_mixgo_button_attachInterrupt:()=>Ob,sensor_mixgo_button_get_presses:()=>Eb,sensor_mixgo_button_is_pressed:()=>hb,sensor_mixgo_button_was_pressed:()=>mb,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>fV,sensor_mixgo_cc_mmc5603_get_angle:()=>DV,sensor_mixgo_cc_mmc5603_get_magnetic:()=>NV,sensor_mixgo_light:()=>$V,sensor_mixgo_nova_LTR308:()=>Vb,sensor_mixgo_nova_pin_near:()=>yb,sensor_mixgo_pin_near:()=>Xb,sensor_mixgo_pin_near_double:()=>Yb,sensor_mixgo_pin_near_single:()=>vb,sensor_mixgo_pin_pressed:()=>nV,sensor_mixgo_sant_color:()=>bb,sensor_mixgo_touch_slide:()=>iV,sensor_mixgocar42_button_attachInterrupt:()=>Cb,sensor_mixgocar42_button_get_presses:()=>gb,sensor_mixgocar42_button_is_pressed:()=>Rb,sensor_mixgocar42_button_was_pressed:()=>cb,sensor_mixgocar_battery_left:()=>GV,sensor_mixgocar_pin_near:()=>VV,sensor_mixgocar_pin_near_line:()=>bV,sensor_mixgocar_pin_near_state_change:()=>BV,sensor_mixgoce_pin_pressed:()=>eV,sensor_mixgoce_temperature:()=>PV,sensor_mixgome_temperature:()=>FV,sensor_mpu9250_calibrate_compass:()=>aV,sensor_mpu9250_field_strength:()=>rV,sensor_mpu9250_gesture:()=>Zb,sensor_mpu9250_get_acceleration:()=>tV,sensor_mpu9250_get_gyro:()=>pV,sensor_mpu9250_get_magnetic:()=>oV,sensor_mpu9250_temperature:()=>uV,sensor_mpython_pin_pressed:()=>sV,sensor_mpython_qmi8658_get_gyro:()=>vV,sensor_mpython_qmi8658_temperature:()=>YV,sensor_onboard_compass_reset:()=>OV,sensor_onboard_mpu9250_calibrate_compass:()=>hV,sensor_onboard_mpu9250_field_strength:()=>EV,sensor_onboard_mpu9250_gesture:()=>dV,sensor_onboard_mpu9250_get_acceleration:()=>IV,sensor_onboard_mpu9250_get_gyro:()=>MV,sensor_onboard_mpu9250_get_magnetic:()=>TV,sensor_onboard_mpu9250_temperature:()=>mV,sensor_pin_near:()=>jV,sensor_pin_pressed:()=>QV,sensor_read:()=>iB,sensor_rm_acc:()=>xV,sensor_rm_battery_left:()=>yV,sensor_rm_pin_near_double:()=>XV,sensor_sound:()=>wb});var at={};t.r(at),t.d(at,{serial_any:()=>mB,serial_print:()=>IB,serial_print_byte:()=>TB,serial_print_hex:()=>hB,serial_println:()=>MB,serial_read_from_ai:()=>DB,serial_readline:()=>OB,serial_readstr:()=>EB,serial_send_to_ai:()=>NB,serial_softserial:()=>RB,serial_softserial_new:()=>cB,system_input:()=>gB,system_print:()=>CB,system_print_end:()=>AB,system_print_inline:()=>SB,system_print_many:()=>LB});var ut={};t.r(ut),t.d(ut,{Panic_with_status_code:()=>GB,Timer_init:()=>eG,base_delay:()=>sG,controls_delay:()=>WB,controls_delay_new:()=>KB,controls_end_program:()=>wB,controls_millis:()=>UB,controls_uname:()=>HB,reset:()=>kB,system_bitbot_shutdown:()=>tG,system_device_name:()=>VB,system_device_serial_number:()=>BB,system_event_bus_source:()=>xB,system_event_bus_value:()=>bB,system_machine_reset:()=>ZB,system_on_event:()=>YB,system_raise_event:()=>vB,system_reset:()=>FB,system_run_in_background:()=>fB,system_ticks_diff:()=>zB,system_timer:()=>qB,system_timer_init:()=>QB,system_timestamp:()=>XB,system_value:()=>yB,system_wait:()=>PB,system_wdt_feed:()=>$B,system_wdt_init:()=>jB,time_ticks_diff:()=>nG,timer:()=>JB,timer2:()=>iG});var rt={};t.r(rt),t.d(rt,{Air_daily_content:()=>mG,Air_now_content:()=>rG,Geo_moon_content:()=>OG,Geo_sun_content:()=>EG,Life_suggestion_content:()=>dG,Location_search_content:()=>TG,Tide_daily_content:()=>IG,WEATHER_DAILY:()=>oG,WEATHER_HOUR:()=>pG,WEATHER_NOW:()=>_G,Weather_alarm_content:()=>lG,Weather_daily:()=>MG,Weather_daily_content:()=>hG,Weather_now:()=>aG,Weather_now_content:()=>uG});var lt={};t.r(lt),t.d(lt,{controls_pin_attachInterrupt:()=>BG,inout_analog_atten:()=>fG,inout_analog_write:()=>NG,inout_analog_write_init:()=>YG,inout_analog_write_set:()=>DG,inout_analog_write_set_freq:()=>yG,inout_digital_init:()=>vG,inout_digital_read:()=>LG,inout_digital_write:()=>AG,inout_highlow:()=>SG,inout_pinMode:()=>xG,inout_pin_attachInterrupt:()=>PG,inout_pin_pressed:()=>FG,inout_pin_pressed_init:()=>XG,pin_pressed:()=>VG,pin_pressed_init:()=>bG});var dt={};t.r(dt),t.d(dt,{mini_g2_aht11:()=>UG,mini_g2_hp203:()=>wG,mini_g2_rfid_readcontent:()=>WG,mini_g2_rfid_readid:()=>HG,mini_g2_rfid_status:()=>qG,mini_g2_rfid_write:()=>KG,mini_g2_rfid_write_outcome:()=>JG,mini_g2_varistor:()=>kG});var It={};t.r(It),t.d(It,{me_go_dc_motor:()=>nU,me_go_get_led_bright:()=>$G,me_go_get_led_state:()=>ZG,me_go_hall_attachInterrupt:()=>sU,me_go_hall_data:()=>oU,me_go_hall_initialize:()=>_U,me_go_led_bright:()=>jG,me_go_led_brightness:()=>tU,me_go_light_number:()=>QG,me_go_pin_light:()=>lU,me_go_pin_near:()=>aU,me_go_pin_near_line:()=>pU,me_go_pin_near_state_change:()=>uU,me_go_stepper_keep:()=>eU,me_go_stepper_stop:()=>iU,sensor_mixgome_eulerangles:()=>rU});var Tt={};t.r(Tt),t.d(Tt,{analog_input:()=>RU,analog_output:()=>gU,espnow_channel:()=>mU,haskylens_model:()=>EU,i2c_A_pin:()=>CU,i2c_B_pin:()=>SU,pins_analog:()=>fU,pins_analog_pin:()=>FU,pins_axis:()=>JU,pins_brightness:()=>qU,pins_builtinimg:()=>GU,pins_builtinimg_extern:()=>UU,pins_button:()=>YU,pins_buttonB:()=>XU,pins_dac:()=>PU,pins_dac_pin:()=>vU,pins_digital:()=>IU,pins_digital_dot:()=>iw,pins_digital_pin:()=>TU,pins_exlcdh:()=>WU,pins_exlcdv:()=>KU,pins_imglist:()=>wU,pins_input_pin:()=>MU,pins_one_more:()=>ew,pins_output_pin:()=>hU,pins_playlist:()=>kU,pins_playlist_extern:()=>HU,pins_pwm:()=>yU,pins_pwm_pin:()=>xU,pins_radio_datarate:()=>tw,pins_radio_power:()=>ZU,pins_serial:()=>BU,pins_tone_notes:()=>$U,pins_touch:()=>VU,pins_touch_pin:()=>bU,pins_tts_bgmusic:()=>jU,pins_tts_builtin_music:()=>QU,pins_tts_voice:()=>zU,pwm_input:()=>OU,pwm_output:()=>cU,spi_A_pin:()=>AU,spi_B_pin:()=>LU,spi_C_pin:()=>NU,spi_D_pin:()=>DU});var Mt={};t.r(Mt),t.d(Mt,{inout_analog_atten:()=>dw,inout_analog_write:()=>ow,inout_analog_write_init:()=>lw,inout_analog_write_set:()=>pw,inout_digital_init:()=>rw,inout_digital_read:()=>_w,inout_digital_write:()=>sw,inout_highlow:()=>nw,inout_pin_attachInterrupt:()=>uw,inout_pin_pressed:()=>aw,inout_pin_pressed_init:()=>Iw});var ht={};t.r(ht),t.d(ht,{mini_g2_aht11:()=>Tw,mini_g2_hp203:()=>Mw,mini_g2_rfid_readcontent:()=>Ew,mini_g2_rfid_readid:()=>mw,mini_g2_rfid_status:()=>cw,mini_g2_rfid_write:()=>Ow,mini_g2_rfid_write_outcome:()=>Rw,mini_g2_varistor:()=>hw});var mt={};t.r(mt),t.d(mt,{me_go_dc_motor:()=>fw,me_go_get_led_bright:()=>Sw,me_go_get_led_state:()=>Aw,me_go_hall_attachInterrupt:()=>Fw,me_go_hall_data:()=>vw,me_go_hall_initialize:()=>Pw,me_go_led_bright:()=>Cw,me_go_led_brightness:()=>Lw,me_go_light_number:()=>gw,me_go_pin_light:()=>bw,me_go_pin_near:()=>Xw,me_go_pin_near_line:()=>Yw,me_go_pin_near_state_change:()=>yw,me_go_stepper_keep:()=>Nw,me_go_stepper_stop:()=>Dw,sensor_mixgome_eulerangles:()=>xw});var Et={};t.r(Et),t.d(Et,{analog_input:()=>Jw,analog_output:()=>zw,espnow_channel:()=>Ww,haskylens_model:()=>Kw,i2c_A_pin:()=>Qw,i2c_B_pin:()=>jw,pins_analog:()=>nk,pins_analog_pin:()=>ik,pins_axis:()=>mk,pins_brightness:()=>Rk,pins_builtinimg:()=>dk,pins_builtinimg_extern:()=>Ik,pins_button:()=>Bw,pins_buttonB:()=>Gw,pins_dac:()=>pk,pins_dac_pin:()=>ok,pins_digital:()=>Vw,pins_digital_dot:()=>Dk,pins_digital_pin:()=>Uw,pins_exlcdh:()=>Ek,pins_exlcdv:()=>Ok,pins_imglist:()=>Tk,pins_input_pin:()=>ww,pins_interrupt:()=>rk,pins_one_more:()=>Nk,pins_output_pin:()=>kw,pins_playlist:()=>Mk,pins_playlist_extern:()=>hk,pins_pwm:()=>_k,pins_pwm_input:()=>Hw,pins_pwm_pin:()=>sk,pins_radio_datarate:()=>Lk,pins_radio_power:()=>Ak,pins_serial:()=>lk,pins_tone_notes:()=>Sk,pins_touch:()=>uk,pins_touch_pin:()=>ak,pins_tts_bgmusic:()=>Ck,pins_tts_builtin_music:()=>gk,pins_tts_voice:()=>ck,pwm_output:()=>qw,spi_A_pin:()=>$w,spi_B_pin:()=>Zw,spi_C_pin:()=>tk,spi_D_pin:()=>ek});const Ot=Blockly,Rt=Mixly,ct={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(o+=n)):i=o}else i="i";return i}},gt=ct; +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class Ct{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Ot.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Ot.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Ot.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_if_else");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Ot.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(Ot.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Ot.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},wt={init:function(){this.setColour(xt),this.appendValueInput("FROM").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.PYTHON_RANGE).appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Ot.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},kt={init:function(){this.setColour(xt),this.appendValueInput("LIST").setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Ot.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Ot.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Ht={init:function(){this.setColour(xt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Ot.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Ot.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Ot.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Ot.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Ot.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Wt={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Ot.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Ot.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Ot.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Ot.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Ot.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_finally");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Ot.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Ot.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Kt={init:function(){this.setColour(xt);var t=new Ot.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Ot.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Ot.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Ot.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Ot.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Ot.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Jt={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Ot.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Ot.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},qt={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Ot.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Ot.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Ht.OPERATORS=[[Ot.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Ot.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Kt.OPERATORS=[[Ot.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Ot.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const zt={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Ot.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Qt={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},jt={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Ot.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},$t={init:function(){this.setColour(xt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},Zt={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Ot.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},te={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Ot.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},ee={init:function(){this.jsonInit({message0:Ot.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:xt,tooltip:Ot.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Ot.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},ie={init:function(){this.setColour(xt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Ot.Msg.MIXLY_STAT),this.setOutput(!0)}},ne={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},se={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Ot.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},_e={init:function(){this.appendDummyInput().appendField(Ot.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Ot.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Ot.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Ot.FieldDropdown([[Ot.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Ot.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(xt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},oe={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pe={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},ae={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},ue={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Ot.Msg.PROCEDURES_DEFRETURN_RETURN+Ot.Msg.MIXLY_GET_UNIQUE_IDEN)}},re={init:function(){this.setColour(xt),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Ot.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},le={init:function(){this.setColour(xt),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},de=230;Ot.FieldTextInput.math_number_validator=function(t){return String(t)},Ot.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const Ie={init:function(){this.setColour(de),this.appendDummyInput().appendField(new Ot.FieldTextInput("0",Ot.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MATH_NUMBER_TOOLTIP)}},Te={init:function(){this.setColour(de);this.appendDummyInput("").appendField(Ot.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Ot.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Ot.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Ot.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Me={init:function(){this.setColour(de);this.appendDummyInput("").appendField(Ot.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Ot.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Ot.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Ot.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},he={init:function(){this.setColour(de),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Ot.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Ot.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},me={init:function(){this.setColour(de),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Ot.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Ot.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Ot.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Ee={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Ot.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Oe={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Ot.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Ot.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Ot.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Ot.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Ot.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Ot.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Ot.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Ot.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Re={init:function(){var t=[[Ot.Msg.MATH_BIN,"bin"],[Ot.Msg.MATH_OCT,"oct"],[Ot.Msg.MATH_HEX,"hex"]];this.setColour(de),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Ot.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:Ot.Msg.MATH_DEC_TOOLTIP_BIN,oct:Ot.Msg.MATH_DEC_TOOLTIP_OCT,hex:Ot.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},ce={init:function(){var t=[[Ot.Msg.LANG_MATH_TO_ROUND,"round"],[Ot.Msg.LANG_MATH_TO_CEIL,"ceil"],[Ot.Msg.LANG_MATH_TO_FLOOR,"floor"],[Ot.Msg.MATH_ABS,"fabs"],[Ot.Msg.MATH_SQRT,"sqrt"]];this.setColour(de),this.appendValueInput("A").setCheck(Number).appendField(new Ot.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Ot.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Ot.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Ot.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Ot.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Ot.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Ot.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},ge={init:function(){var t=[[Ot.Msg.MIXLY_MAX,"max"],[Ot.Msg.MIXLY_MIN,"min"]];this.setColour(de),this.appendValueInput("A").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(new Ot.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Ot.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Ot.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Ot.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Ce={init:function(){var t=[[Ot.Msg.MATH_TWO,"two"],[Ot.Msg.MATH_EIGHT,"eight"],[Ot.Msg.MATH_TEN,"ten"],[Ot.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(de),this.appendDummyInput("").appendField(Ot.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Ot.FieldDropdown(t),"OP").appendField(Ot.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.MATH_ZHW).appendField(new Ot.FieldDropdown(t),"OP2").appendField(Ot.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:Ot.Msg.MATH_Before_two,eight:Ot.Msg.MATH_Before_eight,ten:Ot.Msg.MATH_Before_ten,sixteen:Ot.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:Ot.Msg.MATH_Behind_two,eight:Ot.Msg.MATH_Behind_eight,ten:Ot.Msg.MATH_Behind_ten,sixteen:Ot.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},Se={init:function(){var t=[[Ot.Msg.LANG_MATH_INT,"int"],[Ot.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(de),this.setOutput(!0,Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Ot.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Ot.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:Ot.Msg.LANG_MATH_INT,float:Ot.Msg.LANG_MATH_FLOAT_RANDOM};return Ot.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Ae={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Ot.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Ot.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Ot.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MATH_CONSTRAIN_TOOLTIP)}},Le={init:function(){this.setColour(de),this.appendValueInput("NUM",Number).appendField(Ot.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Ot.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Ot.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Ne={init:function(){this.setColour(de),this.appendDummyInput().appendField(new Ot.FieldTextInput("0",Ot.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Ot.Msg.MATH_NUMBER_TOOLTIP)}},De={init:function(){this.setColour(de),this.appendValueInput("NUM").setCheck(Number).appendField(Ot.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},fe={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Ot.Msg.MATH_ROUND).appendField(Ot.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Ot.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MATH_ROUND_NEW_TOOLTIP)}},Fe={init:function(){var t=[[Ot.Msg.MIXLY_TO_INT,"int"],[Ot.Msg.MIXLY_TO_FLOAT,"float"],[Ot.Msg.MIXLY_TO_BITES,"b"],[Ot.Msg.LANG_MATH_BYTE+Ot.Msg.MIXLY_TO_INT,"bti"]];this.setColour(de),this.appendValueInput("VAR").appendField(new Ot.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Ot.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Ot.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Ot.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},Pe={init:function(){var t=[[Ot.Msg.MIXLY_TO_INT,"int"],[Ot.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(de),this.appendValueInput("VAR").appendField(new Ot.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Ot.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Ot.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},ve=Le,Ye={init:function(){this.setColour(de),this.appendValueInput("VAR").appendField(Ot.Msg.LANG_MATH_BYTE+Ot.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},Xe={init:function(){this.setColour(de),this.itemCount_=1,this.setMutator(new Ot.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(Ot.Msg.MIXLY_PRODUCT+Ot.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(Ot.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(Ot.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(Ot.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const Ge={init:function(){this.setColour(be),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Ot.FieldTextInput("",Ot.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new Ot.FieldImage(e,7,12,'"')}},Ue={init:function(){this.setColour(be),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Ot.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},we={init:function(){this.setColour(be),this.appendValueInput("VAR").setCheck(Number).appendField(Ot.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},ke={init:function(){this.setColour(be),this.appendValueInput("VAR").setCheck(String).appendField(Ot.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},He={init:function(){this.setColour(be),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},We={init:function(){this.setColour(be),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Ke={init:function(){this.WHERE_OPTIONS=[[Ot.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Ot.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Ot.Msg.TEXT_GET_INDEX_RANDOM+1+Ot.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Ot.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(be),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.LISTS_GET_INDEX_GET,"MODE"),Ot.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Ot.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=Ot.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=Ot.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=Ot.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=Ot.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+Ot.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Ot.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:Ot.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Ot.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Ot.Msg.TEXT_GET_INDEX_RANDOM};return Ot.Msg.PROCEDURES_DEFRETURN_RETURN+Ot.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+Ot.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==Ot.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),Ot.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Ot.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new Ot.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),Ot.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Je={init:function(){this.setHelpUrl(Ot.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(be),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Ot.Msg.LISTS_GET_INDEX_GET+" "+Ot.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Ot.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Ot.Msg.PROCEDURES_DEFRETURN_RETURN+Ot.Msg.MIXLY_MICROBIT_TYPE_STRING+Ot.Msg.LISTS_GET_INDEX_FROM_START+"n"+Ot.Msg.TEXT_CHARAT2)}},qe={init:function(){this.setHelpUrl(Ot.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(be),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Ot.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Ot.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},ze={init:function(){this.WHERE_OPTIONS_1=[[Ot.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Ot.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Ot.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Ot.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Ot.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Ot.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Ot.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(be),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(Ot.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==Ot.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==Ot.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),Ot.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(Ot.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new Ot.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Qe={init:function(){this.setHelpUrl(Ot.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(be),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Ot.Msg.LISTS_GET_INDEX_GET+" "+Ot.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Ot.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Ot.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Ot.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},je={init:function(){var t=[[Ot.Msg.MIXLY_EQUALS,"==="],[Ot.Msg.MIXLY_STARTSWITH,"startswith"],[Ot.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(be),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Ot.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},$e={init:function(){this.setColour(be),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Ot.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_COMPARETO_HELP)}},Ze={init:function(){var t=[[Ot.Msg.TEXT_UPPER,"upper"],[Ot.Msg.TEXT_TITLE,"title"],[Ot.Msg.TEXT_CAPITALIZE,"capitalize"],[Ot.Msg.TEXT_SWAPCASE,"swapcase"],[Ot.Msg.TEXT_LOWER,"lower"]];this.setColour(be),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Ot.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:Ot.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Ot.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Ot.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Ot.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Ot.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},ti={init:function(){var t=[[Ot.Msg.TEXT_LJUST,"ljust"],[Ot.Msg.TEXT_CENTER,"center"],[Ot.Msg.TEXT_RJUST,"rjust"]];this.setColour(be),this.appendValueInput("VAR").appendField(new Ot.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Ot.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Ot.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},ei={init:function(){this.setColour(be),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Ot.Msg.MIXLY_MID+Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Ot.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ii={init:function(){this.setColour(be),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Ot.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},ni={init:function(){this.setColour(be),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Ot.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Ot.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},si={init:function(){this.setColour(be),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Ot.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Ot.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Ot.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},_i={init:function(){var t=[[Ot.Msg.TEXT_TRIM_BOTH,"strip"],[Ot.Msg.TEXT_TRIM_LEFT,"lstrip"],[Ot.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(be),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Ot.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Ot.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(Ot.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:Ot.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Ot.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Ot.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},oi={init:function(){this.setColour(be),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Ot.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Ot.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Ot.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},nn={init:function(){this.setColour(tn),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Ot.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},sn={init:function(){this.setColour(tn),this.appendDummyInput().appendField(Ot.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},_n={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.DICT_KEYS),this.setTooltip(Ot.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},on={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Ot.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Ot.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Ot.Msg.DICTS_GET_TOOLTIP)}},pn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Ot.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Ot.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Ot.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Ot.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},an={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Ot.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Ot.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},un={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Ot.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Ot.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.DICTS_DELETE_TOOLTIP)}},rn={init:function(){this.setColour(tn),this.appendValueInput("DICT2").setCheck("Dict").appendField(Ot.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Ot.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MID),this.setTooltip(Ot.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ln={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.DICT_CLEAR),this.setTooltip(Ot.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.DICT_ITEMS),this.setTooltip(Ot.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},In={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.DICT_VALUES),this.setTooltip(Ot.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Tn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_LENGTH),this.setTooltip(Ot.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Mn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.DICT_DELDICT),this.setTooltip(Ot.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hn={init:function(){this.MODE=[[Ot.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Ot.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Ot.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Ot.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=Ot.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=Ot.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==Ot.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new Ot.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},mn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Ot.Msg.DICTS_ADD_VALUE),this.setTooltip(Ot.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},En={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Ot.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Ot.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.DICTS_SETDEFAULT_TOOLTIP)}},On={init:function(){this.setColour(tn),this.appendDummyInput("").appendField(new Ot.FieldLabel(Ot.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new Ot.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Ot.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Rn={init:function(){this.setColour(tn),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Ot.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},cn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_TO_JSON),this.setTooltip(Ot.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},gn={init:function(){this.setColour(tn),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Ot.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Cn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Sn={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_TO_JSON),this.setTooltip(Ot.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},An=210,Ln={init:function(){var t=Ot.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Ot.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:Ot.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Ot.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Ot.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Ot.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Ot.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Ot.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},Nn={init:function(){var t=Ot.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=Ot.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Ot.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new Ot.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Dn={init:function(){var t=[[Ot.Msg.LOGIC_OPERATION_AND,"AND"],[Ot.Msg.LOGIC_OPERATION_OR,"OR"],[Ot.Msg.LOGIC_OPERATION_NOR,"NOR"],[Ot.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Ot.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:Ot.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Ot.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Ot.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Ot.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},fn={init:function(){this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Ot.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Ot.Msg.LOGIC_NEGATE_TOOLTIP)}},Fn={init:function(){var t=[[Ot.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Ot.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Ot.FieldDropdown(t),"BOOL"),this.setTooltip(Ot.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Pn={init:function(){this.setColour(An),this.setOutput(!0),this.appendDummyInput().appendField(Ot.Msg.LOGIC_NULL),this.setTooltip(Ot.Msg.LOGIC_NULL_TOOLTIP)}},vn={init:function(){this.setColour(An),this.appendValueInput("A"),this.appendValueInput("B").appendField(Ot.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Ot.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},Yn={init:function(){var t=[[Ot.Msg.TEXT_APPEND_TO,"in"],[Ot.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(An),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Ot.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(Ot.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Ot.Msg.IN)}},Xn={init:function(){var t=[[Ot.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Ot.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(An),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Ot.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},yn={init:function(){this.setColour(An),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Ot.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},xn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Ot.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},bn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Ot.Msg.MIXLY_USE,n=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Ot.Msg.MIXLY_BELONG;return i+{r:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Vn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Ot.Msg.MIXLY_USE,n=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Ot.Msg.MIXLY_BELONG,o=Ot.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Ot.Msg.MIXPY_TEXT_ENCODE).appendField(new Ot.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Ot.Msg.MIXLY_USE,n=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Ot.Msg.MIXLY_BELONG,o=Ot.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},Gn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Ot.Msg.MIXLY_MICROBIT_TYPE_STRING+Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MICROBIT_PYTHON_TYPE)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Ot.Msg.HTML_FILE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Jn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const qn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},jn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},$n={init:function(){this.setColour(0),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Zn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Ot.Msg.MIXLY_ESP32_SET+{mkdir:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},ts={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Ot.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},es={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},is={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.HTML_FILE,"isfile"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},ns={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Ot.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SETUP+Ot.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Ot.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ss={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Ot.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},_s={init:function(){var t=Ot.Procedures.findLegalName("",this),e=new Ot.FieldTextInput(t,Ot.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new Ot.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Ot.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Ot.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(Ot.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(Ot.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(Ot.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=Ot.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),Ot.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{Ot.Events.enable()}},mutationToDom:function(t){var e=Ot.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(Ot.Msg.MIXLY_AIP_ATTR).setAlign(Ot.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zs={init:function(){this.setColour(Js),this.appendDummyInput().appendField(Ot.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},t_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(Ot.Msg.HTML_FORM_CONTENT).appendField(new Ot.FieldDropdown([[Ot.Msg.HTML_TEXT,"text"],[Ot.Msg.HTML_EMAIL,"email"],[Ot.Msg.HTML_NUMBER,"number"],[Ot.Msg.HTML_PASSWORD,"password"],[Ot.Msg.HTML_CHECKBOX,"checkbox"],[Ot.Msg.HTML_RADIOBUTTON,"radiobutton"],[Ot.Msg.HTML_BUTTON,"button"],[Ot.Msg.HTML_COLOUR,"colour"],[Ot.Msg.HTML_DATE,"date"],[Ot.Msg.HTML_LOCALTIME,"local time"],[Ot.Msg.HTML_FILE,"file"],[Ot.Msg.HTML_HIDDEN,"hidden"],[Ot.Msg.HTML_IMAGE,"image"],[Ot.Msg.HTML_MONTH,"month"],[Ot.Msg.HTML_RANGE,"range"],[Ot.Msg.HTML_RESET,"reset"],[Ot.Msg.HTML_SEARCH,"search"],[Ot.Msg.HTML_SUBMIT,"submit"],[Ot.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Ot.Msg.HTML_TIME,"time"],[Ot.Msg.HTML_URL,"url"],[Ot.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Ot.Msg.HTML_NAME).appendField(new Ot.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Ot.Msg.HTML_VALUE).appendField(new Ot.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Ot.Msg.MIXLY_AIP_ATTR).setAlign(Ot.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},e_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(new Ot.FieldTextInput("property"),"KEY").appendField(":").appendField(new Ot.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},i_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(new Ot.FieldTextInput("property"),"KEY").appendField(":").appendField(new Ot.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},n_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(Ot.Msg.HTML_TEXT).appendField(new Ot.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},s_=160,__={init:function(){this.setColour(s_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Ot.FieldTable(""),"TEXT")}},o_={init:function(){this.setColour(s_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Ot.FieldMultilineInput(""),"TEXT")}},p_={init:function(){this.setColour(s_),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Ot.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},a_={init:function(){this.setColour(s_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},u_={init:function(){this.setColour(s_),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Ot.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},r_={init:function(){this.setColour(s_),this.appendValueInput("VALUE").appendField(Ot.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},l_={init:function(){this.setColour(s_),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Ot.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Ot.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=Ot.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+t+", "+e+", "+i+")"},Ot.isNumber(n)&&Ot.isNumber(s)&&Ot.isNumber(_))n=parseFloat(n),s=parseFloat(s),_=Math.abs(parseFloat(_)),0==n%1&&0==s%1&&0==_%1?(n<=s?(s++,t=0==n&&1==_?s:n+", "+s,1!=_&&(t+=", "+_)):t=n+", "+--s+", -"+_,t="range("+t+")"):(t=n",GTE:">="};const oa=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",_=e.valueToCode(this,"B",n)||"False";if("AND"==i)var o=s+" and "+_;else if("OR"==i)o=s+" or "+_;else if("NOR"==i)o="not("+s+"^"+_+")";else o=s+"^"+_;return[o,n]},pa=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},aa=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},ua=function(t,e){return["None",e.ORDER_ATOMIC]},ra=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},la=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},da=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},Ia=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Ta=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Ma=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},ha=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},ma=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Ea=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Oa=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Ra=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ca=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ga=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Ca=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},Sa=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Aa=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},La=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Na=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Da=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},fa=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},Fa=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Pa=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},va=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Ya=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},Xa=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},ya=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},xa=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},ba=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),Ot.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var _=[],o=0;o\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},Eu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Ou=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},Ru=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},cu=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},gu=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Cu=function(t,e){return'"},Su=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Au=function(){return this.getFieldValue("TEXT")+"\n"},Lu=function(t){return t.getFieldValue("TEXT")+"\n"},Nu=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Du=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},fu=function(){return""},Fu=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Pu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n")},yu.scrubNakedValue=function(t){return t+"\n"},yu.quote_=function(t){var e="'";return-1!==t.indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},yu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},yu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=Ot.utils.string.wrap(_,yu.COMMENT_WRAP-3),n+=yu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const xu="#74A55B",bu={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_RGB_PIN_COUNT)}},Vu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Ot.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Bu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Ot.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Gu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(Ot.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Uu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Ot.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Ot.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},wu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},ku={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_RESET)}},Hu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Wu={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING).appendField(Ot.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Ku={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Ot.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Ju={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Ot.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},qu={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING).appendField(Ot.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},zu={init:function(){this.setColour(xu),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_SETUP+Ot.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Qu={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_SERVO).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SERVO_MOVE)}},ju={init:function(){this.setColour(xu),this.appendValueInput("VAR").appendField("360°"+Ot.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_SETTING+Ot.Msg.blockpy_turtle_rotate+Ot.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},$u={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("180°"+Ot.Msg.MIXLY_SERVO).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SERVO_MOVE)}},Zu={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("360°"+Ot.Msg.MIXLY_SERVO).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},tr={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("180°"+Ot.Msg.MIXLY_SERVO).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},er={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("360°"+Ot.Msg.MIXLY_SERVO).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},ir={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new Ot.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(Ot.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},nr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Direction).appendField(new Ot.FieldDropdown([[Ot.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Ot.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[Ot.Msg.MOTOR_N,"ms32006.MOT_N"],[Ot.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},sr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new Ot.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Direction).appendField(new Ot.FieldDropdown([[Ot.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Ot.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},_r={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_RGB_PIN_COUNT)}},or={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},pr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},ar={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_WRI)}},ur={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.MIXLY_DURATION).appendField(Ot.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},rr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.PYTHON_RANGE_STEP).appendField(Ot.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},lr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Ot.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new Ot.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SETUP+Ot.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Ot.FieldDropdown([["SYN6288"+Ot.Msg.MIXLY_AipSpeech_synthesis,"SYN6288"],["NS9300"+Ot.Msg.MIXLY_MUSIC_PLAYER,"NS9300"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},dr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_WHETHER).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_STOPPED,"0"],[Ot.Msg.MIXLY_PLAYING,"1"],[Ot.Msg.MIXLY_PAUSED,"2"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},Ir={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_STAT).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MP3_PLAY,"1"],[Ot.Msg.MIXLY_MP3_PAUSE,"2"],[Ot.Msg.MIXLY_STOP,"3"],[Ot.Msg.MIXLY_MP3_PREV,"4"],[Ot.Msg.MIXLY_MP3_NEXT,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendValueInput("volume").appendField(Ot.Msg.MIXLY_MP3_VOL+Ot.Msg.MIXLY_STAT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_PLAYER_SET_VOLUME_TOOLTIP)}},Mr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MODE+Ot.Msg.MIXLY_STAT).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MP3_LOOP_ALL,"0"],[Ot.Msg.MIXLY_MP3_LOOP_ONE,"1"],[Ot.Msg.MIXLY_PLAYER_DIRECTORY_LOOP,"2"],[Ot.Msg.MIXLY_MP3_LOOP_RAM,"3"],[Ot.Msg.MIXLY_PLAYER_SINGLE_STOP,"4"],[Ot.Msg.MIXLY_PLAYER_SEQUENTIAL_PLAY,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_START_MELODY,"play"],[Ot.Msg.MIXLY_PLAYER_INSERT_MUSIC,"insert"]]),"key"),this.appendValueInput("song"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_PLAYER_PLAY_MUSIC_TOOTIP)}},mr={},Er={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(Ot.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Or={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Rr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(Ot.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PROGRAM_BLOCK).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},cr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(Ot.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(Ot.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PROGRAM_BLOCK).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},gr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Cr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_MOTOR).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Sr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_MOTOR).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ar={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_TRAFFIC_LIGHT).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.LISTS_SET_INDEX_SET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Lr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN).appendField(new Ot.FieldDropdown([[Ot.Msg.COLOUR_RGB_WHITE,"W"],[Ot.Msg.COLOUR_RGB_RED,"R"],[Ot.Msg.COLOUR_RGB_YELLOW,"Y"],[Ot.Msg.COLOUR_RGB_GREEN,"G"],[Ot.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Nr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN).appendField(new Ot.FieldDropdown([[Ot.Msg.COLOUR_RGB_WHITE,"W"],[Ot.Msg.COLOUR_RGB_RED,"R"],[Ot.Msg.COLOUR_RGB_YELLOW,"Y"],[Ot.Msg.COLOUR_RGB_GREEN,"G"],[Ot.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET+Ot.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Dr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_SERVO_MOTOR).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[Ot.Msg.MIXLY_SPEED,"[1]"],[Ot.Msg.MATH_SINGLE_OP_ABSOLUTE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[Ot.Msg.MIXLY_RELATIVE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[Ot.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[Ot.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[Ot.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},fr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_SERVO_MOTOR).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[Ot.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[Ot.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Fr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_SERVO_MOTOR).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Pr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_SERVO_MOTOR).appendField(Ot.Msg.MATH_SINGLE_OP_ABSOLUTE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Ot.Msg.MSG.run).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MODE).setAlign(Ot.inputs.Align.RIGHT).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_SPEED+Ot.Msg.MIXLY_MODE,"0"],[Ot.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Ot.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Ot.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(Ot.inputs.Align.RIGHT).appendField(new Ot.FieldDropdown([[Ot.Msg.CLOCKWISE,"0"],[Ot.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[Ot.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},vr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_SERVO_MOTOR).appendField(Ot.Msg.MIXLY_RELATIVE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Ot.Msg.MSG.run).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Yr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_SERVO_MOTOR).appendField(Ot.Msg.MIXLY_RELATIVE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Ot.Msg.MSG.run).appendField("("+Ot.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MODE).setAlign(Ot.inputs.Align.RIGHT).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_SPEED+Ot.Msg.MIXLY_MODE,"0"],[Ot.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Ot.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Ot.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},Xr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.ME_GO_MOTOR_EXTERN+Ot.Msg.MIXLY_SERVO_MOTOR).appendField(Ot.Msg.MIXLY_RELATIVE+Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Ot.Msg.MSG.run).appendField("("+Ot.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LEFT,"0"],[Ot.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MODE).setAlign(Ot.inputs.Align.RIGHT).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_SPEED+Ot.Msg.MIXLY_MODE,"0"],[Ot.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Ot.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Ot.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(Ot.inputs.Align.RIGHT).appendField(new Ot.FieldDropdown([[Ot.Msg.CLOCKWISE,"0"],[Ot.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},yr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.MIXBOT).appendField(Ot.Msg.ME_GO_MOTOR_EXTERN).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MOTOR,"ext_motor"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[Ot.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[Ot.Msg.COLOUR_RGB_RED+"LED","R_LED"],[Ot.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[Ot.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[Ot.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[Ot.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},xr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.MIXBOT).appendField(Ot.Msg.ME_GO_MOTOR_EXTERN).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MOTOR,"ext_motor"],[Ot.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[Ot.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[Ot.Msg.COLOUR_RGB_RED+"LED","R_LED"],[Ot.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[Ot.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[Ot.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[Ot.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},br={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_SETUP+Ot.Msg.MIXLY_AT).appendField(Ot.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Vr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING),this.appendValueInput("pin").appendField("LED"),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Br={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_SERVO+Ot.Msg.MIXLY_SETUP+Ot.Msg.MIXLY_AT).appendField(Ot.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Gr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_SERVO),this.appendValueInput("angle").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_DISPLAY_MATRIX_ROTATE),this.appendDummyInput().appendField(Ot.Msg.DRAW_POINTER_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ur={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_MOTOR+Ot.Msg.MIXLY_SETUP+Ot.Msg.MIXLY_AT).appendField(Ot.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},wr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MOTOR),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Ot.Msg.MIXLY_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},kr="#6C9858",Hr={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(new Ot.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},Wr={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_ESP32_ON,"1"],[Ot.Msg.MIXLY_ESP32_OFF,"0"],[Ot.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Kr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Ot.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_SETONOFF)}},Jr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Ot.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},qr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Ot.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},zr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Ot.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_SETTING+Ot.Msg.MIXLY_BUILDIN_LED+Ot.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},Qr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Ot.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_LCD_SETCOLOR).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_LIGHT_RED,"1"],[Ot.Msg.MIXLY_LIGHT_GREEN,"2"],[Ot.Msg.MIXLY_LIGHT_BLUE,"3"],[Ot.Msg.MIXLY_LIGHT_YELLOW,"4"],[Ot.Msg.MIXLY_LIGHT_CYAN,"5"],[Ot.Msg.MIXLY_LIGHT_PURPLE,"6"],[Ot.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},jr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING).appendField(Ot.Msg.MIXLY_BUILDIN_LED).appendField(new Ot.FieldDropdown([[Ot.Msg.COLOUR_RGB_RED,"r"],[Ot.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_SETONOFF)}},$r={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Ot.Msg.MIXLY_BUILDIN_LED).appendField(new Ot.FieldDropdown([[Ot.Msg.COLOUR_RGB_RED,"r"],[Ot.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},Zr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Ot.Msg.MIXLY_BUILDIN_LED).appendField(new Ot.FieldDropdown([[Ot.Msg.COLOUR_RGB_RED,"r"],[Ot.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},tl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING).appendField(Ot.Msg.MIXLY_BUILDIN_LED).appendField(new Ot.FieldDropdown([[Ot.Msg.COLOUR_RGB_RED,"r"],[Ot.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_SETTING+Ot.Msg.MIXLY_BUILDIN_LED+Ot.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},el={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(new Ot.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},il={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Rt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(Ot.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(Ot.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(Ot.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},nl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},sl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.MIXLY_DURATION).appendField(Ot.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},_l={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.PYTHON_RANGE_STEP).appendField(Ot.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ol={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_WRI)}},pl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Rt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(Ot.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(Ot.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(Ot.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},al={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},ul={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.PYTHON_RANGE_STEP).appendField(Ot.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},rl={init:function(){this.setColour(kr),this.appendValueInput("TICKS").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Ot.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Ot.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},ll={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},dl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_RESET)}},Il={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Ot.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Tl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Ot.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Ml={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hl={init:function(){this.setColour(kr),this.appendValueInput("LIST").appendField(Ot.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},ml={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MOTOR_DC).appendField(new Ot.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Direction).appendField(new Ot.FieldDropdown([[Ot.Msg.CLOCKWISE,"CW"],[Ot.Msg.ANTI_CLOCKWISE,"CCW"],[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},El={init:function(){this.setColour(kr),this.appendDummyInput().appendField("MixGo Car").appendField(new Ot.FieldDropdown([[Ot.Msg.blockpy_forward,"F"],[Ot.Msg.blockpy_backward,"B"],[Ot.Msg.blockpy_left,"L"],[Ot.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ol={init:function(){this.setColour(kr),this.appendDummyInput("").appendField("MixGo Car").appendField(new Ot.FieldDropdown([[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Rl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MOTOR_DC).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[Ot.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Direction).appendField(new Ot.FieldDropdown([[Ot.Msg.CLOCKWISE,"CW"],[Ot.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MOTOR_DC).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[Ot.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_STOP).appendField(new Ot.FieldDropdown([[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},gl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Cl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXBOT).appendField(new Ot.FieldDropdown([[Ot.Msg.blockpy_forward,"F"],[Ot.Msg.blockpy_backward,"B"],[Ot.Msg.blockpy_left,"L"],[Ot.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[Ot.Msg.MIXLY_SPEED,"SPEED"],[Ot.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Sl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXBOT).appendField(new Ot.FieldDropdown([[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Al={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXBOT).appendField(Ot.Msg.MIXLY_MOTOR).appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"1"],[Ot.Msg.TEXT_TRIM_RIGHT,"2"],[Ot.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[Ot.Msg.MIXLY_SPEED,"SPEED"],[Ot.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Ll={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[Ot.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Nl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.BITBOT).appendField(new Ot.FieldDropdown([[Ot.Msg.blockpy_forward,"F"],[Ot.Msg.blockpy_backward,"B"],[Ot.Msg.blockpy_left,"L"],[Ot.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.BITBOT).appendField(new Ot.FieldDropdown([[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.BITBOT).appendField(Ot.Msg.MIXLY_MOTOR).appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"0"],[Ot.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Direction).appendField(new Ot.FieldDropdown([[Ot.Msg.CLOCKWISE,"CW"],[Ot.Msg.ANTI_CLOCKWISE,"CCW"],[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Fl={init:function(){this.setColour(kr),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_SETONOFF)}},Pl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},vl={init:function(){this.setColour(kr),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_SETTING+Ot.Msg.MIXLY_MIXBOT_BUZZER+Ot.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_SETONOFF)}},Yl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_MIXBOT_BUZZER+Ot.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},Xl={init:function(){this.setColour(kr),this.appendValueInput("PATH").appendField(Ot.Msg.MIXLY_RECORD_AUDIO).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(Ot.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},yl={init:function(){this.setColour(kr),this.appendValueInput("PATH").appendField(Ot.Msg.MIXLY_PLAY_AUDIO).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},xl={init:function(){this.setColour(kr),this.appendValueInput("PATH").appendField(Ot.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},bl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Ot.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Vl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.LISTS_SET_INDEX_SET+Ot.Msg.ME_GO_MOTOR_EXTERN).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([["1","1"],["2","2"],["3","3"],["4","4"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.blynk_IOT_IR_POWER+Ot.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Gl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET+Ot.Msg.ME_GO_MOTOR_EXTERN).appendField(Ot.Msg.PIN_NUMBERING).appendField(new Ot.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.blynk_IOT_IR_POWER+Ot.Msg.MIXLY_PINMODEOUT+Ot.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ul={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.LISTS_SET_INDEX_SET+Ot.Msg.ME_GO_MOTOR_EXTERN).appendField(Ot.Msg.MIXLY_ALL+Ot.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(Ot.ALIGN_RIGHT).appendField(Ot.Msg.blynk_IOT_IR_POWER+Ot.Msg.MIXLY_PINMODEOUT+Ot.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},wl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Ot.Msg.ANALOG+Ot.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_RELEASE).appendField(new Ot.FieldDropdown([[Ot.Msg.MICROPYTHON_DISPLAY_YES,"True"],[Ot.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.ANALOG+Ot.Msg.MIXLY_KEYBOARD_INPUT)}},kl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SPECIAL_KEY).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[Ot.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[Ot.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[Ot.Msg.MIXLY_SPECIAL_KEY4,"0x04"],[Ot.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[Ot.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[Ot.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[Ot.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[Ot.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},Hl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GENERAL_KEY).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_SPECIAL_KEY0,"0x00"],["A","0x04"],["B","0x05"],["C","0x06"],["D","0x07"],["E","0x08"],["F","0x09"],["G","0x0A"],["H","0x0B"],["I","0x0C"],["J","0x0D"],["K","0x0E"],["L","0x0F"],["M","0x10"],["N","0x11"],["O","0x12"],["P","0x13"],["Q","0x14"],["R","0x15"],["S","0x16"],["T","0x17"],["U","0x18"],["V","0x19"],["W","0x1A"],["X","0x1B"],["Y","0x1C"],["Z","0x1D"],["1 !","0x1E"],["2 @","0x1F"],["3 #","0x20"],["4 $","0x21"],["5 %","0x22"],["6 ^","0x23"],["7 &","0x24"],["8 *","0x25"],["9 (","0x26"],["0 )","0x27"],["ENTER","0x28"],["ESC","0x29"],["BACKSPACE","0x2A"],["TAB","0x2B"],["SPACE","0x2C"],["- _","0x2D"],["= +","0x2E"],["[ {","0x2F"],["] }","0x30"],["\\ |","0x31"],["; :","0x33"],["' \"","0x34"],["` ~","0x35"],[", <","0x36"],[". >","0x37"],["/ ?","0x38"],["CAPS_LOCK","0x39"],["F1","0x3A"],["F2","0x3B"],["F3","0x3C"],["F4","0x3D"],["F5","0x3E"],["F6","0x3F"],["F7","0x40"],["F8","0x41"],["F9","0x42"],["F10","0x43"],["F11","0x44"],["F12","0x45"],["PRINTSCREEN","0x46"],["SCROLL_LOCK","0x47"],["PAUSE","0x48"],["INSERT","0x49"],["HOME","0x4A"],["PAGE_UP","0x4B"],["DELETE","0x4C"],["END","0x4D"],["PAGE_DOWN","0x4E"],["RIGHT","0x4F"],["LEFT","0x50"],["DOWN","0x51"],["UP","0x52"],["NUM_LOCK","0x53"],["/","0x54"],["*","0x55"],["-","0x56"],["+","0x57"],["ENTER","0x58"],["1","0x59"],["2","0x5A"],["3","0x5B"],["4","0x5C"],["5","0x5D"],["6","0x5E"],["7","0x5F"],["8","0x60"],["9","0x61"],["0","0x62"],[".","0x63"]]),"op"),this.setOutput(!0)}},Wl={init:function(){this.setColour(kr),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new Ot.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(Ot.Msg.GENERALKEY_TUPLE_CREATE_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("generalkey_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;nnew Array(32).fill(0)))},sm={init:function(){this.jsonInit({colour:qh,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:Ot.Msg.MIXLY_MICROBIT_Built_in_image1,message0:Ot.Msg.MIXLY_MICROBIT_Built_in_image})}},_m={init:function(){this.setColour(qh),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new Ot.FieldDropdown(Rt.Profile.default.builtinimg),"image"),this.setOutput(!0,["esp32_image","List"])}},om={init:function(){this.setColour(qh),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Ot.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Ot.FieldDropdown(om.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Ot.Msg.MIXLY_MICROBIT_image_add,"-":Ot.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Ot.Msg.MICROBIT_DISPLAY_UNION,"add"],[Ot.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},pm={init:function(){this.setColour(qh),this.appendValueInput("A").setCheck("esp32_image").appendField(Ot.Msg.MIXLY_MICROBIT_Invert_image1),this.setInputsInline(!0),this.setOutput(!0,"esp32_image")}},am={init:function(){this.setColour(qh),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Ot.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Ot.Msg.DISPLAY_IMAGE_LET2).appendField(new Ot.FieldDropdown(am.OPERATORS),"OP"),this.appendValueInput("val").appendField(Ot.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.DISPLAY_IMAGE_UNIT);Rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Ot.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Ot.Msg.DISPLAY_IMAGE_LET,n=Ot.Msg.DISPLAY_IMAGE_LET2,s=Ot.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:Ot.Msg.MIXLY_UP,shift_down:Ot.Msg.MIXLY_DOWN,shift_left:Ot.Msg.MIXLY_LEFT,shift_right:Ot.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Ot.Msg.MIXLY_UP,"shift_up"],[Ot.Msg.MIXLY_DOWN,"shift_down"],[Ot.Msg.MIXLY_LEFT,"shift_left"],[Ot.Msg.MIXLY_RIGHT,"shift_right"]]},um={init:function(){this.setColour(qh),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},rm={init:function(){this.setColour(qh),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},lm={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},dm={init:function(){this.setColour(qh),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},Im={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Clear_display);Rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Ot.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Clear_display)}},Tm={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SHOW+Ot.Msg.MIXLY_DISPLAY_MATRIX_WRITE_NOW),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Mm={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<8;i++)e.appendField(new Ot.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},hm={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Ot.inputs.Align.CENTRE).appendField(new Ot.FieldBitmap(hm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},mm={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new Ot.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Em={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Ot.inputs.Align.CENTRE).appendField(new Ot.FieldBitmap(Em.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},Om={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<16;i++)e.appendField(new Ot.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,"esp32_image"),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Rm={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Ot.inputs.Align.CENTRE).appendField(new Ot.FieldBitmap(Rm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},cm={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.OLED_SET_FONT).appendField(new Ot.FieldDropdown(cm.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+Ot.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+Ot.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+Ot.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},gm={init:function(){this.setColour(qh),this.appendValueInput("data").appendField(Ot.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.OLED_BITMAP_OR_STRING)}},Cm={init:function(){this.setColour(qh),this.appendValueInput("data").appendField(Ot.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.OLED_BITMAP_OR_STRING)}},Sm={init:function(){this.setColour(qh),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(Ot.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.OLED_BITMAP_OR_STRING)}},Am={init:function(){this.setColour(qh),this.appendValueInput("data").setCheck(String).appendField(Ot.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(Ot.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(Ot.Msg.TEXT_CENTER).appendField(new Ot.FieldDropdown([[Ot.Msg.MICROPYTHON_DISPLAY_YES,"True"],[Ot.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},Lm={init:function(){this.setColour(qh),this.appendValueInput("data").setCheck(String).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(Ot.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},Nm={init:function(){this.setColour(qh),this.appendValueInput("data").setCheck(String).appendField(Ot.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dm={init:function(){this.setColour(qh),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},fm={init:function(){this.jsonInit({colour:qh,args0:[{name:"state",options:[[Ot.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[Ot.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"shape",options:[[Ot.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[Ot.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"}],inputsInline:!0,helpUrl:Ot.Msg.mpython_HELPURL,tooltip:Ot.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:Ot.Msg.MPYTHON_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Fm={init:function(){this.jsonInit({colour:qh,args0:[{name:"state",options:[[Ot.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[Ot.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"dir_h_v",options:[[Ot.Msg.mpython_vertical,"0"],[Ot.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"}],inputsInline:!0,helpUrl:Ot.Msg.mpython_HELPURL,tooltip:Ot.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:Ot.Msg.MPYTHON_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},Pm={init:function(){this.jsonInit({colour:qh,args0:[{name:"state",options:[[Ot.Msg.mpython_display_hline_1,"1"],[Ot.Msg.mpython_display_hline_0,"0"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"}],inputsInline:!0,helpUrl:Ot.Msg.mpython_HELPURL,tooltip:Ot.Msg.mpython_display_line_TOOLTIP,message0:Ot.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},vm={init:function(){this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new Ot.FieldDropdown(vm.IMAGES),"path"),this.setColour(qh),this.setOutput(!0)},IMAGES:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]]},Ym={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<5;i++)e.appendField(new Ot.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Xm={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Ot.inputs.Align.CENTRE).appendField(new Ot.FieldBitmap(Xm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},ym={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},xm={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_AMBIENTBRIGHT),this.setInputsInline(!0),this.setOutput(!0,Number)}},bm={init:function(){this.setColour(qh),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},Vm={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new Ot.FieldDropdown(Vm.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[Ot.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[Ot.Msg.CLOCKWISE+"90"+Ot.Msg.blockpy_setheading_degree,"1"],[Ot.Msg.CLOCKWISE+"180"+Ot.Msg.blockpy_setheading_degree,"2"],[Ot.Msg.CLOCKWISE+"270"+Ot.Msg.blockpy_setheading_degree,"3"]]},Bm={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<12;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new Ot.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Gm={init:function(){this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Ot.inputs.Align.CENTRE).appendField(new Ot.FieldBitmap(Gm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(qh),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},Um={init:function(){this.setColour(qh),this.appendValueInput("data").appendField(Ot.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(Ot.Msg.HTML_COLOUR);Rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Ot.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},wm={init:function(){this.setColour(qh),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.OLED_BITMAP).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("direct").setCheck(String).appendField(Ot.Msg.MIXLY_AipImageClassify_Image+Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},km={init:function(){this.setColour(qh),this.appendValueInput("data").setCheck(String).appendField(Ot.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(Ot.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(Ot.Msg.TEXT_CENTER).appendField(new Ot.FieldDropdown([[Ot.Msg.MICROPYTHON_DISPLAY_YES,"True"],[Ot.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.appendValueInput("VAR").appendField(Ot.Msg.HTML_COLOUR);Rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Ot.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},Hm={init:function(){this.setColour(qh),this.appendValueInput("data").setCheck(String).appendField(Ot.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.appendValueInput("VAR").appendField(Ot.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Wm={init:function(){this.jsonInit({colour:qh,args0:[{name:"shape",options:[[Ot.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[Ot.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Ot.Msg.mpython_HELPURL,tooltip:Ot.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:Ot.Msg.ONBOARD_TFT_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Km={init:function(){this.jsonInit({colour:qh,args0:[{name:"dir_h_v",options:[[Ot.Msg.mpython_vertical,"0"],[Ot.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Ot.Msg.mpython_HELPURL,tooltip:Ot.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:Ot.Msg.ONBOARD_TFT_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},Jm={init:function(){this.jsonInit({colour:qh,args0:[{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Ot.Msg.mpython_HELPURL,tooltip:Ot.Msg.mpython_display_line_TOOLTIP,message0:Ot.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},qm={init:function(){this.setColour(qh),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(Ot.Msg.HTML_COLOUR),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},zm={init:function(){this.setColour(qh),this.appendValueInput("x").setCheck(Number).appendField(Ot.Msg.MIXLY_LCD_SETCOLOR).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("VAR").appendField(Ot.Msg.HTML_COLOUR);Rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Ot.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Qm={init:function(){this.setColour(qh),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_SCREEN_FILL);Rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Ot.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},jm={init:function(){this.setColour(qh),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_INIT_CLOCK),this.appendDummyInput().appendField(Ot.Msg.MIXLY_CENTER_POS),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.OLED_CIRCLE_RADIUS),this.appendValueInput("VAR").appendField(Ot.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},$m={init:function(){this.setColour(qh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Ot.Msg.GET_RTCTIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Zm={init:function(){this.setColour(qh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Ot.Msg.SET_TIME),this.appendValueInput("h").setCheck(Number).appendField(Ot.Msg.MIXLY_HOUR),this.appendValueInput("m").setCheck(Number).appendField(Ot.Msg.MIXLY_MINUTE),this.appendValueInput("s").setCheck(Number).appendField(Ot.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},tE={init:function(){this.setColour(qh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Ot.Msg.DRAW_CLOCK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},eE={init:function(){this.setColour(qh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Ot.Msg.CLEAR_CLOCK),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_STM32_TFT_BACKGROUND_COLOR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},iE={init:function(){this.jsonInit({colour:qh,args0:[{name:"shape",options:[[Ot.Msg.MPYTHON_DISPLAY_HOLLOW,"False"],[Ot.Msg.MPYTHON_DISPLAY_SOLID,"True"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"r",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Ot.Msg.mpython_HELPURL,message0:Ot.Msg.ONBOARD_TFT_DISPLAY_SHAPE_CIRCLE_MESSAGE0,nextStatement:null,previousStatement:null})}},nE={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.DRAW_POINTER).appendField(Ot.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_DRAW_POINTER_DU),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.DRAW_POINTER_TOOLTIP)}},sE={init:function(){this.setColour(qh),this.appendDummyInput().appendField(Ot.Msg.DRAW_POINTER).appendField(Ot.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_DRAW_POINTER_DU),this.appendValueInput("VAR").appendField(Ot.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.DRAW_POINTER_TOOLTIP)}},_E={init:function(){this.setColour(qh),this.appendValueInput("data").appendField(Ot.Msg.MIXLY_Display_long_text),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(Ot.Msg.HTML_COLOUR);Rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Ot.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},oE={init:function(){this.setColour(qh),this.appendValueInput("data").appendField(Ot.Msg.OLED_BITMAP),this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.OLED_BITMAP_OR_STRING),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},pE={init:function(){jh.init.call(this),this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},aE={init:function(){tm.init.call(this),this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},uE={init:function(){am.init.call(this),this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},rE={init:function(){lm.init.call(this),this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},lE={init:function(){dm.init.call(this),this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},dE={init:function(){Im.init.call(this),this.appendDummyInput().appendField(`(${Ot.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Ot.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},IE=180,TE={init:function(){this.setColour(IE),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(Ot.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(Ot.Msg.DISPLAY_IMAGE_LET2).appendField(new Ot.FieldDropdown(TE.OPERATORS),"OP"),this.appendValueInput("val").appendField(Ot.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Ot.Msg.DISPLAY_IMAGE_LET,n=Ot.Msg.DISPLAY_IMAGE_LET2,s=Ot.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Ot.Msg.MIXLY_UP,down:Ot.Msg.MIXLY_DOWN,left:Ot.Msg.MIXLY_LEFT,right:Ot.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Ot.Msg.MIXLY_UP,"up"],[Ot.Msg.MIXLY_DOWN,"down"],[Ot.Msg.MIXLY_LEFT,"left"],[Ot.Msg.MIXLY_RIGHT,"right"]]},ME={init:function(){this.setColour(IE),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Ot.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Ot.FieldDropdown(ME.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Ot.Msg.MIXLY_MICROBIT_image_add,"-":Ot.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Ot.Msg.MICROBIT_DISPLAY_UNION,"+"],[Ot.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},hE={init:function(){this.setColour(IE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Ot.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Ot.FieldDropdown(hE.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Ot.Msg.MIXLY_MICROBIT_IMAGE+{height:Ot.Msg.MIXLY_HEIGHT,width:Ot.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Ot.Msg.MIXLY_HEIGHT,"height"],[Ot.Msg.MIXLY_WIDTH,"width"]]},mE={init:function(){this.setColour(IE),this.appendValueInput("VAR").appendField(Ot.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RECT).appendField(new Ot.FieldDropdown(mE.STATUS),"OP"),this.jsonInit({message0:Ot.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_OLED_RECT)},STATUS:[[Ot.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Ot.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},EE={init:function(){this.setColour(IE),this.appendValueInput("VAR").appendField(Ot.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Ot.FieldDropdown(EE.STATUS),"OP"),this.jsonInit({message0:Ot.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Ot.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Ot.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},OE={init:function(){this.setColour(IE),this.appendValueInput("VAR").appendField(Ot.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_DISPLAY_DRAW+Ot.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new Ot.FieldDropdown(OE.STATUS),"OP"),this.jsonInit({message0:Ot.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Ot.Msg.MIXLY_DISPLAY_DRAW+Ot.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[Ot.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Ot.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},RE="#777777",cE={init:function(){this.setColour(RE),this.appendDummyInput("").appendField("from ").appendField(new Ot.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new Ot.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gE={init:function(){this.setColour(RE),this.appendDummyInput("").appendField("import ").appendField(new Ot.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},CE={init:function(){this.setColour(RE),this.appendDummyInput("").appendField(new Ot.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Ot.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},rO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Ot.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},lO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},dO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},IO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(Ot.Msg.MIXLY_EMQX_SERVER).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Ot.Msg.MIXLY_WIFI_USERNAME).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Ot.Msg.MIXLY_IOT_PASSWORD).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(Ot.Msg.MIXLY_EMQX_PROJECT).setAlign(Ot.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},TO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Ot.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},MO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Ot.Msg.MIXLY_EMQX_SUBSCRIBE+Ot.Msg.MIXLY_MICROBIT_MSG).appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Ot.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},hO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},EO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},OO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Ot.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},RO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},cO={init:function(){this.setColour(nO),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},gO={init:function(){this.setColour(nO),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},CO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},SO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO").appendField(Ot.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(Ot.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},AO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Ot.Msg.MIXLY_EMQX_SERVER).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Ot.Msg.CONTROLS_FOR_INPUT_WITH+Ot.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(Ot.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},LO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Ot.Msg.MIXLY_EMQX_SERVER).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Ot.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(Ot.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},NO={init:function(){this.VISITOR_ID=Rt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(nO),this.appendDummyInput("").appendField(new Ot.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},DO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MixIO").appendField(Ot.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},fO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("HTTP"+Ot.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Ot.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(Ot.Msg.MIXLY_REQUESTS_GET).appendField(Ot.Msg.MIXLY_GET_CURRENT_TIME).appendField(Ot.Msg.MIXLY_OPEN_DEBUG).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},FO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("HTTP"+Ot.Msg.MIXLY_Client).appendField(Ot.Msg.MIXLY_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Ot.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Ot.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},PO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MQTT"+Ot.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Ot.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_INIT_SUBSCRIBE).appendField(Ot.Msg.MQTT_Topic).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(Ot.Msg.MIXLY_OPEN_DEBUG).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Ot.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("MQTT"+Ot.Msg.MIXLY_Client).appendField(Ot.Msg.MIXLY_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Ot.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Ot.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},YO=sO,XO=_O,yO=oO,xO=pO,bO=uO,VO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(Ot.Msg.MIXLY_EMQX_SERVER).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(Ot.Msg.MODEL_NAME).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(Ot.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},BO=VO,GO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(Ot.Msg.MIXLY_EMQX_SERVER).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Ot.Msg.MIXLY_API_PRIVATE_KEY).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(Ot.Msg.MODEL_NAME).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(Ot.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},UO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(Ot.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(Ot.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wO={init:function(){this.setColour(nO),this.appendDummyInput().appendField(Ot.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(Ot.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(Ot.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},kO={init:function(){this.setColour(nO),this.appendDummyInput().appendField("Ollama "+Ot.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},HO=225,WO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(Ot.Msg.MIXLY_NETWORK_MODE).appendField(new Ot.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},KO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[Ot.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=Ot.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:Ot.Msg.MIXLY_NETWORK_WIFI_OPEN,False:Ot.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},JO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},qO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return Ot.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:Ot.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},zO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(Ot.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(Ot.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},QO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_NETWORK_WIFI_CONNECT+Ot.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},jO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[Ot.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[Ot.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return Ot.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:Ot.Msg.MIXLY_ESP32_NETWORK_IP,1:Ot.Msg.MIXLY_ESP32_NETWORK_MASK,2:Ot.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},$O={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},ZO={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[Ot.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},tR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(Ot.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(Ot.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},eR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},iR={init:function(){this.setColour(HO),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new Ot.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},nR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},sR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},_R={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},oR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},pR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},aR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},uR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},rR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},lR={init:function(){this.setColour(HO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},dR={init:function(){this.setColour(HO),this.appendValueInput("DOMAIN").appendField(Ot.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Ot.Msg.blockpy_REQUESTS_GET).appendField(new Ot.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},IR={init:function(){this.appendValueInput("VAL"),this.setColour(HO),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Ot.FieldDropdown(IR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:Ot.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Ot.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Ot.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[Ot.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Ot.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Ot.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[Ot.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},TR={init:function(){this.appendValueInput("VAR").appendField(Ot.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(HO),this.appendDummyInput("").appendField(Ot.Msg.blockpy_CONDUCT).appendField(new Ot.FieldDropdown(TR.METHOD),"DIR"),this.appendDummyInput("").appendField(Ot.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:Ot.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:Ot.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},MR={init:function(){this.setColour(HO),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(Ot.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},hR={init:function(){this.setColour(HO),this.appendDummyInput("").appendField(new Ot.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},mR="#3288dd",ER={init:function(){this.setColour(mR),this.appendValueInput("URL").appendField(Ot.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Ot.Msg.blockpy_CONDUCT).appendField(new Ot.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(Ot.Msg.blockpy_REQUESTS).appendField(Ot.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},OR={init:function(){this.setColour(mR),this.appendValueInput("URL").appendField(Ot.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Ot.Msg.blockpy_CONDUCT).appendField(new Ot.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(Ot.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(Ot.Msg.blockpy_REQUESTS+Ot.Msg.OLED_STRING),this.appendDummyInput("").appendField(Ot.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},RR={init:function(){this.appendValueInput("VAL"),this.setColour(mR),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Ot.FieldDropdown(RR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[Ot.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Ot.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[Ot.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Ot.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[Ot.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},cR={init:function(){this.setColour(mR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(Ot.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Ot.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(Ot.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},gR={init:function(){this.setColour(mR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(Ot.Msg.MIXLY_EMQX_SERVER).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(Ot.Msg.MIXLY_EMQX_PORT).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(Ot.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Ot.Msg.MIXLY_WIFI_USERNAME).setAlign(Ot.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Ot.Msg.MIXLY_IOT_PASSWORD).setAlign(Ot.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},CR={init:function(){this.setColour(mR),this.appendValueInput("TOPIC").appendField(Ot.Msg.MIXLY_EMQX_SUBSCRIBE+Ot.Msg.MIXLY_MICROBIT_MSG).appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(Ot.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},SR={init:function(){this.setColour(mR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Ot.Msg.MIXLY_EMQX_SUBSCRIBE+Ot.Msg.MIXLY_MICROBIT_MSG).appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Ot.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},AR={init:function(){this.setColour(mR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Ot.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Ot.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},LR={init:function(){this.setColour(mR),this.appendDummyInput().appendField("mqtt"+Ot.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},NR="#A58C5B",DR={init:function(){this.setColour(NR),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_BUTTON).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(Ot.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_SENOR_IS_PRESSED)}},fR={init:function(){this.setColour(NR),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_BUTTON).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(Ot.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_SENOR_WAS_PRESSED)}},FR={init:function(){this.setColour(NR),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_BUTTON).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(Ot.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.PROCEDURES_DEFRETURN_RETURN+Ot.Msg.MIXLY_BUTTON+Ot.Msg.MIXLY_GET_PRESSES)}},PR={init:function(){this.setColour(NR),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_BUTTON).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Ot.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Ot.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},vR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_shake,"shake"],[Ot.Msg.MIXLY_UP,"up"],[Ot.Msg.MIXLY_DOWN,"down"],[Ot.Msg.MIXLY_LEFT,"left"],[Ot.Msg.MIXLY_RIGHT,"right"],[Ot.Msg.MIXLY_MICROBIT_face_up,"face up"],[Ot.Msg.MIXLY_MICROBIT_face_down,"face down"],[Ot.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=Ot.Msg.MIXLY_MICROBIT_JS_CURRENT,n=Ot.Msg.MSG.catSensor,s=Ot.Msg.MIXLY_MICROBIT_JS_STATE,_=Ot.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:Ot.Msg.MIXLY_MICROBIT_shake,up:Ot.Msg.MIXLY_UP,down:Ot.Msg.MIXLY_DOWN,left:Ot.Msg.MIXLY_LEFT,right:Ot.Msg.MIXLY_RIGHT,"face up":Ot.Msg.MIXLY_MICROBIT_face_up,"face down":Ot.Msg.MIXLY_MICROBIT_face_down,freefall:Ot.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+_}))}},YR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Ot.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Ot.Msg.MIXLY_MICROBIT_Direction,s=Ot.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Ot.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},XR={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},yR={init:function(){this.setColour(NR),this.appendValueInput("PIN",Number).appendField(new Ot.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Ot.FieldDropdown(yR.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Ot.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Ot.Msg.MIXLY_GETHUMIDITY,"humidity"]]},xR={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},bR={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},VR={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"left"],[Ot.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(Ot.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=Ot.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=Ot.Msg.MIXLY_ESP32_NEAR;return i+{left:Ot.Msg.TEXT_TRIM_LEFT,right:Ot.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},BR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_ALTITUDE_SENSOR+" BMP280").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[Ot.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":Ot.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":Ot.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},GR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+" SHT20").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[Ot.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},UR={init:function(){this.setColour(NR),this.appendValueInput("PIN",Number).appendField("DS18X20 "+Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},wR={init:function(){this.setColour(NR),this.appendDummyInput("").appendField("LM35"+Ot.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Ot.Msg.MIXLY_TOOLTIP_LM35)}},kR={init:function(){this.setColour(NR),this.appendValueInput("I2CSUB").appendField(Ot.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SETUP+Ot.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_ESP32_EXTERN_LIGHT+"(LTR308ALS)","LTR308"],[Ot.Msg.MIXLY_COLOR_SENSOR+"(LTR381RGB)","LTR381RGB"],[Ot.Msg.MIXLY_COLOR_SENSOR+"(UCS12071)","UCS12071"],[Ot.Msg.MIXLY_EXTERN_LIGHTUV+"(LTR390UV)","LTR390UV"],[Ot.Msg.MIXLY_ALTITUDE_SENSOR+"(HP203X)","HP203X"],[Ot.Msg.MIXLY_ALTITUDE_SENSOR+"(SPL06_001)","SPL06_001"],[Ot.Msg.MIXLY_ALTITUDE_SENSOR+"(MS5611)","MS5611"],[Ot.Msg.MIXLY_ALTITUDE_SENSOR+"(BMP280)","BMP280"],[Ot.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHTC3)","SHTC3"],[Ot.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(AHT21)","AHT21"],[Ot.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHT20)","SHT20"],[Ot.Msg.MIXLY_LASER_RANGE_SENSOR+"(VL53L0X)","VL53L0X"],[Ot.Msg.MIXLY_GEOMAGNETIC_SENSOR+"(QMC5883L)","QMC5883L"],[Ot.Msg.MIXLY_ESP32_MAX30102+"(MAX30102)","MAX30102"],[Ot.Msg.HTML_COLOUR+"、"+Ot.Msg.MIXLY_ENVIRONMENT_LIGHT+"、"+Ot.Msg.MIXLY_NEXT+"、"+Ot.Msg.MIXLY_ESP32_APDS9960+"(APDS9960)","APDS9960"],[Ot.Msg.MIXLY_NINE_AXIS_SENSOR+"(MPU9250)","MPU9250"],[Ot.Msg.MixGo_MPU9250+"(ADXL345)","ADXL345"],["RFID","RFID"],[Ot.Msg.MIXLY_RADAR_SENSOR+"(CBR817)","CBR817"],[Ot.Msg.MIXLY_AipSpeech_asr+"(CI130X)","CI130X"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},HR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.LISTS_SET_INDEX_SET+Ot.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(Ot.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+Ot.Msg.MIXLY_DELAY_TIME_RANGE)}},WR={init:function(){this.setColour(NR),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RADAR).appendField(Ot.Msg.LISTS_SET_INDEX_SET+Ot.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(Ot.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+Ot.Msg.MIXLY_DELAY_TIME_RANGE)}},KR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},JR={init:function(){this.setColour(NR),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RADAR).appendField(Ot.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},qR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_IDENTIFY_ONCE_AND_SAVE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},zR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_HELLO_XIAOZHI,"1"],[Ot.Msg.MIXLY_XIAOZHIXIAOZHI,"2"],[Ot.Msg.MIXLY_THE_FIRST,"3"],[Ot.Msg.MIXLY_THE_SECOND,"4"],[Ot.Msg.MIXLY_THE_THIRD,"5"],[Ot.Msg.MIXLY_THE_FOURTH,"6"],[Ot.Msg.MIXLY_THE_FIFTH,"7"],[Ot.Msg.MIXLY_THE_SIXTH,"8"],[Ot.Msg.MIXLY_THE_SEVENTH,"9"],[Ot.Msg.MIXLY_THE_EIGHTH,"10"],[Ot.Msg.MIXLY_THE_NINTH,"11"],[Ot.Msg.MIXLY_THE_TENTH,"12"],[Ot.Msg.MIXLY_THE_ELEVENTH,"13"],[Ot.Msg.MIXLY_THE_TWELFTH,"14"],[Ot.Msg.MIXLY_THE_13TH,"15"],[Ot.Msg.MIXLY_THE_14TH,"16"],[Ot.Msg.MIXLY_THE_15TH,"17"],[Ot.Msg.MIXLY_THE_16TH,"18"],[Ot.Msg.MIXLY_THE_17TH,"19"],[Ot.Msg.MIXLY_THE_18TH,"20"],[Ot.Msg.MIXLY_THE_19TH,"21"],[Ot.Msg.MIXLY_THE_20TH,"22"],[Ot.Msg.MIXLY_Turn_on_the_lights,"23"],[Ot.Msg.MIXLY_Turn_off_the_lights,"24"],[Ot.Msg.MIXLY_Turn_up_the_brightness,"25"],[Ot.Msg.MIXLY_Turn_down_the_brightness,"26"],[Ot.Msg.MIXLY_Set_it_to_red,"27"],[Ot.Msg.MIXLY_Set_it_to_orange,"28"],[Ot.Msg.MIXLY_Set_it_to_yellow,"29"],[Ot.Msg.MIXLY_Set_it_to_green,"30"],[Ot.Msg.MIXLY_Set_it_to_cyan,"31"],[Ot.Msg.MIXLY_Set_it_to_blue,"32"],[Ot.Msg.MIXLY_Set_it_to_purple,"33"],[Ot.Msg.MIXLY_Set_it_to_white,"34"],[Ot.Msg.MIXLY_Turn_on_the_fan,"35"],[Ot.Msg.MIXLY_Turn_off_the_fan,"36"],[Ot.Msg.MIXLY_First_gear,"37"],[Ot.Msg.MIXLY_Wind_speed_second,"38"],[Ot.Msg.MIXLY_Third_gear,"39"],[Ot.Msg.MIXLY_Previous,"40"],[Ot.Msg.MIXLY_Next_page,"41"],[Ot.Msg.MIXLY_Show_smiley_face,"42"],[Ot.Msg.MIXLY_Show_crying_face,"43"],[Ot.Msg.MIXLY_Show_love,"44"],[Ot.Msg.MIXLY_Close_display,"45"],[Ot.Msg.MIXLY_Start_execution,"46"],[Ot.Msg.MIXLY_FORWARD,"47"],[Ot.Msg.MIXLY_BACKWARD,"48"],[Ot.Msg.MIXLY_TURNLEFT,"49"],[Ot.Msg.MIXLY_TURNRIGHT,"50"],[Ot.Msg.MIXLY_STOP,"51"],[Ot.Msg.MIXLY_Accelerate,"52"],[Ot.Msg.MIXLY_retard,"53"],[Ot.Msg.ROTATION_FORWARD,"54"],[Ot.Msg.ROTATION_BACKWARD,"55"],[Ot.Msg.MIXLY_Query_temperature,"56"],[Ot.Msg.MIXLY_Query_humidity,"57"],[Ot.Msg.MIXLY_Query_brightness,"58"],[Ot.Msg.MIXLY_Query_sound,"59"],[Ot.Msg.MIXLY_Query_time,"60"],[Ot.Msg.MIXLY_Query_distance,"61"],[Ot.Msg.MIXLY_Query_pressure,"62"],[Ot.Msg.MIXLY_Query_key,"63"],[Ot.Msg.MIXLY_Query_touch,"64"],[Ot.Msg.MIXLY_Query_color,"65"]]),"cmd").appendField(Ot.Msg.MIXLY_WHETHER+Ot.Msg.MIXLY_BE_IDENTIFIED),this.setOutput(!0),this.setInputsInline(!0)}},QR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_RECOGNIZED_STATE,"status1"],[Ot.Msg.MIXLY_WHETHER_BROADCAST,"status2"],[Ot.Msg.MIXLY_THE_RECOGNIZED_CMD,"result"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_CI130X_GET_THE_RECOGNIZED_STATE_TOOLTIP)}},jR={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MP3_PLAY).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[Ot.Msg.MIXLY_WIND_SPEED,"154"],[Ot.Msg.MIXLY_HYETAL,"155"],[Ot.Msg.MIXLY_TEMPERATURE,"156"],[Ot.Msg.MIXLY_Humidity,"157"],[Ot.Msg.MIXLY_Altitude,"158"],[Ot.Msg.MIXLY_SOUND,"159"],[Ot.Msg.MIXLY_BRIGHTNESS,"160"],[Ot.Msg.ME_GO_HALL_SENSOR_DISTANCE,"161"],[Ot.Msg.MIXLY_SERVO,"162"],[Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"163"],[Ot.Msg.MIXLY_BUTTON2,"164"],[Ot.Msg.MIXLY_ESP32_TOUCH,"165"],[Ot.Msg.MIXLY_PAY,"166"],[Ot.Msg.MIXLY_CARSH_CHANGE,"167"],[Ot.Msg.MIXLY_COUNTDOWN,"168"],[Ot.Msg.MIXLY_TIMING,"169"],[Ot.Msg.MIXLY_AT_THE_MOMENT,"170"],[Ot.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE,"171"],[Ot.Msg.MIXLY_FORWARD,"172"],[Ot.Msg.MIXLY_BACKWARD,"173"],[Ot.Msg.MIXLY_TURNLEFT,"174"],[Ot.Msg.MIXLY_TURNRIGHT,"175"],[Ot.Msg.MIXLY_STOP,"176"],[Ot.Msg.MIXLY_Accelerate,"177"],[Ot.Msg.MIXLY_retard,"178"],[Ot.Msg.ROTATION_FORWARD,"179"],[Ot.Msg.ROTATION_BACKWARD,"180"],[Ot.Msg.TUPLE_JOIN,"181"],[Ot.Msg.MIXLY_SHOW,"182"],[Ot.Msg.MIXLY_LAMPLIGHT,"183"],[Ot.Msg.MIXLY_ACCELERATION,"184"]]),"star"),this.appendValueInput("NUM").appendField(Ot.Msg.MIXLY_NUMBER),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_UNIT).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[Ot.Msg.MIXLY_YEAR,"117"],[Ot.Msg.MIXLY_MONTH,"118"],[Ot.Msg.MIXLY_DAY,"119"],[Ot.Msg.MIXLY_HOUR,"120"],[Ot.Msg.MIXLY_MINUTE,"121"],[Ot.Msg.MIXLY_SECOND,"122"],[Ot.Msg.MIXLY_WEEK2,"123"],[Ot.Msg.MIXLY_RMB_UNIT,"124"],[Ot.Msg.blockpy_setheading_degree,"125"],[Ot.Msg.MIXLY_GEAR,"126"],[Ot.Msg.MIXLY_LAYER,"127"],[Ot.Msg.MIXLY_GRAM,"128"],[Ot.Msg.MIXLY_METER,"129"],[Ot.Msg.MIXLY_CENTIMETER,"130"],[Ot.Msg.MIXLY_MILLIMETER,"131"],[Ot.Msg.MIXLY_LUMEN,"132"],[Ot.Msg.MIXLY_DECIBEL,"133"],[Ot.Msg.MIXLY_hectopascal,"134"],[Ot.Msg.MIXLY_PERCENT,"135"],[Ot.Msg.MIXLY_CELSIUS,"136"],[Ot.Msg.MIXLY_METER_PER_SEC,"137"],[Ot.Msg.MIXLY_MICROBIT_Turn_on_display,"138"],[Ot.Msg.MIXLY_MICROBIT_Turn_off_display,"139"],[Ot.Msg.MIXLY_SUCCESS,"140"],[Ot.Msg.MIXLY_FAILED,"141"],[Ot.Msg.MIXLY_WRONG,"142"],[Ot.Msg.MIXLY_GOOD,"143"],[Ot.Msg.MIXLY_blockpy_set_add,"144"],[Ot.Msg.MIXLY_DECREASE,"145"],[Ot.Msg.COLOUR_RGB_RED,"146"],[Ot.Msg.COLOUR_RGB_ORANGE,"147"],[Ot.Msg.COLOUR_YELLOW,"148"],[Ot.Msg.COLOUR_RGB_GREEN,"149"],[Ot.Msg.COLOUR_CYAN,"150"],[Ot.Msg.COLOUR_RGB_BLUE,"151"],[Ot.Msg.COLOUR_RGB_PURPLE,"152"],[Ot.Msg.COLOUR_RGB_WHITE,"153"]]),"end"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},$R={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.LISTS_SET_INDEX_SET+Ot.Msg.MIXLY_SYSTEM+Ot.Msg.MIXLY_CMD).appendField(new Ot.FieldDropdown([[Ot.Msg.MILXY_ENTER_WAKE_UP,"1"],[Ot.Msg.MIXLY_INCREASE_VOLUME,"202"],[Ot.Msg.MIXLY_REDUCE_VOLUME,"203"],[Ot.Msg.MIXLY_MAX_VOLUME,"204"],[Ot.Msg.MIXLY_MINIMUM,"205"],[Ot.Msg.MIXLY_OPEN_RESPONSE,"206"],[Ot.Msg.MIXLY_CLOSE_RESPONSE,"207"],[Ot.Msg.MIXLY_QUIT_WAKE_UP,"208"]]),"cmd"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ZR={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[Ot.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[Ot.Msg.MIXLY_ESP32_MAX30102_IR+","+Ot.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},tc={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[Ot.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[Ot.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ec={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308ALS"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},ic={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.HTML_COLOUR+Ot.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GET+Ot.Msg.HTML_COLOUR,"[2]"],[Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_IR_STRENGTH,"[1]"],[Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},nc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.HTML_COLOUR+Ot.Msg.MSG.catSensor+" UCS12071").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GET+"RGB"+Ot.Msg.HTML_COLOUR,"0"],[Ot.Msg.MIXLY_GET+Ot.Msg.MIXLY_RGB_RAW,"1"],[Ot.Msg.MIXLY_GET_ENV_LIGHT+Ot.Msg.MIXLY_BRIGHTNESS,"2"],[Ot.Msg.GET_IR_STRENGTH+Ot.Msg.MIXLY_BRIGHTNESS,"3"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},sc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GET_ENV_LIGHT,"E"],[Ot.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},_c={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},oc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Ot.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},pc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Ot.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},ac={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_Altitude+Ot.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETPRESSURE,"pressure()"],[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Ot.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},uc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_Altitude+Ot.Msg.MSG.catSensor+" SPL06_001").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETPRESSURE,"pressure()"],[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Ot.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},rc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_Altitude+Ot.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETPRESSURE,"pressure()"],[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Ot.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},lc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_Altitude+Ot.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendValueInput("VAR").appendField(Ot.Msg.MIXLY_REF_TO_PRESSURE),this.appendDummyInput().appendField(Ot.Msg.MIXLY_CAL_TO_ALTITUDE),this.setOutput(!0,Number),this.setInputsInline(!0)}},dc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MIXGOPE_FIELD+Ot.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[Ot.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ic={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_shake,"shake"],[Ot.Msg.MIXLY_UP,"up"],[Ot.Msg.MIXLY_DOWN,"down"],[Ot.Msg.MIXLY_LEFT,"left"],[Ot.Msg.MIXLY_RIGHT,"right"],[Ot.Msg.MIXLY_MICROBIT_face_up,"face up"],[Ot.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=Ot.Msg.MIXLY_MICROBIT_JS_CURRENT,n=Ot.Msg.MSG.catSensor,s=Ot.Msg.MIXLY_MICROBIT_JS_STATE,_=Ot.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:Ot.Msg.MIXLY_MICROBIT_shake,up:Ot.Msg.MIXLY_UP,down:Ot.Msg.MIXLY_DOWN,left:Ot.Msg.MIXLY_LEFT,right:Ot.Msg.MIXLY_RIGHT,"face up":Ot.Msg.MIXLY_MICROBIT_face_up,"face down":Ot.Msg.MIXLY_MICROBIT_face_down}[e]+_}))}},Tc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Ot.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Ot.Msg.MIXLY_MICROBIT_Direction,s=Ot.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Ot.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Mc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_JS_GET+Ot.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new Ot.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Ot.Msg.MIXLY_MICROBIT_Direction,s=Ot.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":Ot.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},hc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Ot.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Ot.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Ot.Msg.MIXLY_MICROBIT_Direction,s=Ot.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":Ot.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},mc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},Ec={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_GETTEMPERATUE)}},Oc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return Ot.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:Ot.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:Ot.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},Rc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},cc={init:function(){this.setColour(NR),this.appendValueInput("SPISUB").appendField(Ot.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Ot.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SETUP+Ot.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Ot.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},gc={init:function(){this.setColour(NR),this.appendDummyInput().appendField("RFID"+Ot.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Ot.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[Ot.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Cc={init:function(){this.setColour(NR),this.appendDummyInput().appendField("RFID"+Ot.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},Sc={init:function(){this.setColour(NR),this.appendDummyInput().appendField("RFID"+Ot.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Ot.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},Ac={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Ot.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Ot.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Lc={init:function(){this.setColour(NR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Ot.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Ot.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(Ot.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},Nc={init:function(){this.setColour(NR),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_RFID_SCAN_OK,"0"],[Ot.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[Ot.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Dc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Ot.FieldDropdown([["全部(元组)","data()[0]"],["全部(json)","data()[1]"],["全部(json,附带位置信息)","data()[2]"],["编号","data()[0][0]"],["电量","data()[0][1]"],["风速","data()[0][2]"],["阵风","data()[0][3]"],["风向","data()[0][4]"],["雨量","data()[0][5]"],["温度","data()[0][6]"],["湿度","data()[0][7]"],["光照","data()[0][8]"],["紫外线","data()[0][9]"],["大气压","data()[0][10]"],["信号强度","data()[0][11]"],["信噪比","data()[0][12]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip("返回气象数据元组 data= (设备id,电池状态,风速m/s,阵风m/s,风向°,雨量mm,温度℃,湿度%,光照Lux,UVI,大气压Pa,信号强度dB,信噪比dB)")}},fc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Fc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendValueInput("BASE").appendField("以主题"),this.appendDummyInput("").appendField("串口发送至MixIO"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Pc={init:function(){this.setColour(NR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Ot.icons.MutatorIcon(["weather_set_label_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("weather_set_label_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n>6),i.push(128|63&_)):(2048<=_&&_<=55295||57344<=_&&_<=65535)&&(n+=3,i.push(224|15&_>>12),i.push(128|63&_>>6),i.push(128|63&_))}for(s=0;s>8,255&n].concat(i)}(t,!0),i="",n=0;n=0?"0x700000":["mixgo_sant"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==o?(e.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+_+", font_address="+p+")\n"):"16x8 Matrix"==o&&(e.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+_+")\n"),i},sP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},_P=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},oP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},pP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},aP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},uP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},rP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},lP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},dP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},IP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},TP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},MP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},hP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},mP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_"+t.getFieldValue("OP")+"("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"B",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},EP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},OP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},RP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},cP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},gP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"width",e.ORDER_ATOMIC),o=e.valueToCode(this,"height",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP");switch(p){case"True":return i+".show_fill_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n";case"False":return i+".show_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n"}},CP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+_+", 1)\n"},SP=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},AP=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},LP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},NP=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},DP=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"r",e.ORDER_ATOMIC),o="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(o){case"True":return i+".show_fill_circle("+n+", "+s+", "+_+", "+p+")\n";case"False":return i+".show_circle("+n+", "+s+", "+_+", "+p+")\n"}},fP=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),_=e.valueToCode(this,"x1",e.ORDER_ATOMIC),o=e.valueToCode(this,"y1",e.ORDER_ATOMIC),p=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",r=this.getFieldValue("OP");switch(u){case"True":return i+".show_fill_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n"}},FP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+","+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+","+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},PP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},vP=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),_=this.getFieldValue("key");return"TM1650"==_?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+_+"("+s+")\n"):"TM1637"==_&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+_+"("+s+")\n"),i},YP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},XP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},yP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".showDP("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},xP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},bP=function(t,e){e.definitions_.import_st7789="import st7789";var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_sant"].indexOf(i)>=0?"0xE00000":"0x3A0000";var s=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),_=e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC),o=e.valueToCode(this,"PINCS",e.ORDER_ATOMIC),p=e.valueToCode(this,"PINDC",e.ORDER_ATOMIC);return s+" = st7789.ST7789("+_+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+", dc_pin="+p+", cs_pin="+o+", rotation="+this.getFieldValue("rotate")+", font_address="+n+")\n"},VP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".image("+n+", x="+s+", y="+_+", size="+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".image("+n+", x= "+s+",y="+_+", size="+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},BP=function(t,e){var i="0x"+this.getFieldValue("COLOR").slice(1);return["0x"+((16252928&i)>>8|(64512&i)>>5|(255&i)>>3).toString(16),e.ORDER_ATOMIC]},GP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==a.slice(0,2))var r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color="+a+")\n";else{const t=a.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},UP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p=i+".frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},wP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},kP=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},HP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"x1",e.ORDER_ATOMIC),s=e.valueToCode(this,"y1",e.ORDER_ATOMIC),_=e.valueToCode(this,"x2",e.ORDER_ATOMIC),o=e.valueToCode(this,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".line("+n+", "+s+", "+_+", "+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".line("+n+", "+s+", "+_+", "+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},WP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=this.getFieldValue("key"),_=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return e.definitions_.import_i2clcd="import i2clcd",i+" = i2clcd.LCD("+n+", lcd_width="+s+", i2c_addr="+_+")\n"},KP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+",center = "+this.getFieldValue("center")+")\n"},JP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".print("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},qP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},zP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},QP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC),_=this.getFieldValue("driver"),o=Rt.Boards.getSelectedBoardKey().split(":")[2],p="";return p=["mpython","mixgo_pe","mixgo_nova"].indexOf(o)>=0?"0x700000":["mixgo_sant"].indexOf(o)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+", address="+s+", font_address="+p+", types="+_+")\n"},jP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},$P=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+")\n"},ZP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},tv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},ev=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},iv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},nv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},sv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},_v=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},ov=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},pv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},av=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},uv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=t.getFieldValue("state");return i+"."+t.getFieldValue("shape")+"("+n+", "+s+", "+_+", "+o+", "+p+")\n"+i+".show()\n"},rv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=t.getFieldValue("state");return i+"."+("0"==t.getFieldValue("dir_h_v")?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\n"+i+".show()\n"},lv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".line("+e.valueToCode(t,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y2",e.ORDER_ATOMIC)+", "+t.getFieldValue("state")+")\n"+i+".show()\n"},dv=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("Python ESP32-S3"===Rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var s="onboard_tft.image("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff,sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n"}else if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled";s="oled.print("+n+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.shows("+n+")\n"}return s},Iv=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),_=this.getFieldValue("center");if("mixgo_sant"==i||"mixgo_nova"==i)return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+", space="+s+", center="+_+",sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n";if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled"}return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+", space="+s+", center="+_+")\n"},Tv=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var s="onboard_oled.frame("+n+")\n"}else if("Python ESP32-S3"===Rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";s="onboard_tft.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.frame("+n+")\n"}return s},Mv=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var _="onboard_oled.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", delay="+s+")\n"}else if("Python ESP32-S3"===Rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";_="onboard_tft.frame("+n+", size=5 , delay="+s+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";_="onboard_matrix.frame("+n+", delay="+s+")\n"}return _},hv=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else if("Python ESP32-S3"===Rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";n="onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},mv=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var o="onboard_oled.scroll("+n+", speed="+s+", space="+_+")\n"}else if("Python ESP32-S3"===Rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";o="onboard_tft.scroll("+n+", y=0, size=5, speed="+s+", space="+_+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";o="onboard_matrix.scroll("+n+", speed="+s+", space="+_+")\n"}return o},Ev=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},Ov=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},Rv=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Rt.JSFuncs.getPlatform()){const i=t.getFieldValue("image").split(".");if(2!==i.length)throw Error("pin value error");e.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`;var n=i[1]}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix."+t.getFieldValue("image")}return[n,e.ORDER_ATOMIC]},cv=function(t,e){var i={"#000000":"0","#ff0000":"1"};function n(t){let e="";if(t.length%2==1&&(t="0"+t),t.length<8){let e=8-t.length;for(let i=1;i<=e;i++)t="0"+t}for(let i=1;i<=t.length;i++)i%2==0&&i!==t.length?e=e+t[i-1]+",0x":e+=t[i-1];return"0x"+e}let s=[];for(let e=0;e<12;e++){let _="",o=0,p=0;for(let n=0;n<32;n++)n<8?p=7-n:n<16?p=23-n:n<24?p=39-n:n<32&&(p=55-n),o+=Number(i[t.getFieldValue(e+"-"+n)])*Math.pow(2,31-p);_+=n(o.toString(16)),s.unshift(_)}let _=[];for(let t=0;t>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},_Y=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.picture("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"direct",e.ORDER_ASSIGNMENT)+")\n"},oY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=this.getFieldValue("center"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True",r=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==r.slice(0,2))var l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color="+r+",sync="+u+")\n";else{const t=r.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color=0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+",sync="+u+")\n"}return l},pY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},aY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=t.getFieldValue("shape"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+",sync="+u+")\n";else{const t=p.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+",sync="+u+")\n"}return r},uY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("dir_h_v"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},rY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x1",e.ORDER_ATOMIC),s=e.valueToCode(t,"y1",e.ORDER_ATOMIC),_=e.valueToCode(t,"x2",e.ORDER_ATOMIC),o=e.valueToCode(t,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},lY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},dY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),o=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var p="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+",sync="+o+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+",sync="+o+")\n"}return p},IY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==n.slice(0,2))var _="onboard_tft.fill("+n+",sync="+s+")\n";else{const t=n.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_="onboard_tft.fill(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+",sync="+s+")\n"}return _},TY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=o+"=Clock("+n+", "+s+", "+_+", "+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=o+"=Clock("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},MY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},hY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_time("+e.valueToCode(this,"h",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"m",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"s",e.ORDER_ASSIGNMENT)+")\n"},mY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},EY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2))var _=n+".clear("+s+")\n";else{const t=s.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_=n+".clear(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+")\n"}return _},OY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"r",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("shape"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+", "+p+",sync="+a+")\n"}return u},RY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n="onboard_tft.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}return n},cY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2));else{const t=s.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)}return"onboard_tft.pointern(angle="+n+")\n"},gY=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color="+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},CY=dv,SY=Fv,AY=Nv,LY=Fv,NY=Pv,DY=Cv,fY=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},FY=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},PY=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},FB=function(){return"control.reset()\n"},PB=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+")\n"},vB=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+")\n"},YB=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Rt.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},XB=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},yB=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},xB=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},bB=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},VB=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},BB=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},GB=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},UB=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},wB=function(){return"while True:\n pass\n"},kB=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},HB=function(t,e){return e.definitions_.import_os="import os","os.uname()"},WB=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},KB=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},JB=function(t,e){return e.definitions_.import_mixgo="import mixgo",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period="+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=Timer."+(e.valueToCode(this,"mode",e.ORDER_NONE)||"None")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},qB=function(t,e){return e.definitions_.import_machine="import machine",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period = "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=machine.Timer."+this.getFieldValue("mode")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},zB=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},QB=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},jB=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},$B=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},ZB=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},tG=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},eG=QB,iG=qB,nG=zB,sG=WB,_G=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},oG=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},pG=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api.weather_hourly("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"hour",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},aG=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")\n"},uG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_now.analysis()";else n='Weather_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},rG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Air_now.analysis()";else n='Air_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},lG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_alarm.analysis()";else n='Weather_alarm.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},dG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Life_suggestion.analysis()";else n='Life_suggestion.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},IG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Tide_daily.analysis()";else n='Tide_daily.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},TG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Location_search.analysis()";else n='Location_search.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},MG=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")\n"},hG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Weather_daily.analysis("+n+")";else s="Weather_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},mG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Air_daily.analysis("+n+")";else s="Air_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},EG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_sun.analysis("+n+")";else s="Geo_sun.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},OG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_moon.analysis("+n+")";else s="Geo_moon.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},RG=new Ot.Generator("Python");RG.INDENT=" ",RG.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),RG.ORDER_ATOMIC=0,RG.ORDER_COLLECTION=1,RG.ORDER_STRING_CONVERSION=1,RG.ORDER_UNARY_POSTFIX=1,RG.ORDER_UNARY_PREFIX=2,RG.ORDER_MEMBER=2.1,RG.ORDER_FUNCTION_CALL=2.2,RG.ORDER_EXPONENTIATION=3,RG.ORDER_UNARY_SIGN=4,RG.ORDER_BITWISE_NOT=4,RG.ORDER_MULTIPLICATIVE=5,RG.ORDER_ADDITIVE=6,RG.ORDER_BITWISE_SHIFT=7,RG.ORDER_BITWISE_AND=8,RG.ORDER_BITWISE_XOR=9,RG.ORDER_BITWISE_OR=10,RG.ORDER_RELATIONAL=11,RG.ORDER_EQUALITY=11,RG.ORDER_LOGICAL_NOT=12,RG.ORDER_LOGICAL_AND=13,RG.ORDER_LOGICAL_OR=14,RG.ORDER_ASSIGNMENT=14,RG.ORDER_CONDITIONAL=15,RG.ORDER_LAMBDA=16,RG.ORDER_NONE=99,RG.ORDER_OVERRIDES=[[RG.ORDER_FUNCTION_CALL,RG.ORDER_MEMBER],[RG.ORDER_FUNCTION_CALL,RG.ORDER_FUNCTION_CALL],[RG.ORDER_MEMBER,RG.ORDER_MEMBER],[RG.ORDER_MEMBER,RG.ORDER_FUNCTION_CALL]],RG.init=function(){RG.PASS=this.INDENT+"pass\n",RG.definitions_=Object.create(null),RG.functionNames_=Object.create(null),RG.setups_=Object.create(null),RG.loops_=Object.create(null),RG.codeEnd_=Object.create(null),RG.variableDB_?RG.variableDB_.reset():RG.variableDB_=new St(RG.RESERVED_WORDS_)},RG.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var _=this.definitions_[s];0===s.indexOf("import")?e.push(_):0===s.indexOf("var_declare")?i.push(_):n.push(_)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var o=[];for(var s in RG.functions_)o.push(RG.functions_[s]);o.length&&o.push("\n");var p=[];for(var s in RG.setups_)p.push(RG.setups_[s]);p.length&&p.push("\n");var a=[];for(var s in RG.loops_)a.push(RG.loops_[s]);var u=[];for(var s in RG.codeEnd_)u.push(RG.codeEnd_[s]);0!==u.length&&u.push("\n");let r="";return r=a.length>0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n"),r},RG.scrubNakedValue=function(t){return t+"\n"},RG.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},RG.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},RG.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=Ot.utils.string.wrap(_,RG.COMMENT_WRAP-3),n+=RG.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const cG={};cG.mpython={description:"MicroPython[EDUCORE Edu Core]",digital_pin:Rt.Profile.generate(["0-10","18"]),input_pin:Rt.Profile.generate(["0-10","18"]),output_pin:Rt.Profile.generate(["0-10","18"]),pwm_input:Rt.Profile.generate(["0-10","18"],"pwm","pwm"),analog_input:Rt.Profile.generate(["0-4"],"adc","adc"),pwm_output:Rt.Profile.generate(["0-10","18"],"pwm","pwm"),analog_output:Rt.Profile.generate(["0-4"],"adc","adc"),espnow_channel:Rt.Profile.generate(["1-13"]),haskylens_model:Rt.Profile.generate(["0-4"]),digital:Rt.Profile.generate(["0-10","18"],"pin","pin"),pwm_pin:Rt.Profile.generate(["0-10","18"]),pwm:Rt.Profile.generate(["0-10","18"],"pwm","pwm"),analog_pin:Rt.Profile.generate(["0-4"]),analog:Rt.Profile.generate(["0-4"],"adc","adc"),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Rt.Profile.generate(["0-4"]),exlcdh:Rt.Profile.generate(["0-11"]),exlcdv:Rt.Profile.generate(["0-7"]),brightness:Rt.Profile.generate(["0-9"]),tts_voice:Rt.Profile.generate(["0-16"]),tts_builtin_music:Rt.Profile.generate(["0-47"]),tts_bgmusic:Rt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["ANGRY","onboard_matrix.ANGRY"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["DOOR_OPEN","onboard_matrix.DOOR_OPEN"],["DOOR_OPENING","onboard_matrix.DOOR_OPENING"],["DOOR_CLOSE","onboard_matrix.DOOR_CLOSE"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["BIRTHDAY","onboard_music.BIRTHDAY"],["BA_DING","onboard_music.BA_DING"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},cG["ESP32C2 Generic(2M)"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:Rt.Profile.generate(["0-11","18-21"]),input_pin:Rt.Profile.generate(["0-11","18-21"]),output_pin:Rt.Profile.generate(["0-11","18-21"]),pwm_input:Rt.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_input:Rt.Profile.generate(["0-5"],"adc","adc"),pwm_output:Rt.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_output:Rt.Profile.generate(["0-5"],"adc","adc"),espnow_channel:Rt.Profile.generate(["1-13"]),haskylens_model:Rt.Profile.generate(["0-4"]),digital:Rt.Profile.generate(["0-11","18-21"],"pin","pin"),pwm_pin:Rt.Profile.generate(["0-11","18-21"]),pwm:Rt.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_pin:Rt.Profile.generate(["0-5"]),analog:Rt.Profile.generate(["0-5"],"adc","adc"),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Rt.Profile.generate(["0-4"]),exlcdh:Rt.Profile.generate(["0-31"]),exlcdv:Rt.Profile.generate(["0-11"]),brightness:Rt.Profile.generate(["0-9"]),tts_voice:Rt.Profile.generate(["0-16"]),tts_builtin_music:Rt.Profile.generate(["0-47"]),tts_bgmusic:Rt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]};const gG=cG,CG=20,SG={init:function(){this.setColour(CG),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_HIGH,"HIGH"],[Ot.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},AG={init:function(){this.setColour(CG),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(Ot.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},LG={init:function(){this.setColour(CG),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Ot.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},NG={init:function(){this.setColour(CG),this.appendValueInput("PIN",Number).appendField("DAC"+Ot.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Ot.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_TOOLTIP)}},DG={init:function(){this.setColour(CG),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_JS_PERIOD_MIL).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_mSecond,"period"],[Ot.Msg.MIXLY_uSecond,"period_microseconds"]]),"key"),this.appendValueInput("NUM",Number).appendField(Ot.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_SET_TOOLTIP)}},fG={init:function(){this.setColour(CG),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_REF_VOLTAGE+Ot.Msg.MIXLY_STAT).appendField(new Ot.FieldDropdown([["3.3V","machine.ADC.ATTN_11DB"],["2.2V","machine.ADC.ATTN_6DB"],["1.5V","machine.ADC.ATTN_2_5DB"],["1.2V","machine.ADC.ATTN_0DB"]]),"atten"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_ANALOG_ATTEN_TOOLTIP)}},FG={init:function(){this.setColour(CG),this.appendValueInput("pin").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Ot.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(Ot.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_TOOLTIP)}},PG={init:function(){this.setColour(20),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_ATTACHINTERRUPT_PIN).setCheck(Number),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MODE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Ot.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Ot.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},vG={init:function(){this.setColour(20),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETUP).appendField(new Ot.FieldTextInput("pin#"),"PIN_OBJ"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROPYTHON_AS).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_Digital_PINMODEOUT,"machine.Pin.OUT"],[Ot.Msg.MIXLY_Digital_PINMODEIN,"machine.Pin.IN"],[Ot.Msg.MIXLY_PINMODEPULLUP,"machine.Pin.IN, machine.Pin.PULL_UP"],[Ot.Msg.MIXLY_PINMODEPULLDOWN,"machine.Pin.IN, machine.Pin.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)},getVars:function(){return["pin#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},YG={init:function(){this.setColour(CG),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SETUP).appendField(new Ot.FieldTextInput("dac#"),"PIN_OBJ").appendField(Ot.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("DAC"+Ot.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_INIT_TOOLTIP)},getVars:function(){return["dac#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},XG={init:function(){this.setColour(CG),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SETUP).appendField(new Ot.FieldTextInput("tc#"),"PIN_OBJ").appendField(Ot.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendValueInput("PIN",Number).appendField(Ot.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_INIT_TOOLTIP)},getVars:function(){return["tc#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){Ot.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},yG={init:function(){this.setColour(CG),this.appendValueInput("PIN",Number).appendField("PWM"+Ot.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Ot.Msg.MIXLY_FREQUENCY+Ot.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Ot.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_SET_FREQ_TOOLTIP)}},xG=vG,bG=XG,VG=FG,BG=PG,GG=40,UG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput("").appendField(t).appendField(Ot.Msg.MIXLY_TEM_HUM+" AHT21").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Ot.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key");return{temperature:Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:Ot.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[t]}))}},wG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput("").appendField(t).appendField(Ot.Msg.MIXLY_Altitude+Ot.Msg.MSG.catSensor+" HP203X").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_GETPRESSURE,"pressure()"],[Ot.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Ot.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},kG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput().appendField(t).appendField(Ot.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM),this.setOutput(!0,Number),this.setInputsInline(!0)}},HG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput().appendField(t).appendField("RFID"+Ot.Msg.MIXLY_RFID_READ_CARD),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},WG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput().appendField(t).appendField("RFID"+Ot.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SECTOR").appendField(Ot.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,Number),this.setInputsInline(!0)}},KG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput().appendField(t).appendField(Ot.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Ot.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Ot.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},JG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput().appendField(t).appendField(Ot.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Ot.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Ot.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(Ot.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0)}},qG={init:function(){if("mixgo_me"==Rt.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(GG),this.appendDummyInput().appendField(t).appendField("RFID"),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_RFID_SCAN_OK,"True"],[Ot.Msg.MIXLY_RFID_SCAN_NOTAGERR,"None"],[Ot.Msg.MIXLY_RFID_SCAN_ERROR,"False"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},zG=100,QG={init:function(){this.setColour(zG),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.MIXGO_LEFT_FRONT+Ot.Msg.COLOUR_RGB_GREEN+Ot.Msg.MIXLY_EXTERN_LED,"GLED[0]"],[Ot.Msg.MIXGO_RIGHT_FRONT+Ot.Msg.COLOUR_RGB_GREEN+Ot.Msg.MIXLY_EXTERN_LED,"GLED[1]"],[Ot.Msg.MIXGO_LEFT_BACK+Ot.Msg.COLOUR_RGB_GREEN+Ot.Msg.MIXLY_EXTERN_LED,"GLED[3]"],[Ot.Msg.MIXGO_RIGHT_BACK+Ot.Msg.COLOUR_RGB_GREEN+Ot.Msg.MIXLY_EXTERN_LED,"GLED[2]"],[Ot.Msg.MIXGO_LEFT_FRONT+Ot.Msg.COLOUR_RGB_RED+Ot.Msg.MIXLY_EXTERN_LED,"RLED[0]"],[Ot.Msg.MIXGO_RIGHT_FRONT+Ot.Msg.COLOUR_RGB_RED+Ot.Msg.MIXLY_EXTERN_LED,"RLED[1]"],[Ot.Msg.MIXGO_LEFT_BACK+Ot.Msg.COLOUR_RGB_RED+Ot.Msg.MIXLY_EXTERN_LED,"RLED[3]"],[Ot.Msg.MIXGO_RIGHT_BACK+Ot.Msg.COLOUR_RGB_RED+Ot.Msg.MIXLY_EXTERN_LED,"RLED[2]"],[Ot.Msg.ME_GO_LIGHT_HEADLIGHT,"WLED"]]),"op"),this.setOutput(!0)}},jG={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField("ME GO"),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_SETONOFF)}},$G={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField("ME GO"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},ZG={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField("ME GO"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_ESP32_LED_GETONOFF)}},tU={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField("ME GO"),this.appendValueInput("bright").appendField(Ot.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Ot.Msg.MIXLY_SETTING+Ot.Msg.MIXLY_BUILDIN_LED+Ot.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},eU={init:function(){this.setColour(zG),this.appendDummyInput().appendField("ME GO").appendField(new Ot.FieldDropdown([[Ot.Msg.blockpy_forward,"F"],[Ot.Msg.blockpy_backward,"B"],[Ot.Msg.blockpy_left,"L"],[Ot.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},iU={init:function(){this.setColour(zG),this.appendDummyInput().appendField("ME GO").appendField(new Ot.FieldDropdown([[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},nU={init:function(){this.setColour(zG),this.appendDummyInput().appendField("ME GO").appendField(Ot.Msg.MOTOR_DC).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLYCAR_WHEEL_LEFT,"0"],[Ot.Msg.MIXLYCAR_WHEEL_RIGHT,"1"],[Ot.Msg.ME_GO_MOTOR_EXTERN,"2"]]),"wheel"),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_Direction).appendField(new Ot.FieldDropdown([[Ot.Msg.ROTATION_FORWARD,"CW"],[Ot.Msg.ROTATION_BACKWARD,"CCW"],[Ot.Msg.MOTOR_P,"P"],[Ot.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Ot.inputs.Align.RIGHT).appendField(Ot.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},sU={init:function(){this.setColour(zG),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_ESP32_INTERRUPT).appendField(Ot.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"A"],[Ot.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendValueInput("DO").appendField(Ot.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},_U={init:function(){this.setColour(zG),this.appendDummyInput("").appendField(Ot.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"A"],[Ot.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_SETUP),this.appendDummyInput("").appendField(new Ot.FieldDropdown([["turns","turns"],["distance","distance"],["turns,distance","all"]]),"args"),this.appendValueInput("num").setCheck(Number),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},oU={init:function(){this.setColour(zG),this.appendDummyInput("").appendField(Ot.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"A"],[Ot.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("").appendField(new Ot.FieldDropdown([["turns","turns"],["distance","distance"],["speed","speed"]]),"args"),this.setOutput(!0),this.setInputsInline(!0)}},pU={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"[0]"],[Ot.Msg.MIXGO_LEFT_MID,"[1]"],[Ot.Msg.MIXGO_RIGHT_MID,"[2]"],[Ot.Msg.TEXT_TRIM_RIGHT,"[3]"],[Ot.Msg.MIXLY_ALL,""]]),"key").appendField(Ot.Msg.MIXGO_LINE_SENSOR_VAL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Ot.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Ot.Msg.MIXLY_ESP32_NEAR}))}},aU={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXGO_LEFT_FRONT,"[0]"],[Ot.Msg.MIXGO_RIGHT_FRONT,"[1]"],[Ot.Msg.MIXGO_LEFT_BACK,"[3]"],[Ot.Msg.MIXGO_RIGHT_BACK,"[2]"],[Ot.Msg.MIXLY_ALL,""]]),"key").appendField(Ot.Msg.MIXGO_PROXIMITY_SENSOR),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Ot.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Ot.Msg.MIXLY_ESP32_NEAR}))}},uU={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MIXGO_CAR_SENSOR_ONBOARD_CHANGE).appendField(new Ot.FieldDropdown([[Ot.Msg.MIXLY_ME_GO_CAR_SENSOR_ONBOARD_AUTO_CHANGE,"AS"],[Ot.Msg.MIXLY_MIXGO_CAR_USE_LINE_ONLY,"LP"],[Ot.Msg.MIXLY_MIXGO_CAR_USE_PROXIMITY_ONLY,"OA"],[Ot.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_ONLY,"LS"],[Ot.Msg.ME_GO_SENSOR_MODE_OFF,"CL"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},rU={init:function(){this.setColour(zG),this.appendDummyInput("").appendField(Ot.Msg.MIXLY_GET_GESTURE).appendField(new Ot.FieldDropdown([[Ot.Msg.ME_GO_PITCH,"[0]"],[Ot.Msg.ME_GO_ROLL,"[1]"],[Ot.Msg.ME_GO_PITCH+", "+Ot.Msg.ME_GO_ROLL,""]]),"angle"),this.appendDummyInput(""),this.setOutput(!0,Number),this.setInputsInline(!0)}},lU={init:function(){this.setColour(zG),this.appendDummyInput().appendField(Ot.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Ot.FieldDropdown([[Ot.Msg.TEXT_TRIM_LEFT,"[0]"],[Ot.Msg.MIXGO_LEFT_MID,"[1]"],[Ot.Msg.MIXGO_RIGHT_MID,"[2]"],[Ot.Msg.TEXT_TRIM_RIGHT,"[3]"],[Ot.Msg.MIXLY_ALL,""]]),"key").appendField(Ot.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_SENSOR),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Ot.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Ot.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_SENSOR}))}},dU=230,IU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.digital),"PIN"),this.setOutput(!0)}},TU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},MU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},hU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},mU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},EU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},OU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},RU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},cU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},gU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},CU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},SU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},AU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},LU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},NU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},DU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},fU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.analog),"PIN"),this.setOutput(!0)}},FU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},PU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.dac),"PIN"),this.setOutput(!0)}},vU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},YU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},XU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},yU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},xU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},bU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},VU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.touch),"PIN"),this.setOutput(!0)}},BU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},GU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},UU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},wU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},kU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},HU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},WU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},KU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},JU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},qU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},zU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},QU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},jU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},$U={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},ZU={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},tw={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},ew={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},iw={init:function(){this.setColour(dU),this.appendDummyInput("").appendField(new Ot.FieldDropdown(Rt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},nw=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},sw=function(t,e){e.definitions_.import_machine="import machine";var i="";return i+=e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value("+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},_w=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},ow=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".write("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},pw=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=e.valueToCode(this,"NUM",e.ORDER_ATOMIC);return i+".set_analog_"+this.getFieldValue("key")+"("+n+")\n"},aw=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},uw=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=this.getFieldValue("mode");return"machine.Pin("+i+").irq(handler = "+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+", trigger = "+n+")\n"},rw=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"pin#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),s=this.getFieldValue("MODE");return("pin#"==i?"pin"+n:e.variableDB_.getName(i,Ot.Variables.NAME_TYPE))+" = machine.Pin("+n+", "+s+")\n"},lw=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"dac#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("dac#"==i?"dac"+n:e.variableDB_.getName(i,Ot.Variables.NAME_TYPE))+" = machine.DAC(machine.Pin("+n+"))\n"},dw=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},Iw=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"tc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("tc#"==i?"tc"+n:e.variableDB_.getName(i,Ot.Variables.NAME_TYPE))+" = machine.TouchPad(machine.Pin("+n+"))\n"},Tw=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mini_g2="import mini_g2",["mini_g2.ext_ahtx0."+i+"()",e.ORDER_ATOMIC]},Mw=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mini_g2="import mini_g2",["mini_g2.ext_hp203x."+i,e.ORDER_ATOMIC]},hw=function(t,e){e.definitions_.import_mini_g2="import mini_g2";return["mini_g2.varistor()",e.ORDER_ATOMIC]},mw=function(t,e){if(e.definitions_.import_mini_g2="import mini_g2","mixgo_mini"==Rt.Boards.getSelectedBoardKey().split(":")[2]){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var i='ext_rfid.read_card(0, x="id")'}else{e.definitions_.import_mini_g2="import mini_g2";i='mini_g2.ext_rc522.read_card(0, x="id")'}return[i,e.ORDER_ATOMIC]},Ew=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC);if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var s="ext_rfid.read_card("+n+")"}else{e.definitions_.import_mini_g2="import mini_g2";s="mini_g2.ext_rc522.read_card("+n+")"}return[s,e.ORDER_ATOMIC]},Ow=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),s=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC);if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var _="ext_rfid.write_card("+s+","+n+")\n"}else{e.definitions_.import_mini_g2="import mini_g2";_="mini_g2.ext_rc522.write_card("+s+","+n+")\n"}return _},Rw=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),s=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC);if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var _="ext_rfid.write_card("+s+","+n+")"}else{e.definitions_.import_mini_g2="import mini_g2";_="mini_g2.ext_rc522.write_card("+s+","+n+")"}return[_,e.ORDER_ATOMIC]},cw=function(t,e){var i=Rt.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("key");if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var s="ext_rfid.scan_card()=="+n}else{e.definitions_.import_mini_g2="import mini_g2";s="mini_g2.ext_rc522.scan_card()=="+n}return[s,e.ORDER_ATOMIC]},gw=function(t,e){return e.definitions_.import_me_go_car="from me_go import car",["car."+this.getFieldValue("op"),e.ORDER_ATOMIC]},Cw=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car","car.setonoff("+i+","+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},Sw=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car",["car.getrightness("+i+")",e.ORDER_ATOMIC]},Aw=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car",["car.getonoff("+i+")",e.ORDER_ATOMIC]},Lw=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car","car.setbrightness("+i+","+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},Nw=function(t,e){var i=this.getFieldValue("VAR");return e.definitions_.import_me_go_car="from me_go import car",'car.move("'+i+'",'+e.valueToCode(this,"speed",e.ORDER_ASSIGNMENT)+")\n"},Dw=function(t,e){var i=this.getFieldValue("VAR");return e.definitions_.import_me_go_car="from me_go import car",'car.move("'+i+'")\n'},fw=function(t,e){var i=this.getFieldValue("wheel");e.definitions_.import_me_go_car="from me_go import car";var n=this.getFieldValue("direction");return 0==i&&("CW"==n?n="CCW":"CCW"==n&&(n="CW")),"car.motor(car.MOTO["+i+'],"'+n+'",'+e.valueToCode(this,"speed",e.ORDER_ATOMIC)+")\n"},Fw=function(t,e){var i=this.getFieldValue("mode");return e.definitions_["import_me_go_hall_"+i]="from me_go import hall_"+i,"hall_"+i+".irq_cb("+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+")\n"},Pw=function(t,e){var i=this.getFieldValue("mode"),n=this.getFieldValue("args");e.definitions_["import_me_go_hall_"+i]="from me_go import hall_"+i;var s=e.valueToCode(this,"num",e.ORDER_ATOMIC);return"all"==n?"hall_"+i+".initial(turns="+s+",distance="+s+")\n":"hall_"+i+".initial("+n+"="+s+")\n"},vw=function(t,e){var i=this.getFieldValue("mode"),n=this.getFieldValue("args");return e.definitions_["import_me_go_hall_"+i]="from me_go import hall_"+i,["hall_"+i+"."+n,e.ORDER_ATOMIC]},Yw=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car",["car.patrol()"+i,e.ORDER_ATOMIC]},Xw=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car",["car.obstacle()"+i,e.ORDER_ATOMIC]},yw=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car","car.ir_mode(car."+i+")\n"},xw=function(t,e){return e.definitions_.import_mixgo_me_onboard_mxc6655xa="from mixgo_me import onboard_mxc6655xa",["onboard_mxc6655xa.eulerangles(upright=True)"+this.getFieldValue("angle"),e.ORDER_ATOMIC]},bw=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car",["car.light()"+i,e.ORDER_ATOMIC]},Vw=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},Bw=Vw,Gw=Vw,Uw=Vw,ww=Vw,kw=Vw,Hw=Vw,Ww=Vw,Kw=Vw,Jw=Vw,qw=Vw,zw=Vw,Qw=Vw,jw=Vw,$w=Vw,Zw=Vw,tk=Vw,ek=Vw,ik=Vw,nk=Vw,sk=Vw,_k=Vw,ok=Vw,pk=Vw,ak=Vw,uk=Vw,rk=Vw,lk=Vw,dk=Vw,Ik=Vw,Tk=Vw,Mk=Vw,hk=Vw,mk=Vw,Ek=Vw,Ok=Vw,Rk=Vw,ck=Vw,gk=Vw,Ck=Vw,Sk=Vw,Ak=Vw,Lk=Vw,Nk=Vw,Dk=Vw;Object.assign(Ot.Variables,gt),Object.assign(Ot.Procedures,Xu),Ot.Python=yu,Ot.generator=yu,Rt.Profile.default={},Object.assign(Rt.Profile,gG),Object.assign(Rt.Profile.default,gG["MixGo CC"]),Object.assign(Ot.Blocks,e,i,n,s,_,o,p,a,u,r,l,d,I,V,H,k,X,B,W,f,w,U,G,F,D,N,x,y,b,P,v,Y,lt,dt,It,Tt),Object.assign(Ot.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,nt,ut,at,Z,st,rt,q,pt,ot,_t,z,J,K,et,tt,it,Q,j,$,Mt,ht,mt,Et)})(); \ No newline at end of file diff --git a/boards/default/micropython_esp32/index.xml b/boards/default/micropython_esp32/index.xml index 1f528f7b..0c9733fd 100644 --- a/boards/default/micropython_esp32/index.xml +++ b/boards/default/micropython_esp32/index.xml @@ -1 +1 @@ -02000attachInterrupt_funcattachInterrupt_func010,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!ms10timtim1000tim_callbacktim_callback5000200090x151100a10.998124.82997110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyMixly,HelloMixlyprompt02MixlyMixly0XFF00FFcodebMixlyMixly1attachInterrupt_funcattachInterrupt_funcp20189141420452023,1,1,12,0,0180292023,1,1,12,0,01001004404401000004120000000000010001000100Mixly0MixlyMixly500MixlyMixly500>10.5001MixlyMixly0010MixlyMixly0550MixlyMixly550000200050502020201510000i2c_extend2122400000pei2c_extendpepe100pepe100pepe100pewifinamewifipassword8080AUTH TOKEN0_value02000notify0Your Target Emailsubjectbodycolor#FF0000wifinamewifipasswordmixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012http://mixio.mixly.org/time.phpmixio.mixly.cnwifinamewifipasswordcsub_cb31444082183.230.40.3914109261n63JySRowo13ZLDBKw6y896E0=MixlyRobotsub_cbEQmsg1ciot_dict"tc"tc0ciot_dictccwifinamewifipasswordSVa3S0UKHIy9dDArs北京SVa3S0UKHIy9dDArs北京11111ble_cble_pMixlyble_cble_cMixlyble_cble_xble_xble_xMixlyble_xble_methodble_methodEQdataMixlyhandlehandle_methodhandle_methodkey1key2key3keyxble_keyboard_mouse10Hello, Mixly!1002000001000009000,4500,563,5630x1234callbackcmdaddrrawpulsesi2c2221100000i2c00i2c00i2ci2ci2cspi200000045spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345buf1Mixlyow12owowow12345ow12345owmy_now0my_nowmy_nowmy_nowFFFFFFFFFFFFmixlymy_nowmy_nowcbcbEQmsg1spi10000004512spi8my_lora433.925716my_loramy_loramy_loraMixlyi2c_extend45100000xsensori2c_extendxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor1013.25xsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor5000500xsensorxsensorxsensorxsensorxsensorxsensorspi10000004512spi8ysensorysensorysensor0ysensor0ysensor0Mixlyysensor0Mixlyysensorysensor39,119.96,31.67ysensorysensorstation45ps2_handle24512ps2_handle50ps2_handleps2_handlews_wr457ws_wrws_wrws_wr360002zsensorzsensorzsensorzsensorweight12500weightmidi0midi440midi4401000midimidimidi4120midimidirgb04rgb0000rgb000rgb0001000rgb1000rgb100100i2c_extend45400000Motori2c_extendMotor100Motor1024102402actuatoractuatoractuatoractuatoractuator你好米思齐actuatoractuatoractuator20actuatoractuatormixly*.mp3i2c_extend45400000matrixi2c_extendmatrixmatrixmatrixMixly0matrixMixlymatrixMixly500matrixMixlymatrixMixly500matrixmatrix>matrixmatrix1matrixmatrixmatrix0.5matrixmatrixi2c_extend45100000dispi2c_extenddisp2333dispdisp1i2c_extend45100000lcdi2c_extend0x27lcdMixly00lcdMixly005lcdlcdi2c_extend45100000oledi2c_extend0x3coledoled001oledMixlyoledMixly0010oledMixlyoledMixly0550oledMixlyoledMixly5500oled0020oled005050oled20202015oled1oled00oled00oledspi1000000450spi78tft_st7789135240tft_st7789001#ffffff255,255,0tft_st7789Mixly0050#ffffff255,255,0tft_st7789Mixly0550#ffffff255,255,0tft_st7789Mixly5500#ffffff255,255,0tft_st7789004040#ffffff255,255,0tft_st778912ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor'ni-hao','hong-se','lv-se','lan-se','bai-se','hei-se'0.1ai_sensor1.wav5ai_sensor1.wav100ai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsai_sensor'猫','狗','笔记本','笔'mixgo5自模型训练infoai_sensor'猫','狗','笔记本','笔'mixgo自模型识别objectsinfoai_sensor0.1606, 0.3562, 0.4712, 0.9568, 0.9877, 1.9108, 1.8761, 3.5310, 3.4423, 5.6823/sd/masks.kmodel外部模型加载objects12ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor1.wav5ai_sensor1.wav100infoai_sensorlicensePlateinfoai_sensorfaceinfoai_sensor20objectsai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsfilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0wifinamewifipasswordwlanwlanwlanwlanwlan127.16.0.801234567wlanwlanwlanwlanwlan127.16.0.81connect_wifiwlanAPwlanTruewlanwlanSmallCabbage1WHILETRUEEQ0wlan0.0.0.0ms1000TRUEss0.0.0.080s192.168.0.180s5ss1024sbMixlyresponses1024sbMixlyresponse127.0.0.180sntp.aliyun.comresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponsehttp://192.168.1.1:11434qwen2.5-coder:0.5b5https://api.deepseek.comAPI Keydeepseek-chat5请介绍一下米思齐?content_callbackcontent_callbackcontent请介绍一下米思齐? \ No newline at end of file +02000attachInterrupt_funcattachInterrupt_func010,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!ms10timtim1000tim_callbacktim_callback5000200090x151100a10.998124.82997110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyMixly,HelloMixlyprompt02MixlyMixly0XFF00FFcodebMixlyMixly1attachInterrupt_funcattachInterrupt_funcp20189141420452023,1,1,12,0,0180292023,1,1,12,0,01001004404401000004120000000000010001000100Mixly0MixlyMixly500MixlyMixly500>10.5001MixlyMixly0010MixlyMixly0550MixlyMixly550000200050502020201510000i2c_extend2122400000pei2c_extendpepe100pepe100pepe100pewifinamewifipassword8080AUTH TOKEN0_value02000notify0Your Target Emailsubjectbodycolor#FF0000wifinamewifipasswordmixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012http://mixio.mixly.org/time.phpmixio.mixly.cnwifinamewifipasswordcsub_cb31444082183.230.40.3914109261n63JySRowo13ZLDBKw6y896E0=MixlyRobotsub_cbEQmsg1ciot_dict"tc"tc0ciot_dictccwifinamewifipasswordSVa3S0UKHIy9dDArs北京SVa3S0UKHIy9dDArs北京11111ble_cble_pMixlyble_cble_cMixlyble_cble_xble_xble_xMixlyble_xble_methodble_methodEQdataMixlyhandlehandle_methodhandle_methodkey1key2key3keyxble_keyboard_mouse10Hello, Mixly!1002000001000009000,4500,563,5630x1234callbackcmdaddrrawpulsesi2c2221100000i2c00i2c00i2ci2ci2cspi200000045spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345buf1Mixlyow12owowow12345ow12345owmy_now0my_nowmy_nowmy_nowFFFFFFFFFFFFmixlymy_nowmy_nowcbcbEQmsg1spi10000004512spi8my_lora433.925716my_loramy_loramy_loraMixlyi2c_extend45100000xsensori2c_extendxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor1013.25xsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor5000500xsensorxsensorxsensorxsensorxsensorxsensorspi10000004512spi8ysensorysensorysensor0ysensor0ysensor0Mixlyysensor0Mixlyysensorysensor39,119.96,31.67ysensorysensorstation45ps2_handle24512ps2_handle50ps2_handleps2_handlews_wr457ws_wrws_wrws_wr360002zsensorzsensorzsensorzsensorweight12500weightmidi0midi440midi4401000midimidimidi4120midimidirgb04rgb0000rgb000rgb0001000rgb1000rgb100100i2c_extend45400000Motori2c_extendMotor100Motor1024102402actuatoractuatoractuatoractuatoractuator你好米思齐actuatoractuatoractuator20actuatoractuatormixly*.mp3i2c_extend45400000matrixi2c_extendmatrixmatrixmatrixMixly0matrixMixlymatrixMixly500matrixMixlymatrixMixly500matrixmatrix>matrixmatrix1matrixmatrixmatrix0.5matrixmatrixi2c_extend45100000dispi2c_extenddisp2333dispdisp1i2c_extend45100000lcdi2c_extend0x27lcdMixly00lcdMixly005lcdlcdi2c_extend45100000oledi2c_extend0x3coledoled001oledMixlyoledMixly0010oledMixlyoledMixly0550oledMixlyoledMixly5500oled0020oled005050oled20202015oled1oled00oled00oledspi1000000450spi78tft_st7789135240tft_st7789001#ffffff255,255,0tft_st7789Mixly0050#ffffff255,255,0tft_st7789Mixly0550#ffffff255,255,0tft_st7789Mixly5500#ffffff255,255,0tft_st7789004040#ffffff255,255,0tft_st778912ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor'ni-hao','hong-se','lv-se','lan-se','bai-se','hei-se'0.1ai_sensor1.wav5ai_sensor1.wav100ai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsai_sensor'猫','狗','笔记本','笔'mixgo5自模型训练infoai_sensor'猫','狗','笔记本','笔'mixgo自模型识别objectsinfoai_sensor0.1606, 0.3562, 0.4712, 0.9568, 0.9877, 1.9108, 1.8761, 3.5310, 3.4423, 5.6823/sd/masks.kmodel外部模型加载objects12ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor1.wav5ai_sensor1.wav100infoai_sensorlicensePlateinfoai_sensorfaceinfoai_sensor20objectsai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsfilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0wifinamewifipasswordwlanwlanwlanwlanwlan127.16.0.801234567wlanwlanwlanwlanwlan127.16.0.81connect_wifiwlanAPwlanTruewlanwlanSmallCabbage1WHILETRUEEQ0wlan0.0.0.0ms1000TRUEss0.0.0.080s192.168.0.180s5ss1024sbMixlyresponses1024sbMixlyresponse127.0.0.180sntp.aliyun.comresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponsehttp://192.168.1.1:11434qwen2.5-coder:0.5b5https://api.deepseek.comAPI Keydeepseek-chat5请介绍一下米思齐?content_callbackcontent_callbackcontent请介绍一下米思齐? \ No newline at end of file diff --git a/boards/default/micropython_esp32/main.bundle.1bd783b1.js b/boards/default/micropython_esp32/main.bundle.1bd783b1.js new file mode 100644 index 00000000..f9213b5d --- /dev/null +++ b/boards/default/micropython_esp32/main.bundle.1bd783b1.js @@ -0,0 +1,21 @@ +(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>gt,controls_typeLists:()=>Ct,lists_zip:()=>St,lists_zip_container:()=>At,lists_zip_item:()=>Lt,unpack_iterable_object:()=>Nt,variables_change:()=>Rt,variables_get:()=>Et,variables_global:()=>ct,variables_set:()=>Ot});var i={};t.r(i),t.d(i,{base_setup:()=>Ft,controls_delay:()=>Pt,controls_end_program:()=>vt,controls_except:()=>Wt,controls_finally:()=>Kt,controls_flow_statements:()=>Vt,controls_for:()=>Bt,controls_forEach:()=>xt,controls_for_range:()=>Gt,controls_if:()=>Yt,controls_if_else:()=>Ht,controls_if_elseif:()=>wt,controls_if_if:()=>Ut,controls_lambda:()=>Qt,controls_main:()=>ft,controls_pass:()=>qt,controls_range:()=>Xt,controls_repeat_ext:()=>Jt,controls_thread:()=>zt,controls_try:()=>kt,controls_try_finally:()=>yt,controls_whileUntil:()=>bt,datetime_fromtimestamp:()=>ie,do_while:()=>jt,garbage_collection:()=>$t,gene_unique_identifier:()=>ne,get_mem_alloc:()=>Zt,get_mem_free:()=>te,get_unique_identifier:()=>ee});var n={};t.r(n),t.d(n,{base_map:()=>Se,generate_cartesian_product:()=>Le,math_arithmetic:()=>ae,math_bit:()=>re,math_constant:()=>_e,math_constant_mp:()=>pe,math_constrain:()=>me,math_dec:()=>le,math_degree_to_radian:()=>De,math_indexer_number:()=>Oe,math_map:()=>Ee,math_max_min:()=>Te,math_number:()=>oe,math_number_base_conversion:()=>Me,math_radian_to_degree:()=>Ne,math_random:()=>he,math_random_seed:()=>Re,math_round:()=>ce,math_selfcalcu:()=>ue,math_to_int:()=>Ie,math_trig:()=>de,text_to_number:()=>ge,text_to_number_skulpt:()=>Ce,turn_to_int:()=>Ae});var s={};t.r(s),t.d(s,{ascii_to_char:()=>Xe,char_to_ascii:()=>xe,number_to_text:()=>be,os_system:()=>pi,text:()=>Fe,text_capital:()=>We,text_center:()=>Ke,text_char:()=>ve,text_char_at:()=>Be,text_char_at2:()=>Ve,text_char_at3:()=>ni,text_compareTo:()=>ii,text_compare_to:()=>ke,text_create_with_container:()=>Ze,text_create_with_item:()=>ti,text_encode:()=>oi,text_equals_starts_ends:()=>He,text_eval:()=>_i,text_find:()=>Je,text_format:()=>$e,text_format_noreturn:()=>si,text_join:()=>Ye,text_join_seq:()=>Qe,text_length:()=>ye,text_random_char:()=>Ge,text_replace:()=>qe,text_split:()=>ze,text_strip:()=>je,text_substring:()=>we,text_substring2:()=>Ue,text_substring3:()=>ei,text_textarea:()=>Pe});var o={};t.r(o),t.d(o,{ENUMERATE:()=>Hi,content_in_lists:()=>Wi,enumerate:()=>ki,list_many_input:()=>Fi,list_tolist:()=>Xi,list_tolist2:()=>wi,list_trig:()=>Ni,lists_2d_get_col_row_data:()=>li,lists_2d_get_data_with_col_row:()=>di,lists_append_extend:()=>Ei,lists_change_to:()=>fi,lists_change_to_general:()=>vi,lists_clear:()=>Ci,lists_create_with:()=>Ii,lists_create_with2:()=>xi,lists_create_with_container:()=>Mi,lists_create_with_item:()=>hi,lists_create_with_noreturn:()=>Pi,lists_create_with_text:()=>Ti,lists_create_with_text2:()=>bi,lists_del_general:()=>Yi,lists_find:()=>Li,lists_getIndex3:()=>yi,lists_getSublist3:()=>Vi,lists_get_index:()=>ui,lists_get_random_item:()=>Oi,lists_get_random_sublist:()=>Ri,lists_get_sublist:()=>ri,lists_insert_value:()=>ci,lists_insert_value2:()=>Gi,lists_pop:()=>Ai,lists_remove_at:()=>Si,lists_remove_at2:()=>Ui,lists_reverse:()=>gi,lists_setIndex3:()=>Bi,lists_set_index:()=>mi,lists_sort:()=>Di});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>an,dicts_add_or_change:()=>Zi,dicts_clear:()=>nn,dicts_create_with:()=>Ji,dicts_create_with_container:()=>Qi,dicts_create_with_item:()=>qi,dicts_create_with_noreturn:()=>dn,dicts_deldict:()=>pn,dicts_delete:()=>tn,dicts_get:()=>ji,dicts_get_default:()=>$i,dicts_items:()=>sn,dicts_keys:()=>zi,dicts_length:()=>_n,dicts_pop:()=>un,dicts_setdefault:()=>rn,dicts_to_json:()=>In,dicts_to_json2:()=>hn,dicts_to_to:()=>Mn,dicts_todict:()=>ln,dicts_update:()=>en,dicts_values:()=>on,json_to_dicts:()=>Tn});var p={};t.r(p),t.d(p,{logic_boolean:()=>gn,logic_compare:()=>En,logic_compare_continous:()=>On,logic_is:()=>Ln,logic_is_in:()=>An,logic_negate:()=>cn,logic_null:()=>Cn,logic_operation:()=>Rn,logic_tobool:()=>Nn,logic_true_or_false:()=>Sn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>zn,sdcard_use_spi_init:()=>qn,storage_can_write_ornot:()=>bn,storage_change_dir:()=>Jn,storage_close_file:()=>Vn,storage_delete_file:()=>Gn,storage_file_seek:()=>Hn,storage_file_tell:()=>wn,storage_file_write:()=>vn,storage_fileopen:()=>fn,storage_fileopen_new:()=>Fn,storage_fileopen_new_encoding:()=>Pn,storage_get_a_line:()=>xn,storage_get_contents:()=>Xn,storage_get_contents_without_para:()=>Yn,storage_get_current_dir:()=>kn,storage_get_file_size:()=>Un,storage_get_filename:()=>yn,storage_is_file:()=>Qn,storage_list_all_files:()=>Bn,storage_make_dir:()=>Wn,storage_open_file_with_os:()=>Dn,storage_rename:()=>Kn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>es,procedures_callreturn:()=>is,procedures_defnoreturn:()=>jn,procedures_defreturn:()=>$n,procedures_ifreturn:()=>ns,procedures_mutatorarg:()=>ts,procedures_mutatorcontainer:()=>Zn,procedures_return:()=>ss});var r={};t.r(r),t.d(r,{tuple_change_to:()=>hs,tuple_create_with:()=>_s,tuple_create_with_container:()=>ps,tuple_create_with_item:()=>as,tuple_create_with_noreturn:()=>Rs,tuple_create_with_text2:()=>us,tuple_create_with_text_return:()=>rs,tuple_del:()=>Is,tuple_find:()=>ms,tuple_getIndex:()=>ds,tuple_getSublist:()=>Os,tuple_get_random_item:()=>gs,tuple_get_sublist:()=>cs,tuple_input:()=>Ss,tuple_join:()=>Ts,tuple_length:()=>ls,tuple_max:()=>Ms,tuple_totuple:()=>Cs,tuple_trig:()=>Es});var d={};t.r(d),t.d(d,{set_add_discard:()=>Xs,set_clear:()=>Ps,set_create_with:()=>Ls,set_create_with_container:()=>Ns,set_create_with_item:()=>Ds,set_create_with_text_return:()=>ys,set_length:()=>fs,set_operate:()=>vs,set_operate_update:()=>Ys,set_pop:()=>Fs,set_sub:()=>xs,set_toset:()=>Vs,set_update:()=>bs});var l={};t.r(l),t.d(l,{html_content:()=>Hs,html_content_more:()=>ks,html_document:()=>Gs,html_form:()=>Ks,html_head_body:()=>ws,html_style:()=>Ws,html_style_color:()=>Qs,html_style_content:()=>Js,html_text:()=>qs,html_title:()=>Us});var I={};t.r(I),t.d(I,{attribute_access:()=>uo,function_call:()=>_o,function_call_container:()=>po,function_call_item:()=>ao,raw_block:()=>$s,raw_empty:()=>to,raw_expression:()=>Zs,raw_table:()=>js,text_comment:()=>eo,text_print_multiple:()=>no,text_print_multiple_container:()=>so,text_print_multiple_item:()=>oo,type_check:()=>io});var T={};t.r(T),t.d(T,{controls_type:()=>Mo,controls_typeLists:()=>ho,lists_zip:()=>mo,unpack_iterable_object:()=>Eo,variables_change:()=>Io,variables_get:()=>ro,variables_global:()=>To,variables_set:()=>lo});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>Do,base_setup:()=>Ro,controls_delay:()=>No,controls_flow_statements:()=>Lo,controls_for:()=>Co,controls_forEach:()=>Yo,controls_for_range:()=>So,controls_if:()=>co,controls_interrupts:()=>Po,controls_lambda:()=>xo,controls_main:()=>Oo,controls_millis:()=>fo,controls_nointerrupts:()=>vo,controls_pass:()=>yo,controls_range:()=>Xo,controls_repeat:()=>Wo,controls_repeat_ext:()=>Go,controls_thread:()=>Vo,controls_try_finally:()=>go,controls_whileUntil:()=>Ao,datetime_fromtimestamp:()=>Ko,do_while:()=>Bo,garbage_collection:()=>Uo,gene_unique_identifier:()=>Jo,get_mem_alloc:()=>wo,get_mem_free:()=>Ho,get_unique_identifier:()=>ko,reset:()=>Fo,time_sleep:()=>bo});var h={};t.r(h),t.d(h,{base_map:()=>T_,generate_cartesian_product:()=>h_,math_arithmetic:()=>$o,math_bit:()=>jo,math_constant:()=>qo,math_constant_mp:()=>zo,math_constrain:()=>p_,math_dec:()=>i_,math_degree_to_radian:()=>E_,math_indexer_number:()=>r_,math_map:()=>__,math_max_min:()=>s_,math_number:()=>Qo,math_number_base_conversion:()=>a_,math_radian_to_degree:()=>m_,math_random:()=>o_,math_random_seed:()=>u_,math_round:()=>d_,math_selfcalcu:()=>Zo,math_single:()=>t_,math_to_int:()=>n_,math_trig:()=>e_,text_to_number:()=>l_,text_to_number_skulpt:()=>I_,turn_to_int:()=>M_});var m={};t.r(m),t.d(m,{ascii_to_char:()=>C_,char_to_ascii:()=>S_,number_to_text:()=>A_,os_system:()=>Q_,text:()=>O_,text_capital:()=>X_,text_center:()=>x_,text_char:()=>c_,text_char_at:()=>D_,text_char_at2:()=>N_,text_char_at3:()=>W_,text_compareTo:()=>k_,text_compare_to:()=>P_,text_encode:()=>K_,text_equals_starts_ends:()=>F_,text_eval:()=>J_,text_find:()=>b_,text_format:()=>U_,text_format_noreturn:()=>w_,text_join:()=>g_,text_join_seq:()=>y_,text_length:()=>L_,text_random_char:()=>f_,text_replace:()=>V_,text_split:()=>B_,text_strip:()=>G_,text_substring:()=>Y_,text_substring2:()=>v_,text_substring3:()=>H_,text_textarea:()=>R_});var E={};t.r(E),t.d(E,{content_in_lists:()=>Dp,enumerate:()=>Np,list_many_input:()=>Tp,list_tolist:()=>Ap,list_tolist2:()=>Lp,list_trig:()=>dp,lists_2d_get_col_row_data:()=>j_,lists_2d_get_data_with_col_row:()=>z_,lists_append_extend:()=>ip,lists_change_to:()=>Ip,lists_change_to_general:()=>hp,lists_clear:()=>pp,lists_create_with:()=>$_,lists_create_with2:()=>Ep,lists_create_with_noreturn:()=>Mp,lists_create_with_text:()=>Z_,lists_create_with_text2:()=>Op,lists_del_general:()=>mp,lists_find:()=>ap,lists_getIndex3:()=>Rp,lists_getSublist3:()=>cp,lists_get_index:()=>tp,lists_get_random_item:()=>np,lists_get_random_sublist:()=>sp,lists_get_sublist:()=>q_,lists_insert_value:()=>op,lists_insert_value2:()=>Cp,lists_pop:()=>rp,lists_remove_at:()=>up,lists_remove_at2:()=>Sp,lists_reverse:()=>_p,lists_setIndex3:()=>gp,lists_set_index:()=>ep,lists_sort:()=>lp});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Up,dicts_add_or_change:()=>Yp,dicts_clear:()=>bp,dicts_create_with:()=>fp,dicts_create_with_noreturn:()=>kp,dicts_deldict:()=>Gp,dicts_delete:()=>Xp,dicts_get:()=>Pp,dicts_get_default:()=>vp,dicts_items:()=>yp,dicts_keys:()=>Fp,dicts_length:()=>Bp,dicts_pop:()=>wp,dicts_setdefault:()=>Hp,dicts_to_json:()=>Kp,dicts_to_json2:()=>qp,dicts_to_to:()=>Qp,dicts_todict:()=>Wp,dicts_update:()=>xp,dicts_values:()=>Vp,json_to_dicts:()=>Jp});var R={};t.r(R),t.d(R,{logic_boolean:()=>ta,logic_compare:()=>zp,logic_compare_continous:()=>jp,logic_is:()=>sa,logic_is_in:()=>na,logic_negate:()=>Zp,logic_null:()=>ea,logic_operation:()=>$p,logic_tobool:()=>oa,logic_true_or_false:()=>ia});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Da,sdcard_use_spi_init:()=>Na,storage_can_write_ornot:()=>Ta,storage_change_dir:()=>ga,storage_close_file:()=>ha,storage_delete_file:()=>Ea,storage_file_seek:()=>ca,storage_file_tell:()=>Ra,storage_file_write:()=>ra,storage_fileopen:()=>pa,storage_fileopen_new:()=>aa,storage_fileopen_new_encoding:()=>ua,storage_get_a_line:()=>Ia,storage_get_contents:()=>la,storage_get_contents_without_para:()=>da,storage_get_current_dir:()=>Ca,storage_get_file_size:()=>Oa,storage_get_filename:()=>Ma,storage_is_file:()=>La,storage_list_all_files:()=>ma,storage_make_dir:()=>Sa,storage_open_file_with_os:()=>_a,storage_rename:()=>Aa});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>va,procedures_callreturn:()=>Pa,procedures_defnoreturn:()=>Fa,procedures_defreturn:()=>fa,procedures_ifreturn:()=>Ya,procedures_return:()=>Xa});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Ha,tuple_create_with:()=>xa,tuple_create_with_noreturn:()=>Ja,tuple_create_with_text2:()=>ba,tuple_create_with_text_return:()=>ya,tuple_del:()=>Ga,tuple_find:()=>ka,tuple_getIndex:()=>Va,tuple_getSublist:()=>Ka,tuple_get_random_item:()=>qa,tuple_get_sublist:()=>Qa,tuple_input:()=>ja,tuple_join:()=>Ua,tuple_length:()=>Ba,tuple_max:()=>wa,tuple_totuple:()=>za,tuple_trig:()=>Wa});var S={};t.r(S),t.d(S,{set_add_discard:()=>su,set_clear:()=>eu,set_create_with:()=>$a,set_create_with_text_return:()=>pu,set_length:()=>Za,set_operate:()=>iu,set_operate_update:()=>nu,set_pop:()=>tu,set_sub:()=>ou,set_toset:()=>au,set_update:()=>_u});var A={};t.r(A),t.d(A,{html_content:()=>lu,html_content_more:()=>Iu,html_document:()=>uu,html_form:()=>Mu,html_head_body:()=>du,html_style:()=>Tu,html_style_content:()=>hu,html_text:()=>mu,html_title:()=>ru});var L={};t.r(L),t.d(L,{attribute_access:()=>Su,function_call:()=>Cu,raw_block:()=>Eu,raw_empty:()=>Ru,raw_expression:()=>Ou,raw_table:()=>cu,type_check:()=>gu});var N={};t.r(N),t.d(N,{PIN_init:()=>fr,actuator_extern_get_led_bright:()=>Vu,actuator_extern_get_led_state:()=>Bu,actuator_extern_led_bright:()=>yu,actuator_extern_led_brightness:()=>Gu,actuator_ms32006_dcmotor:()=>qu,actuator_ms32006_init:()=>Qu,actuator_ms32006_stepper:()=>zu,actuator_neopixel_init:()=>ju,actuator_neopixel_rgb:()=>$u,actuator_neopixel_rgb_all:()=>Zu,actuator_neopixel_rgb_show_all_chase:()=>ir,actuator_neopixel_rgb_show_all_rainbow:()=>er,actuator_neopixel_write:()=>tr,actuator_use_uart_init:()=>nr,esp32_music_get_tempo_extern:()=>Xu,esp32_music_pitch:()=>Fu,esp32_music_pitch_init:()=>fu,esp32_music_pitch_with_time:()=>Pu,esp32_music_play_list:()=>vu,esp32_music_reset_extern:()=>xu,esp32_music_set_tempo_extern:()=>Yu,esp32_music_stop:()=>bu,mixbot_actuator_extern_get_addr:()=>Nr,mixbot_actuator_extern_set_addr:()=>Dr,mixbot_addr_extern:()=>Tr,parrot_PIN_init:()=>Yr,parrot_move_speed:()=>Xr,pin_led_bright:()=>Fr,player_insert_music:()=>ur,player_play_music:()=>ar,player_set_mode:()=>pr,player_set_play:()=>or,player_set_volume:()=>_r,player_whether_stop:()=>sr,robot_led_extern:()=>Er,robot_led_extern_get_value:()=>Or,robot_motor_extern:()=>Mr,robot_motor_extern_get_speed:()=>hr,robot_servo_extern_absolute_run:()=>Cr,robot_servo_extern_get_status:()=>Rr,robot_servo_extern_relative_continue:()=>Lr,robot_servo_extern_relative_origin:()=>Sr,robot_servo_extern_relative_run:()=>Ar,robot_servo_extern_stop:()=>gr,robot_servo_extern_stop_mode:()=>cr,robot_traffic_light_extern:()=>mr,servo_PIN_init:()=>Pr,servo_get_angle:()=>Ku,servo_get_speed:()=>Ju,servo_init:()=>Uu,servo_move:()=>wu,servo_move_angle:()=>vr,servo_set_angle:()=>ku,servo_set_speed:()=>Wu,servo_speed_360:()=>Hu,syn6288_builtin_voice:()=>lr,syn6288_get_voice:()=>dr,syn6288_set_voice:()=>rr,syn6288_tts_play:()=>Ir});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>ld,actuator_dc_motor_stop:()=>Id,actuator_get_led_bright:()=>Br,actuator_get_led_state:()=>Gr,actuator_led_bright:()=>Vr,actuator_led_brightness:()=>Ur,actuator_mixbot_buzzer_on_off:()=>Ed,actuator_mixgo_nova_mic_get:()=>Cd,actuator_mixgo_nova_mic_set:()=>gd,actuator_mixgo_nova_onboard_music_pitch:()=>fd,actuator_mixgo_nova_onboard_music_stop:()=>Fd,actuator_mixgo_nova_play_audio:()=>Nd,actuator_mixgo_nova_play_online_audio:()=>Dd,actuator_mixgo_nova_record_audio:()=>Ld,actuator_mixgo_nova_voice_get:()=>Ad,actuator_mixgo_nova_voice_set:()=>Sd,actuator_mixgo_zero_led_color:()=>wr,actuator_onboard_neopixel_rgb:()=>Qr,actuator_onboard_neopixel_rgb_all:()=>qr,actuator_onboard_neopixel_rgb_show_all_chase:()=>jr,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>zr,actuator_onboard_neopixel_write:()=>$r,actuator_rm_onboard_neopixel_rgb:()=>Zr,actuator_rm_onboard_neopixel_rgb_all:()=>td,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>ed,actuator_stepper_keep:()=>rd,actuator_stepper_stop:()=>dd,analog_ble_keyboard_init:()=>Hd,analog_ble_keyboard_input:()=>Kd,analog_ble_keyboard_mouse_init:()=>tl,analog_ble_keyboard_mouse_input:()=>sl,analog_ble_keyboard_mouse_send_battery:()=>nl,analog_ble_keyboard_mouse_str:()=>ol,analog_ble_keyboard_send_battery:()=>Qd,analog_ble_keyboard_str:()=>Jd,analog_ble_mouse_init:()=>qd,analog_ble_mouse_input:()=>$d,analog_ble_mouse_keyboard_input:()=>_l,analog_ble_mouse_send_battery:()=>Zd,analog_keyboard_input:()=>Xd,analog_keyboard_str:()=>wd,analog_mouse_input:()=>Gd,bitbot_motor:()=>cd,bitbot_move:()=>Od,bitbot_stop:()=>Rd,ble_keyboard_connect:()=>Wd,ble_keyboard_get_mac:()=>kd,ble_keyboard_mouse_connect:()=>il,ble_keyboard_mouse_get_mac:()=>el,ble_mouse_connect:()=>jd,ble_mouse_get_mac:()=>zd,cc_number:()=>Jr,educore_ble_keyboard_input:()=>hl,educore_ble_sensor_connected:()=>Ml,educore_ble_sensor_init:()=>Tl,educore_buzzer:()=>pl,educore_buzzer_play_tone:()=>al,educore_buzzer_play_tone_time:()=>ul,educore_buzzer_stop:()=>rl,educore_neopixel_clear:()=>Il,educore_neopixel_rgb:()=>ll,educore_rgb_light:()=>dl,esp32_music_get_tempo:()=>nd,esp32_music_reset:()=>sd,esp32_music_set_tempo:()=>id,esp32_onboard_music_pitch:()=>od,esp32_onboard_music_pitch_with_time:()=>_d,esp32_onboard_music_play_list:()=>ad,esp32_onboard_music_stop:()=>pd,general_key:()=>bd,general_key_tuple:()=>yd,generalkey_container:()=>Vd,generalkey_create_with_item:()=>Bd,get_keyboard_light:()=>ml,get_power_output:()=>vd,ledswitch:()=>yr,mixbot_motor:()=>md,mixbot_motor_status:()=>Td,mixbot_move:()=>Md,mixbot_stop:()=>hd,mouse_key:()=>Ud,number:()=>br,rm_actuator_get_led_bright:()=>kr,rm_actuator_get_led_state:()=>Wr,rm_actuator_led_bright:()=>Hr,rm_actuator_led_brightness:()=>Kr,rm_motor:()=>ud,set_all_power_output:()=>Yd,set_power_output:()=>Pd,special_key:()=>xd});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>jl,ai_sensor_ailocal_class:()=>Gl,ai_sensor_ailocal_class_result:()=>Ul,ai_sensor_ailocal_train:()=>Bl,ai_sensor_asr_recognize:()=>Kl,ai_sensor_audio_play:()=>Hl,ai_sensor_audio_record:()=>wl,ai_sensor_barcode:()=>Al,ai_sensor_circle:()=>Pl,ai_sensor_classifier_faces:()=>zl,ai_sensor_color:()=>xl,ai_sensor_color_chases:()=>Vl,ai_sensor_color_chases_result:()=>yl,ai_sensor_config:()=>Cl,ai_sensor_face:()=>ql,ai_sensor_find_20objects:()=>$l,ai_sensor_find_barcodes:()=>Ll,ai_sensor_find_circles:()=>vl,ai_sensor_find_colors:()=>bl,ai_sensor_find_licenseplates:()=>Ql,ai_sensor_find_lines:()=>Fl,ai_sensor_find_qrcodes:()=>gl,ai_sensor_find_rects:()=>Xl,ai_sensor_find_tags:()=>Dl,ai_sensor_licenseplate:()=>Jl,ai_sensor_line:()=>fl,ai_sensor_qrcode:()=>Rl,ai_sensor_qrcode_lite:()=>cl,ai_sensor_rect:()=>Yl,ai_sensor_rgb:()=>Sl,ai_sensor_tag:()=>Nl,ai_sensor_use_uart_init:()=>Ol,ai_sensor_yolo_recognize:()=>kl,ai_sensor_yolo_recognize_result:()=>Wl});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>eI,MICROPYTHON_AI_Speech_unit:()=>tI,MICROPYTHON_AI_client:()=>Zl});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>hI,mpython_blynk_app_notify:()=>uI,mpython_blynk_email:()=>lI,mpython_blynk_get_timers:()=>II,mpython_blynk_on_connected:()=>_I,mpython_blynk_on_disconnected:()=>oI,mpython_blynk_run:()=>aI,mpython_blynk_sensor_data_to_app:()=>MI,mpython_blynk_set_property:()=>dI,mpython_blynk_setup:()=>mI,mpython_blynk_stop_timers:()=>rI,mpython_blynk_sync_virtual:()=>sI,mpython_blynk_terminal_widget_vpin:()=>nI,mpython_blynktimer:()=>TI,mpython_blynktimer_run:()=>pI});var v={};t.r(v),t.d(v,{communicate_bluetooth_central_init:()=>ZI,communicate_bluetooth_connect:()=>nT,communicate_bluetooth_disconnect:()=>sT,communicate_bluetooth_handle:()=>uT,communicate_bluetooth_is_connected:()=>_T,communicate_bluetooth_mac:()=>iT,communicate_bluetooth_peripheral_init:()=>tT,communicate_bluetooth_recv:()=>pT,communicate_bluetooth_recv_only:()=>aT,communicate_bluetooth_scan:()=>eT,communicate_bluetooth_send:()=>oT,communicate_espnow_init:()=>rT,communicate_espnow_init_new:()=>dT,communicate_i2c_available:()=>xI,communicate_i2c_init:()=>cI,communicate_i2c_master_read:()=>XI,communicate_i2c_onboard:()=>OI,communicate_i2c_read:()=>gI,communicate_i2c_scan:()=>SI,communicate_i2c_write:()=>CI,communicate_ir_recv_init:()=>HI,communicate_ir_send_init:()=>QI,communicate_ow_init:()=>yI,communicate_ow_read:()=>BI,communicate_ow_reset:()=>wI,communicate_ow_scan:()=>VI,communicate_ow_select:()=>UI,communicate_ow_write:()=>GI,communicate_spi_buffer:()=>NI,communicate_spi_init:()=>AI,communicate_spi_onboard:()=>RI,communicate_spi_read:()=>DI,communicate_spi_read_output:()=>fI,communicate_spi_readinto:()=>FI,communicate_spi_readinto_output:()=>PI,communicate_spi_set:()=>LI,communicate_spi_write:()=>vI,communicate_spi_write_readinto:()=>YI,espnow_radio_channel:()=>mT,espnow_radio_channel_new:()=>OT,espnow_radio_on_off:()=>RT,espnow_radio_rec:()=>gT,espnow_radio_recv:()=>ST,espnow_radio_recv_certain_msg:()=>AT,espnow_radio_recv_certain_msg_new:()=>NT,espnow_radio_recv_msg:()=>CT,espnow_radio_recv_new:()=>LT,espnow_radio_send:()=>cT,espnow_radio_txpower:()=>ET,i2c_available:()=>qT,i2c_init:()=>xT,i2c_master_reader2:()=>QT,i2c_read:()=>bT,i2c_scan:()=>VT,i2c_slave_onreceive:()=>bI,i2c_write:()=>yT,internal_variable:()=>kI,ir_recv_timeout:()=>JI,ir_transmit_busy:()=>$I,ir_transmit_conventional_data:()=>qI,ir_transmit_raw_code:()=>jI,ir_transmit_study_code:()=>zI,ir_whether_recv:()=>KI,lora_init:()=>DT,lora_packet:()=>fT,lora_recv:()=>PT,lora_send:()=>FT,network_espnow_info:()=>IT,network_espnow_mac:()=>lT,network_espnow_recv:()=>TT,network_espnow_recv_handle:()=>hT,network_espnow_send:()=>MT,recv_fun:()=>WI,spi_buffer:()=>UT,spi_init:()=>BT,spi_read:()=>wT,spi_read_output:()=>HT,spi_readinto:()=>kT,spi_readinto_output:()=>WT,spi_set:()=>GT,spi_write:()=>KT,spi_write_readinto:()=>JT,urequests_attribute:()=>YT,urequests_get:()=>vT,urequests_method:()=>XT});var Y={};t.r(Y),t.d(Y,{display_animate:()=>NM,display_blink_rate:()=>CM,display_circle:()=>DM,display_color_seclet:()=>GM,display_draw_4strings:()=>mM,display_fill:()=>LM,display_get_screen_image:()=>gM,display_help:()=>FM,display_image_size:()=>EM,display_lcd_use_i2c_init:()=>KM,display_line:()=>RM,display_line_arbitrarily:()=>cM,display_matrix_extern_bright_point:()=>uM,display_matrix_extern_bright_screen:()=>dM,display_matrix_extern_clear:()=>lM,display_matrix_extern_get_pixel:()=>aM,display_matrix_extern_get_screen_pixel:()=>rM,display_matrix_extern_image_builtins:()=>IM,display_matrix_extern_scroll_string:()=>nM,display_matrix_extern_scroll_string_delay:()=>sM,display_matrix_extern_shift:()=>pM,display_matrix_extern_show_frame_string:()=>oM,display_matrix_extern_show_frame_string_delay:()=>_M,display_matrix_extern_show_image:()=>eM,display_matrix_extern_show_image_or_string_delay:()=>iM,display_matrix_use_i2c_init:()=>tM,display_oled_drawPixel:()=>vM,display_oled_showBitmap:()=>PM,display_oled_use_i2c_init:()=>jM,display_onoff:()=>AM,display_rect:()=>OM,display_rgb_color:()=>SM,display_tm1650_power:()=>XM,display_tm1650_set_brightness:()=>yM,display_tm1650_show_dot:()=>bM,display_tm1650_show_num:()=>xM,display_tm_use_i2c_init:()=>YM,display_triangle:()=>fM,display_use_i2c_init:()=>hM,extern_oled_bright_point:()=>ah,extern_oled_clear:()=>uh,extern_oled_get_pixel:()=>ph,extern_oled_hvline:()=>dh,extern_oled_line:()=>lh,extern_oled_scroll_string:()=>ih,extern_oled_scroll_string_delay:()=>nh,extern_oled_shape_rect:()=>rh,extern_oled_shift:()=>_h,extern_oled_show_frame_string:()=>sh,extern_oled_show_frame_string_delay:()=>oh,extern_oled_show_image:()=>$M,extern_oled_show_image_or_string_delay:()=>eh,extern_oled_show_image_xy:()=>ZM,extern_oled_show_string:()=>th,lcd_backlight:()=>qM,lcd_clear:()=>zM,lcd_print_string:()=>QM,lcd_show_image_or_string_delay:()=>JM,matrix_extern_image_arithmetic:()=>TM,matrix_extern_image_invert:()=>MM,tft_fill:()=>kM,tft_line_arbitrarily:()=>WM,tft_scroll_string_delay:()=>wM,tft_show_frame_string_delay:()=>HM,tft_show_image_or_string_delay:()=>UM,tft_show_image_xy:()=>BM,tft_use_spi_init:()=>VM});var X={};t.r(X),t.d(X,{bitbot_display_bitmap_create:()=>om,bitbot_display_image_create:()=>sm,display_available:()=>Yh,display_bitmap_create:()=>gh,display_bright_point:()=>fh,display_bright_screen:()=>Ph,display_clear:()=>vh,display_get_pixel:()=>Dh,display_get_screen_pixel:()=>Fh,display_image_builtins:()=>Ch,display_image_builtins_all:()=>Sh,display_image_create:()=>ch,display_scroll_string:()=>hh,display_scroll_string_delay:()=>mh,display_shift:()=>Nh,display_show_frame_string:()=>Oh,display_show_frame_string_delay:()=>Rh,display_show_image:()=>Th,display_show_image_or_string_delay:()=>Mh,draw_pointer:()=>gm,image_arithmetic:()=>Ah,image_invert:()=>Lh,mixbot_display_bitmap_create:()=>Zh,mixbot_display_bright_screen:()=>im,mixbot_display_get_ambientbright:()=>em,mixbot_display_get_screen_pixel:()=>tm,mixbot_display_image_create:()=>$h,mixbot_display_rotate:()=>nm,mixgo_display_bitmap_create:()=>Bh,mixgo_display_image_create_new:()=>Vh,mixgome_display_bitmap_create:()=>xh,mixgome_display_font:()=>Gh,mixgome_display_image_create:()=>Xh,mixgomini_display_bitmap_create:()=>yh,mixgomini_display_image_create:()=>bh,mpython_display_hvline:()=>qh,mpython_display_line:()=>zh,mpython_display_shape_rect:()=>Qh,mpython_pbm_image:()=>jh,nova_draw_pointer:()=>Cm,onboard_oled_bright_point:()=>Jh,onboard_oled_scroll_string_delay:()=>Wh,onboard_oled_show_frame_string_delay:()=>Kh,onboard_oled_show_image:()=>Uh,onboard_oled_show_image_or_string_delay:()=>kh,onboard_oled_show_image_xy:()=>wh,onboard_oled_show_string:()=>Hh,onboard_tft_bright_point:()=>Tm,onboard_tft_bright_screen:()=>Fm,onboard_tft_clear:()=>Pm,onboard_tft_clock_clear:()=>Rm,onboard_tft_clock_draw:()=>Om,onboard_tft_clock_get_rtctime:()=>mm,onboard_tft_clock_init:()=>hm,onboard_tft_clock_set_time:()=>Em,onboard_tft_display_hvline:()=>dm,onboard_tft_display_line:()=>lm,onboard_tft_display_shape_circle:()=>cm,onboard_tft_display_shape_rect:()=>rm,onboard_tft_fill:()=>Mm,onboard_tft_get_pixel:()=>Im,onboard_tft_get_screen_pixel:()=>fm,onboard_tft_scroll_string:()=>Lm,onboard_tft_scroll_string_delay:()=>Eh,onboard_tft_shift:()=>Dm,onboard_tft_show_frame_string:()=>Nm,onboard_tft_show_frame_string_delay:()=>um,onboard_tft_show_image:()=>Am,onboard_tft_show_image_or_string_delay:()=>am,onboard_tft_show_image_xy:()=>_m,onboard_tft_show_image_xy_direct:()=>pm,onboard_tft_show_texts:()=>Sm});var x={};t.r(x),t.d(x,{factory_block:()=>qm,factory_block_return:()=>zm,factory_block_return_with_textarea:()=>$m,factory_block_with_textarea:()=>jm,factory_callMethod_noreturn:()=>Jm,factory_callMethod_return:()=>Qm,factory_create_with_container:()=>Hm,factory_create_with_item:()=>km,factory_declare:()=>Km,factory_from_import:()=>Gm,factory_function_noreturn:()=>wm,factory_function_return:()=>Wm,factory_import:()=>Um,folding_block:()=>Zm});var b={};t.r(b),t.d(b,{controls_pin_attachInterrupt:()=>cE,inout_analog_atten:()=>uE,inout_analog_read:()=>aE,inout_analog_read_init:()=>ME,inout_analog_write:()=>oE,inout_analog_write_init:()=>TE,inout_analog_write_set:()=>_E,inout_analog_write_set_freq:()=>EE,inout_digital_init:()=>lE,inout_digital_read:()=>nE,inout_digital_write:()=>iE,inout_highlow:()=>eE,inout_pinMode:()=>mE,inout_pin_attachInterrupt:()=>dE,inout_pin_pressed:()=>rE,inout_pin_pressed_init:()=>hE,inout_pwm_analog_write:()=>sE,inout_pwm_analog_write_init:()=>IE,inout_pwm_analog_write_set_freq:()=>pE,pin_pressed:()=>RE,pin_pressed_init:()=>OE});var y={};t.r(y),t.d(y,{IOT_CONNECT_OLLAMA:()=>sO,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>WE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>kE,IOT_EMQX_PING:()=>wE,IOT_FORMATTING:()=>GE,IOT_FORMAT_STRING:()=>UE,IOT_MIXIO_NTP:()=>HE,IOT_MIXIO_PUBLISH:()=>YE,IOT_MIXIO_SUBSCRIBE:()=>XE,iot_checkonenet:()=>eO,iot_client_onboard:()=>JE,iot_connect_ollama:()=>nO,iot_connect_openai:()=>oO,iot_create_with_item:()=>PE,iot_http_client:()=>QE,iot_http_data:()=>qE,iot_mixio_check:()=>yE,iot_mixio_connect:()=>vE,iot_mixio_connect_only:()=>bE,iot_mixio_disconnect:()=>xE,iot_mixio_format_msg:()=>BE,iot_mixio_format_topic:()=>VE,iot_mixly_key:()=>KE,iot_mqtt_client:()=>zE,iot_mqtt_data:()=>jE,iot_onenet_check:()=>LE,iot_onenet_connect:()=>SE,iot_onenet_disconnect:()=>AE,iot_onenet_publish:()=>DE,iot_onenet_publish_dict:()=>NE,iot_onenetconnect:()=>ZE,iot_onenetdisconnect:()=>tO,iot_publish:()=>iO,iot_publish_container:()=>fE,iot_publish_item:()=>FE,iot_wifi_connect:()=>CE,iot_wificonnect:()=>$E,ollama_empty_history:()=>aO,use_ollama_llm_to_chat:()=>_O,use_ollama_llm_to_chat_return:()=>pO});var V={};t.r(V),t.d(V,{educore_mqtt_connect:()=>UO,educore_mqtt_connect_success:()=>WO,educore_mqtt_subscribe_message:()=>wO,educore_mqtt_topic_publish:()=>kO,educore_mqtt_topic_subscribe:()=>HO,educore_wifi_connect:()=>GO,network_ap_connect:()=>OO,network_connect:()=>TO,network_get_connect:()=>hO,network_get_wifi:()=>EO,network_init:()=>rO,network_is_active:()=>lO,network_open:()=>dO,network_scan:()=>IO,network_server:()=>RO,network_socket_accept:()=>AO,network_socket_bind:()=>gO,network_socket_close:()=>FO,network_socket_connect:()=>CO,network_socket_init:()=>cO,network_socket_listen:()=>SO,network_socket_receive:()=>LO,network_socket_receive_from:()=>DO,network_socket_send:()=>NO,network_socket_send_to:()=>fO,network_stop:()=>mO,network_wifi_connect:()=>MO,ntptime_address:()=>xO,ntptime_time:()=>XO,requests_attribute:()=>vO,requests_attribute2:()=>BO,requests_get:()=>PO,requests_get2:()=>yO,requests_method:()=>YO,requests_post:()=>VO});var B={};t.r(B),t.d(B,{pe_g1_battery_left:()=>QO,pe_g1_dc_motor:()=>qO,pe_g1_dc_motor_speed:()=>zO,pe_g1_servo_get_angle:()=>ZO,pe_g1_servo_get_speed:()=>tR,pe_g1_servo_set_angle:()=>jO,pe_g1_servo_set_speed:()=>$O,pe_g1_use_i2c_init:()=>JO});var G={};t.r(G),t.d(G,{CI130X_BROADCAST:()=>AR,CI130X_GET_THE_RECOGNIZED_CMD:()=>SR,CI130X_GET_WHETHER_IDENTIFY:()=>CR,CI130X_IDENTIFY_AND_SAVE:()=>gR,CI130X_SET_SYSTEM_CMD:()=>LR,HCSR04:()=>Tc,PS2_Button:()=>Ec,PS2_Buttons:()=>Rc,PS2_Buttons_new:()=>Sc,PS2_State:()=>Oc,PS2_init:()=>Mc,PS2_init_new:()=>gc,PS2_stk:()=>cc,PS2_stk_new:()=>Ac,PS2_vibration:()=>mc,PS2_vibration_new:()=>Cc,camera_sensor_init:()=>eg,camera_sensor_result:()=>ig,column_tube_foot:()=>pg,define_keyboards:()=>ag,educore_body_sensor:()=>Wc,educore_button_sensor_extern:()=>qc,educore_camera_sensor:()=>tg,educore_infrared_sensor:()=>Qc,educore_soilhum_sensor:()=>Kc,educore_temp_sensor:()=>Zc,educore_temphum_sensor:()=>Jc,educore_ultrasonic_sensor:()=>jc,esp32_s2_weather_init:()=>rc,esp32_s2_weather_rain:()=>lc,esp32_s2_weather_wd:()=>dc,esp32_s2_weather_ws:()=>Ic,extern_rfid_read:()=>zR,extern_rfid_readcontent:()=>$R,extern_rfid_readid:()=>jR,extern_rfid_status:()=>ec,extern_rfid_write:()=>ZR,extern_rfid_write_return:()=>tc,get_keboards_value:()=>ug,gnss_get_data:()=>fc,gnss_have_data:()=>Dc,init_matrix_keyboard:()=>og,interaction_whether_to_interaction:()=>RR,interaction_whether_to_interaction_SANT:()=>cR,line_tube_foot:()=>_g,mixbot_sensor_extern_get_addr:()=>yc,mixbot_sensor_extern_set_addr:()=>Vc,pm25_get_data:()=>Nc,radar_set_DETECTION_THRESHOLD:()=>ER,radar_set_DETECTION_THRESHOLD_SANT:()=>OR,robot_button_extern_get_value:()=>Pc,robot_color_extern_get_value:()=>bc,robot_infrared_extern_get_value:()=>Yc,robot_infrared_extern_grey_get_value:()=>Xc,robot_potentiometer_extern_get_value:()=>xc,robot_sonar_extern_get_value:()=>Bc,robot_sonar_extern_led:()=>Gc,robot_touch_extern_get_value:()=>vc,sensor_APDS9960_extern:()=>DR,sensor_DS18X20:()=>MR,sensor_LTR308_extern:()=>fR,sensor_LTR390UV_extern:()=>vR,sensor_MAX30102_extern:()=>NR,sensor_QMC5883L_extern:()=>GR,sensor_VL530LX_extern:()=>YR,sensor_adxl345_get_acceleration:()=>pR,sensor_aht11_extern:()=>xR,sensor_bmp:()=>IR,sensor_compass_reset:()=>QR,sensor_dht11:()=>uR,sensor_hp203_extern:()=>bR,sensor_light_level:()=>aR,sensor_lm35:()=>hR,sensor_ltr381_extern:()=>FR,sensor_mixgo_extern_button_attachInterrupt:()=>oR,sensor_mixgo_extern_button_get_presses:()=>sR,sensor_mixgo_extern_button_is_pressed:()=>iR,sensor_mixgo_extern_button_was_pressed:()=>nR,sensor_mixgo_extern_light:()=>rR,sensor_mixgo_extern_pin_near:()=>lR,sensor_mixgo_extern_sound:()=>dR,sensor_mixgoce_hot_wheel_degrees:()=>uc,sensor_mixgoce_hot_wheel_is_touched:()=>ac,sensor_mpu9250_attachGestureInterrupt:()=>_R,sensor_mpu9250_calibrate_compass:()=>WR,sensor_mpu9250_field_strength:()=>JR,sensor_mpu9250_gesture:()=>UR,sensor_mpu9250_get_acceleration:()=>wR,sensor_mpu9250_get_gyro:()=>kR,sensor_mpu9250_get_magnetic:()=>HR,sensor_mpu9250_temperature:()=>KR,sensor_ms5611_extern:()=>VR,sensor_ms5611_extern_altitude:()=>BR,sensor_read_humiture:()=>zc,sensor_sht:()=>TR,sensor_shtc3_extern:()=>XR,sensor_spl06_001_extern:()=>yR,sensor_ucs12071_extern:()=>PR,sensor_use_i2c_init:()=>mR,sensor_use_spi_init:()=>qR,sensor_use_uart_init:()=>Lc,sensor_weather_solo_init:()=>Uc,sensor_weather_solo_rain:()=>kc,sensor_weather_solo_wd:()=>wc,sensor_weather_solo_ws:()=>Hc,sensor_weigh_init:()=>ng,tvoc_get_data:()=>Fc,ultrasonic_sensor_read_distance:()=>$c,weather_data:()=>ic,weather_have_data:()=>nc,weather_set_label:()=>oc,weather_set_label_container:()=>_c,weather_set_label_item:()=>pc,weather_uart_mixio:()=>sc,weigh_sensor_get_weight:()=>sg});var U={};t.r(U),t.d(U,{HCSR04:()=>Lg,RTC_set_date:()=>Ag,RTC_set_time:()=>Sg,bitbot_als_num:()=>xC,dht11:()=>wC,educore_button_sensor:()=>jC,educore_button_was_pressed:()=>$C,educore_gyroscope_sensor:()=>QC,educore_gyroscope_sensor_read:()=>qC,educore_gyroscope_sensor_shake:()=>zC,educore_light_sensor:()=>JC,educore_rfid_sensor:()=>ZC,educore_rfid_sensor_scan:()=>tS,educore_rfid_sensor_scan_data:()=>eS,educore_voice_sensor:()=>WC,number1:()=>Dg,number2:()=>fg,number3:()=>Fg,number4:()=>Pg,number5:()=>vg,number6:()=>Yg,number7:()=>Xg,onboard_RTC_get_time:()=>wg,onboard_RTC_get_time_str:()=>Qg,onboard_RTC_get_timestamp:()=>Hg,onboard_RTC_get_timetuple_to_str:()=>qg,onboard_RTC_set_datetime:()=>Kg,onboard_RTC_settime_string:()=>Wg,onboard_RTC_timestamp_totuple:()=>kg,rfid_readcontent:()=>iC,rfid_readid:()=>eC,rfid_status:()=>oC,rfid_write:()=>nC,rfid_write_return:()=>sC,sensor_LTR308:()=>zg,sensor_aht11:()=>$g,sensor_bitbot_ALS:()=>XC,sensor_button_get_presses:()=>VC,sensor_button_is_pressed:()=>bC,sensor_button_was_pressed:()=>yC,sensor_distance_hrsc04:()=>Cg,sensor_eulerangles:()=>pC,sensor_field_strength:()=>HC,sensor_get_acceleration:()=>_C,sensor_get_temperature:()=>Zg,sensor_get_the_coprocessor_version:()=>iS,sensor_hp203:()=>tC,sensor_light:()=>UC,sensor_mixbot_get_gyro:()=>YC,sensor_mixbot_patrol_calibrate:()=>FC,sensor_mixbot_patrol_value:()=>PC,sensor_mixbot_temperature:()=>vC,sensor_mixgo_LTR308:()=>Gg,sensor_mixgo_button_attachInterrupt:()=>Tg,sensor_mixgo_button_get_presses:()=>Ig,sensor_mixgo_button_is_pressed:()=>dg,sensor_mixgo_button_was_pressed:()=>lg,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>EC,sensor_mixgo_cc_mmc5603_get_angle:()=>mC,sensor_mixgo_cc_mmc5603_get_magnetic:()=>hC,sensor_mixgo_light:()=>Ng,sensor_mixgo_nova_LTR308:()=>Bg,sensor_mixgo_nova_pin_near:()=>Vg,sensor_mixgo_pin_near:()=>yg,sensor_mixgo_pin_near_double:()=>bg,sensor_mixgo_pin_near_single:()=>xg,sensor_mixgo_pin_pressed:()=>Og,sensor_mixgo_sant_color:()=>Ug,sensor_mixgo_touch_slide:()=>gg,sensor_mixgocar42_button_attachInterrupt:()=>Eg,sensor_mixgocar42_button_get_presses:()=>mg,sensor_mixgocar42_button_is_pressed:()=>Mg,sensor_mixgocar42_button_was_pressed:()=>hg,sensor_mixgocar_battery_left:()=>fC,sensor_mixgocar_pin_near:()=>NC,sensor_mixgocar_pin_near_line:()=>LC,sensor_mixgocar_pin_near_state_change:()=>DC,sensor_mixgoce_pin_pressed:()=>Rg,sensor_mixgoce_temperature:()=>RC,sensor_mixgome_temperature:()=>OC,sensor_mpython_pin_pressed:()=>cg,sensor_mpython_qmi8658_get_gyro:()=>cC,sensor_mpython_qmi8658_temperature:()=>gC,sensor_onboard_compass_reset:()=>MC,sensor_onboard_mpu9250_calibrate_compass:()=>lC,sensor_onboard_mpu9250_field_strength:()=>TC,sensor_onboard_mpu9250_gesture:()=>aC,sensor_onboard_mpu9250_get_acceleration:()=>uC,sensor_onboard_mpu9250_get_gyro:()=>dC,sensor_onboard_mpu9250_get_magnetic:()=>rC,sensor_onboard_mpu9250_temperature:()=>IC,sensor_pin_near:()=>GC,sensor_pin_pressed:()=>BC,sensor_read:()=>KC,sensor_rm_acc:()=>AC,sensor_rm_battery_left:()=>SC,sensor_rm_pin_near_double:()=>CC,sensor_rtc_init:()=>Jg,sensor_sound:()=>jg,sensor_temperature:()=>kC});var w={};t.r(w),t.d(w,{serial_any:()=>lS,serial_begin:()=>mS,serial_print:()=>pS,serial_print_byte:()=>_S,serial_print_hex:()=>uS,serial_println:()=>aS,serial_read_from_ai:()=>LS,serial_readline:()=>IS,serial_readstr:()=>dS,serial_readstr_until:()=>TS,serial_receive_data_event:()=>rS,serial_send_to_ai:()=>AS,serial_softserial:()=>hS,serial_softserial_new:()=>MS,system_input:()=>ES,system_print:()=>OS,system_print_container:()=>CS,system_print_end:()=>cS,system_print_inline:()=>RS,system_print_item:()=>SS,system_print_many:()=>gS});var H={};t.r(H),t.d(H,{Panic_with_status_code:()=>FS,Timer_init:()=>HS,base_delay:()=>KS,controls_delay:()=>fS,controls_delay_new:()=>DS,controls_millis:()=>vS,controls_uname:()=>XS,raw_block:()=>YS,reset:()=>PS,system_bitbot_shutdown:()=>wS,system_machine_reset:()=>US,system_ticks_diff:()=>yS,system_timer:()=>bS,system_timer_init:()=>VS,system_wdt_feed:()=>GS,system_wdt_init:()=>BS,time_ticks_diff:()=>WS,timer:()=>xS,timer2:()=>kS});var k={};t.r(k),t.d(k,{Air_daily_content:()=>_A,Air_now_content:()=>ZS,Geo_moon_content:()=>aA,Geo_sun_content:()=>pA,Life_suggestion_content:()=>eA,Location_search_content:()=>nA,Tide_daily_content:()=>iA,WEATHER_DAILY:()=>qS,WEATHER_HOUR:()=>zS,WEATHER_NOW:()=>QS,Weather_alarm_content:()=>tA,Weather_daily:()=>sA,Weather_daily_content:()=>oA,Weather_now:()=>jS,Weather_now_content:()=>$S});var W={};t.r(W),t.d(W,{PIN_init:()=>aL,actuator_extern_get_led_bright:()=>DA,actuator_extern_get_led_state:()=>fA,actuator_extern_led_bright:()=>NA,actuator_extern_led_brightness:()=>FA,actuator_ms32006_dcmotor:()=>hA,actuator_ms32006_init:()=>MA,actuator_ms32006_stepper:()=>mA,actuator_neopixel_init:()=>PA,actuator_neopixel_rgb:()=>XA,actuator_neopixel_rgb_all:()=>vA,actuator_neopixel_rgb_show_all_chase:()=>xA,actuator_neopixel_rgb_show_all_rainbow:()=>bA,actuator_neopixel_write:()=>YA,actuator_use_uart_init:()=>yA,esp32_music_get_tempo_extern:()=>CA,esp32_music_pitch:()=>OA,esp32_music_pitch_init:()=>EA,esp32_music_pitch_with_time:()=>RA,esp32_music_play_list:()=>SA,esp32_music_reset_extern:()=>AA,esp32_music_set_tempo_extern:()=>gA,esp32_music_stop:()=>cA,mixbot_actuator_extern_get_addr:()=>_L,mixbot_actuator_extern_set_addr:()=>pL,mixbot_addr_extern:()=>JA,parrot_PIN_init:()=>lL,parrot_move_speed:()=>IL,pin_led_bright:()=>uL,player_play_music:()=>wA,player_set_mode:()=>UA,player_set_play:()=>BA,player_set_volume:()=>GA,player_whether_stop:()=>VA,robot_led_extern:()=>jA,robot_led_extern_get_value:()=>$A,robot_motor_extern:()=>QA,robot_motor_extern_get_speed:()=>qA,robot_servo_extern_absolute_run:()=>iL,robot_servo_extern_get_status:()=>ZA,robot_servo_extern_relative_continue:()=>oL,robot_servo_extern_relative_origin:()=>nL,robot_servo_extern_relative_run:()=>sL,robot_servo_extern_stop:()=>eL,robot_servo_extern_stop_mode:()=>tL,robot_traffic_light_extern:()=>zA,servo_PIN_init:()=>rL,servo_get_angle:()=>IA,servo_get_speed:()=>TA,servo_init:()=>uA,servo_move:()=>LA,servo_move_angle:()=>dL,servo_set_angle:()=>dA,servo_set_speed:()=>lA,servo_speed_360:()=>rA,syn6288_builtin_voice:()=>WA,syn6288_get_voice:()=>kA,syn6288_set_voice:()=>HA,syn6288_tts_play:()=>KA});var K={};t.r(K),t.d(K,{actuator_dc_motor:()=>UL,actuator_dc_motor_stop:()=>wL,actuator_get_led_bright:()=>SL,actuator_get_led_state:()=>AL,actuator_led_bright:()=>CL,actuator_led_brightness:()=>LL,actuator_mixbot_buzzer_on_off:()=>JL,actuator_mixgo_nova_mic_get:()=>$L,actuator_mixgo_nova_mic_set:()=>jL,actuator_mixgo_nova_onboard_music_pitch:()=>sN,actuator_mixgo_nova_onboard_music_stop:()=>oN,actuator_mixgo_nova_play_audio:()=>iN,actuator_mixgo_nova_play_online_audio:()=>nN,actuator_mixgo_nova_record_audio:()=>eN,actuator_mixgo_nova_voice_get:()=>tN,actuator_mixgo_nova_voice_set:()=>ZL,actuator_mixgo_zero_led_color:()=>NL,actuator_onboard_neopixel_rgb:()=>XL,actuator_onboard_neopixel_rgb_all:()=>xL,actuator_onboard_neopixel_rgb_show_all_chase:()=>bL,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>yL,actuator_onboard_neopixel_write:()=>YL,actuator_stepper_keep:()=>BL,actuator_stepper_stop:()=>GL,analog_ble_keyboard_init:()=>hN,analog_ble_keyboard_input:()=>ON,analog_ble_keyboard_mouse_init:()=>NN,analog_ble_keyboard_mouse_input:()=>PN,analog_ble_keyboard_mouse_send_battery:()=>FN,analog_ble_keyboard_mouse_str:()=>vN,analog_ble_keyboard_send_battery:()=>cN,analog_ble_keyboard_str:()=>RN,analog_ble_mouse_init:()=>gN,analog_ble_mouse_input:()=>AN,analog_ble_mouse_keyboard_input:()=>YN,analog_ble_mouse_send_battery:()=>LN,analog_keyboard_input:()=>uN,analog_keyboard_str:()=>TN,analog_mouse_input:()=>lN,bitbot_motor:()=>zL,bitbot_move:()=>QL,bitbot_stop:()=>qL,ble_keyboard_connect:()=>EN,ble_keyboard_get_mac:()=>mN,ble_keyboard_mouse_connect:()=>fN,ble_keyboard_mouse_get_mac:()=>DN,ble_mouse_connect:()=>SN,ble_mouse_get_mac:()=>CN,cc_number:()=>DL,educore_ble_keyboard_input:()=>HN,educore_ble_sensor_connected:()=>wN,educore_ble_sensor_init:()=>UN,educore_buzzer:()=>XN,educore_buzzer_play_tone:()=>xN,educore_buzzer_play_tone_time:()=>bN,educore_buzzer_stop:()=>yN,educore_neopixel_clear:()=>GN,educore_neopixel_rgb:()=>BN,educore_rgb_light:()=>VN,esp32_music_get_tempo:()=>ML,esp32_music_reset:()=>RL,esp32_music_set_tempo:()=>TL,esp32_onboard_music_pitch:()=>hL,esp32_onboard_music_pitch_with_time:()=>mL,esp32_onboard_music_play_list:()=>OL,esp32_onboard_music_stop:()=>EL,general_key:()=>dN,general_key_tuple:()=>MN,get_keyboard_light:()=>kN,get_power_output:()=>pN,ledswitch:()=>gL,mixbot_motor:()=>KL,mixbot_motor_status:()=>HL,mixbot_move:()=>kL,mixbot_stop:()=>WL,mouse_key:()=>IN,number:()=>cL,rm_actuator_get_led_bright:()=>FL,rm_actuator_get_led_state:()=>PL,rm_actuator_led_bright:()=>fL,rm_actuator_led_brightness:()=>vL,rm_motor:()=>VL,set_all_power_output:()=>aN,set_power_output:()=>_N,special_key:()=>rN});var J={};t.r(J),t.d(J,{ai_sensor_20object:()=>CD,ai_sensor_ailocal_class:()=>lD,ai_sensor_ailocal_class_result:()=>ID,ai_sensor_ailocal_train:()=>dD,ai_sensor_asr_recognize:()=>ED,ai_sensor_audio_play:()=>MD,ai_sensor_audio_record:()=>TD,ai_sensor_barcode:()=>jN,ai_sensor_circle:()=>nD,ai_sensor_classifier_faces:()=>gD,ai_sensor_color:()=>pD,ai_sensor_color_chases:()=>rD,ai_sensor_color_chases_result:()=>uD,ai_sensor_config:()=>JN,ai_sensor_face:()=>cD,ai_sensor_find_20objects:()=>SD,ai_sensor_find_barcodes:()=>$N,ai_sensor_find_circles:()=>sD,ai_sensor_find_colors:()=>aD,ai_sensor_find_licenseplates:()=>RD,ai_sensor_find_lines:()=>iD,ai_sensor_find_qrcodes:()=>zN,ai_sensor_find_rects:()=>_D,ai_sensor_find_tags:()=>tD,ai_sensor_licenseplate:()=>OD,ai_sensor_line:()=>eD,ai_sensor_qrcode:()=>qN,ai_sensor_qrcode_lite:()=>KN,ai_sensor_rect:()=>oD,ai_sensor_rgb:()=>QN,ai_sensor_tag:()=>ZN,ai_sensor_use_uart_init:()=>WN,ai_sensor_yolo_recognize:()=>hD,ai_sensor_yolo_recognize_result:()=>mD});var Q={};t.r(Q),t.d(Q,{MICROPYTHON_AI_Speech_asr:()=>ND,MICROPYTHON_AI_Speech_unit:()=>LD,MICROPYTHON_AI_client:()=>AD});var q={};t.r(q),t.d(q,{mpython_blynk_app_data:()=>BD,mpython_blynk_app_notify:()=>XD,mpython_blynk_email:()=>GD,mpython_blynk_get_timers:()=>bD,mpython_blynk_on_connected:()=>PD,mpython_blynk_on_disconnected:()=>FD,mpython_blynk_run:()=>YD,mpython_blynk_sensor_data_to_app:()=>VD,mpython_blynk_set_property:()=>UD,mpython_blynk_setup:()=>wD,mpython_blynk_stop_timers:()=>xD,mpython_blynk_sync_virtual:()=>fD,mpython_blynk_terminal_widget_vpin:()=>DD,mpython_blynktimer:()=>yD,mpython_blynktimer_run:()=>vD});var z={};t.r(z),t.d(z,{communicate_bluetooth_central_init:()=>Sf,communicate_bluetooth_connect:()=>Nf,communicate_bluetooth_disconnect:()=>Df,communicate_bluetooth_handle:()=>Xf,communicate_bluetooth_is_connected:()=>Ff,communicate_bluetooth_mac:()=>ff,communicate_bluetooth_peripheral_init:()=>Af,communicate_bluetooth_recv:()=>Yf,communicate_bluetooth_recv_only:()=>vf,communicate_bluetooth_scan:()=>Lf,communicate_bluetooth_send:()=>Pf,communicate_espnow_init:()=>xf,communicate_espnow_init_new:()=>bf,communicate_i2c_available:()=>zD,communicate_i2c_init:()=>WD,communicate_i2c_master_read:()=>qD,communicate_i2c_onboard:()=>HD,communicate_i2c_read:()=>KD,communicate_i2c_scan:()=>QD,communicate_i2c_write:()=>JD,communicate_ir_recv_init:()=>Tf,communicate_ir_send_init:()=>Of,communicate_ow_init:()=>af,communicate_ow_read:()=>df,communicate_ow_reset:()=>rf,communicate_ow_scan:()=>uf,communicate_ow_select:()=>If,communicate_ow_write:()=>lf,communicate_spi_buffer:()=>tf,communicate_spi_init:()=>$D,communicate_spi_onboard:()=>kD,communicate_spi_read:()=>ef,communicate_spi_read_output:()=>nf,communicate_spi_readinto:()=>sf,communicate_spi_readinto_output:()=>of,communicate_spi_set:()=>ZD,communicate_spi_write:()=>_f,communicate_spi_write_readinto:()=>pf,espnow_radio_channel:()=>wf,espnow_radio_channel_new:()=>kf,espnow_radio_on_off:()=>Wf,espnow_radio_rec:()=>Jf,espnow_radio_recv:()=>qf,espnow_radio_recv_certain_msg:()=>zf,espnow_radio_recv_certain_msg_new:()=>$f,espnow_radio_recv_msg:()=>Qf,espnow_radio_recv_new:()=>jf,espnow_radio_send:()=>Kf,espnow_radio_txpower:()=>Hf,i2c_slave_onreceive:()=>jD,internal_variable:()=>Mf,ir_recv_timeout:()=>Ef,ir_transmit_busy:()=>Cf,ir_transmit_conventional_data:()=>Rf,ir_transmit_raw_code:()=>gf,ir_transmit_study_code:()=>cf,ir_whether_recv:()=>mf,lora_init:()=>Zf,lora_packet:()=>tF,lora_recv:()=>iF,lora_send:()=>eF,network_espnow_info:()=>Vf,network_espnow_mac:()=>yf,network_espnow_recv:()=>Bf,network_espnow_recv_handle:()=>Uf,network_espnow_send:()=>Gf,recv_fun:()=>hf,urequests_attribute:()=>sF,urequests_get:()=>nF,urequests_method:()=>oF});var j={};t.r(j),t.d(j,{display_animate:()=>FF,display_circle:()=>PF,display_color_seclet:()=>wF,display_draw_4strings:()=>CF,display_fill:()=>fF,display_lcd_use_i2c_init:()=>QF,display_line:()=>LF,display_line_arbitrarily:()=>SF,display_matrix_extern_bright_point:()=>hF,display_matrix_extern_bright_screen:()=>EF,display_matrix_extern_clear:()=>IF,display_matrix_extern_get_pixel:()=>MF,display_matrix_extern_get_screen_pixel:()=>mF,display_matrix_extern_image_builtins:()=>OF,display_matrix_extern_scroll_string:()=>dF,display_matrix_extern_scroll_string_delay:()=>lF,display_matrix_extern_shift:()=>TF,display_matrix_extern_show_frame_string:()=>uF,display_matrix_extern_show_frame_string_delay:()=>rF,display_matrix_extern_show_image:()=>pF,display_matrix_extern_show_image_or_string_delay:()=>aF,display_matrix_use_i2c_init:()=>_F,display_oled_drawPixel:()=>XF,display_oled_showBitmap:()=>YF,display_oled_use_i2c_init:()=>ZF,display_onoff:()=>NF,display_rect:()=>AF,display_tm1650_power:()=>bF,display_tm1650_set_brightness:()=>BF,display_tm1650_show_dot:()=>VF,display_tm1650_show_num:()=>yF,display_tm_use_i2c_init:()=>xF,display_triangle:()=>vF,display_use_i2c_init:()=>gF,extern_oled_bright_point:()=>dP,extern_oled_clear:()=>aP,extern_oled_get_pixel:()=>rP,extern_oled_hvline:()=>IP,extern_oled_line:()=>TP,extern_oled_scroll_string:()=>_P,extern_oled_scroll_string_delay:()=>pP,extern_oled_shape_rect:()=>lP,extern_oled_shift:()=>uP,extern_oled_show_frame_string:()=>sP,extern_oled_show_frame_string_delay:()=>oP,extern_oled_show_image:()=>tP,extern_oled_show_image_or_string_delay:()=>nP,extern_oled_show_image_xy:()=>eP,extern_oled_show_string:()=>iP,image_shift:()=>DF,lcd_backlight:()=>jF,lcd_clear:()=>$F,lcd_print_string:()=>zF,lcd_show_image_or_string_delay:()=>qF,matrix_extern_image_arithmetic:()=>RF,matrix_extern_image_invert:()=>cF,tft_fill:()=>KF,tft_line_arbitrarily:()=>JF,tft_scroll_string_delay:()=>WF,tft_show_frame_string_delay:()=>kF,tft_show_image_or_string_delay:()=>HF,tft_show_image_xy:()=>UF,tft_use_spi_init:()=>GF});var $={};t.r($),t.d($,{bitbot_display_bitmap_create:()=>_v,bitbot_display_image_create:()=>ov,display_available:()=>NP,display_bitmap_create:()=>AP,display_bright_point:()=>vP,display_bright_screen:()=>XP,display_clear:()=>LP,display_get_pixel:()=>PP,display_get_screen_pixel:()=>YP,display_image_builtins:()=>gP,display_image_builtins_all:()=>CP,display_image_create:()=>SP,display_scroll_string:()=>OP,display_scroll_string_delay:()=>RP,display_shift:()=>FP,display_show_frame_string:()=>mP,display_show_frame_string_delay:()=>EP,display_show_image:()=>MP,display_show_image_or_string_delay:()=>hP,draw_pointer:()=>Cv,image_arithmetic:()=>DP,image_invert:()=>fP,mixbot_display_bitmap_create:()=>tv,mixbot_display_bright_screen:()=>nv,mixbot_display_get_ambientbright:()=>iv,mixbot_display_get_screen_pixel:()=>ev,mixbot_display_image_create:()=>ZP,mixbot_display_rotate:()=>sv,mixgo_display_bitmap_create:()=>UP,mixgo_display_image_create_new:()=>GP,mixgome_display_bitmap_create:()=>bP,mixgome_display_font:()=>BP,mixgome_display_image_create:()=>xP,mixgomini_display_bitmap_create:()=>VP,mixgomini_display_image_create:()=>yP,mpython_display_hvline:()=>jP,mpython_display_line:()=>$P,mpython_display_shape_rect:()=>zP,mpython_pbm_image:()=>wP,nova_draw_pointer:()=>Sv,onboard_oled_bright_point:()=>qP,onboard_oled_scroll_string_delay:()=>QP,onboard_oled_show_frame_string_delay:()=>JP,onboard_oled_show_image:()=>HP,onboard_oled_show_image_or_string_delay:()=>KP,onboard_oled_show_image_xy:()=>kP,onboard_oled_show_string:()=>WP,onboard_tft_bright_point:()=>Mv,onboard_tft_bright_screen:()=>Fv,onboard_tft_clear:()=>Pv,onboard_tft_clock_clear:()=>cv,onboard_tft_clock_draw:()=>Rv,onboard_tft_clock_get_rtctime:()=>Ev,onboard_tft_clock_init:()=>mv,onboard_tft_clock_set_time:()=>Ov,onboard_tft_display_hvline:()=>lv,onboard_tft_display_line:()=>Iv,onboard_tft_display_shape_circle:()=>gv,onboard_tft_display_shape_rect:()=>dv,onboard_tft_fill:()=>hv,onboard_tft_get_pixel:()=>Tv,onboard_tft_get_screen_pixel:()=>fv,onboard_tft_scroll_string_delay:()=>cP,onboard_tft_shift:()=>Dv,onboard_tft_show_frame_string:()=>Nv,onboard_tft_show_frame_string_delay:()=>rv,onboard_tft_show_image:()=>Lv,onboard_tft_show_image_or_string_delay:()=>uv,onboard_tft_show_image_xy:()=>pv,onboard_tft_show_image_xy_direct:()=>av,onboard_tft_show_texts:()=>Av});var Z={};t.r(Z),t.d(Z,{factory_block:()=>Bv,factory_block_return:()=>Gv,factory_block_return_with_textarea:()=>wv,factory_block_with_textarea:()=>Uv,factory_callMethod_noreturn:()=>yv,factory_callMethod_return:()=>Vv,factory_declare:()=>bv,factory_from_import:()=>vv,factory_function_noreturn:()=>Xv,factory_function_return:()=>xv,factory_import:()=>Yv,folding_block:()=>Hv});var tt={};t.r(tt),t.d(tt,{inout_analog_atten:()=>sY,inout_analog_read:()=>jv,inout_analog_read_init:()=>nY,inout_analog_write:()=>Qv,inout_analog_write_init:()=>iY,inout_analog_write_set:()=>qv,inout_digital_init:()=>tY,inout_digital_read:()=>Kv,inout_digital_write:()=>Wv,inout_highlow:()=>kv,inout_pin_attachInterrupt:()=>Zv,inout_pin_pressed:()=>$v,inout_pin_pressed_init:()=>oY,inout_pwm_analog_write:()=>Jv,inout_pwm_analog_write_init:()=>eY,inout_pwm_analog_write_set_freq:()=>zv});var et={};t.r(et),t.d(et,{IOT_CONNECT_OLLAMA:()=>YY,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>SY,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>gY,IOT_EMQX_PING:()=>AY,IOT_FORMATTING:()=>RY,IOT_FORMAT_STRING:()=>cY,IOT_MIXIO_NTP:()=>LY,IOT_MIXIO_PUBLISH:()=>IY,IOT_MIXIO_SUBSCRIBE:()=>TY,iot_client_onboard:()=>NY,iot_connect_ollama:()=>vY,iot_connect_openai:()=>XY,iot_http_client:()=>DY,iot_http_data:()=>fY,iot_mixio_check:()=>mY,iot_mixio_connect:()=>lY,iot_mixio_connect_only:()=>hY,iot_mixio_disconnect:()=>MY,iot_mixio_format_msg:()=>OY,iot_mixio_format_topic:()=>EY,iot_mixly_key:()=>CY,iot_mqtt_client:()=>FY,iot_mqtt_data:()=>PY,iot_onenet_check:()=>rY,iot_onenet_connect:()=>pY,iot_onenet_disconnect:()=>aY,iot_onenet_publish:()=>dY,iot_onenet_publish_dict:()=>uY,iot_wifi_connect:()=>_Y,ollama_empty_history:()=>yY,use_ollama_llm_to_chat:()=>xY,use_ollama_llm_to_chat_return:()=>bY});var it={};t.r(it),t.d(it,{educore_mqtt_connect:()=>TX,educore_mqtt_connect_success:()=>EX,educore_mqtt_subscribe_message:()=>MX,educore_mqtt_topic_publish:()=>mX,educore_mqtt_topic_subscribe:()=>hX,educore_wifi_connect:()=>IX,network_ap_connect:()=>KY,network_connect:()=>BY,network_get_connect:()=>UY,network_get_wifi:()=>WY,network_init:()=>VY,network_is_active:()=>kY,network_open:()=>HY,network_scan:()=>JY,network_server:()=>QY,network_socket_accept:()=>ZY,network_socket_bind:()=>zY,network_socket_close:()=>sX,network_socket_connect:()=>jY,network_socket_init:()=>qY,network_socket_listen:()=>$Y,network_socket_receive:()=>tX,network_socket_receive_from:()=>iX,network_socket_send:()=>eX,network_socket_send_to:()=>nX,network_stop:()=>wY,network_wifi_connect:()=>GY,ntptime_address:()=>uX,ntptime_time:()=>aX,requests_attribute:()=>_X,requests_attribute2:()=>dX,requests_get:()=>oX,requests_get2:()=>rX,requests_method:()=>pX,requests_post:()=>lX});var nt={};t.r(nt),t.d(nt,{pe_g1_battery_left:()=>RX,pe_g1_dc_motor:()=>cX,pe_g1_dc_motor_speed:()=>gX,pe_g1_servo_get_angle:()=>AX,pe_g1_servo_get_speed:()=>LX,pe_g1_servo_set_angle:()=>CX,pe_g1_servo_set_speed:()=>SX,pe_g1_use_i2c_init:()=>OX});var st={};t.r(st),t.d(st,{CI130X_BROADCAST:()=>qX,CI130X_GET_THE_RECOGNIZED_CMD:()=>QX,CI130X_GET_WHETHER_IDENTIFY:()=>JX,CI130X_IDENTIFY_AND_SAVE:()=>KX,CI130X_SET_SYSTEM_CMD:()=>zX,HCSR04:()=>Dx,PS2_Button:()=>Px,PS2_Buttons:()=>vx,PS2_Buttons_new:()=>Gx,PS2_State:()=>Yx,PS2_init:()=>fx,PS2_init_new:()=>Vx,PS2_stk:()=>Xx,PS2_stk_new:()=>Ux,PS2_vibration:()=>Fx,PS2_vibration_new:()=>Bx,RTC_get_time:()=>bx,RTC_set_date:()=>XX,RTC_set_datetime:()=>xx,RTC_set_time:()=>YX,camera_sensor_init:()=>Eb,camera_sensor_result:()=>Ob,column_tube_foot:()=>Cb,define_keyboards:()=>Sb,educore_body_sensor:()=>ab,educore_button_sensor_extern:()=>lb,educore_camera_sensor:()=>mb,educore_infrared_sensor:()=>db,educore_soilhum_sensor:()=>ub,educore_temp_sensor:()=>hb,educore_temphum_sensor:()=>rb,educore_ultrasonic_sensor:()=>Tb,esp32_s2_weather_init:()=>Sx,esp32_s2_weather_rain:()=>Lx,esp32_s2_weather_wd:()=>Ax,esp32_s2_weather_ws:()=>Nx,extern_rfid_read:()=>lx,extern_rfid_readcontent:()=>Tx,extern_rfid_readid:()=>Ix,extern_rfid_status:()=>mx,extern_rfid_write:()=>Mx,extern_rfid_write_return:()=>hx,get_keboards_value:()=>Lb,gnss_get_data:()=>kx,gnss_have_data:()=>Wx,init_matrix_keyboard:()=>Ab,interaction_whether_to_interaction:()=>kX,interaction_whether_to_interaction_SANT:()=>WX,line_tube_foot:()=>gb,mixbot_sensor_extern_get_addr:()=>eb,mixbot_sensor_extern_set_addr:()=>ib,pm25_get_data:()=>Hx,radar_set_DETECTION_THRESHOLD:()=>wX,radar_set_DETECTION_THRESHOLD_SANT:()=>HX,robot_button_extern_get_value:()=>Jx,robot_color_extern_get_value:()=>$x,robot_infrared_extern_get_value:()=>qx,robot_infrared_extern_grey_get_value:()=>zx,robot_potentiometer_extern_get_value:()=>jx,robot_sonar_extern_get_value:()=>Zx,robot_sonar_extern_led:()=>tb,robot_touch_extern_get_value:()=>Qx,sensor_APDS9960_extern:()=>$X,sensor_DS18X20:()=>pb,sensor_LTR308_extern:()=>ZX,sensor_LTR390UV_extern:()=>_x,sensor_MAX30102_extern:()=>jX,sensor_QMC5883L_extern:()=>px,sensor_VL530LX_extern:()=>rx,sensor_aht11_extern:()=>ux,sensor_bmp:()=>BX,sensor_dht11:()=>yx,sensor_distance_hrsc04:()=>vX,sensor_hp203_extern:()=>tx,sensor_ltr381_extern:()=>sx,sensor_mixgo_extern_button_attachInterrupt:()=>FX,sensor_mixgo_extern_button_get_presses:()=>fX,sensor_mixgo_extern_button_is_pressed:()=>NX,sensor_mixgo_extern_button_was_pressed:()=>DX,sensor_mixgo_extern_light:()=>xX,sensor_mixgo_extern_pin_near:()=>yX,sensor_mixgo_extern_sound:()=>bX,sensor_mixgoce_hot_wheel_degrees:()=>Cx,sensor_mixgoce_hot_wheel_is_touched:()=>gx,sensor_mpu9250_attachGestureInterrupt:()=>PX,sensor_ms5611_extern:()=>ix,sensor_ms5611_extern_altitude:()=>nx,sensor_read_humiture:()=>Ib,sensor_rtc_init:()=>VX,sensor_sht:()=>GX,sensor_shtc3_extern:()=>ax,sensor_spl06_001_extern:()=>ex,sensor_ucs12071_extern:()=>ox,sensor_use_i2c_init:()=>UX,sensor_use_spi_init:()=>dx,sensor_use_uart_init:()=>wx,sensor_weather_solo_init:()=>nb,sensor_weather_solo_rain:()=>_b,sensor_weather_solo_wd:()=>sb,sensor_weather_solo_ws:()=>ob,sensor_weigh_init:()=>Rb,tvoc_get_data:()=>Kx,ultrasonic_sensor_read_distance:()=>Mb,weather_data:()=>Ex,weather_have_data:()=>Ox,weather_set_label:()=>cx,weather_uart_mixio:()=>Rx,weigh_sensor_get_weight:()=>cb});var ot={};t.r(ot),t.d(ot,{HCSR04:()=>xb,bitbot_als_num:()=>nV,dht11:()=>dV,educore_button_sensor:()=>EV,educore_button_was_pressed:()=>OV,educore_gyroscope_sensor:()=>MV,educore_gyroscope_sensor_read:()=>hV,educore_gyroscope_sensor_shake:()=>mV,educore_light_sensor:()=>TV,educore_rfid_sensor:()=>RV,educore_rfid_sensor_scan:()=>cV,educore_rfid_sensor_scan_data:()=>gV,educore_voice_sensor:()=>lV,number1:()=>bb,number2:()=>yb,number3:()=>Vb,number4:()=>Bb,number5:()=>Gb,number6:()=>Ub,number7:()=>wb,onboard_RTC_get_time:()=>Yy,onboard_RTC_get_time_str:()=>by,onboard_RTC_get_timestamp:()=>Xy,onboard_RTC_get_timetuple_to_str:()=>yy,onboard_RTC_set_datetime:()=>Py,onboard_RTC_settime_string:()=>vy,onboard_RTC_timestamp_totuple:()=>xy,rfid_readcontent:()=>sy,rfid_readid:()=>ny,rfid_status:()=>py,rfid_write:()=>oy,rfid_write_return:()=>_y,sensor_LTR308:()=>$b,sensor_adxl345_get_acceleration:()=>hy,sensor_aht11:()=>ey,sensor_bitbot_ALS:()=>iV,sensor_button_get_presses:()=>_V,sensor_button_is_pressed:()=>sV,sensor_button_was_pressed:()=>oV,sensor_compass_reset:()=>gy,sensor_ds18x20:()=>zb,sensor_eulerangles:()=>uy,sensor_get_acceleration:()=>ay,sensor_get_temperature:()=>iy,sensor_get_the_coprocessor_version:()=>CV,sensor_hp203:()=>ty,sensor_light:()=>rV,sensor_lm35:()=>jb,sensor_mixbot_get_gyro:()=>eV,sensor_mixbot_patrol_calibrate:()=>$y,sensor_mixbot_patrol_value:()=>Zy,sensor_mixbot_temperature:()=>tV,sensor_mixgo_LTR308:()=>Jb,sensor_mixgo_button_attachInterrupt:()=>Fb,sensor_mixgo_button_get_presses:()=>fb,sensor_mixgo_button_is_pressed:()=>Nb,sensor_mixgo_button_was_pressed:()=>Db,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>Gy,sensor_mixgo_cc_mmc5603_get_angle:()=>By,sensor_mixgo_cc_mmc5603_get_magnetic:()=>Vy,sensor_mixgo_light:()=>uV,sensor_mixgo_nova_LTR308:()=>qb,sensor_mixgo_nova_pin_near:()=>Kb,sensor_mixgo_pin_near:()=>Wb,sensor_mixgo_pin_near_double:()=>kb,sensor_mixgo_pin_near_single:()=>Hb,sensor_mixgo_pin_pressed:()=>Ty,sensor_mixgo_sant_color:()=>Qb,sensor_mixgo_touch_slide:()=>Iy,sensor_mixgocar42_button_attachInterrupt:()=>Xb,sensor_mixgocar42_button_get_presses:()=>Yb,sensor_mixgocar42_button_is_pressed:()=>Pb,sensor_mixgocar42_button_was_pressed:()=>vb,sensor_mixgocar_battery_left:()=>jy,sensor_mixgocar_pin_near:()=>qy,sensor_mixgocar_pin_near_line:()=>Qy,sensor_mixgocar_pin_near_state_change:()=>zy,sensor_mixgoce_pin_pressed:()=>ly,sensor_mixgoce_temperature:()=>wy,sensor_mixgome_temperature:()=>Uy,sensor_mpu9250_calibrate_compass:()=>Oy,sensor_mpu9250_field_strength:()=>cy,sensor_mpu9250_gesture:()=>ry,sensor_mpu9250_get_acceleration:()=>dy,sensor_mpu9250_get_gyro:()=>Ey,sensor_mpu9250_get_magnetic:()=>my,sensor_mpu9250_temperature:()=>Ry,sensor_mpython_pin_pressed:()=>My,sensor_mpython_qmi8658_get_gyro:()=>Hy,sensor_mpython_qmi8658_temperature:()=>ky,sensor_onboard_compass_reset:()=>Fy,sensor_onboard_mpu9250_calibrate_compass:()=>Ny,sensor_onboard_mpu9250_field_strength:()=>fy,sensor_onboard_mpu9250_gesture:()=>Cy,sensor_onboard_mpu9250_get_acceleration:()=>Sy,sensor_onboard_mpu9250_get_gyro:()=>Ly,sensor_onboard_mpu9250_get_magnetic:()=>Ay,sensor_onboard_mpu9250_temperature:()=>Dy,sensor_pin_near:()=>aV,sensor_pin_pressed:()=>pV,sensor_read:()=>IV,sensor_rm_acc:()=>Jy,sensor_rm_battery_left:()=>Ky,sensor_rm_pin_near_double:()=>Wy,sensor_sound:()=>Zb});var _t={};t.r(_t),t.d(_t,{serial_any:()=>DV,serial_print:()=>SV,serial_print_byte:()=>AV,serial_print_hex:()=>NV,serial_println:()=>LV,serial_read_from_ai:()=>BV,serial_readline:()=>FV,serial_readstr:()=>fV,serial_send_to_ai:()=>VV,serial_softserial:()=>PV,serial_softserial_new:()=>vV,system_input:()=>YV,system_print:()=>XV,system_print_end:()=>bV,system_print_inline:()=>xV,system_print_many:()=>yV});var pt={};t.r(pt),t.d(pt,{Panic_with_status_code:()=>jV,Timer_init:()=>lB,base_delay:()=>MB,controls_delay:()=>iB,controls_delay_new:()=>nB,controls_end_program:()=>ZV,controls_millis:()=>$V,controls_uname:()=>eB,reset:()=>tB,system_bitbot_shutdown:()=>dB,system_device_name:()=>qV,system_device_serial_number:()=>zV,system_event_bus_source:()=>JV,system_event_bus_value:()=>QV,system_machine_reset:()=>rB,system_on_event:()=>kV,system_raise_event:()=>HV,system_reset:()=>UV,system_run_in_background:()=>GV,system_ticks_diff:()=>_B,system_timer:()=>oB,system_timer_init:()=>pB,system_timestamp:()=>WV,system_value:()=>KV,system_wait:()=>wV,system_wdt_feed:()=>uB,system_wdt_init:()=>aB,time_ticks_diff:()=>TB,timer:()=>sB,timer2:()=>IB});var at={};t.r(at),t.d(at,{Air_daily_content:()=>DB,Air_now_content:()=>cB,Geo_moon_content:()=>FB,Geo_sun_content:()=>fB,Life_suggestion_content:()=>CB,Location_search_content:()=>AB,Tide_daily_content:()=>SB,WEATHER_DAILY:()=>mB,WEATHER_HOUR:()=>EB,WEATHER_NOW:()=>hB,Weather_alarm_content:()=>gB,Weather_daily:()=>LB,Weather_daily_content:()=>NB,Weather_now:()=>OB,Weather_now_content:()=>RB});var ut={};t.r(ut),t.d(ut,{analog_input:()=>HB,analog_output:()=>WB,espnow_channel:()=>GB,haskylens_model:()=>UB,i2c_A_pin:()=>KB,i2c_B_pin:()=>JB,pins_analog:()=>$B,pins_analog_pin:()=>ZB,pins_axis:()=>MG,pins_brightness:()=>hG,pins_builtinimg:()=>aG,pins_builtinimg_extern:()=>uG,pins_button:()=>iG,pins_dac:()=>tG,pins_dac_pin:()=>eG,pins_digital:()=>xB,pins_digital_dot:()=>SG,pins_digital_pin:()=>bB,pins_exlcdh:()=>IG,pins_exlcdv:()=>TG,pins_imglist:()=>rG,pins_input_pin:()=>yB,pins_mpython_touch:()=>BB,pins_one_more:()=>CG,pins_output_pin:()=>VB,pins_playlist:()=>dG,pins_playlist_extern:()=>lG,pins_pwm:()=>nG,pins_pwm_pin:()=>sG,pins_radio_datarate:()=>gG,pins_radio_power:()=>cG,pins_serial:()=>pG,pins_tone_notes:()=>RG,pins_touch:()=>_G,pins_touch_pin:()=>oG,pins_tts_bgmusic:()=>OG,pins_tts_builtin_music:()=>EG,pins_tts_voice:()=>mG,pwm_input:()=>wB,pwm_output:()=>kB,spi_A_pin:()=>QB,spi_B_pin:()=>qB,spi_C_pin:()=>zB,spi_D_pin:()=>jB});var rt={};t.r(rt),t.d(rt,{espnow_channel:()=>XG,haskylens_model:()=>xG,pins_analog:()=>PG,pins_analog_pin:()=>FG,pins_axis:()=>QG,pins_brightness:()=>jG,pins_builtinimg:()=>HG,pins_builtinimg_extern:()=>kG,pins_button:()=>LG,pins_dac:()=>VG,pins_dac_pin:()=>yG,pins_digital:()=>AG,pins_digital_dot:()=>oU,pins_digital_pin:()=>NG,pins_exlcdh:()=>qG,pins_exlcdv:()=>zG,pins_imglist:()=>WG,pins_input_pin:()=>DG,pins_interrupt:()=>UG,pins_mpython_touch:()=>bG,pins_one_more:()=>sU,pins_output_pin:()=>fG,pins_playlist:()=>KG,pins_playlist_extern:()=>JG,pins_pwm:()=>YG,pins_pwm_pin:()=>vG,pins_radio_datarate:()=>nU,pins_radio_power:()=>iU,pins_serial:()=>wG,pins_tone_notes:()=>eU,pins_touch:()=>GG,pins_touch_pin:()=>BG,pins_tts_bgmusic:()=>tU,pins_tts_builtin_music:()=>ZG,pins_tts_voice:()=>$G});const dt=Blockly,lt=Mixly,It={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(_+=n)):i=_}else i="i";return i}},Tt=It; +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class Mt{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(dt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(dt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(dt.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_if_else");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(dt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(dt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(dt.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Xt={init:function(){this.setColour(Dt),this.appendValueInput("FROM").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.PYTHON_RANGE).appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(dt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},xt={init:function(){this.setColour(Dt),this.appendValueInput("LIST").setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(dt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(dt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return dt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},bt={init:function(){this.setColour(Dt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(dt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new dt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(dt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+dt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:dt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:dt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},yt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(dt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new dt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(dt.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(dt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(dt.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_finally");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(dt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(dt.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Vt={init:function(){this.setColour(Dt);var t=new dt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(dt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(dt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:dt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:dt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(dt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Bt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new dt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(dt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return dt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Gt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new dt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(dt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return dt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};bt.OPERATORS=[[dt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[dt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Vt.OPERATORS=[[dt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[dt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Ut={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(dt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},wt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Ht={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(dt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},kt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},Wt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(dt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Kt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(dt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Jt={init:function(){this.jsonInit({message0:dt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:Dt,tooltip:dt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:dt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Qt={init:function(){this.setColour(Dt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(dt.Msg.MIXLY_STAT),this.setOutput(!0)}},qt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},zt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(dt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},jt={init:function(){this.appendDummyInput().appendField(dt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+dt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(dt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new dt.FieldDropdown([[dt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[dt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},$t={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},te={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},ee={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(dt.Msg.PROCEDURES_DEFRETURN_RETURN+dt.Msg.MIXLY_GET_UNIQUE_IDEN)}},ie={init:function(){this.setColour(Dt),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(dt.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},ne={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},se=230;dt.FieldTextInput.math_number_validator=function(t){return String(t)},dt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const oe={init:function(){this.setColour(se),this.appendDummyInput().appendField(new dt.FieldTextInput("0",dt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MATH_NUMBER_TOOLTIP)}},_e={init:function(){this.setColour(se);this.appendDummyInput("").appendField(dt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new dt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:dt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:dt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},pe={init:function(){this.setColour(se);this.appendDummyInput("").appendField(dt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new dt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:dt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:dt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},ae={init:function(){this.setColour(se),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new dt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:dt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:dt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:dt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:dt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:dt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:dt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:dt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},ue={init:function(){this.setColour(se),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new dt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:dt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:dt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:dt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:dt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:dt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:dt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:dt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},re={init:function(){this.setColour(se),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new dt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},de={init:function(){this.setColour(se),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new dt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:dt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:dt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:dt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:dt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:dt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:dt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:dt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},le={init:function(){var t=[[dt.Msg.MATH_BIN,"bin"],[dt.Msg.MATH_OCT,"oct"],[dt.Msg.MATH_HEX,"hex"]];this.setColour(se),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new dt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:dt.Msg.MATH_DEC_TOOLTIP_BIN,oct:dt.Msg.MATH_DEC_TOOLTIP_OCT,hex:dt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Ie={init:function(){var t=[[dt.Msg.LANG_MATH_TO_ROUND,"round"],[dt.Msg.LANG_MATH_TO_CEIL,"ceil"],[dt.Msg.LANG_MATH_TO_FLOOR,"floor"],[dt.Msg.MATH_ABS,"fabs"],[dt.Msg.MATH_SQRT,"sqrt"]];this.setColour(se),this.appendValueInput("A").setCheck(Number).appendField(new dt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:dt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:dt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:dt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:dt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:dt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:dt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Te={init:function(){var t=[[dt.Msg.MIXLY_MAX,"max"],[dt.Msg.MIXLY_MIN,"min"]];this.setColour(se),this.appendValueInput("A").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(new dt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(dt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:dt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:dt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Me={init:function(){var t=[[dt.Msg.MATH_TWO,"two"],[dt.Msg.MATH_EIGHT,"eight"],[dt.Msg.MATH_TEN,"ten"],[dt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(se),this.appendDummyInput("").appendField(dt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new dt.FieldDropdown(t),"OP").appendField(dt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(dt.Msg.MATH_ZHW).appendField(new dt.FieldDropdown(t),"OP2").appendField(dt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:dt.Msg.MATH_Before_two,eight:dt.Msg.MATH_Before_eight,ten:dt.Msg.MATH_Before_ten,sixteen:dt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:dt.Msg.MATH_Behind_two,eight:dt.Msg.MATH_Behind_eight,ten:dt.Msg.MATH_Behind_ten,sixteen:dt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},he={init:function(){var t=[[dt.Msg.LANG_MATH_INT,"int"],[dt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(se),this.setOutput(!0,Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new dt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:dt.Msg.LANG_MATH_INT,float:dt.Msg.LANG_MATH_FLOAT_RANDOM};return dt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},me={init:function(){this.setColour(se),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(dt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(dt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(dt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(dt.Msg.MATH_CONSTRAIN_TOOLTIP)}},Ee={init:function(){this.setColour(se),this.appendValueInput("NUM",Number).appendField(dt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(dt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(dt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Oe={init:function(){this.setColour(se),this.appendDummyInput().appendField(new dt.FieldTextInput("0",dt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(dt.Msg.MATH_NUMBER_TOOLTIP)}},Re={init:function(){this.setColour(se),this.appendValueInput("NUM").setCheck(Number).appendField(dt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},ce={init:function(){this.setColour(se),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(dt.Msg.MATH_ROUND).appendField(dt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(dt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(dt.Msg.MATH_ROUND_NEW_TOOLTIP)}},ge={init:function(){var t=[[dt.Msg.MIXLY_TO_INT,"int"],[dt.Msg.MIXLY_TO_FLOAT,"float"],[dt.Msg.MIXLY_TO_BITES,"b"],[dt.Msg.LANG_MATH_BYTE+dt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(se),this.appendValueInput("VAR").appendField(new dt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:dt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:dt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:dt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},Ce={init:function(){var t=[[dt.Msg.MIXLY_TO_INT,"int"],[dt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(se),this.appendValueInput("VAR").appendField(new dt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:dt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:dt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},Se=Ee,Ae={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(dt.Msg.LANG_MATH_BYTE+dt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},Le={init:function(){this.setColour(se),this.itemCount_=1,this.setMutator(new dt.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(dt.Msg.MIXLY_PRODUCT+dt.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(dt.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(dt.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(dt.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const ve={init:function(){this.setColour(fe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new dt.FieldTextInput("",dt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(dt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new dt.FieldImage(e,7,12,'"')}},Ye={init:function(){this.setColour(fe),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(dt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},Xe={init:function(){this.setColour(fe),this.appendValueInput("VAR").setCheck(Number).appendField(dt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},xe={init:function(){this.setColour(fe),this.appendValueInput("VAR").setCheck(String).appendField(dt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},be={init:function(){this.setColour(fe),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},ye={init:function(){this.setColour(fe),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Ve={init:function(){this.WHERE_OPTIONS=[[dt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[dt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[dt.Msg.TEXT_GET_INDEX_RANDOM+1+dt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(dt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(fe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(dt.Msg.LISTS_GET_INDEX_GET,"MODE"),dt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(dt.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=dt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=dt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=dt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=dt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+dt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",dt.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:dt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:dt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:dt.Msg.TEXT_GET_INDEX_RANDOM};return dt.Msg.PROCEDURES_DEFRETURN_RETURN+dt.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+dt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==dt.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),dt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(dt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new dt.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),dt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Be={init:function(){this.setHelpUrl(dt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(fe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(dt.Msg.LISTS_GET_INDEX_GET+" "+dt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(dt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(dt.Msg.PROCEDURES_DEFRETURN_RETURN+dt.Msg.MIXLY_MICROBIT_TYPE_STRING+dt.Msg.LISTS_GET_INDEX_FROM_START+"n"+dt.Msg.TEXT_CHARAT2)}},Ge={init:function(){this.setHelpUrl(dt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(fe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(dt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(dt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Ue={init:function(){this.WHERE_OPTIONS_1=[[dt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[dt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[dt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[dt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[dt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[dt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(dt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(fe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(dt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==dt.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==dt.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),dt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(dt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new dt.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},we={init:function(){this.setHelpUrl(dt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(fe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(dt.Msg.LISTS_GET_INDEX_GET+" "+dt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(dt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(dt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(dt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},He={init:function(){var t=[[dt.Msg.MIXLY_EQUALS,"==="],[dt.Msg.MIXLY_STARTSWITH,"startswith"],[dt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(fe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new dt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},ke={init:function(){this.setColour(fe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(dt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_COMPARETO_HELP)}},We={init:function(){var t=[[dt.Msg.TEXT_UPPER,"upper"],[dt.Msg.TEXT_TITLE,"title"],[dt.Msg.TEXT_CAPITALIZE,"capitalize"],[dt.Msg.TEXT_SWAPCASE,"swapcase"],[dt.Msg.TEXT_LOWER,"lower"]];this.setColour(fe),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new dt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:dt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:dt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:dt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:dt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:dt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Ke={init:function(){var t=[[dt.Msg.TEXT_LJUST,"ljust"],[dt.Msg.TEXT_CENTER,"center"],[dt.Msg.TEXT_RJUST,"rjust"]];this.setColour(fe),this.appendValueInput("VAR").appendField(new dt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(dt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(dt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Je={init:function(){this.setColour(fe),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(dt.Msg.MIXLY_MID+dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(dt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Qe={init:function(){this.setColour(fe),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(dt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(dt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},qe={init:function(){this.setColour(fe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(dt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(dt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},ze={init:function(){this.setColour(fe),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(dt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(dt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(dt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},je={init:function(){var t=[[dt.Msg.TEXT_TRIM_BOTH,"strip"],[dt.Msg.TEXT_TRIM_LEFT,"lstrip"],[dt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(fe),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(dt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new dt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(dt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:dt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:dt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:dt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},$e={init:function(){this.setColour(fe),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new dt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new dt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(dt.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Qi={init:function(){this.setColour(Ki),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(dt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},qi={init:function(){this.setColour(Ki),this.appendDummyInput().appendField(dt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},zi={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.DICT_KEYS),this.setTooltip(dt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},ji={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(dt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(dt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(dt.Msg.DICTS_GET_TOOLTIP)}},$i={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(dt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(dt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(dt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(dt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},Zi={init:function(){this.setColour(Ki),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(dt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(dt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},tn={init:function(){this.setColour(Ki),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(dt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(dt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.DICTS_DELETE_TOOLTIP)}},en={init:function(){this.setColour(Ki),this.appendValueInput("DICT2").setCheck("Dict").appendField(dt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(dt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MID),this.setTooltip(dt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},nn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.DICT_CLEAR),this.setTooltip(dt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.DICT_ITEMS),this.setTooltip(dt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},on={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.DICT_VALUES),this.setTooltip(dt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},_n={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_LENGTH),this.setTooltip(dt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},pn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.DICT_DELDICT),this.setTooltip(dt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},an={init:function(){this.MODE=[[dt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[dt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(dt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(dt.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=dt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=dt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==dt.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new dt.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},un={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(dt.Msg.DICTS_ADD_VALUE),this.setTooltip(dt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},rn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(dt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(dt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},dn={init:function(){this.setColour(Ki),this.appendDummyInput("").appendField(new dt.FieldLabel(dt.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new dt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(dt.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},ln={init:function(){this.setColour(Ki),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(dt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},In={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_TO_JSON),this.setTooltip(dt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Tn={init:function(){this.setColour(Ki),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(dt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Mn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},hn={init:function(){this.setColour(Ki),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_TO_JSON),this.setTooltip(dt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},mn=210,En={init:function(){var t=dt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(mn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new dt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:dt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:dt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:dt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:dt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:dt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:dt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},On={init:function(){var t=dt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=dt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(mn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new dt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new dt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Rn={init:function(){var t=[[dt.Msg.LOGIC_OPERATION_AND,"AND"],[dt.Msg.LOGIC_OPERATION_OR,"OR"],[dt.Msg.LOGIC_OPERATION_NOR,"NOR"],[dt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(mn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new dt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:dt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:dt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:dt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:dt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},cn={init:function(){this.setColour(mn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(dt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(dt.Msg.LOGIC_NEGATE_TOOLTIP)}},gn={init:function(){var t=[[dt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[dt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(mn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new dt.FieldDropdown(t),"BOOL"),this.setTooltip(dt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Cn={init:function(){this.setColour(mn),this.setOutput(!0),this.appendDummyInput().appendField(dt.Msg.LOGIC_NULL),this.setTooltip(dt.Msg.LOGIC_NULL_TOOLTIP)}},Sn={init:function(){this.setColour(mn),this.appendValueInput("A"),this.appendValueInput("B").appendField(dt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(dt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},An={init:function(){var t=[[dt.Msg.TEXT_APPEND_TO,"in"],[dt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(mn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new dt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(dt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(dt.Msg.IN)}},Ln={init:function(){var t=[[dt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[dt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(mn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new dt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},Nn={init:function(){this.setColour(mn),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(dt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Dn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(dt.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},fn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=dt.Msg.MIXLY_USE,n=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=dt.Msg.MIXLY_BELONG;return i+{r:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Fn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=dt.Msg.MIXLY_USE,n=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=dt.Msg.MIXLY_BELONG,_=dt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},Pn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(dt.Msg.MIXPY_TEXT_ENCODE).appendField(new dt.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=dt.Msg.MIXLY_USE,n=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=dt.Msg.MIXLY_BELONG,_=dt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},vn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+dt.Msg.MIXLY_MICROBIT_TYPE_STRING+dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Yn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Xn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},xn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(dt.Msg.MICROBIT_PYTHON_TYPE)}},bn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(dt.Msg.HTML_FILE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},yn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Vn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Bn={init:function(){this.setColour(0),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};dt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Gn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+dt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},kn={init:function(){this.setColour(0),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Wn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return dt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+dt.Msg.MIXLY_ESP32_SET+{mkdir:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Kn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(dt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Jn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.HTML_FILE,"isfile"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return dt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+dt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},qn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(dt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_SETUP+dt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(dt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},zn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(dt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},jn={init:function(){var t=dt.Procedures.findLegalName("",this),e=new dt.FieldTextInput(t,dt.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new dt.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&dt.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(dt.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(dt.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(dt.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(dt.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=dt.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),dt.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{dt.Events.enable()}},mutationToDom:function(t){var e=dt.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(dt.Msg.MIXLY_AIP_ATTR).setAlign(dt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ws={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(dt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Ks={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(dt.Msg.HTML_FORM_CONTENT).appendField(new dt.FieldDropdown([[dt.Msg.HTML_TEXT,"text"],[dt.Msg.HTML_EMAIL,"email"],[dt.Msg.HTML_NUMBER,"number"],[dt.Msg.HTML_PASSWORD,"password"],[dt.Msg.HTML_CHECKBOX,"checkbox"],[dt.Msg.HTML_RADIOBUTTON,"radiobutton"],[dt.Msg.HTML_BUTTON,"button"],[dt.Msg.HTML_COLOUR,"colour"],[dt.Msg.HTML_DATE,"date"],[dt.Msg.HTML_LOCALTIME,"local time"],[dt.Msg.HTML_FILE,"file"],[dt.Msg.HTML_HIDDEN,"hidden"],[dt.Msg.HTML_IMAGE,"image"],[dt.Msg.HTML_MONTH,"month"],[dt.Msg.HTML_RANGE,"range"],[dt.Msg.HTML_RESET,"reset"],[dt.Msg.HTML_SEARCH,"search"],[dt.Msg.HTML_SUBMIT,"submit"],[dt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[dt.Msg.HTML_TIME,"time"],[dt.Msg.HTML_URL,"url"],[dt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(dt.Msg.HTML_NAME).appendField(new dt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(dt.Msg.HTML_VALUE).appendField(new dt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(dt.Msg.MIXLY_AIP_ATTR).setAlign(dt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Js={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(new dt.FieldTextInput("property"),"KEY").appendField(":").appendField(new dt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qs={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(new dt.FieldTextInput("property"),"KEY").appendField(":").appendField(new dt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qs={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(dt.Msg.HTML_TEXT).appendField(new dt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zs=160,js={init:function(){this.setColour(zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new dt.FieldTable(""),"TEXT")}},$s={init:function(){this.setColour(zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new dt.FieldMultilineInput(""),"TEXT")}},Zs={init:function(){this.setColour(zs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new dt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},to={init:function(){this.setColour(zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},eo={init:function(){this.setColour(zs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new dt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},io={init:function(){this.setColour(zs),this.appendValueInput("VALUE").appendField(dt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},no={init:function(){this.setColour(zs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new dt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(dt.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=dt.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+t+", "+e+", "+i+")"},dt.isNumber(n)&&dt.isNumber(s)&&dt.isNumber(o))n=parseFloat(n),s=parseFloat(s),o=Math.abs(parseFloat(o)),0==n%1&&0==s%1&&0==o%1?(n<=s?(s++,t=0==n&&1==o?s:n+", "+s,1!=o&&(t+=", "+o)):t=n+", "+--s+", -"+o,t="range("+t+")"):(t=n",GTE:">="};const $p=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",o=e.valueToCode(this,"B",n)||"False";if("AND"==i)var _=s+" and "+o;else if("OR"==i)_=s+" or "+o;else if("NOR"==i)_="not("+s+"^"+o+")";else _=s+"^"+o;return[_,n]},Zp=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},ta=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},ea=function(t,e){return["None",e.ORDER_ATOMIC]},ia=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},na=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},sa=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},oa=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},_a=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},pa=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},aa=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},ua=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ra=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},da=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},la=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ia=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ta=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Ma=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},ha=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},ma=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Ea=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Oa=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ra=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},ca=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},ga=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Ca=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Sa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Aa=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},La=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},Na=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Da=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},fa=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),dt.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var o=[],_=0;_\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},ru=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},du=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},lu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Iu=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Tu=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Mu=function(t,e){return'"},hu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},mu=function(){return this.getFieldValue("TEXT")+"\n"},Eu=function(t){return t.getFieldValue("TEXT")+"\n"},Ou=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Ru=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},cu=function(){return""},gu=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Cu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+u.join("\n")},Nu.scrubNakedValue=function(t){return t+"\n"},Nu.quote_=function(t){var e="'";return-1!==t.indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},Nu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Nu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=dt.utils.string.wrap(o,Nu.COMMENT_WRAP-3),n+=Nu.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const Du="#74A55B",fu={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(dt.Msg.MIXLY_RGB_PIN_COUNT)}},Fu={init:function(){this.setColour(Du),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(dt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Pu={init:function(){this.setColour(Du),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(dt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},vu={init:function(){this.setColour(Du),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(dt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Yu={init:function(){this.setColour(Du),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(dt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(dt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Xu={init:function(){this.setColour(Du),this.appendValueInput("SUB"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},xu={init:function(){this.setColour(Du),this.appendValueInput("SUB"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_RESET)}},bu={init:function(){this.setColour(Du),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yu={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING).appendField(dt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Vu={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(dt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Bu={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(dt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Gu={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING).appendField(dt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Uu={init:function(){this.setColour(Du),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_SETUP+dt.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},wu={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_SERVO).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SERVO_MOVE)}},Hu={init:function(){this.setColour(Du),this.appendValueInput("VAR").appendField("360°"+dt.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SETTING+dt.Msg.blockpy_turtle_rotate+dt.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},ku={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).appendField("180°"+dt.Msg.MIXLY_SERVO).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SERVO_MOVE)}},Wu={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).appendField("360°"+dt.Msg.MIXLY_SERVO).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},Ku={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).appendField("180°"+dt.Msg.MIXLY_SERVO).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ju={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).appendField("360°"+dt.Msg.MIXLY_SERVO).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Qu={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new dt.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(dt.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},qu={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Direction).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[dt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[dt.Msg.MOTOR_N,"ms32006.MOT_N"],[dt.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},zu={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new dt.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Direction).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[dt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},ju={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(dt.Msg.MIXLY_RGB_PIN_COUNT)}},$u={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},Zu={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},tr={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_WRI)}},er={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.MIXLY_DURATION).appendField(dt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ir={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.PYTHON_RANGE_STEP).appendField(dt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},nr={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new dt.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_SETUP+dt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new dt.FieldDropdown([["SYN6288"+dt.Msg.MIXLY_AipSpeech_synthesis,"SYN6288"],["NS9300"+dt.Msg.MIXLY_MUSIC_PLAYER,"NS9300"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},sr={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_WHETHER).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_STOPPED,"0"],[dt.Msg.MIXLY_PLAYING,"1"],[dt.Msg.MIXLY_PAUSED,"2"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},or={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_STAT).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MP3_PLAY,"1"],[dt.Msg.MIXLY_MP3_PAUSE,"2"],[dt.Msg.MIXLY_STOP,"3"],[dt.Msg.MIXLY_MP3_PREV,"4"],[dt.Msg.MIXLY_MP3_NEXT,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_r={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendValueInput("volume").appendField(dt.Msg.MIXLY_MP3_VOL+dt.Msg.MIXLY_STAT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_PLAYER_SET_VOLUME_TOOLTIP)}},pr={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MODE+dt.Msg.MIXLY_STAT).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MP3_LOOP_ALL,"0"],[dt.Msg.MIXLY_MP3_LOOP_ONE,"1"],[dt.Msg.MIXLY_PLAYER_DIRECTORY_LOOP,"2"],[dt.Msg.MIXLY_MP3_LOOP_RAM,"3"],[dt.Msg.MIXLY_PLAYER_SINGLE_STOP,"4"],[dt.Msg.MIXLY_PLAYER_SEQUENTIAL_PLAY,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ar={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_START_MELODY,"play"],[dt.Msg.MIXLY_PLAYER_INSERT_MUSIC,"insert"]]),"key"),this.appendValueInput("song"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_PLAYER_PLAY_MUSIC_TOOTIP)}},ur={},rr={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(dt.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},dr={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},lr={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(dt.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(dt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},Ir={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(dt.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(dt.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(dt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},Tr={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Mr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_MOTOR).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},hr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_MOTOR).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},mr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_TRAFFIC_LIGHT).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.LISTS_SET_INDEX_SET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[dt.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[dt.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[dt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[dt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[dt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[dt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Er={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN).appendField(new dt.FieldDropdown([[dt.Msg.COLOUR_RGB_WHITE,"W"],[dt.Msg.COLOUR_RGB_RED,"R"],[dt.Msg.COLOUR_RGB_YELLOW,"Y"],[dt.Msg.COLOUR_RGB_GREEN,"G"],[dt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Or={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN).appendField(new dt.FieldDropdown([[dt.Msg.COLOUR_RGB_WHITE,"W"],[dt.Msg.COLOUR_RGB_RED,"R"],[dt.Msg.COLOUR_RGB_YELLOW,"Y"],[dt.Msg.COLOUR_RGB_GREEN,"G"],[dt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Rr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_SERVO_MOTOR).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[dt.Msg.MIXLY_SPEED,"[1]"],[dt.Msg.MATH_SINGLE_OP_ABSOLUTE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[dt.Msg.MIXLY_RELATIVE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[dt.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[dt.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[dt.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},cr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_SERVO_MOTOR).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[dt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[dt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},gr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_SERVO_MOTOR).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Cr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_SERVO_MOTOR).appendField(dt.Msg.MATH_SINGLE_OP_ABSOLUTE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+dt.Msg.MSG.run).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MODE).setAlign(dt.inputs.Align.RIGHT).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_SPEED+dt.Msg.MIXLY_MODE,"0"],[dt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+dt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(dt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(dt.inputs.Align.RIGHT).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"0"],[dt.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[dt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},Sr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_SERVO_MOTOR).appendField(dt.Msg.MIXLY_RELATIVE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+dt.Msg.MSG.run).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ar={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_SERVO_MOTOR).appendField(dt.Msg.MIXLY_RELATIVE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+dt.Msg.MSG.run).appendField("("+dt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MODE).setAlign(dt.inputs.Align.RIGHT).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_SPEED+dt.Msg.MIXLY_MODE,"0"],[dt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+dt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(dt.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},Lr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_SERVO_MOTOR).appendField(dt.Msg.MIXLY_RELATIVE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+dt.Msg.MSG.run).appendField("("+dt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MODE).setAlign(dt.inputs.Align.RIGHT).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_SPEED+dt.Msg.MIXLY_MODE,"0"],[dt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+dt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(dt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(dt.inputs.Align.RIGHT).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"0"],[dt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Nr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.MIXBOT).appendField(dt.Msg.ME_GO_MOTOR_EXTERN).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MOTOR,"ext_motor"],[dt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[dt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[dt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[dt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[dt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[dt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[dt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},Dr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.MIXBOT).appendField(dt.Msg.ME_GO_MOTOR_EXTERN).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MOTOR,"ext_motor"],[dt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[dt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[dt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[dt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[dt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[dt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[dt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fr={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SETUP+dt.Msg.MIXLY_AT).appendField(dt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Fr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING),this.appendValueInput("pin").appendField("LED"),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Pr={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SERVO+dt.Msg.MIXLY_SETUP+dt.Msg.MIXLY_AT).appendField(dt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},vr={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_SERVO),this.appendValueInput("angle").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE),this.appendDummyInput().appendField(dt.Msg.DRAW_POINTER_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yr={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_MOTOR+dt.Msg.MIXLY_SETUP+dt.Msg.MIXLY_AT).appendField(dt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Xr={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MOTOR),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+dt.Msg.MIXLY_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},xr="#6C9858",br={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(new dt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},yr={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_ESP32_ON,"1"],[dt.Msg.MIXLY_ESP32_OFF,"0"],[dt.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Vr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(dt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Br={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(dt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(dt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Gr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(dt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(dt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Ur={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(dt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_SETTING+dt.Msg.MIXLY_BUILDIN_LED+dt.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},wr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(dt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(dt.Msg.MIXLY_LCD_SETCOLOR).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LIGHT_RED,"1"],[dt.Msg.MIXLY_LIGHT_GREEN,"2"],[dt.Msg.MIXLY_LIGHT_BLUE,"3"],[dt.Msg.MIXLY_LIGHT_YELLOW,"4"],[dt.Msg.MIXLY_LIGHT_CYAN,"5"],[dt.Msg.MIXLY_LIGHT_PURPLE,"6"],[dt.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Hr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING).appendField(dt.Msg.MIXLY_BUILDIN_LED).appendField(new dt.FieldDropdown([[dt.Msg.COLOUR_RGB_RED,"r"],[dt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_SETONOFF)}},kr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(dt.Msg.MIXLY_BUILDIN_LED).appendField(new dt.FieldDropdown([[dt.Msg.COLOUR_RGB_RED,"r"],[dt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(dt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Wr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(dt.Msg.MIXLY_BUILDIN_LED).appendField(new dt.FieldDropdown([[dt.Msg.COLOUR_RGB_RED,"r"],[dt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(dt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Kr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING).appendField(dt.Msg.MIXLY_BUILDIN_LED).appendField(new dt.FieldDropdown([[dt.Msg.COLOUR_RGB_RED,"r"],[dt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_SETTING+dt.Msg.MIXLY_BUILDIN_LED+dt.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},Jr={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(new dt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},Qr={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(lt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(dt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(dt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(dt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},qr={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},zr={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.MIXLY_DURATION).appendField(dt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},jr={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(dt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.PYTHON_RANGE_STEP).appendField(dt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},$r={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_WRI)}},Zr={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(lt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(dt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(dt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(dt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},td={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},ed={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(dt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.PYTHON_RANGE_STEP).appendField(dt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},id={init:function(){this.setColour(xr),this.appendValueInput("TICKS").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(dt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(dt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},nd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},sd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_RESET)}},od={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(dt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},_d={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(dt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},pd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ad={init:function(){this.setColour(xr),this.appendValueInput("LIST").appendField(dt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},ud={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MOTOR_DC).appendField(new dt.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Direction).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"CW"],[dt.Msg.ANTI_CLOCKWISE,"CCW"],[dt.Msg.MOTOR_P,"P"],[dt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},rd={init:function(){this.setColour(xr),this.appendDummyInput().appendField("MixGo Car").appendField(new dt.FieldDropdown([[dt.Msg.blockpy_forward,"F"],[dt.Msg.blockpy_backward,"B"],[dt.Msg.blockpy_left,"L"],[dt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},dd={init:function(){this.setColour(xr),this.appendDummyInput("").appendField("MixGo Car").appendField(new dt.FieldDropdown([[dt.Msg.MOTOR_P,"P"],[dt.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ld={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MOTOR_DC).appendField(new dt.FieldDropdown([[dt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[dt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Direction).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"CW"],[dt.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Id={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MOTOR_DC).appendField(new dt.FieldDropdown([[dt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[dt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(dt.Msg.MIXLY_STOP).appendField(new dt.FieldDropdown([[dt.Msg.MOTOR_P,"P"],[dt.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Td={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Md={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXBOT).appendField(new dt.FieldDropdown([[dt.Msg.blockpy_forward,"F"],[dt.Msg.blockpy_backward,"B"],[dt.Msg.blockpy_left,"L"],[dt.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[dt.Msg.MIXLY_SPEED,"SPEED"],[dt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},hd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXBOT).appendField(new dt.FieldDropdown([[dt.Msg.MOTOR_P,"P"],[dt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},md={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXBOT).appendField(dt.Msg.MIXLY_MOTOR).appendField(new dt.FieldDropdown([[dt.Msg.TEXT_TRIM_LEFT,"1"],[dt.Msg.TEXT_TRIM_RIGHT,"2"],[dt.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[dt.Msg.MIXLY_SPEED,"SPEED"],[dt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Ed={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[dt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Od={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.BITBOT).appendField(new dt.FieldDropdown([[dt.Msg.blockpy_forward,"F"],[dt.Msg.blockpy_backward,"B"],[dt.Msg.blockpy_left,"L"],[dt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Rd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.BITBOT).appendField(new dt.FieldDropdown([[dt.Msg.MOTOR_P,"P"],[dt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.BITBOT).appendField(dt.Msg.MIXLY_MOTOR).appendField(new dt.FieldDropdown([[dt.Msg.TEXT_TRIM_LEFT,"0"],[dt.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Direction).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"CW"],[dt.Msg.ANTI_CLOCKWISE,"CCW"],[dt.Msg.MOTOR_P,"P"],[dt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},gd={init:function(){this.setColour(xr),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Cd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Sd={init:function(){this.setColour(xr),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_SETTING+dt.Msg.MIXLY_MIXBOT_BUZZER+dt.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Ad={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_MIXBOT_BUZZER+dt.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Ld={init:function(){this.setColour(xr),this.appendValueInput("PATH").appendField(dt.Msg.MIXLY_RECORD_AUDIO).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(dt.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Nd={init:function(){this.setColour(xr),this.appendValueInput("PATH").appendField(dt.Msg.MIXLY_PLAY_AUDIO).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Dd={init:function(){this.setColour(xr),this.appendValueInput("PATH").appendField(dt.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},fd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(dt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Fd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.LISTS_SET_INDEX_SET+dt.Msg.ME_GO_MOTOR_EXTERN).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([["1","1"],["2","2"],["3","3"],["4","4"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.blynk_IOT_IR_POWER+dt.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},vd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.ME_GO_MOTOR_EXTERN).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.blynk_IOT_IR_POWER+dt.Msg.MIXLY_PINMODEOUT+dt.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Yd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.LISTS_SET_INDEX_SET+dt.Msg.ME_GO_MOTOR_EXTERN).appendField(dt.Msg.MIXLY_ALL+dt.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(dt.ALIGN_RIGHT).appendField(dt.Msg.blynk_IOT_IR_POWER+dt.Msg.MIXLY_PINMODEOUT+dt.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Xd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.ANALOG+dt.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(dt.Msg.MIXLY_RELEASE).appendField(new dt.FieldDropdown([[dt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[dt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.ANALOG+dt.Msg.MIXLY_KEYBOARD_INPUT)}},xd={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_SPECIAL_KEY).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[dt.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[dt.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[dt.Msg.MIXLY_SPECIAL_KEY4,"0x04"],[dt.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[dt.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[dt.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[dt.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[dt.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},bd={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_GENERAL_KEY).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],["A","0x04"],["B","0x05"],["C","0x06"],["D","0x07"],["E","0x08"],["F","0x09"],["G","0x0A"],["H","0x0B"],["I","0x0C"],["J","0x0D"],["K","0x0E"],["L","0x0F"],["M","0x10"],["N","0x11"],["O","0x12"],["P","0x13"],["Q","0x14"],["R","0x15"],["S","0x16"],["T","0x17"],["U","0x18"],["V","0x19"],["W","0x1A"],["X","0x1B"],["Y","0x1C"],["Z","0x1D"],["1 !","0x1E"],["2 @","0x1F"],["3 #","0x20"],["4 $","0x21"],["5 %","0x22"],["6 ^","0x23"],["7 &","0x24"],["8 *","0x25"],["9 (","0x26"],["0 )","0x27"],["ENTER","0x28"],["ESC","0x29"],["BACKSPACE","0x2A"],["TAB","0x2B"],["SPACE","0x2C"],["- _","0x2D"],["= +","0x2E"],["[ {","0x2F"],["] }","0x30"],["\\ |","0x31"],["; :","0x33"],["' \"","0x34"],["` ~","0x35"],[", <","0x36"],[". >","0x37"],["/ ?","0x38"],["CAPS_LOCK","0x39"],["F1","0x3A"],["F2","0x3B"],["F3","0x3C"],["F4","0x3D"],["F5","0x3E"],["F6","0x3F"],["F7","0x40"],["F8","0x41"],["F9","0x42"],["F10","0x43"],["F11","0x44"],["F12","0x45"],["PRINTSCREEN","0x46"],["SCROLL_LOCK","0x47"],["PAUSE","0x48"],["INSERT","0x49"],["HOME","0x4A"],["PAGE_UP","0x4B"],["DELETE","0x4C"],["END","0x4D"],["PAGE_DOWN","0x4E"],["RIGHT","0x4F"],["LEFT","0x50"],["DOWN","0x51"],["UP","0x52"],["NUM_LOCK","0x53"],["/","0x54"],["*","0x55"],["-","0x56"],["+","0x57"],["ENTER","0x58"],["1","0x59"],["2","0x5A"],["3","0x5B"],["4","0x5C"],["5","0x5D"],["6","0x5E"],["7","0x5F"],["8","0x60"],["9","0x61"],["0","0x62"],[".","0x63"]]),"op"),this.setOutput(!0)}},yd={init:function(){this.setColour(xr),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new dt.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(dt.Msg.GENERALKEY_TUPLE_CREATE_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("generalkey_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;nnew Array(32).fill(0)))},Ch={init:function(){this.jsonInit({colour:Ih,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:dt.Msg.MIXLY_MICROBIT_Built_in_image1,message0:dt.Msg.MIXLY_MICROBIT_Built_in_image})}},Sh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new dt.FieldDropdown(lt.Profile.default.builtinimg),"image"),this.setOutput(!0,["esp32_image","List"])}},Ah={init:function(){this.setColour(Ih),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(dt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new dt.FieldDropdown(Ah.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":dt.Msg.MIXLY_MICROBIT_image_add,"-":dt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[dt.Msg.MICROBIT_DISPLAY_UNION,"add"],[dt.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Lh={init:function(){this.setColour(Ih),this.appendValueInput("A").setCheck("esp32_image").appendField(dt.Msg.MIXLY_MICROBIT_Invert_image1),this.setInputsInline(!0),this.setOutput(!0,"esp32_image")}},Nh={init:function(){this.setColour(Ih),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(dt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(dt.Msg.DISPLAY_IMAGE_LET2).appendField(new dt.FieldDropdown(Nh.OPERATORS),"OP"),this.appendValueInput("val").appendField(dt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(dt.Msg.DISPLAY_IMAGE_UNIT);lt.Boards.getSelectedBoardKey();"Python ESP32-S3"===lt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(dt.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=dt.Msg.DISPLAY_IMAGE_LET,n=dt.Msg.DISPLAY_IMAGE_LET2,s=dt.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:dt.Msg.MIXLY_UP,shift_down:dt.Msg.MIXLY_DOWN,shift_left:dt.Msg.MIXLY_LEFT,shift_right:dt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[dt.Msg.MIXLY_UP,"shift_up"],[dt.Msg.MIXLY_DOWN,"shift_down"],[dt.Msg.MIXLY_LEFT,"shift_left"],[dt.Msg.MIXLY_RIGHT,"shift_right"]]},Dh={init:function(){this.setColour(Ih),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},fh={init:function(){this.setColour(Ih),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Fh={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Ph={init:function(){this.setColour(Ih),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},vh={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Clear_display);lt.Boards.getSelectedBoardKey();"Python ESP32-S3"===lt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(dt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Clear_display)}},Yh={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.MIXLY_SHOW+dt.Msg.MIXLY_DISPLAY_MATRIX_WRITE_NOW),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Xh={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<8;i++)e.appendField(new dt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},xh={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(dt.inputs.Align.CENTRE).appendField(new dt.FieldBitmap(xh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},bh={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new dt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},yh={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(dt.inputs.Align.CENTRE).appendField(new dt.FieldBitmap(yh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},Vh={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<16;i++)e.appendField(new dt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,"esp32_image"),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Bh={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(dt.inputs.Align.CENTRE).appendField(new dt.FieldBitmap(Bh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},Gh={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.OLED_SET_FONT).appendField(new dt.FieldDropdown(Gh.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+dt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+dt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+dt.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Uh={init:function(){this.setColour(Ih),this.appendValueInput("data").appendField(dt.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.OLED_BITMAP_OR_STRING)}},wh={init:function(){this.setColour(Ih),this.appendValueInput("data").appendField(dt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.OLED_BITMAP_OR_STRING)}},Hh={init:function(){this.setColour(Ih),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(dt.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.OLED_BITMAP_OR_STRING)}},kh={init:function(){this.setColour(Ih),this.appendValueInput("data").setCheck(String).appendField(dt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(dt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(dt.Msg.TEXT_CENTER).appendField(new dt.FieldDropdown([[dt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[dt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},Wh={init:function(){this.setColour(Ih),this.appendValueInput("data").setCheck(String).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(dt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},Kh={init:function(){this.setColour(Ih),this.appendValueInput("data").setCheck(String).appendField(dt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Jh={init:function(){this.setColour(Ih),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Qh={init:function(){this.jsonInit({colour:Ih,args0:[{name:"state",options:[[dt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[dt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"shape",options:[[dt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[dt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"}],inputsInline:!0,helpUrl:dt.Msg.mpython_HELPURL,tooltip:dt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:dt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},qh={init:function(){this.jsonInit({colour:Ih,args0:[{name:"state",options:[[dt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[dt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"dir_h_v",options:[[dt.Msg.mpython_vertical,"0"],[dt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"}],inputsInline:!0,helpUrl:dt.Msg.mpython_HELPURL,tooltip:dt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:dt.Msg.MPYTHON_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},zh={init:function(){this.jsonInit({colour:Ih,args0:[{name:"state",options:[[dt.Msg.mpython_display_hline_1,"1"],[dt.Msg.mpython_display_hline_0,"0"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"}],inputsInline:!0,helpUrl:dt.Msg.mpython_HELPURL,tooltip:dt.Msg.mpython_display_line_TOOLTIP,message0:dt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},jh={init:function(){this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new dt.FieldDropdown(jh.IMAGES),"path"),this.setColour(Ih),this.setOutput(!0)},IMAGES:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]]},$h={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<5;i++)e.appendField(new dt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Zh={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(dt.inputs.Align.CENTRE).appendField(new dt.FieldBitmap(Zh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},tm={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},em={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_AMBIENTBRIGHT),this.setInputsInline(!0),this.setOutput(!0,Number)}},im={init:function(){this.setColour(Ih),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},nm={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new dt.FieldDropdown(nm.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[dt.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[dt.Msg.CLOCKWISE+"90"+dt.Msg.blockpy_setheading_degree,"1"],[dt.Msg.CLOCKWISE+"180"+dt.Msg.blockpy_setheading_degree,"2"],[dt.Msg.CLOCKWISE+"270"+dt.Msg.blockpy_setheading_degree,"3"]]},sm={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<12;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new dt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},om={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(dt.inputs.Align.CENTRE).appendField(new dt.FieldBitmap(om.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},_m={init:function(){this.setColour(Ih),this.appendValueInput("data").appendField(dt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(dt.Msg.HTML_COLOUR);lt.Boards.getSelectedBoardKey();"Python ESP32-S3"===lt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(dt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},pm={init:function(){this.setColour(Ih),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.OLED_BITMAP).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("direct").setCheck(String).appendField(dt.Msg.MIXLY_AipImageClassify_Image+dt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},am={init:function(){this.setColour(Ih),this.appendValueInput("data").setCheck(String).appendField(dt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(dt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(dt.Msg.TEXT_CENTER).appendField(new dt.FieldDropdown([[dt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[dt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.appendValueInput("VAR").appendField(dt.Msg.HTML_COLOUR);lt.Boards.getSelectedBoardKey();"Python ESP32-S3"===lt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(dt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},um={init:function(){this.setColour(Ih),this.appendValueInput("data").setCheck(String).appendField(dt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.appendValueInput("VAR").appendField(dt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},rm={init:function(){this.jsonInit({colour:Ih,args0:[{name:"shape",options:[[dt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[dt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:dt.Msg.mpython_HELPURL,tooltip:dt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:dt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},dm={init:function(){this.jsonInit({colour:Ih,args0:[{name:"dir_h_v",options:[[dt.Msg.mpython_vertical,"0"],[dt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:dt.Msg.mpython_HELPURL,tooltip:dt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:dt.Msg.ONBOARD_TFT_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},lm={init:function(){this.jsonInit({colour:Ih,args0:[{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:dt.Msg.mpython_HELPURL,tooltip:dt.Msg.mpython_display_line_TOOLTIP,message0:dt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},Im={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(dt.Msg.HTML_COLOUR),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},Tm={init:function(){this.setColour(Ih),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.MIXLY_LCD_SETCOLOR).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("VAR").appendField(dt.Msg.HTML_COLOUR);lt.Boards.getSelectedBoardKey();"Python ESP32-S3"===lt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(dt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Mm={init:function(){this.setColour(Ih),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_SCREEN_FILL);lt.Boards.getSelectedBoardKey();"Python ESP32-S3"===lt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(dt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},hm={init:function(){this.setColour(Ih),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_INIT_CLOCK),this.appendDummyInput().appendField(dt.Msg.MIXLY_CENTER_POS),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.OLED_CIRCLE_RADIUS),this.appendValueInput("VAR").appendField(dt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},mm={init:function(){this.setColour(Ih),this.appendValueInput("SUB"),this.appendDummyInput().appendField(dt.Msg.GET_RTCTIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Em={init:function(){this.setColour(Ih),this.appendValueInput("SUB"),this.appendDummyInput().appendField(dt.Msg.SET_TIME),this.appendValueInput("h").setCheck(Number).appendField(dt.Msg.MIXLY_HOUR),this.appendValueInput("m").setCheck(Number).appendField(dt.Msg.MIXLY_MINUTE),this.appendValueInput("s").setCheck(Number).appendField(dt.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Om={init:function(){this.setColour(Ih),this.appendValueInput("SUB"),this.appendDummyInput().appendField(dt.Msg.DRAW_CLOCK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Rm={init:function(){this.setColour(Ih),this.appendValueInput("SUB"),this.appendDummyInput().appendField(dt.Msg.CLEAR_CLOCK),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_STM32_TFT_BACKGROUND_COLOR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cm={init:function(){this.jsonInit({colour:Ih,args0:[{name:"shape",options:[[dt.Msg.MPYTHON_DISPLAY_HOLLOW,"False"],[dt.Msg.MPYTHON_DISPLAY_SOLID,"True"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"r",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:dt.Msg.mpython_HELPURL,message0:dt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_CIRCLE_MESSAGE0,nextStatement:null,previousStatement:null})}},gm={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.DRAW_POINTER).appendField(dt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(dt.Msg.MIXLY_DRAW_POINTER_DU),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.DRAW_POINTER_TOOLTIP)}},Cm={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.DRAW_POINTER).appendField(dt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(dt.Msg.MIXLY_DRAW_POINTER_DU),this.appendValueInput("VAR").appendField(dt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.DRAW_POINTER_TOOLTIP)}},Sm={init:function(){this.setColour(Ih),this.appendValueInput("data").appendField(dt.Msg.MIXLY_Display_long_text),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(dt.Msg.HTML_COLOUR);lt.Boards.getSelectedBoardKey();"Python ESP32-S3"===lt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(dt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Am={init:function(){this.setColour(Ih),this.appendValueInput("data").appendField(dt.Msg.OLED_BITMAP),this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.OLED_BITMAP_OR_STRING),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Lm={init:function(){hh.init.call(this),this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Nm={init:function(){Oh.init.call(this),this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Dm={init:function(){Nh.init.call(this),this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},fm={init:function(){Fh.init.call(this),this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Fm={init:function(){Ph.init.call(this),this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Pm={init:function(){vh.init.call(this),this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},vm=180,Ym={init:function(){this.setColour(vm),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(dt.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(dt.Msg.DISPLAY_IMAGE_LET2).appendField(new dt.FieldDropdown(Ym.OPERATORS),"OP"),this.appendValueInput("val").appendField(dt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(dt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=dt.Msg.DISPLAY_IMAGE_LET,n=dt.Msg.DISPLAY_IMAGE_LET2,s=dt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:dt.Msg.MIXLY_UP,down:dt.Msg.MIXLY_DOWN,left:dt.Msg.MIXLY_LEFT,right:dt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[dt.Msg.MIXLY_UP,"up"],[dt.Msg.MIXLY_DOWN,"down"],[dt.Msg.MIXLY_LEFT,"left"],[dt.Msg.MIXLY_RIGHT,"right"]]},Xm={init:function(){this.setColour(vm),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(dt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new dt.FieldDropdown(Xm.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":dt.Msg.MIXLY_MICROBIT_image_add,"-":dt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[dt.Msg.MICROBIT_DISPLAY_UNION,"+"],[dt.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},xm={init:function(){this.setColour(vm),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+dt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new dt.FieldDropdown(xm.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+dt.Msg.MIXLY_MICROBIT_IMAGE+{height:dt.Msg.MIXLY_HEIGHT,width:dt.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[dt.Msg.MIXLY_HEIGHT,"height"],[dt.Msg.MIXLY_WIDTH,"width"]]},bm={init:function(){this.setColour(vm),this.appendValueInput("VAR").appendField(dt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RECT).appendField(new dt.FieldDropdown(bm.STATUS),"OP"),this.jsonInit({message0:dt.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_OLED_RECT)},STATUS:[[dt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[dt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},ym={init:function(){this.setColour(vm),this.appendValueInput("VAR").appendField(dt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new dt.FieldDropdown(ym.STATUS),"OP"),this.jsonInit({message0:dt.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[dt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[dt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Vm={init:function(){this.setColour(vm),this.appendValueInput("VAR").appendField(dt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_DISPLAY_DRAW+dt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new dt.FieldDropdown(Vm.STATUS),"OP"),this.jsonInit({message0:dt.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_DISPLAY_DRAW+dt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[dt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[dt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Bm="#777777",Gm={init:function(){this.setColour(Bm),this.appendDummyInput("").appendField("from ").appendField(new dt.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new dt.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Um={init:function(){this.setColour(Bm),this.appendDummyInput("").appendField("import ").appendField(new dt.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wm={init:function(){this.setColour(Bm),this.appendDummyInput("").appendField(new dt.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new dt.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},fE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(dt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},FE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},PE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},vE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(dt.Msg.MIXLY_EMQX_SERVER).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(dt.Msg.MIXLY_WIFI_USERNAME).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(dt.Msg.MIXLY_IOT_PASSWORD).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(dt.Msg.MIXLY_EMQX_PROJECT).setAlign(dt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},YE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(dt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(dt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(dt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},XE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(dt.Msg.MIXLY_EMQX_SUBSCRIBE+dt.Msg.MIXLY_MICROBIT_MSG).appendField(dt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(dt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},xE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(dt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},VE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(dt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},BE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(dt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},GE={init:function(){this.setColour(gE),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},UE={init:function(){this.setColour(gE),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},wE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(dt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},HE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO").appendField(dt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(dt.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},kE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(dt.Msg.MIXLY_EMQX_SERVER).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(dt.Msg.CONTROLS_FOR_INPUT_WITH+dt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(dt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},WE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(dt.Msg.MIXLY_EMQX_SERVER).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(dt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(dt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},KE={init:function(){this.VISITOR_ID=lt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(gE),this.appendDummyInput("").appendField(new dt.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},JE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO").appendField(dt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},QE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("HTTP"+dt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(dt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(dt.Msg.MIXLY_REQUESTS_GET).appendField(dt.Msg.MIXLY_GET_CURRENT_TIME).appendField(dt.Msg.MIXLY_OPEN_DEBUG).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("HTTP"+dt.Msg.MIXLY_Client).appendField(dt.Msg.MIXLY_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[dt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[dt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},zE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MQTT"+dt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(dt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(dt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(dt.Msg.MQTT_Topic).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(dt.Msg.MIXLY_OPEN_DEBUG).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},jE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MQTT"+dt.Msg.MIXLY_Client).appendField(dt.Msg.MIXLY_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[dt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[dt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},$E=CE,ZE=SE,tO=AE,eO=LE,iO=DE,nO={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(dt.Msg.MIXLY_EMQX_SERVER).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(dt.Msg.MODEL_NAME).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(dt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sO=nO,oO={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(dt.Msg.MIXLY_EMQX_SERVER).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(dt.Msg.MIXLY_API_PRIVATE_KEY).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(dt.Msg.MODEL_NAME).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(dt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_O={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(dt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(dt.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pO={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(dt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(dt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},aO={init:function(){this.setColour(gE),this.appendDummyInput().appendField("Ollama "+dt.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},uO=225,rO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(dt.Msg.MIXLY_NETWORK_MODE).appendField(new dt.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},dO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[dt.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=dt.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:dt.Msg.MIXLY_NETWORK_WIFI_OPEN,False:dt.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},lO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},IO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return dt.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:dt.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},TO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(dt.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(dt.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},MO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_NETWORK_WIFI_CONNECT+dt.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},hO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[dt.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[dt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return dt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:dt.Msg.MIXLY_ESP32_NETWORK_IP,1:dt.Msg.MIXLY_ESP32_NETWORK_MASK,2:dt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},mO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},EO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[dt.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},OO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(dt.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(dt.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},RO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(dt.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},cO={init:function(){this.setColour(uO),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new dt.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},gO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},CO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},SO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},AO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},LO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},NO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},DO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},fO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},FO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},PO={init:function(){this.setColour(uO),this.appendValueInput("DOMAIN").appendField(dt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(dt.Msg.blockpy_REQUESTS_GET).appendField(new dt.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},vO={init:function(){this.appendValueInput("VAL"),this.setColour(uO),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new dt.FieldDropdown(vO.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:dt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:dt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:dt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[dt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[dt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[dt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[dt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},YO={init:function(){this.appendValueInput("VAR").appendField(dt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(uO),this.appendDummyInput("").appendField(dt.Msg.blockpy_CONDUCT).appendField(new dt.FieldDropdown(YO.METHOD),"DIR"),this.appendDummyInput("").appendField(dt.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:dt.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:dt.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},XO={init:function(){this.setColour(uO),this.appendDummyInput("").appendField(dt.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(dt.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},xO={init:function(){this.setColour(uO),this.appendDummyInput("").appendField(new dt.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},bO="#3288dd",yO={init:function(){this.setColour(bO),this.appendValueInput("URL").appendField(dt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(dt.Msg.blockpy_CONDUCT).appendField(new dt.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(dt.Msg.blockpy_REQUESTS).appendField(dt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},VO={init:function(){this.setColour(bO),this.appendValueInput("URL").appendField(dt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(dt.Msg.blockpy_CONDUCT).appendField(new dt.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(dt.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(dt.Msg.blockpy_REQUESTS+dt.Msg.OLED_STRING),this.appendDummyInput("").appendField(dt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},BO={init:function(){this.appendValueInput("VAL"),this.setColour(bO),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new dt.FieldDropdown(BO.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[dt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[dt.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[dt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[dt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[dt.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},GO={init:function(){this.setColour(bO),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(dt.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(dt.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(dt.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(dt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},UO={init:function(){this.setColour(bO),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(dt.Msg.MIXLY_EMQX_SERVER).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(dt.Msg.MIXLY_EMQX_PORT).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(dt.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(dt.Msg.MIXLY_WIFI_USERNAME).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(dt.Msg.MIXLY_IOT_PASSWORD).setAlign(dt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wO={init:function(){this.setColour(bO),this.appendValueInput("TOPIC").appendField(dt.Msg.MIXLY_EMQX_SUBSCRIBE+dt.Msg.MIXLY_MICROBIT_MSG).appendField(dt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(dt.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},HO={init:function(){this.setColour(bO),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(dt.Msg.MIXLY_EMQX_SUBSCRIBE+dt.Msg.MIXLY_MICROBIT_MSG).appendField(dt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(dt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},kO={init:function(){this.setColour(bO),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(dt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(dt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(dt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},WO={init:function(){this.setColour(bO),this.appendDummyInput().appendField("mqtt"+dt.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},KO=100,JO={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("I2CSUB").appendField(dt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_SETUP+dt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(e),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},QO={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0,Number),this.setInputsInline(!0)}},qO={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField(dt.Msg.MOTOR_DC).appendField(dt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Direction).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"CW"],[dt.Msg.ANTI_CLOCKWISE,"CCW"],[dt.Msg.MOTOR_P,"P"],[dt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},zO={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField(dt.Msg.MOTOR_DC).appendField(dt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(dt.Msg.MIXLY_STEPPER_GET_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},jO={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+dt.Msg.MIXLY_SERVO).appendField(dt.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SERVO_MOVE)}},$O={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+dt.Msg.MIXLY_SERVO).appendField(dt.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},ZO={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+dt.Msg.MIXLY_SERVO),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},tR={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+dt.Msg.MIXLY_SERVO).appendField(dt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},eR="#A58C5B",iR={init:function(){this.setColour(eR),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_BUTTON).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(dt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_SENOR_IS_PRESSED)}},nR={init:function(){this.setColour(eR),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_BUTTON).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(dt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_SENOR_WAS_PRESSED)}},sR={init:function(){this.setColour(eR),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_BUTTON).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(dt.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.PROCEDURES_DEFRETURN_RETURN+dt.Msg.MIXLY_BUTTON+dt.Msg.MIXLY_GET_PRESSES)}},oR={init:function(){this.setColour(eR),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_BUTTON).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MODE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[dt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[dt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(dt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},_R={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_shake,"shake"],[dt.Msg.MIXLY_UP,"up"],[dt.Msg.MIXLY_DOWN,"down"],[dt.Msg.MIXLY_LEFT,"left"],[dt.Msg.MIXLY_RIGHT,"right"],[dt.Msg.MIXLY_MICROBIT_face_up,"face up"],[dt.Msg.MIXLY_MICROBIT_face_down,"face down"],[dt.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(dt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=dt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=dt.Msg.MSG.catSensor,s=dt.Msg.MIXLY_MICROBIT_JS_STATE,o=dt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:dt.Msg.MIXLY_MICROBIT_shake,up:dt.Msg.MIXLY_UP,down:dt.Msg.MIXLY_DOWN,left:dt.Msg.MIXLY_LEFT,right:dt.Msg.MIXLY_RIGHT,"face up":dt.Msg.MIXLY_MICROBIT_face_up,"face down":dt.Msg.MIXLY_MICROBIT_face_down,freefall:dt.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+o}))}},pR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new dt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=dt.Msg.MIXLY_MICROBIT_Direction,s=dt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":dt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},aR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},uR={init:function(){this.setColour(eR),this.appendValueInput("PIN",Number).appendField(new dt.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new dt.FieldDropdown(uR.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[dt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[dt.Msg.MIXLY_GETHUMIDITY,"humidity"]]},rR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},dR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},lR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new dt.FieldDropdown([[dt.Msg.TEXT_TRIM_LEFT,"left"],[dt.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(dt.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=dt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=dt.Msg.MIXLY_ESP32_NEAR;return i+{left:dt.Msg.TEXT_TRIM_LEFT,right:dt.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},IR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_ALTITUDE_SENSOR+" BMP280").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[dt.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":dt.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":dt.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},TR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+" SHT20").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[dt.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":dt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":dt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},MR={init:function(){this.setColour(eR),this.appendValueInput("PIN",Number).appendField("DS18X20 "+dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(dt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},hR={init:function(){this.setColour(eR),this.appendDummyInput("").appendField("LM35"+dt.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(dt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_LM35)}},mR={init:function(){this.setColour(eR),this.appendValueInput("I2CSUB").appendField(dt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_SETUP+dt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_ESP32_EXTERN_LIGHT+"(LTR308ALS)","LTR308"],[dt.Msg.MIXLY_COLOR_SENSOR+"(LTR381RGB)","LTR381RGB"],[dt.Msg.MIXLY_COLOR_SENSOR+"(UCS12071)","UCS12071"],[dt.Msg.MIXLY_EXTERN_LIGHTUV+"(LTR390UV)","LTR390UV"],[dt.Msg.MIXLY_ALTITUDE_SENSOR+"(HP203X)","HP203X"],[dt.Msg.MIXLY_ALTITUDE_SENSOR+"(SPL06_001)","SPL06_001"],[dt.Msg.MIXLY_ALTITUDE_SENSOR+"(MS5611)","MS5611"],[dt.Msg.MIXLY_ALTITUDE_SENSOR+"(BMP280)","BMP280"],[dt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHTC3)","SHTC3"],[dt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(AHT21)","AHT21"],[dt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHT20)","SHT20"],[dt.Msg.MIXLY_LASER_RANGE_SENSOR+"(VL53L0X)","VL53L0X"],[dt.Msg.MIXLY_GEOMAGNETIC_SENSOR+"(QMC5883L)","QMC5883L"],[dt.Msg.MIXLY_ESP32_MAX30102+"(MAX30102)","MAX30102"],[dt.Msg.HTML_COLOUR+"、"+dt.Msg.MIXLY_ENVIRONMENT_LIGHT+"、"+dt.Msg.MIXLY_NEXT+"、"+dt.Msg.MIXLY_ESP32_APDS9960+"(APDS9960)","APDS9960"],[dt.Msg.MIXLY_NINE_AXIS_SENSOR+"(MPU9250)","MPU9250"],[dt.Msg.MixGo_MPU9250+"(ADXL345)","ADXL345"],["RFID","RFID"],[dt.Msg.MIXLY_RADAR_SENSOR+"(CBR817)","CBR817"],[dt.Msg.MIXLY_AipSpeech_asr+"(CI130X)","CI130X"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},ER={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.LISTS_SET_INDEX_SET+dt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(dt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+dt.Msg.MIXLY_DELAY_TIME_RANGE)}},OR={init:function(){this.setColour(eR),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RADAR).appendField(dt.Msg.LISTS_SET_INDEX_SET+dt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(dt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+dt.Msg.MIXLY_DELAY_TIME_RANGE)}},RR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},cR={init:function(){this.setColour(eR),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RADAR).appendField(dt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},gR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_IDENTIFY_ONCE_AND_SAVE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},CR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_HELLO_XIAOZHI,"1"],[dt.Msg.MIXLY_XIAOZHIXIAOZHI,"2"],[dt.Msg.MIXLY_THE_FIRST,"3"],[dt.Msg.MIXLY_THE_SECOND,"4"],[dt.Msg.MIXLY_THE_THIRD,"5"],[dt.Msg.MIXLY_THE_FOURTH,"6"],[dt.Msg.MIXLY_THE_FIFTH,"7"],[dt.Msg.MIXLY_THE_SIXTH,"8"],[dt.Msg.MIXLY_THE_SEVENTH,"9"],[dt.Msg.MIXLY_THE_EIGHTH,"10"],[dt.Msg.MIXLY_THE_NINTH,"11"],[dt.Msg.MIXLY_THE_TENTH,"12"],[dt.Msg.MIXLY_THE_ELEVENTH,"13"],[dt.Msg.MIXLY_THE_TWELFTH,"14"],[dt.Msg.MIXLY_THE_13TH,"15"],[dt.Msg.MIXLY_THE_14TH,"16"],[dt.Msg.MIXLY_THE_15TH,"17"],[dt.Msg.MIXLY_THE_16TH,"18"],[dt.Msg.MIXLY_THE_17TH,"19"],[dt.Msg.MIXLY_THE_18TH,"20"],[dt.Msg.MIXLY_THE_19TH,"21"],[dt.Msg.MIXLY_THE_20TH,"22"],[dt.Msg.MIXLY_Turn_on_the_lights,"23"],[dt.Msg.MIXLY_Turn_off_the_lights,"24"],[dt.Msg.MIXLY_Turn_up_the_brightness,"25"],[dt.Msg.MIXLY_Turn_down_the_brightness,"26"],[dt.Msg.MIXLY_Set_it_to_red,"27"],[dt.Msg.MIXLY_Set_it_to_orange,"28"],[dt.Msg.MIXLY_Set_it_to_yellow,"29"],[dt.Msg.MIXLY_Set_it_to_green,"30"],[dt.Msg.MIXLY_Set_it_to_cyan,"31"],[dt.Msg.MIXLY_Set_it_to_blue,"32"],[dt.Msg.MIXLY_Set_it_to_purple,"33"],[dt.Msg.MIXLY_Set_it_to_white,"34"],[dt.Msg.MIXLY_Turn_on_the_fan,"35"],[dt.Msg.MIXLY_Turn_off_the_fan,"36"],[dt.Msg.MIXLY_First_gear,"37"],[dt.Msg.MIXLY_Wind_speed_second,"38"],[dt.Msg.MIXLY_Third_gear,"39"],[dt.Msg.MIXLY_Previous,"40"],[dt.Msg.MIXLY_Next_page,"41"],[dt.Msg.MIXLY_Show_smiley_face,"42"],[dt.Msg.MIXLY_Show_crying_face,"43"],[dt.Msg.MIXLY_Show_love,"44"],[dt.Msg.MIXLY_Close_display,"45"],[dt.Msg.MIXLY_Start_execution,"46"],[dt.Msg.MIXLY_FORWARD,"47"],[dt.Msg.MIXLY_BACKWARD,"48"],[dt.Msg.MIXLY_TURNLEFT,"49"],[dt.Msg.MIXLY_TURNRIGHT,"50"],[dt.Msg.MIXLY_STOP,"51"],[dt.Msg.MIXLY_Accelerate,"52"],[dt.Msg.MIXLY_retard,"53"],[dt.Msg.ROTATION_FORWARD,"54"],[dt.Msg.ROTATION_BACKWARD,"55"],[dt.Msg.MIXLY_Query_temperature,"56"],[dt.Msg.MIXLY_Query_humidity,"57"],[dt.Msg.MIXLY_Query_brightness,"58"],[dt.Msg.MIXLY_Query_sound,"59"],[dt.Msg.MIXLY_Query_time,"60"],[dt.Msg.MIXLY_Query_distance,"61"],[dt.Msg.MIXLY_Query_pressure,"62"],[dt.Msg.MIXLY_Query_key,"63"],[dt.Msg.MIXLY_Query_touch,"64"],[dt.Msg.MIXLY_Query_color,"65"]]),"cmd").appendField(dt.Msg.MIXLY_WHETHER+dt.Msg.MIXLY_BE_IDENTIFIED),this.setOutput(!0),this.setInputsInline(!0)}},SR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_RECOGNIZED_STATE,"status1"],[dt.Msg.MIXLY_WHETHER_BROADCAST,"status2"],[dt.Msg.MIXLY_THE_RECOGNIZED_CMD,"result"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_CI130X_GET_THE_RECOGNIZED_STATE_TOOLTIP)}},AR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MP3_PLAY).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[dt.Msg.MIXLY_WIND_SPEED,"154"],[dt.Msg.MIXLY_HYETAL,"155"],[dt.Msg.MIXLY_TEMPERATURE,"156"],[dt.Msg.MIXLY_Humidity,"157"],[dt.Msg.MIXLY_Altitude,"158"],[dt.Msg.MIXLY_SOUND,"159"],[dt.Msg.MIXLY_BRIGHTNESS,"160"],[dt.Msg.ME_GO_HALL_SENSOR_DISTANCE,"161"],[dt.Msg.MIXLY_SERVO,"162"],[dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"163"],[dt.Msg.MIXLY_BUTTON2,"164"],[dt.Msg.MIXLY_ESP32_TOUCH,"165"],[dt.Msg.MIXLY_PAY,"166"],[dt.Msg.MIXLY_CARSH_CHANGE,"167"],[dt.Msg.MIXLY_COUNTDOWN,"168"],[dt.Msg.MIXLY_TIMING,"169"],[dt.Msg.MIXLY_AT_THE_MOMENT,"170"],[dt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE,"171"],[dt.Msg.MIXLY_FORWARD,"172"],[dt.Msg.MIXLY_BACKWARD,"173"],[dt.Msg.MIXLY_TURNLEFT,"174"],[dt.Msg.MIXLY_TURNRIGHT,"175"],[dt.Msg.MIXLY_STOP,"176"],[dt.Msg.MIXLY_Accelerate,"177"],[dt.Msg.MIXLY_retard,"178"],[dt.Msg.ROTATION_FORWARD,"179"],[dt.Msg.ROTATION_BACKWARD,"180"],[dt.Msg.TUPLE_JOIN,"181"],[dt.Msg.MIXLY_SHOW,"182"],[dt.Msg.MIXLY_LAMPLIGHT,"183"],[dt.Msg.MIXLY_ACCELERATION,"184"]]),"star"),this.appendValueInput("NUM").appendField(dt.Msg.MIXLY_NUMBER),this.appendDummyInput("").appendField(dt.Msg.MIXLY_UNIT).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[dt.Msg.MIXLY_YEAR,"117"],[dt.Msg.MIXLY_MONTH,"118"],[dt.Msg.MIXLY_DAY,"119"],[dt.Msg.MIXLY_HOUR,"120"],[dt.Msg.MIXLY_MINUTE,"121"],[dt.Msg.MIXLY_SECOND,"122"],[dt.Msg.MIXLY_WEEK2,"123"],[dt.Msg.MIXLY_RMB_UNIT,"124"],[dt.Msg.blockpy_setheading_degree,"125"],[dt.Msg.MIXLY_GEAR,"126"],[dt.Msg.MIXLY_LAYER,"127"],[dt.Msg.MIXLY_GRAM,"128"],[dt.Msg.MIXLY_METER,"129"],[dt.Msg.MIXLY_CENTIMETER,"130"],[dt.Msg.MIXLY_MILLIMETER,"131"],[dt.Msg.MIXLY_LUMEN,"132"],[dt.Msg.MIXLY_DECIBEL,"133"],[dt.Msg.MIXLY_hectopascal,"134"],[dt.Msg.MIXLY_PERCENT,"135"],[dt.Msg.MIXLY_CELSIUS,"136"],[dt.Msg.MIXLY_METER_PER_SEC,"137"],[dt.Msg.MIXLY_MICROBIT_Turn_on_display,"138"],[dt.Msg.MIXLY_MICROBIT_Turn_off_display,"139"],[dt.Msg.MIXLY_SUCCESS,"140"],[dt.Msg.MIXLY_FAILED,"141"],[dt.Msg.MIXLY_WRONG,"142"],[dt.Msg.MIXLY_GOOD,"143"],[dt.Msg.MIXLY_blockpy_set_add,"144"],[dt.Msg.MIXLY_DECREASE,"145"],[dt.Msg.COLOUR_RGB_RED,"146"],[dt.Msg.COLOUR_RGB_ORANGE,"147"],[dt.Msg.COLOUR_YELLOW,"148"],[dt.Msg.COLOUR_RGB_GREEN,"149"],[dt.Msg.COLOUR_CYAN,"150"],[dt.Msg.COLOUR_RGB_BLUE,"151"],[dt.Msg.COLOUR_RGB_PURPLE,"152"],[dt.Msg.COLOUR_RGB_WHITE,"153"]]),"end"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},LR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.LISTS_SET_INDEX_SET+dt.Msg.MIXLY_SYSTEM+dt.Msg.MIXLY_CMD).appendField(new dt.FieldDropdown([[dt.Msg.MILXY_ENTER_WAKE_UP,"1"],[dt.Msg.MIXLY_INCREASE_VOLUME,"202"],[dt.Msg.MIXLY_REDUCE_VOLUME,"203"],[dt.Msg.MIXLY_MAX_VOLUME,"204"],[dt.Msg.MIXLY_MINIMUM,"205"],[dt.Msg.MIXLY_OPEN_RESPONSE,"206"],[dt.Msg.MIXLY_CLOSE_RESPONSE,"207"],[dt.Msg.MIXLY_QUIT_WAKE_UP,"208"]]),"cmd"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},NR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[dt.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[dt.Msg.MIXLY_ESP32_MAX30102_IR+","+dt.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},DR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[dt.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[dt.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},fR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308ALS"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},FR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.HTML_COLOUR+dt.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GET+dt.Msg.HTML_COLOUR,"[2]"],[dt.Msg.MIXLY_GET+dt.Msg.MIXLY_IR_STRENGTH,"[1]"],[dt.Msg.MIXLY_GET+dt.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},PR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.HTML_COLOUR+dt.Msg.MSG.catSensor+" UCS12071").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GET+"RGB"+dt.Msg.HTML_COLOUR,"0"],[dt.Msg.MIXLY_GET+dt.Msg.MIXLY_RGB_RAW,"1"],[dt.Msg.MIXLY_GET_ENV_LIGHT+dt.Msg.MIXLY_BRIGHTNESS,"2"],[dt.Msg.GET_IR_STRENGTH+dt.Msg.MIXLY_BRIGHTNESS,"3"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},vR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GET_ENV_LIGHT,"E"],[dt.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},YR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},XR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[dt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:dt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:dt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},xR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[dt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:dt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:dt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},bR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_Altitude+dt.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GETPRESSURE,"pressure()"],[dt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[dt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},yR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_Altitude+dt.Msg.MSG.catSensor+" SPL06_001").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GETPRESSURE,"pressure()"],[dt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[dt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},VR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_Altitude+dt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GETPRESSURE,"pressure()"],[dt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[dt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},BR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_Altitude+dt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_REF_TO_PRESSURE),this.appendDummyInput().appendField(dt.Msg.MIXLY_CAL_TO_ALTITUDE),this.setOutput(!0,Number),this.setInputsInline(!0)}},GR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MIXGOPE_FIELD+dt.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[dt.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},UR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_shake,"shake"],[dt.Msg.MIXLY_UP,"up"],[dt.Msg.MIXLY_DOWN,"down"],[dt.Msg.MIXLY_LEFT,"left"],[dt.Msg.MIXLY_RIGHT,"right"],[dt.Msg.MIXLY_MICROBIT_face_up,"face up"],[dt.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=dt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=dt.Msg.MSG.catSensor,s=dt.Msg.MIXLY_MICROBIT_JS_STATE,o=dt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:dt.Msg.MIXLY_MICROBIT_shake,up:dt.Msg.MIXLY_UP,down:dt.Msg.MIXLY_DOWN,left:dt.Msg.MIXLY_LEFT,right:dt.Msg.MIXLY_RIGHT,"face up":dt.Msg.MIXLY_MICROBIT_face_up,"face down":dt.Msg.MIXLY_MICROBIT_face_down}[e]+o}))}},wR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new dt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=dt.Msg.MIXLY_MICROBIT_Direction,s=dt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":dt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},HR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_JS_GET+dt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new dt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=dt.Msg.MIXLY_MICROBIT_Direction,s=dt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":dt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},kR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+dt.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new dt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=dt.Msg.MIXLY_MICROBIT_Direction,s=dt.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":dt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},WR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},KR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_GETTEMPERATUE)}},JR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return dt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:dt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},QR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},qR={init:function(){this.setColour(eR),this.appendValueInput("SPISUB").appendField(dt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_SETUP+dt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new dt.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},zR={init:function(){this.setColour(eR),this.appendDummyInput().appendField("RFID"+dt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(dt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[dt.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},jR={init:function(){this.setColour(eR),this.appendDummyInput().appendField("RFID"+dt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},$R={init:function(){this.setColour(eR),this.appendDummyInput().appendField("RFID"+dt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(dt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},ZR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(dt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(dt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},tc={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(dt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(dt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(dt.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},ec={init:function(){this.setColour(eR),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_RFID_SCAN_OK,"0"],[dt.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[dt.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ic={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new dt.FieldDropdown([["全部(元组)","data()[0]"],["全部(json)","data()[1]"],["全部(json,附带位置信息)","data()[2]"],["编号","data()[0][0]"],["电量","data()[0][1]"],["风速","data()[0][2]"],["阵风","data()[0][3]"],["风向","data()[0][4]"],["雨量","data()[0][5]"],["温度","data()[0][6]"],["湿度","data()[0][7]"],["光照","data()[0][8]"],["紫外线","data()[0][9]"],["大气压","data()[0][10]"],["信号强度","data()[0][11]"],["信噪比","data()[0][12]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip("返回气象数据元组 data= (设备id,电池状态,风速m/s,阵风m/s,风向°,雨量mm,温度℃,湿度%,光照Lux,UVI,大气压Pa,信号强度dB,信噪比dB)")}},nc={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},sc={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendValueInput("BASE").appendField("以主题"),this.appendDummyInput("").appendField("串口发送至MixIO"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},oc={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new dt.icons.MutatorIcon(["weather_set_label_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("weather_set_label_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n>6),i.push(128|63&o)):(2048<=o&&o<=55295||57344<=o&&o<=65535)&&(n+=3,i.push(224|15&o>>12),i.push(128|63&o>>6),i.push(128|63&o))}for(s=0;s>8,255&n].concat(i)}(t,!0),i="",n=0;n=0?"0x700000":["mixgo_sant"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==_?(e.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+o+", font_address="+p+")\n"):"16x8 Matrix"==_&&(e.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+o+")\n"),i},pF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},aF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},uF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},rF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},dF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},lF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},IF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},TF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},MF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},hF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},mF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},EF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},OF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},RF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_"+t.getFieldValue("OP")+"("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"B",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},cF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},gF=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},CF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},SF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},AF=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"width",e.ORDER_ATOMIC),_=e.valueToCode(this,"height",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP");switch(p){case"True":return i+".show_fill_rect("+n+", "+s+", "+o+", "+_+", "+a+")\n";case"False":return i+".show_rect("+n+", "+s+", "+o+", "+_+", "+a+")\n"}},LF=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+o+", 1)\n"},NF=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},DF=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},fF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},FF=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},PF=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"r",e.ORDER_ATOMIC),_="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(_){case"True":return i+".show_fill_circle("+n+", "+s+", "+o+", "+p+")\n";case"False":return i+".show_circle("+n+", "+s+", "+o+", "+p+")\n"}},vF=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),o=e.valueToCode(this,"x1",e.ORDER_ATOMIC),_=e.valueToCode(this,"y1",e.ORDER_ATOMIC),p=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",r=this.getFieldValue("OP");switch(u){case"True":return i+".show_fill_triangle("+n+", "+s+", "+o+", "+_+", "+p+", "+a+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+o+", "+_+", "+p+", "+a+", "+r+")\n"}},YF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+","+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+","+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},XF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},xF=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),o=this.getFieldValue("key");return"TM1650"==o?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+o+"("+s+")\n"):"TM1637"==o&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+o+"("+s+")\n"),i},bF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},yF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},VF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".showDP("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},BF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},GF=function(t,e){e.definitions_.import_st7789="import st7789";var i=lt.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_sant"].indexOf(i)>=0?"0xE00000":"0x3A0000";var s=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),o=e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC),_=e.valueToCode(this,"PINCS",e.ORDER_ATOMIC),p=e.valueToCode(this,"PINDC",e.ORDER_ATOMIC);return s+" = st7789.ST7789("+o+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+", dc_pin="+p+", cs_pin="+_+", rotation="+this.getFieldValue("rotate")+", font_address="+n+")\n"},UF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".image("+n+", x="+s+", y="+o+", size="+_+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".image("+n+", x= "+s+",y="+o+", size="+_+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},wF=function(t,e){var i="0x"+this.getFieldValue("COLOR").slice(1);return["0x"+((16252928&i)>>8|(64512&i)>>5|(255&i)>>3).toString(16),e.ORDER_ATOMIC]},HF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==a.slice(0,2))var r=i+".shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+u+", color="+a+")\n";else{const t=a.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r=i+".shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+u+", color=0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+")\n"}return r},kF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==_.slice(0,2))var p=i+".frame("+n+", size="+s+", delay="+o+", color="+_+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".frame("+n+", size="+s+", delay="+o+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},WF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u=i+".scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u=i+".scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},KF=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},JF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"x1",e.ORDER_ATOMIC),s=e.valueToCode(this,"y1",e.ORDER_ATOMIC),o=e.valueToCode(this,"x2",e.ORDER_ATOMIC),_=e.valueToCode(this,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".line("+n+", "+s+", "+o+", "+_+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".line("+n+", "+s+", "+o+", "+_+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},QF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=this.getFieldValue("key"),o=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return e.definitions_.import_i2clcd="import i2clcd",i+" = i2clcd.LCD("+n+", lcd_width="+s+", i2c_addr="+o+")\n"},qF=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+",center = "+this.getFieldValue("center")+")\n"},zF=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".print("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},jF=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},$F=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},ZF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC),o=this.getFieldValue("driver"),_=lt.Boards.getSelectedBoardKey().split(":")[2],p="";return p=["mpython","mixgo_pe","mixgo_nova"].indexOf(_)>=0?"0x700000":["mixgo_sant"].indexOf(_)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+", address="+s+", font_address="+p+", types="+o+")\n"},tP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},eP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+")\n"},iP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},nP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},sP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},oP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},_P=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},pP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},aP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},uP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},rP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},dP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},lP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"w",e.ORDER_ATOMIC),_=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=t.getFieldValue("state");return i+"."+t.getFieldValue("shape")+"("+n+", "+s+", "+o+", "+_+", "+p+")\n"+i+".show()\n"},IP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"length",e.ORDER_ATOMIC),_=t.getFieldValue("state");return i+"."+("0"==t.getFieldValue("dir_h_v")?"v":"h")+"line("+n+", "+s+", "+o+", "+_+")\n"+i+".show()\n"},TP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".line("+e.valueToCode(t,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y2",e.ORDER_ATOMIC)+", "+t.getFieldValue("state")+")\n"+i+".show()\n"},MP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("Python ESP32-S3"===lt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var s="onboard_tft.image("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff,sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n"}else if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled";s="oled.print("+n+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.shows("+n+")\n"}return s},hP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),o=this.getFieldValue("center");if("mixgo_sant"==i||"mixgo_nova"==i)return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+", space="+s+", center="+o+",sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n";if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled"}return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+", space="+s+", center="+o+")\n"},mP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var s="onboard_oled.frame("+n+")\n"}else if("Python ESP32-S3"===lt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";s="onboard_tft.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.frame("+n+")\n"}return s},EP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var o="onboard_oled.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", delay="+s+")\n"}else if("Python ESP32-S3"===lt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";o="onboard_tft.frame("+n+", size=5 , delay="+s+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";o="onboard_matrix.frame("+n+", delay="+s+")\n"}return o},OP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else if("Python ESP32-S3"===lt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";n="onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},RP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var _="onboard_oled.scroll("+n+", speed="+s+", space="+o+")\n"}else if("Python ESP32-S3"===lt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";_="onboard_tft.scroll("+n+", y=0, size=5, speed="+s+", space="+o+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";_="onboard_matrix.scroll("+n+", speed="+s+", space="+o+")\n"}return _},cP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u="onboard_tft.scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},gP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},CP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===lt.JSFuncs.getPlatform()){const i=t.getFieldValue("image").split(".");if(2!==i.length)throw Error("pin value error");e.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`;var n=i[1]}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix."+t.getFieldValue("image")}return[n,e.ORDER_ATOMIC]},SP=function(t,e){var i={"#000000":"0","#ff0000":"1"};function n(t){let e="";if(t.length%2==1&&(t="0"+t),t.length<8){let e=8-t.length;for(let i=1;i<=e;i++)t="0"+t}for(let i=1;i<=t.length;i++)i%2==0&&i!==t.length?e=e+t[i-1]+",0x":e+=t[i-1];return"0x"+e}let s=[];for(let e=0;e<12;e++){let o="",_=0,p=0;for(let n=0;n<32;n++)n<8?p=7-n:n<16?p=23-n:n<24?p=39-n:n<32&&(p=55-n),_+=Number(i[t.getFieldValue(e+"-"+n)])*Math.pow(2,31-p);o+=n(_.toString(16)),s.unshift(o)}let o=[];for(let t=0;t>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},av=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.picture("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"direct",e.ORDER_ASSIGNMENT)+")\n"},uv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=this.getFieldValue("center"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True",r=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==r.slice(0,2))var d="onboard_tft.shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+a+", color="+r+",sync="+u+")\n";else{const t=r.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");d="onboard_tft.shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+a+", color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+",sync="+u+")\n"}return d},rv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==_.slice(0,2))var p="onboard_tft.frame("+n+", size="+s+", delay="+o+", color="+_+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.frame("+n+", size="+s+", delay="+o+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},dv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"w",e.ORDER_ATOMIC),_=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=t.getFieldValue("shape"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var r="onboard_tft."+a+"("+n+", "+s+", "+o+", "+_+", "+p+",sync="+u+")\n";else{const t=p.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r="onboard_tft."+a+"("+n+", "+s+", "+o+", "+_+", 0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+",sync="+u+")\n"}return r},lv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"length",e.ORDER_ATOMIC),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("dir_h_v"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+o+", "+_+",sync="+a+")\n";else{const t=_.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},Iv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x1",e.ORDER_ATOMIC),s=e.valueToCode(t,"y1",e.ORDER_ATOMIC),o=e.valueToCode(t,"x2",e.ORDER_ATOMIC),_=e.valueToCode(t,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.line("+n+", "+s+", "+o+", "+_+", "+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.line("+n+", "+s+", "+o+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},Tv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},Mv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),_=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var p="onboard_tft.pixel(int("+n+"), int("+s+"), "+o+",sync="+_+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+",sync="+_+")\n"}return p},hv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==n.slice(0,2))var o="onboard_tft.fill("+n+",sync="+s+")\n";else{const t=n.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o="onboard_tft.fill(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+",sync="+s+")\n"}return o},mv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=_+"=Clock("+n+", "+s+", "+o+", "+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=_+"=Clock("+n+", "+s+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},Ev=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},Ov=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_time("+e.valueToCode(this,"h",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"m",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"s",e.ORDER_ASSIGNMENT)+")\n"},Rv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},cv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2))var o=n+".clear("+s+")\n";else{const t=s.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o=n+".clear(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+")\n"}return o},gv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"r",e.ORDER_ATOMIC),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("shape"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var u="onboard_tft.ellipse("+n+", "+s+", "+o+", "+o+", "+_+", "+p+",sync="+a+")\n";else{const t=_.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.ellipse("+n+", "+s+", "+o+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+", "+p+",sync="+a+")\n"}return u},Cv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===lt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n="onboard_tft.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}return n},Sv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2));else{const t=s.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)}return"onboard_tft.pointern(angle="+n+")\n"},Av=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.texts("+n+", x="+s+", y="+o+", size="+_+", color="+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.texts("+n+", x="+s+", y="+o+", size="+_+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},Lv=MP,Nv=YP,Dv=FP,fv=YP,Fv=XP,Pv=LP,vv=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},Yv=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},Xv=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},UV=function(){return"control.reset()\n"},wV=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||lt.Profile.default.serial)+")\n"},HV=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||lt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||lt.Profile.default.serial)+")\n"},kV=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||lt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||lt.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},WV=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},KV=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},JV=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},QV=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},qV=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},zV=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},jV=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},$V=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},ZV=function(){return"while True:\n pass\n"},tB=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},eB=function(t,e){return e.definitions_.import_os="import os","os.uname()"},iB=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},nB=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},sB=function(t,e){return e.definitions_.import_mixgo="import mixgo",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period="+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=Timer."+(e.valueToCode(this,"mode",e.ORDER_NONE)||"None")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},oB=function(t,e){return e.definitions_.import_machine="import machine",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period = "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=machine.Timer."+this.getFieldValue("mode")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},_B=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},pB=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},aB=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},uB=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},rB=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},dB=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},lB=pB,IB=oB,TB=_B,MB=iB,hB=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},mB=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},EB=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api.weather_hourly("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"hour",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},OB=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")\n"},RB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_now.analysis()";else n='Weather_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},cB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Air_now.analysis()";else n='Air_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},gB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_alarm.analysis()";else n='Weather_alarm.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},CB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Life_suggestion.analysis()";else n='Life_suggestion.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},SB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Tide_daily.analysis()";else n='Tide_daily.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},AB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Location_search.analysis()";else n='Location_search.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},LB=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")\n"},NB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Weather_daily.analysis("+n+")";else s="Weather_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},DB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Air_daily.analysis("+n+")";else s="Air_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},fB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_sun.analysis("+n+")";else s="Geo_sun.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},FB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_moon.analysis("+n+")";else s="Geo_moon.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},PB=new dt.Generator("Python");PB.INDENT=" ",PB.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),PB.ORDER_ATOMIC=0,PB.ORDER_COLLECTION=1,PB.ORDER_STRING_CONVERSION=1,PB.ORDER_UNARY_POSTFIX=1,PB.ORDER_UNARY_PREFIX=2,PB.ORDER_MEMBER=2.1,PB.ORDER_FUNCTION_CALL=2.2,PB.ORDER_EXPONENTIATION=3,PB.ORDER_UNARY_SIGN=4,PB.ORDER_BITWISE_NOT=4,PB.ORDER_MULTIPLICATIVE=5,PB.ORDER_ADDITIVE=6,PB.ORDER_BITWISE_SHIFT=7,PB.ORDER_BITWISE_AND=8,PB.ORDER_BITWISE_XOR=9,PB.ORDER_BITWISE_OR=10,PB.ORDER_RELATIONAL=11,PB.ORDER_EQUALITY=11,PB.ORDER_LOGICAL_NOT=12,PB.ORDER_LOGICAL_AND=13,PB.ORDER_LOGICAL_OR=14,PB.ORDER_ASSIGNMENT=14,PB.ORDER_CONDITIONAL=15,PB.ORDER_LAMBDA=16,PB.ORDER_NONE=99,PB.ORDER_OVERRIDES=[[PB.ORDER_FUNCTION_CALL,PB.ORDER_MEMBER],[PB.ORDER_FUNCTION_CALL,PB.ORDER_FUNCTION_CALL],[PB.ORDER_MEMBER,PB.ORDER_MEMBER],[PB.ORDER_MEMBER,PB.ORDER_FUNCTION_CALL]],PB.init=function(){PB.PASS=this.INDENT+"pass\n",PB.definitions_=Object.create(null),PB.functionNames_=Object.create(null),PB.setups_=Object.create(null),PB.loops_=Object.create(null),PB.codeEnd_=Object.create(null),PB.variableDB_?PB.variableDB_.reset():PB.variableDB_=new ht(PB.RESERVED_WORDS_)},PB.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var o=this.definitions_[s];0===s.indexOf("import")?e.push(o):0===s.indexOf("var_declare")?i.push(o):n.push(o)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var _=[];for(var s in PB.functions_)_.push(PB.functions_[s]);_.length&&_.push("\n");var p=[];for(var s in PB.setups_)p.push(PB.setups_[s]);p.length&&p.push("\n");var a=[];for(var s in PB.loops_)a.push(PB.loops_[s]);var u=[];for(var s in PB.codeEnd_)u.push(PB.codeEnd_[s]);0!==u.length&&u.push("\n");let r="";return r=a.length>0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+u.join("\n"),r},PB.scrubNakedValue=function(t){return t+"\n"},PB.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},PB.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},PB.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=dt.utils.string.wrap(o,PB.COMMENT_WRAP-3),n+=PB.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const vB={};vB.MixGo={description:"MicroPython[ESP32 MixGo]",digital_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["39","39"]],digital:[["pin0","pin0"],["pin2","pin2"],["pin4","pin4"],["pin5","pin5"],["pin12","pin12"],["pin13","pin13"],["pin14","pin14"],["pin15","pin15"],["pin16","pin16"],["pin17","pin17"],["pin18","pin18"],["pin19","pin19"],["pin21","pin21"],["pin22","pin22"],["pin23","pin23"],["pin25","pin25"],["pin26","pin26"],["pin27","pin27"],["pin32","pin32"],["pin33","pin33"],["pin34","pin34"],["pin35","pin35"],["pin36","pin36"],["pin39","pin39"]],input_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["39","39"]],output_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm:[["pwm0","pwm0"],["pwm2","pwm2"],["pwm4","pwm4"],["pwm5","pwm5"],["pwm12","pwm12"],["pwm13","pwm13"],["pwm14","pwm14"],["pwm15","pwm15"],["pwm16","pwm16"],["pwm17","pwm17"],["pwm18","pwm18"],["pwm19","pwm19"],["pwm20","pwm20"],["pwm21","pwm21"],["pwm22","pwm22"],["pwm23","pwm23"],["pwm25","pwm25"],["pwm26","pwm26"],["pwm27","pwm27"],["pwm32","pwm32"],["pwm33","pwm33"]],analog_pin:[["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],analog:[["adc32","adc32"],["adc33","adc33"],["adc34","adc34"],["adc35","adc35"],["adc36","adc36"],["adc37","adc37"],["adc38","adc38"],["adc39","adc39"]],espnow_channel:lt.Profile.generate(["1-13"]),haskylens_model:lt.Profile.generate(["0-4"]),dac_pin:[["25","25"],["26","26"]],dac:[["dac25","dac25"],["dac26","dac26"]],touch:[["tc0","tc0"],["tc2","tc2"],["tc4","tc4"],["tc12","tc12"],["tc13","tc13"],["tc14","tc14"],["tc15","tc15"],["tc27","tc27"],["tc32","tc32"],["tc33","tc33"]],touch_pin:[["0","0"],["2","2"],["4","4"],["12","12"],["13","13"],["14","14"],["15","15"],["27","27"],["32","32"],["33","33"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],tts_voice:lt.Profile.generate(["0-16"]),tts_builtin_music:lt.Profile.generate(["0-47"]),tts_bgmusic:lt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["onboard_music_QUAVERS","onboard_matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","onboard_matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","onboard_matrix.onboard_music_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]]},vB["MixGo PE"]={description:"MicroPython[ESP32 MixGo PE]",digital_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],digital:[["pin0","pin0"],["pin2","pin2"],["pin4","pin4"],["pin5","pin5"],["pin7","pin7"],["pin8","pin8"],["pin12","pin12"],["pin13","pin13"],["pin14","pin14"],["pin15","pin15"],["pin19","pin19"],["pin20","pin20"],["pin21","pin21"],["pin22","pin22"],["pin25","pin25"],["pin26","pin26"],["pin27","pin27"],["pin32","pin32"],["pin33","pin33"],["pin34","pin34"],["pin35","pin35"],["pin36","pin36"],["pin37","pin37"],["pin38","pin38"],["pin39","pin39"]],input_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],output_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm:[["pwm0","pwm0"],["pwm2","pwm2"],["pwm4","pwm4"],["pwm5","pwm5"],["pwm7","pwm7"],["pwm8","pwm8"],["pwm12","pwm12"],["pwm13","pwm13"],["pwm14","pwm14"],["pwm15","pwm15"],["pwm19","pwm19"],["pwm20","pwm20"],["pwm21","pwm21"],["pwm22","pwm22"],["pwm25","pwm25"],["pwm26","pwm26"],["pwm27","pwm27"],["pwm32","pwm32"],["pwm33","pwm33"]],espnow_channel:lt.Profile.generate(["1-13"]),haskylens_model:lt.Profile.generate(["0-4"]),analog_pin:[["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],analog:[["adc32","adc32"],["adc33","adc33"],["adc34","adc34"],["adc35","adc35"],["adc36","adc36"],["adc37","adc37"],["adc38","adc38"],["adc39","adc39"]],dac_pin:[["25","25"],["26","26"]],dac:[["dac25","dac25"],["dac26","dac26"]],touch:[["tc0","tc0"],["tc2","tc2"],["tc4","tc4"],["tc12","tc12"],["tc13","tc13"],["tc14","tc14"],["tc15","tc15"],["tc27","tc27"],["tc32","tc32"],["tc33","tc33"]],touch_pin:[["0","0"],["2","2"],["4","4"],["12","12"],["13","13"],["14","14"],["15","15"],["27","27"],["32","32"],["33","33"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:lt.Profile.generate(["0-7"]),exlcdv:lt.Profile.generate(["0-4"]),brightness:lt.Profile.generate(["0-9"]),tts_voice:lt.Profile.generate(["0-16"]),tts_builtin_music:lt.Profile.generate(["0-47"]),tts_bgmusic:lt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["MUSIC_QUAVERS","onboard_matrix.MUSIC_QUAVERS"],["MUSIC_QUAVER","onboard_matrix.MUSIC_QUAVER"],["MUSIC_CROTCHET","onboard_matrix.MUSIC_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]]},vB["ESP32 Generic(4MB)"]={description:"MicroPython[ESP32 Generic]",digital_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],digital:[["pin0","pin0"],["pin2","pin2"],["pin4","pin4"],["pin5","pin5"],["pin6","pin6"],["pin7","pin7"],["pin8","pin8"],["pin9","pin9"],["pin10","pin10"],["pin11","pin11"],["pin12","pin12"],["pin13","pin13"],["pin14","pin14"],["pin15","pin15"],["pin16","pin16"],["pin17","pin17"],["pin18","pin18"],["pin19","pin19"],["pin20","pin20"],["pin21","pin21"],["pin22","pin22"],["pin23","pin23"],["pin25","pin25"],["pin26","pin26"],["pin27","pin27"],["pin32","pin32"],["pin33","pin33"],["pin34","pin34"],["pin35","pin35"],["pin36","pin36"],["pin37","pin37"],["pin38","pin38"],["pin39","pin39"]],input_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],output_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm:[["pwm0","pwm0"],["pwm2","pwm2"],["pwm4","pwm4"],["pwm5","pwm5"],["pwm12","pwm12"],["pwm13","pwm13"],["pwm14","pwm14"],["pwm15","pwm15"],["pwm16","pwm16"],["pwm17","pwm17"],["pwm18","pwm18"],["pwm19","pwm19"],["pwm20","pwm20"],["pwm21","pwm21"],["pwm22","pwm22"],["pwm23","pwm23"],["pwm25","pwm25"],["pwm26","pwm26"],["pwm27","pwm27"],["pwm32","pwm32"],["pwm33","pwm33"]],analog_pin:[["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],analog:[["adc32","adc32"],["adc33","adc33"],["adc34","adc34"],["adc35","adc35"],["adc36","adc36"],["adc37","adc37"],["adc38","adc38"],["adc39","adc39"]],espnow_channel:lt.Profile.generate(["1-13"]),haskylens_model:lt.Profile.generate(["0-4"]),dac_pin:[["25","25"],["26","26"]],dac:[["dac25","dac25"],["dac26","dac26"]],touch:[["tc0","tc0"],["tc2","tc2"],["tc4","tc4"],["tc12","tc12"],["tc13","tc13"],["tc14","tc14"],["tc15","tc15"],["tc27","tc27"],["tc32","tc32"],["tc33","tc33"]],touch_pin:[["0","0"],["2","2"],["4","4"],["12","12"],["13","13"],["14","14"],["15","15"],["27","27"],["32","32"],["33","33"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],tts_voice:lt.Profile.generate(["0-16"]),tts_builtin_music:lt.Profile.generate(["0-47"]),tts_bgmusic:lt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["onboard_music_QUAVERS","onboard_matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","onboard_matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","onboard_matrix.onboard_music_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]]},vB.mPython={description:"MicroPython[ESP32 Generic]",digital_pin:[["p0","33"],["p1","32"],["p2","35"],["p5","0"],["p6","16"],["p7","17"],["p8","26"],["p9","25"],["p11","2"],["p13","18"],["p14","19"],["p15","21"],["p16","5"],["p19","22"],["p20","23"]],digital:[["pin0","pin33"],["pin1","pin32"],["pin2","pin35"],["pin5","pin0"],["pin6","pin16"],["pin7","pin17"],["pin8","pin26"],["pin9","pin25"],["pin11","pin2"],["pin13","pin18"],["pin14","pin19"],["pin15","pin21"],["pin16","pin5"],["pin19","pin22"],["pin20","pin23"]],input_pin:[["p0","33"],["p1","32"],["p2","35"],["p5","0"],["p6","16"],["p7","17"],["p8","26"],["p9","25"],["p11","2"],["p13","18"],["p14","19"],["p15","21"],["p16","5"],["p19","22"],["p20","23"]],output_pin:[["p0","33"],["p1","32"],["p5","0"],["p6","16"],["p7","17"],["p8","26"],["p9","25"],["p11","2"],["p13","18"],["p14","19"],["p15","21"],["p16","5"],["p19","22"],["p20","23"]],pwm_pin:[["p0","33"],["p1","32"],["p5","0"],["p6","16"],["p7","17"],["p8","26"],["p9","25"],["p11","2"],["p13","18"],["p14","19"],["p15","21"],["p16","5"],["p19","22"],["p20","23"]],pwm:[["pwm0","pwm33"],["pwm1","pwm32"],["pwm5","pwm0"],["pwm6","pwm16"],["pwm7","pwm17"],["pwm8","pwm26"],["pwm9","pwm25"],["pwm11","pwm2"],["pwm13","pwm18"],["pwm14","pwm19"],["pwm15","pwm21"],["pwm16","pwm5"],["pwm19","pwm22"],["pwm20","pwm23"]],espnow_channel:lt.Profile.generate(["1-13"]),haskylens_model:lt.Profile.generate(["0-4"]),analog_pin:[["p0","33"],["p1","32"],["p2","35"],["p3","34"],["p4","39"],["p10","36"]],analog:[["adc0","adc33"],["adc1","adc32"],["adc2","adc35"],["adc3","adc34"],["adc4","adc39"],["adc10","adc36"]],dac_pin:[["p8","26"],["p9","25"]],dac:[["dac8","dac26"],["dac9","dac25"]],touch_mpython:[["p","p"],["y","y"],["t","t"],["h","h"],["o","o"],["n","n"]],touch:[["tc0","tc33"],["tc1","tc32"],["tc5","tc0"],["tc11","tc2"],["tc23","tc27"],["tc24","tc14"],["tc25","tc12"],["tc26","tc13"],["tc27","tc15"],["tc28","tc4"]],touch_pin:[["p0","33"],["p1","32"],["p5","0"],["p11","2"],["p23","27"],["p24","14"],["p25","12"],["p26","13"],["p27","15"],["p28","4"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],tts_voice:lt.Profile.generate(["0-16"]),tts_builtin_music:lt.Profile.generate(["0-47"]),tts_bgmusic:lt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["onboard_music_QUAVERS","onboard_matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","onboard_matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","onboard_matrix.onboard_music_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]]};const YB=vB,XB=230,xB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.digital),"PIN"),this.setOutput(!0)}},bB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},yB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},VB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},BB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.touch_mpython),"PIN"),this.setOutput(!0,Number)}},GB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},UB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},wB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},HB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},kB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},WB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},KB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},JB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},QB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},qB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},zB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},jB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},$B={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.analog),"PIN"),this.setOutput(!0)}},ZB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},tG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.dac),"PIN"),this.setOutput(!0)}},eG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},iG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},nG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},sG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},oG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},_G={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.touch),"PIN"),this.setOutput(!0)}},pG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},aG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},uG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},rG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},dG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},lG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},IG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},TG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},MG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},hG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},mG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},EG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},OG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},RG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},cG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},gG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},CG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},SG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},AG=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},LG=AG,NG=AG,DG=AG,fG=AG,FG=AG,PG=AG,vG=AG,YG=AG,XG=AG,xG=AG,bG=AG,yG=AG,VG=AG,BG=AG,GG=AG,UG=AG,wG=AG,HG=AG,kG=AG,WG=AG,KG=AG,JG=AG,QG=AG,qG=AG,zG=AG,jG=AG,$G=AG,ZG=AG,tU=AG,eU=AG,iU=AG,nU=AG,sU=AG,oU=AG;Object.assign(dt.Variables,Tt),Object.assign(dt.Procedures,Lu),dt.Python=Nu,dt.generator=Nu,lt.Profile.default={},Object.assign(lt.Profile,YB),Object.assign(lt.Profile.default,YB["ESP32 Generic"]),Object.assign(dt.Blocks,e,i,n,s,o,_,p,a,u,r,d,l,I,b,H,w,v,y,k,f,U,G,B,V,F,D,N,X,Y,x,P,ut),Object.assign(dt.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,tt,pt,_t,z,et,at,J,ot,st,nt,it,Q,K,W,$,j,Z,q,rt)})(); \ No newline at end of file diff --git a/boards/default/micropython_esp32/main.bundle.7a97b42c.js b/boards/default/micropython_esp32/main.bundle.7a97b42c.js deleted file mode 100644 index ed386898..00000000 --- a/boards/default/micropython_esp32/main.bundle.7a97b42c.js +++ /dev/null @@ -1,21 +0,0 @@ -(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>gt,controls_typeLists:()=>Ct,lists_zip:()=>St,lists_zip_container:()=>At,lists_zip_item:()=>Lt,unpack_iterable_object:()=>Nt,variables_change:()=>Rt,variables_get:()=>Et,variables_global:()=>ct,variables_set:()=>Ot});var i={};t.r(i),t.d(i,{base_setup:()=>Ft,controls_delay:()=>Pt,controls_end_program:()=>vt,controls_except:()=>Wt,controls_finally:()=>Kt,controls_flow_statements:()=>Vt,controls_for:()=>Bt,controls_forEach:()=>xt,controls_for_range:()=>Gt,controls_if:()=>Yt,controls_if_else:()=>Ht,controls_if_elseif:()=>wt,controls_if_if:()=>Ut,controls_lambda:()=>Qt,controls_main:()=>ft,controls_pass:()=>qt,controls_range:()=>Xt,controls_repeat_ext:()=>Jt,controls_thread:()=>zt,controls_try:()=>kt,controls_try_finally:()=>yt,controls_whileUntil:()=>bt,datetime_fromtimestamp:()=>ie,do_while:()=>jt,garbage_collection:()=>$t,gene_unique_identifier:()=>ne,get_mem_alloc:()=>Zt,get_mem_free:()=>te,get_unique_identifier:()=>ee});var n={};t.r(n),t.d(n,{base_map:()=>Se,generate_cartesian_product:()=>Le,math_arithmetic:()=>ae,math_bit:()=>re,math_constant:()=>_e,math_constant_mp:()=>pe,math_constrain:()=>me,math_dec:()=>le,math_degree_to_radian:()=>De,math_indexer_number:()=>Oe,math_map:()=>Ee,math_max_min:()=>Te,math_number:()=>oe,math_number_base_conversion:()=>Me,math_radian_to_degree:()=>Ne,math_random:()=>he,math_random_seed:()=>Re,math_round:()=>ce,math_selfcalcu:()=>ue,math_to_int:()=>Ie,math_trig:()=>de,text_to_number:()=>ge,text_to_number_skulpt:()=>Ce,turn_to_int:()=>Ae});var s={};t.r(s),t.d(s,{ascii_to_char:()=>Xe,char_to_ascii:()=>xe,number_to_text:()=>be,os_system:()=>pi,text:()=>Fe,text_capital:()=>We,text_center:()=>Ke,text_char:()=>ve,text_char_at:()=>Be,text_char_at2:()=>Ve,text_char_at3:()=>ni,text_compareTo:()=>ii,text_compare_to:()=>ke,text_create_with_container:()=>Ze,text_create_with_item:()=>ti,text_encode:()=>oi,text_equals_starts_ends:()=>He,text_eval:()=>_i,text_find:()=>Je,text_format:()=>$e,text_format_noreturn:()=>si,text_join:()=>Ye,text_join_seq:()=>Qe,text_length:()=>ye,text_random_char:()=>Ge,text_replace:()=>qe,text_split:()=>ze,text_strip:()=>je,text_substring:()=>we,text_substring2:()=>Ue,text_substring3:()=>ei,text_textarea:()=>Pe});var o={};t.r(o),t.d(o,{ENUMERATE:()=>Hi,content_in_lists:()=>Wi,enumerate:()=>ki,list_many_input:()=>Fi,list_tolist:()=>Xi,list_tolist2:()=>wi,list_trig:()=>Ni,lists_2d_get_col_row_data:()=>li,lists_2d_get_data_with_col_row:()=>di,lists_append_extend:()=>Ei,lists_change_to:()=>fi,lists_change_to_general:()=>vi,lists_clear:()=>Ci,lists_create_with:()=>Ii,lists_create_with2:()=>xi,lists_create_with_container:()=>Mi,lists_create_with_item:()=>hi,lists_create_with_noreturn:()=>Pi,lists_create_with_text:()=>Ti,lists_create_with_text2:()=>bi,lists_del_general:()=>Yi,lists_find:()=>Li,lists_getIndex3:()=>yi,lists_getSublist3:()=>Vi,lists_get_index:()=>ui,lists_get_random_item:()=>Oi,lists_get_random_sublist:()=>Ri,lists_get_sublist:()=>ri,lists_insert_value:()=>ci,lists_insert_value2:()=>Gi,lists_pop:()=>Ai,lists_remove_at:()=>Si,lists_remove_at2:()=>Ui,lists_reverse:()=>gi,lists_setIndex3:()=>Bi,lists_set_index:()=>mi,lists_sort:()=>Di});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>an,dicts_add_or_change:()=>Zi,dicts_clear:()=>nn,dicts_create_with:()=>Ji,dicts_create_with_container:()=>Qi,dicts_create_with_item:()=>qi,dicts_create_with_noreturn:()=>dn,dicts_deldict:()=>pn,dicts_delete:()=>tn,dicts_get:()=>ji,dicts_get_default:()=>$i,dicts_items:()=>sn,dicts_keys:()=>zi,dicts_length:()=>_n,dicts_pop:()=>un,dicts_setdefault:()=>rn,dicts_to_json:()=>In,dicts_to_json2:()=>hn,dicts_to_to:()=>Mn,dicts_todict:()=>ln,dicts_update:()=>en,dicts_values:()=>on,json_to_dicts:()=>Tn});var p={};t.r(p),t.d(p,{logic_boolean:()=>gn,logic_compare:()=>En,logic_compare_continous:()=>On,logic_is:()=>Ln,logic_is_in:()=>An,logic_negate:()=>cn,logic_null:()=>Cn,logic_operation:()=>Rn,logic_tobool:()=>Nn,logic_true_or_false:()=>Sn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>zn,sdcard_use_spi_init:()=>qn,storage_can_write_ornot:()=>bn,storage_change_dir:()=>Jn,storage_close_file:()=>Vn,storage_delete_file:()=>Gn,storage_file_seek:()=>Hn,storage_file_tell:()=>wn,storage_file_write:()=>vn,storage_fileopen:()=>fn,storage_fileopen_new:()=>Fn,storage_fileopen_new_encoding:()=>Pn,storage_get_a_line:()=>xn,storage_get_contents:()=>Xn,storage_get_contents_without_para:()=>Yn,storage_get_current_dir:()=>kn,storage_get_file_size:()=>Un,storage_get_filename:()=>yn,storage_is_file:()=>Qn,storage_list_all_files:()=>Bn,storage_make_dir:()=>Wn,storage_open_file_with_os:()=>Dn,storage_rename:()=>Kn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>es,procedures_callreturn:()=>is,procedures_defnoreturn:()=>jn,procedures_defreturn:()=>$n,procedures_ifreturn:()=>ns,procedures_mutatorarg:()=>ts,procedures_mutatorcontainer:()=>Zn,procedures_return:()=>ss});var r={};t.r(r),t.d(r,{tuple_change_to:()=>hs,tuple_create_with:()=>_s,tuple_create_with_container:()=>ps,tuple_create_with_item:()=>as,tuple_create_with_noreturn:()=>Rs,tuple_create_with_text2:()=>us,tuple_create_with_text_return:()=>rs,tuple_del:()=>Is,tuple_find:()=>ms,tuple_getIndex:()=>ds,tuple_getSublist:()=>Os,tuple_get_random_item:()=>gs,tuple_get_sublist:()=>cs,tuple_input:()=>Ss,tuple_join:()=>Ts,tuple_length:()=>ls,tuple_max:()=>Ms,tuple_totuple:()=>Cs,tuple_trig:()=>Es});var d={};t.r(d),t.d(d,{set_add_discard:()=>Xs,set_clear:()=>Ps,set_create_with:()=>Ls,set_create_with_container:()=>Ns,set_create_with_item:()=>Ds,set_create_with_text_return:()=>ys,set_length:()=>fs,set_operate:()=>vs,set_operate_update:()=>Ys,set_pop:()=>Fs,set_sub:()=>xs,set_toset:()=>Vs,set_update:()=>bs});var l={};t.r(l),t.d(l,{html_content:()=>Hs,html_content_more:()=>ks,html_document:()=>Gs,html_form:()=>Ks,html_head_body:()=>ws,html_style:()=>Ws,html_style_color:()=>Qs,html_style_content:()=>Js,html_text:()=>qs,html_title:()=>Us});var I={};t.r(I),t.d(I,{attribute_access:()=>uo,function_call:()=>_o,function_call_container:()=>po,function_call_item:()=>ao,raw_block:()=>$s,raw_empty:()=>to,raw_expression:()=>Zs,raw_table:()=>js,text_comment:()=>eo,text_print_multiple:()=>no,text_print_multiple_container:()=>so,text_print_multiple_item:()=>oo,type_check:()=>io});var T={};t.r(T),t.d(T,{controls_type:()=>Mo,controls_typeLists:()=>ho,lists_zip:()=>mo,unpack_iterable_object:()=>Eo,variables_change:()=>Io,variables_get:()=>ro,variables_global:()=>To,variables_set:()=>lo});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>Do,base_setup:()=>Ro,controls_delay:()=>No,controls_flow_statements:()=>Lo,controls_for:()=>Co,controls_forEach:()=>Yo,controls_for_range:()=>So,controls_if:()=>co,controls_interrupts:()=>Po,controls_lambda:()=>xo,controls_main:()=>Oo,controls_millis:()=>fo,controls_nointerrupts:()=>vo,controls_pass:()=>yo,controls_range:()=>Xo,controls_repeat:()=>Wo,controls_repeat_ext:()=>Go,controls_thread:()=>Vo,controls_try_finally:()=>go,controls_whileUntil:()=>Ao,datetime_fromtimestamp:()=>Ko,do_while:()=>Bo,garbage_collection:()=>Uo,gene_unique_identifier:()=>Jo,get_mem_alloc:()=>wo,get_mem_free:()=>Ho,get_unique_identifier:()=>ko,reset:()=>Fo,time_sleep:()=>bo});var h={};t.r(h),t.d(h,{base_map:()=>T_,generate_cartesian_product:()=>h_,math_arithmetic:()=>$o,math_bit:()=>jo,math_constant:()=>qo,math_constant_mp:()=>zo,math_constrain:()=>p_,math_dec:()=>i_,math_degree_to_radian:()=>E_,math_indexer_number:()=>r_,math_map:()=>__,math_max_min:()=>s_,math_number:()=>Qo,math_number_base_conversion:()=>a_,math_radian_to_degree:()=>m_,math_random:()=>o_,math_random_seed:()=>u_,math_round:()=>d_,math_selfcalcu:()=>Zo,math_single:()=>t_,math_to_int:()=>n_,math_trig:()=>e_,text_to_number:()=>l_,text_to_number_skulpt:()=>I_,turn_to_int:()=>M_});var m={};t.r(m),t.d(m,{ascii_to_char:()=>C_,char_to_ascii:()=>S_,number_to_text:()=>A_,os_system:()=>Q_,text:()=>O_,text_capital:()=>X_,text_center:()=>x_,text_char:()=>c_,text_char_at:()=>D_,text_char_at2:()=>N_,text_char_at3:()=>W_,text_compareTo:()=>k_,text_compare_to:()=>P_,text_encode:()=>K_,text_equals_starts_ends:()=>F_,text_eval:()=>J_,text_find:()=>b_,text_format:()=>U_,text_format_noreturn:()=>w_,text_join:()=>g_,text_join_seq:()=>y_,text_length:()=>L_,text_random_char:()=>f_,text_replace:()=>V_,text_split:()=>B_,text_strip:()=>G_,text_substring:()=>Y_,text_substring2:()=>v_,text_substring3:()=>H_,text_textarea:()=>R_});var E={};t.r(E),t.d(E,{content_in_lists:()=>Dp,enumerate:()=>Np,list_many_input:()=>Tp,list_tolist:()=>Ap,list_tolist2:()=>Lp,list_trig:()=>dp,lists_2d_get_col_row_data:()=>j_,lists_2d_get_data_with_col_row:()=>z_,lists_append_extend:()=>ip,lists_change_to:()=>Ip,lists_change_to_general:()=>hp,lists_clear:()=>pp,lists_create_with:()=>$_,lists_create_with2:()=>Ep,lists_create_with_noreturn:()=>Mp,lists_create_with_text:()=>Z_,lists_create_with_text2:()=>Op,lists_del_general:()=>mp,lists_find:()=>ap,lists_getIndex3:()=>Rp,lists_getSublist3:()=>cp,lists_get_index:()=>tp,lists_get_random_item:()=>np,lists_get_random_sublist:()=>sp,lists_get_sublist:()=>q_,lists_insert_value:()=>op,lists_insert_value2:()=>Cp,lists_pop:()=>rp,lists_remove_at:()=>up,lists_remove_at2:()=>Sp,lists_reverse:()=>_p,lists_setIndex3:()=>gp,lists_set_index:()=>ep,lists_sort:()=>lp});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Up,dicts_add_or_change:()=>Yp,dicts_clear:()=>bp,dicts_create_with:()=>fp,dicts_create_with_noreturn:()=>kp,dicts_deldict:()=>Gp,dicts_delete:()=>Xp,dicts_get:()=>Pp,dicts_get_default:()=>vp,dicts_items:()=>yp,dicts_keys:()=>Fp,dicts_length:()=>Bp,dicts_pop:()=>wp,dicts_setdefault:()=>Hp,dicts_to_json:()=>Kp,dicts_to_json2:()=>qp,dicts_to_to:()=>Qp,dicts_todict:()=>Wp,dicts_update:()=>xp,dicts_values:()=>Vp,json_to_dicts:()=>Jp});var R={};t.r(R),t.d(R,{logic_boolean:()=>ta,logic_compare:()=>zp,logic_compare_continous:()=>jp,logic_is:()=>sa,logic_is_in:()=>na,logic_negate:()=>Zp,logic_null:()=>ea,logic_operation:()=>$p,logic_tobool:()=>oa,logic_true_or_false:()=>ia});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Da,sdcard_use_spi_init:()=>Na,storage_can_write_ornot:()=>Ta,storage_change_dir:()=>ga,storage_close_file:()=>ha,storage_delete_file:()=>Ea,storage_file_seek:()=>ca,storage_file_tell:()=>Ra,storage_file_write:()=>ra,storage_fileopen:()=>pa,storage_fileopen_new:()=>aa,storage_fileopen_new_encoding:()=>ua,storage_get_a_line:()=>Ia,storage_get_contents:()=>la,storage_get_contents_without_para:()=>da,storage_get_current_dir:()=>Ca,storage_get_file_size:()=>Oa,storage_get_filename:()=>Ma,storage_is_file:()=>La,storage_list_all_files:()=>ma,storage_make_dir:()=>Sa,storage_open_file_with_os:()=>_a,storage_rename:()=>Aa});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>va,procedures_callreturn:()=>Pa,procedures_defnoreturn:()=>Fa,procedures_defreturn:()=>fa,procedures_ifreturn:()=>Ya,procedures_return:()=>Xa});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Ha,tuple_create_with:()=>xa,tuple_create_with_noreturn:()=>Ja,tuple_create_with_text2:()=>ba,tuple_create_with_text_return:()=>ya,tuple_del:()=>Ga,tuple_find:()=>ka,tuple_getIndex:()=>Va,tuple_getSublist:()=>Ka,tuple_get_random_item:()=>qa,tuple_get_sublist:()=>Qa,tuple_input:()=>ja,tuple_join:()=>Ua,tuple_length:()=>Ba,tuple_max:()=>wa,tuple_totuple:()=>za,tuple_trig:()=>Wa});var S={};t.r(S),t.d(S,{set_add_discard:()=>su,set_clear:()=>eu,set_create_with:()=>$a,set_create_with_text_return:()=>pu,set_length:()=>Za,set_operate:()=>iu,set_operate_update:()=>nu,set_pop:()=>tu,set_sub:()=>ou,set_toset:()=>au,set_update:()=>_u});var A={};t.r(A),t.d(A,{html_content:()=>lu,html_content_more:()=>Iu,html_document:()=>uu,html_form:()=>Mu,html_head_body:()=>du,html_style:()=>Tu,html_style_content:()=>hu,html_text:()=>mu,html_title:()=>ru});var L={};t.r(L),t.d(L,{attribute_access:()=>Su,function_call:()=>Cu,raw_block:()=>Eu,raw_empty:()=>Ru,raw_expression:()=>Ou,raw_table:()=>cu,type_check:()=>gu});var N={};t.r(N),t.d(N,{PIN_init:()=>fr,actuator_extern_get_led_bright:()=>Vu,actuator_extern_get_led_state:()=>Bu,actuator_extern_led_bright:()=>yu,actuator_extern_led_brightness:()=>Gu,actuator_ms32006_dcmotor:()=>qu,actuator_ms32006_init:()=>Qu,actuator_ms32006_stepper:()=>zu,actuator_neopixel_init:()=>ju,actuator_neopixel_rgb:()=>$u,actuator_neopixel_rgb_all:()=>Zu,actuator_neopixel_rgb_show_all_chase:()=>ir,actuator_neopixel_rgb_show_all_rainbow:()=>er,actuator_neopixel_write:()=>tr,actuator_use_uart_init:()=>nr,esp32_music_get_tempo_extern:()=>Xu,esp32_music_pitch:()=>Fu,esp32_music_pitch_init:()=>fu,esp32_music_pitch_with_time:()=>Pu,esp32_music_play_list:()=>vu,esp32_music_reset_extern:()=>xu,esp32_music_set_tempo_extern:()=>Yu,esp32_music_stop:()=>bu,mixbot_actuator_extern_get_addr:()=>Nr,mixbot_actuator_extern_set_addr:()=>Dr,mixbot_addr_extern:()=>Tr,parrot_PIN_init:()=>Yr,parrot_move_speed:()=>Xr,pin_led_bright:()=>Fr,player_insert_music:()=>ur,player_play_music:()=>ar,player_set_mode:()=>pr,player_set_play:()=>or,player_set_volume:()=>_r,player_whether_stop:()=>sr,robot_led_extern:()=>Er,robot_led_extern_get_value:()=>Or,robot_motor_extern:()=>Mr,robot_motor_extern_get_speed:()=>hr,robot_servo_extern_absolute_run:()=>Cr,robot_servo_extern_get_status:()=>Rr,robot_servo_extern_relative_continue:()=>Lr,robot_servo_extern_relative_origin:()=>Sr,robot_servo_extern_relative_run:()=>Ar,robot_servo_extern_stop:()=>gr,robot_servo_extern_stop_mode:()=>cr,robot_traffic_light_extern:()=>mr,servo_PIN_init:()=>Pr,servo_get_angle:()=>Ku,servo_get_speed:()=>Ju,servo_init:()=>Uu,servo_move:()=>wu,servo_move_angle:()=>vr,servo_set_angle:()=>ku,servo_set_speed:()=>Wu,servo_speed_360:()=>Hu,syn6288_builtin_voice:()=>lr,syn6288_get_voice:()=>dr,syn6288_set_voice:()=>rr,syn6288_tts_play:()=>Ir});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>ld,actuator_dc_motor_stop:()=>Id,actuator_get_led_bright:()=>Br,actuator_get_led_state:()=>Gr,actuator_led_bright:()=>Vr,actuator_led_brightness:()=>Ur,actuator_mixbot_buzzer_on_off:()=>Ed,actuator_mixgo_nova_mic_get:()=>Cd,actuator_mixgo_nova_mic_set:()=>gd,actuator_mixgo_nova_onboard_music_pitch:()=>fd,actuator_mixgo_nova_onboard_music_stop:()=>Fd,actuator_mixgo_nova_play_audio:()=>Nd,actuator_mixgo_nova_play_online_audio:()=>Dd,actuator_mixgo_nova_record_audio:()=>Ld,actuator_mixgo_nova_voice_get:()=>Ad,actuator_mixgo_nova_voice_set:()=>Sd,actuator_mixgo_zero_led_color:()=>wr,actuator_onboard_neopixel_rgb:()=>Qr,actuator_onboard_neopixel_rgb_all:()=>qr,actuator_onboard_neopixel_rgb_show_all_chase:()=>jr,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>zr,actuator_onboard_neopixel_write:()=>$r,actuator_rm_onboard_neopixel_rgb:()=>Zr,actuator_rm_onboard_neopixel_rgb_all:()=>td,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>ed,actuator_stepper_keep:()=>rd,actuator_stepper_stop:()=>dd,analog_ble_keyboard_init:()=>Hd,analog_ble_keyboard_input:()=>Kd,analog_ble_keyboard_mouse_init:()=>tl,analog_ble_keyboard_mouse_input:()=>sl,analog_ble_keyboard_mouse_send_battery:()=>nl,analog_ble_keyboard_mouse_str:()=>ol,analog_ble_keyboard_send_battery:()=>Qd,analog_ble_keyboard_str:()=>Jd,analog_ble_mouse_init:()=>qd,analog_ble_mouse_input:()=>$d,analog_ble_mouse_keyboard_input:()=>_l,analog_ble_mouse_send_battery:()=>Zd,analog_keyboard_input:()=>Xd,analog_keyboard_str:()=>wd,analog_mouse_input:()=>Gd,bitbot_motor:()=>cd,bitbot_move:()=>Od,bitbot_stop:()=>Rd,ble_keyboard_connect:()=>Wd,ble_keyboard_get_mac:()=>kd,ble_keyboard_mouse_connect:()=>il,ble_keyboard_mouse_get_mac:()=>el,ble_mouse_connect:()=>jd,ble_mouse_get_mac:()=>zd,cc_number:()=>Jr,educore_ble_keyboard_input:()=>hl,educore_ble_sensor_connected:()=>Ml,educore_ble_sensor_init:()=>Tl,educore_buzzer:()=>pl,educore_buzzer_play_tone:()=>al,educore_buzzer_play_tone_time:()=>ul,educore_buzzer_stop:()=>rl,educore_neopixel_clear:()=>Il,educore_neopixel_rgb:()=>ll,educore_rgb_light:()=>dl,esp32_music_get_tempo:()=>nd,esp32_music_reset:()=>sd,esp32_music_set_tempo:()=>id,esp32_onboard_music_pitch:()=>od,esp32_onboard_music_pitch_with_time:()=>_d,esp32_onboard_music_play_list:()=>ad,esp32_onboard_music_stop:()=>pd,general_key:()=>bd,general_key_tuple:()=>yd,generalkey_container:()=>Vd,generalkey_create_with_item:()=>Bd,get_keyboard_light:()=>ml,get_power_output:()=>vd,ledswitch:()=>yr,mixbot_motor:()=>md,mixbot_motor_status:()=>Td,mixbot_move:()=>Md,mixbot_stop:()=>hd,mouse_key:()=>Ud,number:()=>br,rm_actuator_get_led_bright:()=>kr,rm_actuator_get_led_state:()=>Wr,rm_actuator_led_bright:()=>Hr,rm_actuator_led_brightness:()=>Kr,rm_motor:()=>ud,set_all_power_output:()=>Yd,set_power_output:()=>Pd,special_key:()=>xd});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>jl,ai_sensor_ailocal_class:()=>Gl,ai_sensor_ailocal_class_result:()=>Ul,ai_sensor_ailocal_train:()=>Bl,ai_sensor_asr_recognize:()=>Kl,ai_sensor_audio_play:()=>Hl,ai_sensor_audio_record:()=>wl,ai_sensor_barcode:()=>Al,ai_sensor_circle:()=>Pl,ai_sensor_classifier_faces:()=>zl,ai_sensor_color:()=>xl,ai_sensor_color_chases:()=>Vl,ai_sensor_color_chases_result:()=>yl,ai_sensor_config:()=>Cl,ai_sensor_face:()=>ql,ai_sensor_find_20objects:()=>$l,ai_sensor_find_barcodes:()=>Ll,ai_sensor_find_circles:()=>vl,ai_sensor_find_colors:()=>bl,ai_sensor_find_licenseplates:()=>Ql,ai_sensor_find_lines:()=>Fl,ai_sensor_find_qrcodes:()=>gl,ai_sensor_find_rects:()=>Xl,ai_sensor_find_tags:()=>Dl,ai_sensor_licenseplate:()=>Jl,ai_sensor_line:()=>fl,ai_sensor_qrcode:()=>Rl,ai_sensor_qrcode_lite:()=>cl,ai_sensor_rect:()=>Yl,ai_sensor_rgb:()=>Sl,ai_sensor_tag:()=>Nl,ai_sensor_use_uart_init:()=>Ol,ai_sensor_yolo_recognize:()=>kl,ai_sensor_yolo_recognize_result:()=>Wl});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>eI,MICROPYTHON_AI_Speech_unit:()=>tI,MICROPYTHON_AI_client:()=>Zl});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>hI,mpython_blynk_app_notify:()=>uI,mpython_blynk_email:()=>lI,mpython_blynk_get_timers:()=>II,mpython_blynk_on_connected:()=>_I,mpython_blynk_on_disconnected:()=>oI,mpython_blynk_run:()=>aI,mpython_blynk_sensor_data_to_app:()=>MI,mpython_blynk_set_property:()=>dI,mpython_blynk_setup:()=>mI,mpython_blynk_stop_timers:()=>rI,mpython_blynk_sync_virtual:()=>sI,mpython_blynk_terminal_widget_vpin:()=>nI,mpython_blynktimer:()=>TI,mpython_blynktimer_run:()=>pI});var v={};t.r(v),t.d(v,{communicate_bluetooth_central_init:()=>ZI,communicate_bluetooth_connect:()=>nT,communicate_bluetooth_disconnect:()=>sT,communicate_bluetooth_handle:()=>uT,communicate_bluetooth_is_connected:()=>_T,communicate_bluetooth_mac:()=>iT,communicate_bluetooth_peripheral_init:()=>tT,communicate_bluetooth_recv:()=>pT,communicate_bluetooth_recv_only:()=>aT,communicate_bluetooth_scan:()=>eT,communicate_bluetooth_send:()=>oT,communicate_espnow_init:()=>rT,communicate_espnow_init_new:()=>dT,communicate_i2c_available:()=>xI,communicate_i2c_init:()=>cI,communicate_i2c_master_read:()=>XI,communicate_i2c_onboard:()=>OI,communicate_i2c_read:()=>gI,communicate_i2c_scan:()=>SI,communicate_i2c_write:()=>CI,communicate_ir_recv_init:()=>HI,communicate_ir_send_init:()=>QI,communicate_ow_init:()=>yI,communicate_ow_read:()=>BI,communicate_ow_reset:()=>wI,communicate_ow_scan:()=>VI,communicate_ow_select:()=>UI,communicate_ow_write:()=>GI,communicate_spi_buffer:()=>NI,communicate_spi_init:()=>AI,communicate_spi_onboard:()=>RI,communicate_spi_read:()=>DI,communicate_spi_read_output:()=>fI,communicate_spi_readinto:()=>FI,communicate_spi_readinto_output:()=>PI,communicate_spi_set:()=>LI,communicate_spi_write:()=>vI,communicate_spi_write_readinto:()=>YI,espnow_radio_channel:()=>mT,espnow_radio_channel_new:()=>OT,espnow_radio_on_off:()=>RT,espnow_radio_rec:()=>gT,espnow_radio_recv:()=>ST,espnow_radio_recv_certain_msg:()=>AT,espnow_radio_recv_certain_msg_new:()=>NT,espnow_radio_recv_msg:()=>CT,espnow_radio_recv_new:()=>LT,espnow_radio_send:()=>cT,espnow_radio_txpower:()=>ET,i2c_available:()=>qT,i2c_init:()=>xT,i2c_master_reader2:()=>QT,i2c_read:()=>bT,i2c_scan:()=>VT,i2c_slave_onreceive:()=>bI,i2c_write:()=>yT,internal_variable:()=>kI,ir_recv_timeout:()=>JI,ir_transmit_busy:()=>$I,ir_transmit_conventional_data:()=>qI,ir_transmit_raw_code:()=>jI,ir_transmit_study_code:()=>zI,ir_whether_recv:()=>KI,lora_init:()=>DT,lora_packet:()=>fT,lora_recv:()=>PT,lora_send:()=>FT,network_espnow_info:()=>IT,network_espnow_mac:()=>lT,network_espnow_recv:()=>TT,network_espnow_recv_handle:()=>hT,network_espnow_send:()=>MT,recv_fun:()=>WI,spi_buffer:()=>UT,spi_init:()=>BT,spi_read:()=>wT,spi_read_output:()=>HT,spi_readinto:()=>kT,spi_readinto_output:()=>WT,spi_set:()=>GT,spi_write:()=>KT,spi_write_readinto:()=>JT,urequests_attribute:()=>YT,urequests_get:()=>vT,urequests_method:()=>XT});var Y={};t.r(Y),t.d(Y,{display_animate:()=>NM,display_blink_rate:()=>CM,display_circle:()=>DM,display_color_seclet:()=>GM,display_draw_4strings:()=>mM,display_fill:()=>LM,display_get_screen_image:()=>gM,display_help:()=>FM,display_image_size:()=>EM,display_lcd_use_i2c_init:()=>KM,display_line:()=>RM,display_line_arbitrarily:()=>cM,display_matrix_extern_bright_point:()=>uM,display_matrix_extern_bright_screen:()=>dM,display_matrix_extern_clear:()=>lM,display_matrix_extern_get_pixel:()=>aM,display_matrix_extern_get_screen_pixel:()=>rM,display_matrix_extern_image_builtins:()=>IM,display_matrix_extern_scroll_string:()=>nM,display_matrix_extern_scroll_string_delay:()=>sM,display_matrix_extern_shift:()=>pM,display_matrix_extern_show_frame_string:()=>oM,display_matrix_extern_show_frame_string_delay:()=>_M,display_matrix_extern_show_image:()=>eM,display_matrix_extern_show_image_or_string_delay:()=>iM,display_matrix_use_i2c_init:()=>tM,display_oled_drawPixel:()=>vM,display_oled_showBitmap:()=>PM,display_oled_use_i2c_init:()=>jM,display_onoff:()=>AM,display_rect:()=>OM,display_rgb_color:()=>SM,display_tm1650_power:()=>XM,display_tm1650_set_brightness:()=>yM,display_tm1650_show_dot:()=>bM,display_tm1650_show_num:()=>xM,display_tm_use_i2c_init:()=>YM,display_triangle:()=>fM,display_use_i2c_init:()=>hM,extern_oled_bright_point:()=>ah,extern_oled_clear:()=>uh,extern_oled_get_pixel:()=>ph,extern_oled_hvline:()=>dh,extern_oled_line:()=>lh,extern_oled_scroll_string:()=>ih,extern_oled_scroll_string_delay:()=>nh,extern_oled_shape_rect:()=>rh,extern_oled_shift:()=>_h,extern_oled_show_frame_string:()=>sh,extern_oled_show_frame_string_delay:()=>oh,extern_oled_show_image:()=>$M,extern_oled_show_image_or_string_delay:()=>eh,extern_oled_show_image_xy:()=>ZM,extern_oled_show_string:()=>th,lcd_backlight:()=>qM,lcd_clear:()=>zM,lcd_print_string:()=>QM,lcd_show_image_or_string_delay:()=>JM,matrix_extern_image_arithmetic:()=>TM,matrix_extern_image_invert:()=>MM,tft_fill:()=>kM,tft_line_arbitrarily:()=>WM,tft_scroll_string_delay:()=>wM,tft_show_frame_string_delay:()=>HM,tft_show_image_or_string_delay:()=>UM,tft_show_image_xy:()=>BM,tft_use_spi_init:()=>VM});var X={};t.r(X),t.d(X,{bitbot_display_bitmap_create:()=>om,bitbot_display_image_create:()=>sm,display_available:()=>Yh,display_bitmap_create:()=>gh,display_bright_point:()=>fh,display_bright_screen:()=>Ph,display_clear:()=>vh,display_get_pixel:()=>Dh,display_get_screen_pixel:()=>Fh,display_image_builtins:()=>Ch,display_image_builtins_all:()=>Sh,display_image_create:()=>ch,display_scroll_string:()=>hh,display_scroll_string_delay:()=>mh,display_shift:()=>Nh,display_show_frame_string:()=>Oh,display_show_frame_string_delay:()=>Rh,display_show_image:()=>Th,display_show_image_or_string_delay:()=>Mh,draw_pointer:()=>gm,image_arithmetic:()=>Ah,image_invert:()=>Lh,mixbot_display_bitmap_create:()=>Zh,mixbot_display_bright_screen:()=>im,mixbot_display_get_ambientbright:()=>em,mixbot_display_get_screen_pixel:()=>tm,mixbot_display_image_create:()=>$h,mixbot_display_rotate:()=>nm,mixgo_display_bitmap_create:()=>Bh,mixgo_display_image_create_new:()=>Vh,mixgome_display_bitmap_create:()=>xh,mixgome_display_font:()=>Gh,mixgome_display_image_create:()=>Xh,mixgomini_display_bitmap_create:()=>yh,mixgomini_display_image_create:()=>bh,mpython_display_hvline:()=>qh,mpython_display_line:()=>zh,mpython_display_shape_rect:()=>Qh,mpython_pbm_image:()=>jh,nova_draw_pointer:()=>Cm,onboard_oled_bright_point:()=>Jh,onboard_oled_scroll_string_delay:()=>Wh,onboard_oled_show_frame_string_delay:()=>Kh,onboard_oled_show_image:()=>Uh,onboard_oled_show_image_or_string_delay:()=>kh,onboard_oled_show_image_xy:()=>wh,onboard_oled_show_string:()=>Hh,onboard_tft_bright_point:()=>Tm,onboard_tft_bright_screen:()=>Fm,onboard_tft_clear:()=>Pm,onboard_tft_clock_clear:()=>Rm,onboard_tft_clock_draw:()=>Om,onboard_tft_clock_get_rtctime:()=>mm,onboard_tft_clock_init:()=>hm,onboard_tft_clock_set_time:()=>Em,onboard_tft_display_hvline:()=>dm,onboard_tft_display_line:()=>lm,onboard_tft_display_shape_circle:()=>cm,onboard_tft_display_shape_rect:()=>rm,onboard_tft_fill:()=>Mm,onboard_tft_get_pixel:()=>Im,onboard_tft_get_screen_pixel:()=>fm,onboard_tft_scroll_string:()=>Lm,onboard_tft_scroll_string_delay:()=>Eh,onboard_tft_shift:()=>Dm,onboard_tft_show_frame_string:()=>Nm,onboard_tft_show_frame_string_delay:()=>um,onboard_tft_show_image:()=>Am,onboard_tft_show_image_or_string_delay:()=>am,onboard_tft_show_image_xy:()=>_m,onboard_tft_show_image_xy_direct:()=>pm,onboard_tft_show_texts:()=>Sm});var x={};t.r(x),t.d(x,{factory_block:()=>qm,factory_block_return:()=>zm,factory_block_return_with_textarea:()=>$m,factory_block_with_textarea:()=>jm,factory_callMethod_noreturn:()=>Jm,factory_callMethod_return:()=>Qm,factory_create_with_container:()=>Hm,factory_create_with_item:()=>km,factory_declare:()=>Km,factory_from_import:()=>Gm,factory_function_noreturn:()=>wm,factory_function_return:()=>Wm,factory_import:()=>Um,folding_block:()=>Zm});var b={};t.r(b),t.d(b,{controls_pin_attachInterrupt:()=>cE,inout_analog_atten:()=>uE,inout_analog_read:()=>aE,inout_analog_read_init:()=>ME,inout_analog_write:()=>oE,inout_analog_write_init:()=>TE,inout_analog_write_set:()=>_E,inout_analog_write_set_freq:()=>EE,inout_digital_init:()=>lE,inout_digital_read:()=>nE,inout_digital_write:()=>iE,inout_highlow:()=>eE,inout_pinMode:()=>mE,inout_pin_attachInterrupt:()=>dE,inout_pin_pressed:()=>rE,inout_pin_pressed_init:()=>hE,inout_pwm_analog_write:()=>sE,inout_pwm_analog_write_init:()=>IE,inout_pwm_analog_write_set_freq:()=>pE,pin_pressed:()=>RE,pin_pressed_init:()=>OE});var y={};t.r(y),t.d(y,{IOT_CONNECT_OLLAMA:()=>sO,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>WE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>kE,IOT_EMQX_PING:()=>wE,IOT_FORMATTING:()=>GE,IOT_FORMAT_STRING:()=>UE,IOT_MIXIO_NTP:()=>HE,IOT_MIXIO_PUBLISH:()=>YE,IOT_MIXIO_SUBSCRIBE:()=>XE,iot_checkonenet:()=>eO,iot_client_onboard:()=>JE,iot_connect_ollama:()=>nO,iot_connect_openai:()=>oO,iot_create_with_item:()=>PE,iot_http_client:()=>QE,iot_http_data:()=>qE,iot_mixio_check:()=>yE,iot_mixio_connect:()=>vE,iot_mixio_connect_only:()=>bE,iot_mixio_disconnect:()=>xE,iot_mixio_format_msg:()=>BE,iot_mixio_format_topic:()=>VE,iot_mixly_key:()=>KE,iot_mqtt_client:()=>zE,iot_mqtt_data:()=>jE,iot_onenet_check:()=>LE,iot_onenet_connect:()=>SE,iot_onenet_disconnect:()=>AE,iot_onenet_publish:()=>DE,iot_onenet_publish_dict:()=>NE,iot_onenetconnect:()=>ZE,iot_onenetdisconnect:()=>tO,iot_publish:()=>iO,iot_publish_container:()=>fE,iot_publish_item:()=>FE,iot_wifi_connect:()=>CE,iot_wificonnect:()=>$E,ollama_empty_history:()=>aO,use_ollama_llm_to_chat:()=>_O,use_ollama_llm_to_chat_return:()=>pO});var V={};t.r(V),t.d(V,{educore_mqtt_connect:()=>UO,educore_mqtt_connect_success:()=>WO,educore_mqtt_subscribe_message:()=>wO,educore_mqtt_topic_publish:()=>kO,educore_mqtt_topic_subscribe:()=>HO,educore_wifi_connect:()=>GO,network_ap_connect:()=>OO,network_connect:()=>TO,network_get_connect:()=>hO,network_get_wifi:()=>EO,network_init:()=>rO,network_is_active:()=>lO,network_open:()=>dO,network_scan:()=>IO,network_server:()=>RO,network_socket_accept:()=>AO,network_socket_bind:()=>gO,network_socket_close:()=>FO,network_socket_connect:()=>CO,network_socket_init:()=>cO,network_socket_listen:()=>SO,network_socket_receive:()=>LO,network_socket_receive_from:()=>DO,network_socket_send:()=>NO,network_socket_send_to:()=>fO,network_stop:()=>mO,network_wifi_connect:()=>MO,ntptime_address:()=>xO,ntptime_time:()=>XO,requests_attribute:()=>vO,requests_attribute2:()=>BO,requests_get:()=>PO,requests_get2:()=>yO,requests_method:()=>YO,requests_post:()=>VO});var B={};t.r(B),t.d(B,{pe_g1_battery_left:()=>QO,pe_g1_dc_motor:()=>qO,pe_g1_dc_motor_speed:()=>zO,pe_g1_servo_get_angle:()=>ZO,pe_g1_servo_get_speed:()=>tR,pe_g1_servo_set_angle:()=>jO,pe_g1_servo_set_speed:()=>$O,pe_g1_use_i2c_init:()=>JO});var G={};t.r(G),t.d(G,{CI130X_BROADCAST:()=>AR,CI130X_GET_THE_RECOGNIZED_CMD:()=>SR,CI130X_GET_WHETHER_IDENTIFY:()=>CR,CI130X_IDENTIFY_AND_SAVE:()=>gR,CI130X_SET_SYSTEM_CMD:()=>LR,HCSR04:()=>Tc,PS2_Button:()=>Ec,PS2_Buttons:()=>Rc,PS2_Buttons_new:()=>Sc,PS2_State:()=>Oc,PS2_init:()=>Mc,PS2_init_new:()=>gc,PS2_stk:()=>cc,PS2_stk_new:()=>Ac,PS2_vibration:()=>mc,PS2_vibration_new:()=>Cc,camera_sensor_init:()=>eg,camera_sensor_result:()=>ig,column_tube_foot:()=>pg,define_keyboards:()=>ag,educore_body_sensor:()=>Wc,educore_button_sensor_extern:()=>qc,educore_camera_sensor:()=>tg,educore_infrared_sensor:()=>Qc,educore_soilhum_sensor:()=>Kc,educore_temp_sensor:()=>Zc,educore_temphum_sensor:()=>Jc,educore_ultrasonic_sensor:()=>jc,esp32_s2_weather_init:()=>rc,esp32_s2_weather_rain:()=>lc,esp32_s2_weather_wd:()=>dc,esp32_s2_weather_ws:()=>Ic,extern_rfid_read:()=>zR,extern_rfid_readcontent:()=>$R,extern_rfid_readid:()=>jR,extern_rfid_status:()=>ec,extern_rfid_write:()=>ZR,extern_rfid_write_return:()=>tc,get_keboards_value:()=>ug,gnss_get_data:()=>fc,gnss_have_data:()=>Dc,init_matrix_keyboard:()=>og,interaction_whether_to_interaction:()=>RR,interaction_whether_to_interaction_SANT:()=>cR,line_tube_foot:()=>_g,mixbot_sensor_extern_get_addr:()=>yc,mixbot_sensor_extern_set_addr:()=>Vc,pm25_get_data:()=>Nc,radar_set_DETECTION_THRESHOLD:()=>ER,radar_set_DETECTION_THRESHOLD_SANT:()=>OR,robot_button_extern_get_value:()=>Pc,robot_color_extern_get_value:()=>bc,robot_infrared_extern_get_value:()=>Yc,robot_infrared_extern_grey_get_value:()=>Xc,robot_potentiometer_extern_get_value:()=>xc,robot_sonar_extern_get_value:()=>Bc,robot_sonar_extern_led:()=>Gc,robot_touch_extern_get_value:()=>vc,sensor_APDS9960_extern:()=>DR,sensor_DS18X20:()=>MR,sensor_LTR308_extern:()=>fR,sensor_LTR390UV_extern:()=>vR,sensor_MAX30102_extern:()=>NR,sensor_QMC5883L_extern:()=>GR,sensor_VL530LX_extern:()=>YR,sensor_adxl345_get_acceleration:()=>pR,sensor_aht11_extern:()=>xR,sensor_bmp:()=>IR,sensor_compass_reset:()=>QR,sensor_dht11:()=>uR,sensor_hp203_extern:()=>bR,sensor_light_level:()=>aR,sensor_lm35:()=>hR,sensor_ltr381_extern:()=>FR,sensor_mixgo_extern_button_attachInterrupt:()=>oR,sensor_mixgo_extern_button_get_presses:()=>sR,sensor_mixgo_extern_button_is_pressed:()=>iR,sensor_mixgo_extern_button_was_pressed:()=>nR,sensor_mixgo_extern_light:()=>rR,sensor_mixgo_extern_pin_near:()=>lR,sensor_mixgo_extern_sound:()=>dR,sensor_mixgoce_hot_wheel_degrees:()=>uc,sensor_mixgoce_hot_wheel_is_touched:()=>ac,sensor_mpu9250_attachGestureInterrupt:()=>_R,sensor_mpu9250_calibrate_compass:()=>WR,sensor_mpu9250_field_strength:()=>JR,sensor_mpu9250_gesture:()=>UR,sensor_mpu9250_get_acceleration:()=>wR,sensor_mpu9250_get_gyro:()=>kR,sensor_mpu9250_get_magnetic:()=>HR,sensor_mpu9250_temperature:()=>KR,sensor_ms5611_extern:()=>VR,sensor_ms5611_extern_altitude:()=>BR,sensor_read_humiture:()=>zc,sensor_sht:()=>TR,sensor_shtc3_extern:()=>XR,sensor_spl06_001_extern:()=>yR,sensor_ucs12071_extern:()=>PR,sensor_use_i2c_init:()=>mR,sensor_use_spi_init:()=>qR,sensor_use_uart_init:()=>Lc,sensor_weather_solo_init:()=>Uc,sensor_weather_solo_rain:()=>kc,sensor_weather_solo_wd:()=>wc,sensor_weather_solo_ws:()=>Hc,sensor_weigh_init:()=>ng,tvoc_get_data:()=>Fc,ultrasonic_sensor_read_distance:()=>$c,weather_data:()=>ic,weather_have_data:()=>nc,weather_set_label:()=>oc,weather_set_label_container:()=>_c,weather_set_label_item:()=>pc,weather_uart_mixio:()=>sc,weigh_sensor_get_weight:()=>sg});var U={};t.r(U),t.d(U,{HCSR04:()=>Lg,RTC_set_date:()=>Ag,RTC_set_time:()=>Sg,bitbot_als_num:()=>xC,dht11:()=>wC,educore_button_sensor:()=>jC,educore_button_was_pressed:()=>$C,educore_gyroscope_sensor:()=>QC,educore_gyroscope_sensor_read:()=>qC,educore_gyroscope_sensor_shake:()=>zC,educore_light_sensor:()=>JC,educore_rfid_sensor:()=>ZC,educore_rfid_sensor_scan:()=>tS,educore_rfid_sensor_scan_data:()=>eS,educore_voice_sensor:()=>WC,number1:()=>Dg,number2:()=>fg,number3:()=>Fg,number4:()=>Pg,number5:()=>vg,number6:()=>Yg,number7:()=>Xg,onboard_RTC_get_time:()=>wg,onboard_RTC_get_time_str:()=>Qg,onboard_RTC_get_timestamp:()=>Hg,onboard_RTC_get_timetuple_to_str:()=>qg,onboard_RTC_set_datetime:()=>Kg,onboard_RTC_settime_string:()=>Wg,onboard_RTC_timestamp_totuple:()=>kg,rfid_readcontent:()=>iC,rfid_readid:()=>eC,rfid_status:()=>oC,rfid_write:()=>nC,rfid_write_return:()=>sC,sensor_LTR308:()=>zg,sensor_aht11:()=>$g,sensor_bitbot_ALS:()=>XC,sensor_button_get_presses:()=>VC,sensor_button_is_pressed:()=>bC,sensor_button_was_pressed:()=>yC,sensor_distance_hrsc04:()=>Cg,sensor_eulerangles:()=>pC,sensor_field_strength:()=>HC,sensor_get_acceleration:()=>_C,sensor_get_temperature:()=>Zg,sensor_get_the_coprocessor_version:()=>iS,sensor_hp203:()=>tC,sensor_light:()=>UC,sensor_mixbot_get_gyro:()=>YC,sensor_mixbot_patrol_calibrate:()=>FC,sensor_mixbot_patrol_value:()=>PC,sensor_mixbot_temperature:()=>vC,sensor_mixgo_LTR308:()=>Gg,sensor_mixgo_button_attachInterrupt:()=>Tg,sensor_mixgo_button_get_presses:()=>Ig,sensor_mixgo_button_is_pressed:()=>dg,sensor_mixgo_button_was_pressed:()=>lg,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>EC,sensor_mixgo_cc_mmc5603_get_angle:()=>mC,sensor_mixgo_cc_mmc5603_get_magnetic:()=>hC,sensor_mixgo_light:()=>Ng,sensor_mixgo_nova_LTR308:()=>Bg,sensor_mixgo_nova_pin_near:()=>Vg,sensor_mixgo_pin_near:()=>yg,sensor_mixgo_pin_near_double:()=>bg,sensor_mixgo_pin_near_single:()=>xg,sensor_mixgo_pin_pressed:()=>Og,sensor_mixgo_sant_color:()=>Ug,sensor_mixgo_touch_slide:()=>gg,sensor_mixgocar42_button_attachInterrupt:()=>Eg,sensor_mixgocar42_button_get_presses:()=>mg,sensor_mixgocar42_button_is_pressed:()=>Mg,sensor_mixgocar42_button_was_pressed:()=>hg,sensor_mixgocar_battery_left:()=>fC,sensor_mixgocar_pin_near:()=>NC,sensor_mixgocar_pin_near_line:()=>LC,sensor_mixgocar_pin_near_state_change:()=>DC,sensor_mixgoce_pin_pressed:()=>Rg,sensor_mixgoce_temperature:()=>RC,sensor_mixgome_temperature:()=>OC,sensor_mpython_pin_pressed:()=>cg,sensor_mpython_qmi8658_get_gyro:()=>cC,sensor_mpython_qmi8658_temperature:()=>gC,sensor_onboard_compass_reset:()=>MC,sensor_onboard_mpu9250_calibrate_compass:()=>lC,sensor_onboard_mpu9250_field_strength:()=>TC,sensor_onboard_mpu9250_gesture:()=>aC,sensor_onboard_mpu9250_get_acceleration:()=>uC,sensor_onboard_mpu9250_get_gyro:()=>dC,sensor_onboard_mpu9250_get_magnetic:()=>rC,sensor_onboard_mpu9250_temperature:()=>IC,sensor_pin_near:()=>GC,sensor_pin_pressed:()=>BC,sensor_read:()=>KC,sensor_rm_acc:()=>AC,sensor_rm_battery_left:()=>SC,sensor_rm_pin_near_double:()=>CC,sensor_rtc_init:()=>Jg,sensor_sound:()=>jg,sensor_temperature:()=>kC});var w={};t.r(w),t.d(w,{serial_any:()=>lS,serial_begin:()=>mS,serial_print:()=>pS,serial_print_byte:()=>_S,serial_print_hex:()=>uS,serial_println:()=>aS,serial_read_from_ai:()=>LS,serial_readline:()=>IS,serial_readstr:()=>dS,serial_readstr_until:()=>TS,serial_receive_data_event:()=>rS,serial_send_to_ai:()=>AS,serial_softserial:()=>hS,serial_softserial_new:()=>MS,system_input:()=>ES,system_print:()=>OS,system_print_container:()=>CS,system_print_end:()=>cS,system_print_inline:()=>RS,system_print_item:()=>SS,system_print_many:()=>gS});var H={};t.r(H),t.d(H,{Panic_with_status_code:()=>FS,Timer_init:()=>HS,base_delay:()=>KS,controls_delay:()=>fS,controls_delay_new:()=>DS,controls_millis:()=>vS,controls_uname:()=>XS,raw_block:()=>YS,reset:()=>PS,system_bitbot_shutdown:()=>wS,system_machine_reset:()=>US,system_ticks_diff:()=>yS,system_timer:()=>bS,system_timer_init:()=>VS,system_wdt_feed:()=>GS,system_wdt_init:()=>BS,time_ticks_diff:()=>WS,timer:()=>xS,timer2:()=>kS});var k={};t.r(k),t.d(k,{Air_daily_content:()=>_A,Air_now_content:()=>ZS,Geo_moon_content:()=>aA,Geo_sun_content:()=>pA,Life_suggestion_content:()=>eA,Location_search_content:()=>nA,Tide_daily_content:()=>iA,WEATHER_DAILY:()=>qS,WEATHER_HOUR:()=>zS,WEATHER_NOW:()=>QS,Weather_alarm_content:()=>tA,Weather_daily:()=>sA,Weather_daily_content:()=>oA,Weather_now:()=>jS,Weather_now_content:()=>$S});var W={};t.r(W),t.d(W,{PIN_init:()=>aL,actuator_extern_get_led_bright:()=>DA,actuator_extern_get_led_state:()=>fA,actuator_extern_led_bright:()=>NA,actuator_extern_led_brightness:()=>FA,actuator_ms32006_dcmotor:()=>hA,actuator_ms32006_init:()=>MA,actuator_ms32006_stepper:()=>mA,actuator_neopixel_init:()=>PA,actuator_neopixel_rgb:()=>XA,actuator_neopixel_rgb_all:()=>vA,actuator_neopixel_rgb_show_all_chase:()=>xA,actuator_neopixel_rgb_show_all_rainbow:()=>bA,actuator_neopixel_write:()=>YA,actuator_use_uart_init:()=>yA,esp32_music_get_tempo_extern:()=>CA,esp32_music_pitch:()=>OA,esp32_music_pitch_init:()=>EA,esp32_music_pitch_with_time:()=>RA,esp32_music_play_list:()=>SA,esp32_music_reset_extern:()=>AA,esp32_music_set_tempo_extern:()=>gA,esp32_music_stop:()=>cA,mixbot_actuator_extern_get_addr:()=>_L,mixbot_actuator_extern_set_addr:()=>pL,mixbot_addr_extern:()=>JA,parrot_PIN_init:()=>lL,parrot_move_speed:()=>IL,pin_led_bright:()=>uL,player_play_music:()=>wA,player_set_mode:()=>UA,player_set_play:()=>BA,player_set_volume:()=>GA,player_whether_stop:()=>VA,robot_led_extern:()=>jA,robot_led_extern_get_value:()=>$A,robot_motor_extern:()=>QA,robot_motor_extern_get_speed:()=>qA,robot_servo_extern_absolute_run:()=>iL,robot_servo_extern_get_status:()=>ZA,robot_servo_extern_relative_continue:()=>oL,robot_servo_extern_relative_origin:()=>nL,robot_servo_extern_relative_run:()=>sL,robot_servo_extern_stop:()=>eL,robot_servo_extern_stop_mode:()=>tL,robot_traffic_light_extern:()=>zA,servo_PIN_init:()=>rL,servo_get_angle:()=>IA,servo_get_speed:()=>TA,servo_init:()=>uA,servo_move:()=>LA,servo_move_angle:()=>dL,servo_set_angle:()=>dA,servo_set_speed:()=>lA,servo_speed_360:()=>rA,syn6288_builtin_voice:()=>WA,syn6288_get_voice:()=>kA,syn6288_set_voice:()=>HA,syn6288_tts_play:()=>KA});var K={};t.r(K),t.d(K,{actuator_dc_motor:()=>UL,actuator_dc_motor_stop:()=>wL,actuator_get_led_bright:()=>SL,actuator_get_led_state:()=>AL,actuator_led_bright:()=>CL,actuator_led_brightness:()=>LL,actuator_mixbot_buzzer_on_off:()=>JL,actuator_mixgo_nova_mic_get:()=>$L,actuator_mixgo_nova_mic_set:()=>jL,actuator_mixgo_nova_onboard_music_pitch:()=>sN,actuator_mixgo_nova_onboard_music_stop:()=>oN,actuator_mixgo_nova_play_audio:()=>iN,actuator_mixgo_nova_play_online_audio:()=>nN,actuator_mixgo_nova_record_audio:()=>eN,actuator_mixgo_nova_voice_get:()=>tN,actuator_mixgo_nova_voice_set:()=>ZL,actuator_mixgo_zero_led_color:()=>NL,actuator_onboard_neopixel_rgb:()=>XL,actuator_onboard_neopixel_rgb_all:()=>xL,actuator_onboard_neopixel_rgb_show_all_chase:()=>bL,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>yL,actuator_onboard_neopixel_write:()=>YL,actuator_stepper_keep:()=>BL,actuator_stepper_stop:()=>GL,analog_ble_keyboard_init:()=>hN,analog_ble_keyboard_input:()=>ON,analog_ble_keyboard_mouse_init:()=>NN,analog_ble_keyboard_mouse_input:()=>PN,analog_ble_keyboard_mouse_send_battery:()=>FN,analog_ble_keyboard_mouse_str:()=>vN,analog_ble_keyboard_send_battery:()=>cN,analog_ble_keyboard_str:()=>RN,analog_ble_mouse_init:()=>gN,analog_ble_mouse_input:()=>AN,analog_ble_mouse_keyboard_input:()=>YN,analog_ble_mouse_send_battery:()=>LN,analog_keyboard_input:()=>uN,analog_keyboard_str:()=>TN,analog_mouse_input:()=>lN,bitbot_motor:()=>zL,bitbot_move:()=>QL,bitbot_stop:()=>qL,ble_keyboard_connect:()=>EN,ble_keyboard_get_mac:()=>mN,ble_keyboard_mouse_connect:()=>fN,ble_keyboard_mouse_get_mac:()=>DN,ble_mouse_connect:()=>SN,ble_mouse_get_mac:()=>CN,cc_number:()=>DL,educore_ble_keyboard_input:()=>HN,educore_ble_sensor_connected:()=>wN,educore_ble_sensor_init:()=>UN,educore_buzzer:()=>XN,educore_buzzer_play_tone:()=>xN,educore_buzzer_play_tone_time:()=>bN,educore_buzzer_stop:()=>yN,educore_neopixel_clear:()=>GN,educore_neopixel_rgb:()=>BN,educore_rgb_light:()=>VN,esp32_music_get_tempo:()=>ML,esp32_music_reset:()=>RL,esp32_music_set_tempo:()=>TL,esp32_onboard_music_pitch:()=>hL,esp32_onboard_music_pitch_with_time:()=>mL,esp32_onboard_music_play_list:()=>OL,esp32_onboard_music_stop:()=>EL,general_key:()=>dN,general_key_tuple:()=>MN,get_keyboard_light:()=>kN,get_power_output:()=>pN,ledswitch:()=>gL,mixbot_motor:()=>KL,mixbot_motor_status:()=>HL,mixbot_move:()=>kL,mixbot_stop:()=>WL,mouse_key:()=>IN,number:()=>cL,rm_actuator_get_led_bright:()=>FL,rm_actuator_get_led_state:()=>PL,rm_actuator_led_bright:()=>fL,rm_actuator_led_brightness:()=>vL,rm_motor:()=>VL,set_all_power_output:()=>aN,set_power_output:()=>_N,special_key:()=>rN});var J={};t.r(J),t.d(J,{ai_sensor_20object:()=>CD,ai_sensor_ailocal_class:()=>lD,ai_sensor_ailocal_class_result:()=>ID,ai_sensor_ailocal_train:()=>dD,ai_sensor_asr_recognize:()=>ED,ai_sensor_audio_play:()=>MD,ai_sensor_audio_record:()=>TD,ai_sensor_barcode:()=>jN,ai_sensor_circle:()=>nD,ai_sensor_classifier_faces:()=>gD,ai_sensor_color:()=>pD,ai_sensor_color_chases:()=>rD,ai_sensor_color_chases_result:()=>uD,ai_sensor_config:()=>JN,ai_sensor_face:()=>cD,ai_sensor_find_20objects:()=>SD,ai_sensor_find_barcodes:()=>$N,ai_sensor_find_circles:()=>sD,ai_sensor_find_colors:()=>aD,ai_sensor_find_licenseplates:()=>RD,ai_sensor_find_lines:()=>iD,ai_sensor_find_qrcodes:()=>zN,ai_sensor_find_rects:()=>_D,ai_sensor_find_tags:()=>tD,ai_sensor_licenseplate:()=>OD,ai_sensor_line:()=>eD,ai_sensor_qrcode:()=>qN,ai_sensor_qrcode_lite:()=>KN,ai_sensor_rect:()=>oD,ai_sensor_rgb:()=>QN,ai_sensor_tag:()=>ZN,ai_sensor_use_uart_init:()=>WN,ai_sensor_yolo_recognize:()=>hD,ai_sensor_yolo_recognize_result:()=>mD});var Q={};t.r(Q),t.d(Q,{MICROPYTHON_AI_Speech_asr:()=>ND,MICROPYTHON_AI_Speech_unit:()=>LD,MICROPYTHON_AI_client:()=>AD});var q={};t.r(q),t.d(q,{mpython_blynk_app_data:()=>BD,mpython_blynk_app_notify:()=>XD,mpython_blynk_email:()=>GD,mpython_blynk_get_timers:()=>bD,mpython_blynk_on_connected:()=>PD,mpython_blynk_on_disconnected:()=>FD,mpython_blynk_run:()=>YD,mpython_blynk_sensor_data_to_app:()=>VD,mpython_blynk_set_property:()=>UD,mpython_blynk_setup:()=>wD,mpython_blynk_stop_timers:()=>xD,mpython_blynk_sync_virtual:()=>fD,mpython_blynk_terminal_widget_vpin:()=>DD,mpython_blynktimer:()=>yD,mpython_blynktimer_run:()=>vD});var z={};t.r(z),t.d(z,{communicate_bluetooth_central_init:()=>Sf,communicate_bluetooth_connect:()=>Nf,communicate_bluetooth_disconnect:()=>Df,communicate_bluetooth_handle:()=>Xf,communicate_bluetooth_is_connected:()=>Ff,communicate_bluetooth_mac:()=>ff,communicate_bluetooth_peripheral_init:()=>Af,communicate_bluetooth_recv:()=>Yf,communicate_bluetooth_recv_only:()=>vf,communicate_bluetooth_scan:()=>Lf,communicate_bluetooth_send:()=>Pf,communicate_espnow_init:()=>xf,communicate_espnow_init_new:()=>bf,communicate_i2c_available:()=>zD,communicate_i2c_init:()=>WD,communicate_i2c_master_read:()=>qD,communicate_i2c_onboard:()=>HD,communicate_i2c_read:()=>KD,communicate_i2c_scan:()=>QD,communicate_i2c_write:()=>JD,communicate_ir_recv_init:()=>Tf,communicate_ir_send_init:()=>Of,communicate_ow_init:()=>af,communicate_ow_read:()=>df,communicate_ow_reset:()=>rf,communicate_ow_scan:()=>uf,communicate_ow_select:()=>If,communicate_ow_write:()=>lf,communicate_spi_buffer:()=>tf,communicate_spi_init:()=>$D,communicate_spi_onboard:()=>kD,communicate_spi_read:()=>ef,communicate_spi_read_output:()=>nf,communicate_spi_readinto:()=>sf,communicate_spi_readinto_output:()=>of,communicate_spi_set:()=>ZD,communicate_spi_write:()=>_f,communicate_spi_write_readinto:()=>pf,espnow_radio_channel:()=>wf,espnow_radio_channel_new:()=>kf,espnow_radio_on_off:()=>Wf,espnow_radio_rec:()=>Jf,espnow_radio_recv:()=>qf,espnow_radio_recv_certain_msg:()=>zf,espnow_radio_recv_certain_msg_new:()=>$f,espnow_radio_recv_msg:()=>Qf,espnow_radio_recv_new:()=>jf,espnow_radio_send:()=>Kf,espnow_radio_txpower:()=>Hf,i2c_slave_onreceive:()=>jD,internal_variable:()=>Mf,ir_recv_timeout:()=>Ef,ir_transmit_busy:()=>Cf,ir_transmit_conventional_data:()=>Rf,ir_transmit_raw_code:()=>gf,ir_transmit_study_code:()=>cf,ir_whether_recv:()=>mf,lora_init:()=>Zf,lora_packet:()=>tF,lora_recv:()=>iF,lora_send:()=>eF,network_espnow_info:()=>Vf,network_espnow_mac:()=>yf,network_espnow_recv:()=>Bf,network_espnow_recv_handle:()=>Uf,network_espnow_send:()=>Gf,recv_fun:()=>hf,urequests_attribute:()=>sF,urequests_get:()=>nF,urequests_method:()=>oF});var j={};t.r(j),t.d(j,{display_animate:()=>FF,display_circle:()=>PF,display_color_seclet:()=>wF,display_draw_4strings:()=>CF,display_fill:()=>fF,display_lcd_use_i2c_init:()=>QF,display_line:()=>LF,display_line_arbitrarily:()=>SF,display_matrix_extern_bright_point:()=>hF,display_matrix_extern_bright_screen:()=>EF,display_matrix_extern_clear:()=>IF,display_matrix_extern_get_pixel:()=>MF,display_matrix_extern_get_screen_pixel:()=>mF,display_matrix_extern_image_builtins:()=>OF,display_matrix_extern_scroll_string:()=>dF,display_matrix_extern_scroll_string_delay:()=>lF,display_matrix_extern_shift:()=>TF,display_matrix_extern_show_frame_string:()=>uF,display_matrix_extern_show_frame_string_delay:()=>rF,display_matrix_extern_show_image:()=>pF,display_matrix_extern_show_image_or_string_delay:()=>aF,display_matrix_use_i2c_init:()=>_F,display_oled_drawPixel:()=>XF,display_oled_showBitmap:()=>YF,display_oled_use_i2c_init:()=>ZF,display_onoff:()=>NF,display_rect:()=>AF,display_tm1650_power:()=>bF,display_tm1650_set_brightness:()=>BF,display_tm1650_show_dot:()=>VF,display_tm1650_show_num:()=>yF,display_tm_use_i2c_init:()=>xF,display_triangle:()=>vF,display_use_i2c_init:()=>gF,extern_oled_bright_point:()=>dP,extern_oled_clear:()=>aP,extern_oled_get_pixel:()=>rP,extern_oled_hvline:()=>IP,extern_oled_line:()=>TP,extern_oled_scroll_string:()=>_P,extern_oled_scroll_string_delay:()=>pP,extern_oled_shape_rect:()=>lP,extern_oled_shift:()=>uP,extern_oled_show_frame_string:()=>sP,extern_oled_show_frame_string_delay:()=>oP,extern_oled_show_image:()=>tP,extern_oled_show_image_or_string_delay:()=>nP,extern_oled_show_image_xy:()=>eP,extern_oled_show_string:()=>iP,image_shift:()=>DF,lcd_backlight:()=>jF,lcd_clear:()=>$F,lcd_print_string:()=>zF,lcd_show_image_or_string_delay:()=>qF,matrix_extern_image_arithmetic:()=>RF,matrix_extern_image_invert:()=>cF,tft_fill:()=>KF,tft_line_arbitrarily:()=>JF,tft_scroll_string_delay:()=>WF,tft_show_frame_string_delay:()=>kF,tft_show_image_or_string_delay:()=>HF,tft_show_image_xy:()=>UF,tft_use_spi_init:()=>GF});var $={};t.r($),t.d($,{bitbot_display_bitmap_create:()=>_v,bitbot_display_image_create:()=>ov,display_available:()=>NP,display_bitmap_create:()=>AP,display_bright_point:()=>vP,display_bright_screen:()=>XP,display_clear:()=>LP,display_get_pixel:()=>PP,display_get_screen_pixel:()=>YP,display_image_builtins:()=>gP,display_image_builtins_all:()=>CP,display_image_create:()=>SP,display_scroll_string:()=>OP,display_scroll_string_delay:()=>RP,display_shift:()=>FP,display_show_frame_string:()=>mP,display_show_frame_string_delay:()=>EP,display_show_image:()=>MP,display_show_image_or_string_delay:()=>hP,draw_pointer:()=>Cv,image_arithmetic:()=>DP,image_invert:()=>fP,mixbot_display_bitmap_create:()=>tv,mixbot_display_bright_screen:()=>nv,mixbot_display_get_ambientbright:()=>iv,mixbot_display_get_screen_pixel:()=>ev,mixbot_display_image_create:()=>ZP,mixbot_display_rotate:()=>sv,mixgo_display_bitmap_create:()=>UP,mixgo_display_image_create_new:()=>GP,mixgome_display_bitmap_create:()=>bP,mixgome_display_font:()=>BP,mixgome_display_image_create:()=>xP,mixgomini_display_bitmap_create:()=>VP,mixgomini_display_image_create:()=>yP,mpython_display_hvline:()=>jP,mpython_display_line:()=>$P,mpython_display_shape_rect:()=>zP,mpython_pbm_image:()=>wP,nova_draw_pointer:()=>Sv,onboard_oled_bright_point:()=>qP,onboard_oled_scroll_string_delay:()=>QP,onboard_oled_show_frame_string_delay:()=>JP,onboard_oled_show_image:()=>HP,onboard_oled_show_image_or_string_delay:()=>KP,onboard_oled_show_image_xy:()=>kP,onboard_oled_show_string:()=>WP,onboard_tft_bright_point:()=>Mv,onboard_tft_bright_screen:()=>Fv,onboard_tft_clear:()=>Pv,onboard_tft_clock_clear:()=>cv,onboard_tft_clock_draw:()=>Rv,onboard_tft_clock_get_rtctime:()=>Ev,onboard_tft_clock_init:()=>mv,onboard_tft_clock_set_time:()=>Ov,onboard_tft_display_hvline:()=>lv,onboard_tft_display_line:()=>Iv,onboard_tft_display_shape_circle:()=>gv,onboard_tft_display_shape_rect:()=>dv,onboard_tft_fill:()=>hv,onboard_tft_get_pixel:()=>Tv,onboard_tft_get_screen_pixel:()=>fv,onboard_tft_scroll_string_delay:()=>cP,onboard_tft_shift:()=>Dv,onboard_tft_show_frame_string:()=>Nv,onboard_tft_show_frame_string_delay:()=>rv,onboard_tft_show_image:()=>Lv,onboard_tft_show_image_or_string_delay:()=>uv,onboard_tft_show_image_xy:()=>pv,onboard_tft_show_image_xy_direct:()=>av,onboard_tft_show_texts:()=>Av});var Z={};t.r(Z),t.d(Z,{factory_block:()=>Bv,factory_block_return:()=>Gv,factory_block_return_with_textarea:()=>wv,factory_block_with_textarea:()=>Uv,factory_callMethod_noreturn:()=>yv,factory_callMethod_return:()=>Vv,factory_declare:()=>bv,factory_from_import:()=>vv,factory_function_noreturn:()=>Xv,factory_function_return:()=>xv,factory_import:()=>Yv,folding_block:()=>Hv});var tt={};t.r(tt),t.d(tt,{inout_analog_atten:()=>sY,inout_analog_read:()=>jv,inout_analog_read_init:()=>nY,inout_analog_write:()=>Qv,inout_analog_write_init:()=>iY,inout_analog_write_set:()=>qv,inout_digital_init:()=>tY,inout_digital_read:()=>Kv,inout_digital_write:()=>Wv,inout_highlow:()=>kv,inout_pin_attachInterrupt:()=>Zv,inout_pin_pressed:()=>$v,inout_pin_pressed_init:()=>oY,inout_pwm_analog_write:()=>Jv,inout_pwm_analog_write_init:()=>eY,inout_pwm_analog_write_set_freq:()=>zv});var et={};t.r(et),t.d(et,{IOT_CONNECT_OLLAMA:()=>YY,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>SY,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>gY,IOT_EMQX_PING:()=>AY,IOT_FORMATTING:()=>RY,IOT_FORMAT_STRING:()=>cY,IOT_MIXIO_NTP:()=>LY,IOT_MIXIO_PUBLISH:()=>IY,IOT_MIXIO_SUBSCRIBE:()=>TY,iot_client_onboard:()=>NY,iot_connect_ollama:()=>vY,iot_connect_openai:()=>XY,iot_http_client:()=>DY,iot_http_data:()=>fY,iot_mixio_check:()=>mY,iot_mixio_connect:()=>lY,iot_mixio_connect_only:()=>hY,iot_mixio_disconnect:()=>MY,iot_mixio_format_msg:()=>OY,iot_mixio_format_topic:()=>EY,iot_mixly_key:()=>CY,iot_mqtt_client:()=>FY,iot_mqtt_data:()=>PY,iot_onenet_check:()=>rY,iot_onenet_connect:()=>pY,iot_onenet_disconnect:()=>aY,iot_onenet_publish:()=>dY,iot_onenet_publish_dict:()=>uY,iot_wifi_connect:()=>_Y,ollama_empty_history:()=>yY,use_ollama_llm_to_chat:()=>xY,use_ollama_llm_to_chat_return:()=>bY});var it={};t.r(it),t.d(it,{educore_mqtt_connect:()=>TX,educore_mqtt_connect_success:()=>EX,educore_mqtt_subscribe_message:()=>MX,educore_mqtt_topic_publish:()=>mX,educore_mqtt_topic_subscribe:()=>hX,educore_wifi_connect:()=>IX,network_ap_connect:()=>KY,network_connect:()=>BY,network_get_connect:()=>UY,network_get_wifi:()=>WY,network_init:()=>VY,network_is_active:()=>kY,network_open:()=>HY,network_scan:()=>JY,network_server:()=>QY,network_socket_accept:()=>ZY,network_socket_bind:()=>zY,network_socket_close:()=>sX,network_socket_connect:()=>jY,network_socket_init:()=>qY,network_socket_listen:()=>$Y,network_socket_receive:()=>tX,network_socket_receive_from:()=>iX,network_socket_send:()=>eX,network_socket_send_to:()=>nX,network_stop:()=>wY,network_wifi_connect:()=>GY,ntptime_address:()=>uX,ntptime_time:()=>aX,requests_attribute:()=>_X,requests_attribute2:()=>dX,requests_get:()=>oX,requests_get2:()=>rX,requests_method:()=>pX,requests_post:()=>lX});var nt={};t.r(nt),t.d(nt,{pe_g1_battery_left:()=>RX,pe_g1_dc_motor:()=>cX,pe_g1_dc_motor_speed:()=>gX,pe_g1_servo_get_angle:()=>AX,pe_g1_servo_get_speed:()=>LX,pe_g1_servo_set_angle:()=>CX,pe_g1_servo_set_speed:()=>SX,pe_g1_use_i2c_init:()=>OX});var st={};t.r(st),t.d(st,{CI130X_BROADCAST:()=>qX,CI130X_GET_THE_RECOGNIZED_CMD:()=>QX,CI130X_GET_WHETHER_IDENTIFY:()=>JX,CI130X_IDENTIFY_AND_SAVE:()=>KX,CI130X_SET_SYSTEM_CMD:()=>zX,HCSR04:()=>Dx,PS2_Button:()=>Px,PS2_Buttons:()=>vx,PS2_Buttons_new:()=>Gx,PS2_State:()=>Yx,PS2_init:()=>fx,PS2_init_new:()=>Vx,PS2_stk:()=>Xx,PS2_stk_new:()=>Ux,PS2_vibration:()=>Fx,PS2_vibration_new:()=>Bx,RTC_get_time:()=>bx,RTC_set_date:()=>XX,RTC_set_datetime:()=>xx,RTC_set_time:()=>YX,camera_sensor_init:()=>Eb,camera_sensor_result:()=>Ob,column_tube_foot:()=>Cb,define_keyboards:()=>Sb,educore_body_sensor:()=>ab,educore_button_sensor_extern:()=>lb,educore_camera_sensor:()=>mb,educore_infrared_sensor:()=>db,educore_soilhum_sensor:()=>ub,educore_temp_sensor:()=>hb,educore_temphum_sensor:()=>rb,educore_ultrasonic_sensor:()=>Tb,esp32_s2_weather_init:()=>Sx,esp32_s2_weather_rain:()=>Lx,esp32_s2_weather_wd:()=>Ax,esp32_s2_weather_ws:()=>Nx,extern_rfid_read:()=>lx,extern_rfid_readcontent:()=>Tx,extern_rfid_readid:()=>Ix,extern_rfid_status:()=>mx,extern_rfid_write:()=>Mx,extern_rfid_write_return:()=>hx,get_keboards_value:()=>Lb,gnss_get_data:()=>kx,gnss_have_data:()=>Wx,init_matrix_keyboard:()=>Ab,interaction_whether_to_interaction:()=>kX,interaction_whether_to_interaction_SANT:()=>WX,line_tube_foot:()=>gb,mixbot_sensor_extern_get_addr:()=>eb,mixbot_sensor_extern_set_addr:()=>ib,pm25_get_data:()=>Hx,radar_set_DETECTION_THRESHOLD:()=>wX,radar_set_DETECTION_THRESHOLD_SANT:()=>HX,robot_button_extern_get_value:()=>Jx,robot_color_extern_get_value:()=>$x,robot_infrared_extern_get_value:()=>qx,robot_infrared_extern_grey_get_value:()=>zx,robot_potentiometer_extern_get_value:()=>jx,robot_sonar_extern_get_value:()=>Zx,robot_sonar_extern_led:()=>tb,robot_touch_extern_get_value:()=>Qx,sensor_APDS9960_extern:()=>$X,sensor_DS18X20:()=>pb,sensor_LTR308_extern:()=>ZX,sensor_LTR390UV_extern:()=>_x,sensor_MAX30102_extern:()=>jX,sensor_QMC5883L_extern:()=>px,sensor_VL530LX_extern:()=>rx,sensor_aht11_extern:()=>ux,sensor_bmp:()=>BX,sensor_dht11:()=>yx,sensor_distance_hrsc04:()=>vX,sensor_hp203_extern:()=>tx,sensor_ltr381_extern:()=>sx,sensor_mixgo_extern_button_attachInterrupt:()=>FX,sensor_mixgo_extern_button_get_presses:()=>fX,sensor_mixgo_extern_button_is_pressed:()=>NX,sensor_mixgo_extern_button_was_pressed:()=>DX,sensor_mixgo_extern_light:()=>xX,sensor_mixgo_extern_pin_near:()=>yX,sensor_mixgo_extern_sound:()=>bX,sensor_mixgoce_hot_wheel_degrees:()=>Cx,sensor_mixgoce_hot_wheel_is_touched:()=>gx,sensor_mpu9250_attachGestureInterrupt:()=>PX,sensor_ms5611_extern:()=>ix,sensor_ms5611_extern_altitude:()=>nx,sensor_read_humiture:()=>Ib,sensor_rtc_init:()=>VX,sensor_sht:()=>GX,sensor_shtc3_extern:()=>ax,sensor_spl06_001_extern:()=>ex,sensor_ucs12071_extern:()=>ox,sensor_use_i2c_init:()=>UX,sensor_use_spi_init:()=>dx,sensor_use_uart_init:()=>wx,sensor_weather_solo_init:()=>nb,sensor_weather_solo_rain:()=>_b,sensor_weather_solo_wd:()=>sb,sensor_weather_solo_ws:()=>ob,sensor_weigh_init:()=>Rb,tvoc_get_data:()=>Kx,ultrasonic_sensor_read_distance:()=>Mb,weather_data:()=>Ex,weather_have_data:()=>Ox,weather_set_label:()=>cx,weather_uart_mixio:()=>Rx,weigh_sensor_get_weight:()=>cb});var ot={};t.r(ot),t.d(ot,{HCSR04:()=>xb,bitbot_als_num:()=>nV,dht11:()=>dV,educore_button_sensor:()=>EV,educore_button_was_pressed:()=>OV,educore_gyroscope_sensor:()=>MV,educore_gyroscope_sensor_read:()=>hV,educore_gyroscope_sensor_shake:()=>mV,educore_light_sensor:()=>TV,educore_rfid_sensor:()=>RV,educore_rfid_sensor_scan:()=>cV,educore_rfid_sensor_scan_data:()=>gV,educore_voice_sensor:()=>lV,number1:()=>bb,number2:()=>yb,number3:()=>Vb,number4:()=>Bb,number5:()=>Gb,number6:()=>Ub,number7:()=>wb,onboard_RTC_get_time:()=>Yy,onboard_RTC_get_time_str:()=>by,onboard_RTC_get_timestamp:()=>Xy,onboard_RTC_get_timetuple_to_str:()=>yy,onboard_RTC_set_datetime:()=>Py,onboard_RTC_settime_string:()=>vy,onboard_RTC_timestamp_totuple:()=>xy,rfid_readcontent:()=>sy,rfid_readid:()=>ny,rfid_status:()=>py,rfid_write:()=>oy,rfid_write_return:()=>_y,sensor_LTR308:()=>$b,sensor_adxl345_get_acceleration:()=>hy,sensor_aht11:()=>ey,sensor_bitbot_ALS:()=>iV,sensor_button_get_presses:()=>_V,sensor_button_is_pressed:()=>sV,sensor_button_was_pressed:()=>oV,sensor_compass_reset:()=>gy,sensor_ds18x20:()=>zb,sensor_eulerangles:()=>uy,sensor_get_acceleration:()=>ay,sensor_get_temperature:()=>iy,sensor_get_the_coprocessor_version:()=>CV,sensor_hp203:()=>ty,sensor_light:()=>rV,sensor_lm35:()=>jb,sensor_mixbot_get_gyro:()=>eV,sensor_mixbot_patrol_calibrate:()=>$y,sensor_mixbot_patrol_value:()=>Zy,sensor_mixbot_temperature:()=>tV,sensor_mixgo_LTR308:()=>Jb,sensor_mixgo_button_attachInterrupt:()=>Fb,sensor_mixgo_button_get_presses:()=>fb,sensor_mixgo_button_is_pressed:()=>Nb,sensor_mixgo_button_was_pressed:()=>Db,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>Gy,sensor_mixgo_cc_mmc5603_get_angle:()=>By,sensor_mixgo_cc_mmc5603_get_magnetic:()=>Vy,sensor_mixgo_light:()=>uV,sensor_mixgo_nova_LTR308:()=>qb,sensor_mixgo_nova_pin_near:()=>Kb,sensor_mixgo_pin_near:()=>Wb,sensor_mixgo_pin_near_double:()=>kb,sensor_mixgo_pin_near_single:()=>Hb,sensor_mixgo_pin_pressed:()=>Ty,sensor_mixgo_sant_color:()=>Qb,sensor_mixgo_touch_slide:()=>Iy,sensor_mixgocar42_button_attachInterrupt:()=>Xb,sensor_mixgocar42_button_get_presses:()=>Yb,sensor_mixgocar42_button_is_pressed:()=>Pb,sensor_mixgocar42_button_was_pressed:()=>vb,sensor_mixgocar_battery_left:()=>jy,sensor_mixgocar_pin_near:()=>qy,sensor_mixgocar_pin_near_line:()=>Qy,sensor_mixgocar_pin_near_state_change:()=>zy,sensor_mixgoce_pin_pressed:()=>ly,sensor_mixgoce_temperature:()=>wy,sensor_mixgome_temperature:()=>Uy,sensor_mpu9250_calibrate_compass:()=>Oy,sensor_mpu9250_field_strength:()=>cy,sensor_mpu9250_gesture:()=>ry,sensor_mpu9250_get_acceleration:()=>dy,sensor_mpu9250_get_gyro:()=>Ey,sensor_mpu9250_get_magnetic:()=>my,sensor_mpu9250_temperature:()=>Ry,sensor_mpython_pin_pressed:()=>My,sensor_mpython_qmi8658_get_gyro:()=>Hy,sensor_mpython_qmi8658_temperature:()=>ky,sensor_onboard_compass_reset:()=>Fy,sensor_onboard_mpu9250_calibrate_compass:()=>Ny,sensor_onboard_mpu9250_field_strength:()=>fy,sensor_onboard_mpu9250_gesture:()=>Cy,sensor_onboard_mpu9250_get_acceleration:()=>Sy,sensor_onboard_mpu9250_get_gyro:()=>Ly,sensor_onboard_mpu9250_get_magnetic:()=>Ay,sensor_onboard_mpu9250_temperature:()=>Dy,sensor_pin_near:()=>aV,sensor_pin_pressed:()=>pV,sensor_read:()=>IV,sensor_rm_acc:()=>Jy,sensor_rm_battery_left:()=>Ky,sensor_rm_pin_near_double:()=>Wy,sensor_sound:()=>Zb});var _t={};t.r(_t),t.d(_t,{serial_any:()=>DV,serial_print:()=>SV,serial_print_byte:()=>AV,serial_print_hex:()=>NV,serial_println:()=>LV,serial_read_from_ai:()=>BV,serial_readline:()=>FV,serial_readstr:()=>fV,serial_send_to_ai:()=>VV,serial_softserial:()=>PV,serial_softserial_new:()=>vV,system_input:()=>YV,system_print:()=>XV,system_print_end:()=>bV,system_print_inline:()=>xV,system_print_many:()=>yV});var pt={};t.r(pt),t.d(pt,{Panic_with_status_code:()=>jV,Timer_init:()=>lB,base_delay:()=>MB,controls_delay:()=>iB,controls_delay_new:()=>nB,controls_end_program:()=>ZV,controls_millis:()=>$V,controls_uname:()=>eB,reset:()=>tB,system_bitbot_shutdown:()=>dB,system_device_name:()=>qV,system_device_serial_number:()=>zV,system_event_bus_source:()=>JV,system_event_bus_value:()=>QV,system_machine_reset:()=>rB,system_on_event:()=>kV,system_raise_event:()=>HV,system_reset:()=>UV,system_run_in_background:()=>GV,system_ticks_diff:()=>_B,system_timer:()=>oB,system_timer_init:()=>pB,system_timestamp:()=>WV,system_value:()=>KV,system_wait:()=>wV,system_wdt_feed:()=>uB,system_wdt_init:()=>aB,time_ticks_diff:()=>TB,timer:()=>sB,timer2:()=>IB});var at={};t.r(at),t.d(at,{Air_daily_content:()=>DB,Air_now_content:()=>cB,Geo_moon_content:()=>FB,Geo_sun_content:()=>fB,Life_suggestion_content:()=>CB,Location_search_content:()=>AB,Tide_daily_content:()=>SB,WEATHER_DAILY:()=>mB,WEATHER_HOUR:()=>EB,WEATHER_NOW:()=>hB,Weather_alarm_content:()=>gB,Weather_daily:()=>LB,Weather_daily_content:()=>NB,Weather_now:()=>OB,Weather_now_content:()=>RB});var ut={};t.r(ut),t.d(ut,{analog_input:()=>HB,analog_output:()=>WB,espnow_channel:()=>GB,haskylens_model:()=>UB,i2c_A_pin:()=>KB,i2c_B_pin:()=>JB,pins_analog:()=>$B,pins_analog_pin:()=>ZB,pins_axis:()=>MG,pins_brightness:()=>hG,pins_builtinimg:()=>aG,pins_builtinimg_extern:()=>uG,pins_button:()=>iG,pins_dac:()=>tG,pins_dac_pin:()=>eG,pins_digital:()=>xB,pins_digital_dot:()=>SG,pins_digital_pin:()=>bB,pins_exlcdh:()=>IG,pins_exlcdv:()=>TG,pins_imglist:()=>rG,pins_input_pin:()=>yB,pins_mpython_touch:()=>BB,pins_one_more:()=>CG,pins_output_pin:()=>VB,pins_playlist:()=>dG,pins_playlist_extern:()=>lG,pins_pwm:()=>nG,pins_pwm_pin:()=>sG,pins_radio_datarate:()=>gG,pins_radio_power:()=>cG,pins_serial:()=>pG,pins_tone_notes:()=>RG,pins_touch:()=>_G,pins_touch_pin:()=>oG,pins_tts_bgmusic:()=>OG,pins_tts_builtin_music:()=>EG,pins_tts_voice:()=>mG,pwm_input:()=>wB,pwm_output:()=>kB,spi_A_pin:()=>QB,spi_B_pin:()=>qB,spi_C_pin:()=>zB,spi_D_pin:()=>jB});var rt={};t.r(rt),t.d(rt,{espnow_channel:()=>XG,haskylens_model:()=>xG,pins_analog:()=>PG,pins_analog_pin:()=>FG,pins_axis:()=>QG,pins_brightness:()=>jG,pins_builtinimg:()=>HG,pins_builtinimg_extern:()=>kG,pins_button:()=>LG,pins_dac:()=>VG,pins_dac_pin:()=>yG,pins_digital:()=>AG,pins_digital_dot:()=>oU,pins_digital_pin:()=>NG,pins_exlcdh:()=>qG,pins_exlcdv:()=>zG,pins_imglist:()=>WG,pins_input_pin:()=>DG,pins_interrupt:()=>UG,pins_mpython_touch:()=>bG,pins_one_more:()=>sU,pins_output_pin:()=>fG,pins_playlist:()=>KG,pins_playlist_extern:()=>JG,pins_pwm:()=>YG,pins_pwm_pin:()=>vG,pins_radio_datarate:()=>nU,pins_radio_power:()=>iU,pins_serial:()=>wG,pins_tone_notes:()=>eU,pins_touch:()=>GG,pins_touch_pin:()=>BG,pins_tts_bgmusic:()=>tU,pins_tts_builtin_music:()=>ZG,pins_tts_voice:()=>$G});const dt=Blockly,lt=Mixly,It={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(_+=n)):i=_}else i="i";return i}},Tt=It; -/** - * @license - * Visual Blocks Editor - * - * Copyright 2012 Google Inc. - * https://developers.google.com/blockly/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class Mt{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(dt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(dt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(dt.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_if_else");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(dt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(dt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(dt.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Xt={init:function(){this.setColour(Dt),this.appendValueInput("FROM").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.PYTHON_RANGE).appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(dt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},xt={init:function(){this.setColour(Dt),this.appendValueInput("LIST").setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(dt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(dt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return dt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},bt={init:function(){this.setColour(Dt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(dt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new dt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(dt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+dt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:dt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:dt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},yt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(dt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new dt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(dt.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(dt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(dt.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_finally");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(dt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(dt.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Vt={init:function(){this.setColour(Dt);var t=new dt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(dt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(dt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:dt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:dt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(dt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Bt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new dt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(dt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return dt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Gt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new dt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(dt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return dt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};bt.OPERATORS=[[dt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[dt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Vt.OPERATORS=[[dt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[dt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Ut={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(dt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},wt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Ht={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(dt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},kt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},Wt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(dt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Kt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(dt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Jt={init:function(){this.jsonInit({message0:dt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:Dt,tooltip:dt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:dt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Qt={init:function(){this.setColour(Dt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(dt.Msg.MIXLY_STAT),this.setOutput(!0)}},qt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},zt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(dt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},jt={init:function(){this.appendDummyInput().appendField(dt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+dt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(dt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new dt.FieldDropdown([[dt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[dt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},$t={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zt={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},te={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},ee={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(dt.Msg.PROCEDURES_DEFRETURN_RETURN+dt.Msg.MIXLY_GET_UNIQUE_IDEN)}},ie={init:function(){this.setColour(Dt),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(dt.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},ne={init:function(){this.setColour(Dt),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},se=230;dt.FieldTextInput.math_number_validator=function(t){return String(t)},dt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const oe={init:function(){this.setColour(se),this.appendDummyInput().appendField(new dt.FieldTextInput("0",dt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MATH_NUMBER_TOOLTIP)}},_e={init:function(){this.setColour(se);this.appendDummyInput("").appendField(dt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new dt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:dt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:dt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},pe={init:function(){this.setColour(se);this.appendDummyInput("").appendField(dt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new dt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:dt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:dt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},ae={init:function(){this.setColour(se),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new dt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:dt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:dt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:dt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:dt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:dt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:dt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:dt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},ue={init:function(){this.setColour(se),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new dt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:dt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:dt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:dt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:dt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:dt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:dt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:dt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},re={init:function(){this.setColour(se),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new dt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},de={init:function(){this.setColour(se),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new dt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:dt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:dt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:dt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:dt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:dt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:dt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:dt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},le={init:function(){var t=[[dt.Msg.MATH_BIN,"bin"],[dt.Msg.MATH_OCT,"oct"],[dt.Msg.MATH_HEX,"hex"]];this.setColour(se),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new dt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:dt.Msg.MATH_DEC_TOOLTIP_BIN,oct:dt.Msg.MATH_DEC_TOOLTIP_OCT,hex:dt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Ie={init:function(){var t=[[dt.Msg.LANG_MATH_TO_ROUND,"round"],[dt.Msg.LANG_MATH_TO_CEIL,"ceil"],[dt.Msg.LANG_MATH_TO_FLOOR,"floor"],[dt.Msg.MATH_ABS,"fabs"],[dt.Msg.MATH_SQRT,"sqrt"]];this.setColour(se),this.appendValueInput("A").setCheck(Number).appendField(new dt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:dt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:dt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:dt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:dt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:dt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:dt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Te={init:function(){var t=[[dt.Msg.MIXLY_MAX,"max"],[dt.Msg.MIXLY_MIN,"min"]];this.setColour(se),this.appendValueInput("A").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(new dt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(dt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:dt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:dt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Me={init:function(){var t=[[dt.Msg.MATH_TWO,"two"],[dt.Msg.MATH_EIGHT,"eight"],[dt.Msg.MATH_TEN,"ten"],[dt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(se),this.appendDummyInput("").appendField(dt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new dt.FieldDropdown(t),"OP").appendField(dt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(dt.Msg.MATH_ZHW).appendField(new dt.FieldDropdown(t),"OP2").appendField(dt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:dt.Msg.MATH_Before_two,eight:dt.Msg.MATH_Before_eight,ten:dt.Msg.MATH_Before_ten,sixteen:dt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:dt.Msg.MATH_Behind_two,eight:dt.Msg.MATH_Behind_eight,ten:dt.Msg.MATH_Behind_ten,sixteen:dt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},he={init:function(){var t=[[dt.Msg.LANG_MATH_INT,"int"],[dt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(se),this.setOutput(!0,Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new dt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(dt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:dt.Msg.LANG_MATH_INT,float:dt.Msg.LANG_MATH_FLOAT_RANDOM};return dt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},me={init:function(){this.setColour(se),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(dt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(dt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(dt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(dt.Msg.MATH_CONSTRAIN_TOOLTIP)}},Ee={init:function(){this.setColour(se),this.appendValueInput("NUM",Number).appendField(dt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(dt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(dt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Oe={init:function(){this.setColour(se),this.appendDummyInput().appendField(new dt.FieldTextInput("0",dt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(dt.Msg.MATH_NUMBER_TOOLTIP)}},Re={init:function(){this.setColour(se),this.appendValueInput("NUM").setCheck(Number).appendField(dt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},ce={init:function(){this.setColour(se),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(dt.Msg.MATH_ROUND).appendField(dt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(dt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(dt.Msg.MATH_ROUND_NEW_TOOLTIP)}},ge={init:function(){var t=[[dt.Msg.MIXLY_TO_INT,"int"],[dt.Msg.MIXLY_TO_FLOAT,"float"],[dt.Msg.MIXLY_TO_BITES,"b"],[dt.Msg.LANG_MATH_BYTE+dt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(se),this.appendValueInput("VAR").appendField(new dt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:dt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:dt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:dt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},Ce={init:function(){var t=[[dt.Msg.MIXLY_TO_INT,"int"],[dt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(se),this.appendValueInput("VAR").appendField(new dt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:dt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:dt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},Se=Ee,Ae={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(dt.Msg.LANG_MATH_BYTE+dt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},Le={init:function(){this.setColour(se),this.itemCount_=1,this.setMutator(new dt.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(dt.Msg.MIXLY_PRODUCT+dt.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(dt.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(dt.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(dt.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const ve={init:function(){this.setColour(fe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new dt.FieldTextInput("",dt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(dt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new dt.FieldImage(e,7,12,'"')}},Ye={init:function(){this.setColour(fe),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(dt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},Xe={init:function(){this.setColour(fe),this.appendValueInput("VAR").setCheck(Number).appendField(dt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},xe={init:function(){this.setColour(fe),this.appendValueInput("VAR").setCheck(String).appendField(dt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},be={init:function(){this.setColour(fe),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},ye={init:function(){this.setColour(fe),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Ve={init:function(){this.WHERE_OPTIONS=[[dt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[dt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[dt.Msg.TEXT_GET_INDEX_RANDOM+1+dt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(dt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(fe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(dt.Msg.LISTS_GET_INDEX_GET,"MODE"),dt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(dt.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=dt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=dt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=dt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=dt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+dt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",dt.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:dt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:dt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:dt.Msg.TEXT_GET_INDEX_RANDOM};return dt.Msg.PROCEDURES_DEFRETURN_RETURN+dt.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+dt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==dt.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),dt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(dt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new dt.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),dt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Be={init:function(){this.setHelpUrl(dt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(fe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(dt.Msg.LISTS_GET_INDEX_GET+" "+dt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(dt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(dt.Msg.PROCEDURES_DEFRETURN_RETURN+dt.Msg.MIXLY_MICROBIT_TYPE_STRING+dt.Msg.LISTS_GET_INDEX_FROM_START+"n"+dt.Msg.TEXT_CHARAT2)}},Ge={init:function(){this.setHelpUrl(dt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(fe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(dt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(dt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Ue={init:function(){this.WHERE_OPTIONS_1=[[dt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[dt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[dt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[dt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[dt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[dt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(dt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(fe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(dt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==dt.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==dt.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),dt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(dt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new dt.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},we={init:function(){this.setHelpUrl(dt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(fe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(dt.Msg.LISTS_GET_INDEX_GET+" "+dt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(dt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(dt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(dt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},He={init:function(){var t=[[dt.Msg.MIXLY_EQUALS,"==="],[dt.Msg.MIXLY_STARTSWITH,"startswith"],[dt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(fe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new dt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},ke={init:function(){this.setColour(fe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(dt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_COMPARETO_HELP)}},We={init:function(){var t=[[dt.Msg.TEXT_UPPER,"upper"],[dt.Msg.TEXT_TITLE,"title"],[dt.Msg.TEXT_CAPITALIZE,"capitalize"],[dt.Msg.TEXT_SWAPCASE,"swapcase"],[dt.Msg.TEXT_LOWER,"lower"]];this.setColour(fe),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new dt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:dt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:dt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:dt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:dt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:dt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Ke={init:function(){var t=[[dt.Msg.TEXT_LJUST,"ljust"],[dt.Msg.TEXT_CENTER,"center"],[dt.Msg.TEXT_RJUST,"rjust"]];this.setColour(fe),this.appendValueInput("VAR").appendField(new dt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(dt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(dt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Je={init:function(){this.setColour(fe),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(dt.Msg.MIXLY_MID+dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(dt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Qe={init:function(){this.setColour(fe),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(dt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(dt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},qe={init:function(){this.setColour(fe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(dt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(dt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},ze={init:function(){this.setColour(fe),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(dt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(dt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(dt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},je={init:function(){var t=[[dt.Msg.TEXT_TRIM_BOTH,"strip"],[dt.Msg.TEXT_TRIM_LEFT,"lstrip"],[dt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(fe),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(dt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new dt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(dt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:dt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:dt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:dt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},$e={init:function(){this.setColour(fe),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new dt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new dt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(dt.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Qi={init:function(){this.setColour(Ki),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(dt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},qi={init:function(){this.setColour(Ki),this.appendDummyInput().appendField(dt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},zi={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.DICT_KEYS),this.setTooltip(dt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},ji={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(dt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(dt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(dt.Msg.DICTS_GET_TOOLTIP)}},$i={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(dt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(dt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(dt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(dt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},Zi={init:function(){this.setColour(Ki),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(dt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(dt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},tn={init:function(){this.setColour(Ki),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(dt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(dt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.DICTS_DELETE_TOOLTIP)}},en={init:function(){this.setColour(Ki),this.appendValueInput("DICT2").setCheck("Dict").appendField(dt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(dt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MID),this.setTooltip(dt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},nn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.DICT_CLEAR),this.setTooltip(dt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.DICT_ITEMS),this.setTooltip(dt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},on={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.DICT_VALUES),this.setTooltip(dt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},_n={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_LENGTH),this.setTooltip(dt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},pn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.DICT_DELDICT),this.setTooltip(dt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},an={init:function(){this.MODE=[[dt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[dt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(dt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(dt.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=dt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=dt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==dt.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new dt.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},un={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(dt.Msg.DICTS_ADD_VALUE),this.setTooltip(dt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},rn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(dt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(dt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},dn={init:function(){this.setColour(Ki),this.appendDummyInput("").appendField(new dt.FieldLabel(dt.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new dt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(dt.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},ln={init:function(){this.setColour(Ki),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(dt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},In={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_TO_JSON),this.setTooltip(dt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Tn={init:function(){this.setColour(Ki),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(dt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Mn={init:function(){this.setColour(Ki),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},hn={init:function(){this.setColour(Ki),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_TO_JSON),this.setTooltip(dt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},mn=210,En={init:function(){var t=dt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(mn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new dt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:dt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:dt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:dt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:dt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:dt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:dt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},On={init:function(){var t=dt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=dt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(mn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new dt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new dt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Rn={init:function(){var t=[[dt.Msg.LOGIC_OPERATION_AND,"AND"],[dt.Msg.LOGIC_OPERATION_OR,"OR"],[dt.Msg.LOGIC_OPERATION_NOR,"NOR"],[dt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(mn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new dt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:dt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:dt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:dt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:dt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},cn={init:function(){this.setColour(mn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(dt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(dt.Msg.LOGIC_NEGATE_TOOLTIP)}},gn={init:function(){var t=[[dt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[dt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(mn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new dt.FieldDropdown(t),"BOOL"),this.setTooltip(dt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Cn={init:function(){this.setColour(mn),this.setOutput(!0),this.appendDummyInput().appendField(dt.Msg.LOGIC_NULL),this.setTooltip(dt.Msg.LOGIC_NULL_TOOLTIP)}},Sn={init:function(){this.setColour(mn),this.appendValueInput("A"),this.appendValueInput("B").appendField(dt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(dt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},An={init:function(){var t=[[dt.Msg.TEXT_APPEND_TO,"in"],[dt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(mn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new dt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(dt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(dt.Msg.IN)}},Ln={init:function(){var t=[[dt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[dt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(mn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new dt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},Nn={init:function(){this.setColour(mn),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(dt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Dn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(dt.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},fn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=dt.Msg.MIXLY_USE,n=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=dt.Msg.MIXLY_BELONG;return i+{r:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Fn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=dt.Msg.MIXLY_USE,n=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=dt.Msg.MIXLY_BELONG,_=dt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},Pn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(dt.Msg.MIXPY_TEXT_ENCODE).appendField(new dt.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=dt.Msg.MIXLY_USE,n=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=dt.Msg.MIXLY_BELONG,_=dt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},vn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+dt.Msg.MIXLY_MICROBIT_TYPE_STRING+dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Yn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Xn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},xn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(dt.Msg.MICROBIT_PYTHON_TYPE)}},bn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(dt.Msg.HTML_FILE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},yn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Vn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Bn={init:function(){this.setColour(0),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};dt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Gn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+dt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},kn={init:function(){this.setColour(0),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Wn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return dt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+dt.Msg.MIXLY_ESP32_SET+{mkdir:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Kn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(dt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Jn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.HTML_FILE,"isfile"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return dt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+dt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},qn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(dt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_SETUP+dt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(dt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},zn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(dt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},jn={init:function(){var t=dt.Procedures.findLegalName("",this),e=new dt.FieldTextInput(t,dt.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new dt.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&dt.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(dt.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(dt.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(dt.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(dt.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=dt.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),dt.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{dt.Events.enable()}},mutationToDom:function(t){var e=dt.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(dt.Msg.MIXLY_AIP_ATTR).setAlign(dt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ws={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(dt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Ks={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(dt.Msg.HTML_FORM_CONTENT).appendField(new dt.FieldDropdown([[dt.Msg.HTML_TEXT,"text"],[dt.Msg.HTML_EMAIL,"email"],[dt.Msg.HTML_NUMBER,"number"],[dt.Msg.HTML_PASSWORD,"password"],[dt.Msg.HTML_CHECKBOX,"checkbox"],[dt.Msg.HTML_RADIOBUTTON,"radiobutton"],[dt.Msg.HTML_BUTTON,"button"],[dt.Msg.HTML_COLOUR,"colour"],[dt.Msg.HTML_DATE,"date"],[dt.Msg.HTML_LOCALTIME,"local time"],[dt.Msg.HTML_FILE,"file"],[dt.Msg.HTML_HIDDEN,"hidden"],[dt.Msg.HTML_IMAGE,"image"],[dt.Msg.HTML_MONTH,"month"],[dt.Msg.HTML_RANGE,"range"],[dt.Msg.HTML_RESET,"reset"],[dt.Msg.HTML_SEARCH,"search"],[dt.Msg.HTML_SUBMIT,"submit"],[dt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[dt.Msg.HTML_TIME,"time"],[dt.Msg.HTML_URL,"url"],[dt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(dt.Msg.HTML_NAME).appendField(new dt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(dt.Msg.HTML_VALUE).appendField(new dt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(dt.Msg.MIXLY_AIP_ATTR).setAlign(dt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Js={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(new dt.FieldTextInput("property"),"KEY").appendField(":").appendField(new dt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qs={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(new dt.FieldTextInput("property"),"KEY").appendField(":").appendField(new dt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qs={init:function(){this.setColour(Bs),this.appendDummyInput().appendField(dt.Msg.HTML_TEXT).appendField(new dt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zs=160,js={init:function(){this.setColour(zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new dt.FieldTable(""),"TEXT")}},$s={init:function(){this.setColour(zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new dt.FieldMultilineInput(""),"TEXT")}},Zs={init:function(){this.setColour(zs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new dt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},to={init:function(){this.setColour(zs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},eo={init:function(){this.setColour(zs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new dt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},io={init:function(){this.setColour(zs),this.appendValueInput("VALUE").appendField(dt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},no={init:function(){this.setColour(zs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new dt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(dt.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=dt.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+t+", "+e+", "+i+")"},dt.isNumber(n)&&dt.isNumber(s)&&dt.isNumber(o))n=parseFloat(n),s=parseFloat(s),o=Math.abs(parseFloat(o)),0==n%1&&0==s%1&&0==o%1?(n<=s?(s++,t=0==n&&1==o?s:n+", "+s,1!=o&&(t+=", "+o)):t=n+", "+--s+", -"+o,t="range("+t+")"):(t=n",GTE:">="};const $p=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",o=e.valueToCode(this,"B",n)||"False";if("AND"==i)var _=s+" and "+o;else if("OR"==i)_=s+" or "+o;else if("NOR"==i)_="not("+s+"^"+o+")";else _=s+"^"+o;return[_,n]},Zp=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},ta=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},ea=function(t,e){return["None",e.ORDER_ATOMIC]},ia=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},na=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},sa=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},oa=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},_a=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},pa=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},aa=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},ua=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ra=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},da=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},la=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ia=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ta=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Ma=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},ha=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},ma=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Ea=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Oa=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ra=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},ca=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},ga=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Ca=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Sa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Aa=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},La=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},Na=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Da=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},fa=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),dt.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var o=[],_=0;_\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},ru=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},du=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},lu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Iu=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Tu=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Mu=function(t,e){return'"},hu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},mu=function(){return this.getFieldValue("TEXT")+"\n"},Eu=function(t){return t.getFieldValue("TEXT")+"\n"},Ou=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Ru=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},cu=function(){return""},gu=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Cu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+u.join("\n")},Nu.scrubNakedValue=function(t){return t+"\n"},Nu.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},Nu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Nu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=dt.utils.string.wrap(o,Nu.COMMENT_WRAP-3),n+=Nu.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const Du="#74A55B",fu={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(dt.Msg.MIXLY_RGB_PIN_COUNT)}},Fu={init:function(){this.setColour(Du),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(dt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Pu={init:function(){this.setColour(Du),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(dt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},vu={init:function(){this.setColour(Du),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(dt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Yu={init:function(){this.setColour(Du),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(dt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(dt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Xu={init:function(){this.setColour(Du),this.appendValueInput("SUB"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},xu={init:function(){this.setColour(Du),this.appendValueInput("SUB"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_RESET)}},bu={init:function(){this.setColour(Du),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yu={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING).appendField(dt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Vu={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(dt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Bu={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(dt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Gu={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING).appendField(dt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Uu={init:function(){this.setColour(Du),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_SETUP+dt.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},wu={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_SERVO).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SERVO_MOVE)}},Hu={init:function(){this.setColour(Du),this.appendValueInput("VAR").appendField("360°"+dt.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SETTING+dt.Msg.blockpy_turtle_rotate+dt.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},ku={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).appendField("180°"+dt.Msg.MIXLY_SERVO).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SERVO_MOVE)}},Wu={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).appendField("360°"+dt.Msg.MIXLY_SERVO).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},Ku={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).appendField("180°"+dt.Msg.MIXLY_SERVO).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ju={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).appendField("360°"+dt.Msg.MIXLY_SERVO).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Qu={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new dt.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(dt.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},qu={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Direction).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[dt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[dt.Msg.MOTOR_N,"ms32006.MOT_N"],[dt.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},zu={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new dt.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Direction).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[dt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},ju={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(dt.Msg.MIXLY_RGB_PIN_COUNT)}},$u={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},Zu={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},tr={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_WRI)}},er={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.MIXLY_DURATION).appendField(dt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ir={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.PYTHON_RANGE_STEP).appendField(dt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},nr={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(dt.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new dt.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_SETUP+dt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new dt.FieldDropdown([["SYN6288"+dt.Msg.MIXLY_AipSpeech_synthesis,"SYN6288"],["NS9300"+dt.Msg.MIXLY_MUSIC_PLAYER,"NS9300"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},sr={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_WHETHER).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_STOPPED,"0"],[dt.Msg.MIXLY_PLAYING,"1"],[dt.Msg.MIXLY_PAUSED,"2"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},or={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_STAT).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MP3_PLAY,"1"],[dt.Msg.MIXLY_MP3_PAUSE,"2"],[dt.Msg.MIXLY_STOP,"3"],[dt.Msg.MIXLY_MP3_PREV,"4"],[dt.Msg.MIXLY_MP3_NEXT,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_r={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendValueInput("volume").appendField(dt.Msg.MIXLY_MP3_VOL+dt.Msg.MIXLY_STAT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_PLAYER_SET_VOLUME_TOOLTIP)}},pr={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MODE+dt.Msg.MIXLY_STAT).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MP3_LOOP_ALL,"0"],[dt.Msg.MIXLY_MP3_LOOP_ONE,"1"],[dt.Msg.MIXLY_PLAYER_DIRECTORY_LOOP,"2"],[dt.Msg.MIXLY_MP3_LOOP_RAM,"3"],[dt.Msg.MIXLY_PLAYER_SINGLE_STOP,"4"],[dt.Msg.MIXLY_PLAYER_SEQUENTIAL_PLAY,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ar={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_START_MELODY,"play"],[dt.Msg.MIXLY_PLAYER_INSERT_MUSIC,"insert"]]),"key"),this.appendValueInput("song"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_PLAYER_PLAY_MUSIC_TOOTIP)}},ur={},rr={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(dt.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},dr={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},lr={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(dt.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(dt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},Ir={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(dt.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(dt.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(dt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},Tr={init:function(){this.setColour(Du),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Mr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_MOTOR).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},hr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_MOTOR).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},mr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_TRAFFIC_LIGHT).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.LISTS_SET_INDEX_SET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[dt.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[dt.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[dt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[dt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[dt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[dt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Er={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN).appendField(new dt.FieldDropdown([[dt.Msg.COLOUR_RGB_WHITE,"W"],[dt.Msg.COLOUR_RGB_RED,"R"],[dt.Msg.COLOUR_RGB_YELLOW,"Y"],[dt.Msg.COLOUR_RGB_GREEN,"G"],[dt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Or={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN).appendField(new dt.FieldDropdown([[dt.Msg.COLOUR_RGB_WHITE,"W"],[dt.Msg.COLOUR_RGB_RED,"R"],[dt.Msg.COLOUR_RGB_YELLOW,"Y"],[dt.Msg.COLOUR_RGB_GREEN,"G"],[dt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Rr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_SERVO_MOTOR).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[dt.Msg.MIXLY_SPEED,"[1]"],[dt.Msg.MATH_SINGLE_OP_ABSOLUTE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[dt.Msg.MIXLY_RELATIVE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[dt.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[dt.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[dt.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},cr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_SERVO_MOTOR).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[dt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[dt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},gr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_SERVO_MOTOR).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Cr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_SERVO_MOTOR).appendField(dt.Msg.MATH_SINGLE_OP_ABSOLUTE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+dt.Msg.MSG.run).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MODE).setAlign(dt.inputs.Align.RIGHT).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_SPEED+dt.Msg.MIXLY_MODE,"0"],[dt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+dt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(dt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(dt.inputs.Align.RIGHT).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"0"],[dt.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[dt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},Sr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_SERVO_MOTOR).appendField(dt.Msg.MIXLY_RELATIVE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+dt.Msg.MSG.run).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ar={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_SERVO_MOTOR).appendField(dt.Msg.MIXLY_RELATIVE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+dt.Msg.MSG.run).appendField("("+dt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MODE).setAlign(dt.inputs.Align.RIGHT).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_SPEED+dt.Msg.MIXLY_MODE,"0"],[dt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+dt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(dt.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},Lr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.ME_GO_MOTOR_EXTERN+dt.Msg.MIXLY_SERVO_MOTOR).appendField(dt.Msg.MIXLY_RELATIVE+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+dt.Msg.MSG.run).appendField("("+dt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LEFT,"0"],[dt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MODE).setAlign(dt.inputs.Align.RIGHT).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_SPEED+dt.Msg.MIXLY_MODE,"0"],[dt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+dt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(dt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(dt.inputs.Align.RIGHT).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"0"],[dt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Nr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.MIXBOT).appendField(dt.Msg.ME_GO_MOTOR_EXTERN).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MOTOR,"ext_motor"],[dt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[dt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[dt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[dt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[dt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[dt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[dt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},Dr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.MIXBOT).appendField(dt.Msg.ME_GO_MOTOR_EXTERN).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MOTOR,"ext_motor"],[dt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[dt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[dt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[dt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[dt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[dt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[dt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fr={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SETUP+dt.Msg.MIXLY_AT).appendField(dt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Fr={init:function(){this.setColour(Du),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING),this.appendValueInput("pin").appendField("LED"),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Pr={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SERVO+dt.Msg.MIXLY_SETUP+dt.Msg.MIXLY_AT).appendField(dt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},vr={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_SERVO),this.appendValueInput("angle").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE),this.appendDummyInput().appendField(dt.Msg.DRAW_POINTER_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yr={init:function(){this.setColour(Du),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_MOTOR+dt.Msg.MIXLY_SETUP+dt.Msg.MIXLY_AT).appendField(dt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Xr={init:function(){this.setColour(Du),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MOTOR),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+dt.Msg.MIXLY_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},xr="#6C9858",br={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(new dt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},yr={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_ESP32_ON,"1"],[dt.Msg.MIXLY_ESP32_OFF,"0"],[dt.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Vr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(dt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Br={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(dt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(dt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Gr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(dt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(dt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Ur={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(dt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_SETTING+dt.Msg.MIXLY_BUILDIN_LED+dt.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},wr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(dt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(dt.Msg.MIXLY_LCD_SETCOLOR).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_LIGHT_RED,"1"],[dt.Msg.MIXLY_LIGHT_GREEN,"2"],[dt.Msg.MIXLY_LIGHT_BLUE,"3"],[dt.Msg.MIXLY_LIGHT_YELLOW,"4"],[dt.Msg.MIXLY_LIGHT_CYAN,"5"],[dt.Msg.MIXLY_LIGHT_PURPLE,"6"],[dt.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Hr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING).appendField(dt.Msg.MIXLY_BUILDIN_LED).appendField(new dt.FieldDropdown([[dt.Msg.COLOUR_RGB_RED,"r"],[dt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_SETONOFF)}},kr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(dt.Msg.MIXLY_BUILDIN_LED).appendField(new dt.FieldDropdown([[dt.Msg.COLOUR_RGB_RED,"r"],[dt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(dt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Wr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(dt.Msg.MIXLY_BUILDIN_LED).appendField(new dt.FieldDropdown([[dt.Msg.COLOUR_RGB_RED,"r"],[dt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(dt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Kr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_SETTING).appendField(dt.Msg.MIXLY_BUILDIN_LED).appendField(new dt.FieldDropdown([[dt.Msg.COLOUR_RGB_RED,"r"],[dt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_SETTING+dt.Msg.MIXLY_BUILDIN_LED+dt.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},Jr={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(new dt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},Qr={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(lt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(dt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(dt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(dt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},qr={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},zr={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.MIXLY_DURATION).appendField(dt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},jr={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(dt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.PYTHON_RANGE_STEP).appendField(dt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},$r={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_WRI)}},Zr={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(lt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(dt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(dt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(dt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},td={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},ed={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(dt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.PYTHON_RANGE_STEP).appendField(dt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},id={init:function(){this.setColour(xr),this.appendValueInput("TICKS").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(dt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(dt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},nd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},sd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_RESET)}},od={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(dt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},_d={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(dt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},pd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ad={init:function(){this.setColour(xr),this.appendValueInput("LIST").appendField(dt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},ud={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MOTOR_DC).appendField(new dt.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Direction).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"CW"],[dt.Msg.ANTI_CLOCKWISE,"CCW"],[dt.Msg.MOTOR_P,"P"],[dt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},rd={init:function(){this.setColour(xr),this.appendDummyInput().appendField("MixGo Car").appendField(new dt.FieldDropdown([[dt.Msg.blockpy_forward,"F"],[dt.Msg.blockpy_backward,"B"],[dt.Msg.blockpy_left,"L"],[dt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},dd={init:function(){this.setColour(xr),this.appendDummyInput("").appendField("MixGo Car").appendField(new dt.FieldDropdown([[dt.Msg.MOTOR_P,"P"],[dt.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ld={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MOTOR_DC).appendField(new dt.FieldDropdown([[dt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[dt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Direction).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"CW"],[dt.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Id={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MOTOR_DC).appendField(new dt.FieldDropdown([[dt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[dt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(dt.Msg.MIXLY_STOP).appendField(new dt.FieldDropdown([[dt.Msg.MOTOR_P,"P"],[dt.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Td={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Md={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXBOT).appendField(new dt.FieldDropdown([[dt.Msg.blockpy_forward,"F"],[dt.Msg.blockpy_backward,"B"],[dt.Msg.blockpy_left,"L"],[dt.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[dt.Msg.MIXLY_SPEED,"SPEED"],[dt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},hd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXBOT).appendField(new dt.FieldDropdown([[dt.Msg.MOTOR_P,"P"],[dt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},md={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXBOT).appendField(dt.Msg.MIXLY_MOTOR).appendField(new dt.FieldDropdown([[dt.Msg.TEXT_TRIM_LEFT,"1"],[dt.Msg.TEXT_TRIM_RIGHT,"2"],[dt.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[dt.Msg.MIXLY_SPEED,"SPEED"],[dt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Ed={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[dt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Od={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.BITBOT).appendField(new dt.FieldDropdown([[dt.Msg.blockpy_forward,"F"],[dt.Msg.blockpy_backward,"B"],[dt.Msg.blockpy_left,"L"],[dt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Rd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.BITBOT).appendField(new dt.FieldDropdown([[dt.Msg.MOTOR_P,"P"],[dt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.BITBOT).appendField(dt.Msg.MIXLY_MOTOR).appendField(new dt.FieldDropdown([[dt.Msg.TEXT_TRIM_LEFT,"0"],[dt.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Direction).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"CW"],[dt.Msg.ANTI_CLOCKWISE,"CCW"],[dt.Msg.MOTOR_P,"P"],[dt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},gd={init:function(){this.setColour(xr),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Cd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Sd={init:function(){this.setColour(xr),this.appendValueInput("bright").appendField(dt.Msg.MIXLY_SETTING+dt.Msg.MIXLY_MIXBOT_BUZZER+dt.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Ad={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_MIXBOT_BUZZER+dt.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Ld={init:function(){this.setColour(xr),this.appendValueInput("PATH").appendField(dt.Msg.MIXLY_RECORD_AUDIO).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(dt.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Nd={init:function(){this.setColour(xr),this.appendValueInput("PATH").appendField(dt.Msg.MIXLY_PLAY_AUDIO).appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Dd={init:function(){this.setColour(xr),this.appendValueInput("PATH").appendField(dt.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},fd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(dt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Fd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.LISTS_SET_INDEX_SET+dt.Msg.ME_GO_MOTOR_EXTERN).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([["1","1"],["2","2"],["3","3"],["4","4"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.blynk_IOT_IR_POWER+dt.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},vd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.ME_GO_MOTOR_EXTERN).appendField(dt.Msg.PIN_NUMBERING).appendField(new dt.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.blynk_IOT_IR_POWER+dt.Msg.MIXLY_PINMODEOUT+dt.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Yd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.LISTS_SET_INDEX_SET+dt.Msg.ME_GO_MOTOR_EXTERN).appendField(dt.Msg.MIXLY_ALL+dt.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(dt.ALIGN_RIGHT).appendField(dt.Msg.blynk_IOT_IR_POWER+dt.Msg.MIXLY_PINMODEOUT+dt.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Xd={init:function(){this.setColour(xr),this.appendDummyInput().appendField(dt.Msg.ANALOG+dt.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(dt.Msg.MIXLY_RELEASE).appendField(new dt.FieldDropdown([[dt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[dt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.ANALOG+dt.Msg.MIXLY_KEYBOARD_INPUT)}},xd={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_SPECIAL_KEY).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[dt.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[dt.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[dt.Msg.MIXLY_SPECIAL_KEY4,"0x04"],[dt.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[dt.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[dt.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[dt.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[dt.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},bd={init:function(){this.setColour(xr),this.appendDummyInput("").appendField(dt.Msg.MIXLY_GENERAL_KEY).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],["A","0x04"],["B","0x05"],["C","0x06"],["D","0x07"],["E","0x08"],["F","0x09"],["G","0x0A"],["H","0x0B"],["I","0x0C"],["J","0x0D"],["K","0x0E"],["L","0x0F"],["M","0x10"],["N","0x11"],["O","0x12"],["P","0x13"],["Q","0x14"],["R","0x15"],["S","0x16"],["T","0x17"],["U","0x18"],["V","0x19"],["W","0x1A"],["X","0x1B"],["Y","0x1C"],["Z","0x1D"],["1 !","0x1E"],["2 @","0x1F"],["3 #","0x20"],["4 $","0x21"],["5 %","0x22"],["6 ^","0x23"],["7 &","0x24"],["8 *","0x25"],["9 (","0x26"],["0 )","0x27"],["ENTER","0x28"],["ESC","0x29"],["BACKSPACE","0x2A"],["TAB","0x2B"],["SPACE","0x2C"],["- _","0x2D"],["= +","0x2E"],["[ {","0x2F"],["] }","0x30"],["\\ |","0x31"],["; :","0x33"],["' \"","0x34"],["` ~","0x35"],[", <","0x36"],[". >","0x37"],["/ ?","0x38"],["CAPS_LOCK","0x39"],["F1","0x3A"],["F2","0x3B"],["F3","0x3C"],["F4","0x3D"],["F5","0x3E"],["F6","0x3F"],["F7","0x40"],["F8","0x41"],["F9","0x42"],["F10","0x43"],["F11","0x44"],["F12","0x45"],["PRINTSCREEN","0x46"],["SCROLL_LOCK","0x47"],["PAUSE","0x48"],["INSERT","0x49"],["HOME","0x4A"],["PAGE_UP","0x4B"],["DELETE","0x4C"],["END","0x4D"],["PAGE_DOWN","0x4E"],["RIGHT","0x4F"],["LEFT","0x50"],["DOWN","0x51"],["UP","0x52"],["NUM_LOCK","0x53"],["/","0x54"],["*","0x55"],["-","0x56"],["+","0x57"],["ENTER","0x58"],["1","0x59"],["2","0x5A"],["3","0x5B"],["4","0x5C"],["5","0x5D"],["6","0x5E"],["7","0x5F"],["8","0x60"],["9","0x61"],["0","0x62"],[".","0x63"]]),"op"),this.setOutput(!0)}},yd={init:function(){this.setColour(xr),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new dt.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(dt.Msg.GENERALKEY_TUPLE_CREATE_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("generalkey_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;nnew Array(32).fill(0)))},Ch={init:function(){this.jsonInit({colour:Ih,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:dt.Msg.MIXLY_MICROBIT_Built_in_image1,message0:dt.Msg.MIXLY_MICROBIT_Built_in_image})}},Sh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new dt.FieldDropdown(lt.Profile.default.builtinimg),"image"),this.setOutput(!0,["esp32_image","List"])}},Ah={init:function(){this.setColour(Ih),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(dt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new dt.FieldDropdown(Ah.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":dt.Msg.MIXLY_MICROBIT_image_add,"-":dt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[dt.Msg.MICROBIT_DISPLAY_UNION,"add"],[dt.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Lh={init:function(){this.setColour(Ih),this.appendValueInput("A").setCheck("esp32_image").appendField(dt.Msg.MIXLY_MICROBIT_Invert_image1),this.setInputsInline(!0),this.setOutput(!0,"esp32_image")}},Nh={init:function(){this.setColour(Ih),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(dt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(dt.Msg.DISPLAY_IMAGE_LET2).appendField(new dt.FieldDropdown(Nh.OPERATORS),"OP"),this.appendValueInput("val").appendField(dt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(dt.Msg.DISPLAY_IMAGE_UNIT);lt.Boards.getSelectedBoardKey();"Python ESP32-S3"===lt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(dt.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=dt.Msg.DISPLAY_IMAGE_LET,n=dt.Msg.DISPLAY_IMAGE_LET2,s=dt.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:dt.Msg.MIXLY_UP,shift_down:dt.Msg.MIXLY_DOWN,shift_left:dt.Msg.MIXLY_LEFT,shift_right:dt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[dt.Msg.MIXLY_UP,"shift_up"],[dt.Msg.MIXLY_DOWN,"shift_down"],[dt.Msg.MIXLY_LEFT,"shift_left"],[dt.Msg.MIXLY_RIGHT,"shift_right"]]},Dh={init:function(){this.setColour(Ih),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},fh={init:function(){this.setColour(Ih),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Fh={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Ph={init:function(){this.setColour(Ih),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},vh={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Clear_display);lt.Boards.getSelectedBoardKey();"Python ESP32-S3"===lt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(dt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Clear_display)}},Yh={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.MIXLY_SHOW+dt.Msg.MIXLY_DISPLAY_MATRIX_WRITE_NOW),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Xh={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<8;i++)e.appendField(new dt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},xh={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(dt.inputs.Align.CENTRE).appendField(new dt.FieldBitmap(xh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},bh={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new dt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},yh={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(dt.inputs.Align.CENTRE).appendField(new dt.FieldBitmap(yh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},Vh={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<16;i++)e.appendField(new dt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,"esp32_image"),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Bh={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(dt.inputs.Align.CENTRE).appendField(new dt.FieldBitmap(Bh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},Gh={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.OLED_SET_FONT).appendField(new dt.FieldDropdown(Gh.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+dt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+dt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+dt.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Uh={init:function(){this.setColour(Ih),this.appendValueInput("data").appendField(dt.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.OLED_BITMAP_OR_STRING)}},wh={init:function(){this.setColour(Ih),this.appendValueInput("data").appendField(dt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.OLED_BITMAP_OR_STRING)}},Hh={init:function(){this.setColour(Ih),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(dt.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.OLED_BITMAP_OR_STRING)}},kh={init:function(){this.setColour(Ih),this.appendValueInput("data").setCheck(String).appendField(dt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(dt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(dt.Msg.TEXT_CENTER).appendField(new dt.FieldDropdown([[dt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[dt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},Wh={init:function(){this.setColour(Ih),this.appendValueInput("data").setCheck(String).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(dt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},Kh={init:function(){this.setColour(Ih),this.appendValueInput("data").setCheck(String).appendField(dt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Jh={init:function(){this.setColour(Ih),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Qh={init:function(){this.jsonInit({colour:Ih,args0:[{name:"state",options:[[dt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[dt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"shape",options:[[dt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[dt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"}],inputsInline:!0,helpUrl:dt.Msg.mpython_HELPURL,tooltip:dt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:dt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},qh={init:function(){this.jsonInit({colour:Ih,args0:[{name:"state",options:[[dt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[dt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"dir_h_v",options:[[dt.Msg.mpython_vertical,"0"],[dt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"}],inputsInline:!0,helpUrl:dt.Msg.mpython_HELPURL,tooltip:dt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:dt.Msg.MPYTHON_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},zh={init:function(){this.jsonInit({colour:Ih,args0:[{name:"state",options:[[dt.Msg.mpython_display_hline_1,"1"],[dt.Msg.mpython_display_hline_0,"0"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"}],inputsInline:!0,helpUrl:dt.Msg.mpython_HELPURL,tooltip:dt.Msg.mpython_display_line_TOOLTIP,message0:dt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},jh={init:function(){this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new dt.FieldDropdown(jh.IMAGES),"path"),this.setColour(Ih),this.setOutput(!0)},IMAGES:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]]},$h={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<5;i++)e.appendField(new dt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Zh={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(dt.inputs.Align.CENTRE).appendField(new dt.FieldBitmap(Zh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},tm={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},em={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_AMBIENTBRIGHT),this.setInputsInline(!0),this.setOutput(!0,Number)}},im={init:function(){this.setColour(Ih),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},nm={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new dt.FieldDropdown(nm.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[dt.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[dt.Msg.CLOCKWISE+"90"+dt.Msg.blockpy_setheading_degree,"1"],[dt.Msg.CLOCKWISE+"180"+dt.Msg.blockpy_setheading_degree,"2"],[dt.Msg.CLOCKWISE+"270"+dt.Msg.blockpy_setheading_degree,"3"]]},sm={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<12;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new dt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},om={init:function(){this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(dt.inputs.Align.CENTRE).appendField(new dt.FieldBitmap(om.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Ih),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},_m={init:function(){this.setColour(Ih),this.appendValueInput("data").appendField(dt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(dt.Msg.HTML_COLOUR);lt.Boards.getSelectedBoardKey();"Python ESP32-S3"===lt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(dt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},pm={init:function(){this.setColour(Ih),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.OLED_BITMAP).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("direct").setCheck(String).appendField(dt.Msg.MIXLY_AipImageClassify_Image+dt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},am={init:function(){this.setColour(Ih),this.appendValueInput("data").setCheck(String).appendField(dt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(dt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(dt.Msg.TEXT_CENTER).appendField(new dt.FieldDropdown([[dt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[dt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.appendValueInput("VAR").appendField(dt.Msg.HTML_COLOUR);lt.Boards.getSelectedBoardKey();"Python ESP32-S3"===lt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(dt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},um={init:function(){this.setColour(Ih),this.appendValueInput("data").setCheck(String).appendField(dt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.appendValueInput("VAR").appendField(dt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},rm={init:function(){this.jsonInit({colour:Ih,args0:[{name:"shape",options:[[dt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[dt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:dt.Msg.mpython_HELPURL,tooltip:dt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:dt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},dm={init:function(){this.jsonInit({colour:Ih,args0:[{name:"dir_h_v",options:[[dt.Msg.mpython_vertical,"0"],[dt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:dt.Msg.mpython_HELPURL,tooltip:dt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:dt.Msg.ONBOARD_TFT_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},lm={init:function(){this.jsonInit({colour:Ih,args0:[{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:dt.Msg.mpython_HELPURL,tooltip:dt.Msg.mpython_display_line_TOOLTIP,message0:dt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},Im={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(dt.Msg.HTML_COLOUR),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},Tm={init:function(){this.setColour(Ih),this.appendValueInput("x").setCheck(Number).appendField(dt.Msg.MIXLY_LCD_SETCOLOR).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("VAR").appendField(dt.Msg.HTML_COLOUR);lt.Boards.getSelectedBoardKey();"Python ESP32-S3"===lt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(dt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Mm={init:function(){this.setColour(Ih),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_SCREEN_FILL);lt.Boards.getSelectedBoardKey();"Python ESP32-S3"===lt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(dt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},hm={init:function(){this.setColour(Ih),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_INIT_CLOCK),this.appendDummyInput().appendField(dt.Msg.MIXLY_CENTER_POS),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.OLED_CIRCLE_RADIUS),this.appendValueInput("VAR").appendField(dt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},mm={init:function(){this.setColour(Ih),this.appendValueInput("SUB"),this.appendDummyInput().appendField(dt.Msg.GET_RTCTIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Em={init:function(){this.setColour(Ih),this.appendValueInput("SUB"),this.appendDummyInput().appendField(dt.Msg.SET_TIME),this.appendValueInput("h").setCheck(Number).appendField(dt.Msg.MIXLY_HOUR),this.appendValueInput("m").setCheck(Number).appendField(dt.Msg.MIXLY_MINUTE),this.appendValueInput("s").setCheck(Number).appendField(dt.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Om={init:function(){this.setColour(Ih),this.appendValueInput("SUB"),this.appendDummyInput().appendField(dt.Msg.DRAW_CLOCK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Rm={init:function(){this.setColour(Ih),this.appendValueInput("SUB"),this.appendDummyInput().appendField(dt.Msg.CLEAR_CLOCK),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_STM32_TFT_BACKGROUND_COLOR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cm={init:function(){this.jsonInit({colour:Ih,args0:[{name:"shape",options:[[dt.Msg.MPYTHON_DISPLAY_HOLLOW,"False"],[dt.Msg.MPYTHON_DISPLAY_SOLID,"True"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"r",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:dt.Msg.mpython_HELPURL,message0:dt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_CIRCLE_MESSAGE0,nextStatement:null,previousStatement:null})}},gm={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.DRAW_POINTER).appendField(dt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(dt.Msg.MIXLY_DRAW_POINTER_DU),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.DRAW_POINTER_TOOLTIP)}},Cm={init:function(){this.setColour(Ih),this.appendDummyInput().appendField(dt.Msg.DRAW_POINTER).appendField(dt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(dt.Msg.MIXLY_DRAW_POINTER_DU),this.appendValueInput("VAR").appendField(dt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.DRAW_POINTER_TOOLTIP)}},Sm={init:function(){this.setColour(Ih),this.appendValueInput("data").appendField(dt.Msg.MIXLY_Display_long_text),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(dt.Msg.HTML_COLOUR);lt.Boards.getSelectedBoardKey();"Python ESP32-S3"===lt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(dt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Am={init:function(){this.setColour(Ih),this.appendValueInput("data").appendField(dt.Msg.OLED_BITMAP),this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.OLED_BITMAP_OR_STRING),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Lm={init:function(){hh.init.call(this),this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Nm={init:function(){Oh.init.call(this),this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Dm={init:function(){Nh.init.call(this),this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},fm={init:function(){Fh.init.call(this),this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Fm={init:function(){Ph.init.call(this),this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Pm={init:function(){vh.init.call(this),this.appendDummyInput().appendField(`(${dt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(dt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},vm=180,Ym={init:function(){this.setColour(vm),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(dt.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(dt.Msg.DISPLAY_IMAGE_LET2).appendField(new dt.FieldDropdown(Ym.OPERATORS),"OP"),this.appendValueInput("val").appendField(dt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(dt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=dt.Msg.DISPLAY_IMAGE_LET,n=dt.Msg.DISPLAY_IMAGE_LET2,s=dt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:dt.Msg.MIXLY_UP,down:dt.Msg.MIXLY_DOWN,left:dt.Msg.MIXLY_LEFT,right:dt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[dt.Msg.MIXLY_UP,"up"],[dt.Msg.MIXLY_DOWN,"down"],[dt.Msg.MIXLY_LEFT,"left"],[dt.Msg.MIXLY_RIGHT,"right"]]},Xm={init:function(){this.setColour(vm),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(dt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new dt.FieldDropdown(Xm.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":dt.Msg.MIXLY_MICROBIT_image_add,"-":dt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[dt.Msg.MICROBIT_DISPLAY_UNION,"+"],[dt.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},xm={init:function(){this.setColour(vm),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+dt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new dt.FieldDropdown(xm.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+dt.Msg.MIXLY_MICROBIT_IMAGE+{height:dt.Msg.MIXLY_HEIGHT,width:dt.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[dt.Msg.MIXLY_HEIGHT,"height"],[dt.Msg.MIXLY_WIDTH,"width"]]},bm={init:function(){this.setColour(vm),this.appendValueInput("VAR").appendField(dt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RECT).appendField(new dt.FieldDropdown(bm.STATUS),"OP"),this.jsonInit({message0:dt.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_OLED_RECT)},STATUS:[[dt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[dt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},ym={init:function(){this.setColour(vm),this.appendValueInput("VAR").appendField(dt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new dt.FieldDropdown(ym.STATUS),"OP"),this.jsonInit({message0:dt.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[dt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[dt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Vm={init:function(){this.setColour(vm),this.appendValueInput("VAR").appendField(dt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_DISPLAY_DRAW+dt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new dt.FieldDropdown(Vm.STATUS),"OP"),this.jsonInit({message0:dt.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(dt.Msg.MIXLY_DISPLAY_DRAW+dt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[dt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[dt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Bm="#777777",Gm={init:function(){this.setColour(Bm),this.appendDummyInput("").appendField("from ").appendField(new dt.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new dt.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Um={init:function(){this.setColour(Bm),this.appendDummyInput("").appendField("import ").appendField(new dt.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wm={init:function(){this.setColour(Bm),this.appendDummyInput("").appendField(new dt.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new dt.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},fE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(dt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},FE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},PE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},vE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(dt.Msg.MIXLY_EMQX_SERVER).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(dt.Msg.MIXLY_WIFI_USERNAME).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(dt.Msg.MIXLY_IOT_PASSWORD).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(dt.Msg.MIXLY_EMQX_PROJECT).setAlign(dt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},YE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(dt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(dt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(dt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},XE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(dt.Msg.MIXLY_EMQX_SUBSCRIBE+dt.Msg.MIXLY_MICROBIT_MSG).appendField(dt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(dt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},xE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(dt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},VE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(dt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},BE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(dt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},GE={init:function(){this.setColour(gE),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},UE={init:function(){this.setColour(gE),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},wE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(dt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},HE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO").appendField(dt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(dt.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},kE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(dt.Msg.MIXLY_EMQX_SERVER).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(dt.Msg.CONTROLS_FOR_INPUT_WITH+dt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(dt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},WE={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(dt.Msg.MIXLY_EMQX_SERVER).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(dt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(dt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},KE={init:function(){this.VISITOR_ID=lt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(gE),this.appendDummyInput("").appendField(new dt.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},JE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MixIO").appendField(dt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},QE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("HTTP"+dt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(dt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(dt.Msg.MIXLY_REQUESTS_GET).appendField(dt.Msg.MIXLY_GET_CURRENT_TIME).appendField(dt.Msg.MIXLY_OPEN_DEBUG).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("HTTP"+dt.Msg.MIXLY_Client).appendField(dt.Msg.MIXLY_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[dt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[dt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},zE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MQTT"+dt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(dt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(dt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(dt.Msg.MQTT_Topic).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(dt.Msg.MIXLY_OPEN_DEBUG).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[dt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},jE={init:function(){this.setColour(gE),this.appendDummyInput().appendField("MQTT"+dt.Msg.MIXLY_Client).appendField(dt.Msg.MIXLY_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[dt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[dt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},$E=CE,ZE=SE,tO=AE,eO=LE,iO=DE,nO={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(dt.Msg.MIXLY_EMQX_SERVER).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(dt.Msg.MODEL_NAME).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(dt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sO=nO,oO={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(dt.Msg.MIXLY_EMQX_SERVER).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(dt.Msg.MIXLY_API_PRIVATE_KEY).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(dt.Msg.MODEL_NAME).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(dt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_O={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(dt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(dt.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pO={init:function(){this.setColour(gE),this.appendDummyInput().appendField(dt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(dt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(dt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},aO={init:function(){this.setColour(gE),this.appendDummyInput().appendField("Ollama "+dt.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},uO=225,rO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(dt.Msg.MIXLY_NETWORK_MODE).appendField(new dt.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},dO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[dt.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=dt.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:dt.Msg.MIXLY_NETWORK_WIFI_OPEN,False:dt.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},lO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},IO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return dt.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:dt.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},TO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(dt.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(dt.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},MO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_NETWORK_WIFI_CONNECT+dt.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},hO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[dt.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[dt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return dt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:dt.Msg.MIXLY_ESP32_NETWORK_IP,1:dt.Msg.MIXLY_ESP32_NETWORK_MASK,2:dt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},mO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},EO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[dt.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},OO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(dt.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(dt.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},RO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(dt.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},cO={init:function(){this.setColour(uO),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new dt.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},gO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},CO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},SO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},AO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},LO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},NO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},DO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},fO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},FO={init:function(){this.setColour(uO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},PO={init:function(){this.setColour(uO),this.appendValueInput("DOMAIN").appendField(dt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(dt.Msg.blockpy_REQUESTS_GET).appendField(new dt.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){dt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},vO={init:function(){this.appendValueInput("VAL"),this.setColour(uO),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new dt.FieldDropdown(vO.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:dt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:dt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:dt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[dt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[dt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[dt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[dt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},YO={init:function(){this.appendValueInput("VAR").appendField(dt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(uO),this.appendDummyInput("").appendField(dt.Msg.blockpy_CONDUCT).appendField(new dt.FieldDropdown(YO.METHOD),"DIR"),this.appendDummyInput("").appendField(dt.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:dt.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:dt.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},XO={init:function(){this.setColour(uO),this.appendDummyInput("").appendField(dt.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(dt.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},xO={init:function(){this.setColour(uO),this.appendDummyInput("").appendField(new dt.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},bO="#3288dd",yO={init:function(){this.setColour(bO),this.appendValueInput("URL").appendField(dt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(dt.Msg.blockpy_CONDUCT).appendField(new dt.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(dt.Msg.blockpy_REQUESTS).appendField(dt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},VO={init:function(){this.setColour(bO),this.appendValueInput("URL").appendField(dt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(dt.Msg.blockpy_CONDUCT).appendField(new dt.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(dt.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(dt.Msg.blockpy_REQUESTS+dt.Msg.OLED_STRING),this.appendDummyInput("").appendField(dt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},BO={init:function(){this.appendValueInput("VAL"),this.setColour(bO),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new dt.FieldDropdown(BO.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[dt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[dt.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[dt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[dt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[dt.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},GO={init:function(){this.setColour(bO),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(dt.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(dt.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(dt.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(dt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},UO={init:function(){this.setColour(bO),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(dt.Msg.MIXLY_EMQX_SERVER).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(dt.Msg.MIXLY_EMQX_PORT).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(dt.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(dt.Msg.MIXLY_WIFI_USERNAME).setAlign(dt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(dt.Msg.MIXLY_IOT_PASSWORD).setAlign(dt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wO={init:function(){this.setColour(bO),this.appendValueInput("TOPIC").appendField(dt.Msg.MIXLY_EMQX_SUBSCRIBE+dt.Msg.MIXLY_MICROBIT_MSG).appendField(dt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(dt.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},HO={init:function(){this.setColour(bO),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(dt.Msg.MIXLY_EMQX_SUBSCRIBE+dt.Msg.MIXLY_MICROBIT_MSG).appendField(dt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(dt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},kO={init:function(){this.setColour(bO),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(dt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(dt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(dt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},WO={init:function(){this.setColour(bO),this.appendDummyInput().appendField("mqtt"+dt.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},KO=100,JO={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("I2CSUB").appendField(dt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_SETUP+dt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(e),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},QO={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0,Number),this.setInputsInline(!0)}},qO={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField(dt.Msg.MOTOR_DC).appendField(dt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Direction).appendField(new dt.FieldDropdown([[dt.Msg.CLOCKWISE,"CW"],[dt.Msg.ANTI_CLOCKWISE,"CCW"],[dt.Msg.MOTOR_P,"P"],[dt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},zO={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField(dt.Msg.MOTOR_DC).appendField(dt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(dt.Msg.MIXLY_STEPPER_GET_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},jO={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+dt.Msg.MIXLY_SERVO).appendField(dt.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SERVO_MOVE)}},$O={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+dt.Msg.MIXLY_SERVO).appendField(dt.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(dt.inputs.Align.RIGHT).appendField(dt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},ZO={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+dt.Msg.MIXLY_SERVO),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},tR={init:function(){var t=lt.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(KO),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+dt.Msg.MIXLY_SERVO).appendField(dt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET+dt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},eR="#A58C5B",iR={init:function(){this.setColour(eR),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_BUTTON).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(dt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_SENOR_IS_PRESSED)}},nR={init:function(){this.setColour(eR),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_BUTTON).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(dt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_SENOR_WAS_PRESSED)}},sR={init:function(){this.setColour(eR),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_BUTTON).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(dt.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.PROCEDURES_DEFRETURN_RETURN+dt.Msg.MIXLY_BUTTON+dt.Msg.MIXLY_GET_PRESSES)}},oR={init:function(){this.setColour(eR),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_BUTTON).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MODE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[dt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[dt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(dt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},_R={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_shake,"shake"],[dt.Msg.MIXLY_UP,"up"],[dt.Msg.MIXLY_DOWN,"down"],[dt.Msg.MIXLY_LEFT,"left"],[dt.Msg.MIXLY_RIGHT,"right"],[dt.Msg.MIXLY_MICROBIT_face_up,"face up"],[dt.Msg.MIXLY_MICROBIT_face_down,"face down"],[dt.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(dt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=dt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=dt.Msg.MSG.catSensor,s=dt.Msg.MIXLY_MICROBIT_JS_STATE,o=dt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:dt.Msg.MIXLY_MICROBIT_shake,up:dt.Msg.MIXLY_UP,down:dt.Msg.MIXLY_DOWN,left:dt.Msg.MIXLY_LEFT,right:dt.Msg.MIXLY_RIGHT,"face up":dt.Msg.MIXLY_MICROBIT_face_up,"face down":dt.Msg.MIXLY_MICROBIT_face_down,freefall:dt.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+o}))}},pR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new dt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=dt.Msg.MIXLY_MICROBIT_Direction,s=dt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":dt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},aR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},uR={init:function(){this.setColour(eR),this.appendValueInput("PIN",Number).appendField(new dt.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new dt.FieldDropdown(uR.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:dt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[dt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[dt.Msg.MIXLY_GETHUMIDITY,"humidity"]]},rR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},dR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},lR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new dt.FieldDropdown([[dt.Msg.TEXT_TRIM_LEFT,"left"],[dt.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(dt.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=dt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=dt.Msg.MIXLY_ESP32_NEAR;return i+{left:dt.Msg.TEXT_TRIM_LEFT,right:dt.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},IR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_ALTITUDE_SENSOR+" BMP280").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[dt.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":dt.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":dt.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},TR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+" SHT20").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[dt.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":dt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":dt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},MR={init:function(){this.setColour(eR),this.appendValueInput("PIN",Number).appendField("DS18X20 "+dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(dt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},hR={init:function(){this.setColour(eR),this.appendDummyInput("").appendField("LM35"+dt.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(dt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(dt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(dt.Msg.MIXLY_TOOLTIP_LM35)}},mR={init:function(){this.setColour(eR),this.appendValueInput("I2CSUB").appendField(dt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_SETUP+dt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_ESP32_EXTERN_LIGHT+"(LTR308ALS)","LTR308"],[dt.Msg.MIXLY_COLOR_SENSOR+"(LTR381RGB)","LTR381RGB"],[dt.Msg.MIXLY_COLOR_SENSOR+"(UCS12071)","UCS12071"],[dt.Msg.MIXLY_EXTERN_LIGHTUV+"(LTR390UV)","LTR390UV"],[dt.Msg.MIXLY_ALTITUDE_SENSOR+"(HP203X)","HP203X"],[dt.Msg.MIXLY_ALTITUDE_SENSOR+"(SPL06_001)","SPL06_001"],[dt.Msg.MIXLY_ALTITUDE_SENSOR+"(MS5611)","MS5611"],[dt.Msg.MIXLY_ALTITUDE_SENSOR+"(BMP280)","BMP280"],[dt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHTC3)","SHTC3"],[dt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(AHT21)","AHT21"],[dt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHT20)","SHT20"],[dt.Msg.MIXLY_LASER_RANGE_SENSOR+"(VL53L0X)","VL53L0X"],[dt.Msg.MIXLY_GEOMAGNETIC_SENSOR+"(QMC5883L)","QMC5883L"],[dt.Msg.MIXLY_ESP32_MAX30102+"(MAX30102)","MAX30102"],[dt.Msg.HTML_COLOUR+"、"+dt.Msg.MIXLY_ENVIRONMENT_LIGHT+"、"+dt.Msg.MIXLY_NEXT+"、"+dt.Msg.MIXLY_ESP32_APDS9960+"(APDS9960)","APDS9960"],[dt.Msg.MIXLY_NINE_AXIS_SENSOR+"(MPU9250)","MPU9250"],[dt.Msg.MixGo_MPU9250+"(ADXL345)","ADXL345"],["RFID","RFID"],[dt.Msg.MIXLY_RADAR_SENSOR+"(CBR817)","CBR817"],[dt.Msg.MIXLY_AipSpeech_asr+"(CI130X)","CI130X"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},ER={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.LISTS_SET_INDEX_SET+dt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(dt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+dt.Msg.MIXLY_DELAY_TIME_RANGE)}},OR={init:function(){this.setColour(eR),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RADAR).appendField(dt.Msg.LISTS_SET_INDEX_SET+dt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(dt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+dt.Msg.MIXLY_DELAY_TIME_RANGE)}},RR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},cR={init:function(){this.setColour(eR),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RADAR).appendField(dt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},gR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_IDENTIFY_ONCE_AND_SAVE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},CR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_HELLO_XIAOZHI,"1"],[dt.Msg.MIXLY_XIAOZHIXIAOZHI,"2"],[dt.Msg.MIXLY_THE_FIRST,"3"],[dt.Msg.MIXLY_THE_SECOND,"4"],[dt.Msg.MIXLY_THE_THIRD,"5"],[dt.Msg.MIXLY_THE_FOURTH,"6"],[dt.Msg.MIXLY_THE_FIFTH,"7"],[dt.Msg.MIXLY_THE_SIXTH,"8"],[dt.Msg.MIXLY_THE_SEVENTH,"9"],[dt.Msg.MIXLY_THE_EIGHTH,"10"],[dt.Msg.MIXLY_THE_NINTH,"11"],[dt.Msg.MIXLY_THE_TENTH,"12"],[dt.Msg.MIXLY_THE_ELEVENTH,"13"],[dt.Msg.MIXLY_THE_TWELFTH,"14"],[dt.Msg.MIXLY_THE_13TH,"15"],[dt.Msg.MIXLY_THE_14TH,"16"],[dt.Msg.MIXLY_THE_15TH,"17"],[dt.Msg.MIXLY_THE_16TH,"18"],[dt.Msg.MIXLY_THE_17TH,"19"],[dt.Msg.MIXLY_THE_18TH,"20"],[dt.Msg.MIXLY_THE_19TH,"21"],[dt.Msg.MIXLY_THE_20TH,"22"],[dt.Msg.MIXLY_Turn_on_the_lights,"23"],[dt.Msg.MIXLY_Turn_off_the_lights,"24"],[dt.Msg.MIXLY_Turn_up_the_brightness,"25"],[dt.Msg.MIXLY_Turn_down_the_brightness,"26"],[dt.Msg.MIXLY_Set_it_to_red,"27"],[dt.Msg.MIXLY_Set_it_to_orange,"28"],[dt.Msg.MIXLY_Set_it_to_yellow,"29"],[dt.Msg.MIXLY_Set_it_to_green,"30"],[dt.Msg.MIXLY_Set_it_to_cyan,"31"],[dt.Msg.MIXLY_Set_it_to_blue,"32"],[dt.Msg.MIXLY_Set_it_to_purple,"33"],[dt.Msg.MIXLY_Set_it_to_white,"34"],[dt.Msg.MIXLY_Turn_on_the_fan,"35"],[dt.Msg.MIXLY_Turn_off_the_fan,"36"],[dt.Msg.MIXLY_First_gear,"37"],[dt.Msg.MIXLY_Wind_speed_second,"38"],[dt.Msg.MIXLY_Third_gear,"39"],[dt.Msg.MIXLY_Previous,"40"],[dt.Msg.MIXLY_Next_page,"41"],[dt.Msg.MIXLY_Show_smiley_face,"42"],[dt.Msg.MIXLY_Show_crying_face,"43"],[dt.Msg.MIXLY_Show_love,"44"],[dt.Msg.MIXLY_Close_display,"45"],[dt.Msg.MIXLY_Start_execution,"46"],[dt.Msg.MIXLY_FORWARD,"47"],[dt.Msg.MIXLY_BACKWARD,"48"],[dt.Msg.MIXLY_TURNLEFT,"49"],[dt.Msg.MIXLY_TURNRIGHT,"50"],[dt.Msg.MIXLY_STOP,"51"],[dt.Msg.MIXLY_Accelerate,"52"],[dt.Msg.MIXLY_retard,"53"],[dt.Msg.ROTATION_FORWARD,"54"],[dt.Msg.ROTATION_BACKWARD,"55"],[dt.Msg.MIXLY_Query_temperature,"56"],[dt.Msg.MIXLY_Query_humidity,"57"],[dt.Msg.MIXLY_Query_brightness,"58"],[dt.Msg.MIXLY_Query_sound,"59"],[dt.Msg.MIXLY_Query_time,"60"],[dt.Msg.MIXLY_Query_distance,"61"],[dt.Msg.MIXLY_Query_pressure,"62"],[dt.Msg.MIXLY_Query_key,"63"],[dt.Msg.MIXLY_Query_touch,"64"],[dt.Msg.MIXLY_Query_color,"65"]]),"cmd").appendField(dt.Msg.MIXLY_WHETHER+dt.Msg.MIXLY_BE_IDENTIFIED),this.setOutput(!0),this.setInputsInline(!0)}},SR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_RECOGNIZED_STATE,"status1"],[dt.Msg.MIXLY_WHETHER_BROADCAST,"status2"],[dt.Msg.MIXLY_THE_RECOGNIZED_CMD,"result"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_CI130X_GET_THE_RECOGNIZED_STATE_TOOLTIP)}},AR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MP3_PLAY).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[dt.Msg.MIXLY_WIND_SPEED,"154"],[dt.Msg.MIXLY_HYETAL,"155"],[dt.Msg.MIXLY_TEMPERATURE,"156"],[dt.Msg.MIXLY_Humidity,"157"],[dt.Msg.MIXLY_Altitude,"158"],[dt.Msg.MIXLY_SOUND,"159"],[dt.Msg.MIXLY_BRIGHTNESS,"160"],[dt.Msg.ME_GO_HALL_SENSOR_DISTANCE,"161"],[dt.Msg.MIXLY_SERVO,"162"],[dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"163"],[dt.Msg.MIXLY_BUTTON2,"164"],[dt.Msg.MIXLY_ESP32_TOUCH,"165"],[dt.Msg.MIXLY_PAY,"166"],[dt.Msg.MIXLY_CARSH_CHANGE,"167"],[dt.Msg.MIXLY_COUNTDOWN,"168"],[dt.Msg.MIXLY_TIMING,"169"],[dt.Msg.MIXLY_AT_THE_MOMENT,"170"],[dt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE,"171"],[dt.Msg.MIXLY_FORWARD,"172"],[dt.Msg.MIXLY_BACKWARD,"173"],[dt.Msg.MIXLY_TURNLEFT,"174"],[dt.Msg.MIXLY_TURNRIGHT,"175"],[dt.Msg.MIXLY_STOP,"176"],[dt.Msg.MIXLY_Accelerate,"177"],[dt.Msg.MIXLY_retard,"178"],[dt.Msg.ROTATION_FORWARD,"179"],[dt.Msg.ROTATION_BACKWARD,"180"],[dt.Msg.TUPLE_JOIN,"181"],[dt.Msg.MIXLY_SHOW,"182"],[dt.Msg.MIXLY_LAMPLIGHT,"183"],[dt.Msg.MIXLY_ACCELERATION,"184"]]),"star"),this.appendValueInput("NUM").appendField(dt.Msg.MIXLY_NUMBER),this.appendDummyInput("").appendField(dt.Msg.MIXLY_UNIT).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[dt.Msg.MIXLY_YEAR,"117"],[dt.Msg.MIXLY_MONTH,"118"],[dt.Msg.MIXLY_DAY,"119"],[dt.Msg.MIXLY_HOUR,"120"],[dt.Msg.MIXLY_MINUTE,"121"],[dt.Msg.MIXLY_SECOND,"122"],[dt.Msg.MIXLY_WEEK2,"123"],[dt.Msg.MIXLY_RMB_UNIT,"124"],[dt.Msg.blockpy_setheading_degree,"125"],[dt.Msg.MIXLY_GEAR,"126"],[dt.Msg.MIXLY_LAYER,"127"],[dt.Msg.MIXLY_GRAM,"128"],[dt.Msg.MIXLY_METER,"129"],[dt.Msg.MIXLY_CENTIMETER,"130"],[dt.Msg.MIXLY_MILLIMETER,"131"],[dt.Msg.MIXLY_LUMEN,"132"],[dt.Msg.MIXLY_DECIBEL,"133"],[dt.Msg.MIXLY_hectopascal,"134"],[dt.Msg.MIXLY_PERCENT,"135"],[dt.Msg.MIXLY_CELSIUS,"136"],[dt.Msg.MIXLY_METER_PER_SEC,"137"],[dt.Msg.MIXLY_MICROBIT_Turn_on_display,"138"],[dt.Msg.MIXLY_MICROBIT_Turn_off_display,"139"],[dt.Msg.MIXLY_SUCCESS,"140"],[dt.Msg.MIXLY_FAILED,"141"],[dt.Msg.MIXLY_WRONG,"142"],[dt.Msg.MIXLY_GOOD,"143"],[dt.Msg.MIXLY_blockpy_set_add,"144"],[dt.Msg.MIXLY_DECREASE,"145"],[dt.Msg.COLOUR_RGB_RED,"146"],[dt.Msg.COLOUR_RGB_ORANGE,"147"],[dt.Msg.COLOUR_YELLOW,"148"],[dt.Msg.COLOUR_RGB_GREEN,"149"],[dt.Msg.COLOUR_CYAN,"150"],[dt.Msg.COLOUR_RGB_BLUE,"151"],[dt.Msg.COLOUR_RGB_PURPLE,"152"],[dt.Msg.COLOUR_RGB_WHITE,"153"]]),"end"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},LR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.LISTS_SET_INDEX_SET+dt.Msg.MIXLY_SYSTEM+dt.Msg.MIXLY_CMD).appendField(new dt.FieldDropdown([[dt.Msg.MILXY_ENTER_WAKE_UP,"1"],[dt.Msg.MIXLY_INCREASE_VOLUME,"202"],[dt.Msg.MIXLY_REDUCE_VOLUME,"203"],[dt.Msg.MIXLY_MAX_VOLUME,"204"],[dt.Msg.MIXLY_MINIMUM,"205"],[dt.Msg.MIXLY_OPEN_RESPONSE,"206"],[dt.Msg.MIXLY_CLOSE_RESPONSE,"207"],[dt.Msg.MIXLY_QUIT_WAKE_UP,"208"]]),"cmd"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},NR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[dt.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[dt.Msg.MIXLY_ESP32_MAX30102_IR+","+dt.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},DR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[dt.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[dt.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},fR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308ALS"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},FR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.HTML_COLOUR+dt.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GET+dt.Msg.HTML_COLOUR,"[2]"],[dt.Msg.MIXLY_GET+dt.Msg.MIXLY_IR_STRENGTH,"[1]"],[dt.Msg.MIXLY_GET+dt.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},PR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.HTML_COLOUR+dt.Msg.MSG.catSensor+" UCS12071").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GET+"RGB"+dt.Msg.HTML_COLOUR,"0"],[dt.Msg.MIXLY_GET+dt.Msg.MIXLY_RGB_RAW,"1"],[dt.Msg.MIXLY_GET_ENV_LIGHT+dt.Msg.MIXLY_BRIGHTNESS,"2"],[dt.Msg.GET_IR_STRENGTH+dt.Msg.MIXLY_BRIGHTNESS,"3"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},vR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GET_ENV_LIGHT,"E"],[dt.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},YR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},XR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[dt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:dt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:dt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},xR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[dt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:dt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:dt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},bR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_Altitude+dt.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GETPRESSURE,"pressure()"],[dt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[dt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},yR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_Altitude+dt.Msg.MSG.catSensor+" SPL06_001").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GETPRESSURE,"pressure()"],[dt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[dt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},VR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_Altitude+dt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_GETPRESSURE,"pressure()"],[dt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[dt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},BR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_Altitude+dt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendValueInput("VAR").appendField(dt.Msg.MIXLY_REF_TO_PRESSURE),this.appendDummyInput().appendField(dt.Msg.MIXLY_CAL_TO_ALTITUDE),this.setOutput(!0,Number),this.setInputsInline(!0)}},GR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MIXGOPE_FIELD+dt.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[dt.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},UR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_shake,"shake"],[dt.Msg.MIXLY_UP,"up"],[dt.Msg.MIXLY_DOWN,"down"],[dt.Msg.MIXLY_LEFT,"left"],[dt.Msg.MIXLY_RIGHT,"right"],[dt.Msg.MIXLY_MICROBIT_face_up,"face up"],[dt.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=dt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=dt.Msg.MSG.catSensor,s=dt.Msg.MIXLY_MICROBIT_JS_STATE,o=dt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:dt.Msg.MIXLY_MICROBIT_shake,up:dt.Msg.MIXLY_UP,down:dt.Msg.MIXLY_DOWN,left:dt.Msg.MIXLY_LEFT,right:dt.Msg.MIXLY_RIGHT,"face up":dt.Msg.MIXLY_MICROBIT_face_up,"face down":dt.Msg.MIXLY_MICROBIT_face_down}[e]+o}))}},wR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new dt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=dt.Msg.MIXLY_MICROBIT_Direction,s=dt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":dt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},HR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_JS_GET+dt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new dt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=dt.Msg.MIXLY_MICROBIT_Direction,s=dt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":dt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},kR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+dt.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new dt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=dt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=dt.Msg.MIXLY_MICROBIT_Direction,s=dt.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":dt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},WR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},KR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_GETTEMPERATUE)}},JR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return dt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:dt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:dt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},QR={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(dt.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(dt.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},qR={init:function(){this.setColour(eR),this.appendValueInput("SPISUB").appendField(dt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(dt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_SETUP+dt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new dt.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},zR={init:function(){this.setColour(eR),this.appendDummyInput().appendField("RFID"+dt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(dt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[dt.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},jR={init:function(){this.setColour(eR),this.appendDummyInput().appendField("RFID"+dt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},$R={init:function(){this.setColour(eR),this.appendDummyInput().appendField("RFID"+dt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(dt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},ZR={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(dt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(dt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},tc={init:function(){this.setColour(eR),this.appendDummyInput().appendField(dt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(dt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(dt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(dt.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},ec={init:function(){this.setColour(eR),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new dt.FieldDropdown([[dt.Msg.MIXLY_RFID_SCAN_OK,"0"],[dt.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[dt.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ic={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new dt.FieldDropdown([["全部(元组)","data()[0]"],["全部(json)","data()[1]"],["全部(json,附带位置信息)","data()[2]"],["编号","data()[0][0]"],["电量","data()[0][1]"],["风速","data()[0][2]"],["阵风","data()[0][3]"],["风向","data()[0][4]"],["雨量","data()[0][5]"],["温度","data()[0][6]"],["湿度","data()[0][7]"],["光照","data()[0][8]"],["紫外线","data()[0][9]"],["大气压","data()[0][10]"],["信号强度","data()[0][11]"],["信噪比","data()[0][12]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip("返回气象数据元组 data= (设备id,电池状态,风速m/s,阵风m/s,风向°,雨量mm,温度℃,湿度%,光照Lux,UVI,大气压Pa,信号强度dB,信噪比dB)")}},nc={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(dt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},sc={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendValueInput("BASE").appendField("以主题"),this.appendDummyInput("").appendField("串口发送至MixIO"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},oc={init:function(){this.setColour(eR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new dt.icons.MutatorIcon(["weather_set_label_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("weather_set_label_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n>6),i.push(128|63&o)):(2048<=o&&o<=55295||57344<=o&&o<=65535)&&(n+=3,i.push(224|15&o>>12),i.push(128|63&o>>6),i.push(128|63&o))}for(s=0;s>8,255&n].concat(i)}(t,!0),i="",n=0;n=0?"0x700000":["mixgo_sant"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==_?(e.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+o+", font_address="+p+")\n"):"16x8 Matrix"==_&&(e.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+o+")\n"),i},pF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},aF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},uF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},rF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},dF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},lF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},IF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},TF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},MF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},hF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},mF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},EF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},OF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},RF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_"+t.getFieldValue("OP")+"("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"B",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},cF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},gF=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},CF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},SF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},AF=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"width",e.ORDER_ATOMIC),_=e.valueToCode(this,"height",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP");switch(p){case"True":return i+".show_fill_rect("+n+", "+s+", "+o+", "+_+", "+a+")\n";case"False":return i+".show_rect("+n+", "+s+", "+o+", "+_+", "+a+")\n"}},LF=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+o+", 1)\n"},NF=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},DF=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},fF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},FF=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},PF=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"r",e.ORDER_ATOMIC),_="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(_){case"True":return i+".show_fill_circle("+n+", "+s+", "+o+", "+p+")\n";case"False":return i+".show_circle("+n+", "+s+", "+o+", "+p+")\n"}},vF=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),o=e.valueToCode(this,"x1",e.ORDER_ATOMIC),_=e.valueToCode(this,"y1",e.ORDER_ATOMIC),p=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",r=this.getFieldValue("OP");switch(u){case"True":return i+".show_fill_triangle("+n+", "+s+", "+o+", "+_+", "+p+", "+a+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+o+", "+_+", "+p+", "+a+", "+r+")\n"}},YF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+","+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+","+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},XF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},xF=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),o=this.getFieldValue("key");return"TM1650"==o?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+o+"("+s+")\n"):"TM1637"==o&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+o+"("+s+")\n"),i},bF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},yF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},VF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".showDP("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},BF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},GF=function(t,e){e.definitions_.import_st7789="import st7789";var i=lt.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_sant"].indexOf(i)>=0?"0xE00000":"0x3A0000";var s=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),o=e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC),_=e.valueToCode(this,"PINCS",e.ORDER_ATOMIC),p=e.valueToCode(this,"PINDC",e.ORDER_ATOMIC);return s+" = st7789.ST7789("+o+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+", dc_pin="+p+", cs_pin="+_+", rotation="+this.getFieldValue("rotate")+", font_address="+n+")\n"},UF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".image("+n+", x="+s+", y="+o+", size="+_+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".image("+n+", x= "+s+",y="+o+", size="+_+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},wF=function(t,e){var i="0x"+this.getFieldValue("COLOR").slice(1);return["0x"+((16252928&i)>>8|(64512&i)>>5|(255&i)>>3).toString(16),e.ORDER_ATOMIC]},HF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==a.slice(0,2))var r=i+".shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+u+", color="+a+")\n";else{const t=a.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r=i+".shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+u+", color=0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+")\n"}return r},kF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==_.slice(0,2))var p=i+".frame("+n+", size="+s+", delay="+o+", color="+_+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".frame("+n+", size="+s+", delay="+o+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},WF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u=i+".scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u=i+".scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},KF=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},JF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"x1",e.ORDER_ATOMIC),s=e.valueToCode(this,"y1",e.ORDER_ATOMIC),o=e.valueToCode(this,"x2",e.ORDER_ATOMIC),_=e.valueToCode(this,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".line("+n+", "+s+", "+o+", "+_+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".line("+n+", "+s+", "+o+", "+_+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},QF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=this.getFieldValue("key"),o=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return e.definitions_.import_i2clcd="import i2clcd",i+" = i2clcd.LCD("+n+", lcd_width="+s+", i2c_addr="+o+")\n"},qF=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+",center = "+this.getFieldValue("center")+")\n"},zF=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".print("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},jF=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},$F=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},ZF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC),o=this.getFieldValue("driver"),_=lt.Boards.getSelectedBoardKey().split(":")[2],p="";return p=["mpython","mixgo_pe","mixgo_nova"].indexOf(_)>=0?"0x700000":["mixgo_sant"].indexOf(_)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+", address="+s+", font_address="+p+", types="+o+")\n"},tP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},eP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+")\n"},iP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},nP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},sP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},oP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},_P=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},pP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},aP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},uP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},rP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},dP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},lP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"w",e.ORDER_ATOMIC),_=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=t.getFieldValue("state");return i+"."+t.getFieldValue("shape")+"("+n+", "+s+", "+o+", "+_+", "+p+")\n"+i+".show()\n"},IP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"length",e.ORDER_ATOMIC),_=t.getFieldValue("state");return i+"."+("0"==t.getFieldValue("dir_h_v")?"v":"h")+"line("+n+", "+s+", "+o+", "+_+")\n"+i+".show()\n"},TP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".line("+e.valueToCode(t,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y2",e.ORDER_ATOMIC)+", "+t.getFieldValue("state")+")\n"+i+".show()\n"},MP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("Python ESP32-S3"===lt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var s="onboard_tft.image("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff,sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n"}else if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled";s="oled.print("+n+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.shows("+n+")\n"}return s},hP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),o=this.getFieldValue("center");if("mixgo_sant"==i||"mixgo_nova"==i)return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+", space="+s+", center="+o+",sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n";if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled"}return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+", space="+s+", center="+o+")\n"},mP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var s="onboard_oled.frame("+n+")\n"}else if("Python ESP32-S3"===lt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";s="onboard_tft.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.frame("+n+")\n"}return s},EP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var o="onboard_oled.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", delay="+s+")\n"}else if("Python ESP32-S3"===lt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";o="onboard_tft.frame("+n+", size=5 , delay="+s+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";o="onboard_matrix.frame("+n+", delay="+s+")\n"}return o},OP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else if("Python ESP32-S3"===lt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";n="onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},RP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var _="onboard_oled.scroll("+n+", speed="+s+", space="+o+")\n"}else if("Python ESP32-S3"===lt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";_="onboard_tft.scroll("+n+", y=0, size=5, speed="+s+", space="+o+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";_="onboard_matrix.scroll("+n+", speed="+s+", space="+o+")\n"}return _},cP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u="onboard_tft.scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},gP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},CP=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===lt.JSFuncs.getPlatform()){const i=t.getFieldValue("image").split(".");if(2!==i.length)throw Error("pin value error");e.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`;var n=i[1]}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix."+t.getFieldValue("image")}return[n,e.ORDER_ATOMIC]},SP=function(t,e){var i={"#000000":"0","#ff0000":"1"};function n(t){let e="";if(t.length%2==1&&(t="0"+t),t.length<8){let e=8-t.length;for(let i=1;i<=e;i++)t="0"+t}for(let i=1;i<=t.length;i++)i%2==0&&i!==t.length?e=e+t[i-1]+",0x":e+=t[i-1];return"0x"+e}let s=[];for(let e=0;e<12;e++){let o="",_=0,p=0;for(let n=0;n<32;n++)n<8?p=7-n:n<16?p=23-n:n<24?p=39-n:n<32&&(p=55-n),_+=Number(i[t.getFieldValue(e+"-"+n)])*Math.pow(2,31-p);o+=n(_.toString(16)),s.unshift(o)}let o=[];for(let t=0;t>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},av=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.picture("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"direct",e.ORDER_ASSIGNMENT)+")\n"},uv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=this.getFieldValue("center"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True",r=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==r.slice(0,2))var d="onboard_tft.shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+a+", color="+r+",sync="+u+")\n";else{const t=r.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");d="onboard_tft.shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+a+", color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+",sync="+u+")\n"}return d},rv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==_.slice(0,2))var p="onboard_tft.frame("+n+", size="+s+", delay="+o+", color="+_+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.frame("+n+", size="+s+", delay="+o+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},dv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"w",e.ORDER_ATOMIC),_=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=t.getFieldValue("shape"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var r="onboard_tft."+a+"("+n+", "+s+", "+o+", "+_+", "+p+",sync="+u+")\n";else{const t=p.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r="onboard_tft."+a+"("+n+", "+s+", "+o+", "+_+", 0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+",sync="+u+")\n"}return r},lv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"length",e.ORDER_ATOMIC),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("dir_h_v"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+o+", "+_+",sync="+a+")\n";else{const t=_.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},Iv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x1",e.ORDER_ATOMIC),s=e.valueToCode(t,"y1",e.ORDER_ATOMIC),o=e.valueToCode(t,"x2",e.ORDER_ATOMIC),_=e.valueToCode(t,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.line("+n+", "+s+", "+o+", "+_+", "+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.line("+n+", "+s+", "+o+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},Tv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},Mv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),_=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var p="onboard_tft.pixel(int("+n+"), int("+s+"), "+o+",sync="+_+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+",sync="+_+")\n"}return p},hv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==n.slice(0,2))var o="onboard_tft.fill("+n+",sync="+s+")\n";else{const t=n.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o="onboard_tft.fill(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+",sync="+s+")\n"}return o},mv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=_+"=Clock("+n+", "+s+", "+o+", "+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=_+"=Clock("+n+", "+s+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},Ev=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},Ov=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_time("+e.valueToCode(this,"h",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"m",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"s",e.ORDER_ASSIGNMENT)+")\n"},Rv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},cv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2))var o=n+".clear("+s+")\n";else{const t=s.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o=n+".clear(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+")\n"}return o},gv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"r",e.ORDER_ATOMIC),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("shape"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var u="onboard_tft.ellipse("+n+", "+s+", "+o+", "+o+", "+_+", "+p+",sync="+a+")\n";else{const t=_.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.ellipse("+n+", "+s+", "+o+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+", "+p+",sync="+a+")\n"}return u},Cv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===lt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n="onboard_tft.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}return n},Sv=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2));else{const t=s.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)}return"onboard_tft.pointern(angle="+n+")\n"},Av=function(t,e){var i=lt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.texts("+n+", x="+s+", y="+o+", size="+_+", color="+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.texts("+n+", x="+s+", y="+o+", size="+_+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},Lv=MP,Nv=YP,Dv=FP,fv=YP,Fv=XP,Pv=LP,vv=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},Yv=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},Xv=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},UV=function(){return"control.reset()\n"},wV=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||lt.Profile.default.serial)+")\n"},HV=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||lt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||lt.Profile.default.serial)+")\n"},kV=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||lt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||lt.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},WV=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},KV=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},JV=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},QV=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},qV=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},zV=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},jV=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},$V=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},ZV=function(){return"while True:\n pass\n"},tB=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},eB=function(t,e){return e.definitions_.import_os="import os","os.uname()"},iB=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},nB=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},sB=function(t,e){return e.definitions_.import_mixgo="import mixgo",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period="+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=Timer."+(e.valueToCode(this,"mode",e.ORDER_NONE)||"None")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},oB=function(t,e){return e.definitions_.import_machine="import machine",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period = "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=machine.Timer."+this.getFieldValue("mode")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},_B=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},pB=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},aB=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},uB=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},rB=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},dB=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},lB=pB,IB=oB,TB=_B,MB=iB,hB=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},mB=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},EB=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api.weather_hourly("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"hour",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},OB=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")\n"},RB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_now.analysis()";else n='Weather_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},cB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Air_now.analysis()";else n='Air_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},gB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_alarm.analysis()";else n='Weather_alarm.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},CB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Life_suggestion.analysis()";else n='Life_suggestion.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},SB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Tide_daily.analysis()";else n='Tide_daily.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},AB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Location_search.analysis()";else n='Location_search.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},LB=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")\n"},NB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Weather_daily.analysis("+n+")";else s="Weather_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},DB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Air_daily.analysis("+n+")";else s="Air_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},fB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_sun.analysis("+n+")";else s="Geo_sun.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},FB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_moon.analysis("+n+")";else s="Geo_moon.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},PB=new dt.Generator("Python");PB.INDENT=" ",PB.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),PB.ORDER_ATOMIC=0,PB.ORDER_COLLECTION=1,PB.ORDER_STRING_CONVERSION=1,PB.ORDER_UNARY_POSTFIX=1,PB.ORDER_UNARY_PREFIX=2,PB.ORDER_MEMBER=2.1,PB.ORDER_FUNCTION_CALL=2.2,PB.ORDER_EXPONENTIATION=3,PB.ORDER_UNARY_SIGN=4,PB.ORDER_BITWISE_NOT=4,PB.ORDER_MULTIPLICATIVE=5,PB.ORDER_ADDITIVE=6,PB.ORDER_BITWISE_SHIFT=7,PB.ORDER_BITWISE_AND=8,PB.ORDER_BITWISE_XOR=9,PB.ORDER_BITWISE_OR=10,PB.ORDER_RELATIONAL=11,PB.ORDER_EQUALITY=11,PB.ORDER_LOGICAL_NOT=12,PB.ORDER_LOGICAL_AND=13,PB.ORDER_LOGICAL_OR=14,PB.ORDER_ASSIGNMENT=14,PB.ORDER_CONDITIONAL=15,PB.ORDER_LAMBDA=16,PB.ORDER_NONE=99,PB.ORDER_OVERRIDES=[[PB.ORDER_FUNCTION_CALL,PB.ORDER_MEMBER],[PB.ORDER_FUNCTION_CALL,PB.ORDER_FUNCTION_CALL],[PB.ORDER_MEMBER,PB.ORDER_MEMBER],[PB.ORDER_MEMBER,PB.ORDER_FUNCTION_CALL]],PB.init=function(){PB.PASS=this.INDENT+"pass\n",PB.definitions_=Object.create(null),PB.functionNames_=Object.create(null),PB.setups_=Object.create(null),PB.loops_=Object.create(null),PB.codeEnd_=Object.create(null),PB.variableDB_?PB.variableDB_.reset():PB.variableDB_=new ht(PB.RESERVED_WORDS_)},PB.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var o=this.definitions_[s];0===s.indexOf("import")?e.push(o):0===s.indexOf("var_declare")?i.push(o):n.push(o)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var _=[];for(var s in PB.functions_)_.push(PB.functions_[s]);_.length&&_.push("\n");var p=[];for(var s in PB.setups_)p.push(PB.setups_[s]);p.length&&p.push("\n");var a=[];for(var s in PB.loops_)a.push(PB.loops_[s]);var u=[];for(var s in PB.codeEnd_)u.push(PB.codeEnd_[s]);0!==u.length&&u.push("\n");let r="";return r=a.length>0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+u.join("\n"),r},PB.scrubNakedValue=function(t){return t+"\n"},PB.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},PB.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},PB.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=dt.utils.string.wrap(o,PB.COMMENT_WRAP-3),n+=PB.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const vB={};vB.MixGo={description:"MicroPython[ESP32 MixGo]",digital_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["39","39"]],digital:[["pin0","pin0"],["pin2","pin2"],["pin4","pin4"],["pin5","pin5"],["pin12","pin12"],["pin13","pin13"],["pin14","pin14"],["pin15","pin15"],["pin16","pin16"],["pin17","pin17"],["pin18","pin18"],["pin19","pin19"],["pin21","pin21"],["pin22","pin22"],["pin23","pin23"],["pin25","pin25"],["pin26","pin26"],["pin27","pin27"],["pin32","pin32"],["pin33","pin33"],["pin34","pin34"],["pin35","pin35"],["pin36","pin36"],["pin39","pin39"]],input_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["39","39"]],output_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm:[["pwm0","pwm0"],["pwm2","pwm2"],["pwm4","pwm4"],["pwm5","pwm5"],["pwm12","pwm12"],["pwm13","pwm13"],["pwm14","pwm14"],["pwm15","pwm15"],["pwm16","pwm16"],["pwm17","pwm17"],["pwm18","pwm18"],["pwm19","pwm19"],["pwm20","pwm20"],["pwm21","pwm21"],["pwm22","pwm22"],["pwm23","pwm23"],["pwm25","pwm25"],["pwm26","pwm26"],["pwm27","pwm27"],["pwm32","pwm32"],["pwm33","pwm33"]],analog_pin:[["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],analog:[["adc32","adc32"],["adc33","adc33"],["adc34","adc34"],["adc35","adc35"],["adc36","adc36"],["adc37","adc37"],["adc38","adc38"],["adc39","adc39"]],espnow_channel:lt.Profile.generate(["1-13"]),haskylens_model:lt.Profile.generate(["0-4"]),dac_pin:[["25","25"],["26","26"]],dac:[["dac25","dac25"],["dac26","dac26"]],touch:[["tc0","tc0"],["tc2","tc2"],["tc4","tc4"],["tc12","tc12"],["tc13","tc13"],["tc14","tc14"],["tc15","tc15"],["tc27","tc27"],["tc32","tc32"],["tc33","tc33"]],touch_pin:[["0","0"],["2","2"],["4","4"],["12","12"],["13","13"],["14","14"],["15","15"],["27","27"],["32","32"],["33","33"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],tts_voice:lt.Profile.generate(["0-16"]),tts_builtin_music:lt.Profile.generate(["0-47"]),tts_bgmusic:lt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["onboard_music_QUAVERS","onboard_matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","onboard_matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","onboard_matrix.onboard_music_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]]},vB["MixGo PE"]={description:"MicroPython[ESP32 MixGo PE]",digital_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],digital:[["pin0","pin0"],["pin2","pin2"],["pin4","pin4"],["pin5","pin5"],["pin7","pin7"],["pin8","pin8"],["pin12","pin12"],["pin13","pin13"],["pin14","pin14"],["pin15","pin15"],["pin19","pin19"],["pin20","pin20"],["pin21","pin21"],["pin22","pin22"],["pin25","pin25"],["pin26","pin26"],["pin27","pin27"],["pin32","pin32"],["pin33","pin33"],["pin34","pin34"],["pin35","pin35"],["pin36","pin36"],["pin37","pin37"],["pin38","pin38"],["pin39","pin39"]],input_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],output_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm:[["pwm0","pwm0"],["pwm2","pwm2"],["pwm4","pwm4"],["pwm5","pwm5"],["pwm7","pwm7"],["pwm8","pwm8"],["pwm12","pwm12"],["pwm13","pwm13"],["pwm14","pwm14"],["pwm15","pwm15"],["pwm19","pwm19"],["pwm20","pwm20"],["pwm21","pwm21"],["pwm22","pwm22"],["pwm25","pwm25"],["pwm26","pwm26"],["pwm27","pwm27"],["pwm32","pwm32"],["pwm33","pwm33"]],espnow_channel:lt.Profile.generate(["1-13"]),haskylens_model:lt.Profile.generate(["0-4"]),analog_pin:[["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],analog:[["adc32","adc32"],["adc33","adc33"],["adc34","adc34"],["adc35","adc35"],["adc36","adc36"],["adc37","adc37"],["adc38","adc38"],["adc39","adc39"]],dac_pin:[["25","25"],["26","26"]],dac:[["dac25","dac25"],["dac26","dac26"]],touch:[["tc0","tc0"],["tc2","tc2"],["tc4","tc4"],["tc12","tc12"],["tc13","tc13"],["tc14","tc14"],["tc15","tc15"],["tc27","tc27"],["tc32","tc32"],["tc33","tc33"]],touch_pin:[["0","0"],["2","2"],["4","4"],["12","12"],["13","13"],["14","14"],["15","15"],["27","27"],["32","32"],["33","33"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:lt.Profile.generate(["0-7"]),exlcdv:lt.Profile.generate(["0-4"]),brightness:lt.Profile.generate(["0-9"]),tts_voice:lt.Profile.generate(["0-16"]),tts_builtin_music:lt.Profile.generate(["0-47"]),tts_bgmusic:lt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["MUSIC_QUAVERS","onboard_matrix.MUSIC_QUAVERS"],["MUSIC_QUAVER","onboard_matrix.MUSIC_QUAVER"],["MUSIC_CROTCHET","onboard_matrix.MUSIC_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]]},vB["ESP32 Generic(4MB)"]={description:"MicroPython[ESP32 Generic]",digital_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],digital:[["pin0","pin0"],["pin2","pin2"],["pin4","pin4"],["pin5","pin5"],["pin6","pin6"],["pin7","pin7"],["pin8","pin8"],["pin9","pin9"],["pin10","pin10"],["pin11","pin11"],["pin12","pin12"],["pin13","pin13"],["pin14","pin14"],["pin15","pin15"],["pin16","pin16"],["pin17","pin17"],["pin18","pin18"],["pin19","pin19"],["pin20","pin20"],["pin21","pin21"],["pin22","pin22"],["pin23","pin23"],["pin25","pin25"],["pin26","pin26"],["pin27","pin27"],["pin32","pin32"],["pin33","pin33"],["pin34","pin34"],["pin35","pin35"],["pin36","pin36"],["pin37","pin37"],["pin38","pin38"],["pin39","pin39"]],input_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],output_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm:[["pwm0","pwm0"],["pwm2","pwm2"],["pwm4","pwm4"],["pwm5","pwm5"],["pwm12","pwm12"],["pwm13","pwm13"],["pwm14","pwm14"],["pwm15","pwm15"],["pwm16","pwm16"],["pwm17","pwm17"],["pwm18","pwm18"],["pwm19","pwm19"],["pwm20","pwm20"],["pwm21","pwm21"],["pwm22","pwm22"],["pwm23","pwm23"],["pwm25","pwm25"],["pwm26","pwm26"],["pwm27","pwm27"],["pwm32","pwm32"],["pwm33","pwm33"]],analog_pin:[["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],analog:[["adc32","adc32"],["adc33","adc33"],["adc34","adc34"],["adc35","adc35"],["adc36","adc36"],["adc37","adc37"],["adc38","adc38"],["adc39","adc39"]],espnow_channel:lt.Profile.generate(["1-13"]),haskylens_model:lt.Profile.generate(["0-4"]),dac_pin:[["25","25"],["26","26"]],dac:[["dac25","dac25"],["dac26","dac26"]],touch:[["tc0","tc0"],["tc2","tc2"],["tc4","tc4"],["tc12","tc12"],["tc13","tc13"],["tc14","tc14"],["tc15","tc15"],["tc27","tc27"],["tc32","tc32"],["tc33","tc33"]],touch_pin:[["0","0"],["2","2"],["4","4"],["12","12"],["13","13"],["14","14"],["15","15"],["27","27"],["32","32"],["33","33"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],tts_voice:lt.Profile.generate(["0-16"]),tts_builtin_music:lt.Profile.generate(["0-47"]),tts_bgmusic:lt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["onboard_music_QUAVERS","onboard_matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","onboard_matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","onboard_matrix.onboard_music_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]]},vB.mPython={description:"MicroPython[ESP32 Generic]",digital_pin:[["p0","33"],["p1","32"],["p2","35"],["p5","0"],["p6","16"],["p7","17"],["p8","26"],["p9","25"],["p11","2"],["p13","18"],["p14","19"],["p15","21"],["p16","5"],["p19","22"],["p20","23"]],digital:[["pin0","pin33"],["pin1","pin32"],["pin2","pin35"],["pin5","pin0"],["pin6","pin16"],["pin7","pin17"],["pin8","pin26"],["pin9","pin25"],["pin11","pin2"],["pin13","pin18"],["pin14","pin19"],["pin15","pin21"],["pin16","pin5"],["pin19","pin22"],["pin20","pin23"]],input_pin:[["p0","33"],["p1","32"],["p2","35"],["p5","0"],["p6","16"],["p7","17"],["p8","26"],["p9","25"],["p11","2"],["p13","18"],["p14","19"],["p15","21"],["p16","5"],["p19","22"],["p20","23"]],output_pin:[["p0","33"],["p1","32"],["p5","0"],["p6","16"],["p7","17"],["p8","26"],["p9","25"],["p11","2"],["p13","18"],["p14","19"],["p15","21"],["p16","5"],["p19","22"],["p20","23"]],pwm_pin:[["p0","33"],["p1","32"],["p5","0"],["p6","16"],["p7","17"],["p8","26"],["p9","25"],["p11","2"],["p13","18"],["p14","19"],["p15","21"],["p16","5"],["p19","22"],["p20","23"]],pwm:[["pwm0","pwm33"],["pwm1","pwm32"],["pwm5","pwm0"],["pwm6","pwm16"],["pwm7","pwm17"],["pwm8","pwm26"],["pwm9","pwm25"],["pwm11","pwm2"],["pwm13","pwm18"],["pwm14","pwm19"],["pwm15","pwm21"],["pwm16","pwm5"],["pwm19","pwm22"],["pwm20","pwm23"]],espnow_channel:lt.Profile.generate(["1-13"]),haskylens_model:lt.Profile.generate(["0-4"]),analog_pin:[["p0","33"],["p1","32"],["p2","35"],["p3","34"],["p4","39"],["p10","36"]],analog:[["adc0","adc33"],["adc1","adc32"],["adc2","adc35"],["adc3","adc34"],["adc4","adc39"],["adc10","adc36"]],dac_pin:[["p8","26"],["p9","25"]],dac:[["dac8","dac26"],["dac9","dac25"]],touch_mpython:[["p","p"],["y","y"],["t","t"],["h","h"],["o","o"],["n","n"]],touch:[["tc0","tc33"],["tc1","tc32"],["tc5","tc0"],["tc11","tc2"],["tc23","tc27"],["tc24","tc14"],["tc25","tc12"],["tc26","tc13"],["tc27","tc15"],["tc28","tc4"]],touch_pin:[["p0","33"],["p1","32"],["p5","0"],["p11","2"],["p23","27"],["p24","14"],["p25","12"],["p26","13"],["p27","15"],["p28","4"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],tts_voice:lt.Profile.generate(["0-16"]),tts_builtin_music:lt.Profile.generate(["0-47"]),tts_bgmusic:lt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["onboard_music_QUAVERS","onboard_matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","onboard_matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","onboard_matrix.onboard_music_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]]};const YB=vB,XB=230,xB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.digital),"PIN"),this.setOutput(!0)}},bB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},yB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},VB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},BB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.touch_mpython),"PIN"),this.setOutput(!0,Number)}},GB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},UB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},wB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},HB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},kB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},WB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},KB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},JB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},QB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},qB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},zB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},jB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},$B={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.analog),"PIN"),this.setOutput(!0)}},ZB={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},tG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.dac),"PIN"),this.setOutput(!0)}},eG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},iG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},nG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},sG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},oG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},_G={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.touch),"PIN"),this.setOutput(!0)}},pG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},aG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},uG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},rG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},dG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},lG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},IG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},TG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},MG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},hG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},mG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},EG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},OG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},RG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},cG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},gG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},CG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},SG={init:function(){this.setColour(XB),this.appendDummyInput("").appendField(new dt.FieldDropdown(lt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},AG=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},LG=AG,NG=AG,DG=AG,fG=AG,FG=AG,PG=AG,vG=AG,YG=AG,XG=AG,xG=AG,bG=AG,yG=AG,VG=AG,BG=AG,GG=AG,UG=AG,wG=AG,HG=AG,kG=AG,WG=AG,KG=AG,JG=AG,QG=AG,qG=AG,zG=AG,jG=AG,$G=AG,ZG=AG,tU=AG,eU=AG,iU=AG,nU=AG,sU=AG,oU=AG;Object.assign(dt.Variables,Tt),Object.assign(dt.Procedures,Lu),dt.Python=Nu,dt.generator=Nu,lt.Profile.default={},Object.assign(lt.Profile,YB),Object.assign(lt.Profile.default,YB["ESP32 Generic"]),Object.assign(dt.Blocks,e,i,n,s,o,_,p,a,u,r,d,l,I,b,H,w,v,y,k,f,U,G,B,V,F,D,N,X,Y,x,P,ut),Object.assign(dt.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,tt,pt,_t,z,et,at,J,ot,st,nt,it,Q,K,W,$,j,Z,q,rt)})(); \ No newline at end of file diff --git a/boards/default/micropython_esp32c2/build/Mixgo_Mini-v1.25.0.bin b/boards/default/micropython_esp32c2/build/Mixgo_Mini-v1.25.0.bin new file mode 100644 index 00000000..5312b644 Binary files /dev/null and b/boards/default/micropython_esp32c2/build/Mixgo_Mini-v1.25.0.bin differ diff --git a/boards/default/micropython_esp32c2/build/Mixgo_Mini_lib-v1.25.0.bin b/boards/default/micropython_esp32c2/build/Mixgo_Mini_lib-v1.25.0.bin new file mode 100644 index 00000000..ca5ffe1b Binary files /dev/null and b/boards/default/micropython_esp32c2/build/Mixgo_Mini_lib-v1.25.0.bin differ diff --git a/boards/default/micropython_esp32c2/build/Mixgo_Mini_lib_ble_2-v1.25.0.bin b/boards/default/micropython_esp32c2/build/Mixgo_Mini_lib_ble-V2-v1.25.0.bin similarity index 65% rename from boards/default/micropython_esp32c2/build/Mixgo_Mini_lib_ble_2-v1.25.0.bin rename to boards/default/micropython_esp32c2/build/Mixgo_Mini_lib_ble-V2-v1.25.0.bin index 7f8213bf..793c6618 100644 Binary files a/boards/default/micropython_esp32c2/build/Mixgo_Mini_lib_ble_2-v1.25.0.bin and b/boards/default/micropython_esp32c2/build/Mixgo_Mini_lib_ble-V2-v1.25.0.bin differ diff --git a/boards/default/micropython_esp32c2/build/Mixgo_Mini_lib_ble-v1.25.0.bin b/boards/default/micropython_esp32c2/build/Mixgo_Mini_lib_ble-v1.25.0.bin new file mode 100644 index 00000000..12809421 Binary files /dev/null and b/boards/default/micropython_esp32c2/build/Mixgo_Mini_lib_ble-v1.25.0.bin differ diff --git a/boards/default/micropython_esp32c2/build/lib/map.json b/boards/default/micropython_esp32c2/build/lib/map.json index 1398f3c1..84fcd27c 100644 --- a/boards/default/micropython_esp32c2/build/lib/map.json +++ b/boards/default/micropython_esp32c2/build/lib/map.json @@ -21,7 +21,7 @@ "framebuf" ], "__file__": true, - "__size__": 13061, + "__size__": 14852, "__name__": "mini_bot.py" }, "mini_go": { @@ -53,14 +53,14 @@ "gc", "esp32", "machine", - "ws2812x", "musicx", + "ws2812x", "sc7a20", "ap3216c", "mini_bot" ], "__file__": true, - "__size__": 4611, + "__size__": 4920, "__name__": "mixgo_mini.py" }, "musicx": { @@ -77,7 +77,7 @@ "machine" ], "__file__": true, - "__size__": 1881, + "__size__": 1979, "__name__": "ws2812x.py" } } \ No newline at end of file diff --git a/boards/default/micropython_esp32c2/build/lib/mini_bot.py b/boards/default/micropython_esp32c2/build/lib/mini_bot.py index ad8a4b6a..dca92853 100644 --- a/boards/default/micropython_esp32c2/build/lib/mini_bot.py +++ b/boards/default/micropython_esp32c2/build/lib/mini_bot.py @@ -17,11 +17,11 @@ _BOT035_SPK = const(0x07) _BOT035_PWM = const(0x0B) _BOT035_FLAG = const(0x0F) _BOT035_LEDS = const(0x10) -_BOT035_PGA = const(0x20) _BOT035_KB = const(0x1C) _BOT035_MS = const(0x20) _BOT035_STR = const(0x24) _BOT035_STA = const(0x25) +_BOT035_PCM = const(0x26) _FONT_W = const(5) _FONT_H = const(8) _LEDS_W = const(12) @@ -35,8 +35,8 @@ class BOT035(FrameBuffer): self._buffer = bytearray(12) self._brightness = brightness self._touchs = [self.touch(0), self.touch(1)] - self._version = True if self._rreg(0x00) >= 0x27 else False super().__init__(self._buffer, _LEDS_W, _LEDS_H, MONO_VLSB) + self.version() self.reset() self.show() @@ -229,23 +229,29 @@ class BOT035(FrameBuffer): def _rreg(self, reg, nbytes=1): '''Read memory address''' self._i2c.writeto(_BOT035_ADDRESS, reg.to_bytes(1, 'little')) - return self._i2c.readfrom(_BOT035_ADDRESS, nbytes)[0] + return self._i2c.readfrom(_BOT035_ADDRESS, nbytes)[0] if nbytes <= 1 else self._i2c.readfrom(_BOT035_ADDRESS, nbytes) def version(self): _ver = self._rreg(0x00) if _ver == 0x26: - return "v1.7", "Only supports CDC serial port" + self._version = 0 + return "v1.7", "Only support CDC serial port" elif _ver == 0x27: - return "v2.5", "Composite devices (CDC, keyboard and mouse)" + self._version = 1 + return "v2.5", "Composite devices (CDC, Keyboard and Mouse)" elif _ver == 0x28: - return "v2.9", "Composite devices (CDC, HID, WEBUSB, Keyboard and mouse)" + self._version = 2 + return "v2.9", "Composite devices (CDC, HID, WEBUSB, Keyboard and Mouse)" + elif _ver == 0x29: + self._version = 3 + return "v3.0", "Composite devices (CDC, HID, WEBUSB, Keyboard and Mouse), Support PCM collection for MIC" else: return "vx.x", "Unknown, awaiting update" def reset(self): """Reset SPK, PWM, HID registers to default state""" - self._i2c.writeto_mem(_BOT035_ADDRESS, _BOT035_SPK, b'\x0A\x00\x00\x00\x20\x4E\x64\x64') - if self._version: self._i2c.writeto_mem(_BOT035_ADDRESS, _BOT035_KB, bytes(9)) + self._i2c.writeto_mem(_BOT035_ADDRESS, _BOT035_SPK, b'\x0A\x00\x00\x00\x20\x4E\x64\x64\x28') + if self._version: self._i2c.writeto_mem(_BOT035_ADDRESS, _BOT035_KB, bytes(10)) def get_brightness(self): return self._brightness @@ -254,7 +260,7 @@ class BOT035(FrameBuffer): if not 0.0 <= brightness <= 1.0: raise ValueError("Brightness must be a decimal number in the range: 0.0-1.0") self._brightness = brightness - self._wreg(_BOT035_FLAG, _BOT035_PGA | round(10 * brightness)) + self._wreg(_BOT035_FLAG, (self._rreg(_BOT035_FLAG) & 0x0F) | round(10 * brightness)) def show(self): self._i2c.writeto_mem(_BOT035_ADDRESS, _BOT035_LEDS, self._buffer) @@ -341,6 +347,47 @@ class BOT035(FrameBuffer): else: print("Warning: Please upgrade the coprocessor firmware to use this feature") + def mic_pga(self, value=None): + '''0:4x, 1:8x, 2:16x, 3:32x, 4:OFF''' + if value is None: + return self._rreg(_BOT035_FLAG) >> 4 + else: + self._wreg(_BOT035_FLAG, (self._rreg(_BOT035_FLAG) & 0x0F) | (value & 0x03) << 4) + + def pcm_en(self, power=None): + if self._version >= 3: + if power is None: + return bool(self._rreg(_BOT035_STA) & 0x08) + else: + self._wreg(_BOT035_STA, (self._rreg(_BOT035_STA) & 0xF7) | (power & 0x01) << 3) + else: + print("Warning: Please upgrade the coprocessor firmware to use this feature") + + def pcm_any(self): + return bool(self._rreg(_BOT035_STA) & 0x80) + + def pcm_read(self, ibuf=1600): + return self._rreg(_BOT035_PCM, ibuf) + + def pcm_record(self, path='mixly.wav', seconds=5, ibuf=1600, timeout=2000): + if self._version >= 3: + self.pcm_en(True) + _star = time.ticks_ms() + _size = int(ibuf * seconds * 10) + _header = b'RIFF' + (36 + _size).to_bytes(4, 'little') + b'WAVEfmt \x10\x00\x00\x00\x01\x00\x01\x00' + (ibuf * 5).to_bytes(4, 'little') + (ibuf * 10).to_bytes(4, 'little') + b'\x02\x00\x10\x00data' + _size.to_bytes(4, 'little') + with open(path, 'wb') as f: + f.write(_header) + while _size > 0: + if self.pcm_any(): + f.write(self.pcm_read(ibuf)) + _size -= ibuf + _star = time.ticks_ms() + if time.ticks_diff(time.ticks_ms(), _star) > timeout: + raise OSError("Timeout write error") + self.pcm_en(False) + else: + print("Warning: Please upgrade the coprocessor firmware to use this feature") + """Graph module""" HEART =b'\x00\x0c\x1e?~\xfc~?\x1e\x0c\x00\x00' HEART_SMALL =b'\x00\x00\x0c\x1e02000attachInterrupt_funcattachInterrupt_func10,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!ms10timtim1000tim_callbacktim_callback5000200090x151100a10.998124.82997110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyMixly,HelloMixlyprompt02MixlyMixly0XFF00FFcodebMixlyMixly1attachInterrupt_func1attachInterrupt_funcattachInterrupt_funcrfid00Mixly0Mixly2022711420452023,1,1,12,0,0180292023,1,1,12,0,010044044010000412000000000001000100010020000Hello, Mixly!10Mixly0MixlyMixly500MixlyMixly50010.501001001000interrupt_funcinterrupt_functurnsdistance00Mixly0Mixly00Mixly0Mixlywifinamewifipassword8080AUTH TOKEN0_value02000notify0Your Target Emailsubjectbodycolor#FF0000wifinamewifipasswordmixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012http://mixio.mixly.org/time.phpmixio.mixly.cnwifinamewifipasswordcsub_cb31444082183.230.40.3914109261n63JySRowo13ZLDBKw6y896E0=MixlyRobotsub_cbEQmsg1ciot_dict"sound"ciot_dictccwifinamewifipasswordclientEnter Your API_KEYEnter Your SECRET_KEYclient1clientS72099北京今天天气如何?wifinamewifipasswordSVa3S0UKHIy9dDArs北京SVa3S0UKHIy9dDArs北京10000ble_cble_pMixlyble_cble_cMixlyble_cble_xble_xble_xMixlyble_xble_xble_methodble_methodEQdataMixlyhandlehandle_methodhandle_methodkey1key2key3keyxble_keyboard_mouse10Hello, Mixly!1002000001000009000,4500,563,5630x1234callbackcmdaddrrawpulsesi2c2221100000i2c00i2c00i2ci2ci2cspi2000004512spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345buf1Mixlyow12owowow12345ow12345owmy_now0my_nowmy_nowmy_nowFFFFFFFFFFFFmixlymy_nowmy_nowcbcbEQmsg1spi10000004512spi8my_lora433.925716my_loramy_loramy_loraMixlyi2c_extend45100000xsensori2c_extendxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor1013.25xsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor5000500xsensorxsensorxsensorxsensorxsensorxsensorspi10000004512spi8ysensorysensorysensor0ysensor0ysensor0Mixlyysensor0Mixlyysensorysensor39,119.96,31.67ysensorysensorstation45ps2_handle24512ps2_handle50ps2_handleps2_handlews_wr0121ws_wrws_wrws_wr360002zsensorzsensorzsensorzsensorweight12500weight100midi0midi440midi4401000midimidimidi4120midimidirgb04rgb0000rgb000rgb0001000rgb1000rgb100100i2c_extend45400000Motori2c_extendMotor100Motor1024102402actuatoractuatoractuatoractuatoractuator你好米思齐actuatoractuatoractuator20actuatoractuatormixly*.mp3i2c_extend45400000matrixi2c_extendmatrixmatrixmatrixMixly0matrixMixlymatrixMixly500matrixMixlymatrixMixly500matrixmatrix>matrixmatrix1matrixmatrixmatrix0.5matrixmatrixi2c_extend45100000dispi2c_extenddisp2333dispdisp1i2c_extend45100000lcdi2c_extend0x27lcdMixly00lcdMixly005lcdlcdi2c_extend45100000oledi2c_extend0x3coledoled001oledMixlyoledMixly0010oledMixlyoledMixly0550oledMixlyoledMixly5500oled0020oled005050oled20202015oled1oled00oled00oledspi1000000450spi78tft_st7789135240tft_st7789001#ffffff255,255,0tft_st7789Mixly0050#ffffff255,255,0tft_st7789Mixly0550#ffffff255,255,0tft_st7789Mixly5500#ffffff255,255,0tft_st7789004040#ffffff255,255,0tft_st778912ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor'ni-hao','hong-se','lv-se','lan-se','bai-se','hei-se'0.1ai_sensor1.wav5ai_sensor1.wav100ai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsai_sensor'猫','狗','笔记本','笔'mixgo5自模型训练infoai_sensor'猫','狗','笔记本','笔'mixgo自模型识别objectsinfoai_sensor0.1606, 0.3562, 0.4712, 0.9568, 0.9877, 1.9108, 1.8761, 3.5310, 3.4423, 5.6823/sd/masks.kmodel外部模型加载objects12ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor1.wav5ai_sensor1.wav100infoai_sensorlicensePlateinfoai_sensorfaceinfoai_sensor20objectsai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsfilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0wifinamewifipasswordwlanwlanwlanwlanwlan127.16.0.801234567wlanwlanwlanwlanwlan127.16.0.81connect_wifiwlanAPwlanTruewlanwlanSmallCabbage1WHILETRUEEQ0wlan0.0.0.0ms1000TRUEss0.0.0.080s192.168.0.180s5ss1024sbMixlyresponses1024sbMixlyresponse127.0.0.180sntp.aliyun.comresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponsehttp://192.168.1.1:11434qwen2.5-coder:0.5b5https://api.deepseek.comAPI Keydeepseek-chat5请介绍一下米思齐?content_callbackcontent_callbackcontent请介绍一下米思齐? \ No newline at end of file +02000attachInterrupt_funcattachInterrupt_func10,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!ms10timtim1000tim_callbacktim_callback5000200090x151100a10.998124.82997110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyMixly,HelloMixlyprompt02MixlyMixly0XFF00FFcodebMixlyMixly1attachInterrupt_func1attachInterrupt_funcattachInterrupt_funcrfid00Mixly0Mixly2022711420452023,1,1,12,0,0180292023,1,1,12,0,010044044010000412000000000001000100010020000Hello, Mixly!10Mixly0MixlyMixly500MixlyMixly50010.501001001000interrupt_funcinterrupt_functurnsdistance00Mixly0Mixly00Mixly0Mixlywifinamewifipassword8080AUTH TOKEN0_value02000notify0Your Target Emailsubjectbodycolor#FF0000wifinamewifipasswordmixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012http://mixio.mixly.org/time.phpmixio.mixly.cnwifinamewifipasswordcsub_cb31444082183.230.40.3914109261n63JySRowo13ZLDBKw6y896E0=MixlyRobotsub_cbEQmsg1ciot_dict"sound"ciot_dictccwifinamewifipasswordclientEnter Your API_KEYEnter Your SECRET_KEYclient1clientS72099北京今天天气如何?wifinamewifipasswordSVa3S0UKHIy9dDArs北京SVa3S0UKHIy9dDArs北京10000ble_cble_pMixlyble_cble_cMixlyble_cble_xble_xble_xMixlyble_xble_xble_methodble_methodEQdataMixlyhandlehandle_methodhandle_methodkey1key2key3keyxble_keyboard_mouse10Hello, Mixly!1002000001000009000,4500,563,5630x1234callbackcmdaddrrawpulsesi2c2221100000i2c00i2c00i2ci2ci2cspi2000004512spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345buf1Mixlyow12owowow12345ow12345owmy_now0my_nowmy_nowmy_nowFFFFFFFFFFFFmixlymy_nowmy_nowcbcbEQmsg1spi10000004512spi8my_lora433.925716my_loramy_loramy_loraMixlyi2c_extend45100000xsensori2c_extendxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor1013.25xsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor5000500xsensorxsensorxsensorxsensorxsensorxsensorspi10000004512spi8ysensorysensorysensor0ysensor0ysensor0Mixlyysensor0Mixlyysensorysensor39,119.96,31.67ysensorysensorstation45ps2_handle24512ps2_handle50ps2_handleps2_handlews_wr0121ws_wrws_wrws_wr360002zsensorzsensorzsensorzsensorweight12500weight100midi0midi440midi4401000midimidimidi4120midimidirgb04rgb0000rgb000rgb0001000rgb1000rgb100100i2c_extend45400000Motori2c_extendMotor100Motor1024102402actuatoractuatoractuatoractuatoractuator你好米思齐actuatoractuatoractuator20actuatoractuatormixly*.mp3i2c_extend45400000matrixi2c_extendmatrixmatrixmatrixMixly0matrixMixlymatrixMixly500matrixMixlymatrixMixly500matrixmatrix>matrixmatrix1matrixmatrixmatrix0.5matrixmatrixi2c_extend45100000dispi2c_extenddisp2333dispdisp1i2c_extend45100000lcdi2c_extend0x27lcdMixly00lcdMixly005lcdlcdi2c_extend45100000oledi2c_extend0x3coledoled001oledMixlyoledMixly0010oledMixlyoledMixly0550oledMixlyoledMixly5500oled0020oled005050oled20202015oled1oled00oled00oledspi1000000450spi78tft_st7789135240tft_st7789001#ffffff255,255,0tft_st7789Mixly0050#ffffff255,255,0tft_st7789Mixly0550#ffffff255,255,0tft_st7789Mixly5500#ffffff255,255,0tft_st7789004040#ffffff255,255,0tft_st778912ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor'ni-hao','hong-se','lv-se','lan-se','bai-se','hei-se'0.1ai_sensor1.wav5ai_sensor1.wav100ai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsai_sensor'猫','狗','笔记本','笔'mixgo5自模型训练infoai_sensor'猫','狗','笔记本','笔'mixgo自模型识别objectsinfoai_sensor0.1606, 0.3562, 0.4712, 0.9568, 0.9877, 1.9108, 1.8761, 3.5310, 3.4423, 5.6823/sd/masks.kmodel外部模型加载objects12ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor1.wav5ai_sensor1.wav100infoai_sensorlicensePlateinfoai_sensorfaceinfoai_sensor20objectsai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsfilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0wifinamewifipasswordwlanwlanwlanwlanwlan127.16.0.801234567wlanwlanwlanwlanwlan127.16.0.81connect_wifiwlanAPwlanTruewlanwlanSmallCabbage1WHILETRUEEQ0wlan0.0.0.0ms1000TRUEss0.0.0.080s192.168.0.180s5ss1024sbMixlyresponses1024sbMixlyresponse127.0.0.180sntp.aliyun.comresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponsehttp://192.168.1.1:11434qwen2.5-coder:0.5b5https://api.deepseek.comAPI Keydeepseek-chat5请介绍一下米思齐?content_callbackcontent_callbackcontent请介绍一下米思齐? \ No newline at end of file diff --git a/boards/default/micropython_esp32c2/main.bundle.05973c5b.js b/boards/default/micropython_esp32c2/main.bundle.05973c5b.js new file mode 100644 index 00000000..4300e878 --- /dev/null +++ b/boards/default/micropython_esp32c2/main.bundle.05973c5b.js @@ -0,0 +1,21 @@ +(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>vt,controls_typeLists:()=>Xt,lists_zip:()=>yt,lists_zip_container:()=>xt,lists_zip_item:()=>bt,unpack_iterable_object:()=>Vt,variables_change:()=>Pt,variables_get:()=>ft,variables_global:()=>Yt,variables_set:()=>Ft});var i={};t.r(i),t.d(i,{base_setup:()=>Ut,controls_delay:()=>wt,controls_end_program:()=>kt,controls_except:()=>ie,controls_finally:()=>ne,controls_flow_statements:()=>Qt,controls_for:()=>zt,controls_forEach:()=>Kt,controls_for_range:()=>jt,controls_if:()=>Ht,controls_if_else:()=>te,controls_if_elseif:()=>Zt,controls_if_if:()=>$t,controls_lambda:()=>_e,controls_main:()=>Gt,controls_pass:()=>oe,controls_range:()=>Wt,controls_repeat_ext:()=>se,controls_thread:()=>pe,controls_try:()=>ee,controls_try_finally:()=>qt,controls_whileUntil:()=>Jt,datetime_fromtimestamp:()=>Ie,do_while:()=>ae,garbage_collection:()=>ue,gene_unique_identifier:()=>Te,get_mem_alloc:()=>re,get_mem_free:()=>le,get_unique_identifier:()=>de});var n={};t.r(n),t.d(n,{base_map:()=>ye,generate_cartesian_product:()=>be,math_arithmetic:()=>Oe,math_bit:()=>ce,math_constant:()=>me,math_constant_mp:()=>Ee,math_constrain:()=>De,math_dec:()=>Ce,math_degree_to_radian:()=>Be,math_indexer_number:()=>Fe,math_map:()=>fe,math_max_min:()=>Ae,math_number:()=>he,math_number_base_conversion:()=>Le,math_radian_to_degree:()=>Ve,math_random:()=>Ne,math_random_seed:()=>Pe,math_round:()=>Ye,math_selfcalcu:()=>Re,math_to_int:()=>Se,math_trig:()=>ge,text_to_number:()=>ve,text_to_number_skulpt:()=>Xe,turn_to_int:()=>xe});var s={};t.r(s),t.d(s,{ascii_to_char:()=>We,char_to_ascii:()=>Ke,number_to_text:()=>Je,os_system:()=>Ei,text:()=>Ue,text_capital:()=>ii,text_center:()=>ni,text_char:()=>ke,text_char_at:()=>ze,text_char_at2:()=>Qe,text_char_at3:()=>Ti,text_compareTo:()=>Ii,text_compare_to:()=>ei,text_create_with_container:()=>ri,text_create_with_item:()=>li,text_encode:()=>hi,text_equals_starts_ends:()=>ti,text_eval:()=>mi,text_find:()=>si,text_format:()=>ui,text_format_noreturn:()=>Mi,text_join:()=>He,text_join_seq:()=>_i,text_length:()=>qe,text_random_char:()=>je,text_replace:()=>oi,text_split:()=>pi,text_strip:()=>ai,text_substring:()=>Ze,text_substring2:()=>$e,text_substring3:()=>di,text_textarea:()=>we});var _={};t.r(_),t.d(_,{ENUMERATE:()=>tn,content_in_lists:()=>nn,enumerate:()=>en,list_many_input:()=>Ui,list_tolist:()=>Wi,list_tolist2:()=>Zi,list_trig:()=>Vi,lists_2d_get_col_row_data:()=>Ci,lists_2d_get_data_with_col_row:()=>gi,lists_append_extend:()=>fi,lists_change_to:()=>Gi,lists_change_to_general:()=>ki,lists_clear:()=>Xi,lists_create_with:()=>Si,lists_create_with2:()=>Ki,lists_create_with_container:()=>Li,lists_create_with_item:()=>Ni,lists_create_with_noreturn:()=>wi,lists_create_with_text:()=>Ai,lists_create_with_text2:()=>Ji,lists_del_general:()=>Hi,lists_find:()=>bi,lists_getIndex3:()=>qi,lists_getSublist3:()=>Qi,lists_get_index:()=>Ri,lists_get_random_item:()=>Fi,lists_get_random_sublist:()=>Pi,lists_get_sublist:()=>ci,lists_insert_value:()=>Yi,lists_insert_value2:()=>ji,lists_pop:()=>xi,lists_remove_at:()=>yi,lists_remove_at2:()=>$i,lists_reverse:()=>vi,lists_setIndex3:()=>zi,lists_set_index:()=>Di,lists_sort:()=>Bi});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>On,dicts_add_or_change:()=>ln,dicts_clear:()=>Tn,dicts_create_with:()=>_n,dicts_create_with_container:()=>on,dicts_create_with_item:()=>pn,dicts_create_with_noreturn:()=>gn,dicts_deldict:()=>En,dicts_delete:()=>dn,dicts_get:()=>un,dicts_get_default:()=>rn,dicts_items:()=>Mn,dicts_keys:()=>an,dicts_length:()=>mn,dicts_pop:()=>Rn,dicts_setdefault:()=>cn,dicts_to_json:()=>Sn,dicts_to_json2:()=>Nn,dicts_to_to:()=>Ln,dicts_todict:()=>Cn,dicts_update:()=>In,dicts_values:()=>hn,json_to_dicts:()=>An});var p={};t.r(p),t.d(p,{logic_boolean:()=>vn,logic_compare:()=>fn,logic_compare_continous:()=>Fn,logic_is:()=>bn,logic_is_in:()=>xn,logic_negate:()=>Yn,logic_null:()=>Xn,logic_operation:()=>Pn,logic_tobool:()=>Vn,logic_true_or_false:()=>yn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>ps,sdcard_use_spi_init:()=>os,storage_can_write_ornot:()=>Jn,storage_change_dir:()=>ss,storage_close_file:()=>Qn,storage_delete_file:()=>jn,storage_file_seek:()=>ts,storage_file_tell:()=>Zn,storage_file_write:()=>kn,storage_fileopen:()=>Gn,storage_fileopen_new:()=>Un,storage_fileopen_new_encoding:()=>wn,storage_get_a_line:()=>Kn,storage_get_contents:()=>Wn,storage_get_contents_without_para:()=>Hn,storage_get_current_dir:()=>es,storage_get_file_size:()=>$n,storage_get_filename:()=>qn,storage_is_file:()=>_s,storage_list_all_files:()=>zn,storage_make_dir:()=>is,storage_open_file_with_os:()=>Bn,storage_rename:()=>ns});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>ds,procedures_callreturn:()=>Is,procedures_defnoreturn:()=>as,procedures_defreturn:()=>us,procedures_ifreturn:()=>Ts,procedures_mutatorarg:()=>ls,procedures_mutatorcontainer:()=>rs,procedures_return:()=>Ms});var r={};t.r(r),t.d(r,{tuple_change_to:()=>Ns,tuple_create_with:()=>ms,tuple_create_with_container:()=>Es,tuple_create_with_item:()=>Os,tuple_create_with_noreturn:()=>Ps,tuple_create_with_text2:()=>Rs,tuple_create_with_text_return:()=>cs,tuple_del:()=>Ss,tuple_find:()=>Ds,tuple_getIndex:()=>gs,tuple_getSublist:()=>Fs,tuple_get_random_item:()=>vs,tuple_get_sublist:()=>Ys,tuple_input:()=>ys,tuple_join:()=>As,tuple_length:()=>Cs,tuple_max:()=>Ls,tuple_totuple:()=>Xs,tuple_trig:()=>fs});var l={};t.r(l),t.d(l,{set_add_discard:()=>Ws,set_clear:()=>ws,set_create_with:()=>bs,set_create_with_container:()=>Vs,set_create_with_item:()=>Bs,set_create_with_text_return:()=>qs,set_length:()=>Gs,set_operate:()=>ks,set_operate_update:()=>Hs,set_pop:()=>Us,set_sub:()=>Ks,set_toset:()=>Qs,set_update:()=>Js});var d={};t.r(d),t.d(d,{html_content:()=>t_,html_content_more:()=>e_,html_document:()=>js,html_form:()=>n_,html_head_body:()=>Zs,html_style:()=>i_,html_style_color:()=>__,html_style_content:()=>s_,html_text:()=>o_,html_title:()=>$s});var I={};t.r(I),t.d(I,{attribute_access:()=>R_,function_call:()=>m_,function_call_container:()=>E_,function_call_item:()=>O_,raw_block:()=>u_,raw_empty:()=>l_,raw_expression:()=>r_,raw_table:()=>a_,text_comment:()=>d_,text_print_multiple:()=>T_,text_print_multiple_container:()=>M_,text_print_multiple_item:()=>h_,type_check:()=>I_});var T={};t.r(T),t.d(T,{controls_type:()=>A_,controls_typeLists:()=>L_,lists_zip:()=>N_,unpack_iterable_object:()=>D_,variables_change:()=>C_,variables_get:()=>c_,variables_global:()=>S_,variables_set:()=>g_});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>V_,base_setup:()=>F_,controls_delay:()=>b_,controls_flow_statements:()=>x_,controls_for:()=>v_,controls_forEach:()=>k_,controls_for_range:()=>X_,controls_if:()=>P_,controls_interrupts:()=>U_,controls_lambda:()=>W_,controls_main:()=>f_,controls_millis:()=>B_,controls_nointerrupts:()=>w_,controls_pass:()=>J_,controls_range:()=>H_,controls_repeat:()=>eo,controls_repeat_ext:()=>z_,controls_thread:()=>q_,controls_try_finally:()=>Y_,controls_whileUntil:()=>y_,datetime_fromtimestamp:()=>io,do_while:()=>Q_,garbage_collection:()=>j_,gene_unique_identifier:()=>no,get_mem_alloc:()=>$_,get_mem_free:()=>Z_,get_unique_identifier:()=>to,reset:()=>G_,time_sleep:()=>K_});var h={};t.r(h),t.d(h,{base_map:()=>Ao,generate_cartesian_product:()=>No,math_arithmetic:()=>ao,math_bit:()=>po,math_constant:()=>_o,math_constant_mp:()=>oo,math_constrain:()=>Eo,math_dec:()=>Io,math_degree_to_radian:()=>fo,math_indexer_number:()=>co,math_map:()=>mo,math_max_min:()=>Mo,math_number:()=>so,math_number_base_conversion:()=>Oo,math_radian_to_degree:()=>Do,math_random:()=>ho,math_random_seed:()=>Ro,math_round:()=>go,math_selfcalcu:()=>uo,math_single:()=>ro,math_to_int:()=>To,math_trig:()=>lo,text_to_number:()=>Co,text_to_number_skulpt:()=>So,turn_to_int:()=>Lo});var m={};t.r(m),t.d(m,{ascii_to_char:()=>Xo,char_to_ascii:()=>yo,number_to_text:()=>xo,os_system:()=>_p,text:()=>Fo,text_capital:()=>Wo,text_center:()=>Ko,text_char:()=>Yo,text_char_at:()=>Bo,text_char_at2:()=>Vo,text_char_at3:()=>ip,text_compareTo:()=>ep,text_compare_to:()=>wo,text_encode:()=>np,text_equals_starts_ends:()=>Uo,text_eval:()=>sp,text_find:()=>Jo,text_format:()=>$o,text_format_noreturn:()=>Zo,text_join:()=>vo,text_join_seq:()=>qo,text_length:()=>bo,text_random_char:()=>Go,text_replace:()=>Qo,text_split:()=>zo,text_strip:()=>jo,text_substring:()=>Ho,text_substring2:()=>ko,text_substring3:()=>tp,text_textarea:()=>Po});var E={};t.r(E),t.d(E,{content_in_lists:()=>Bp,enumerate:()=>Vp,list_many_input:()=>Ap,list_tolist:()=>xp,list_tolist2:()=>bp,list_trig:()=>gp,lists_2d_get_col_row_data:()=>ap,lists_2d_get_data_with_col_row:()=>pp,lists_append_extend:()=>Ip,lists_change_to:()=>Sp,lists_change_to_general:()=>Np,lists_clear:()=>Ep,lists_create_with:()=>up,lists_create_with2:()=>fp,lists_create_with_noreturn:()=>Lp,lists_create_with_text:()=>rp,lists_create_with_text2:()=>Fp,lists_del_general:()=>Dp,lists_find:()=>Op,lists_getIndex3:()=>Pp,lists_getSublist3:()=>Yp,lists_get_index:()=>lp,lists_get_random_item:()=>Tp,lists_get_random_sublist:()=>Mp,lists_get_sublist:()=>op,lists_insert_value:()=>hp,lists_insert_value2:()=>Xp,lists_pop:()=>cp,lists_remove_at:()=>Rp,lists_remove_at2:()=>yp,lists_reverse:()=>mp,lists_setIndex3:()=>vp,lists_set_index:()=>dp,lists_sort:()=>Cp});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>$p,dicts_add_or_change:()=>Hp,dicts_clear:()=>Jp,dicts_create_with:()=>Gp,dicts_create_with_noreturn:()=>ea,dicts_deldict:()=>jp,dicts_delete:()=>Wp,dicts_get:()=>wp,dicts_get_default:()=>kp,dicts_items:()=>qp,dicts_keys:()=>Up,dicts_length:()=>zp,dicts_pop:()=>Zp,dicts_setdefault:()=>ta,dicts_to_json:()=>na,dicts_to_json2:()=>oa,dicts_to_to:()=>_a,dicts_todict:()=>ia,dicts_update:()=>Kp,dicts_values:()=>Qp,json_to_dicts:()=>sa});var R={};t.r(R),t.d(R,{logic_boolean:()=>la,logic_compare:()=>pa,logic_compare_continous:()=>aa,logic_is:()=>Ma,logic_is_in:()=>Ta,logic_negate:()=>ra,logic_null:()=>da,logic_operation:()=>ua,logic_tobool:()=>ha,logic_true_or_false:()=>Ia});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Ba,sdcard_use_spi_init:()=>Va,storage_can_write_ornot:()=>Aa,storage_change_dir:()=>va,storage_close_file:()=>Na,storage_delete_file:()=>fa,storage_file_seek:()=>Ya,storage_file_tell:()=>Pa,storage_file_write:()=>ca,storage_fileopen:()=>Ea,storage_fileopen_new:()=>Oa,storage_fileopen_new_encoding:()=>Ra,storage_get_a_line:()=>Sa,storage_get_contents:()=>Ca,storage_get_contents_without_para:()=>ga,storage_get_current_dir:()=>Xa,storage_get_file_size:()=>Fa,storage_get_filename:()=>La,storage_is_file:()=>ba,storage_list_all_files:()=>Da,storage_make_dir:()=>ya,storage_open_file_with_os:()=>ma,storage_rename:()=>xa});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>ka,procedures_callreturn:()=>wa,procedures_defnoreturn:()=>Ua,procedures_defreturn:()=>Ga,procedures_ifreturn:()=>Ha,procedures_return:()=>Wa});var C={};t.r(C),t.d(C,{tuple_change_to:()=>tu,tuple_create_with:()=>Ka,tuple_create_with_noreturn:()=>su,tuple_create_with_text2:()=>Ja,tuple_create_with_text_return:()=>qa,tuple_del:()=>ja,tuple_find:()=>eu,tuple_getIndex:()=>Qa,tuple_getSublist:()=>nu,tuple_get_random_item:()=>ou,tuple_get_sublist:()=>_u,tuple_input:()=>au,tuple_join:()=>$a,tuple_length:()=>za,tuple_max:()=>Za,tuple_totuple:()=>pu,tuple_trig:()=>iu});var S={};t.r(S),t.d(S,{set_add_discard:()=>Mu,set_clear:()=>du,set_create_with:()=>uu,set_create_with_text_return:()=>Eu,set_length:()=>ru,set_operate:()=>Iu,set_operate_update:()=>Tu,set_pop:()=>lu,set_sub:()=>hu,set_toset:()=>Ou,set_update:()=>mu});var A={};t.r(A),t.d(A,{html_content:()=>Cu,html_content_more:()=>Su,html_document:()=>Ru,html_form:()=>Lu,html_head_body:()=>gu,html_style:()=>Au,html_style_content:()=>Nu,html_text:()=>Du,html_title:()=>cu});var L={};t.r(L),t.d(L,{attribute_access:()=>yu,function_call:()=>Xu,raw_block:()=>fu,raw_empty:()=>Pu,raw_expression:()=>Fu,raw_table:()=>Yu,type_check:()=>vu});var N={};t.r(N),t.d(N,{PIN_init:()=>Gr,actuator_extern_get_led_bright:()=>Qu,actuator_extern_get_led_state:()=>zu,actuator_extern_led_bright:()=>qu,actuator_extern_led_brightness:()=>ju,actuator_ms32006_dcmotor:()=>or,actuator_ms32006_init:()=>_r,actuator_ms32006_stepper:()=>pr,actuator_neopixel_init:()=>ar,actuator_neopixel_rgb:()=>ur,actuator_neopixel_rgb_all:()=>rr,actuator_neopixel_rgb_show_all_chase:()=>Ir,actuator_neopixel_rgb_show_all_rainbow:()=>dr,actuator_neopixel_write:()=>lr,actuator_use_uart_init:()=>Tr,esp32_music_get_tempo_extern:()=>Wu,esp32_music_pitch:()=>Uu,esp32_music_pitch_init:()=>Gu,esp32_music_pitch_with_time:()=>wu,esp32_music_play_list:()=>ku,esp32_music_reset_extern:()=>Ku,esp32_music_set_tempo_extern:()=>Hu,esp32_music_stop:()=>Ju,mixbot_actuator_extern_get_addr:()=>Vr,mixbot_actuator_extern_set_addr:()=>Br,mixbot_addr_extern:()=>Ar,parrot_PIN_init:()=>Hr,parrot_move_speed:()=>Wr,pin_led_bright:()=>Ur,player_insert_music:()=>Rr,player_play_music:()=>Or,player_set_mode:()=>Er,player_set_play:()=>hr,player_set_volume:()=>mr,player_whether_stop:()=>Mr,robot_led_extern:()=>fr,robot_led_extern_get_value:()=>Fr,robot_motor_extern:()=>Lr,robot_motor_extern_get_speed:()=>Nr,robot_servo_extern_absolute_run:()=>Xr,robot_servo_extern_get_status:()=>Pr,robot_servo_extern_relative_continue:()=>br,robot_servo_extern_relative_origin:()=>yr,robot_servo_extern_relative_run:()=>xr,robot_servo_extern_stop:()=>vr,robot_servo_extern_stop_mode:()=>Yr,robot_traffic_light_extern:()=>Dr,servo_PIN_init:()=>wr,servo_get_angle:()=>nr,servo_get_speed:()=>sr,servo_init:()=>$u,servo_move:()=>Zu,servo_move_angle:()=>kr,servo_set_angle:()=>er,servo_set_speed:()=>ir,servo_speed_360:()=>tr,syn6288_builtin_voice:()=>Cr,syn6288_get_voice:()=>gr,syn6288_set_voice:()=>cr,syn6288_tts_play:()=>Sr});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>Cl,actuator_dc_motor_stop:()=>Sl,actuator_get_led_bright:()=>zr,actuator_get_led_state:()=>jr,actuator_led_bright:()=>Qr,actuator_led_brightness:()=>$r,actuator_mixbot_buzzer_on_off:()=>fl,actuator_mixgo_nova_mic_get:()=>Xl,actuator_mixgo_nova_mic_set:()=>vl,actuator_mixgo_nova_onboard_music_pitch:()=>Gl,actuator_mixgo_nova_onboard_music_stop:()=>Ul,actuator_mixgo_nova_play_audio:()=>Vl,actuator_mixgo_nova_play_online_audio:()=>Bl,actuator_mixgo_nova_record_audio:()=>bl,actuator_mixgo_nova_voice_get:()=>xl,actuator_mixgo_nova_voice_set:()=>yl,actuator_mixgo_zero_led_color:()=>Zr,actuator_onboard_neopixel_rgb:()=>_l,actuator_onboard_neopixel_rgb_all:()=>ol,actuator_onboard_neopixel_rgb_show_all_chase:()=>al,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>pl,actuator_onboard_neopixel_write:()=>ul,actuator_rm_onboard_neopixel_rgb:()=>rl,actuator_rm_onboard_neopixel_rgb_all:()=>ll,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>dl,actuator_stepper_keep:()=>cl,actuator_stepper_stop:()=>gl,analog_ble_keyboard_init:()=>td,analog_ble_keyboard_input:()=>nd,analog_ble_keyboard_mouse_init:()=>ld,analog_ble_keyboard_mouse_input:()=>Md,analog_ble_keyboard_mouse_send_battery:()=>Td,analog_ble_keyboard_mouse_str:()=>hd,analog_ble_keyboard_send_battery:()=>_d,analog_ble_keyboard_str:()=>sd,analog_ble_mouse_init:()=>od,analog_ble_mouse_input:()=>ud,analog_ble_mouse_keyboard_input:()=>md,analog_ble_mouse_send_battery:()=>rd,analog_keyboard_input:()=>Wl,analog_keyboard_str:()=>Zl,analog_mouse_input:()=>jl,bitbot_motor:()=>Yl,bitbot_move:()=>Fl,bitbot_stop:()=>Pl,ble_keyboard_connect:()=>id,ble_keyboard_get_mac:()=>ed,ble_keyboard_mouse_connect:()=>Id,ble_keyboard_mouse_get_mac:()=>dd,ble_mouse_connect:()=>ad,ble_mouse_get_mac:()=>pd,cc_number:()=>sl,educore_ble_keyboard_input:()=>Nd,educore_ble_sensor_connected:()=>Ld,educore_ble_sensor_init:()=>Ad,educore_buzzer:()=>Ed,educore_buzzer_play_tone:()=>Od,educore_buzzer_play_tone_time:()=>Rd,educore_buzzer_stop:()=>cd,educore_neopixel_clear:()=>Sd,educore_neopixel_rgb:()=>Cd,educore_rgb_light:()=>gd,esp32_music_get_tempo:()=>Tl,esp32_music_reset:()=>Ml,esp32_music_set_tempo:()=>Il,esp32_onboard_music_pitch:()=>hl,esp32_onboard_music_pitch_with_time:()=>ml,esp32_onboard_music_play_list:()=>Ol,esp32_onboard_music_stop:()=>El,general_key:()=>Jl,general_key_tuple:()=>ql,generalkey_container:()=>Ql,generalkey_create_with_item:()=>zl,get_keyboard_light:()=>Dd,get_power_output:()=>kl,ledswitch:()=>qr,mixbot_motor:()=>Dl,mixbot_motor_status:()=>Al,mixbot_move:()=>Ll,mixbot_stop:()=>Nl,mouse_key:()=>$l,number:()=>Jr,rm_actuator_get_led_bright:()=>el,rm_actuator_get_led_state:()=>il,rm_actuator_led_bright:()=>tl,rm_actuator_led_brightness:()=>nl,rm_motor:()=>Rl,set_all_power_output:()=>Hl,set_power_output:()=>wl,special_key:()=>Kl});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>aI,ai_sensor_ailocal_class:()=>jd,ai_sensor_ailocal_class_result:()=>$d,ai_sensor_ailocal_train:()=>zd,ai_sensor_asr_recognize:()=>nI,ai_sensor_audio_play:()=>tI,ai_sensor_audio_record:()=>Zd,ai_sensor_barcode:()=>xd,ai_sensor_circle:()=>wd,ai_sensor_classifier_faces:()=>pI,ai_sensor_color:()=>Kd,ai_sensor_color_chases:()=>Qd,ai_sensor_color_chases_result:()=>qd,ai_sensor_config:()=>Xd,ai_sensor_face:()=>oI,ai_sensor_find_20objects:()=>uI,ai_sensor_find_barcodes:()=>bd,ai_sensor_find_circles:()=>kd,ai_sensor_find_colors:()=>Jd,ai_sensor_find_licenseplates:()=>_I,ai_sensor_find_lines:()=>Ud,ai_sensor_find_qrcodes:()=>vd,ai_sensor_find_rects:()=>Wd,ai_sensor_find_tags:()=>Bd,ai_sensor_licenseplate:()=>sI,ai_sensor_line:()=>Gd,ai_sensor_qrcode:()=>Pd,ai_sensor_qrcode_lite:()=>Yd,ai_sensor_rect:()=>Hd,ai_sensor_rgb:()=>yd,ai_sensor_tag:()=>Vd,ai_sensor_use_uart_init:()=>Fd,ai_sensor_yolo_recognize:()=>eI,ai_sensor_yolo_recognize_result:()=>iI});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>dI,MICROPYTHON_AI_Speech_unit:()=>lI,MICROPYTHON_AI_client:()=>rI});var P={};t.r(P),t.d(P,{AI_CAMERA_INIT:()=>NI,AI_STOP_ACQUISITION:()=>UI,CI130X_BROADCAST_SANT:()=>RI,CI130X_BROADCAST_SYSTEM_TIME:()=>gI,CI130X_GET_THE_RECOGNIZED_CMD_SANT:()=>OI,CI130X_GET_WHETHER_IDENTIFY_SANT:()=>EI,CI130X_IDENTIFY_AND_SAVE_SANT:()=>mI,CI130X_OPEN_AND_CLOSE:()=>hI,CI130X_SET_SYSTEM_CMD_SANT:()=>cI,CREATE_CAMERA:()=>CI,DELETE_PEOPLE_FACE_ID:()=>GI,GET_CAT_FACE_DETECTION_LOCATION:()=>YI,GET_CAT_FACE_DETECTION_NUM:()=>PI,GET_COLOR_DETECTION_LOCATION:()=>FI,GET_COLOR_DETECTION_NUM:()=>fI,GET_FACE_DETECTION_KEYPOINT_LOCATION:()=>yI,GET_FACE_DETECTION_LOCATION:()=>XI,GET_FACE_DETECTION_NUM:()=>vI,GET_FACE_RECOGNITION_ID:()=>xI,GET_FACE_RECOGNITION_ID_KEYPOINT_LOCATION:()=>VI,GET_FACE_RECOGNITION_ID_LOCATION:()=>bI,GET_PICTURE_DATA_EXACT:()=>AI,GET_QR_CODE_RECOGNITION_DATA:()=>DI,MIXIO_REPORT_IMAGE_DATA:()=>wI,PEOPLE_FACE_ENROLL:()=>BI,SCREEN_SHOW_CAM_GRAPH_SHOOT:()=>LI,SHOOT_AND_SAVE_PICTURE:()=>SI,VOICE_RECOGNITION_CONTROL:()=>MI});var Y={};t.r(Y),t.d(Y,{mpython_blynk_app_data:()=>nT,mpython_blynk_app_notify:()=>zI,mpython_blynk_email:()=>ZI,mpython_blynk_get_timers:()=>tT,mpython_blynk_on_connected:()=>JI,mpython_blynk_on_disconnected:()=>KI,mpython_blynk_run:()=>QI,mpython_blynk_sensor_data_to_app:()=>iT,mpython_blynk_set_property:()=>$I,mpython_blynk_setup:()=>sT,mpython_blynk_stop_timers:()=>jI,mpython_blynk_sync_virtual:()=>WI,mpython_blynk_terminal_widget_vpin:()=>HI,mpython_blynktimer:()=>eT,mpython_blynktimer_run:()=>qI});var v={};t.r(v),t.d(v,{cc_g1_init:()=>_T,cc_g1_read_bat:()=>oT,cc_g1_read_joystick:()=>pT,cc_g1_read_key:()=>aT,cc_g1_turnoff:()=>uT});var X={};t.r(X),t.d(X,{ce_go_dc_motor:()=>ET,ce_go_get_led_bright:()=>IT,ce_go_get_led_state:()=>TT,ce_go_hall_attachInterrupt:()=>OT,ce_go_hall_data:()=>cT,ce_go_hall_initialize:()=>RT,ce_go_led_bright:()=>dT,ce_go_led_brightness:()=>MT,ce_go_light_number:()=>lT,ce_go_pin_light:()=>LT,ce_go_pin_near:()=>CT,ce_go_pin_near_line:()=>gT,ce_go_pin_near_state_change:()=>ST,ce_go_stepper_keep:()=>hT,ce_go_stepper_stop:()=>mT,educore_car:()=>NT,educore_car_pin_near:()=>PT,educore_car_pin_near_line:()=>FT,educore_car_stepper_keep:()=>DT,educore_car_stepper_stop:()=>fT,sensor_mixgome_eulerangles:()=>AT});var y={};t.r(y),t.d(y,{communicate_bluetooth_central_init:()=>IM,communicate_bluetooth_connect:()=>mM,communicate_bluetooth_disconnect:()=>EM,communicate_bluetooth_handle:()=>CM,communicate_bluetooth_is_connected:()=>RM,communicate_bluetooth_mac:()=>hM,communicate_bluetooth_peripheral_init:()=>TM,communicate_bluetooth_recv:()=>cM,communicate_bluetooth_recv_only:()=>gM,communicate_bluetooth_scan:()=>MM,communicate_bluetooth_send:()=>OM,communicate_espnow_init:()=>SM,communicate_espnow_init_new:()=>AM,communicate_i2c_available:()=>QT,communicate_i2c_init:()=>yT,communicate_i2c_master_read:()=>qT,communicate_i2c_onboard:()=>vT,communicate_i2c_read:()=>xT,communicate_i2c_scan:()=>VT,communicate_i2c_write:()=>bT,communicate_ir_recv_init:()=>nM,communicate_ir_send_init:()=>aM,communicate_ow_init:()=>jT,communicate_ow_read:()=>ZT,communicate_ow_reset:()=>iM,communicate_ow_scan:()=>$T,communicate_ow_select:()=>eM,communicate_ow_write:()=>tM,communicate_spi_buffer:()=>UT,communicate_spi_init:()=>BT,communicate_spi_onboard:()=>XT,communicate_spi_read:()=>wT,communicate_spi_read_output:()=>kT,communicate_spi_readinto:()=>HT,communicate_spi_readinto_output:()=>WT,communicate_spi_set:()=>GT,communicate_spi_write:()=>KT,communicate_spi_write_readinto:()=>JT,espnow_radio_channel:()=>PM,espnow_radio_channel_new:()=>vM,espnow_radio_on_off:()=>XM,espnow_radio_rec:()=>xM,espnow_radio_recv:()=>VM,espnow_radio_recv_certain_msg:()=>BM,espnow_radio_recv_certain_msg_new:()=>UM,espnow_radio_recv_msg:()=>bM,espnow_radio_recv_new:()=>GM,espnow_radio_send:()=>yM,espnow_radio_txpower:()=>YM,i2c_available:()=>uh,i2c_init:()=>QM,i2c_master_reader2:()=>ah,i2c_read:()=>zM,i2c_scan:()=>$M,i2c_slave_onreceive:()=>zT,i2c_write:()=>jM,internal_variable:()=>sM,ir_recv_timeout:()=>pM,ir_transmit_busy:()=>dM,ir_transmit_conventional_data:()=>uM,ir_transmit_raw_code:()=>lM,ir_transmit_study_code:()=>rM,ir_whether_recv:()=>oM,lora_init:()=>wM,lora_packet:()=>kM,lora_recv:()=>WM,lora_send:()=>HM,network_espnow_info:()=>NM,network_espnow_mac:()=>LM,network_espnow_recv:()=>DM,network_espnow_recv_handle:()=>FM,network_espnow_send:()=>fM,recv_fun:()=>_M,spi_buffer:()=>eh,spi_init:()=>ZM,spi_read:()=>ih,spi_read_output:()=>nh,spi_readinto:()=>sh,spi_readinto_output:()=>_h,spi_set:()=>th,spi_write:()=>oh,spi_write_readinto:()=>ph,urequests_attribute:()=>JM,urequests_get:()=>KM,urequests_method:()=>qM});var x={};t.r(x),t.d(x,{display_animate:()=>Uh,display_blink_rate:()=>bh,display_circle:()=>wh,display_color_seclet:()=>tm,display_draw_4strings:()=>Ph,display_fill:()=>Gh,display_get_screen_image:()=>xh,display_help:()=>Hh,display_image_size:()=>Yh,display_lcd_use_i2c_init:()=>om,display_line:()=>Xh,display_line_arbitrarily:()=>yh,display_matrix_extern_bright_point:()=>Ch,display_matrix_extern_bright_screen:()=>Ah,display_matrix_extern_clear:()=>Lh,display_matrix_extern_get_pixel:()=>gh,display_matrix_extern_get_screen_pixel:()=>Sh,display_matrix_extern_image_builtins:()=>Nh,display_matrix_extern_scroll_string:()=>mh,display_matrix_extern_scroll_string_delay:()=>Eh,display_matrix_extern_shift:()=>ch,display_matrix_extern_show_frame_string:()=>Oh,display_matrix_extern_show_frame_string_delay:()=>Rh,display_matrix_extern_show_image:()=>Mh,display_matrix_extern_show_image_or_string_delay:()=>hh,display_matrix_use_i2c_init:()=>Th,display_oled_drawPixel:()=>Kh,display_oled_showBitmap:()=>Wh,display_oled_use_i2c_init:()=>lm,display_onoff:()=>Bh,display_rect:()=>vh,display_rgb_color:()=>Vh,display_tm1650_power:()=>qh,display_tm1650_set_brightness:()=>jh,display_tm1650_show_dot:()=>zh,display_tm1650_show_num:()=>Qh,display_tm_use_i2c_init:()=>Jh,display_triangle:()=>kh,display_use_i2c_init:()=>Fh,extern_oled_bright_point:()=>gm,extern_oled_clear:()=>Cm,extern_oled_get_pixel:()=>cm,extern_oled_hvline:()=>Am,extern_oled_line:()=>Lm,extern_oled_scroll_string:()=>hm,extern_oled_scroll_string_delay:()=>mm,extern_oled_shape_rect:()=>Sm,extern_oled_shift:()=>Rm,extern_oled_show_frame_string:()=>Em,extern_oled_show_frame_string_delay:()=>Om,extern_oled_show_image:()=>dm,extern_oled_show_image_or_string_delay:()=>Mm,extern_oled_show_image_xy:()=>Im,extern_oled_show_string:()=>Tm,lcd_backlight:()=>um,lcd_clear:()=>rm,lcd_print_string:()=>am,lcd_show_image_or_string_delay:()=>pm,matrix_extern_image_arithmetic:()=>Dh,matrix_extern_image_invert:()=>fh,tft_fill:()=>sm,tft_line_arbitrarily:()=>_m,tft_scroll_string_delay:()=>im,tft_show_frame_string_delay:()=>nm,tft_show_image_or_string_delay:()=>em,tft_show_image_xy:()=>Zh,tft_use_spi_init:()=>$h});var b={};t.r(b),t.d(b,{bitbot_display_bitmap_create:()=>OE,bitbot_display_image_create:()=>EE,display_available:()=>Jm,display_bitmap_create:()=>xm,display_bright_point:()=>km,display_bright_screen:()=>Wm,display_clear:()=>Km,display_get_pixel:()=>wm,display_get_screen_pixel:()=>Hm,display_image_builtins:()=>bm,display_image_builtins_all:()=>Vm,display_image_create:()=>ym,display_scroll_string:()=>Fm,display_scroll_string_delay:()=>Pm,display_shift:()=>Um,display_show_frame_string:()=>vm,display_show_frame_string_delay:()=>Xm,display_show_image:()=>Dm,display_show_image_or_string_delay:()=>fm,draw_pointer:()=>xE,image_arithmetic:()=>Bm,image_invert:()=>Gm,mixbot_display_bitmap_create:()=>IE,mixbot_display_bright_screen:()=>hE,mixbot_display_get_ambientbright:()=>ME,mixbot_display_get_screen_pixel:()=>TE,mixbot_display_image_create:()=>dE,mixbot_display_rotate:()=>mE,mixgo_display_bitmap_create:()=>Zm,mixgo_display_image_create_new:()=>$m,mixgome_display_bitmap_create:()=>Qm,mixgome_display_font:()=>tE,mixgome_display_image_create:()=>qm,mixgomini_display_bitmap_create:()=>jm,mixgomini_display_image_create:()=>zm,mpython_display_hvline:()=>uE,mpython_display_line:()=>rE,mpython_display_shape_rect:()=>aE,mpython_pbm_image:()=>lE,nova_draw_pointer:()=>bE,onboard_oled_bright_point:()=>pE,onboard_oled_scroll_string_delay:()=>_E,onboard_oled_show_frame_string_delay:()=>oE,onboard_oled_show_image:()=>eE,onboard_oled_show_image_or_string_delay:()=>sE,onboard_oled_show_image_xy:()=>iE,onboard_oled_show_string:()=>nE,onboard_tft_bright_point:()=>DE,onboard_tft_bright_screen:()=>HE,onboard_tft_clear:()=>WE,onboard_tft_clock_clear:()=>XE,onboard_tft_clock_draw:()=>vE,onboard_tft_clock_get_rtctime:()=>PE,onboard_tft_clock_init:()=>FE,onboard_tft_clock_set_time:()=>YE,onboard_tft_display_hvline:()=>AE,onboard_tft_display_line:()=>LE,onboard_tft_display_shape_circle:()=>yE,onboard_tft_display_shape_rect:()=>SE,onboard_tft_fill:()=>fE,onboard_tft_get_pixel:()=>NE,onboard_tft_get_screen_pixel:()=>kE,onboard_tft_scroll_string:()=>GE,onboard_tft_scroll_string_delay:()=>Ym,onboard_tft_shift:()=>wE,onboard_tft_show_frame_string:()=>UE,onboard_tft_show_frame_string_delay:()=>CE,onboard_tft_show_image:()=>BE,onboard_tft_show_image_or_string_delay:()=>gE,onboard_tft_show_image_xy:()=>RE,onboard_tft_show_image_xy_direct:()=>cE,onboard_tft_show_texts:()=>VE});var V={};t.r(V),t.d(V,{factory_block:()=>uO,factory_block_return:()=>rO,factory_block_return_with_textarea:()=>dO,factory_block_with_textarea:()=>lO,factory_callMethod_noreturn:()=>pO,factory_callMethod_return:()=>aO,factory_create_with_container:()=>nO,factory_create_with_item:()=>sO,factory_declare:()=>oO,factory_from_import:()=>tO,factory_function_noreturn:()=>iO,factory_function_return:()=>_O,factory_import:()=>eO,folding_block:()=>IO});var B={};t.r(B),t.d(B,{controls_pin_attachInterrupt:()=>yO,inout_analog_atten:()=>CO,inout_analog_read:()=>gO,inout_analog_read_init:()=>fO,inout_analog_write:()=>OO,inout_analog_write_init:()=>DO,inout_analog_write_set:()=>RO,inout_analog_write_set_freq:()=>YO,inout_digital_init:()=>LO,inout_digital_read:()=>mO,inout_digital_write:()=>hO,inout_highlow:()=>MO,inout_pinMode:()=>PO,inout_pin_attachInterrupt:()=>AO,inout_pin_pressed:()=>SO,inout_pin_pressed_init:()=>FO,inout_pwm_analog_write:()=>EO,inout_pwm_analog_write_init:()=>NO,inout_pwm_analog_write_set_freq:()=>cO,pin_pressed:()=>XO,pin_pressed_init:()=>vO});var G={};t.r(G),t.d(G,{IOT_CONNECT_OLLAMA:()=>ER,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>_R,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>sR,IOT_EMQX_PING:()=>iR,IOT_FORMATTING:()=>tR,IOT_FORMAT_STRING:()=>eR,IOT_MIXIO_NTP:()=>nR,IOT_MIXIO_PUBLISH:()=>JO,IOT_MIXIO_SUBSCRIBE:()=>qO,iot_checkonenet:()=>MR,iot_client_onboard:()=>pR,iot_connect_ollama:()=>mR,iot_connect_openai:()=>OR,iot_create_with_item:()=>WO,iot_http_client:()=>aR,iot_http_data:()=>uR,iot_mixio_check:()=>jO,iot_mixio_connect:()=>KO,iot_mixio_connect_only:()=>zO,iot_mixio_disconnect:()=>QO,iot_mixio_format_msg:()=>ZO,iot_mixio_format_topic:()=>$O,iot_mixly_key:()=>oR,iot_mqtt_client:()=>rR,iot_mqtt_data:()=>lR,iot_onenet_check:()=>GO,iot_onenet_connect:()=>VO,iot_onenet_disconnect:()=>BO,iot_onenet_publish:()=>wO,iot_onenet_publish_dict:()=>UO,iot_onenetconnect:()=>IR,iot_onenetdisconnect:()=>TR,iot_publish:()=>hR,iot_publish_container:()=>kO,iot_publish_item:()=>HO,iot_wifi_connect:()=>bO,iot_wificonnect:()=>dR,ollama_empty_history:()=>gR,use_ollama_llm_to_chat:()=>RR,use_ollama_llm_to_chat_return:()=>cR});var U={};t.r(U),t.d(U,{educore_mqtt_connect:()=>ec,educore_mqtt_connect_success:()=>_c,educore_mqtt_subscribe_message:()=>ic,educore_mqtt_topic_publish:()=>sc,educore_mqtt_topic_subscribe:()=>nc,educore_wifi_connect:()=>tc,network_ap_connect:()=>vR,network_connect:()=>DR,network_get_connect:()=>FR,network_get_wifi:()=>YR,network_init:()=>SR,network_is_active:()=>LR,network_open:()=>AR,network_scan:()=>NR,network_server:()=>XR,network_socket_accept:()=>BR,network_socket_bind:()=>xR,network_socket_close:()=>HR,network_socket_connect:()=>bR,network_socket_init:()=>yR,network_socket_listen:()=>VR,network_socket_receive:()=>GR,network_socket_receive_from:()=>wR,network_socket_send:()=>UR,network_socket_send_to:()=>kR,network_stop:()=>PR,network_wifi_connect:()=>fR,ntptime_address:()=>QR,ntptime_time:()=>qR,requests_attribute:()=>KR,requests_attribute2:()=>ZR,requests_get:()=>WR,requests_get2:()=>jR,requests_method:()=>JR,requests_post:()=>$R});var w={};t.r(w),t.d(w,{CI130X_BROADCAST:()=>Fc,CI130X_GET_THE_RECOGNIZED_CMD:()=>fc,CI130X_GET_WHETHER_IDENTIFY:()=>Dc,CI130X_IDENTIFY_AND_SAVE:()=>Nc,CI130X_SET_SYSTEM_CMD:()=>Pc,HCSR04:()=>Og,PS2_Button:()=>Cg,PS2_Buttons:()=>Ag,PS2_Buttons_new:()=>fg,PS2_State:()=>Sg,PS2_init:()=>Rg,PS2_init_new:()=>Ng,PS2_stk:()=>Lg,PS2_stk_new:()=>Fg,PS2_vibration:()=>gg,PS2_vibration_new:()=>Dg,camera_sensor_init:()=>oC,camera_sensor_result:()=>pC,column_tube_foot:()=>dC,define_keyboards:()=>IC,educore_body_sensor:()=>zg,educore_button_sensor_extern:()=>tC,educore_camera_sensor:()=>_C,educore_infrared_sensor:()=>Zg,educore_soilhum_sensor:()=>jg,educore_temp_sensor:()=>sC,educore_temphum_sensor:()=>$g,educore_ultrasonic_sensor:()=>iC,esp32_s2_weather_init:()=>Mg,esp32_s2_weather_rain:()=>mg,esp32_s2_weather_wd:()=>hg,esp32_s2_weather_ws:()=>Eg,extern_rfid_read:()=>eg,extern_rfid_readcontent:()=>ng,extern_rfid_readid:()=>ig,extern_rfid_status:()=>og,extern_rfid_write:()=>sg,extern_rfid_write_return:()=>_g,get_keboards_value:()=>TC,gnss_get_data:()=>Xg,gnss_have_data:()=>vg,init_matrix_keyboard:()=>rC,interaction_whether_to_interaction:()=>Ac,interaction_whether_to_interaction_SANT:()=>Lc,line_tube_foot:()=>lC,mixbot_sensor_extern_get_addr:()=>wg,mixbot_sensor_extern_set_addr:()=>kg,pm25_get_data:()=>Yg,radar_set_DETECTION_THRESHOLD:()=>Cc,radar_set_DETECTION_THRESHOLD_SANT:()=>Sc,robot_button_extern_get_value:()=>xg,robot_color_extern_get_value:()=>Ug,robot_infrared_extern_get_value:()=>Vg,robot_infrared_extern_grey_get_value:()=>Bg,robot_potentiometer_extern_get_value:()=>Gg,robot_sonar_extern_get_value:()=>Hg,robot_sonar_extern_led:()=>Wg,robot_touch_extern_get_value:()=>bg,sensor_APDS9960_extern:()=>vc,sensor_DS18X20:()=>Rc,sensor_LTR308_extern:()=>Xc,sensor_LTR390UV_extern:()=>bc,sensor_MAX30102_extern:()=>Yc,sensor_QMC5883L_extern:()=>Wc,sensor_VL530LX_extern:()=>Vc,sensor_adxl345_get_acceleration:()=>dc,sensor_aht11_extern:()=>Gc,sensor_bmp:()=>Ec,sensor_compass_reset:()=>Zc,sensor_dht11:()=>Tc,sensor_hp203_extern:()=>Uc,sensor_light_level:()=>Ic,sensor_lm35:()=>cc,sensor_ltr381_extern:()=>yc,sensor_mixgo_extern_button_attachInterrupt:()=>rc,sensor_mixgo_extern_button_get_presses:()=>uc,sensor_mixgo_extern_button_is_pressed:()=>pc,sensor_mixgo_extern_button_was_pressed:()=>ac,sensor_mixgo_extern_light:()=>Mc,sensor_mixgo_extern_pin_near:()=>mc,sensor_mixgo_extern_sound:()=>hc,sensor_mixgoce_hot_wheel_degrees:()=>Tg,sensor_mixgoce_hot_wheel_is_touched:()=>Ig,sensor_mpu9250_attachGestureInterrupt:()=>lc,sensor_mpu9250_calibrate_compass:()=>zc,sensor_mpu9250_field_strength:()=>$c,sensor_mpu9250_gesture:()=>Kc,sensor_mpu9250_get_acceleration:()=>Jc,sensor_mpu9250_get_gyro:()=>Qc,sensor_mpu9250_get_magnetic:()=>qc,sensor_mpu9250_temperature:()=>jc,sensor_ms5611_extern:()=>kc,sensor_ms5611_extern_altitude:()=>Hc,sensor_read_humiture:()=>eC,sensor_sht:()=>Oc,sensor_shtc3_extern:()=>Bc,sensor_spl06_001_extern:()=>wc,sensor_ucs12071_extern:()=>xc,sensor_use_i2c_init:()=>gc,sensor_use_spi_init:()=>tg,sensor_use_uart_init:()=>Pg,sensor_weather_solo_init:()=>Kg,sensor_weather_solo_rain:()=>Qg,sensor_weather_solo_wd:()=>Jg,sensor_weather_solo_ws:()=>qg,sensor_weigh_init:()=>aC,tvoc_get_data:()=>yg,ultrasonic_sensor_read_distance:()=>nC,weather_data:()=>pg,weather_have_data:()=>ag,weather_set_label:()=>rg,weather_set_label_container:()=>lg,weather_set_label_item:()=>dg,weather_uart_mixio:()=>ug,weigh_sensor_get_weight:()=>uC});var k={};t.r(k),t.d(k,{HCSR04:()=>PC,RTC_set_date:()=>FC,RTC_set_time:()=>fC,bitbot_als_num:()=>GS,dht11:()=>JS,educore_button_sensor:()=>iA,educore_button_was_pressed:()=>nA,educore_gyroscope_sensor:()=>ZS,educore_gyroscope_sensor_read:()=>tA,educore_gyroscope_sensor_shake:()=>eA,educore_light_sensor:()=>$S,educore_rfid_sensor:()=>sA,educore_rfid_sensor_scan:()=>_A,educore_rfid_sensor_scan_data:()=>oA,educore_voice_sensor:()=>zS,number1:()=>vC,number2:()=>XC,number3:()=>yC,number4:()=>xC,number5:()=>bC,number6:()=>VC,number7:()=>BC,onboard_RTC_get_time:()=>JC,onboard_RTC_get_time_str:()=>ZC,onboard_RTC_get_timestamp:()=>qC,onboard_RTC_get_timetuple_to_str:()=>tS,onboard_RTC_set_datetime:()=>jC,onboard_RTC_settime_string:()=>zC,onboard_RTC_timestamp_totuple:()=>QC,rfid_readcontent:()=>pS,rfid_readid:()=>oS,rfid_status:()=>rS,rfid_write:()=>aS,rfid_write_return:()=>uS,sensor_LTR308:()=>eS,sensor_aht11:()=>nS,sensor_bitbot_ALS:()=>BS,sensor_button_get_presses:()=>kS,sensor_button_is_pressed:()=>US,sensor_button_was_pressed:()=>wS,sensor_distance_hrsc04:()=>DC,sensor_eulerangles:()=>dS,sensor_field_strength:()=>qS,sensor_get_acceleration:()=>lS,sensor_get_temperature:()=>sS,sensor_get_the_coprocessor_version:()=>pA,sensor_hp203:()=>_S,sensor_light:()=>KS,sensor_mixbot_get_gyro:()=>VS,sensor_mixbot_patrol_calibrate:()=>yS,sensor_mixbot_patrol_value:()=>xS,sensor_mixbot_temperature:()=>bS,sensor_mixgo_LTR308:()=>WC,sensor_mixgo_button_attachInterrupt:()=>OC,sensor_mixgo_button_get_presses:()=>EC,sensor_mixgo_button_is_pressed:()=>hC,sensor_mixgo_button_was_pressed:()=>mC,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>CS,sensor_mixgo_cc_mmc5603_get_angle:()=>gS,sensor_mixgo_cc_mmc5603_get_magnetic:()=>cS,sensor_mixgo_light:()=>YC,sensor_mixgo_nova_LTR308:()=>HC,sensor_mixgo_nova_pin_near:()=>kC,sensor_mixgo_pin_near:()=>wC,sensor_mixgo_pin_near_double:()=>UC,sensor_mixgo_pin_near_single:()=>GC,sensor_mixgo_pin_pressed:()=>SC,sensor_mixgo_sant_color:()=>KC,sensor_mixgo_touch_slide:()=>NC,sensor_mixgocar42_button_attachInterrupt:()=>CC,sensor_mixgocar42_button_get_presses:()=>gC,sensor_mixgocar42_button_is_pressed:()=>RC,sensor_mixgocar42_button_was_pressed:()=>cC,sensor_mixgocar_battery_left:()=>XS,sensor_mixgocar_pin_near:()=>YS,sensor_mixgocar_pin_near_line:()=>PS,sensor_mixgocar_pin_near_state_change:()=>vS,sensor_mixgoce_pin_pressed:()=>AC,sensor_mixgoce_temperature:()=>AS,sensor_mixgome_temperature:()=>SS,sensor_mpython_pin_pressed:()=>LC,sensor_mpython_qmi8658_get_gyro:()=>LS,sensor_mpython_qmi8658_temperature:()=>NS,sensor_onboard_compass_reset:()=>RS,sensor_onboard_mpu9250_calibrate_compass:()=>mS,sensor_onboard_mpu9250_field_strength:()=>OS,sensor_onboard_mpu9250_gesture:()=>IS,sensor_onboard_mpu9250_get_acceleration:()=>TS,sensor_onboard_mpu9250_get_gyro:()=>hS,sensor_onboard_mpu9250_get_magnetic:()=>MS,sensor_onboard_mpu9250_temperature:()=>ES,sensor_pin_near:()=>WS,sensor_pin_pressed:()=>HS,sensor_read:()=>jS,sensor_rm_acc:()=>FS,sensor_rm_battery_left:()=>fS,sensor_rm_pin_near_double:()=>DS,sensor_rtc_init:()=>$C,sensor_sound:()=>iS,sensor_temperature:()=>QS});var H={};t.r(H),t.d(H,{serial_any:()=>mA,serial_begin:()=>gA,serial_print:()=>dA,serial_print_byte:()=>lA,serial_print_hex:()=>TA,serial_println:()=>IA,serial_read_from_ai:()=>PA,serial_readline:()=>EA,serial_readstr:()=>hA,serial_readstr_until:()=>OA,serial_receive_data_event:()=>MA,serial_send_to_ai:()=>FA,serial_softserial:()=>cA,serial_softserial_new:()=>RA,system_input:()=>CA,system_print:()=>SA,system_print_container:()=>DA,system_print_end:()=>LA,system_print_inline:()=>AA,system_print_item:()=>fA,system_print_many:()=>NA});var W={};t.r(W),t.d(W,{Panic_with_status_code:()=>yA,Timer_init:()=>qA,base_delay:()=>jA,controls_delay:()=>XA,controls_delay_new:()=>vA,controls_millis:()=>bA,controls_uname:()=>BA,raw_block:()=>VA,reset:()=>xA,system_bitbot_shutdown:()=>JA,system_machine_reset:()=>KA,system_ticks_diff:()=>wA,system_timer:()=>UA,system_timer_init:()=>kA,system_wdt_feed:()=>WA,system_wdt_init:()=>HA,time_ticks_diff:()=>zA,timer:()=>GA,timer2:()=>QA});var K={};t.r(K),t.d(K,{Air_daily_content:()=>lL,Air_now_content:()=>sL,Geo_moon_content:()=>IL,Geo_sun_content:()=>dL,Life_suggestion_content:()=>oL,Location_search_content:()=>aL,Tide_daily_content:()=>pL,WEATHER_DAILY:()=>tL,WEATHER_HOUR:()=>eL,WEATHER_NOW:()=>ZA,Weather_alarm_content:()=>_L,Weather_daily:()=>uL,Weather_daily_content:()=>rL,Weather_now:()=>iL,Weather_now_content:()=>nL});var J={};t.r(J),t.d(J,{PIN_init:()=>IN,actuator_extern_get_led_bright:()=>vL,actuator_extern_get_led_state:()=>XL,actuator_extern_led_bright:()=>YL,actuator_extern_led_brightness:()=>yL,actuator_ms32006_dcmotor:()=>cL,actuator_ms32006_init:()=>RL,actuator_ms32006_stepper:()=>gL,actuator_neopixel_init:()=>xL,actuator_neopixel_rgb:()=>BL,actuator_neopixel_rgb_all:()=>bL,actuator_neopixel_rgb_show_all_chase:()=>GL,actuator_neopixel_rgb_show_all_rainbow:()=>UL,actuator_neopixel_write:()=>VL,actuator_use_uart_init:()=>wL,esp32_music_get_tempo_extern:()=>DL,esp32_music_pitch:()=>SL,esp32_music_pitch_init:()=>CL,esp32_music_pitch_with_time:()=>AL,esp32_music_play_list:()=>fL,esp32_music_reset_extern:()=>FL,esp32_music_set_tempo_extern:()=>NL,esp32_music_stop:()=>LL,mixbot_actuator_extern_get_addr:()=>lN,mixbot_actuator_extern_set_addr:()=>dN,mixbot_addr_extern:()=>$L,parrot_PIN_init:()=>mN,parrot_move_speed:()=>EN,pin_led_bright:()=>TN,player_play_music:()=>JL,player_set_mode:()=>KL,player_set_play:()=>HL,player_set_volume:()=>WL,player_whether_stop:()=>kL,robot_led_extern:()=>iN,robot_led_extern_get_value:()=>nN,robot_motor_extern:()=>ZL,robot_motor_extern_get_speed:()=>tN,robot_servo_extern_absolute_run:()=>pN,robot_servo_extern_get_status:()=>sN,robot_servo_extern_relative_continue:()=>rN,robot_servo_extern_relative_origin:()=>aN,robot_servo_extern_relative_run:()=>uN,robot_servo_extern_stop:()=>oN,robot_servo_extern_stop_mode:()=>_N,robot_traffic_light_extern:()=>eN,servo_PIN_init:()=>MN,servo_get_angle:()=>EL,servo_get_speed:()=>OL,servo_init:()=>TL,servo_move:()=>PL,servo_move_angle:()=>hN,servo_set_angle:()=>hL,servo_set_speed:()=>mL,servo_speed_360:()=>ML,syn6288_builtin_voice:()=>zL,syn6288_get_voice:()=>QL,syn6288_set_voice:()=>qL,syn6288_tts_play:()=>jL});var q={};t.r(q),t.d(q,{actuator_dc_motor:()=>KN,actuator_dc_motor_stop:()=>JN,actuator_get_led_bright:()=>fN,actuator_get_led_state:()=>FN,actuator_led_bright:()=>DN,actuator_led_brightness:()=>PN,actuator_mixbot_buzzer_on_off:()=>$N,actuator_mixgo_nova_mic_get:()=>nD,actuator_mixgo_nova_mic_set:()=>iD,actuator_mixgo_nova_onboard_music_pitch:()=>uD,actuator_mixgo_nova_onboard_music_stop:()=>rD,actuator_mixgo_nova_play_audio:()=>pD,actuator_mixgo_nova_play_online_audio:()=>aD,actuator_mixgo_nova_record_audio:()=>oD,actuator_mixgo_nova_voice_get:()=>_D,actuator_mixgo_nova_voice_set:()=>sD,actuator_mixgo_zero_led_color:()=>YN,actuator_onboard_neopixel_rgb:()=>BN,actuator_onboard_neopixel_rgb_all:()=>GN,actuator_onboard_neopixel_rgb_show_all_chase:()=>UN,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>wN,actuator_onboard_neopixel_write:()=>VN,actuator_stepper_keep:()=>HN,actuator_stepper_stop:()=>WN,analog_ble_keyboard_init:()=>cD,analog_ble_keyboard_input:()=>SD,analog_ble_keyboard_mouse_init:()=>YD,analog_ble_keyboard_mouse_input:()=>xD,analog_ble_keyboard_mouse_send_battery:()=>yD,analog_ble_keyboard_mouse_str:()=>bD,analog_ble_keyboard_send_battery:()=>LD,analog_ble_keyboard_str:()=>AD,analog_ble_mouse_init:()=>ND,analog_ble_mouse_input:()=>FD,analog_ble_mouse_keyboard_input:()=>VD,analog_ble_mouse_send_battery:()=>PD,analog_keyboard_input:()=>TD,analog_keyboard_str:()=>OD,analog_mouse_input:()=>mD,bitbot_motor:()=>eD,bitbot_move:()=>ZN,bitbot_stop:()=>tD,ble_keyboard_connect:()=>CD,ble_keyboard_get_mac:()=>gD,ble_keyboard_mouse_connect:()=>XD,ble_keyboard_mouse_get_mac:()=>vD,ble_mouse_connect:()=>fD,ble_mouse_get_mac:()=>DD,cc_number:()=>vN,educore_ble_keyboard_input:()=>qD,educore_ble_sensor_connected:()=>JD,educore_ble_sensor_init:()=>KD,educore_buzzer:()=>BD,educore_buzzer_play_tone:()=>GD,educore_buzzer_play_tone_time:()=>UD,educore_buzzer_stop:()=>wD,educore_neopixel_clear:()=>WD,educore_neopixel_rgb:()=>HD,educore_rgb_light:()=>kD,esp32_music_get_tempo:()=>RN,esp32_music_reset:()=>AN,esp32_music_set_tempo:()=>ON,esp32_onboard_music_pitch:()=>cN,esp32_onboard_music_pitch_with_time:()=>gN,esp32_onboard_music_play_list:()=>SN,esp32_onboard_music_stop:()=>CN,general_key:()=>hD,general_key_tuple:()=>RD,get_keyboard_light:()=>QD,get_power_output:()=>dD,ledswitch:()=>NN,mixbot_motor:()=>jN,mixbot_motor_status:()=>qN,mixbot_move:()=>QN,mixbot_stop:()=>zN,mouse_key:()=>ED,number:()=>LN,rm_actuator_get_led_bright:()=>yN,rm_actuator_get_led_state:()=>xN,rm_actuator_led_bright:()=>XN,rm_actuator_led_brightness:()=>bN,rm_motor:()=>kN,set_all_power_output:()=>ID,set_power_output:()=>lD,special_key:()=>MD});var Q={};t.r(Q),t.d(Q,{ai_sensor_20object:()=>ff,ai_sensor_ailocal_class:()=>Ef,ai_sensor_ailocal_class_result:()=>Of,ai_sensor_ailocal_train:()=>mf,ai_sensor_asr_recognize:()=>Sf,ai_sensor_audio_play:()=>cf,ai_sensor_audio_record:()=>Rf,ai_sensor_barcode:()=>nf,ai_sensor_circle:()=>uf,ai_sensor_classifier_faces:()=>Df,ai_sensor_color:()=>If,ai_sensor_color_chases:()=>hf,ai_sensor_color_chases_result:()=>Mf,ai_sensor_config:()=>$D,ai_sensor_face:()=>Nf,ai_sensor_find_20objects:()=>Ff,ai_sensor_find_barcodes:()=>sf,ai_sensor_find_circles:()=>rf,ai_sensor_find_colors:()=>Tf,ai_sensor_find_licenseplates:()=>Lf,ai_sensor_find_lines:()=>af,ai_sensor_find_qrcodes:()=>ef,ai_sensor_find_rects:()=>df,ai_sensor_find_tags:()=>of,ai_sensor_licenseplate:()=>Af,ai_sensor_line:()=>pf,ai_sensor_qrcode:()=>tf,ai_sensor_qrcode_lite:()=>jD,ai_sensor_rect:()=>lf,ai_sensor_rgb:()=>ZD,ai_sensor_tag:()=>_f,ai_sensor_use_uart_init:()=>zD,ai_sensor_yolo_recognize:()=>gf,ai_sensor_yolo_recognize_result:()=>Cf});var z={};t.r(z),t.d(z,{AI_CAMERA_INIT:()=>kf,AI_STOP_ACQUISITION:()=>nF,CI130X_BROADCAST_SANT:()=>xf,CI130X_BROADCAST_SYSTEM_TIME:()=>Vf,CI130X_GET_THE_RECOGNIZED_CMD_SANT:()=>yf,CI130X_GET_WHETHER_IDENTIFY_SANT:()=>Xf,CI130X_IDENTIFY_AND_SAVE_SANT:()=>vf,CI130X_OPEN_AND_CLOSE:()=>Yf,CI130X_SET_SYSTEM_CMD_SANT:()=>bf,CREATE_CAMERA:()=>Bf,DELETE_PEOPLE_FACE_ID:()=>iF,GET_CAT_FACE_DETECTION_LOCATION:()=>qf,GET_CAT_FACE_DETECTION_NUM:()=>Jf,GET_COLOR_DETECTION_LOCATION:()=>Kf,GET_COLOR_DETECTION_NUM:()=>Wf,GET_FACE_DETECTION_KEYPOINT_LOCATION:()=>jf,GET_FACE_DETECTION_LOCATION:()=>zf,GET_FACE_DETECTION_NUM:()=>Qf,GET_FACE_RECOGNITION_ID:()=>$f,GET_FACE_RECOGNITION_ID_KEYPOINT_LOCATION:()=>tF,GET_FACE_RECOGNITION_ID_LOCATION:()=>Zf,GET_PICTURE_DATA_EXACT:()=>Uf,GET_QR_CODE_RECOGNITION_DATA:()=>Hf,MIXIO_REPORT_IMAGE_DATA:()=>sF,PEOPLE_FACE_ENROLL:()=>eF,SCREEN_SHOW_CAM_GRAPH_SHOOT:()=>wf,SHOOT_AND_SAVE_PICTURE:()=>Gf,VOICE_RECOGNITION_CONTROL:()=>Pf});var j={};t.r(j),t.d(j,{MICROPYTHON_AI_Speech_asr:()=>pF,MICROPYTHON_AI_Speech_unit:()=>oF,MICROPYTHON_AI_client:()=>_F});var $={};t.r($),t.d($,{mpython_blynk_app_data:()=>OF,mpython_blynk_app_notify:()=>TF,mpython_blynk_email:()=>RF,mpython_blynk_get_timers:()=>hF,mpython_blynk_on_connected:()=>lF,mpython_blynk_on_disconnected:()=>rF,mpython_blynk_run:()=>IF,mpython_blynk_sensor_data_to_app:()=>EF,mpython_blynk_set_property:()=>cF,mpython_blynk_setup:()=>gF,mpython_blynk_stop_timers:()=>MF,mpython_blynk_sync_virtual:()=>uF,mpython_blynk_terminal_widget_vpin:()=>aF,mpython_blynktimer:()=>mF,mpython_blynktimer_run:()=>dF});var Z={};t.r(Z),t.d(Z,{cc_g1_read_bat:()=>CF,cc_g1_read_joystick:()=>SF,cc_g1_read_key:()=>AF,cc_g1_turnoff:()=>LF});var tt={};t.r(tt),t.d(tt,{ce_go_dc_motor:()=>XF,ce_go_get_led_bright:()=>fF,ce_go_get_led_state:()=>FF,ce_go_hall_attachInterrupt:()=>yF,ce_go_hall_data:()=>bF,ce_go_hall_initialize:()=>xF,ce_go_led_bright:()=>DF,ce_go_led_brightness:()=>PF,ce_go_light_number:()=>NF,ce_go_pin_light:()=>wF,ce_go_pin_near:()=>BF,ce_go_pin_near_line:()=>VF,ce_go_pin_near_state_change:()=>GF,ce_go_stepper_keep:()=>YF,ce_go_stepper_stop:()=>vF,educore_car:()=>kF,educore_car_pin_near:()=>JF,educore_car_pin_near_line:()=>KF,educore_car_stepper_keep:()=>HF,educore_car_stepper_stop:()=>WF,sensor_mixgome_eulerangles:()=>UF});var et={};t.r(et),t.d(et,{communicate_bluetooth_central_init:()=>DP,communicate_bluetooth_connect:()=>PP,communicate_bluetooth_disconnect:()=>YP,communicate_bluetooth_handle:()=>VP,communicate_bluetooth_is_connected:()=>XP,communicate_bluetooth_mac:()=>vP,communicate_bluetooth_peripheral_init:()=>fP,communicate_bluetooth_recv:()=>bP,communicate_bluetooth_recv_only:()=>xP,communicate_bluetooth_scan:()=>FP,communicate_bluetooth_send:()=>yP,communicate_espnow_init:()=>BP,communicate_espnow_init_new:()=>GP,communicate_i2c_available:()=>eP,communicate_i2c_init:()=>zF,communicate_i2c_master_read:()=>tP,communicate_i2c_onboard:()=>qF,communicate_i2c_read:()=>jF,communicate_i2c_scan:()=>ZF,communicate_i2c_write:()=>$F,communicate_ir_recv_init:()=>EP,communicate_ir_send_init:()=>CP,communicate_ow_init:()=>dP,communicate_ow_read:()=>MP,communicate_ow_reset:()=>TP,communicate_ow_scan:()=>IP,communicate_ow_select:()=>mP,communicate_ow_write:()=>hP,communicate_spi_buffer:()=>_P,communicate_spi_init:()=>nP,communicate_spi_onboard:()=>QF,communicate_spi_read:()=>oP,communicate_spi_read_output:()=>pP,communicate_spi_readinto:()=>aP,communicate_spi_readinto_output:()=>uP,communicate_spi_set:()=>sP,communicate_spi_write:()=>rP,communicate_spi_write_readinto:()=>lP,espnow_radio_channel:()=>KP,espnow_radio_channel_new:()=>qP,espnow_radio_on_off:()=>QP,espnow_radio_rec:()=>jP,espnow_radio_recv:()=>ZP,espnow_radio_recv_certain_msg:()=>tY,espnow_radio_recv_certain_msg_new:()=>iY,espnow_radio_recv_msg:()=>$P,espnow_radio_recv_new:()=>eY,espnow_radio_send:()=>zP,espnow_radio_txpower:()=>JP,i2c_slave_onreceive:()=>iP,internal_variable:()=>OP,ir_recv_timeout:()=>gP,ir_transmit_busy:()=>NP,ir_transmit_conventional_data:()=>SP,ir_transmit_raw_code:()=>LP,ir_transmit_study_code:()=>AP,ir_whether_recv:()=>cP,lora_init:()=>nY,lora_packet:()=>sY,lora_recv:()=>oY,lora_send:()=>_Y,network_espnow_info:()=>wP,network_espnow_mac:()=>UP,network_espnow_recv:()=>kP,network_espnow_recv_handle:()=>WP,network_espnow_send:()=>HP,recv_fun:()=>RP,urequests_attribute:()=>aY,urequests_get:()=>pY,urequests_method:()=>uY});var it={};t.r(it),t.d(it,{display_animate:()=>XY,display_circle:()=>yY,display_color_seclet:()=>KY,display_draw_4strings:()=>NY,display_fill:()=>vY,display_lcd_use_i2c_init:()=>$Y,display_line:()=>FY,display_line_arbitrarily:()=>DY,display_matrix_extern_bright_point:()=>RY,display_matrix_extern_bright_screen:()=>gY,display_matrix_extern_clear:()=>mY,display_matrix_extern_get_pixel:()=>OY,display_matrix_extern_get_screen_pixel:()=>cY,display_matrix_extern_image_builtins:()=>CY,display_matrix_extern_scroll_string:()=>MY,display_matrix_extern_scroll_string_delay:()=>hY,display_matrix_extern_shift:()=>EY,display_matrix_extern_show_frame_string:()=>IY,display_matrix_extern_show_frame_string_delay:()=>TY,display_matrix_extern_show_image:()=>lY,display_matrix_extern_show_image_or_string_delay:()=>dY,display_matrix_use_i2c_init:()=>rY,display_oled_drawPixel:()=>VY,display_oled_showBitmap:()=>bY,display_oled_use_i2c_init:()=>nv,display_onoff:()=>PY,display_rect:()=>fY,display_tm1650_power:()=>GY,display_tm1650_set_brightness:()=>kY,display_tm1650_show_dot:()=>wY,display_tm1650_show_num:()=>UY,display_tm_use_i2c_init:()=>BY,display_triangle:()=>xY,display_use_i2c_init:()=>LY,extern_oled_bright_point:()=>Mv,extern_oled_clear:()=>dv,extern_oled_get_pixel:()=>Tv,extern_oled_hvline:()=>mv,extern_oled_line:()=>Ev,extern_oled_scroll_string:()=>rv,extern_oled_scroll_string_delay:()=>lv,extern_oled_shape_rect:()=>hv,extern_oled_shift:()=>Iv,extern_oled_show_frame_string:()=>av,extern_oled_show_frame_string_delay:()=>uv,extern_oled_show_image:()=>sv,extern_oled_show_image_or_string_delay:()=>pv,extern_oled_show_image_xy:()=>_v,extern_oled_show_string:()=>ov,image_shift:()=>YY,lcd_backlight:()=>ev,lcd_clear:()=>iv,lcd_print_string:()=>tv,lcd_show_image_or_string_delay:()=>ZY,matrix_extern_image_arithmetic:()=>SY,matrix_extern_image_invert:()=>AY,tft_fill:()=>zY,tft_line_arbitrarily:()=>jY,tft_scroll_string_delay:()=>QY,tft_show_frame_string_delay:()=>qY,tft_show_image_or_string_delay:()=>JY,tft_show_image_xy:()=>WY,tft_use_spi_init:()=>HY});var nt={};t.r(nt),t.d(nt,{bitbot_display_bitmap_create:()=>rX,bitbot_display_image_create:()=>uX,display_available:()=>Pv,display_bitmap_create:()=>fv,display_bright_point:()=>xv,display_bright_screen:()=>Vv,display_clear:()=>Fv,display_get_pixel:()=>yv,display_get_screen_pixel:()=>bv,display_image_builtins:()=>Lv,display_image_builtins_all:()=>Nv,display_image_create:()=>Dv,display_scroll_string:()=>Cv,display_scroll_string_delay:()=>Sv,display_shift:()=>Xv,display_show_frame_string:()=>cv,display_show_frame_string_delay:()=>gv,display_show_image:()=>Ov,display_show_image_or_string_delay:()=>Rv,draw_pointer:()=>NX,image_arithmetic:()=>Yv,image_invert:()=>vv,mixbot_display_bitmap_create:()=>sX,mixbot_display_bright_screen:()=>pX,mixbot_display_get_ambientbright:()=>oX,mixbot_display_get_screen_pixel:()=>_X,mixbot_display_image_create:()=>nX,mixbot_display_rotate:()=>aX,mixgo_display_bitmap_create:()=>Wv,mixgo_display_image_create_new:()=>Hv,mixgome_display_bitmap_create:()=>Gv,mixgome_display_font:()=>kv,mixgome_display_image_create:()=>Bv,mixgomini_display_bitmap_create:()=>wv,mixgomini_display_image_create:()=>Uv,mpython_display_hvline:()=>eX,mpython_display_line:()=>iX,mpython_display_shape_rect:()=>tX,mpython_pbm_image:()=>Kv,nova_draw_pointer:()=>DX,onboard_oled_bright_point:()=>Zv,onboard_oled_scroll_string_delay:()=>$v,onboard_oled_show_frame_string_delay:()=>jv,onboard_oled_show_image:()=>Jv,onboard_oled_show_image_or_string_delay:()=>zv,onboard_oled_show_image_xy:()=>qv,onboard_oled_show_string:()=>Qv,onboard_tft_bright_point:()=>OX,onboard_tft_bright_screen:()=>XX,onboard_tft_clear:()=>yX,onboard_tft_clock_clear:()=>AX,onboard_tft_clock_draw:()=>SX,onboard_tft_clock_get_rtctime:()=>gX,onboard_tft_clock_init:()=>cX,onboard_tft_clock_set_time:()=>CX,onboard_tft_display_hvline:()=>hX,onboard_tft_display_line:()=>mX,onboard_tft_display_shape_circle:()=>LX,onboard_tft_display_shape_rect:()=>MX,onboard_tft_fill:()=>RX,onboard_tft_get_pixel:()=>EX,onboard_tft_get_screen_pixel:()=>vX,onboard_tft_scroll_string_delay:()=>Av,onboard_tft_shift:()=>YX,onboard_tft_show_frame_string:()=>PX,onboard_tft_show_frame_string_delay:()=>TX,onboard_tft_show_image:()=>FX,onboard_tft_show_image_or_string_delay:()=>IX,onboard_tft_show_image_xy:()=>lX,onboard_tft_show_image_xy_direct:()=>dX,onboard_tft_show_texts:()=>fX});var st={};t.r(st),t.d(st,{factory_block:()=>kX,factory_block_return:()=>HX,factory_block_return_with_textarea:()=>KX,factory_block_with_textarea:()=>WX,factory_callMethod_noreturn:()=>UX,factory_callMethod_return:()=>wX,factory_declare:()=>GX,factory_from_import:()=>xX,factory_function_noreturn:()=>VX,factory_function_return:()=>BX,factory_import:()=>bX,folding_block:()=>JX});var _t={};t.r(_t),t.d(_t,{inout_analog_atten:()=>ay,inout_analog_read:()=>ey,inout_analog_read_init:()=>py,inout_analog_write:()=>$X,inout_analog_write_init:()=>oy,inout_analog_write_set:()=>ZX,inout_digital_init:()=>sy,inout_digital_read:()=>zX,inout_digital_write:()=>QX,inout_highlow:()=>qX,inout_pin_attachInterrupt:()=>ny,inout_pin_pressed:()=>iy,inout_pin_pressed_init:()=>uy,inout_pwm_analog_write:()=>jX,inout_pwm_analog_write_init:()=>_y,inout_pwm_analog_write_set_freq:()=>ty});var ot={};t.r(ot),t.d(ot,{IOT_CONNECT_OLLAMA:()=>by,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>Dy,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>Ly,IOT_EMQX_PING:()=>fy,IOT_FORMATTING:()=>Sy,IOT_FORMAT_STRING:()=>Ay,IOT_MIXIO_NTP:()=>Fy,IOT_MIXIO_PUBLISH:()=>my,IOT_MIXIO_SUBSCRIBE:()=>Ey,iot_client_onboard:()=>Py,iot_connect_ollama:()=>xy,iot_connect_openai:()=>Vy,iot_http_client:()=>Yy,iot_http_data:()=>vy,iot_mixio_check:()=>cy,iot_mixio_connect:()=>hy,iot_mixio_connect_only:()=>Ry,iot_mixio_disconnect:()=>Oy,iot_mixio_format_msg:()=>Cy,iot_mixio_format_topic:()=>gy,iot_mixly_key:()=>Ny,iot_mqtt_client:()=>Xy,iot_mqtt_data:()=>yy,iot_onenet_check:()=>Ty,iot_onenet_connect:()=>ly,iot_onenet_disconnect:()=>dy,iot_onenet_publish:()=>My,iot_onenet_publish_dict:()=>Iy,iot_wifi_connect:()=>ry,ollama_empty_history:()=>Uy,use_ollama_llm_to_chat:()=>By,use_ollama_llm_to_chat_return:()=>Gy});var pt={};t.r(pt),t.d(pt,{educore_mqtt_connect:()=>Ex,educore_mqtt_connect_success:()=>gx,educore_mqtt_subscribe_message:()=>Ox,educore_mqtt_topic_publish:()=>cx,educore_mqtt_topic_subscribe:()=>Rx,educore_wifi_connect:()=>mx,network_ap_connect:()=>zy,network_connect:()=>ky,network_get_connect:()=>Wy,network_get_wifi:()=>Qy,network_init:()=>wy,network_is_active:()=>qy,network_open:()=>Jy,network_scan:()=>jy,network_server:()=>$y,network_socket_accept:()=>nx,network_socket_bind:()=>tx,network_socket_close:()=>ax,network_socket_connect:()=>ex,network_socket_init:()=>Zy,network_socket_listen:()=>ix,network_socket_receive:()=>sx,network_socket_receive_from:()=>ox,network_socket_send:()=>_x,network_socket_send_to:()=>px,network_stop:()=>Ky,network_wifi_connect:()=>Hy,ntptime_address:()=>Ix,ntptime_time:()=>dx,requests_attribute:()=>rx,requests_attribute2:()=>Mx,requests_get:()=>ux,requests_get2:()=>Tx,requests_method:()=>lx,requests_post:()=>hx});var at={};t.r(at),t.d(at,{CI130X_BROADCAST:()=>Wx,CI130X_GET_THE_RECOGNIZED_CMD:()=>Hx,CI130X_GET_WHETHER_IDENTIFY:()=>kx,CI130X_IDENTIFY_AND_SAVE:()=>wx,CI130X_SET_SYSTEM_CMD:()=>Kx,HCSR04:()=>Sb,PS2_Button:()=>Nb,PS2_Buttons:()=>Db,PS2_Buttons_new:()=>xb,PS2_State:()=>fb,PS2_init:()=>Ab,PS2_init_new:()=>Xb,PS2_stk:()=>Fb,PS2_stk_new:()=>bb,PS2_vibration:()=>Lb,PS2_vibration_new:()=>yb,RTC_get_time:()=>Yb,RTC_set_date:()=>Fx,RTC_set_datetime:()=>Pb,RTC_set_time:()=>fx,camera_sensor_init:()=>TV,camera_sensor_result:()=>MV,column_tube_foot:()=>OV,define_keyboards:()=>RV,educore_body_sensor:()=>sV,educore_button_sensor_extern:()=>aV,educore_camera_sensor:()=>IV,educore_infrared_sensor:()=>pV,educore_soilhum_sensor:()=>_V,educore_temp_sensor:()=>dV,educore_temphum_sensor:()=>oV,educore_ultrasonic_sensor:()=>rV,esp32_s2_weather_init:()=>Rb,esp32_s2_weather_rain:()=>gb,esp32_s2_weather_wd:()=>cb,esp32_s2_weather_ws:()=>Cb,extern_rfid_read:()=>ab,extern_rfid_readcontent:()=>rb,extern_rfid_readid:()=>ub,extern_rfid_status:()=>Ib,extern_rfid_write:()=>lb,extern_rfid_write_return:()=>db,get_keboards_value:()=>gV,gnss_get_data:()=>Gb,gnss_have_data:()=>Ub,init_matrix_keyboard:()=>cV,interaction_whether_to_interaction:()=>Gx,interaction_whether_to_interaction_SANT:()=>Ux,line_tube_foot:()=>EV,mixbot_sensor_extern_get_addr:()=>jb,mixbot_sensor_extern_set_addr:()=>$b,pm25_get_data:()=>Bb,radar_set_DETECTION_THRESHOLD:()=>Vx,radar_set_DETECTION_THRESHOLD_SANT:()=>Bx,robot_button_extern_get_value:()=>kb,robot_color_extern_get_value:()=>qb,robot_infrared_extern_get_value:()=>Wb,robot_infrared_extern_grey_get_value:()=>Kb,robot_potentiometer_extern_get_value:()=>Jb,robot_sonar_extern_get_value:()=>Qb,robot_sonar_extern_led:()=>zb,robot_touch_extern_get_value:()=>Hb,sensor_APDS9960_extern:()=>qx,sensor_DS18X20:()=>nV,sensor_LTR308_extern:()=>Qx,sensor_LTR390UV_extern:()=>ib,sensor_MAX30102_extern:()=>Jx,sensor_QMC5883L_extern:()=>nb,sensor_VL530LX_extern:()=>ob,sensor_aht11_extern:()=>_b,sensor_bmp:()=>yx,sensor_dht11:()=>vb,sensor_distance_hrsc04:()=>Dx,sensor_hp203_extern:()=>zx,sensor_ltr381_extern:()=>tb,sensor_mixgo_extern_button_attachInterrupt:()=>Lx,sensor_mixgo_extern_button_get_presses:()=>Ax,sensor_mixgo_extern_button_is_pressed:()=>Cx,sensor_mixgo_extern_button_was_pressed:()=>Sx,sensor_mixgo_extern_light:()=>Px,sensor_mixgo_extern_pin_near:()=>vx,sensor_mixgo_extern_sound:()=>Yx,sensor_mixgoce_hot_wheel_degrees:()=>Ob,sensor_mixgoce_hot_wheel_is_touched:()=>Eb,sensor_mpu9250_attachGestureInterrupt:()=>Nx,sensor_ms5611_extern:()=>$x,sensor_ms5611_extern_altitude:()=>Zx,sensor_read_humiture:()=>uV,sensor_rtc_init:()=>Xx,sensor_sht:()=>xx,sensor_shtc3_extern:()=>sb,sensor_spl06_001_extern:()=>jx,sensor_ucs12071_extern:()=>eb,sensor_use_i2c_init:()=>bx,sensor_use_spi_init:()=>pb,sensor_use_uart_init:()=>Vb,sensor_weather_solo_init:()=>Zb,sensor_weather_solo_rain:()=>iV,sensor_weather_solo_wd:()=>tV,sensor_weather_solo_ws:()=>eV,sensor_weigh_init:()=>hV,tvoc_get_data:()=>wb,ultrasonic_sensor_read_distance:()=>lV,weather_data:()=>Tb,weather_have_data:()=>Mb,weather_set_label:()=>mb,weather_uart_mixio:()=>hb,weigh_sensor_get_weight:()=>mV});var ut={};t.r(ut),t.d(ut,{HCSR04:()=>PV,bitbot_als_num:()=>ZB,dht11:()=>pG,educore_button_sensor:()=>TG,educore_button_was_pressed:()=>MG,educore_gyroscope_sensor:()=>lG,educore_gyroscope_sensor_read:()=>dG,educore_gyroscope_sensor_shake:()=>IG,educore_light_sensor:()=>rG,educore_rfid_sensor:()=>hG,educore_rfid_sensor_scan:()=>mG,educore_rfid_sensor_scan_data:()=>EG,educore_voice_sensor:()=>aG,number1:()=>YV,number2:()=>vV,number3:()=>XV,number4:()=>yV,number5:()=>xV,number6:()=>bV,number7:()=>VV,onboard_RTC_get_time:()=>fB,onboard_RTC_get_time_str:()=>YB,onboard_RTC_get_timestamp:()=>FB,onboard_RTC_get_timetuple_to_str:()=>vB,onboard_RTC_set_datetime:()=>NB,onboard_RTC_settime_string:()=>DB,onboard_RTC_timestamp_totuple:()=>PB,rfid_readcontent:()=>tB,rfid_readid:()=>ZV,rfid_status:()=>nB,rfid_write:()=>eB,rfid_write_return:()=>iB,sensor_LTR308:()=>qV,sensor_adxl345_get_acceleration:()=>dB,sensor_aht11:()=>jV,sensor_bitbot_ALS:()=>$B,sensor_button_get_presses:()=>iG,sensor_button_is_pressed:()=>tG,sensor_button_was_pressed:()=>eG,sensor_compass_reset:()=>EB,sensor_ds18x20:()=>KV,sensor_eulerangles:()=>_B,sensor_get_acceleration:()=>sB,sensor_get_temperature:()=>$V,sensor_get_the_coprocessor_version:()=>OG,sensor_hp203:()=>zV,sensor_light:()=>oG,sensor_lm35:()=>JV,sensor_mixbot_get_gyro:()=>jB,sensor_mixbot_patrol_calibrate:()=>qB,sensor_mixbot_patrol_value:()=>QB,sensor_mixbot_temperature:()=>zB,sensor_mixgo_LTR308:()=>kV,sensor_mixgo_button_attachInterrupt:()=>LV,sensor_mixgo_button_get_presses:()=>AV,sensor_mixgo_button_is_pressed:()=>CV,sensor_mixgo_button_was_pressed:()=>SV,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>xB,sensor_mixgo_cc_mmc5603_get_angle:()=>yB,sensor_mixgo_cc_mmc5603_get_magnetic:()=>XB,sensor_mixgo_light:()=>_G,sensor_mixgo_nova_LTR308:()=>WV,sensor_mixgo_nova_pin_near:()=>wV,sensor_mixgo_pin_near:()=>UV,sensor_mixgo_pin_near_double:()=>GV,sensor_mixgo_pin_near_single:()=>BV,sensor_mixgo_pin_pressed:()=>rB,sensor_mixgo_sant_color:()=>HV,sensor_mixgo_touch_slide:()=>uB,sensor_mixgocar42_button_attachInterrupt:()=>FV,sensor_mixgocar42_button_get_presses:()=>fV,sensor_mixgocar42_button_is_pressed:()=>NV,sensor_mixgocar42_button_was_pressed:()=>DV,sensor_mixgocar_battery_left:()=>JB,sensor_mixgocar_pin_near:()=>WB,sensor_mixgocar_pin_near_line:()=>HB,sensor_mixgocar_pin_near_state_change:()=>KB,sensor_mixgoce_pin_pressed:()=>aB,sensor_mixgoce_temperature:()=>VB,sensor_mixgome_temperature:()=>bB,sensor_mpu9250_calibrate_compass:()=>MB,sensor_mpu9250_field_strength:()=>mB,sensor_mpu9250_gesture:()=>oB,sensor_mpu9250_get_acceleration:()=>pB,sensor_mpu9250_get_gyro:()=>TB,sensor_mpu9250_get_magnetic:()=>IB,sensor_mpu9250_temperature:()=>hB,sensor_mpython_pin_pressed:()=>lB,sensor_mpython_qmi8658_get_gyro:()=>BB,sensor_mpython_qmi8658_temperature:()=>GB,sensor_onboard_compass_reset:()=>LB,sensor_onboard_mpu9250_calibrate_compass:()=>CB,sensor_onboard_mpu9250_field_strength:()=>AB,sensor_onboard_mpu9250_gesture:()=>OB,sensor_onboard_mpu9250_get_acceleration:()=>RB,sensor_onboard_mpu9250_get_gyro:()=>gB,sensor_onboard_mpu9250_get_magnetic:()=>cB,sensor_onboard_mpu9250_temperature:()=>SB,sensor_pin_near:()=>sG,sensor_pin_pressed:()=>nG,sensor_read:()=>uG,sensor_rm_acc:()=>kB,sensor_rm_battery_left:()=>wB,sensor_rm_pin_near_double:()=>UB,sensor_sound:()=>QV});var rt={};t.r(rt),t.d(rt,{serial_any:()=>SG,serial_print:()=>RG,serial_print_byte:()=>cG,serial_print_hex:()=>CG,serial_println:()=>gG,serial_read_from_ai:()=>yG,serial_readline:()=>LG,serial_readstr:()=>AG,serial_send_to_ai:()=>XG,serial_softserial:()=>NG,serial_softserial_new:()=>DG,system_input:()=>fG,system_print:()=>FG,system_print_end:()=>YG,system_print_inline:()=>PG,system_print_many:()=>vG});var lt={};t.r(lt),t.d(lt,{Panic_with_status_code:()=>JG,Timer_init:()=>aU,base_delay:()=>lU,controls_delay:()=>$G,controls_delay_new:()=>ZG,controls_end_program:()=>QG,controls_millis:()=>qG,controls_uname:()=>jG,reset:()=>zG,system_bitbot_shutdown:()=>pU,system_device_name:()=>WG,system_device_serial_number:()=>KG,system_event_bus_source:()=>kG,system_event_bus_value:()=>HG,system_machine_reset:()=>oU,system_on_event:()=>GG,system_raise_event:()=>BG,system_reset:()=>bG,system_run_in_background:()=>xG,system_ticks_diff:()=>iU,system_timer:()=>eU,system_timer_init:()=>nU,system_timestamp:()=>UG,system_value:()=>wG,system_wait:()=>VG,system_wdt_feed:()=>_U,system_wdt_init:()=>sU,time_ticks_diff:()=>rU,timer:()=>tU,timer2:()=>uU});var dt={};t.r(dt),t.d(dt,{Air_daily_content:()=>SU,Air_now_content:()=>mU,Geo_moon_content:()=>LU,Geo_sun_content:()=>AU,Life_suggestion_content:()=>OU,Location_search_content:()=>cU,Tide_daily_content:()=>RU,WEATHER_DAILY:()=>IU,WEATHER_HOUR:()=>TU,WEATHER_NOW:()=>dU,Weather_alarm_content:()=>EU,Weather_daily:()=>gU,Weather_daily_content:()=>CU,Weather_now:()=>MU,Weather_now_content:()=>hU});var It={};t.r(It),t.d(It,{controls_pin_attachInterrupt:()=>KU,inout_analog_atten:()=>xU,inout_analog_write:()=>XU,inout_analog_write_init:()=>GU,inout_analog_write_set:()=>yU,inout_analog_write_set_freq:()=>wU,inout_digital_init:()=>BU,inout_digital_read:()=>vU,inout_digital_write:()=>YU,inout_highlow:()=>PU,inout_pinMode:()=>kU,inout_pin_attachInterrupt:()=>VU,inout_pin_pressed:()=>bU,inout_pin_pressed_init:()=>UU,pin_pressed:()=>WU,pin_pressed_init:()=>HU});var Tt={};t.r(Tt),t.d(Tt,{mini_g2_aht11:()=>qU,mini_g2_hp203:()=>QU,mini_g2_rfid_readcontent:()=>$U,mini_g2_rfid_readid:()=>jU,mini_g2_rfid_status:()=>ew,mini_g2_rfid_write:()=>ZU,mini_g2_rfid_write_outcome:()=>tw,mini_g2_varistor:()=>zU});var Mt={};t.r(Mt),t.d(Mt,{me_go_dc_motor:()=>rw,me_go_get_led_bright:()=>_w,me_go_get_led_state:()=>ow,me_go_hall_attachInterrupt:()=>lw,me_go_hall_data:()=>Iw,me_go_hall_initialize:()=>dw,me_go_led_bright:()=>sw,me_go_led_brightness:()=>pw,me_go_light_number:()=>nw,me_go_pin_light:()=>Ew,me_go_pin_near:()=>Mw,me_go_pin_near_line:()=>Tw,me_go_pin_near_state_change:()=>hw,me_go_stepper_keep:()=>aw,me_go_stepper_stop:()=>uw,sensor_mixgome_eulerangles:()=>mw});var ht={};t.r(ht),t.d(ht,{analog_input:()=>Nw,analog_output:()=>fw,espnow_channel:()=>Sw,haskylens_model:()=>Aw,i2c_A_pin:()=>Fw,i2c_B_pin:()=>Pw,pins_analog:()=>xw,pins_analog_pin:()=>bw,pins_axis:()=>tk,pins_brightness:()=>ek,pins_builtinimg:()=>Jw,pins_builtinimg_extern:()=>qw,pins_button:()=>Gw,pins_buttonB:()=>Uw,pins_dac:()=>Vw,pins_dac_pin:()=>Bw,pins_digital:()=>Rw,pins_digital_dot:()=>uk,pins_digital_pin:()=>cw,pins_exlcdh:()=>$w,pins_exlcdv:()=>Zw,pins_imglist:()=>Qw,pins_input_pin:()=>gw,pins_one_more:()=>ak,pins_output_pin:()=>Cw,pins_playlist:()=>zw,pins_playlist_extern:()=>jw,pins_pwm:()=>ww,pins_pwm_pin:()=>kw,pins_radio_datarate:()=>pk,pins_radio_power:()=>ok,pins_serial:()=>Kw,pins_tone_notes:()=>_k,pins_touch:()=>Ww,pins_touch_pin:()=>Hw,pins_tts_bgmusic:()=>sk,pins_tts_builtin_music:()=>nk,pins_tts_voice:()=>ik,pwm_input:()=>Lw,pwm_output:()=>Dw,spi_A_pin:()=>Yw,spi_B_pin:()=>vw,spi_C_pin:()=>Xw,spi_D_pin:()=>yw});var mt={};t.r(mt),t.d(mt,{actuator_neopixel_init:()=>rk});var Et={};t.r(Et),t.d(Et,{inout_analog_atten:()=>Rk,inout_analog_write:()=>Tk,inout_analog_write_init:()=>Ok,inout_analog_write_set:()=>Mk,inout_digital_init:()=>Ek,inout_digital_read:()=>Ik,inout_digital_write:()=>dk,inout_highlow:()=>lk,inout_pin_attachInterrupt:()=>mk,inout_pin_pressed:()=>hk,inout_pin_pressed_init:()=>ck});var Ot={};t.r(Ot),t.d(Ot,{mini_g2_aht11:()=>gk,mini_g2_hp203:()=>Ck,mini_g2_rfid_readcontent:()=>Lk,mini_g2_rfid_readid:()=>Ak,mini_g2_rfid_status:()=>fk,mini_g2_rfid_write:()=>Nk,mini_g2_rfid_write_outcome:()=>Dk,mini_g2_varistor:()=>Sk});var Rt={};t.r(Rt),t.d(Rt,{me_go_dc_motor:()=>bk,me_go_get_led_bright:()=>Yk,me_go_get_led_state:()=>vk,me_go_hall_attachInterrupt:()=>Vk,me_go_hall_data:()=>Gk,me_go_hall_initialize:()=>Bk,me_go_led_bright:()=>Pk,me_go_led_brightness:()=>Xk,me_go_light_number:()=>Fk,me_go_pin_light:()=>Wk,me_go_pin_near:()=>wk,me_go_pin_near_line:()=>Uk,me_go_pin_near_state_change:()=>kk,me_go_stepper_keep:()=>yk,me_go_stepper_stop:()=>xk,sensor_mixgome_eulerangles:()=>Hk});var ct={};t.r(ct),t.d(ct,{analog_input:()=>eH,analog_output:()=>nH,espnow_channel:()=>Zk,haskylens_model:()=>tH,i2c_A_pin:()=>sH,i2c_B_pin:()=>_H,pins_analog:()=>lH,pins_analog_pin:()=>rH,pins_axis:()=>AH,pins_brightness:()=>DH,pins_builtinimg:()=>RH,pins_builtinimg_extern:()=>cH,pins_button:()=>Jk,pins_buttonB:()=>qk,pins_dac:()=>MH,pins_dac_pin:()=>TH,pins_digital:()=>Kk,pins_digital_dot:()=>xH,pins_digital_pin:()=>Qk,pins_exlcdh:()=>LH,pins_exlcdv:()=>NH,pins_imglist:()=>gH,pins_input_pin:()=>zk,pins_interrupt:()=>EH,pins_one_more:()=>yH,pins_output_pin:()=>jk,pins_playlist:()=>CH,pins_playlist_extern:()=>SH,pins_pwm:()=>IH,pins_pwm_input:()=>$k,pins_pwm_pin:()=>dH,pins_radio_datarate:()=>XH,pins_radio_power:()=>vH,pins_serial:()=>OH,pins_tone_notes:()=>YH,pins_touch:()=>mH,pins_touch_pin:()=>hH,pins_tts_bgmusic:()=>PH,pins_tts_builtin_music:()=>FH,pins_tts_voice:()=>fH,pwm_output:()=>iH,spi_A_pin:()=>oH,spi_B_pin:()=>pH,spi_C_pin:()=>aH,spi_D_pin:()=>uH});const gt=Blockly,Ct=Mixly,St={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(o+=n)):i=o}else i="i";return i}},At=St; +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class Lt{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(gt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(gt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(gt.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_if_else");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(gt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(gt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(gt.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Wt={init:function(){this.setColour(Bt),this.appendValueInput("FROM").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.PYTHON_RANGE).appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(gt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Kt={init:function(){this.setColour(Bt),this.appendValueInput("LIST").setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(gt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return gt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Jt={init:function(){this.setColour(Bt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(gt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new gt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(gt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:gt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:gt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},qt={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(gt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new gt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(gt.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(gt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(gt.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_finally");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(gt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(gt.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Qt={init:function(){this.setColour(Bt);var t=new gt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(gt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(gt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:gt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:gt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(gt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},zt={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new gt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return gt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},jt={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new gt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return gt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Jt.OPERATORS=[[gt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[gt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Qt.OPERATORS=[[gt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[gt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const $t={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(gt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Zt={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},te={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(gt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},ee={init:function(){this.setColour(Bt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},ie={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(gt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},ne={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(gt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},se={init:function(){this.jsonInit({message0:gt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:Bt,tooltip:gt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:gt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},_e={init:function(){this.setColour(Bt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(gt.Msg.MIXLY_STAT),this.setOutput(!0)}},oe={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},pe={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(gt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},ae={init:function(){this.appendDummyInput().appendField(gt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+gt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(gt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new gt.FieldDropdown([[gt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[gt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Bt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},ue={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},re={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},le={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},de={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET+gt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(gt.Msg.PROCEDURES_DEFRETURN_RETURN+gt.Msg.MIXLY_GET_UNIQUE_IDEN)}},Ie={init:function(){this.setColour(Bt),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(gt.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},Te={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},Me=230;gt.FieldTextInput.math_number_validator=function(t){return String(t)},gt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const he={init:function(){this.setColour(Me),this.appendDummyInput().appendField(new gt.FieldTextInput("0",gt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MATH_NUMBER_TOOLTIP)}},me={init:function(){this.setColour(Me);this.appendDummyInput("").appendField(gt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new gt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:gt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:gt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Ee={init:function(){this.setColour(Me);this.appendDummyInput("").appendField(gt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new gt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:gt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:gt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Oe={init:function(){this.setColour(Me),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new gt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:gt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:gt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:gt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:gt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:gt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:gt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:gt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Re={init:function(){this.setColour(Me),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new gt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:gt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:gt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:gt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:gt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:gt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:gt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:gt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},ce={init:function(){this.setColour(Me),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new gt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},ge={init:function(){this.setColour(Me),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new gt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:gt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:gt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:gt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:gt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:gt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:gt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:gt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Ce={init:function(){var t=[[gt.Msg.MATH_BIN,"bin"],[gt.Msg.MATH_OCT,"oct"],[gt.Msg.MATH_HEX,"hex"]];this.setColour(Me),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new gt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:gt.Msg.MATH_DEC_TOOLTIP_BIN,oct:gt.Msg.MATH_DEC_TOOLTIP_OCT,hex:gt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Se={init:function(){var t=[[gt.Msg.LANG_MATH_TO_ROUND,"round"],[gt.Msg.LANG_MATH_TO_CEIL,"ceil"],[gt.Msg.LANG_MATH_TO_FLOOR,"floor"],[gt.Msg.MATH_ABS,"fabs"],[gt.Msg.MATH_SQRT,"sqrt"]];this.setColour(Me),this.appendValueInput("A").setCheck(Number).appendField(new gt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:gt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:gt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:gt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:gt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:gt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:gt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Ae={init:function(){var t=[[gt.Msg.MIXLY_MAX,"max"],[gt.Msg.MIXLY_MIN,"min"]];this.setColour(Me),this.appendValueInput("A").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(new gt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(gt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:gt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:gt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Le={init:function(){var t=[[gt.Msg.MATH_TWO,"two"],[gt.Msg.MATH_EIGHT,"eight"],[gt.Msg.MATH_TEN,"ten"],[gt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(Me),this.appendDummyInput("").appendField(gt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new gt.FieldDropdown(t),"OP").appendField(gt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.MATH_ZHW).appendField(new gt.FieldDropdown(t),"OP2").appendField(gt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:gt.Msg.MATH_Before_two,eight:gt.Msg.MATH_Before_eight,ten:gt.Msg.MATH_Before_ten,sixteen:gt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:gt.Msg.MATH_Behind_two,eight:gt.Msg.MATH_Behind_eight,ten:gt.Msg.MATH_Behind_ten,sixteen:gt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},Ne={init:function(){var t=[[gt.Msg.LANG_MATH_INT,"int"],[gt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Me),this.setOutput(!0,Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new gt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:gt.Msg.LANG_MATH_INT,float:gt.Msg.LANG_MATH_FLOAT_RANDOM};return gt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},De={init:function(){this.setColour(Me),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(gt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(gt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(gt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(gt.Msg.MATH_CONSTRAIN_TOOLTIP)}},fe={init:function(){this.setColour(Me),this.appendValueInput("NUM",Number).appendField(gt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(gt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(gt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Fe={init:function(){this.setColour(Me),this.appendDummyInput().appendField(new gt.FieldTextInput("0",gt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(gt.Msg.MATH_NUMBER_TOOLTIP)}},Pe={init:function(){this.setColour(Me),this.appendValueInput("NUM").setCheck(Number).appendField(gt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},Ye={init:function(){this.setColour(Me),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(gt.Msg.MATH_ROUND).appendField(gt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(gt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(gt.Msg.MATH_ROUND_NEW_TOOLTIP)}},ve={init:function(){var t=[[gt.Msg.MIXLY_TO_INT,"int"],[gt.Msg.MIXLY_TO_FLOAT,"float"],[gt.Msg.MIXLY_TO_BITES,"b"],[gt.Msg.LANG_MATH_BYTE+gt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(Me),this.appendValueInput("VAR").appendField(new gt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:gt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:gt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:gt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},Xe={init:function(){var t=[[gt.Msg.MIXLY_TO_INT,"int"],[gt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Me),this.appendValueInput("VAR").appendField(new gt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:gt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:gt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},ye=fe,xe={init:function(){this.setColour(Me),this.appendValueInput("VAR").appendField(gt.Msg.LANG_MATH_BYTE+gt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},be={init:function(){this.setColour(Me),this.itemCount_=1,this.setMutator(new gt.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(gt.Msg.MIXLY_PRODUCT+gt.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(gt.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(gt.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(gt.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const ke={init:function(){this.setColour(Ge),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new gt.FieldTextInput("",gt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(gt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new gt.FieldImage(e,7,12,'"')}},He={init:function(){this.setColour(Ge),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(gt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},We={init:function(){this.setColour(Ge),this.appendValueInput("VAR").setCheck(Number).appendField(gt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Ke={init:function(){this.setColour(Ge),this.appendValueInput("VAR").setCheck(String).appendField(gt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Je={init:function(){this.setColour(Ge),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},qe={init:function(){this.setColour(Ge),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Qe={init:function(){this.WHERE_OPTIONS=[[gt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[gt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[gt.Msg.TEXT_GET_INDEX_RANDOM+1+gt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(gt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ge),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(gt.Msg.LISTS_GET_INDEX_GET,"MODE"),gt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(gt.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=gt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=gt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=gt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=gt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+gt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",gt.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:gt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:gt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:gt.Msg.TEXT_GET_INDEX_RANDOM};return gt.Msg.PROCEDURES_DEFRETURN_RETURN+gt.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+gt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==gt.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),gt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(gt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new gt.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),gt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},ze={init:function(){this.setHelpUrl(gt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ge),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(gt.Msg.LISTS_GET_INDEX_GET+" "+gt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(gt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(gt.Msg.PROCEDURES_DEFRETURN_RETURN+gt.Msg.MIXLY_MICROBIT_TYPE_STRING+gt.Msg.LISTS_GET_INDEX_FROM_START+"n"+gt.Msg.TEXT_CHARAT2)}},je={init:function(){this.setHelpUrl(gt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ge),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(gt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(gt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},$e={init:function(){this.WHERE_OPTIONS_1=[[gt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[gt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[gt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[gt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[gt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[gt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(gt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ge),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(gt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==gt.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==gt.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),gt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(gt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new gt.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Ze={init:function(){this.setHelpUrl(gt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ge),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(gt.Msg.LISTS_GET_INDEX_GET+" "+gt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(gt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(gt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(gt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},ti={init:function(){var t=[[gt.Msg.MIXLY_EQUALS,"==="],[gt.Msg.MIXLY_STARTSWITH,"startswith"],[gt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Ge),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new gt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},ei={init:function(){this.setColour(Ge),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(gt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_COMPARETO_HELP)}},ii={init:function(){var t=[[gt.Msg.TEXT_UPPER,"upper"],[gt.Msg.TEXT_TITLE,"title"],[gt.Msg.TEXT_CAPITALIZE,"capitalize"],[gt.Msg.TEXT_SWAPCASE,"swapcase"],[gt.Msg.TEXT_LOWER,"lower"]];this.setColour(Ge),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new gt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:gt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:gt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:gt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:gt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:gt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},ni={init:function(){var t=[[gt.Msg.TEXT_LJUST,"ljust"],[gt.Msg.TEXT_CENTER,"center"],[gt.Msg.TEXT_RJUST,"rjust"]];this.setColour(Ge),this.appendValueInput("VAR").appendField(new gt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(gt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(gt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},si={init:function(){this.setColour(Ge),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(gt.Msg.MIXLY_MID+gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(gt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},_i={init:function(){this.setColour(Ge),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(gt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(gt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},oi={init:function(){this.setColour(Ge),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(gt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(gt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},pi={init:function(){this.setColour(Ge),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(gt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(gt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(gt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},ai={init:function(){var t=[[gt.Msg.TEXT_TRIM_BOTH,"strip"],[gt.Msg.TEXT_TRIM_LEFT,"lstrip"],[gt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Ge),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(gt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new gt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(gt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:gt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:gt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:gt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},ui={init:function(){this.setColour(Ge),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new gt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new gt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(gt.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},on={init:function(){this.setColour(sn),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(gt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},pn={init:function(){this.setColour(sn),this.appendDummyInput().appendField(gt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},an={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.DICT_KEYS),this.setTooltip(gt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},un={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(gt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(gt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(gt.Msg.DICTS_GET_TOOLTIP)}},rn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(gt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(gt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(gt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(gt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},ln={init:function(){this.setColour(sn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(gt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(gt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},dn={init:function(){this.setColour(sn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(gt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(gt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.DICTS_DELETE_TOOLTIP)}},In={init:function(){this.setColour(sn),this.appendValueInput("DICT2").setCheck("Dict").appendField(gt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(gt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MID),this.setTooltip(gt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.DICT_CLEAR),this.setTooltip(gt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Mn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.DICT_ITEMS),this.setTooltip(gt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},hn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.DICT_VALUES),this.setTooltip(gt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},mn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_LENGTH),this.setTooltip(gt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},En={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.DICT_DELDICT),this.setTooltip(gt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},On={init:function(){this.MODE=[[gt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[gt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(gt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(gt.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=gt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=gt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==gt.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new gt.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},Rn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(gt.Msg.DICTS_ADD_VALUE),this.setTooltip(gt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},cn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(gt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(gt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},gn={init:function(){this.setColour(sn),this.appendDummyInput("").appendField(new gt.FieldLabel(gt.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new gt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(gt.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Cn={init:function(){this.setColour(sn),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(gt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Sn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_TO_JSON),this.setTooltip(gt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},An={init:function(){this.setColour(sn),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(gt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Ln={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Nn={init:function(){this.setColour(sn),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_TO_JSON),this.setTooltip(gt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Dn=210,fn={init:function(){var t=gt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Dn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new gt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:gt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:gt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:gt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:gt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:gt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:gt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},Fn={init:function(){var t=gt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=gt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Dn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new gt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new gt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Pn={init:function(){var t=[[gt.Msg.LOGIC_OPERATION_AND,"AND"],[gt.Msg.LOGIC_OPERATION_OR,"OR"],[gt.Msg.LOGIC_OPERATION_NOR,"NOR"],[gt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Dn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new gt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:gt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:gt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:gt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:gt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},Yn={init:function(){this.setColour(Dn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(gt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(gt.Msg.LOGIC_NEGATE_TOOLTIP)}},vn={init:function(){var t=[[gt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[gt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Dn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new gt.FieldDropdown(t),"BOOL"),this.setTooltip(gt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Xn={init:function(){this.setColour(Dn),this.setOutput(!0),this.appendDummyInput().appendField(gt.Msg.LOGIC_NULL),this.setTooltip(gt.Msg.LOGIC_NULL_TOOLTIP)}},yn={init:function(){this.setColour(Dn),this.appendValueInput("A"),this.appendValueInput("B").appendField(gt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(gt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},xn={init:function(){var t=[[gt.Msg.TEXT_APPEND_TO,"in"],[gt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Dn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new gt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(gt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(gt.Msg.IN)}},bn={init:function(){var t=[[gt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[gt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Dn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new gt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},Vn={init:function(){this.setColour(Dn),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(gt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Bn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(gt.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Gn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=gt.Msg.MIXLY_USE,n=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=gt.Msg.MIXLY_BELONG;return i+{r:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Un={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=gt.Msg.MIXLY_USE,n=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=gt.Msg.MIXLY_BELONG,o=gt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},wn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(gt.Msg.MIXPY_TEXT_ENCODE).appendField(new gt.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=gt.Msg.MIXLY_USE,n=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=gt.Msg.MIXLY_BELONG,o=gt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},kn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+gt.Msg.MIXLY_MICROBIT_TYPE_STRING+gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Wn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},Kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(gt.Msg.MICROBIT_PYTHON_TYPE)}},Jn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(gt.Msg.HTML_FILE),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},qn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Qn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},zn={init:function(){this.setColour(0),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};gt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const jn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},$n={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+gt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},ts={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},es={init:function(){this.setColour(0),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},is={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return gt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+gt.Msg.MIXLY_ESP32_SET+{mkdir:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},ns={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(gt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},ss={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},_s={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.HTML_FILE,"isfile"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return gt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+gt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},os={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(gt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SETUP+gt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(gt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ps={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(gt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},as={init:function(){var t=gt.Procedures.findLegalName("",this),e=new gt.FieldTextInput(t,gt.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new gt.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&>.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(gt.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(gt.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(gt.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(gt.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=gt.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),gt.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{gt.Events.enable()}},mutationToDom:function(t){var e=gt.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(gt.Msg.MIXLY_AIP_ATTR).setAlign(gt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},i_={init:function(){this.setColour(zs),this.appendDummyInput().appendField(gt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},n_={init:function(){this.setColour(zs),this.appendDummyInput().appendField(gt.Msg.HTML_FORM_CONTENT).appendField(new gt.FieldDropdown([[gt.Msg.HTML_TEXT,"text"],[gt.Msg.HTML_EMAIL,"email"],[gt.Msg.HTML_NUMBER,"number"],[gt.Msg.HTML_PASSWORD,"password"],[gt.Msg.HTML_CHECKBOX,"checkbox"],[gt.Msg.HTML_RADIOBUTTON,"radiobutton"],[gt.Msg.HTML_BUTTON,"button"],[gt.Msg.HTML_COLOUR,"colour"],[gt.Msg.HTML_DATE,"date"],[gt.Msg.HTML_LOCALTIME,"local time"],[gt.Msg.HTML_FILE,"file"],[gt.Msg.HTML_HIDDEN,"hidden"],[gt.Msg.HTML_IMAGE,"image"],[gt.Msg.HTML_MONTH,"month"],[gt.Msg.HTML_RANGE,"range"],[gt.Msg.HTML_RESET,"reset"],[gt.Msg.HTML_SEARCH,"search"],[gt.Msg.HTML_SUBMIT,"submit"],[gt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[gt.Msg.HTML_TIME,"time"],[gt.Msg.HTML_URL,"url"],[gt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(gt.Msg.HTML_NAME).appendField(new gt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(gt.Msg.HTML_VALUE).appendField(new gt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(gt.Msg.MIXLY_AIP_ATTR).setAlign(gt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},s_={init:function(){this.setColour(zs),this.appendDummyInput().appendField(new gt.FieldTextInput("property"),"KEY").appendField(":").appendField(new gt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},__={init:function(){this.setColour(zs),this.appendDummyInput().appendField(new gt.FieldTextInput("property"),"KEY").appendField(":").appendField(new gt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},o_={init:function(){this.setColour(zs),this.appendDummyInput().appendField(gt.Msg.HTML_TEXT).appendField(new gt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},p_=160,a_={init:function(){this.setColour(p_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new gt.FieldTable(""),"TEXT")}},u_={init:function(){this.setColour(p_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new gt.FieldMultilineInput(""),"TEXT")}},r_={init:function(){this.setColour(p_),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new gt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},l_={init:function(){this.setColour(p_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},d_={init:function(){this.setColour(p_),this.appendDummyInput().appendTitle("Comment:").appendTitle(new gt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},I_={init:function(){this.setColour(p_),this.appendValueInput("VALUE").appendField(gt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},T_={init:function(){this.setColour(p_),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new gt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(gt.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=gt.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+t+", "+e+", "+i+")"},gt.isNumber(n)&>.isNumber(s)&>.isNumber(_))n=parseFloat(n),s=parseFloat(s),_=Math.abs(parseFloat(_)),0==n%1&&0==s%1&&0==_%1?(n<=s?(s++,t=0==n&&1==_?s:n+", "+s,1!=_&&(t+=", "+_)):t=n+", "+--s+", -"+_,t="range("+t+")"):(t=n",GTE:">="};const ua=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",_=e.valueToCode(this,"B",n)||"False";if("AND"==i)var o=s+" and "+_;else if("OR"==i)o=s+" or "+_;else if("NOR"==i)o="not("+s+"^"+_+")";else o=s+"^"+_;return[o,n]},ra=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},la=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},da=function(t,e){return["None",e.ORDER_ATOMIC]},Ia=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},Ta=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},Ma=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},ha=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},ma=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Ea=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Oa=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Ra=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ca=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},ga=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Ca=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Sa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Aa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},La=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},Na=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Da=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},fa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Fa=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Pa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Ya=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},va=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Xa=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},ya=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},xa=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},ba=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},Va=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Ba=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},Ga=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),gt.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var _=[],o=0;o\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},cu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},gu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},Cu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Su=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Au=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Lu=function(t,e){return'"},Nu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Du=function(){return this.getFieldValue("TEXT")+"\n"},fu=function(t){return t.getFieldValue("TEXT")+"\n"},Fu=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Pu=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Yu=function(){return""},vu=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Xu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n")},Vu.scrubNakedValue=function(t){return t+"\n"},Vu.quote_=function(t){var e="'";return-1!==t.indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},Vu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Vu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=gt.utils.string.wrap(_,Vu.COMMENT_WRAP-3),n+=Vu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const Bu="#74A55B",Gu={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_RGB_PIN_COUNT)}},Uu={init:function(){this.setColour(Bu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(gt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},wu={init:function(){this.setColour(Bu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(gt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},ku={init:function(){this.setColour(Bu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(gt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Hu={init:function(){this.setColour(Bu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(gt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(gt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Wu={init:function(){this.setColour(Bu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Ku={init:function(){this.setColour(Bu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_RESET)}},Ju={init:function(){this.setColour(Bu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qu={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING).appendField(gt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Qu={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(gt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},zu={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(gt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},ju={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING).appendField(gt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},$u={init:function(){this.setColour(Bu),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_SETUP+gt.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Zu={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_SERVO).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SERVO_MOVE)}},tr={init:function(){this.setColour(Bu),this.appendValueInput("VAR").appendField("360°"+gt.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_SETTING+gt.Msg.blockpy_turtle_rotate+gt.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},er={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).appendField("180°"+gt.Msg.MIXLY_SERVO).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SERVO_MOVE)}},ir={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).appendField("360°"+gt.Msg.MIXLY_SERVO).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},nr={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).appendField("180°"+gt.Msg.MIXLY_SERVO).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},sr={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).appendField("360°"+gt.Msg.MIXLY_SERVO).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET+gt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},_r={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new gt.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(gt.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},or={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Direction).appendField(new gt.FieldDropdown([[gt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[gt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[gt.Msg.MOTOR_N,"ms32006.MOT_N"],[gt.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},pr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new gt.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Direction).appendField(new gt.FieldDropdown([[gt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[gt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},ar={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_RGB_PIN_COUNT)}},ur={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},rr={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},lr={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_WRI)}},dr={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.MIXLY_DURATION).appendField(gt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Ir={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.PYTHON_RANGE_STEP).appendField(gt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Tr={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new gt.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SETUP+gt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new gt.FieldDropdown([["SYN6288"+gt.Msg.MIXLY_AipSpeech_synthesis,"SYN6288"],["NS9300"+gt.Msg.MIXLY_MUSIC_PLAYER,"NS9300"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Mr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_GET+gt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_WHETHER).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_STOPPED,"0"],[gt.Msg.MIXLY_PLAYING,"1"],[gt.Msg.MIXLY_PAUSED,"2"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},hr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_STAT).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MP3_PLAY,"1"],[gt.Msg.MIXLY_MP3_PAUSE,"2"],[gt.Msg.MIXLY_STOP,"3"],[gt.Msg.MIXLY_MP3_PREV,"4"],[gt.Msg.MIXLY_MP3_NEXT,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendValueInput("volume").appendField(gt.Msg.MIXLY_MP3_VOL+gt.Msg.MIXLY_STAT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_PLAYER_SET_VOLUME_TOOLTIP)}},Er={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MODE+gt.Msg.MIXLY_STAT).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MP3_LOOP_ALL,"0"],[gt.Msg.MIXLY_MP3_LOOP_ONE,"1"],[gt.Msg.MIXLY_PLAYER_DIRECTORY_LOOP,"2"],[gt.Msg.MIXLY_MP3_LOOP_RAM,"3"],[gt.Msg.MIXLY_PLAYER_SINGLE_STOP,"4"],[gt.Msg.MIXLY_PLAYER_SEQUENTIAL_PLAY,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Or={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_START_MELODY,"play"],[gt.Msg.MIXLY_PLAYER_INSERT_MUSIC,"insert"]]),"key"),this.appendValueInput("song"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_PLAYER_PLAY_MUSIC_TOOTIP)}},Rr={},cr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(gt.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},gr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Cr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(gt.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(gt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},Sr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(gt.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(gt.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(gt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},Ar={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Lr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_MOTOR).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Nr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_MOTOR).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_GET+gt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Dr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_TRAFFIC_LIGHT).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.LISTS_SET_INDEX_SET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[gt.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[gt.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[gt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[gt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[gt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[gt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN).appendField(new gt.FieldDropdown([[gt.Msg.COLOUR_RGB_WHITE,"W"],[gt.Msg.COLOUR_RGB_RED,"R"],[gt.Msg.COLOUR_RGB_YELLOW,"Y"],[gt.Msg.COLOUR_RGB_GREEN,"G"],[gt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Fr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN).appendField(new gt.FieldDropdown([[gt.Msg.COLOUR_RGB_WHITE,"W"],[gt.Msg.COLOUR_RGB_RED,"R"],[gt.Msg.COLOUR_RGB_YELLOW,"Y"],[gt.Msg.COLOUR_RGB_GREEN,"G"],[gt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET+gt.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Pr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_SERVO_MOTOR).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[gt.Msg.MIXLY_SPEED,"[1]"],[gt.Msg.MATH_SINGLE_OP_ABSOLUTE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[gt.Msg.MIXLY_RELATIVE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[gt.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[gt.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[gt.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Yr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_SERVO_MOTOR).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[gt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[gt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_SERVO_MOTOR).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Xr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_SERVO_MOTOR).appendField(gt.Msg.MATH_SINGLE_OP_ABSOLUTE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+gt.Msg.MSG.run).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MODE).setAlign(gt.inputs.Align.RIGHT).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_SPEED+gt.Msg.MIXLY_MODE,"0"],[gt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+gt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(gt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(gt.inputs.Align.RIGHT).appendField(new gt.FieldDropdown([[gt.Msg.CLOCKWISE,"0"],[gt.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[gt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},yr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_SERVO_MOTOR).appendField(gt.Msg.MIXLY_RELATIVE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+gt.Msg.MSG.run).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},xr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_SERVO_MOTOR).appendField(gt.Msg.MIXLY_RELATIVE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+gt.Msg.MSG.run).appendField("("+gt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MODE).setAlign(gt.inputs.Align.RIGHT).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_SPEED+gt.Msg.MIXLY_MODE,"0"],[gt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+gt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(gt.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},br={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_SERVO_MOTOR).appendField(gt.Msg.MIXLY_RELATIVE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+gt.Msg.MSG.run).appendField("("+gt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MODE).setAlign(gt.inputs.Align.RIGHT).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_SPEED+gt.Msg.MIXLY_MODE,"0"],[gt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+gt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(gt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(gt.inputs.Align.RIGHT).appendField(new gt.FieldDropdown([[gt.Msg.CLOCKWISE,"0"],[gt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Vr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.MIXBOT).appendField(gt.Msg.ME_GO_MOTOR_EXTERN).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MOTOR,"ext_motor"],[gt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[gt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[gt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[gt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[gt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[gt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[gt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},Br={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.MIXBOT).appendField(gt.Msg.ME_GO_MOTOR_EXTERN).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MOTOR,"ext_motor"],[gt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[gt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[gt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[gt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[gt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[gt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[gt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Gr={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_SETUP+gt.Msg.MIXLY_AT).appendField(gt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Ur={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING),this.appendValueInput("pin").appendField("LED"),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},wr={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_SERVO+gt.Msg.MIXLY_SETUP+gt.Msg.MIXLY_AT).appendField(gt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},kr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_SERVO),this.appendValueInput("angle").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE),this.appendDummyInput().appendField(gt.Msg.DRAW_POINTER_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Hr={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_MOTOR+gt.Msg.MIXLY_SETUP+gt.Msg.MIXLY_AT).appendField(gt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Wr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MOTOR),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+gt.Msg.MIXLY_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Kr="#6C9858",Jr={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(new gt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},qr={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_ESP32_ON,"1"],[gt.Msg.MIXLY_ESP32_OFF,"0"],[gt.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Qr={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(gt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_SETONOFF)}},zr={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(gt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(gt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},jr={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(gt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},$r={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(gt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_SETTING+gt.Msg.MIXLY_BUILDIN_LED+gt.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},Zr={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(gt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(gt.Msg.MIXLY_LCD_SETCOLOR).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LIGHT_RED,"1"],[gt.Msg.MIXLY_LIGHT_GREEN,"2"],[gt.Msg.MIXLY_LIGHT_BLUE,"3"],[gt.Msg.MIXLY_LIGHT_YELLOW,"4"],[gt.Msg.MIXLY_LIGHT_CYAN,"5"],[gt.Msg.MIXLY_LIGHT_PURPLE,"6"],[gt.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},tl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING).appendField(gt.Msg.MIXLY_BUILDIN_LED).appendField(new gt.FieldDropdown([[gt.Msg.COLOUR_RGB_RED,"r"],[gt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_SETONOFF)}},el={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(gt.Msg.MIXLY_BUILDIN_LED).appendField(new gt.FieldDropdown([[gt.Msg.COLOUR_RGB_RED,"r"],[gt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(gt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},il={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(gt.Msg.MIXLY_BUILDIN_LED).appendField(new gt.FieldDropdown([[gt.Msg.COLOUR_RGB_RED,"r"],[gt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},nl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING).appendField(gt.Msg.MIXLY_BUILDIN_LED).appendField(new gt.FieldDropdown([[gt.Msg.COLOUR_RGB_RED,"r"],[gt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_SETTING+gt.Msg.MIXLY_BUILDIN_LED+gt.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},sl={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(new gt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},_l={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Ct.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(gt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(gt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(gt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},ol={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},pl={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.MIXLY_DURATION).appendField(gt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},al={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(gt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.PYTHON_RANGE_STEP).appendField(gt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ul={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_WRI)}},rl={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Ct.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(gt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(gt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(gt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},ll={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},dl={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(gt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.PYTHON_RANGE_STEP).appendField(gt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Il={init:function(){this.setColour(Kr),this.appendValueInput("TICKS").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(gt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(gt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Tl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Ml={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_RESET)}},hl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(gt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},ml={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(gt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},El={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ol={init:function(){this.setColour(Kr),this.appendValueInput("LIST").appendField(gt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Rl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MOTOR_DC).appendField(new gt.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Direction).appendField(new gt.FieldDropdown([[gt.Msg.CLOCKWISE,"CW"],[gt.Msg.ANTI_CLOCKWISE,"CCW"],[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField("MixGo Car").appendField(new gt.FieldDropdown([[gt.Msg.blockpy_forward,"F"],[gt.Msg.blockpy_backward,"B"],[gt.Msg.blockpy_left,"L"],[gt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},gl={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField("MixGo Car").appendField(new gt.FieldDropdown([[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Cl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MOTOR_DC).appendField(new gt.FieldDropdown([[gt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[gt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Direction).appendField(new gt.FieldDropdown([[gt.Msg.CLOCKWISE,"CW"],[gt.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Sl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MOTOR_DC).appendField(new gt.FieldDropdown([[gt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[gt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(gt.Msg.MIXLY_STOP).appendField(new gt.FieldDropdown([[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Al={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Ll={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXBOT).appendField(new gt.FieldDropdown([[gt.Msg.blockpy_forward,"F"],[gt.Msg.blockpy_backward,"B"],[gt.Msg.blockpy_left,"L"],[gt.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[gt.Msg.MIXLY_SPEED,"SPEED"],[gt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Nl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXBOT).appendField(new gt.FieldDropdown([[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXBOT).appendField(gt.Msg.MIXLY_MOTOR).appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"1"],[gt.Msg.TEXT_TRIM_RIGHT,"2"],[gt.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[gt.Msg.MIXLY_SPEED,"SPEED"],[gt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},fl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[gt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Fl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.BITBOT).appendField(new gt.FieldDropdown([[gt.Msg.blockpy_forward,"F"],[gt.Msg.blockpy_backward,"B"],[gt.Msg.blockpy_left,"L"],[gt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Pl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.BITBOT).appendField(new gt.FieldDropdown([[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Yl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.BITBOT).appendField(gt.Msg.MIXLY_MOTOR).appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"0"],[gt.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Direction).appendField(new gt.FieldDropdown([[gt.Msg.CLOCKWISE,"CW"],[gt.Msg.ANTI_CLOCKWISE,"CCW"],[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vl={init:function(){this.setColour(Kr),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Xl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},yl={init:function(){this.setColour(Kr),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_SETTING+gt.Msg.MIXLY_MIXBOT_BUZZER+gt.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_SETONOFF)}},xl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET+gt.Msg.MIXLY_MIXBOT_BUZZER+gt.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},bl={init:function(){this.setColour(Kr),this.appendValueInput("PATH").appendField(gt.Msg.MIXLY_RECORD_AUDIO).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(gt.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Vl={init:function(){this.setColour(Kr),this.appendValueInput("PATH").appendField(gt.Msg.MIXLY_PLAY_AUDIO).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Bl={init:function(){this.setColour(Kr),this.appendValueInput("PATH").appendField(gt.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Gl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(gt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Ul={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.LISTS_SET_INDEX_SET+gt.Msg.ME_GO_MOTOR_EXTERN).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([["1","1"],["2","2"],["3","3"],["4","4"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.blynk_IOT_IR_POWER+gt.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},kl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET+gt.Msg.ME_GO_MOTOR_EXTERN).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.blynk_IOT_IR_POWER+gt.Msg.MIXLY_PINMODEOUT+gt.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Hl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.LISTS_SET_INDEX_SET+gt.Msg.ME_GO_MOTOR_EXTERN).appendField(gt.Msg.MIXLY_ALL+gt.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(gt.ALIGN_RIGHT).appendField(gt.Msg.blynk_IOT_IR_POWER+gt.Msg.MIXLY_PINMODEOUT+gt.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Wl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.ANALOG+gt.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(gt.Msg.MIXLY_RELEASE).appendField(new gt.FieldDropdown([[gt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[gt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.ANALOG+gt.Msg.MIXLY_KEYBOARD_INPUT)}},Kl={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SPECIAL_KEY).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[gt.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[gt.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[gt.Msg.MIXLY_SPECIAL_KEY4,"0x04"],[gt.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[gt.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[gt.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[gt.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[gt.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},Jl={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GENERAL_KEY).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],["A","0x04"],["B","0x05"],["C","0x06"],["D","0x07"],["E","0x08"],["F","0x09"],["G","0x0A"],["H","0x0B"],["I","0x0C"],["J","0x0D"],["K","0x0E"],["L","0x0F"],["M","0x10"],["N","0x11"],["O","0x12"],["P","0x13"],["Q","0x14"],["R","0x15"],["S","0x16"],["T","0x17"],["U","0x18"],["V","0x19"],["W","0x1A"],["X","0x1B"],["Y","0x1C"],["Z","0x1D"],["1 !","0x1E"],["2 @","0x1F"],["3 #","0x20"],["4 $","0x21"],["5 %","0x22"],["6 ^","0x23"],["7 &","0x24"],["8 *","0x25"],["9 (","0x26"],["0 )","0x27"],["ENTER","0x28"],["ESC","0x29"],["BACKSPACE","0x2A"],["TAB","0x2B"],["SPACE","0x2C"],["- _","0x2D"],["= +","0x2E"],["[ {","0x2F"],["] }","0x30"],["\\ |","0x31"],["; :","0x33"],["' \"","0x34"],["` ~","0x35"],[", <","0x36"],[". >","0x37"],["/ ?","0x38"],["CAPS_LOCK","0x39"],["F1","0x3A"],["F2","0x3B"],["F3","0x3C"],["F4","0x3D"],["F5","0x3E"],["F6","0x3F"],["F7","0x40"],["F8","0x41"],["F9","0x42"],["F10","0x43"],["F11","0x44"],["F12","0x45"],["PRINTSCREEN","0x46"],["SCROLL_LOCK","0x47"],["PAUSE","0x48"],["INSERT","0x49"],["HOME","0x4A"],["PAGE_UP","0x4B"],["DELETE","0x4C"],["END","0x4D"],["PAGE_DOWN","0x4E"],["RIGHT","0x4F"],["LEFT","0x50"],["DOWN","0x51"],["UP","0x52"],["NUM_LOCK","0x53"],["/","0x54"],["*","0x55"],["-","0x56"],["+","0x57"],["ENTER","0x58"],["1","0x59"],["2","0x5A"],["3","0x5B"],["4","0x5C"],["5","0x5D"],["6","0x5E"],["7","0x5F"],["8","0x60"],["9","0x61"],["0","0x62"],[".","0x63"]]),"op"),this.setOutput(!0)}},ql={init:function(){this.setColour(Kr),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new gt.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(gt.Msg.GENERALKEY_TUPLE_CREATE_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("generalkey_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;nnew Array(32).fill(0)))},bm={init:function(){this.jsonInit({colour:Nm,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:gt.Msg.MIXLY_MICROBIT_Built_in_image1,message0:gt.Msg.MIXLY_MICROBIT_Built_in_image})}},Vm={init:function(){this.setColour(Nm),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new gt.FieldDropdown(Ct.Profile.default.builtinimg),"image"),this.setOutput(!0,["esp32_image","List"])}},Bm={init:function(){this.setColour(Nm),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(gt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new gt.FieldDropdown(Bm.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":gt.Msg.MIXLY_MICROBIT_image_add,"-":gt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[gt.Msg.MICROBIT_DISPLAY_UNION,"add"],[gt.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Gm={init:function(){this.setColour(Nm),this.appendValueInput("A").setCheck("esp32_image").appendField(gt.Msg.MIXLY_MICROBIT_Invert_image1),this.setInputsInline(!0),this.setOutput(!0,"esp32_image")}},Um={init:function(){this.setColour(Nm),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(gt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(gt.Msg.DISPLAY_IMAGE_LET2).appendField(new gt.FieldDropdown(Um.OPERATORS),"OP"),this.appendValueInput("val").appendField(gt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.DISPLAY_IMAGE_UNIT);Ct.Boards.getSelectedBoardKey();"Python ESP32-S3"===Ct.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(gt.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=gt.Msg.DISPLAY_IMAGE_LET,n=gt.Msg.DISPLAY_IMAGE_LET2,s=gt.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:gt.Msg.MIXLY_UP,shift_down:gt.Msg.MIXLY_DOWN,shift_left:gt.Msg.MIXLY_LEFT,shift_right:gt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[gt.Msg.MIXLY_UP,"shift_up"],[gt.Msg.MIXLY_DOWN,"shift_down"],[gt.Msg.MIXLY_LEFT,"shift_left"],[gt.Msg.MIXLY_RIGHT,"shift_right"]]},wm={init:function(){this.setColour(Nm),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},km={init:function(){this.setColour(Nm),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Hm={init:function(){this.setColour(Nm),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Wm={init:function(){this.setColour(Nm),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},Km={init:function(){this.setColour(Nm),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Clear_display);Ct.Boards.getSelectedBoardKey();"Python ESP32-S3"===Ct.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(gt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Clear_display)}},Jm={init:function(){this.setColour(Nm),this.appendDummyInput().appendField(gt.Msg.MIXLY_SHOW+gt.Msg.MIXLY_DISPLAY_MATRIX_WRITE_NOW),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},qm={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<8;i++)e.appendField(new gt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Nm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Qm={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(gt.inputs.Align.CENTRE).appendField(new gt.FieldBitmap(Qm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Nm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},zm={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new gt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Nm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},jm={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(gt.inputs.Align.CENTRE).appendField(new gt.FieldBitmap(jm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Nm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},$m={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<16;i++)e.appendField(new gt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,"esp32_image"),this.setColour(Nm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Zm={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(gt.inputs.Align.CENTRE).appendField(new gt.FieldBitmap(Zm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Nm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},tE={init:function(){this.setColour(Nm),this.appendDummyInput().appendField(gt.Msg.OLED_SET_FONT).appendField(new gt.FieldDropdown(tE.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+gt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+gt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+gt.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},eE={init:function(){this.setColour(Nm),this.appendValueInput("data").appendField(gt.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.OLED_BITMAP_OR_STRING)}},iE={init:function(){this.setColour(Nm),this.appendValueInput("data").appendField(gt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.OLED_BITMAP_OR_STRING)}},nE={init:function(){this.setColour(Nm),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(gt.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.OLED_BITMAP_OR_STRING)}},sE={init:function(){this.setColour(Nm),this.appendValueInput("data").setCheck(String).appendField(gt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(gt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(gt.Msg.TEXT_CENTER).appendField(new gt.FieldDropdown([[gt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[gt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},_E={init:function(){this.setColour(Nm),this.appendValueInput("data").setCheck(String).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(gt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},oE={init:function(){this.setColour(Nm),this.appendValueInput("data").setCheck(String).appendField(gt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},pE={init:function(){this.setColour(Nm),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},aE={init:function(){this.jsonInit({colour:Nm,args0:[{name:"state",options:[[gt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[gt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"shape",options:[[gt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[gt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"}],inputsInline:!0,helpUrl:gt.Msg.mpython_HELPURL,tooltip:gt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:gt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},uE={init:function(){this.jsonInit({colour:Nm,args0:[{name:"state",options:[[gt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[gt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"dir_h_v",options:[[gt.Msg.mpython_vertical,"0"],[gt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"}],inputsInline:!0,helpUrl:gt.Msg.mpython_HELPURL,tooltip:gt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:gt.Msg.MPYTHON_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},rE={init:function(){this.jsonInit({colour:Nm,args0:[{name:"state",options:[[gt.Msg.mpython_display_hline_1,"1"],[gt.Msg.mpython_display_hline_0,"0"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"}],inputsInline:!0,helpUrl:gt.Msg.mpython_HELPURL,tooltip:gt.Msg.mpython_display_line_TOOLTIP,message0:gt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},lE={init:function(){this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new gt.FieldDropdown(lE.IMAGES),"path"),this.setColour(Nm),this.setOutput(!0)},IMAGES:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]]},dE={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<5;i++)e.appendField(new gt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Nm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},IE={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(gt.inputs.Align.CENTRE).appendField(new gt.FieldBitmap(IE.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Nm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},TE={init:function(){this.setColour(Nm),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},ME={init:function(){this.setColour(Nm),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_AMBIENTBRIGHT),this.setInputsInline(!0),this.setOutput(!0,Number)}},hE={init:function(){this.setColour(Nm),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},mE={init:function(){this.setColour(Nm),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new gt.FieldDropdown(mE.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[gt.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[gt.Msg.CLOCKWISE+"90"+gt.Msg.blockpy_setheading_degree,"1"],[gt.Msg.CLOCKWISE+"180"+gt.Msg.blockpy_setheading_degree,"2"],[gt.Msg.CLOCKWISE+"270"+gt.Msg.blockpy_setheading_degree,"3"]]},EE={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<12;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new gt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Nm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},OE={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(gt.inputs.Align.CENTRE).appendField(new gt.FieldBitmap(OE.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Nm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},RE={init:function(){this.setColour(Nm),this.appendValueInput("data").appendField(gt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(gt.Msg.HTML_COLOUR);Ct.Boards.getSelectedBoardKey();"Python ESP32-S3"===Ct.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(gt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cE={init:function(){this.setColour(Nm),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.OLED_BITMAP).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("direct").setCheck(String).appendField(gt.Msg.MIXLY_AipImageClassify_Image+gt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},gE={init:function(){this.setColour(Nm),this.appendValueInput("data").setCheck(String).appendField(gt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(gt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(gt.Msg.TEXT_CENTER).appendField(new gt.FieldDropdown([[gt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[gt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.appendValueInput("VAR").appendField(gt.Msg.HTML_COLOUR);Ct.Boards.getSelectedBoardKey();"Python ESP32-S3"===Ct.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(gt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},CE={init:function(){this.setColour(Nm),this.appendValueInput("data").setCheck(String).appendField(gt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.appendValueInput("VAR").appendField(gt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},SE={init:function(){this.jsonInit({colour:Nm,args0:[{name:"shape",options:[[gt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[gt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:gt.Msg.mpython_HELPURL,tooltip:gt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:gt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},AE={init:function(){this.jsonInit({colour:Nm,args0:[{name:"dir_h_v",options:[[gt.Msg.mpython_vertical,"0"],[gt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:gt.Msg.mpython_HELPURL,tooltip:gt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:gt.Msg.ONBOARD_TFT_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},LE={init:function(){this.jsonInit({colour:Nm,args0:[{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:gt.Msg.mpython_HELPURL,tooltip:gt.Msg.mpython_display_line_TOOLTIP,message0:gt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},NE={init:function(){this.setColour(Nm),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(gt.Msg.HTML_COLOUR),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},DE={init:function(){this.setColour(Nm),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.MIXLY_LCD_SETCOLOR).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("VAR").appendField(gt.Msg.HTML_COLOUR);Ct.Boards.getSelectedBoardKey();"Python ESP32-S3"===Ct.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(gt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},fE={init:function(){this.setColour(Nm),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_SCREEN_FILL);Ct.Boards.getSelectedBoardKey();"Python ESP32-S3"===Ct.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(gt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},FE={init:function(){this.setColour(Nm),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_INIT_CLOCK),this.appendDummyInput().appendField(gt.Msg.MIXLY_CENTER_POS),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.OLED_CIRCLE_RADIUS),this.appendValueInput("VAR").appendField(gt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},PE={init:function(){this.setColour(Nm),this.appendValueInput("SUB"),this.appendDummyInput().appendField(gt.Msg.GET_RTCTIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},YE={init:function(){this.setColour(Nm),this.appendValueInput("SUB"),this.appendDummyInput().appendField(gt.Msg.SET_TIME),this.appendValueInput("h").setCheck(Number).appendField(gt.Msg.MIXLY_HOUR),this.appendValueInput("m").setCheck(Number).appendField(gt.Msg.MIXLY_MINUTE),this.appendValueInput("s").setCheck(Number).appendField(gt.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vE={init:function(){this.setColour(Nm),this.appendValueInput("SUB"),this.appendDummyInput().appendField(gt.Msg.DRAW_CLOCK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},XE={init:function(){this.setColour(Nm),this.appendValueInput("SUB"),this.appendDummyInput().appendField(gt.Msg.CLEAR_CLOCK),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_STM32_TFT_BACKGROUND_COLOR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},yE={init:function(){this.jsonInit({colour:Nm,args0:[{name:"shape",options:[[gt.Msg.MPYTHON_DISPLAY_HOLLOW,"False"],[gt.Msg.MPYTHON_DISPLAY_SOLID,"True"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"r",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:gt.Msg.mpython_HELPURL,message0:gt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_CIRCLE_MESSAGE0,nextStatement:null,previousStatement:null})}},xE={init:function(){this.setColour(Nm),this.appendDummyInput().appendField(gt.Msg.DRAW_POINTER).appendField(gt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(gt.Msg.MIXLY_DRAW_POINTER_DU),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.DRAW_POINTER_TOOLTIP)}},bE={init:function(){this.setColour(Nm),this.appendDummyInput().appendField(gt.Msg.DRAW_POINTER).appendField(gt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(gt.Msg.MIXLY_DRAW_POINTER_DU),this.appendValueInput("VAR").appendField(gt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.DRAW_POINTER_TOOLTIP)}},VE={init:function(){this.setColour(Nm),this.appendValueInput("data").appendField(gt.Msg.MIXLY_Display_long_text),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(gt.Msg.HTML_COLOUR);Ct.Boards.getSelectedBoardKey();"Python ESP32-S3"===Ct.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(gt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},BE={init:function(){this.setColour(Nm),this.appendValueInput("data").appendField(gt.Msg.OLED_BITMAP),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.OLED_BITMAP_OR_STRING),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},GE={init:function(){Fm.init.call(this),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},UE={init:function(){vm.init.call(this),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},wE={init:function(){Um.init.call(this),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},kE={init:function(){Hm.init.call(this),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},HE={init:function(){Wm.init.call(this),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},WE={init:function(){Km.init.call(this),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},KE=180,JE={init:function(){this.setColour(KE),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(gt.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(gt.Msg.DISPLAY_IMAGE_LET2).appendField(new gt.FieldDropdown(JE.OPERATORS),"OP"),this.appendValueInput("val").appendField(gt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=gt.Msg.DISPLAY_IMAGE_LET,n=gt.Msg.DISPLAY_IMAGE_LET2,s=gt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:gt.Msg.MIXLY_UP,down:gt.Msg.MIXLY_DOWN,left:gt.Msg.MIXLY_LEFT,right:gt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[gt.Msg.MIXLY_UP,"up"],[gt.Msg.MIXLY_DOWN,"down"],[gt.Msg.MIXLY_LEFT,"left"],[gt.Msg.MIXLY_RIGHT,"right"]]},qE={init:function(){this.setColour(KE),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(gt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new gt.FieldDropdown(qE.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":gt.Msg.MIXLY_MICROBIT_image_add,"-":gt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[gt.Msg.MICROBIT_DISPLAY_UNION,"+"],[gt.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},QE={init:function(){this.setColour(KE),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+gt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new gt.FieldDropdown(QE.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+gt.Msg.MIXLY_MICROBIT_IMAGE+{height:gt.Msg.MIXLY_HEIGHT,width:gt.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[gt.Msg.MIXLY_HEIGHT,"height"],[gt.Msg.MIXLY_WIDTH,"width"]]},zE={init:function(){this.setColour(KE),this.appendValueInput("VAR").appendField(gt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RECT).appendField(new gt.FieldDropdown(zE.STATUS),"OP"),this.jsonInit({message0:gt.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_OLED_RECT)},STATUS:[[gt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[gt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},jE={init:function(){this.setColour(KE),this.appendValueInput("VAR").appendField(gt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new gt.FieldDropdown(jE.STATUS),"OP"),this.jsonInit({message0:gt.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[gt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[gt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},$E={init:function(){this.setColour(KE),this.appendValueInput("VAR").appendField(gt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_DISPLAY_DRAW+gt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new gt.FieldDropdown($E.STATUS),"OP"),this.jsonInit({message0:gt.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_DISPLAY_DRAW+gt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[gt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[gt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},ZE="#777777",tO={init:function(){this.setColour(ZE),this.appendDummyInput("").appendField("from ").appendField(new gt.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new gt.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},eO={init:function(){this.setColour(ZE),this.appendDummyInput("").appendField("import ").appendField(new gt.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iO={init:function(){this.setColour(ZE),this.appendDummyInput("").appendField(new gt.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new gt.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},kO={init:function(){this.setColour(xO),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(gt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},HO={init:function(){this.setColour(xO),this.appendDummyInput().appendField(gt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},WO={init:function(){this.setColour(xO),this.appendDummyInput().appendField(gt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},KO={init:function(){this.setColour(xO),this.appendDummyInput().appendField(gt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(gt.Msg.MIXLY_EMQX_SERVER).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(gt.Msg.MIXLY_WIFI_USERNAME).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(gt.Msg.MIXLY_IOT_PASSWORD).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(gt.Msg.MIXLY_EMQX_PROJECT).setAlign(gt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},JO={init:function(){this.setColour(xO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(gt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(gt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(gt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},qO={init:function(){this.setColour(xO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(gt.Msg.MIXLY_EMQX_SUBSCRIBE+gt.Msg.MIXLY_MICROBIT_MSG).appendField(gt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(gt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},QO={init:function(){this.setColour(xO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zO={init:function(){this.setColour(xO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(gt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},jO={init:function(){this.setColour(xO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$O={init:function(){this.setColour(xO),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(gt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},ZO={init:function(){this.setColour(xO),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(gt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},tR={init:function(){this.setColour(xO),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},eR={init:function(){this.setColour(xO),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},iR={init:function(){this.setColour(xO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(gt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},nR={init:function(){this.setColour(xO),this.appendDummyInput().appendField("MixIO").appendField(gt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(gt.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},sR={init:function(){this.setColour(xO),this.appendDummyInput().appendField(gt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(gt.Msg.MIXLY_EMQX_SERVER).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(gt.Msg.CONTROLS_FOR_INPUT_WITH+gt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(gt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_R={init:function(){this.setColour(xO),this.appendDummyInput().appendField(gt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(gt.Msg.MIXLY_EMQX_SERVER).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(gt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(gt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},oR={init:function(){this.VISITOR_ID=Ct.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(xO),this.appendDummyInput("").appendField(new gt.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},pR={init:function(){this.setColour(xO),this.appendDummyInput().appendField("MixIO").appendField(gt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},aR={init:function(){this.setColour(xO),this.appendDummyInput().appendField("HTTP"+gt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(gt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(gt.Msg.MIXLY_REQUESTS_GET).appendField(gt.Msg.MIXLY_GET_CURRENT_TIME).appendField(gt.Msg.MIXLY_OPEN_DEBUG).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},uR={init:function(){this.setColour(xO),this.appendDummyInput().appendField("HTTP"+gt.Msg.MIXLY_Client).appendField(gt.Msg.MIXLY_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[gt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[gt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},rR={init:function(){this.setColour(xO),this.appendDummyInput().appendField("MQTT"+gt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(gt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(gt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(gt.Msg.MQTT_Topic).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(gt.Msg.MIXLY_OPEN_DEBUG).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},lR={init:function(){this.setColour(xO),this.appendDummyInput().appendField("MQTT"+gt.Msg.MIXLY_Client).appendField(gt.Msg.MIXLY_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[gt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[gt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},dR=bO,IR=VO,TR=BO,MR=GO,hR=wO,mR={init:function(){this.setColour(xO),this.appendDummyInput().appendField(gt.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(gt.Msg.MIXLY_EMQX_SERVER).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(gt.Msg.MODEL_NAME).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(gt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ER=mR,OR={init:function(){this.setColour(xO),this.appendDummyInput().appendField(gt.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(gt.Msg.MIXLY_EMQX_SERVER).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(gt.Msg.MIXLY_API_PRIVATE_KEY).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(gt.Msg.MODEL_NAME).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(gt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},RR={init:function(){this.setColour(xO),this.appendDummyInput().appendField(gt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(gt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(gt.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cR={init:function(){this.setColour(xO),this.appendDummyInput().appendField(gt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(gt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(gt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},gR={init:function(){this.setColour(xO),this.appendDummyInput().appendField("Ollama "+gt.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},CR=225,SR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(gt.Msg.MIXLY_NETWORK_MODE).appendField(new gt.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},AR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[gt.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=gt.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:gt.Msg.MIXLY_NETWORK_WIFI_OPEN,False:gt.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},LR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},NR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return gt.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:gt.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},DR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(gt.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(gt.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},fR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_NETWORK_WIFI_CONNECT+gt.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},FR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[gt.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[gt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return gt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:gt.Msg.MIXLY_ESP32_NETWORK_IP,1:gt.Msg.MIXLY_ESP32_NETWORK_MASK,2:gt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},PR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},YR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[gt.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},vR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(gt.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(gt.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},XR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},yR={init:function(){this.setColour(CR),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new gt.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},xR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},bR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},VR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},BR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},GR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},UR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},wR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},kR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},HR={init:function(){this.setColour(CR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},WR={init:function(){this.setColour(CR),this.appendValueInput("DOMAIN").appendField(gt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(gt.Msg.blockpy_REQUESTS_GET).appendField(new gt.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},KR={init:function(){this.appendValueInput("VAL"),this.setColour(CR),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new gt.FieldDropdown(KR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:gt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:gt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:gt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[gt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[gt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[gt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[gt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},JR={init:function(){this.appendValueInput("VAR").appendField(gt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(CR),this.appendDummyInput("").appendField(gt.Msg.blockpy_CONDUCT).appendField(new gt.FieldDropdown(JR.METHOD),"DIR"),this.appendDummyInput("").appendField(gt.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:gt.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:gt.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},qR={init:function(){this.setColour(CR),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(gt.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},QR={init:function(){this.setColour(CR),this.appendDummyInput("").appendField(new gt.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},zR="#3288dd",jR={init:function(){this.setColour(zR),this.appendValueInput("URL").appendField(gt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(gt.Msg.blockpy_CONDUCT).appendField(new gt.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(gt.Msg.blockpy_REQUESTS).appendField(gt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},$R={init:function(){this.setColour(zR),this.appendValueInput("URL").appendField(gt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(gt.Msg.blockpy_CONDUCT).appendField(new gt.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(gt.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(gt.Msg.blockpy_REQUESTS+gt.Msg.OLED_STRING),this.appendDummyInput("").appendField(gt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},ZR={init:function(){this.appendValueInput("VAL"),this.setColour(zR),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new gt.FieldDropdown(ZR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[gt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[gt.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[gt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[gt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[gt.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},tc={init:function(){this.setColour(zR),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(gt.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(gt.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(gt.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(gt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},ec={init:function(){this.setColour(zR),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(gt.Msg.MIXLY_EMQX_SERVER).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(gt.Msg.MIXLY_EMQX_PORT).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(gt.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(gt.Msg.MIXLY_WIFI_USERNAME).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(gt.Msg.MIXLY_IOT_PASSWORD).setAlign(gt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ic={init:function(){this.setColour(zR),this.appendValueInput("TOPIC").appendField(gt.Msg.MIXLY_EMQX_SUBSCRIBE+gt.Msg.MIXLY_MICROBIT_MSG).appendField(gt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(gt.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},nc={init:function(){this.setColour(zR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(gt.Msg.MIXLY_EMQX_SUBSCRIBE+gt.Msg.MIXLY_MICROBIT_MSG).appendField(gt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(gt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sc={init:function(){this.setColour(zR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(gt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(gt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(gt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_c={init:function(){this.setColour(zR),this.appendDummyInput().appendField("mqtt"+gt.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},oc="#A58C5B",pc={init:function(){this.setColour(oc),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_BUTTON).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(gt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_SENOR_IS_PRESSED)}},ac={init:function(){this.setColour(oc),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_BUTTON).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(gt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_SENOR_WAS_PRESSED)}},uc={init:function(){this.setColour(oc),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_BUTTON).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(gt.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.PROCEDURES_DEFRETURN_RETURN+gt.Msg.MIXLY_BUTTON+gt.Msg.MIXLY_GET_PRESSES)}},rc={init:function(){this.setColour(oc),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_BUTTON).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[gt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[gt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},lc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_shake,"shake"],[gt.Msg.MIXLY_UP,"up"],[gt.Msg.MIXLY_DOWN,"down"],[gt.Msg.MIXLY_LEFT,"left"],[gt.Msg.MIXLY_RIGHT,"right"],[gt.Msg.MIXLY_MICROBIT_face_up,"face up"],[gt.Msg.MIXLY_MICROBIT_face_down,"face down"],[gt.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=gt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=gt.Msg.MSG.catSensor,s=gt.Msg.MIXLY_MICROBIT_JS_STATE,_=gt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:gt.Msg.MIXLY_MICROBIT_shake,up:gt.Msg.MIXLY_UP,down:gt.Msg.MIXLY_DOWN,left:gt.Msg.MIXLY_LEFT,right:gt.Msg.MIXLY_RIGHT,"face up":gt.Msg.MIXLY_MICROBIT_face_up,"face down":gt.Msg.MIXLY_MICROBIT_face_down,freefall:gt.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+_}))}},dc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new gt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=gt.Msg.MIXLY_MICROBIT_Direction,s=gt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":gt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Ic={init:function(){this.setColour(oc),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},Tc={init:function(){this.setColour(oc),this.appendValueInput("PIN",Number).appendField(new gt.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new gt.FieldDropdown(Tc.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[gt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[gt.Msg.MIXLY_GETHUMIDITY,"humidity"]]},Mc={init:function(){this.setColour(oc),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},hc={init:function(){this.setColour(oc),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},mc={init:function(){this.setColour(oc),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"left"],[gt.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(gt.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=gt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=gt.Msg.MIXLY_ESP32_NEAR;return i+{left:gt.Msg.TEXT_TRIM_LEFT,right:gt.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},Ec={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_ALTITUDE_SENSOR+" BMP280").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[gt.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":gt.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":gt.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},Oc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+" SHT20").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[gt.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},Rc={init:function(){this.setColour(oc),this.appendValueInput("PIN",Number).appendField("DS18X20 "+gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},cc={init:function(){this.setColour(oc),this.appendDummyInput("").appendField("LM35"+gt.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_LM35)}},gc={init:function(){this.setColour(oc),this.appendValueInput("I2CSUB").appendField(gt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SETUP+gt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_ESP32_EXTERN_LIGHT+"(LTR308ALS)","LTR308"],[gt.Msg.MIXLY_COLOR_SENSOR+"(LTR381RGB)","LTR381RGB"],[gt.Msg.MIXLY_COLOR_SENSOR+"(UCS12071)","UCS12071"],[gt.Msg.MIXLY_EXTERN_LIGHTUV+"(LTR390UV)","LTR390UV"],[gt.Msg.MIXLY_ALTITUDE_SENSOR+"(HP203X)","HP203X"],[gt.Msg.MIXLY_ALTITUDE_SENSOR+"(SPL06_001)","SPL06_001"],[gt.Msg.MIXLY_ALTITUDE_SENSOR+"(MS5611)","MS5611"],[gt.Msg.MIXLY_ALTITUDE_SENSOR+"(BMP280)","BMP280"],[gt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHTC3)","SHTC3"],[gt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(AHT21)","AHT21"],[gt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHT20)","SHT20"],[gt.Msg.MIXLY_LASER_RANGE_SENSOR+"(VL53L0X)","VL53L0X"],[gt.Msg.MIXLY_GEOMAGNETIC_SENSOR+"(QMC5883L)","QMC5883L"],[gt.Msg.MIXLY_ESP32_MAX30102+"(MAX30102)","MAX30102"],[gt.Msg.HTML_COLOUR+"、"+gt.Msg.MIXLY_ENVIRONMENT_LIGHT+"、"+gt.Msg.MIXLY_NEXT+"、"+gt.Msg.MIXLY_ESP32_APDS9960+"(APDS9960)","APDS9960"],[gt.Msg.MIXLY_NINE_AXIS_SENSOR+"(MPU9250)","MPU9250"],[gt.Msg.MixGo_MPU9250+"(ADXL345)","ADXL345"],["RFID","RFID"],[gt.Msg.MIXLY_RADAR_SENSOR+"(CBR817)","CBR817"],[gt.Msg.MIXLY_AipSpeech_asr+"(CI130X)","CI130X"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},Cc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.LISTS_SET_INDEX_SET+gt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(gt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+gt.Msg.MIXLY_DELAY_TIME_RANGE)}},Sc={init:function(){this.setColour(oc),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RADAR).appendField(gt.Msg.LISTS_SET_INDEX_SET+gt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(gt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+gt.Msg.MIXLY_DELAY_TIME_RANGE)}},Ac={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},Lc={init:function(){this.setColour(oc),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RADAR).appendField(gt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},Nc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_IDENTIFY_ONCE_AND_SAVE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Dc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_HELLO_XIAOZHI,"1"],[gt.Msg.MIXLY_XIAOZHIXIAOZHI,"2"],[gt.Msg.MIXLY_THE_FIRST,"3"],[gt.Msg.MIXLY_THE_SECOND,"4"],[gt.Msg.MIXLY_THE_THIRD,"5"],[gt.Msg.MIXLY_THE_FOURTH,"6"],[gt.Msg.MIXLY_THE_FIFTH,"7"],[gt.Msg.MIXLY_THE_SIXTH,"8"],[gt.Msg.MIXLY_THE_SEVENTH,"9"],[gt.Msg.MIXLY_THE_EIGHTH,"10"],[gt.Msg.MIXLY_THE_NINTH,"11"],[gt.Msg.MIXLY_THE_TENTH,"12"],[gt.Msg.MIXLY_THE_ELEVENTH,"13"],[gt.Msg.MIXLY_THE_TWELFTH,"14"],[gt.Msg.MIXLY_THE_13TH,"15"],[gt.Msg.MIXLY_THE_14TH,"16"],[gt.Msg.MIXLY_THE_15TH,"17"],[gt.Msg.MIXLY_THE_16TH,"18"],[gt.Msg.MIXLY_THE_17TH,"19"],[gt.Msg.MIXLY_THE_18TH,"20"],[gt.Msg.MIXLY_THE_19TH,"21"],[gt.Msg.MIXLY_THE_20TH,"22"],[gt.Msg.MIXLY_Turn_on_the_lights,"23"],[gt.Msg.MIXLY_Turn_off_the_lights,"24"],[gt.Msg.MIXLY_Turn_up_the_brightness,"25"],[gt.Msg.MIXLY_Turn_down_the_brightness,"26"],[gt.Msg.MIXLY_Set_it_to_red,"27"],[gt.Msg.MIXLY_Set_it_to_orange,"28"],[gt.Msg.MIXLY_Set_it_to_yellow,"29"],[gt.Msg.MIXLY_Set_it_to_green,"30"],[gt.Msg.MIXLY_Set_it_to_cyan,"31"],[gt.Msg.MIXLY_Set_it_to_blue,"32"],[gt.Msg.MIXLY_Set_it_to_purple,"33"],[gt.Msg.MIXLY_Set_it_to_white,"34"],[gt.Msg.MIXLY_Turn_on_the_fan,"35"],[gt.Msg.MIXLY_Turn_off_the_fan,"36"],[gt.Msg.MIXLY_First_gear,"37"],[gt.Msg.MIXLY_Wind_speed_second,"38"],[gt.Msg.MIXLY_Third_gear,"39"],[gt.Msg.MIXLY_Previous,"40"],[gt.Msg.MIXLY_Next_page,"41"],[gt.Msg.MIXLY_Show_smiley_face,"42"],[gt.Msg.MIXLY_Show_crying_face,"43"],[gt.Msg.MIXLY_Show_love,"44"],[gt.Msg.MIXLY_Close_display,"45"],[gt.Msg.MIXLY_Start_execution,"46"],[gt.Msg.MIXLY_FORWARD,"47"],[gt.Msg.MIXLY_BACKWARD,"48"],[gt.Msg.MIXLY_TURNLEFT,"49"],[gt.Msg.MIXLY_TURNRIGHT,"50"],[gt.Msg.MIXLY_STOP,"51"],[gt.Msg.MIXLY_Accelerate,"52"],[gt.Msg.MIXLY_retard,"53"],[gt.Msg.ROTATION_FORWARD,"54"],[gt.Msg.ROTATION_BACKWARD,"55"],[gt.Msg.MIXLY_Query_temperature,"56"],[gt.Msg.MIXLY_Query_humidity,"57"],[gt.Msg.MIXLY_Query_brightness,"58"],[gt.Msg.MIXLY_Query_sound,"59"],[gt.Msg.MIXLY_Query_time,"60"],[gt.Msg.MIXLY_Query_distance,"61"],[gt.Msg.MIXLY_Query_pressure,"62"],[gt.Msg.MIXLY_Query_key,"63"],[gt.Msg.MIXLY_Query_touch,"64"],[gt.Msg.MIXLY_Query_color,"65"]]),"cmd").appendField(gt.Msg.MIXLY_WHETHER+gt.Msg.MIXLY_BE_IDENTIFIED),this.setOutput(!0),this.setInputsInline(!0)}},fc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_RECOGNIZED_STATE,"status1"],[gt.Msg.MIXLY_WHETHER_BROADCAST,"status2"],[gt.Msg.MIXLY_THE_RECOGNIZED_CMD,"result"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_CI130X_GET_THE_RECOGNIZED_STATE_TOOLTIP)}},Fc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MP3_PLAY).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[gt.Msg.MIXLY_WIND_SPEED,"154"],[gt.Msg.MIXLY_HYETAL,"155"],[gt.Msg.MIXLY_TEMPERATURE,"156"],[gt.Msg.MIXLY_Humidity,"157"],[gt.Msg.MIXLY_Altitude,"158"],[gt.Msg.MIXLY_SOUND,"159"],[gt.Msg.MIXLY_BRIGHTNESS,"160"],[gt.Msg.ME_GO_HALL_SENSOR_DISTANCE,"161"],[gt.Msg.MIXLY_SERVO,"162"],[gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"163"],[gt.Msg.MIXLY_BUTTON2,"164"],[gt.Msg.MIXLY_ESP32_TOUCH,"165"],[gt.Msg.MIXLY_PAY,"166"],[gt.Msg.MIXLY_CARSH_CHANGE,"167"],[gt.Msg.MIXLY_COUNTDOWN,"168"],[gt.Msg.MIXLY_TIMING,"169"],[gt.Msg.MIXLY_AT_THE_MOMENT,"170"],[gt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE,"171"],[gt.Msg.MIXLY_FORWARD,"172"],[gt.Msg.MIXLY_BACKWARD,"173"],[gt.Msg.MIXLY_TURNLEFT,"174"],[gt.Msg.MIXLY_TURNRIGHT,"175"],[gt.Msg.MIXLY_STOP,"176"],[gt.Msg.MIXLY_Accelerate,"177"],[gt.Msg.MIXLY_retard,"178"],[gt.Msg.ROTATION_FORWARD,"179"],[gt.Msg.ROTATION_BACKWARD,"180"],[gt.Msg.TUPLE_JOIN,"181"],[gt.Msg.MIXLY_SHOW,"182"],[gt.Msg.MIXLY_LAMPLIGHT,"183"],[gt.Msg.MIXLY_ACCELERATION,"184"]]),"star"),this.appendValueInput("NUM").appendField(gt.Msg.MIXLY_NUMBER),this.appendDummyInput("").appendField(gt.Msg.MIXLY_UNIT).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[gt.Msg.MIXLY_YEAR,"117"],[gt.Msg.MIXLY_MONTH,"118"],[gt.Msg.MIXLY_DAY,"119"],[gt.Msg.MIXLY_HOUR,"120"],[gt.Msg.MIXLY_MINUTE,"121"],[gt.Msg.MIXLY_SECOND,"122"],[gt.Msg.MIXLY_WEEK2,"123"],[gt.Msg.MIXLY_RMB_UNIT,"124"],[gt.Msg.blockpy_setheading_degree,"125"],[gt.Msg.MIXLY_GEAR,"126"],[gt.Msg.MIXLY_LAYER,"127"],[gt.Msg.MIXLY_GRAM,"128"],[gt.Msg.MIXLY_METER,"129"],[gt.Msg.MIXLY_CENTIMETER,"130"],[gt.Msg.MIXLY_MILLIMETER,"131"],[gt.Msg.MIXLY_LUMEN,"132"],[gt.Msg.MIXLY_DECIBEL,"133"],[gt.Msg.MIXLY_hectopascal,"134"],[gt.Msg.MIXLY_PERCENT,"135"],[gt.Msg.MIXLY_CELSIUS,"136"],[gt.Msg.MIXLY_METER_PER_SEC,"137"],[gt.Msg.MIXLY_MICROBIT_Turn_on_display,"138"],[gt.Msg.MIXLY_MICROBIT_Turn_off_display,"139"],[gt.Msg.MIXLY_SUCCESS,"140"],[gt.Msg.MIXLY_FAILED,"141"],[gt.Msg.MIXLY_WRONG,"142"],[gt.Msg.MIXLY_GOOD,"143"],[gt.Msg.MIXLY_blockpy_set_add,"144"],[gt.Msg.MIXLY_DECREASE,"145"],[gt.Msg.COLOUR_RGB_RED,"146"],[gt.Msg.COLOUR_RGB_ORANGE,"147"],[gt.Msg.COLOUR_YELLOW,"148"],[gt.Msg.COLOUR_RGB_GREEN,"149"],[gt.Msg.COLOUR_CYAN,"150"],[gt.Msg.COLOUR_RGB_BLUE,"151"],[gt.Msg.COLOUR_RGB_PURPLE,"152"],[gt.Msg.COLOUR_RGB_WHITE,"153"]]),"end"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Pc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.LISTS_SET_INDEX_SET+gt.Msg.MIXLY_SYSTEM+gt.Msg.MIXLY_CMD).appendField(new gt.FieldDropdown([[gt.Msg.MILXY_ENTER_WAKE_UP,"1"],[gt.Msg.MIXLY_INCREASE_VOLUME,"202"],[gt.Msg.MIXLY_REDUCE_VOLUME,"203"],[gt.Msg.MIXLY_MAX_VOLUME,"204"],[gt.Msg.MIXLY_MINIMUM,"205"],[gt.Msg.MIXLY_OPEN_RESPONSE,"206"],[gt.Msg.MIXLY_CLOSE_RESPONSE,"207"],[gt.Msg.MIXLY_QUIT_WAKE_UP,"208"]]),"cmd"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Yc={init:function(){this.setColour(oc),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[gt.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[gt.Msg.MIXLY_ESP32_MAX30102_IR+","+gt.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},vc={init:function(){this.setColour(oc),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[gt.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[gt.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Xc={init:function(){this.setColour(oc),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308ALS"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},yc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.HTML_COLOUR+gt.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GET+gt.Msg.HTML_COLOUR,"[2]"],[gt.Msg.MIXLY_GET+gt.Msg.MIXLY_IR_STRENGTH,"[1]"],[gt.Msg.MIXLY_GET+gt.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},xc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.HTML_COLOUR+gt.Msg.MSG.catSensor+" UCS12071").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GET+"RGB"+gt.Msg.HTML_COLOUR,"0"],[gt.Msg.MIXLY_GET+gt.Msg.MIXLY_RGB_RAW,"1"],[gt.Msg.MIXLY_GET_ENV_LIGHT+gt.Msg.MIXLY_BRIGHTNESS,"2"],[gt.Msg.GET_IR_STRENGTH+gt.Msg.MIXLY_BRIGHTNESS,"3"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},bc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GET_ENV_LIGHT,"E"],[gt.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Vc={init:function(){this.setColour(oc),this.appendDummyInput().appendField(gt.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Bc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[gt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},Gc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[gt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},Uc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_Altitude+gt.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETPRESSURE,"pressure()"],[gt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[gt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},wc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_Altitude+gt.Msg.MSG.catSensor+" SPL06_001").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETPRESSURE,"pressure()"],[gt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[gt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},kc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_Altitude+gt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETPRESSURE,"pressure()"],[gt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[gt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Hc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_Altitude+gt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_REF_TO_PRESSURE),this.appendDummyInput().appendField(gt.Msg.MIXLY_CAL_TO_ALTITUDE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Wc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MIXGOPE_FIELD+gt.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[gt.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Kc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_shake,"shake"],[gt.Msg.MIXLY_UP,"up"],[gt.Msg.MIXLY_DOWN,"down"],[gt.Msg.MIXLY_LEFT,"left"],[gt.Msg.MIXLY_RIGHT,"right"],[gt.Msg.MIXLY_MICROBIT_face_up,"face up"],[gt.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=gt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=gt.Msg.MSG.catSensor,s=gt.Msg.MIXLY_MICROBIT_JS_STATE,_=gt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:gt.Msg.MIXLY_MICROBIT_shake,up:gt.Msg.MIXLY_UP,down:gt.Msg.MIXLY_DOWN,left:gt.Msg.MIXLY_LEFT,right:gt.Msg.MIXLY_RIGHT,"face up":gt.Msg.MIXLY_MICROBIT_face_up,"face down":gt.Msg.MIXLY_MICROBIT_face_down}[e]+_}))}},Jc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new gt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=gt.Msg.MIXLY_MICROBIT_Direction,s=gt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":gt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},qc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_JS_GET+gt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new gt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=gt.Msg.MIXLY_MICROBIT_Direction,s=gt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":gt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Qc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+gt.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new gt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=gt.Msg.MIXLY_MICROBIT_Direction,s=gt.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":gt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},zc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},jc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_GETTEMPERATUE)}},$c={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return gt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:gt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},Zc={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},tg={init:function(){this.setColour(oc),this.appendValueInput("SPISUB").appendField(gt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SETUP+gt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new gt.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},eg={init:function(){this.setColour(oc),this.appendDummyInput().appendField("RFID"+gt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(gt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[gt.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ig={init:function(){this.setColour(oc),this.appendDummyInput().appendField("RFID"+gt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},ng={init:function(){this.setColour(oc),this.appendDummyInput().appendField("RFID"+gt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(gt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},sg={init:function(){this.setColour(oc),this.appendDummyInput().appendField(gt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(gt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(gt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},_g={init:function(){this.setColour(oc),this.appendDummyInput().appendField(gt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(gt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(gt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(gt.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},og={init:function(){this.setColour(oc),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_RFID_SCAN_OK,"0"],[gt.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[gt.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},pg={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new gt.FieldDropdown([["全部(元组)","data()[0]"],["全部(json)","data()[1]"],["全部(json,附带位置信息)","data()[2]"],["编号","data()[0][0]"],["电量","data()[0][1]"],["风速","data()[0][2]"],["阵风","data()[0][3]"],["风向","data()[0][4]"],["雨量","data()[0][5]"],["温度","data()[0][6]"],["湿度","data()[0][7]"],["光照","data()[0][8]"],["紫外线","data()[0][9]"],["大气压","data()[0][10]"],["信号强度","data()[0][11]"],["信噪比","data()[0][12]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip("返回气象数据元组 data= (设备id,电池状态,风速m/s,阵风m/s,风向°,雨量mm,温度℃,湿度%,光照Lux,UVI,大气压Pa,信号强度dB,信噪比dB)")}},ag={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},ug={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendValueInput("BASE").appendField("以主题"),this.appendDummyInput("").appendField("串口发送至MixIO"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},rg={init:function(){this.setColour(oc),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new gt.icons.MutatorIcon(["weather_set_label_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("weather_set_label_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n>6),i.push(128|63&_)):(2048<=_&&_<=55295||57344<=_&&_<=65535)&&(n+=3,i.push(224|15&_>>12),i.push(128|63&_>>6),i.push(128|63&_))}for(s=0;s>8,255&n].concat(i)}(t,!0),i="",n=0;n=0?"0x700000":["mixgo_sant"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==o?(e.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+_+", font_address="+p+")\n"):"16x8 Matrix"==o&&(e.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+_+")\n"),i},lY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},dY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},IY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},TY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},MY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},hY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},mY=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},EY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},OY=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},RY=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},cY=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},gY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},CY=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},SY=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_"+t.getFieldValue("OP")+"("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"B",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},AY=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},LY=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},NY=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},DY=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},fY=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"width",e.ORDER_ATOMIC),o=e.valueToCode(this,"height",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP");switch(p){case"True":return i+".show_fill_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n";case"False":return i+".show_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n"}},FY=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+_+", 1)\n"},PY=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},YY=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},vY=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},XY=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},yY=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"r",e.ORDER_ATOMIC),o="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(o){case"True":return i+".show_fill_circle("+n+", "+s+", "+_+", "+p+")\n";case"False":return i+".show_circle("+n+", "+s+", "+_+", "+p+")\n"}},xY=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),_=e.valueToCode(this,"x1",e.ORDER_ATOMIC),o=e.valueToCode(this,"y1",e.ORDER_ATOMIC),p=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",r=this.getFieldValue("OP");switch(u){case"True":return i+".show_fill_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n"}},bY=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+","+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+","+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},VY=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},BY=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),_=this.getFieldValue("key");return"TM1650"==_?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+_+"("+s+")\n"):"TM1637"==_&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+_+"("+s+")\n"),i},GY=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},UY=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},wY=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".showDP("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},kY=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},HY=function(t,e){e.definitions_.import_st7789="import st7789";var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_sant"].indexOf(i)>=0?"0xE00000":"0x3A0000";var s=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),_=e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC),o=e.valueToCode(this,"PINCS",e.ORDER_ATOMIC),p=e.valueToCode(this,"PINDC",e.ORDER_ATOMIC);return s+" = st7789.ST7789("+_+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+", dc_pin="+p+", cs_pin="+o+", rotation="+this.getFieldValue("rotate")+", font_address="+n+")\n"},WY=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".image("+n+", x="+s+", y="+_+", size="+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".image("+n+", x= "+s+",y="+_+", size="+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},KY=function(t,e){var i="0x"+this.getFieldValue("COLOR").slice(1);return["0x"+((16252928&i)>>8|(64512&i)>>5|(255&i)>>3).toString(16),e.ORDER_ATOMIC]},JY=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==a.slice(0,2))var r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color="+a+")\n";else{const t=a.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},qY=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p=i+".frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},QY=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},zY=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},jY=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"x1",e.ORDER_ATOMIC),s=e.valueToCode(this,"y1",e.ORDER_ATOMIC),_=e.valueToCode(this,"x2",e.ORDER_ATOMIC),o=e.valueToCode(this,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".line("+n+", "+s+", "+_+", "+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".line("+n+", "+s+", "+_+", "+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},$Y=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=this.getFieldValue("key"),_=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return e.definitions_.import_i2clcd="import i2clcd",i+" = i2clcd.LCD("+n+", lcd_width="+s+", i2c_addr="+_+")\n"},ZY=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+",center = "+this.getFieldValue("center")+")\n"},tv=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".print("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},ev=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},iv=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},nv=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC),_=this.getFieldValue("driver"),o=Ct.Boards.getSelectedBoardKey().split(":")[2],p="";return p=["mpython","mixgo_pe","mixgo_nova"].indexOf(o)>=0?"0x700000":["mixgo_sant"].indexOf(o)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+", address="+s+", font_address="+p+", types="+_+")\n"},sv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},_v=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+")\n"},ov=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},pv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},av=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},uv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},rv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},lv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},dv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},Iv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},Tv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},Mv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},hv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=t.getFieldValue("state");return i+"."+t.getFieldValue("shape")+"("+n+", "+s+", "+_+", "+o+", "+p+")\n"+i+".show()\n"},mv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=t.getFieldValue("state");return i+"."+("0"==t.getFieldValue("dir_h_v")?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\n"+i+".show()\n"},Ev=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".line("+e.valueToCode(t,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y2",e.ORDER_ATOMIC)+", "+t.getFieldValue("state")+")\n"+i+".show()\n"},Ov=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("Python ESP32-S3"===Ct.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var s="onboard_tft.image("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff,sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n"}else if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled";s="oled.print("+n+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.shows("+n+")\n"}return s},Rv=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),_=this.getFieldValue("center");if("mixgo_sant"==i||"mixgo_nova"==i)return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+", space="+s+", center="+_+",sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n";if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled"}return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+", space="+s+", center="+_+")\n"},cv=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var s="onboard_oled.frame("+n+")\n"}else if("Python ESP32-S3"===Ct.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";s="onboard_tft.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.frame("+n+")\n"}return s},gv=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var _="onboard_oled.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", delay="+s+")\n"}else if("Python ESP32-S3"===Ct.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";_="onboard_tft.frame("+n+", size=5 , delay="+s+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";_="onboard_matrix.frame("+n+", delay="+s+")\n"}return _},Cv=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else if("Python ESP32-S3"===Ct.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";n="onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},Sv=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var o="onboard_oled.scroll("+n+", speed="+s+", space="+_+")\n"}else if("Python ESP32-S3"===Ct.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";o="onboard_tft.scroll("+n+", y=0, size=5, speed="+s+", space="+_+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";o="onboard_matrix.scroll("+n+", speed="+s+", space="+_+")\n"}return o},Av=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},Lv=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},Nv=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Ct.JSFuncs.getPlatform()){const i=t.getFieldValue("image").split(".");if(2!==i.length)throw Error("pin value error");e.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`;var n=i[1]}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix."+t.getFieldValue("image")}return[n,e.ORDER_ATOMIC]},Dv=function(t,e){var i={"#000000":"0","#ff0000":"1"};function n(t){let e="";if(t.length%2==1&&(t="0"+t),t.length<8){let e=8-t.length;for(let i=1;i<=e;i++)t="0"+t}for(let i=1;i<=t.length;i++)i%2==0&&i!==t.length?e=e+t[i-1]+",0x":e+=t[i-1];return"0x"+e}let s=[];for(let e=0;e<12;e++){let _="",o=0,p=0;for(let n=0;n<32;n++)n<8?p=7-n:n<16?p=23-n:n<24?p=39-n:n<32&&(p=55-n),o+=Number(i[t.getFieldValue(e+"-"+n)])*Math.pow(2,31-p);_+=n(o.toString(16)),s.unshift(_)}let _=[];for(let t=0;t>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},dX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.picture("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"direct",e.ORDER_ASSIGNMENT)+")\n"},IX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=this.getFieldValue("center"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True",r=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==r.slice(0,2))var l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color="+r+",sync="+u+")\n";else{const t=r.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color=0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+",sync="+u+")\n"}return l},TX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},MX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=t.getFieldValue("shape"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+",sync="+u+")\n";else{const t=p.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+",sync="+u+")\n"}return r},hX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("dir_h_v"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},mX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x1",e.ORDER_ATOMIC),s=e.valueToCode(t,"y1",e.ORDER_ATOMIC),_=e.valueToCode(t,"x2",e.ORDER_ATOMIC),o=e.valueToCode(t,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},EX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},OX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),o=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var p="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+",sync="+o+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+",sync="+o+")\n"}return p},RX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==n.slice(0,2))var _="onboard_tft.fill("+n+",sync="+s+")\n";else{const t=n.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_="onboard_tft.fill(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+",sync="+s+")\n"}return _},cX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=o+"=Clock("+n+", "+s+", "+_+", "+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=o+"=Clock("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},gX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},CX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_time("+e.valueToCode(this,"h",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"m",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"s",e.ORDER_ASSIGNMENT)+")\n"},SX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},AX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2))var _=n+".clear("+s+")\n";else{const t=s.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_=n+".clear(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+")\n"}return _},LX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"r",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("shape"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+", "+p+",sync="+a+")\n"}return u},NX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Ct.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n="onboard_tft.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}return n},DX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2));else{const t=s.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)}return"onboard_tft.pointern(angle="+n+")\n"},fX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color="+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},FX=Ov,PX=bv,YX=Xv,vX=bv,XX=Vv,yX=Fv,xX=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},bX=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},VX=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},bG=function(){return"control.reset()\n"},VG=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Ct.Profile.default.serial)+")\n"},BG=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Ct.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Ct.Profile.default.serial)+")\n"},GG=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Ct.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Ct.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},UG=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},wG=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},kG=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},HG=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},WG=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},KG=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},JG=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},qG=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},QG=function(){return"while True:\n pass\n"},zG=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},jG=function(t,e){return e.definitions_.import_os="import os","os.uname()"},$G=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},ZG=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},tU=function(t,e){return e.definitions_.import_mixgo="import mixgo",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period="+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=Timer."+(e.valueToCode(this,"mode",e.ORDER_NONE)||"None")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},eU=function(t,e){return e.definitions_.import_machine="import machine",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period = "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=machine.Timer."+this.getFieldValue("mode")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},iU=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},nU=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},sU=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},_U=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},oU=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},pU=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},aU=nU,uU=eU,rU=iU,lU=$G,dU=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},IU=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},TU=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api.weather_hourly("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"hour",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},MU=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")\n"},hU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_now.analysis()";else n='Weather_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},mU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Air_now.analysis()";else n='Air_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},EU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_alarm.analysis()";else n='Weather_alarm.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},OU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Life_suggestion.analysis()";else n='Life_suggestion.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},RU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Tide_daily.analysis()";else n='Tide_daily.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},cU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Location_search.analysis()";else n='Location_search.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},gU=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")\n"},CU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Weather_daily.analysis("+n+")";else s="Weather_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},SU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Air_daily.analysis("+n+")";else s="Air_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},AU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_sun.analysis("+n+")";else s="Geo_sun.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},LU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_moon.analysis("+n+")";else s="Geo_moon.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},NU=new gt.Generator("Python");NU.INDENT=" ",NU.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),NU.ORDER_ATOMIC=0,NU.ORDER_COLLECTION=1,NU.ORDER_STRING_CONVERSION=1,NU.ORDER_UNARY_POSTFIX=1,NU.ORDER_UNARY_PREFIX=2,NU.ORDER_MEMBER=2.1,NU.ORDER_FUNCTION_CALL=2.2,NU.ORDER_EXPONENTIATION=3,NU.ORDER_UNARY_SIGN=4,NU.ORDER_BITWISE_NOT=4,NU.ORDER_MULTIPLICATIVE=5,NU.ORDER_ADDITIVE=6,NU.ORDER_BITWISE_SHIFT=7,NU.ORDER_BITWISE_AND=8,NU.ORDER_BITWISE_XOR=9,NU.ORDER_BITWISE_OR=10,NU.ORDER_RELATIONAL=11,NU.ORDER_EQUALITY=11,NU.ORDER_LOGICAL_NOT=12,NU.ORDER_LOGICAL_AND=13,NU.ORDER_LOGICAL_OR=14,NU.ORDER_ASSIGNMENT=14,NU.ORDER_CONDITIONAL=15,NU.ORDER_LAMBDA=16,NU.ORDER_NONE=99,NU.ORDER_OVERRIDES=[[NU.ORDER_FUNCTION_CALL,NU.ORDER_MEMBER],[NU.ORDER_FUNCTION_CALL,NU.ORDER_FUNCTION_CALL],[NU.ORDER_MEMBER,NU.ORDER_MEMBER],[NU.ORDER_MEMBER,NU.ORDER_FUNCTION_CALL]],NU.init=function(){NU.PASS=this.INDENT+"pass\n",NU.definitions_=Object.create(null),NU.functionNames_=Object.create(null),NU.setups_=Object.create(null),NU.loops_=Object.create(null),NU.codeEnd_=Object.create(null),NU.variableDB_?NU.variableDB_.reset():NU.variableDB_=new Nt(NU.RESERVED_WORDS_)},NU.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var _=this.definitions_[s];0===s.indexOf("import")?e.push(_):0===s.indexOf("var_declare")?i.push(_):n.push(_)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var o=[];for(var s in NU.functions_)o.push(NU.functions_[s]);o.length&&o.push("\n");var p=[];for(var s in NU.setups_)p.push(NU.setups_[s]);p.length&&p.push("\n");var a=[];for(var s in NU.loops_)a.push(NU.loops_[s]);var u=[];for(var s in NU.codeEnd_)u.push(NU.codeEnd_[s]);0!==u.length&&u.push("\n");let r="";return r=a.length>0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n"),r},NU.scrubNakedValue=function(t){return t+"\n"},NU.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},NU.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},NU.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=gt.utils.string.wrap(_,NU.COMMENT_WRAP-3),n+=NU.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const DU={};DU["MixGo MINI"]={description:"MicroPython[ESP32C3 MixGo MINI]",digital_pin:Ct.Profile.generate(["0-10","18"]),input_pin:Ct.Profile.generate(["0-10","18"]),output_pin:Ct.Profile.generate(["0-10","18"]),pwm_input:Ct.Profile.generate(["0-10","18"],"pwm","pwm"),analog_input:Ct.Profile.generate(["0-4"],"adc","adc"),pwm_output:Ct.Profile.generate(["0-10","18"],"pwm","pwm"),analog_output:Ct.Profile.generate(["0-4"],"adc","adc"),espnow_channel:Ct.Profile.generate(["1-13"]),haskylens_model:Ct.Profile.generate(["0-4"]),digital:Ct.Profile.generate(["0-10","18"],"pin","pin"),pwm_pin:Ct.Profile.generate(["0-10","18"]),pwm:Ct.Profile.generate(["0-10","18"],"pwm","pwm"),analog_pin:Ct.Profile.generate(["0-4"]),analog:Ct.Profile.generate(["0-4"],"adc","adc"),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Ct.Profile.generate(["0-4"]),exlcdh:Ct.Profile.generate(["0-11"]),exlcdv:Ct.Profile.generate(["0-7"]),brightness:Ct.Profile.generate(["0-9"]),tts_voice:Ct.Profile.generate(["0-16"]),tts_builtin_music:Ct.Profile.generate(["0-47"]),tts_bgmusic:Ct.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["ANGRY","onboard_matrix.ANGRY"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["DOOR_OPEN","onboard_matrix.DOOR_OPEN"],["DOOR_OPENING","onboard_matrix.DOOR_OPENING"],["DOOR_CLOSE","onboard_matrix.DOOR_CLOSE"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["BIRTHDAY","onboard_music.BIRTHDAY"],["BA_DING","onboard_music.BA_DING"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},DU["ESP32C2 Generic(2M)"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:Ct.Profile.generate(["0-11","18-21"]),input_pin:Ct.Profile.generate(["0-11","18-21"]),output_pin:Ct.Profile.generate(["0-11","18-21"]),pwm_input:Ct.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_input:Ct.Profile.generate(["0-5"],"adc","adc"),pwm_output:Ct.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_output:Ct.Profile.generate(["0-5"],"adc","adc"),espnow_channel:Ct.Profile.generate(["1-13"]),haskylens_model:Ct.Profile.generate(["0-4"]),digital:Ct.Profile.generate(["0-11","18-21"],"pin","pin"),pwm_pin:Ct.Profile.generate(["0-11","18-21"]),pwm:Ct.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_pin:Ct.Profile.generate(["0-5"]),analog:Ct.Profile.generate(["0-5"],"adc","adc"),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Ct.Profile.generate(["0-4"]),exlcdh:Ct.Profile.generate(["0-31"]),exlcdv:Ct.Profile.generate(["0-11"]),brightness:Ct.Profile.generate(["0-9"]),tts_voice:Ct.Profile.generate(["0-16"]),tts_builtin_music:Ct.Profile.generate(["0-47"]),tts_bgmusic:Ct.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]};const fU=DU,FU=20,PU={init:function(){this.setColour(FU),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_HIGH,"HIGH"],[gt.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},YU={init:function(){this.setColour(FU),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(gt.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},vU={init:function(){this.setColour(FU),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(gt.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},XU={init:function(){this.setColour(FU),this.appendValueInput("PIN",Number).appendField("DAC"+gt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(gt.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_TOOLTIP)}},yU={init:function(){this.setColour(FU),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_JS_PERIOD_MIL).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_mSecond,"period"],[gt.Msg.MIXLY_uSecond,"period_microseconds"]]),"key"),this.appendValueInput("NUM",Number).appendField(gt.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_SET_TOOLTIP)}},xU={init:function(){this.setColour(FU),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_REF_VOLTAGE+gt.Msg.MIXLY_STAT).appendField(new gt.FieldDropdown([["3.3V","machine.ADC.ATTN_11DB"],["2.2V","machine.ADC.ATTN_6DB"],["1.5V","machine.ADC.ATTN_2_5DB"],["1.2V","machine.ADC.ATTN_0DB"]]),"atten"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_ANALOG_ATTEN_TOOLTIP)}},bU={init:function(){this.setColour(FU),this.appendValueInput("pin").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(gt.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_TOOLTIP)}},VU={init:function(){this.setColour(20),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_ATTACHINTERRUPT_PIN).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[gt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[gt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},BU={init:function(){this.setColour(20),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETUP).appendField(new gt.FieldTextInput("pin#"),"PIN_OBJ"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROPYTHON_AS).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_Digital_PINMODEOUT,"machine.Pin.OUT"],[gt.Msg.MIXLY_Digital_PINMODEIN,"machine.Pin.IN"],[gt.Msg.MIXLY_PINMODEPULLUP,"machine.Pin.IN, machine.Pin.PULL_UP"],[gt.Msg.MIXLY_PINMODEPULLDOWN,"machine.Pin.IN, machine.Pin.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)},getVars:function(){return["pin#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},GU={init:function(){this.setColour(FU),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SETUP).appendField(new gt.FieldTextInput("dac#"),"PIN_OBJ").appendField(gt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("DAC"+gt.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_INIT_TOOLTIP)},getVars:function(){return["dac#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},UU={init:function(){this.setColour(FU),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SETUP).appendField(new gt.FieldTextInput("tc#"),"PIN_OBJ").appendField(gt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_INIT_TOOLTIP)},getVars:function(){return["tc#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},wU={init:function(){this.setColour(FU),this.appendValueInput("PIN",Number).appendField("PWM"+gt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(gt.Msg.MIXLY_FREQUENCY+gt.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_SET_FREQ_TOOLTIP)}},kU=BU,HU=UU,WU=bU,KU=VU,JU=40,qU={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(JU),this.appendDummyInput("").appendField(t).appendField(gt.Msg.MIXLY_TEM_HUM+" AHT21").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[gt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key");return{temperature:gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[t]}))}},QU={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(JU),this.appendDummyInput("").appendField(t).appendField(gt.Msg.MIXLY_Altitude+gt.Msg.MSG.catSensor+" HP203X").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETPRESSURE,"pressure()"],[gt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[gt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},zU={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(JU),this.appendDummyInput().appendField(t).appendField(gt.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM),this.setOutput(!0,Number),this.setInputsInline(!0)}},jU={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(JU),this.appendDummyInput().appendField(t).appendField("RFID"+gt.Msg.MIXLY_RFID_READ_CARD),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RFID_READ_CARD_UID),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,Number),this.setInputsInline(!0),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},$U={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(JU),this.appendDummyInput().appendField(t).appendField("RFID"+gt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SECTOR").appendField(gt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,Number),this.setInputsInline(!0),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},ZU={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(JU),this.appendDummyInput().appendField(t).appendField(gt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(gt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(gt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},tw={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(JU),this.appendDummyInput().appendField(t).appendField(gt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(gt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(gt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(gt.Msg.RETURN_SUCCESS_OR_NOT),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setInputsInline(!0),this.setOutput(!0),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},ew={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(JU),this.appendDummyInput().appendField(t).appendField("RFID"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_RFID_SCAN_OK,"True"],[gt.Msg.MIXLY_RFID_SCAN_NOTAGERR,"None"],[gt.Msg.MIXLY_RFID_SCAN_ERROR,"False"]]),"key"),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,Number),this.setInputsInline(!0),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},iw=100,nw={init:function(){this.setColour(iw),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXGO_LEFT_FRONT+gt.Msg.COLOUR_RGB_GREEN+gt.Msg.MIXLY_EXTERN_LED,"GLED[0]"],[gt.Msg.MIXGO_RIGHT_FRONT+gt.Msg.COLOUR_RGB_GREEN+gt.Msg.MIXLY_EXTERN_LED,"GLED[1]"],[gt.Msg.MIXGO_LEFT_BACK+gt.Msg.COLOUR_RGB_GREEN+gt.Msg.MIXLY_EXTERN_LED,"GLED[3]"],[gt.Msg.MIXGO_RIGHT_BACK+gt.Msg.COLOUR_RGB_GREEN+gt.Msg.MIXLY_EXTERN_LED,"GLED[2]"],[gt.Msg.MIXGO_LEFT_FRONT+gt.Msg.COLOUR_RGB_RED+gt.Msg.MIXLY_EXTERN_LED,"RLED[0]"],[gt.Msg.MIXGO_RIGHT_FRONT+gt.Msg.COLOUR_RGB_RED+gt.Msg.MIXLY_EXTERN_LED,"RLED[1]"],[gt.Msg.MIXGO_LEFT_BACK+gt.Msg.COLOUR_RGB_RED+gt.Msg.MIXLY_EXTERN_LED,"RLED[3]"],[gt.Msg.MIXGO_RIGHT_BACK+gt.Msg.COLOUR_RGB_RED+gt.Msg.MIXLY_EXTERN_LED,"RLED[2]"],[gt.Msg.ME_GO_LIGHT_HEADLIGHT,"WLED"]]),"op"),this.setOutput(!0)}},sw={init:function(){this.setColour(iw),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField("ME GO"),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_SETONOFF)}},_w={init:function(){this.setColour(iw),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField("ME GO"),this.appendDummyInput().appendField(gt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},ow={init:function(){this.setColour(iw),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField("ME GO"),this.appendDummyInput().appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},pw={init:function(){this.setColour(iw),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField("ME GO"),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_SETTING+gt.Msg.MIXLY_BUILDIN_LED+gt.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},aw={init:function(){this.setColour(iw),this.appendDummyInput().appendField("ME GO").appendField(new gt.FieldDropdown([[gt.Msg.blockpy_forward,"F"],[gt.Msg.blockpy_backward,"B"],[gt.Msg.blockpy_left,"L"],[gt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},uw={init:function(){this.setColour(iw),this.appendDummyInput().appendField("ME GO").appendField(new gt.FieldDropdown([[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},rw={init:function(){this.setColour(iw),this.appendDummyInput().appendField("ME GO").appendField(gt.Msg.MOTOR_DC).appendField(new gt.FieldDropdown([[gt.Msg.MIXLYCAR_WHEEL_LEFT,"0"],[gt.Msg.MIXLYCAR_WHEEL_RIGHT,"1"],[gt.Msg.ME_GO_MOTOR_EXTERN,"2"]]),"wheel"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Direction).appendField(new gt.FieldDropdown([[gt.Msg.ROTATION_FORWARD,"CW"],[gt.Msg.ROTATION_BACKWARD,"CCW"],[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},lw={init:function(){this.setColour(iw),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_INTERRUPT).appendField(gt.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"A"],[gt.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendValueInput("DO").appendField(gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},dw={init:function(){this.setColour(iw),this.appendDummyInput("").appendField(gt.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"A"],[gt.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SETUP),this.appendDummyInput("").appendField(new gt.FieldDropdown([["turns","turns"],["distance","distance"],["turns,distance","all"]]),"args"),this.appendValueInput("num").setCheck(Number),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Iw={init:function(){this.setColour(iw),this.appendDummyInput("").appendField(gt.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"A"],[gt.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("").appendField(new gt.FieldDropdown([["turns","turns"],["distance","distance"],["speed","speed"]]),"args"),this.setOutput(!0),this.setInputsInline(!0)}},Tw={init:function(){this.setColour(iw),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"[0]"],[gt.Msg.MIXGO_LEFT_MID,"[1]"],[gt.Msg.MIXGO_RIGHT_MID,"[2]"],[gt.Msg.TEXT_TRIM_RIGHT,"[3]"],[gt.Msg.MIXLY_ALL,""]]),"key").appendField(gt.Msg.MIXGO_LINE_SENSOR_VAL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return gt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+gt.Msg.MIXLY_ESP32_NEAR}))}},Mw={init:function(){this.setColour(iw),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXGO_LEFT_FRONT,"[0]"],[gt.Msg.MIXGO_RIGHT_FRONT,"[1]"],[gt.Msg.MIXGO_LEFT_BACK,"[3]"],[gt.Msg.MIXGO_RIGHT_BACK,"[2]"],[gt.Msg.MIXLY_ALL,""]]),"key").appendField(gt.Msg.MIXGO_PROXIMITY_SENSOR),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return gt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+gt.Msg.MIXLY_ESP32_NEAR}))}},hw={init:function(){this.setColour(iw),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXGO_CAR_SENSOR_ONBOARD_CHANGE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_ME_GO_CAR_SENSOR_ONBOARD_AUTO_CHANGE,"AS"],[gt.Msg.MIXLY_MIXGO_CAR_USE_LINE_ONLY,"LP"],[gt.Msg.MIXLY_MIXGO_CAR_USE_PROXIMITY_ONLY,"OA"],[gt.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_ONLY,"LS"],[gt.Msg.ME_GO_SENSOR_MODE_OFF,"CL"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},mw={init:function(){this.setColour(iw),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GET_GESTURE).appendField(new gt.FieldDropdown([[gt.Msg.ME_GO_PITCH,"[0]"],[gt.Msg.ME_GO_ROLL,"[1]"],[gt.Msg.ME_GO_PITCH+", "+gt.Msg.ME_GO_ROLL,""]]),"angle"),this.appendDummyInput(""),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ew={init:function(){this.setColour(iw),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"[0]"],[gt.Msg.MIXGO_LEFT_MID,"[1]"],[gt.Msg.MIXGO_RIGHT_MID,"[2]"],[gt.Msg.TEXT_TRIM_RIGHT,"[3]"],[gt.Msg.MIXLY_ALL,""]]),"key").appendField(gt.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_SENSOR),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return gt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+gt.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_SENSOR}))}},Ow=230,Rw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.digital),"PIN"),this.setOutput(!0)}},cw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},gw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},Cw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},Sw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},Aw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},Lw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},Nw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},Dw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},fw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},Fw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},Pw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},Yw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},vw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},Xw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},yw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},xw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.analog),"PIN"),this.setOutput(!0)}},bw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},Vw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.dac),"PIN"),this.setOutput(!0)}},Bw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},Gw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},Uw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},ww={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.pwm),"PIN"),this.setOutput(!0)}},kw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},Hw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},Ww={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.touch),"PIN"),this.setOutput(!0)}},Kw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},Jw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},qw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},Qw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.imglist),"PIN"),this.setOutput(!0)}},zw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.playlist),"PIN"),this.setOutput(!0)}},jw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},$w={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},Zw={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},tk={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},ek={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},ik={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},nk={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},sk={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},_k={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},ok={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},pk={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},ak={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.one_more),"PIN"),this.setOutput(!0)}},uk={init:function(){this.setColour(Ow),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},rk=function(t,e){const i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),s=e.valueToCode(this,"LEDCOUNT",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ws2812x_NeoPixel="from ws2812x import NeoPixel";return`${i} = NeoPixel(machine.Pin(${n}), ${s})\n`},lk=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},dk=function(t,e){e.definitions_.import_machine="import machine";var i="";return i+=e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value("+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},Ik=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},Tk=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".write("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},Mk=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=e.valueToCode(this,"NUM",e.ORDER_ATOMIC);return i+".set_analog_"+this.getFieldValue("key")+"("+n+")\n"},hk=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},mk=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=this.getFieldValue("mode");return"machine.Pin("+i+").irq(handler = "+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+", trigger = "+n+")\n"},Ek=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"pin#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),s=this.getFieldValue("MODE");return("pin#"==i?"pin"+n:e.variableDB_.getName(i,gt.Variables.NAME_TYPE))+" = machine.Pin("+n+", "+s+")\n"},Ok=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"dac#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("dac#"==i?"dac"+n:e.variableDB_.getName(i,gt.Variables.NAME_TYPE))+" = machine.DAC(machine.Pin("+n+"))\n"},Rk=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},ck=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"tc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("tc#"==i?"tc"+n:e.variableDB_.getName(i,gt.Variables.NAME_TYPE))+" = machine.TouchPad(machine.Pin("+n+"))\n"},gk=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mini_g2="import mini_g2",["mini_g2.ext_ahtx0."+i+"()",e.ORDER_ATOMIC]},Ck=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mini_g2="import mini_g2",["mini_g2.ext_hp203x."+i,e.ORDER_ATOMIC]},Sk=function(t,e){e.definitions_.import_mini_g2="import mini_g2";return["mini_g2.varistor()",e.ORDER_ATOMIC]},Ak=function(t,e){e.definitions_.import_mini_g2="import mini_g2";var i=Ct.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var n='ext_rfid.read_card(0, x="id")'}else{e.definitions_["import_"+i+"_onboard_rfid"]="from "+i+" import onboard_rfid";n='onboard_rfid.read_card(0, x="id")'}return[n,e.ORDER_ATOMIC]},Lk=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC);if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var s="ext_rfid.read_card("+n+")"}else{e.definitions_["import_"+i+"_onboard_rfid"]="from "+i+" import onboard_rfid";s="onboard_rfid.read_card("+n+', x="content")'}return[s,e.ORDER_ATOMIC]},Nk=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),s=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC);if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var _="ext_rfid.write_card("+s+","+n+")\n"}else{e.definitions_["import_"+i+"_onboard_rfid"]="from "+i+" import onboard_rfid";_="onboard_rfid.write_card("+s+", "+n+")\n"}return _},Dk=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),s=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC);if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var _="ext_rfid.write_card("+s+","+n+")"}else{e.definitions_["import_"+i+"_onboard_rfid"]="from "+i+" import onboard_rfid";_="onboard_rfid.write_card("+s+", "+n+")"}return[_,e.ORDER_ATOMIC]},fk=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("key");if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var s="ext_rfid.scan_card()=="+n}else{e.definitions_["import_"+i+"_onboard_rfid"]="from "+i+" import onboard_rfid";s="onboard_rfid.scan_card()=="+n}return[s,e.ORDER_ATOMIC]},Fk=function(t,e){return e.definitions_.import_me_go_car="from me_go import car",["car."+this.getFieldValue("op"),e.ORDER_ATOMIC]},Pk=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car","car.setonoff("+i+","+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},Yk=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car",["car.getrightness("+i+")",e.ORDER_ATOMIC]},vk=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car",["car.getonoff("+i+")",e.ORDER_ATOMIC]},Xk=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car","car.setbrightness("+i+","+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},yk=function(t,e){var i=this.getFieldValue("VAR");return e.definitions_.import_me_go_car="from me_go import car",'car.move("'+i+'",'+e.valueToCode(this,"speed",e.ORDER_ASSIGNMENT)+")\n"},xk=function(t,e){var i=this.getFieldValue("VAR");return e.definitions_.import_me_go_car="from me_go import car",'car.move("'+i+'")\n'},bk=function(t,e){var i=this.getFieldValue("wheel");e.definitions_.import_me_go_car="from me_go import car";var n=this.getFieldValue("direction");return 0==i&&("CW"==n?n="CCW":"CCW"==n&&(n="CW")),"car.motor(car.MOTO["+i+'],"'+n+'",'+e.valueToCode(this,"speed",e.ORDER_ATOMIC)+")\n"},Vk=function(t,e){var i=this.getFieldValue("mode");return e.definitions_["import_me_go_hall_"+i]="from me_go import hall_"+i,"hall_"+i+".irq_cb("+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+")\n"},Bk=function(t,e){var i=this.getFieldValue("mode"),n=this.getFieldValue("args");e.definitions_["import_me_go_hall_"+i]="from me_go import hall_"+i;var s=e.valueToCode(this,"num",e.ORDER_ATOMIC);return"all"==n?"hall_"+i+".initial(turns="+s+",distance="+s+")\n":"hall_"+i+".initial("+n+"="+s+")\n"},Gk=function(t,e){var i=this.getFieldValue("mode"),n=this.getFieldValue("args");return e.definitions_["import_me_go_hall_"+i]="from me_go import hall_"+i,["hall_"+i+"."+n,e.ORDER_ATOMIC]},Uk=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car",["car.patrol()"+i,e.ORDER_ATOMIC]},wk=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car",["car.obstacle()"+i,e.ORDER_ATOMIC]},kk=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car","car.ir_mode(car."+i+")\n"},Hk=function(t,e){return e.definitions_.import_mixgo_me_onboard_mxc6655xa="from mixgo_me import onboard_mxc6655xa",["onboard_mxc6655xa.eulerangles(upright=True)"+this.getFieldValue("angle"),e.ORDER_ATOMIC]},Wk=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car",["car.light()"+i,e.ORDER_ATOMIC]},Kk=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},Jk=Kk,qk=Kk,Qk=Kk,zk=Kk,jk=Kk,$k=Kk,Zk=Kk,tH=Kk,eH=Kk,iH=Kk,nH=Kk,sH=Kk,_H=Kk,oH=Kk,pH=Kk,aH=Kk,uH=Kk,rH=Kk,lH=Kk,dH=Kk,IH=Kk,TH=Kk,MH=Kk,hH=Kk,mH=Kk,EH=Kk,OH=Kk,RH=Kk,cH=Kk,gH=Kk,CH=Kk,SH=Kk,AH=Kk,LH=Kk,NH=Kk,DH=Kk,fH=Kk,FH=Kk,PH=Kk,YH=Kk,vH=Kk,XH=Kk,yH=Kk,xH=Kk;Object.assign(gt.Variables,At),Object.assign(gt.Procedures,bu),gt.Python=Vu,gt.generator=Vu,Ct.Profile.default={},Object.assign(Ct.Profile,fU),Object.assign(Ct.Profile.default,fU["MixGo CC"]),Object.assign(gt.Blocks,e,i,n,s,_,o,p,a,u,r,l,d,I,B,W,H,y,G,K,f,P,k,w,U,F,D,N,b,x,V,Y,v,X,It,Tt,Mt,ht),Object.assign(gt.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,_t,lt,rt,et,ot,dt,Q,z,ut,at,pt,j,q,J,nt,it,st,$,Z,tt,mt,Et,Ot,Rt,ct)})(); \ No newline at end of file diff --git a/boards/default/micropython_esp32c2/main.bundle.e4ff63c1.js b/boards/default/micropython_esp32c2/main.bundle.e4ff63c1.js deleted file mode 100644 index 38a87c8a..00000000 --- a/boards/default/micropython_esp32c2/main.bundle.e4ff63c1.js +++ /dev/null @@ -1,21 +0,0 @@ -(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>vt,controls_typeLists:()=>Xt,lists_zip:()=>yt,lists_zip_container:()=>xt,lists_zip_item:()=>bt,unpack_iterable_object:()=>Vt,variables_change:()=>Pt,variables_get:()=>ft,variables_global:()=>Yt,variables_set:()=>Ft});var i={};t.r(i),t.d(i,{base_setup:()=>Ut,controls_delay:()=>wt,controls_end_program:()=>kt,controls_except:()=>ie,controls_finally:()=>ne,controls_flow_statements:()=>Qt,controls_for:()=>zt,controls_forEach:()=>Kt,controls_for_range:()=>jt,controls_if:()=>Ht,controls_if_else:()=>te,controls_if_elseif:()=>Zt,controls_if_if:()=>$t,controls_lambda:()=>_e,controls_main:()=>Gt,controls_pass:()=>oe,controls_range:()=>Wt,controls_repeat_ext:()=>se,controls_thread:()=>pe,controls_try:()=>ee,controls_try_finally:()=>qt,controls_whileUntil:()=>Jt,datetime_fromtimestamp:()=>Ie,do_while:()=>ae,garbage_collection:()=>ue,gene_unique_identifier:()=>Te,get_mem_alloc:()=>re,get_mem_free:()=>le,get_unique_identifier:()=>de});var n={};t.r(n),t.d(n,{base_map:()=>ye,generate_cartesian_product:()=>be,math_arithmetic:()=>Oe,math_bit:()=>ce,math_constant:()=>me,math_constant_mp:()=>Ee,math_constrain:()=>De,math_dec:()=>Ce,math_degree_to_radian:()=>Be,math_indexer_number:()=>Fe,math_map:()=>fe,math_max_min:()=>Ae,math_number:()=>he,math_number_base_conversion:()=>Le,math_radian_to_degree:()=>Ve,math_random:()=>Ne,math_random_seed:()=>Pe,math_round:()=>Ye,math_selfcalcu:()=>Re,math_to_int:()=>Se,math_trig:()=>ge,text_to_number:()=>ve,text_to_number_skulpt:()=>Xe,turn_to_int:()=>xe});var s={};t.r(s),t.d(s,{ascii_to_char:()=>We,char_to_ascii:()=>Ke,number_to_text:()=>Je,os_system:()=>Ei,text:()=>Ue,text_capital:()=>ii,text_center:()=>ni,text_char:()=>ke,text_char_at:()=>ze,text_char_at2:()=>Qe,text_char_at3:()=>Ti,text_compareTo:()=>Ii,text_compare_to:()=>ei,text_create_with_container:()=>ri,text_create_with_item:()=>li,text_encode:()=>hi,text_equals_starts_ends:()=>ti,text_eval:()=>mi,text_find:()=>si,text_format:()=>ui,text_format_noreturn:()=>Mi,text_join:()=>He,text_join_seq:()=>_i,text_length:()=>qe,text_random_char:()=>je,text_replace:()=>oi,text_split:()=>pi,text_strip:()=>ai,text_substring:()=>Ze,text_substring2:()=>$e,text_substring3:()=>di,text_textarea:()=>we});var _={};t.r(_),t.d(_,{ENUMERATE:()=>tn,content_in_lists:()=>nn,enumerate:()=>en,list_many_input:()=>Ui,list_tolist:()=>Wi,list_tolist2:()=>Zi,list_trig:()=>Vi,lists_2d_get_col_row_data:()=>Ci,lists_2d_get_data_with_col_row:()=>gi,lists_append_extend:()=>fi,lists_change_to:()=>Gi,lists_change_to_general:()=>ki,lists_clear:()=>Xi,lists_create_with:()=>Si,lists_create_with2:()=>Ki,lists_create_with_container:()=>Li,lists_create_with_item:()=>Ni,lists_create_with_noreturn:()=>wi,lists_create_with_text:()=>Ai,lists_create_with_text2:()=>Ji,lists_del_general:()=>Hi,lists_find:()=>bi,lists_getIndex3:()=>qi,lists_getSublist3:()=>Qi,lists_get_index:()=>Ri,lists_get_random_item:()=>Fi,lists_get_random_sublist:()=>Pi,lists_get_sublist:()=>ci,lists_insert_value:()=>Yi,lists_insert_value2:()=>ji,lists_pop:()=>xi,lists_remove_at:()=>yi,lists_remove_at2:()=>$i,lists_reverse:()=>vi,lists_setIndex3:()=>zi,lists_set_index:()=>Di,lists_sort:()=>Bi});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>On,dicts_add_or_change:()=>ln,dicts_clear:()=>Tn,dicts_create_with:()=>_n,dicts_create_with_container:()=>on,dicts_create_with_item:()=>pn,dicts_create_with_noreturn:()=>gn,dicts_deldict:()=>En,dicts_delete:()=>dn,dicts_get:()=>un,dicts_get_default:()=>rn,dicts_items:()=>Mn,dicts_keys:()=>an,dicts_length:()=>mn,dicts_pop:()=>Rn,dicts_setdefault:()=>cn,dicts_to_json:()=>Sn,dicts_to_json2:()=>Nn,dicts_to_to:()=>Ln,dicts_todict:()=>Cn,dicts_update:()=>In,dicts_values:()=>hn,json_to_dicts:()=>An});var p={};t.r(p),t.d(p,{logic_boolean:()=>vn,logic_compare:()=>fn,logic_compare_continous:()=>Fn,logic_is:()=>bn,logic_is_in:()=>xn,logic_negate:()=>Yn,logic_null:()=>Xn,logic_operation:()=>Pn,logic_tobool:()=>Vn,logic_true_or_false:()=>yn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>ps,sdcard_use_spi_init:()=>os,storage_can_write_ornot:()=>Jn,storage_change_dir:()=>ss,storage_close_file:()=>Qn,storage_delete_file:()=>jn,storage_file_seek:()=>ts,storage_file_tell:()=>Zn,storage_file_write:()=>kn,storage_fileopen:()=>Gn,storage_fileopen_new:()=>Un,storage_fileopen_new_encoding:()=>wn,storage_get_a_line:()=>Kn,storage_get_contents:()=>Wn,storage_get_contents_without_para:()=>Hn,storage_get_current_dir:()=>es,storage_get_file_size:()=>$n,storage_get_filename:()=>qn,storage_is_file:()=>_s,storage_list_all_files:()=>zn,storage_make_dir:()=>is,storage_open_file_with_os:()=>Bn,storage_rename:()=>ns});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>ds,procedures_callreturn:()=>Is,procedures_defnoreturn:()=>as,procedures_defreturn:()=>us,procedures_ifreturn:()=>Ts,procedures_mutatorarg:()=>ls,procedures_mutatorcontainer:()=>rs,procedures_return:()=>Ms});var r={};t.r(r),t.d(r,{tuple_change_to:()=>Ns,tuple_create_with:()=>ms,tuple_create_with_container:()=>Es,tuple_create_with_item:()=>Os,tuple_create_with_noreturn:()=>Ps,tuple_create_with_text2:()=>Rs,tuple_create_with_text_return:()=>cs,tuple_del:()=>Ss,tuple_find:()=>Ds,tuple_getIndex:()=>gs,tuple_getSublist:()=>Fs,tuple_get_random_item:()=>vs,tuple_get_sublist:()=>Ys,tuple_input:()=>ys,tuple_join:()=>As,tuple_length:()=>Cs,tuple_max:()=>Ls,tuple_totuple:()=>Xs,tuple_trig:()=>fs});var l={};t.r(l),t.d(l,{set_add_discard:()=>Ws,set_clear:()=>ws,set_create_with:()=>bs,set_create_with_container:()=>Vs,set_create_with_item:()=>Bs,set_create_with_text_return:()=>qs,set_length:()=>Gs,set_operate:()=>ks,set_operate_update:()=>Hs,set_pop:()=>Us,set_sub:()=>Ks,set_toset:()=>Qs,set_update:()=>Js});var d={};t.r(d),t.d(d,{html_content:()=>t_,html_content_more:()=>e_,html_document:()=>js,html_form:()=>n_,html_head_body:()=>Zs,html_style:()=>i_,html_style_color:()=>__,html_style_content:()=>s_,html_text:()=>o_,html_title:()=>$s});var I={};t.r(I),t.d(I,{attribute_access:()=>R_,function_call:()=>m_,function_call_container:()=>E_,function_call_item:()=>O_,raw_block:()=>u_,raw_empty:()=>l_,raw_expression:()=>r_,raw_table:()=>a_,text_comment:()=>d_,text_print_multiple:()=>T_,text_print_multiple_container:()=>M_,text_print_multiple_item:()=>h_,type_check:()=>I_});var T={};t.r(T),t.d(T,{controls_type:()=>A_,controls_typeLists:()=>L_,lists_zip:()=>N_,unpack_iterable_object:()=>D_,variables_change:()=>C_,variables_get:()=>c_,variables_global:()=>S_,variables_set:()=>g_});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>V_,base_setup:()=>F_,controls_delay:()=>b_,controls_flow_statements:()=>x_,controls_for:()=>v_,controls_forEach:()=>k_,controls_for_range:()=>X_,controls_if:()=>P_,controls_interrupts:()=>U_,controls_lambda:()=>W_,controls_main:()=>f_,controls_millis:()=>B_,controls_nointerrupts:()=>w_,controls_pass:()=>J_,controls_range:()=>H_,controls_repeat:()=>eo,controls_repeat_ext:()=>z_,controls_thread:()=>q_,controls_try_finally:()=>Y_,controls_whileUntil:()=>y_,datetime_fromtimestamp:()=>io,do_while:()=>Q_,garbage_collection:()=>j_,gene_unique_identifier:()=>no,get_mem_alloc:()=>$_,get_mem_free:()=>Z_,get_unique_identifier:()=>to,reset:()=>G_,time_sleep:()=>K_});var h={};t.r(h),t.d(h,{base_map:()=>Ao,generate_cartesian_product:()=>No,math_arithmetic:()=>ao,math_bit:()=>po,math_constant:()=>_o,math_constant_mp:()=>oo,math_constrain:()=>Eo,math_dec:()=>Io,math_degree_to_radian:()=>fo,math_indexer_number:()=>co,math_map:()=>mo,math_max_min:()=>Mo,math_number:()=>so,math_number_base_conversion:()=>Oo,math_radian_to_degree:()=>Do,math_random:()=>ho,math_random_seed:()=>Ro,math_round:()=>go,math_selfcalcu:()=>uo,math_single:()=>ro,math_to_int:()=>To,math_trig:()=>lo,text_to_number:()=>Co,text_to_number_skulpt:()=>So,turn_to_int:()=>Lo});var m={};t.r(m),t.d(m,{ascii_to_char:()=>Xo,char_to_ascii:()=>yo,number_to_text:()=>xo,os_system:()=>_p,text:()=>Fo,text_capital:()=>Wo,text_center:()=>Ko,text_char:()=>Yo,text_char_at:()=>Bo,text_char_at2:()=>Vo,text_char_at3:()=>ip,text_compareTo:()=>ep,text_compare_to:()=>wo,text_encode:()=>np,text_equals_starts_ends:()=>Uo,text_eval:()=>sp,text_find:()=>Jo,text_format:()=>$o,text_format_noreturn:()=>Zo,text_join:()=>vo,text_join_seq:()=>qo,text_length:()=>bo,text_random_char:()=>Go,text_replace:()=>Qo,text_split:()=>zo,text_strip:()=>jo,text_substring:()=>Ho,text_substring2:()=>ko,text_substring3:()=>tp,text_textarea:()=>Po});var E={};t.r(E),t.d(E,{content_in_lists:()=>Bp,enumerate:()=>Vp,list_many_input:()=>Ap,list_tolist:()=>xp,list_tolist2:()=>bp,list_trig:()=>gp,lists_2d_get_col_row_data:()=>ap,lists_2d_get_data_with_col_row:()=>pp,lists_append_extend:()=>Ip,lists_change_to:()=>Sp,lists_change_to_general:()=>Np,lists_clear:()=>Ep,lists_create_with:()=>up,lists_create_with2:()=>fp,lists_create_with_noreturn:()=>Lp,lists_create_with_text:()=>rp,lists_create_with_text2:()=>Fp,lists_del_general:()=>Dp,lists_find:()=>Op,lists_getIndex3:()=>Pp,lists_getSublist3:()=>Yp,lists_get_index:()=>lp,lists_get_random_item:()=>Tp,lists_get_random_sublist:()=>Mp,lists_get_sublist:()=>op,lists_insert_value:()=>hp,lists_insert_value2:()=>Xp,lists_pop:()=>cp,lists_remove_at:()=>Rp,lists_remove_at2:()=>yp,lists_reverse:()=>mp,lists_setIndex3:()=>vp,lists_set_index:()=>dp,lists_sort:()=>Cp});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>$p,dicts_add_or_change:()=>Hp,dicts_clear:()=>Jp,dicts_create_with:()=>Gp,dicts_create_with_noreturn:()=>ea,dicts_deldict:()=>jp,dicts_delete:()=>Wp,dicts_get:()=>wp,dicts_get_default:()=>kp,dicts_items:()=>qp,dicts_keys:()=>Up,dicts_length:()=>zp,dicts_pop:()=>Zp,dicts_setdefault:()=>ta,dicts_to_json:()=>na,dicts_to_json2:()=>oa,dicts_to_to:()=>_a,dicts_todict:()=>ia,dicts_update:()=>Kp,dicts_values:()=>Qp,json_to_dicts:()=>sa});var R={};t.r(R),t.d(R,{logic_boolean:()=>la,logic_compare:()=>pa,logic_compare_continous:()=>aa,logic_is:()=>Ma,logic_is_in:()=>Ta,logic_negate:()=>ra,logic_null:()=>da,logic_operation:()=>ua,logic_tobool:()=>ha,logic_true_or_false:()=>Ia});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Ba,sdcard_use_spi_init:()=>Va,storage_can_write_ornot:()=>Aa,storage_change_dir:()=>va,storage_close_file:()=>Na,storage_delete_file:()=>fa,storage_file_seek:()=>Ya,storage_file_tell:()=>Pa,storage_file_write:()=>ca,storage_fileopen:()=>Ea,storage_fileopen_new:()=>Oa,storage_fileopen_new_encoding:()=>Ra,storage_get_a_line:()=>Sa,storage_get_contents:()=>Ca,storage_get_contents_without_para:()=>ga,storage_get_current_dir:()=>Xa,storage_get_file_size:()=>Fa,storage_get_filename:()=>La,storage_is_file:()=>ba,storage_list_all_files:()=>Da,storage_make_dir:()=>ya,storage_open_file_with_os:()=>ma,storage_rename:()=>xa});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>ka,procedures_callreturn:()=>wa,procedures_defnoreturn:()=>Ua,procedures_defreturn:()=>Ga,procedures_ifreturn:()=>Ha,procedures_return:()=>Wa});var C={};t.r(C),t.d(C,{tuple_change_to:()=>tu,tuple_create_with:()=>Ka,tuple_create_with_noreturn:()=>su,tuple_create_with_text2:()=>Ja,tuple_create_with_text_return:()=>qa,tuple_del:()=>ja,tuple_find:()=>eu,tuple_getIndex:()=>Qa,tuple_getSublist:()=>nu,tuple_get_random_item:()=>ou,tuple_get_sublist:()=>_u,tuple_input:()=>au,tuple_join:()=>$a,tuple_length:()=>za,tuple_max:()=>Za,tuple_totuple:()=>pu,tuple_trig:()=>iu});var S={};t.r(S),t.d(S,{set_add_discard:()=>Mu,set_clear:()=>du,set_create_with:()=>uu,set_create_with_text_return:()=>Eu,set_length:()=>ru,set_operate:()=>Iu,set_operate_update:()=>Tu,set_pop:()=>lu,set_sub:()=>hu,set_toset:()=>Ou,set_update:()=>mu});var A={};t.r(A),t.d(A,{html_content:()=>Cu,html_content_more:()=>Su,html_document:()=>Ru,html_form:()=>Lu,html_head_body:()=>gu,html_style:()=>Au,html_style_content:()=>Nu,html_text:()=>Du,html_title:()=>cu});var L={};t.r(L),t.d(L,{attribute_access:()=>yu,function_call:()=>Xu,raw_block:()=>fu,raw_empty:()=>Pu,raw_expression:()=>Fu,raw_table:()=>Yu,type_check:()=>vu});var N={};t.r(N),t.d(N,{PIN_init:()=>Gr,actuator_extern_get_led_bright:()=>Qu,actuator_extern_get_led_state:()=>zu,actuator_extern_led_bright:()=>qu,actuator_extern_led_brightness:()=>ju,actuator_ms32006_dcmotor:()=>or,actuator_ms32006_init:()=>_r,actuator_ms32006_stepper:()=>pr,actuator_neopixel_init:()=>ar,actuator_neopixel_rgb:()=>ur,actuator_neopixel_rgb_all:()=>rr,actuator_neopixel_rgb_show_all_chase:()=>Ir,actuator_neopixel_rgb_show_all_rainbow:()=>dr,actuator_neopixel_write:()=>lr,actuator_use_uart_init:()=>Tr,esp32_music_get_tempo_extern:()=>Wu,esp32_music_pitch:()=>Uu,esp32_music_pitch_init:()=>Gu,esp32_music_pitch_with_time:()=>wu,esp32_music_play_list:()=>ku,esp32_music_reset_extern:()=>Ku,esp32_music_set_tempo_extern:()=>Hu,esp32_music_stop:()=>Ju,mixbot_actuator_extern_get_addr:()=>Vr,mixbot_actuator_extern_set_addr:()=>Br,mixbot_addr_extern:()=>Ar,parrot_PIN_init:()=>Hr,parrot_move_speed:()=>Wr,pin_led_bright:()=>Ur,player_insert_music:()=>Rr,player_play_music:()=>Or,player_set_mode:()=>Er,player_set_play:()=>hr,player_set_volume:()=>mr,player_whether_stop:()=>Mr,robot_led_extern:()=>fr,robot_led_extern_get_value:()=>Fr,robot_motor_extern:()=>Lr,robot_motor_extern_get_speed:()=>Nr,robot_servo_extern_absolute_run:()=>Xr,robot_servo_extern_get_status:()=>Pr,robot_servo_extern_relative_continue:()=>br,robot_servo_extern_relative_origin:()=>yr,robot_servo_extern_relative_run:()=>xr,robot_servo_extern_stop:()=>vr,robot_servo_extern_stop_mode:()=>Yr,robot_traffic_light_extern:()=>Dr,servo_PIN_init:()=>wr,servo_get_angle:()=>nr,servo_get_speed:()=>sr,servo_init:()=>$u,servo_move:()=>Zu,servo_move_angle:()=>kr,servo_set_angle:()=>er,servo_set_speed:()=>ir,servo_speed_360:()=>tr,syn6288_builtin_voice:()=>Cr,syn6288_get_voice:()=>gr,syn6288_set_voice:()=>cr,syn6288_tts_play:()=>Sr});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>Cl,actuator_dc_motor_stop:()=>Sl,actuator_get_led_bright:()=>zr,actuator_get_led_state:()=>jr,actuator_led_bright:()=>Qr,actuator_led_brightness:()=>$r,actuator_mixbot_buzzer_on_off:()=>fl,actuator_mixgo_nova_mic_get:()=>Xl,actuator_mixgo_nova_mic_set:()=>vl,actuator_mixgo_nova_onboard_music_pitch:()=>Gl,actuator_mixgo_nova_onboard_music_stop:()=>Ul,actuator_mixgo_nova_play_audio:()=>Vl,actuator_mixgo_nova_play_online_audio:()=>Bl,actuator_mixgo_nova_record_audio:()=>bl,actuator_mixgo_nova_voice_get:()=>xl,actuator_mixgo_nova_voice_set:()=>yl,actuator_mixgo_zero_led_color:()=>Zr,actuator_onboard_neopixel_rgb:()=>_l,actuator_onboard_neopixel_rgb_all:()=>ol,actuator_onboard_neopixel_rgb_show_all_chase:()=>al,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>pl,actuator_onboard_neopixel_write:()=>ul,actuator_rm_onboard_neopixel_rgb:()=>rl,actuator_rm_onboard_neopixel_rgb_all:()=>ll,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>dl,actuator_stepper_keep:()=>cl,actuator_stepper_stop:()=>gl,analog_ble_keyboard_init:()=>td,analog_ble_keyboard_input:()=>nd,analog_ble_keyboard_mouse_init:()=>ld,analog_ble_keyboard_mouse_input:()=>Md,analog_ble_keyboard_mouse_send_battery:()=>Td,analog_ble_keyboard_mouse_str:()=>hd,analog_ble_keyboard_send_battery:()=>_d,analog_ble_keyboard_str:()=>sd,analog_ble_mouse_init:()=>od,analog_ble_mouse_input:()=>ud,analog_ble_mouse_keyboard_input:()=>md,analog_ble_mouse_send_battery:()=>rd,analog_keyboard_input:()=>Wl,analog_keyboard_str:()=>Zl,analog_mouse_input:()=>jl,bitbot_motor:()=>Yl,bitbot_move:()=>Fl,bitbot_stop:()=>Pl,ble_keyboard_connect:()=>id,ble_keyboard_get_mac:()=>ed,ble_keyboard_mouse_connect:()=>Id,ble_keyboard_mouse_get_mac:()=>dd,ble_mouse_connect:()=>ad,ble_mouse_get_mac:()=>pd,cc_number:()=>sl,educore_ble_keyboard_input:()=>Nd,educore_ble_sensor_connected:()=>Ld,educore_ble_sensor_init:()=>Ad,educore_buzzer:()=>Ed,educore_buzzer_play_tone:()=>Od,educore_buzzer_play_tone_time:()=>Rd,educore_buzzer_stop:()=>cd,educore_neopixel_clear:()=>Sd,educore_neopixel_rgb:()=>Cd,educore_rgb_light:()=>gd,esp32_music_get_tempo:()=>Tl,esp32_music_reset:()=>Ml,esp32_music_set_tempo:()=>Il,esp32_onboard_music_pitch:()=>hl,esp32_onboard_music_pitch_with_time:()=>ml,esp32_onboard_music_play_list:()=>Ol,esp32_onboard_music_stop:()=>El,general_key:()=>Jl,general_key_tuple:()=>ql,generalkey_container:()=>Ql,generalkey_create_with_item:()=>zl,get_keyboard_light:()=>Dd,get_power_output:()=>kl,ledswitch:()=>qr,mixbot_motor:()=>Dl,mixbot_motor_status:()=>Al,mixbot_move:()=>Ll,mixbot_stop:()=>Nl,mouse_key:()=>$l,number:()=>Jr,rm_actuator_get_led_bright:()=>el,rm_actuator_get_led_state:()=>il,rm_actuator_led_bright:()=>tl,rm_actuator_led_brightness:()=>nl,rm_motor:()=>Rl,set_all_power_output:()=>Hl,set_power_output:()=>wl,special_key:()=>Kl});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>aI,ai_sensor_ailocal_class:()=>jd,ai_sensor_ailocal_class_result:()=>$d,ai_sensor_ailocal_train:()=>zd,ai_sensor_asr_recognize:()=>nI,ai_sensor_audio_play:()=>tI,ai_sensor_audio_record:()=>Zd,ai_sensor_barcode:()=>xd,ai_sensor_circle:()=>wd,ai_sensor_classifier_faces:()=>pI,ai_sensor_color:()=>Kd,ai_sensor_color_chases:()=>Qd,ai_sensor_color_chases_result:()=>qd,ai_sensor_config:()=>Xd,ai_sensor_face:()=>oI,ai_sensor_find_20objects:()=>uI,ai_sensor_find_barcodes:()=>bd,ai_sensor_find_circles:()=>kd,ai_sensor_find_colors:()=>Jd,ai_sensor_find_licenseplates:()=>_I,ai_sensor_find_lines:()=>Ud,ai_sensor_find_qrcodes:()=>vd,ai_sensor_find_rects:()=>Wd,ai_sensor_find_tags:()=>Bd,ai_sensor_licenseplate:()=>sI,ai_sensor_line:()=>Gd,ai_sensor_qrcode:()=>Pd,ai_sensor_qrcode_lite:()=>Yd,ai_sensor_rect:()=>Hd,ai_sensor_rgb:()=>yd,ai_sensor_tag:()=>Vd,ai_sensor_use_uart_init:()=>Fd,ai_sensor_yolo_recognize:()=>eI,ai_sensor_yolo_recognize_result:()=>iI});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>dI,MICROPYTHON_AI_Speech_unit:()=>lI,MICROPYTHON_AI_client:()=>rI});var P={};t.r(P),t.d(P,{AI_CAMERA_INIT:()=>LI,AI_STOP_ACQUISITION:()=>GI,CI130X_BROADCAST_SANT:()=>OI,CI130X_BROADCAST_SYSTEM_TIME:()=>cI,CI130X_GET_THE_RECOGNIZED_CMD_SANT:()=>EI,CI130X_GET_WHETHER_IDENTIFY_SANT:()=>mI,CI130X_IDENTIFY_AND_SAVE_SANT:()=>hI,CI130X_SET_SYSTEM_CMD_SANT:()=>RI,CREATE_CAMERA:()=>gI,DELETE_PEOPLE_FACE_ID:()=>BI,GET_CAT_FACE_DETECTION_LOCATION:()=>PI,GET_CAT_FACE_DETECTION_NUM:()=>FI,GET_COLOR_DETECTION_LOCATION:()=>fI,GET_COLOR_DETECTION_NUM:()=>DI,GET_FACE_DETECTION_KEYPOINT_LOCATION:()=>XI,GET_FACE_DETECTION_LOCATION:()=>vI,GET_FACE_DETECTION_NUM:()=>YI,GET_FACE_RECOGNITION_ID:()=>yI,GET_FACE_RECOGNITION_ID_KEYPOINT_LOCATION:()=>bI,GET_FACE_RECOGNITION_ID_LOCATION:()=>xI,GET_PICTURE_DATA_EXACT:()=>SI,GET_QR_CODE_RECOGNITION_DATA:()=>NI,MIXIO_REPORT_IMAGE_DATA:()=>UI,PEOPLE_FACE_ENROLL:()=>VI,SCREEN_SHOW_CAM_GRAPH_SHOOT:()=>AI,SHOOT_AND_SAVE_PICTURE:()=>CI,VOICE_RECOGNITION_CONTROL:()=>MI});var Y={};t.r(Y),t.d(Y,{mpython_blynk_app_data:()=>iT,mpython_blynk_app_notify:()=>QI,mpython_blynk_email:()=>$I,mpython_blynk_get_timers:()=>ZI,mpython_blynk_on_connected:()=>KI,mpython_blynk_on_disconnected:()=>WI,mpython_blynk_run:()=>qI,mpython_blynk_sensor_data_to_app:()=>eT,mpython_blynk_set_property:()=>jI,mpython_blynk_setup:()=>nT,mpython_blynk_stop_timers:()=>zI,mpython_blynk_sync_virtual:()=>HI,mpython_blynk_terminal_widget_vpin:()=>kI,mpython_blynktimer:()=>tT,mpython_blynktimer_run:()=>JI});var v={};t.r(v),t.d(v,{cc_g1_init:()=>sT,cc_g1_read_bat:()=>_T,cc_g1_read_joystick:()=>oT,cc_g1_read_key:()=>pT,cc_g1_turnoff:()=>aT});var X={};t.r(X),t.d(X,{ce_go_dc_motor:()=>mT,ce_go_get_led_bright:()=>dT,ce_go_get_led_state:()=>IT,ce_go_hall_attachInterrupt:()=>ET,ce_go_hall_data:()=>RT,ce_go_hall_initialize:()=>OT,ce_go_led_bright:()=>lT,ce_go_led_brightness:()=>TT,ce_go_light_number:()=>rT,ce_go_pin_light:()=>AT,ce_go_pin_near:()=>gT,ce_go_pin_near_line:()=>cT,ce_go_pin_near_state_change:()=>CT,ce_go_stepper_keep:()=>MT,ce_go_stepper_stop:()=>hT,educore_car:()=>LT,educore_car_pin_near:()=>FT,educore_car_pin_near_line:()=>fT,educore_car_stepper_keep:()=>NT,educore_car_stepper_stop:()=>DT,sensor_mixgome_eulerangles:()=>ST});var y={};t.r(y),t.d(y,{communicate_bluetooth_central_init:()=>dM,communicate_bluetooth_connect:()=>hM,communicate_bluetooth_disconnect:()=>mM,communicate_bluetooth_handle:()=>gM,communicate_bluetooth_is_connected:()=>OM,communicate_bluetooth_mac:()=>MM,communicate_bluetooth_peripheral_init:()=>IM,communicate_bluetooth_recv:()=>RM,communicate_bluetooth_recv_only:()=>cM,communicate_bluetooth_scan:()=>TM,communicate_bluetooth_send:()=>EM,communicate_espnow_init:()=>CM,communicate_espnow_init_new:()=>SM,communicate_i2c_available:()=>qT,communicate_i2c_init:()=>XT,communicate_i2c_master_read:()=>JT,communicate_i2c_onboard:()=>YT,communicate_i2c_read:()=>yT,communicate_i2c_scan:()=>bT,communicate_i2c_write:()=>xT,communicate_ir_recv_init:()=>iM,communicate_ir_send_init:()=>pM,communicate_ow_init:()=>zT,communicate_ow_read:()=>$T,communicate_ow_reset:()=>eM,communicate_ow_scan:()=>jT,communicate_ow_select:()=>tM,communicate_ow_write:()=>ZT,communicate_spi_buffer:()=>GT,communicate_spi_init:()=>VT,communicate_spi_onboard:()=>vT,communicate_spi_read:()=>UT,communicate_spi_read_output:()=>wT,communicate_spi_readinto:()=>kT,communicate_spi_readinto_output:()=>HT,communicate_spi_set:()=>BT,communicate_spi_write:()=>WT,communicate_spi_write_readinto:()=>KT,espnow_radio_channel:()=>FM,espnow_radio_channel_new:()=>YM,espnow_radio_on_off:()=>vM,espnow_radio_rec:()=>yM,espnow_radio_recv:()=>bM,espnow_radio_recv_certain_msg:()=>VM,espnow_radio_recv_certain_msg_new:()=>GM,espnow_radio_recv_msg:()=>xM,espnow_radio_recv_new:()=>BM,espnow_radio_send:()=>XM,espnow_radio_txpower:()=>PM,i2c_available:()=>ah,i2c_init:()=>qM,i2c_master_reader2:()=>ph,i2c_read:()=>QM,i2c_scan:()=>jM,i2c_slave_onreceive:()=>QT,i2c_write:()=>zM,internal_variable:()=>nM,ir_recv_timeout:()=>oM,ir_transmit_busy:()=>lM,ir_transmit_conventional_data:()=>aM,ir_transmit_raw_code:()=>rM,ir_transmit_study_code:()=>uM,ir_whether_recv:()=>_M,lora_init:()=>UM,lora_packet:()=>wM,lora_recv:()=>HM,lora_send:()=>kM,network_espnow_info:()=>LM,network_espnow_mac:()=>AM,network_espnow_recv:()=>NM,network_espnow_recv_handle:()=>fM,network_espnow_send:()=>DM,recv_fun:()=>sM,spi_buffer:()=>th,spi_init:()=>$M,spi_read:()=>eh,spi_read_output:()=>ih,spi_readinto:()=>nh,spi_readinto_output:()=>sh,spi_set:()=>ZM,spi_write:()=>_h,spi_write_readinto:()=>oh,urequests_attribute:()=>KM,urequests_get:()=>WM,urequests_method:()=>JM});var x={};t.r(x),t.d(x,{display_animate:()=>Gh,display_blink_rate:()=>xh,display_circle:()=>Uh,display_color_seclet:()=>Zh,display_draw_4strings:()=>Fh,display_fill:()=>Bh,display_get_screen_image:()=>yh,display_help:()=>kh,display_image_size:()=>Ph,display_lcd_use_i2c_init:()=>_m,display_line:()=>vh,display_line_arbitrarily:()=>Xh,display_matrix_extern_bright_point:()=>gh,display_matrix_extern_bright_screen:()=>Sh,display_matrix_extern_clear:()=>Ah,display_matrix_extern_get_pixel:()=>ch,display_matrix_extern_get_screen_pixel:()=>Ch,display_matrix_extern_image_builtins:()=>Lh,display_matrix_extern_scroll_string:()=>hh,display_matrix_extern_scroll_string_delay:()=>mh,display_matrix_extern_shift:()=>Rh,display_matrix_extern_show_frame_string:()=>Eh,display_matrix_extern_show_frame_string_delay:()=>Oh,display_matrix_extern_show_image:()=>Th,display_matrix_extern_show_image_or_string_delay:()=>Mh,display_matrix_use_i2c_init:()=>Ih,display_oled_drawPixel:()=>Wh,display_oled_showBitmap:()=>Hh,display_oled_use_i2c_init:()=>rm,display_onoff:()=>Vh,display_rect:()=>Yh,display_rgb_color:()=>bh,display_tm1650_power:()=>Jh,display_tm1650_set_brightness:()=>zh,display_tm1650_show_dot:()=>Qh,display_tm1650_show_num:()=>qh,display_tm_use_i2c_init:()=>Kh,display_triangle:()=>wh,display_use_i2c_init:()=>fh,extern_oled_bright_point:()=>cm,extern_oled_clear:()=>gm,extern_oled_get_pixel:()=>Rm,extern_oled_hvline:()=>Sm,extern_oled_line:()=>Am,extern_oled_scroll_string:()=>Mm,extern_oled_scroll_string_delay:()=>hm,extern_oled_shape_rect:()=>Cm,extern_oled_shift:()=>Om,extern_oled_show_frame_string:()=>mm,extern_oled_show_frame_string_delay:()=>Em,extern_oled_show_image:()=>lm,extern_oled_show_image_or_string_delay:()=>Tm,extern_oled_show_image_xy:()=>dm,extern_oled_show_string:()=>Im,lcd_backlight:()=>am,lcd_clear:()=>um,lcd_print_string:()=>pm,lcd_show_image_or_string_delay:()=>om,matrix_extern_image_arithmetic:()=>Nh,matrix_extern_image_invert:()=>Dh,tft_fill:()=>nm,tft_line_arbitrarily:()=>sm,tft_scroll_string_delay:()=>em,tft_show_frame_string_delay:()=>im,tft_show_image_or_string_delay:()=>tm,tft_show_image_xy:()=>$h,tft_use_spi_init:()=>jh});var b={};t.r(b),t.d(b,{bitbot_display_bitmap_create:()=>EE,bitbot_display_image_create:()=>mE,display_available:()=>Km,display_bitmap_create:()=>ym,display_bright_point:()=>wm,display_bright_screen:()=>Hm,display_clear:()=>Wm,display_get_pixel:()=>Um,display_get_screen_pixel:()=>km,display_image_builtins:()=>xm,display_image_builtins_all:()=>bm,display_image_create:()=>Xm,display_scroll_string:()=>fm,display_scroll_string_delay:()=>Fm,display_shift:()=>Gm,display_show_frame_string:()=>Ym,display_show_frame_string_delay:()=>vm,display_show_image:()=>Nm,display_show_image_or_string_delay:()=>Dm,draw_pointer:()=>yE,image_arithmetic:()=>Vm,image_invert:()=>Bm,mixbot_display_bitmap_create:()=>dE,mixbot_display_bright_screen:()=>ME,mixbot_display_get_ambientbright:()=>TE,mixbot_display_get_screen_pixel:()=>IE,mixbot_display_image_create:()=>lE,mixbot_display_rotate:()=>hE,mixgo_display_bitmap_create:()=>$m,mixgo_display_image_create_new:()=>jm,mixgome_display_bitmap_create:()=>qm,mixgome_display_font:()=>Zm,mixgome_display_image_create:()=>Jm,mixgomini_display_bitmap_create:()=>zm,mixgomini_display_image_create:()=>Qm,mpython_display_hvline:()=>aE,mpython_display_line:()=>uE,mpython_display_shape_rect:()=>pE,mpython_pbm_image:()=>rE,nova_draw_pointer:()=>xE,onboard_oled_bright_point:()=>oE,onboard_oled_scroll_string_delay:()=>sE,onboard_oled_show_frame_string_delay:()=>_E,onboard_oled_show_image:()=>tE,onboard_oled_show_image_or_string_delay:()=>nE,onboard_oled_show_image_xy:()=>eE,onboard_oled_show_string:()=>iE,onboard_tft_bright_point:()=>NE,onboard_tft_bright_screen:()=>kE,onboard_tft_clear:()=>HE,onboard_tft_clock_clear:()=>vE,onboard_tft_clock_draw:()=>YE,onboard_tft_clock_get_rtctime:()=>FE,onboard_tft_clock_init:()=>fE,onboard_tft_clock_set_time:()=>PE,onboard_tft_display_hvline:()=>SE,onboard_tft_display_line:()=>AE,onboard_tft_display_shape_circle:()=>XE,onboard_tft_display_shape_rect:()=>CE,onboard_tft_fill:()=>DE,onboard_tft_get_pixel:()=>LE,onboard_tft_get_screen_pixel:()=>wE,onboard_tft_scroll_string:()=>BE,onboard_tft_scroll_string_delay:()=>Pm,onboard_tft_shift:()=>UE,onboard_tft_show_frame_string:()=>GE,onboard_tft_show_frame_string_delay:()=>gE,onboard_tft_show_image:()=>VE,onboard_tft_show_image_or_string_delay:()=>cE,onboard_tft_show_image_xy:()=>OE,onboard_tft_show_image_xy_direct:()=>RE,onboard_tft_show_texts:()=>bE});var V={};t.r(V),t.d(V,{factory_block:()=>aO,factory_block_return:()=>uO,factory_block_return_with_textarea:()=>lO,factory_block_with_textarea:()=>rO,factory_callMethod_noreturn:()=>oO,factory_callMethod_return:()=>pO,factory_create_with_container:()=>iO,factory_create_with_item:()=>nO,factory_declare:()=>_O,factory_from_import:()=>ZE,factory_function_noreturn:()=>eO,factory_function_return:()=>sO,factory_import:()=>tO,folding_block:()=>dO});var B={};t.r(B),t.d(B,{controls_pin_attachInterrupt:()=>XO,inout_analog_atten:()=>gO,inout_analog_read:()=>cO,inout_analog_read_init:()=>DO,inout_analog_write:()=>EO,inout_analog_write_init:()=>NO,inout_analog_write_set:()=>OO,inout_analog_write_set_freq:()=>PO,inout_digital_init:()=>AO,inout_digital_read:()=>hO,inout_digital_write:()=>MO,inout_highlow:()=>TO,inout_pinMode:()=>FO,inout_pin_attachInterrupt:()=>SO,inout_pin_pressed:()=>CO,inout_pin_pressed_init:()=>fO,inout_pwm_analog_write:()=>mO,inout_pwm_analog_write_init:()=>LO,inout_pwm_analog_write_set_freq:()=>RO,pin_pressed:()=>vO,pin_pressed_init:()=>YO});var G={};t.r(G),t.d(G,{IOT_CONNECT_OLLAMA:()=>mR,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>sR,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>nR,IOT_EMQX_PING:()=>eR,IOT_FORMATTING:()=>ZO,IOT_FORMAT_STRING:()=>tR,IOT_MIXIO_NTP:()=>iR,IOT_MIXIO_PUBLISH:()=>KO,IOT_MIXIO_SUBSCRIBE:()=>JO,iot_checkonenet:()=>TR,iot_client_onboard:()=>oR,iot_connect_ollama:()=>hR,iot_connect_openai:()=>ER,iot_create_with_item:()=>HO,iot_http_client:()=>pR,iot_http_data:()=>aR,iot_mixio_check:()=>zO,iot_mixio_connect:()=>WO,iot_mixio_connect_only:()=>QO,iot_mixio_disconnect:()=>qO,iot_mixio_format_msg:()=>$O,iot_mixio_format_topic:()=>jO,iot_mixly_key:()=>_R,iot_mqtt_client:()=>uR,iot_mqtt_data:()=>rR,iot_onenet_check:()=>BO,iot_onenet_connect:()=>bO,iot_onenet_disconnect:()=>VO,iot_onenet_publish:()=>UO,iot_onenet_publish_dict:()=>GO,iot_onenetconnect:()=>dR,iot_onenetdisconnect:()=>IR,iot_publish:()=>MR,iot_publish_container:()=>wO,iot_publish_item:()=>kO,iot_wifi_connect:()=>xO,iot_wificonnect:()=>lR,ollama_empty_history:()=>cR,use_ollama_llm_to_chat:()=>OR,use_ollama_llm_to_chat_return:()=>RR});var U={};t.r(U),t.d(U,{educore_mqtt_connect:()=>tc,educore_mqtt_connect_success:()=>sc,educore_mqtt_subscribe_message:()=>ec,educore_mqtt_topic_publish:()=>nc,educore_mqtt_topic_subscribe:()=>ic,educore_wifi_connect:()=>ZR,network_ap_connect:()=>YR,network_connect:()=>NR,network_get_connect:()=>fR,network_get_wifi:()=>PR,network_init:()=>CR,network_is_active:()=>AR,network_open:()=>SR,network_scan:()=>LR,network_server:()=>vR,network_socket_accept:()=>VR,network_socket_bind:()=>yR,network_socket_close:()=>kR,network_socket_connect:()=>xR,network_socket_init:()=>XR,network_socket_listen:()=>bR,network_socket_receive:()=>BR,network_socket_receive_from:()=>UR,network_socket_send:()=>GR,network_socket_send_to:()=>wR,network_stop:()=>FR,network_wifi_connect:()=>DR,ntptime_address:()=>qR,ntptime_time:()=>JR,requests_attribute:()=>WR,requests_attribute2:()=>$R,requests_get:()=>HR,requests_get2:()=>zR,requests_method:()=>KR,requests_post:()=>jR});var w={};t.r(w),t.d(w,{CI130X_BROADCAST:()=>fc,CI130X_GET_THE_RECOGNIZED_CMD:()=>Dc,CI130X_GET_WHETHER_IDENTIFY:()=>Nc,CI130X_IDENTIFY_AND_SAVE:()=>Lc,CI130X_SET_SYSTEM_CMD:()=>Fc,HCSR04:()=>Eg,PS2_Button:()=>gg,PS2_Buttons:()=>Sg,PS2_Buttons_new:()=>Dg,PS2_State:()=>Cg,PS2_init:()=>Og,PS2_init_new:()=>Lg,PS2_stk:()=>Ag,PS2_stk_new:()=>fg,PS2_vibration:()=>cg,PS2_vibration_new:()=>Ng,camera_sensor_init:()=>_C,camera_sensor_result:()=>oC,column_tube_foot:()=>lC,define_keyboards:()=>dC,educore_body_sensor:()=>Qg,educore_button_sensor_extern:()=>Zg,educore_camera_sensor:()=>sC,educore_infrared_sensor:()=>$g,educore_soilhum_sensor:()=>zg,educore_temp_sensor:()=>nC,educore_temphum_sensor:()=>jg,educore_ultrasonic_sensor:()=>eC,esp32_s2_weather_init:()=>Tg,esp32_s2_weather_rain:()=>hg,esp32_s2_weather_wd:()=>Mg,esp32_s2_weather_ws:()=>mg,extern_rfid_read:()=>tg,extern_rfid_readcontent:()=>ig,extern_rfid_readid:()=>eg,extern_rfid_status:()=>_g,extern_rfid_write:()=>ng,extern_rfid_write_return:()=>sg,get_keboards_value:()=>IC,gnss_get_data:()=>vg,gnss_have_data:()=>Yg,init_matrix_keyboard:()=>uC,interaction_whether_to_interaction:()=>Sc,interaction_whether_to_interaction_SANT:()=>Ac,line_tube_foot:()=>rC,mixbot_sensor_extern_get_addr:()=>Ug,mixbot_sensor_extern_set_addr:()=>wg,pm25_get_data:()=>Pg,radar_set_DETECTION_THRESHOLD:()=>gc,radar_set_DETECTION_THRESHOLD_SANT:()=>Cc,robot_button_extern_get_value:()=>yg,robot_color_extern_get_value:()=>Gg,robot_infrared_extern_get_value:()=>bg,robot_infrared_extern_grey_get_value:()=>Vg,robot_potentiometer_extern_get_value:()=>Bg,robot_sonar_extern_get_value:()=>kg,robot_sonar_extern_led:()=>Hg,robot_touch_extern_get_value:()=>xg,sensor_APDS9960_extern:()=>Yc,sensor_DS18X20:()=>Oc,sensor_LTR308_extern:()=>vc,sensor_LTR390UV_extern:()=>xc,sensor_MAX30102_extern:()=>Pc,sensor_QMC5883L_extern:()=>Hc,sensor_VL530LX_extern:()=>bc,sensor_adxl345_get_acceleration:()=>lc,sensor_aht11_extern:()=>Bc,sensor_bmp:()=>mc,sensor_compass_reset:()=>$c,sensor_dht11:()=>Ic,sensor_hp203_extern:()=>Gc,sensor_light_level:()=>dc,sensor_lm35:()=>Rc,sensor_ltr381_extern:()=>Xc,sensor_mixgo_extern_button_attachInterrupt:()=>uc,sensor_mixgo_extern_button_get_presses:()=>ac,sensor_mixgo_extern_button_is_pressed:()=>oc,sensor_mixgo_extern_button_was_pressed:()=>pc,sensor_mixgo_extern_light:()=>Tc,sensor_mixgo_extern_pin_near:()=>hc,sensor_mixgo_extern_sound:()=>Mc,sensor_mixgoce_hot_wheel_degrees:()=>Ig,sensor_mixgoce_hot_wheel_is_touched:()=>dg,sensor_mpu9250_attachGestureInterrupt:()=>rc,sensor_mpu9250_calibrate_compass:()=>Qc,sensor_mpu9250_field_strength:()=>jc,sensor_mpu9250_gesture:()=>Wc,sensor_mpu9250_get_acceleration:()=>Kc,sensor_mpu9250_get_gyro:()=>qc,sensor_mpu9250_get_magnetic:()=>Jc,sensor_mpu9250_temperature:()=>zc,sensor_ms5611_extern:()=>wc,sensor_ms5611_extern_altitude:()=>kc,sensor_read_humiture:()=>tC,sensor_sht:()=>Ec,sensor_shtc3_extern:()=>Vc,sensor_spl06_001_extern:()=>Uc,sensor_ucs12071_extern:()=>yc,sensor_use_i2c_init:()=>cc,sensor_use_spi_init:()=>Zc,sensor_use_uart_init:()=>Fg,sensor_weather_solo_init:()=>Wg,sensor_weather_solo_rain:()=>qg,sensor_weather_solo_wd:()=>Kg,sensor_weather_solo_ws:()=>Jg,sensor_weigh_init:()=>pC,tvoc_get_data:()=>Xg,ultrasonic_sensor_read_distance:()=>iC,weather_data:()=>og,weather_have_data:()=>pg,weather_set_label:()=>ug,weather_set_label_container:()=>rg,weather_set_label_item:()=>lg,weather_uart_mixio:()=>ag,weigh_sensor_get_weight:()=>aC});var k={};t.r(k),t.d(k,{HCSR04:()=>FC,RTC_set_date:()=>fC,RTC_set_time:()=>DC,bitbot_als_num:()=>BS,dht11:()=>KS,educore_button_sensor:()=>eA,educore_button_was_pressed:()=>iA,educore_gyroscope_sensor:()=>$S,educore_gyroscope_sensor_read:()=>ZS,educore_gyroscope_sensor_shake:()=>tA,educore_light_sensor:()=>jS,educore_rfid_sensor:()=>nA,educore_rfid_sensor_scan:()=>sA,educore_rfid_sensor_scan_data:()=>_A,educore_voice_sensor:()=>QS,number1:()=>YC,number2:()=>vC,number3:()=>XC,number4:()=>yC,number5:()=>xC,number6:()=>bC,number7:()=>VC,onboard_RTC_get_time:()=>KC,onboard_RTC_get_time_str:()=>$C,onboard_RTC_get_timestamp:()=>JC,onboard_RTC_get_timetuple_to_str:()=>ZC,onboard_RTC_set_datetime:()=>zC,onboard_RTC_settime_string:()=>QC,onboard_RTC_timestamp_totuple:()=>qC,rfid_readcontent:()=>oS,rfid_readid:()=>_S,rfid_status:()=>uS,rfid_write:()=>pS,rfid_write_return:()=>aS,sensor_LTR308:()=>tS,sensor_aht11:()=>iS,sensor_bitbot_ALS:()=>VS,sensor_button_get_presses:()=>wS,sensor_button_is_pressed:()=>GS,sensor_button_was_pressed:()=>US,sensor_distance_hrsc04:()=>NC,sensor_eulerangles:()=>lS,sensor_field_strength:()=>JS,sensor_get_acceleration:()=>rS,sensor_get_temperature:()=>nS,sensor_get_the_coprocessor_version:()=>oA,sensor_hp203:()=>sS,sensor_light:()=>WS,sensor_mixbot_get_gyro:()=>bS,sensor_mixbot_patrol_calibrate:()=>XS,sensor_mixbot_patrol_value:()=>yS,sensor_mixbot_temperature:()=>xS,sensor_mixgo_LTR308:()=>HC,sensor_mixgo_button_attachInterrupt:()=>EC,sensor_mixgo_button_get_presses:()=>mC,sensor_mixgo_button_is_pressed:()=>MC,sensor_mixgo_button_was_pressed:()=>hC,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>gS,sensor_mixgo_cc_mmc5603_get_angle:()=>cS,sensor_mixgo_cc_mmc5603_get_magnetic:()=>RS,sensor_mixgo_light:()=>PC,sensor_mixgo_nova_LTR308:()=>kC,sensor_mixgo_nova_pin_near:()=>wC,sensor_mixgo_pin_near:()=>UC,sensor_mixgo_pin_near_double:()=>GC,sensor_mixgo_pin_near_single:()=>BC,sensor_mixgo_pin_pressed:()=>CC,sensor_mixgo_sant_color:()=>WC,sensor_mixgo_touch_slide:()=>LC,sensor_mixgocar42_button_attachInterrupt:()=>gC,sensor_mixgocar42_button_get_presses:()=>cC,sensor_mixgocar42_button_is_pressed:()=>OC,sensor_mixgocar42_button_was_pressed:()=>RC,sensor_mixgocar_battery_left:()=>vS,sensor_mixgocar_pin_near:()=>PS,sensor_mixgocar_pin_near_line:()=>FS,sensor_mixgocar_pin_near_state_change:()=>YS,sensor_mixgoce_pin_pressed:()=>SC,sensor_mixgoce_temperature:()=>SS,sensor_mixgome_temperature:()=>CS,sensor_mpython_pin_pressed:()=>AC,sensor_mpython_qmi8658_get_gyro:()=>AS,sensor_mpython_qmi8658_temperature:()=>LS,sensor_onboard_compass_reset:()=>OS,sensor_onboard_mpu9250_calibrate_compass:()=>hS,sensor_onboard_mpu9250_field_strength:()=>ES,sensor_onboard_mpu9250_gesture:()=>dS,sensor_onboard_mpu9250_get_acceleration:()=>IS,sensor_onboard_mpu9250_get_gyro:()=>MS,sensor_onboard_mpu9250_get_magnetic:()=>TS,sensor_onboard_mpu9250_temperature:()=>mS,sensor_pin_near:()=>HS,sensor_pin_pressed:()=>kS,sensor_read:()=>zS,sensor_rm_acc:()=>fS,sensor_rm_battery_left:()=>DS,sensor_rm_pin_near_double:()=>NS,sensor_rtc_init:()=>jC,sensor_sound:()=>eS,sensor_temperature:()=>qS});var H={};t.r(H),t.d(H,{serial_any:()=>hA,serial_begin:()=>cA,serial_print:()=>lA,serial_print_byte:()=>rA,serial_print_hex:()=>IA,serial_println:()=>dA,serial_read_from_ai:()=>FA,serial_readline:()=>mA,serial_readstr:()=>MA,serial_readstr_until:()=>EA,serial_receive_data_event:()=>TA,serial_send_to_ai:()=>fA,serial_softserial:()=>RA,serial_softserial_new:()=>OA,system_input:()=>gA,system_print:()=>CA,system_print_container:()=>NA,system_print_end:()=>AA,system_print_inline:()=>SA,system_print_item:()=>DA,system_print_many:()=>LA});var W={};t.r(W),t.d(W,{Panic_with_status_code:()=>XA,Timer_init:()=>JA,base_delay:()=>zA,controls_delay:()=>vA,controls_delay_new:()=>YA,controls_millis:()=>xA,controls_uname:()=>VA,raw_block:()=>bA,reset:()=>yA,system_bitbot_shutdown:()=>KA,system_machine_reset:()=>WA,system_ticks_diff:()=>UA,system_timer:()=>GA,system_timer_init:()=>wA,system_wdt_feed:()=>HA,system_wdt_init:()=>kA,time_ticks_diff:()=>QA,timer:()=>BA,timer2:()=>qA});var K={};t.r(K),t.d(K,{Air_daily_content:()=>rL,Air_now_content:()=>nL,Geo_moon_content:()=>dL,Geo_sun_content:()=>lL,Life_suggestion_content:()=>_L,Location_search_content:()=>pL,Tide_daily_content:()=>oL,WEATHER_DAILY:()=>ZA,WEATHER_HOUR:()=>tL,WEATHER_NOW:()=>$A,Weather_alarm_content:()=>sL,Weather_daily:()=>aL,Weather_daily_content:()=>uL,Weather_now:()=>eL,Weather_now_content:()=>iL});var J={};t.r(J),t.d(J,{PIN_init:()=>dN,actuator_extern_get_led_bright:()=>YL,actuator_extern_get_led_state:()=>vL,actuator_extern_led_bright:()=>PL,actuator_extern_led_brightness:()=>XL,actuator_ms32006_dcmotor:()=>RL,actuator_ms32006_init:()=>OL,actuator_ms32006_stepper:()=>cL,actuator_neopixel_init:()=>yL,actuator_neopixel_rgb:()=>VL,actuator_neopixel_rgb_all:()=>xL,actuator_neopixel_rgb_show_all_chase:()=>BL,actuator_neopixel_rgb_show_all_rainbow:()=>GL,actuator_neopixel_write:()=>bL,actuator_use_uart_init:()=>UL,esp32_music_get_tempo_extern:()=>NL,esp32_music_pitch:()=>CL,esp32_music_pitch_init:()=>gL,esp32_music_pitch_with_time:()=>SL,esp32_music_play_list:()=>DL,esp32_music_reset_extern:()=>fL,esp32_music_set_tempo_extern:()=>LL,esp32_music_stop:()=>AL,mixbot_actuator_extern_get_addr:()=>rN,mixbot_actuator_extern_set_addr:()=>lN,mixbot_addr_extern:()=>jL,parrot_PIN_init:()=>hN,parrot_move_speed:()=>mN,pin_led_bright:()=>IN,player_play_music:()=>KL,player_set_mode:()=>WL,player_set_play:()=>kL,player_set_volume:()=>HL,player_whether_stop:()=>wL,robot_led_extern:()=>eN,robot_led_extern_get_value:()=>iN,robot_motor_extern:()=>$L,robot_motor_extern_get_speed:()=>ZL,robot_servo_extern_absolute_run:()=>oN,robot_servo_extern_get_status:()=>nN,robot_servo_extern_relative_continue:()=>uN,robot_servo_extern_relative_origin:()=>pN,robot_servo_extern_relative_run:()=>aN,robot_servo_extern_stop:()=>_N,robot_servo_extern_stop_mode:()=>sN,robot_traffic_light_extern:()=>tN,servo_PIN_init:()=>TN,servo_get_angle:()=>mL,servo_get_speed:()=>EL,servo_init:()=>IL,servo_move:()=>FL,servo_move_angle:()=>MN,servo_set_angle:()=>ML,servo_set_speed:()=>hL,servo_speed_360:()=>TL,syn6288_builtin_voice:()=>QL,syn6288_get_voice:()=>qL,syn6288_set_voice:()=>JL,syn6288_tts_play:()=>zL});var q={};t.r(q),t.d(q,{actuator_dc_motor:()=>WN,actuator_dc_motor_stop:()=>KN,actuator_get_led_bright:()=>DN,actuator_get_led_state:()=>fN,actuator_led_bright:()=>NN,actuator_led_brightness:()=>FN,actuator_mixbot_buzzer_on_off:()=>jN,actuator_mixgo_nova_mic_get:()=>iD,actuator_mixgo_nova_mic_set:()=>eD,actuator_mixgo_nova_onboard_music_pitch:()=>aD,actuator_mixgo_nova_onboard_music_stop:()=>uD,actuator_mixgo_nova_play_audio:()=>oD,actuator_mixgo_nova_play_online_audio:()=>pD,actuator_mixgo_nova_record_audio:()=>_D,actuator_mixgo_nova_voice_get:()=>sD,actuator_mixgo_nova_voice_set:()=>nD,actuator_mixgo_zero_led_color:()=>PN,actuator_onboard_neopixel_rgb:()=>VN,actuator_onboard_neopixel_rgb_all:()=>BN,actuator_onboard_neopixel_rgb_show_all_chase:()=>GN,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>UN,actuator_onboard_neopixel_write:()=>bN,actuator_stepper_keep:()=>kN,actuator_stepper_stop:()=>HN,analog_ble_keyboard_init:()=>RD,analog_ble_keyboard_input:()=>CD,analog_ble_keyboard_mouse_init:()=>PD,analog_ble_keyboard_mouse_input:()=>yD,analog_ble_keyboard_mouse_send_battery:()=>XD,analog_ble_keyboard_mouse_str:()=>xD,analog_ble_keyboard_send_battery:()=>AD,analog_ble_keyboard_str:()=>SD,analog_ble_mouse_init:()=>LD,analog_ble_mouse_input:()=>fD,analog_ble_mouse_keyboard_input:()=>bD,analog_ble_mouse_send_battery:()=>FD,analog_keyboard_input:()=>ID,analog_keyboard_str:()=>ED,analog_mouse_input:()=>hD,bitbot_motor:()=>tD,bitbot_move:()=>$N,bitbot_stop:()=>ZN,ble_keyboard_connect:()=>gD,ble_keyboard_get_mac:()=>cD,ble_keyboard_mouse_connect:()=>vD,ble_keyboard_mouse_get_mac:()=>YD,ble_mouse_connect:()=>DD,ble_mouse_get_mac:()=>ND,cc_number:()=>YN,educore_ble_keyboard_input:()=>JD,educore_ble_sensor_connected:()=>KD,educore_ble_sensor_init:()=>WD,educore_buzzer:()=>VD,educore_buzzer_play_tone:()=>BD,educore_buzzer_play_tone_time:()=>GD,educore_buzzer_stop:()=>UD,educore_neopixel_clear:()=>HD,educore_neopixel_rgb:()=>kD,educore_rgb_light:()=>wD,esp32_music_get_tempo:()=>ON,esp32_music_reset:()=>SN,esp32_music_set_tempo:()=>EN,esp32_onboard_music_pitch:()=>RN,esp32_onboard_music_pitch_with_time:()=>cN,esp32_onboard_music_play_list:()=>CN,esp32_onboard_music_stop:()=>gN,general_key:()=>MD,general_key_tuple:()=>OD,get_keyboard_light:()=>qD,get_power_output:()=>lD,ledswitch:()=>LN,mixbot_motor:()=>zN,mixbot_motor_status:()=>JN,mixbot_move:()=>qN,mixbot_stop:()=>QN,mouse_key:()=>mD,number:()=>AN,rm_actuator_get_led_bright:()=>XN,rm_actuator_get_led_state:()=>yN,rm_actuator_led_bright:()=>vN,rm_actuator_led_brightness:()=>xN,rm_motor:()=>wN,set_all_power_output:()=>dD,set_power_output:()=>rD,special_key:()=>TD});var Q={};t.r(Q),t.d(Q,{ai_sensor_20object:()=>Df,ai_sensor_ailocal_class:()=>mf,ai_sensor_ailocal_class_result:()=>Ef,ai_sensor_ailocal_train:()=>hf,ai_sensor_asr_recognize:()=>Cf,ai_sensor_audio_play:()=>Rf,ai_sensor_audio_record:()=>Of,ai_sensor_barcode:()=>ef,ai_sensor_circle:()=>af,ai_sensor_classifier_faces:()=>Nf,ai_sensor_color:()=>df,ai_sensor_color_chases:()=>Mf,ai_sensor_color_chases_result:()=>Tf,ai_sensor_config:()=>jD,ai_sensor_face:()=>Lf,ai_sensor_find_20objects:()=>ff,ai_sensor_find_barcodes:()=>nf,ai_sensor_find_circles:()=>uf,ai_sensor_find_colors:()=>If,ai_sensor_find_licenseplates:()=>Af,ai_sensor_find_lines:()=>pf,ai_sensor_find_qrcodes:()=>tf,ai_sensor_find_rects:()=>lf,ai_sensor_find_tags:()=>_f,ai_sensor_licenseplate:()=>Sf,ai_sensor_line:()=>of,ai_sensor_qrcode:()=>ZD,ai_sensor_qrcode_lite:()=>zD,ai_sensor_rect:()=>rf,ai_sensor_rgb:()=>$D,ai_sensor_tag:()=>sf,ai_sensor_use_uart_init:()=>QD,ai_sensor_yolo_recognize:()=>cf,ai_sensor_yolo_recognize_result:()=>gf});var z={};t.r(z),t.d(z,{AI_CAMERA_INIT:()=>Uf,AI_STOP_ACQUISITION:()=>eF,CI130X_BROADCAST_SANT:()=>Xf,CI130X_BROADCAST_SYSTEM_TIME:()=>xf,CI130X_GET_THE_RECOGNIZED_CMD_SANT:()=>vf,CI130X_GET_WHETHER_IDENTIFY_SANT:()=>Yf,CI130X_IDENTIFY_AND_SAVE_SANT:()=>Pf,CI130X_SET_SYSTEM_CMD_SANT:()=>yf,CREATE_CAMERA:()=>bf,DELETE_PEOPLE_FACE_ID:()=>tF,GET_CAT_FACE_DETECTION_LOCATION:()=>Kf,GET_CAT_FACE_DETECTION_NUM:()=>Wf,GET_COLOR_DETECTION_LOCATION:()=>Hf,GET_COLOR_DETECTION_NUM:()=>kf,GET_FACE_DETECTION_KEYPOINT_LOCATION:()=>Qf,GET_FACE_DETECTION_LOCATION:()=>qf,GET_FACE_DETECTION_NUM:()=>Jf,GET_FACE_RECOGNITION_ID:()=>zf,GET_FACE_RECOGNITION_ID_KEYPOINT_LOCATION:()=>$f,GET_FACE_RECOGNITION_ID_LOCATION:()=>jf,GET_PICTURE_DATA_EXACT:()=>Bf,GET_QR_CODE_RECOGNITION_DATA:()=>wf,MIXIO_REPORT_IMAGE_DATA:()=>iF,PEOPLE_FACE_ENROLL:()=>Zf,SCREEN_SHOW_CAM_GRAPH_SHOOT:()=>Gf,SHOOT_AND_SAVE_PICTURE:()=>Vf,VOICE_RECOGNITION_CONTROL:()=>Ff});var j={};t.r(j),t.d(j,{MICROPYTHON_AI_Speech_asr:()=>_F,MICROPYTHON_AI_Speech_unit:()=>sF,MICROPYTHON_AI_client:()=>nF});var $={};t.r($),t.d($,{mpython_blynk_app_data:()=>mF,mpython_blynk_app_notify:()=>dF,mpython_blynk_email:()=>EF,mpython_blynk_get_timers:()=>TF,mpython_blynk_on_connected:()=>uF,mpython_blynk_on_disconnected:()=>aF,mpython_blynk_run:()=>lF,mpython_blynk_sensor_data_to_app:()=>hF,mpython_blynk_set_property:()=>OF,mpython_blynk_setup:()=>RF,mpython_blynk_stop_timers:()=>IF,mpython_blynk_sync_virtual:()=>pF,mpython_blynk_terminal_widget_vpin:()=>oF,mpython_blynktimer:()=>MF,mpython_blynktimer_run:()=>rF});var Z={};t.r(Z),t.d(Z,{cc_g1_read_bat:()=>cF,cc_g1_read_joystick:()=>gF,cc_g1_read_key:()=>CF,cc_g1_turnoff:()=>SF});var tt={};t.r(tt),t.d(tt,{ce_go_dc_motor:()=>YF,ce_go_get_led_bright:()=>NF,ce_go_get_led_state:()=>DF,ce_go_hall_attachInterrupt:()=>vF,ce_go_hall_data:()=>yF,ce_go_hall_initialize:()=>XF,ce_go_led_bright:()=>LF,ce_go_led_brightness:()=>fF,ce_go_light_number:()=>AF,ce_go_pin_light:()=>GF,ce_go_pin_near:()=>bF,ce_go_pin_near_line:()=>xF,ce_go_pin_near_state_change:()=>VF,ce_go_stepper_keep:()=>FF,ce_go_stepper_stop:()=>PF,educore_car:()=>UF,educore_car_pin_near:()=>WF,educore_car_pin_near_line:()=>HF,educore_car_stepper_keep:()=>wF,educore_car_stepper_stop:()=>kF,sensor_mixgome_eulerangles:()=>BF});var et={};t.r(et),t.d(et,{communicate_bluetooth_central_init:()=>LP,communicate_bluetooth_connect:()=>fP,communicate_bluetooth_disconnect:()=>FP,communicate_bluetooth_handle:()=>xP,communicate_bluetooth_is_connected:()=>YP,communicate_bluetooth_mac:()=>PP,communicate_bluetooth_peripheral_init:()=>NP,communicate_bluetooth_recv:()=>yP,communicate_bluetooth_recv_only:()=>XP,communicate_bluetooth_scan:()=>DP,communicate_bluetooth_send:()=>vP,communicate_espnow_init:()=>bP,communicate_espnow_init_new:()=>VP,communicate_i2c_available:()=>ZF,communicate_i2c_init:()=>qF,communicate_i2c_master_read:()=>$F,communicate_i2c_onboard:()=>KF,communicate_i2c_read:()=>QF,communicate_i2c_scan:()=>jF,communicate_i2c_write:()=>zF,communicate_ir_recv_init:()=>hP,communicate_ir_send_init:()=>cP,communicate_ow_init:()=>rP,communicate_ow_read:()=>IP,communicate_ow_reset:()=>dP,communicate_ow_scan:()=>lP,communicate_ow_select:()=>MP,communicate_ow_write:()=>TP,communicate_spi_buffer:()=>nP,communicate_spi_init:()=>eP,communicate_spi_onboard:()=>JF,communicate_spi_read:()=>sP,communicate_spi_read_output:()=>_P,communicate_spi_readinto:()=>oP,communicate_spi_readinto_output:()=>pP,communicate_spi_set:()=>iP,communicate_spi_write:()=>aP,communicate_spi_write_readinto:()=>uP,espnow_radio_channel:()=>HP,espnow_radio_channel_new:()=>KP,espnow_radio_on_off:()=>JP,espnow_radio_rec:()=>QP,espnow_radio_recv:()=>jP,espnow_radio_recv_certain_msg:()=>$P,espnow_radio_recv_certain_msg_new:()=>tY,espnow_radio_recv_msg:()=>zP,espnow_radio_recv_new:()=>ZP,espnow_radio_send:()=>qP,espnow_radio_txpower:()=>WP,i2c_slave_onreceive:()=>tP,internal_variable:()=>mP,ir_recv_timeout:()=>RP,ir_transmit_busy:()=>AP,ir_transmit_conventional_data:()=>gP,ir_transmit_raw_code:()=>SP,ir_transmit_study_code:()=>CP,ir_whether_recv:()=>OP,lora_init:()=>eY,lora_packet:()=>iY,lora_recv:()=>sY,lora_send:()=>nY,network_espnow_info:()=>GP,network_espnow_mac:()=>BP,network_espnow_recv:()=>UP,network_espnow_recv_handle:()=>kP,network_espnow_send:()=>wP,recv_fun:()=>EP,urequests_attribute:()=>oY,urequests_get:()=>_Y,urequests_method:()=>pY});var it={};t.r(it),t.d(it,{display_animate:()=>YY,display_circle:()=>vY,display_color_seclet:()=>HY,display_draw_4strings:()=>AY,display_fill:()=>PY,display_lcd_use_i2c_init:()=>zY,display_line:()=>DY,display_line_arbitrarily:()=>LY,display_matrix_extern_bright_point:()=>EY,display_matrix_extern_bright_screen:()=>RY,display_matrix_extern_clear:()=>MY,display_matrix_extern_get_pixel:()=>mY,display_matrix_extern_get_screen_pixel:()=>OY,display_matrix_extern_image_builtins:()=>cY,display_matrix_extern_scroll_string:()=>IY,display_matrix_extern_scroll_string_delay:()=>TY,display_matrix_extern_shift:()=>hY,display_matrix_extern_show_frame_string:()=>lY,display_matrix_extern_show_frame_string_delay:()=>dY,display_matrix_extern_show_image:()=>uY,display_matrix_extern_show_image_or_string_delay:()=>rY,display_matrix_use_i2c_init:()=>aY,display_oled_drawPixel:()=>xY,display_oled_showBitmap:()=>yY,display_oled_use_i2c_init:()=>ev,display_onoff:()=>fY,display_rect:()=>NY,display_tm1650_power:()=>VY,display_tm1650_set_brightness:()=>UY,display_tm1650_show_dot:()=>GY,display_tm1650_show_num:()=>BY,display_tm_use_i2c_init:()=>bY,display_triangle:()=>XY,display_use_i2c_init:()=>SY,extern_oled_bright_point:()=>Iv,extern_oled_clear:()=>rv,extern_oled_get_pixel:()=>dv,extern_oled_hvline:()=>Mv,extern_oled_line:()=>hv,extern_oled_scroll_string:()=>av,extern_oled_scroll_string_delay:()=>uv,extern_oled_shape_rect:()=>Tv,extern_oled_shift:()=>lv,extern_oled_show_frame_string:()=>ov,extern_oled_show_frame_string_delay:()=>pv,extern_oled_show_image:()=>iv,extern_oled_show_image_or_string_delay:()=>_v,extern_oled_show_image_xy:()=>nv,extern_oled_show_string:()=>sv,image_shift:()=>FY,lcd_backlight:()=>ZY,lcd_clear:()=>tv,lcd_print_string:()=>$Y,lcd_show_image_or_string_delay:()=>jY,matrix_extern_image_arithmetic:()=>gY,matrix_extern_image_invert:()=>CY,tft_fill:()=>qY,tft_line_arbitrarily:()=>QY,tft_scroll_string_delay:()=>JY,tft_show_frame_string_delay:()=>KY,tft_show_image_or_string_delay:()=>WY,tft_show_image_xy:()=>kY,tft_use_spi_init:()=>wY});var nt={};t.r(nt),t.d(nt,{bitbot_display_bitmap_create:()=>aX,bitbot_display_image_create:()=>pX,display_available:()=>fv,display_bitmap_create:()=>Nv,display_bright_point:()=>Xv,display_bright_screen:()=>xv,display_clear:()=>Dv,display_get_pixel:()=>vv,display_get_screen_pixel:()=>yv,display_image_builtins:()=>Sv,display_image_builtins_all:()=>Av,display_image_create:()=>Lv,display_scroll_string:()=>cv,display_scroll_string_delay:()=>gv,display_shift:()=>Yv,display_show_frame_string:()=>Ov,display_show_frame_string_delay:()=>Rv,display_show_image:()=>mv,display_show_image_or_string_delay:()=>Ev,draw_pointer:()=>AX,image_arithmetic:()=>Fv,image_invert:()=>Pv,mixbot_display_bitmap_create:()=>iX,mixbot_display_bright_screen:()=>_X,mixbot_display_get_ambientbright:()=>sX,mixbot_display_get_screen_pixel:()=>nX,mixbot_display_image_create:()=>eX,mixbot_display_rotate:()=>oX,mixgo_display_bitmap_create:()=>kv,mixgo_display_image_create_new:()=>wv,mixgome_display_bitmap_create:()=>Vv,mixgome_display_font:()=>Uv,mixgome_display_image_create:()=>bv,mixgomini_display_bitmap_create:()=>Gv,mixgomini_display_image_create:()=>Bv,mpython_display_hvline:()=>Zv,mpython_display_line:()=>tX,mpython_display_shape_rect:()=>$v,mpython_pbm_image:()=>Hv,nova_draw_pointer:()=>LX,onboard_oled_bright_point:()=>jv,onboard_oled_scroll_string_delay:()=>zv,onboard_oled_show_frame_string_delay:()=>Qv,onboard_oled_show_image:()=>Wv,onboard_oled_show_image_or_string_delay:()=>qv,onboard_oled_show_image_xy:()=>Kv,onboard_oled_show_string:()=>Jv,onboard_tft_bright_point:()=>mX,onboard_tft_bright_screen:()=>YX,onboard_tft_clear:()=>vX,onboard_tft_clock_clear:()=>CX,onboard_tft_clock_draw:()=>gX,onboard_tft_clock_get_rtctime:()=>RX,onboard_tft_clock_init:()=>OX,onboard_tft_clock_set_time:()=>cX,onboard_tft_display_hvline:()=>TX,onboard_tft_display_line:()=>MX,onboard_tft_display_shape_circle:()=>SX,onboard_tft_display_shape_rect:()=>IX,onboard_tft_fill:()=>EX,onboard_tft_get_pixel:()=>hX,onboard_tft_get_screen_pixel:()=>PX,onboard_tft_scroll_string_delay:()=>Cv,onboard_tft_shift:()=>FX,onboard_tft_show_frame_string:()=>fX,onboard_tft_show_frame_string_delay:()=>dX,onboard_tft_show_image:()=>DX,onboard_tft_show_image_or_string_delay:()=>lX,onboard_tft_show_image_xy:()=>uX,onboard_tft_show_image_xy_direct:()=>rX,onboard_tft_show_texts:()=>NX});var st={};t.r(st),t.d(st,{factory_block:()=>UX,factory_block_return:()=>wX,factory_block_return_with_textarea:()=>HX,factory_block_with_textarea:()=>kX,factory_callMethod_noreturn:()=>BX,factory_callMethod_return:()=>GX,factory_declare:()=>VX,factory_from_import:()=>XX,factory_function_noreturn:()=>xX,factory_function_return:()=>bX,factory_import:()=>yX,folding_block:()=>WX});var _t={};t.r(_t),t.d(_t,{inout_analog_atten:()=>oy,inout_analog_read:()=>ZX,inout_analog_read_init:()=>_y,inout_analog_write:()=>zX,inout_analog_write_init:()=>sy,inout_analog_write_set:()=>jX,inout_digital_init:()=>iy,inout_digital_read:()=>qX,inout_digital_write:()=>JX,inout_highlow:()=>KX,inout_pin_attachInterrupt:()=>ey,inout_pin_pressed:()=>ty,inout_pin_pressed_init:()=>py,inout_pwm_analog_write:()=>QX,inout_pwm_analog_write_init:()=>ny,inout_pwm_analog_write_set_freq:()=>$X});var ot={};t.r(ot),t.d(ot,{IOT_CONNECT_OLLAMA:()=>yy,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>Ly,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>Sy,IOT_EMQX_PING:()=>Ny,IOT_FORMATTING:()=>gy,IOT_FORMAT_STRING:()=>Cy,IOT_MIXIO_NTP:()=>Dy,IOT_MIXIO_PUBLISH:()=>My,IOT_MIXIO_SUBSCRIBE:()=>hy,iot_client_onboard:()=>fy,iot_connect_ollama:()=>Xy,iot_connect_openai:()=>xy,iot_http_client:()=>Fy,iot_http_data:()=>Py,iot_mixio_check:()=>Oy,iot_mixio_connect:()=>Ty,iot_mixio_connect_only:()=>Ey,iot_mixio_disconnect:()=>my,iot_mixio_format_msg:()=>cy,iot_mixio_format_topic:()=>Ry,iot_mixly_key:()=>Ay,iot_mqtt_client:()=>Yy,iot_mqtt_data:()=>vy,iot_onenet_check:()=>dy,iot_onenet_connect:()=>uy,iot_onenet_disconnect:()=>ry,iot_onenet_publish:()=>Iy,iot_onenet_publish_dict:()=>ly,iot_wifi_connect:()=>ay,ollama_empty_history:()=>By,use_ollama_llm_to_chat:()=>by,use_ollama_llm_to_chat_return:()=>Vy});var pt={};t.r(pt),t.d(pt,{educore_mqtt_connect:()=>hx,educore_mqtt_connect_success:()=>Rx,educore_mqtt_subscribe_message:()=>mx,educore_mqtt_topic_publish:()=>Ox,educore_mqtt_topic_subscribe:()=>Ex,educore_wifi_connect:()=>Mx,network_ap_connect:()=>qy,network_connect:()=>Uy,network_get_connect:()=>ky,network_get_wifi:()=>Jy,network_init:()=>Gy,network_is_active:()=>Ky,network_open:()=>Wy,network_scan:()=>Qy,network_server:()=>zy,network_socket_accept:()=>ex,network_socket_bind:()=>$y,network_socket_close:()=>ox,network_socket_connect:()=>Zy,network_socket_init:()=>jy,network_socket_listen:()=>tx,network_socket_receive:()=>ix,network_socket_receive_from:()=>sx,network_socket_send:()=>nx,network_socket_send_to:()=>_x,network_stop:()=>Hy,network_wifi_connect:()=>wy,ntptime_address:()=>lx,ntptime_time:()=>rx,requests_attribute:()=>ax,requests_attribute2:()=>Ix,requests_get:()=>px,requests_get2:()=>dx,requests_method:()=>ux,requests_post:()=>Tx});var at={};t.r(at),t.d(at,{CI130X_BROADCAST:()=>kx,CI130X_GET_THE_RECOGNIZED_CMD:()=>wx,CI130X_GET_WHETHER_IDENTIFY:()=>Ux,CI130X_IDENTIFY_AND_SAVE:()=>Gx,CI130X_SET_SYSTEM_CMD:()=>Hx,HCSR04:()=>gb,PS2_Button:()=>Ab,PS2_Buttons:()=>Lb,PS2_Buttons_new:()=>Xb,PS2_State:()=>Nb,PS2_init:()=>Cb,PS2_init_new:()=>Yb,PS2_stk:()=>Db,PS2_stk_new:()=>yb,PS2_vibration:()=>Sb,PS2_vibration_new:()=>vb,RTC_get_time:()=>Fb,RTC_set_date:()=>Dx,RTC_set_datetime:()=>fb,RTC_set_time:()=>Nx,camera_sensor_init:()=>dV,camera_sensor_result:()=>IV,column_tube_foot:()=>mV,define_keyboards:()=>EV,educore_body_sensor:()=>iV,educore_button_sensor_extern:()=>oV,educore_camera_sensor:()=>lV,educore_infrared_sensor:()=>_V,educore_soilhum_sensor:()=>nV,educore_temp_sensor:()=>rV,educore_temphum_sensor:()=>sV,educore_ultrasonic_sensor:()=>aV,esp32_s2_weather_init:()=>Eb,esp32_s2_weather_rain:()=>Rb,esp32_s2_weather_wd:()=>Ob,esp32_s2_weather_ws:()=>cb,extern_rfid_read:()=>ob,extern_rfid_readcontent:()=>ab,extern_rfid_readid:()=>pb,extern_rfid_status:()=>lb,extern_rfid_write:()=>ub,extern_rfid_write_return:()=>rb,get_keboards_value:()=>RV,gnss_get_data:()=>Vb,gnss_have_data:()=>Bb,init_matrix_keyboard:()=>OV,interaction_whether_to_interaction:()=>Vx,interaction_whether_to_interaction_SANT:()=>Bx,line_tube_foot:()=>hV,mixbot_sensor_extern_get_addr:()=>Qb,mixbot_sensor_extern_set_addr:()=>zb,pm25_get_data:()=>bb,radar_set_DETECTION_THRESHOLD:()=>xx,radar_set_DETECTION_THRESHOLD_SANT:()=>bx,robot_button_extern_get_value:()=>Ub,robot_color_extern_get_value:()=>Kb,robot_infrared_extern_get_value:()=>kb,robot_infrared_extern_grey_get_value:()=>Hb,robot_potentiometer_extern_get_value:()=>Wb,robot_sonar_extern_get_value:()=>Jb,robot_sonar_extern_led:()=>qb,robot_touch_extern_get_value:()=>wb,sensor_APDS9960_extern:()=>Kx,sensor_DS18X20:()=>eV,sensor_LTR308_extern:()=>Jx,sensor_LTR390UV_extern:()=>tb,sensor_MAX30102_extern:()=>Wx,sensor_QMC5883L_extern:()=>eb,sensor_VL530LX_extern:()=>sb,sensor_aht11_extern:()=>nb,sensor_bmp:()=>vx,sensor_dht11:()=>Pb,sensor_distance_hrsc04:()=>Lx,sensor_hp203_extern:()=>qx,sensor_ltr381_extern:()=>$x,sensor_mixgo_extern_button_attachInterrupt:()=>Sx,sensor_mixgo_extern_button_get_presses:()=>Cx,sensor_mixgo_extern_button_is_pressed:()=>cx,sensor_mixgo_extern_button_was_pressed:()=>gx,sensor_mixgo_extern_light:()=>fx,sensor_mixgo_extern_pin_near:()=>Px,sensor_mixgo_extern_sound:()=>Fx,sensor_mixgoce_hot_wheel_degrees:()=>mb,sensor_mixgoce_hot_wheel_is_touched:()=>hb,sensor_mpu9250_attachGestureInterrupt:()=>Ax,sensor_ms5611_extern:()=>zx,sensor_ms5611_extern_altitude:()=>jx,sensor_read_humiture:()=>pV,sensor_rtc_init:()=>Yx,sensor_sht:()=>Xx,sensor_shtc3_extern:()=>ib,sensor_spl06_001_extern:()=>Qx,sensor_ucs12071_extern:()=>Zx,sensor_use_i2c_init:()=>yx,sensor_use_spi_init:()=>_b,sensor_use_uart_init:()=>xb,sensor_weather_solo_init:()=>jb,sensor_weather_solo_rain:()=>tV,sensor_weather_solo_wd:()=>$b,sensor_weather_solo_ws:()=>Zb,sensor_weigh_init:()=>TV,tvoc_get_data:()=>Gb,ultrasonic_sensor_read_distance:()=>uV,weather_data:()=>db,weather_have_data:()=>Ib,weather_set_label:()=>Mb,weather_uart_mixio:()=>Tb,weigh_sensor_get_weight:()=>MV});var ut={};t.r(ut),t.d(ut,{HCSR04:()=>fV,bitbot_als_num:()=>jB,dht11:()=>_G,educore_button_sensor:()=>dG,educore_button_was_pressed:()=>IG,educore_gyroscope_sensor:()=>uG,educore_gyroscope_sensor_read:()=>rG,educore_gyroscope_sensor_shake:()=>lG,educore_light_sensor:()=>aG,educore_rfid_sensor:()=>TG,educore_rfid_sensor_scan:()=>MG,educore_rfid_sensor_scan_data:()=>hG,educore_voice_sensor:()=>oG,number1:()=>FV,number2:()=>PV,number3:()=>YV,number4:()=>vV,number5:()=>XV,number6:()=>yV,number7:()=>xV,onboard_RTC_get_time:()=>NB,onboard_RTC_get_time_str:()=>FB,onboard_RTC_get_timestamp:()=>DB,onboard_RTC_get_timetuple_to_str:()=>PB,onboard_RTC_set_datetime:()=>AB,onboard_RTC_settime_string:()=>LB,onboard_RTC_timestamp_totuple:()=>fB,rfid_readcontent:()=>$V,rfid_readid:()=>jV,rfid_status:()=>eB,rfid_write:()=>ZV,rfid_write_return:()=>tB,sensor_LTR308:()=>KV,sensor_adxl345_get_acceleration:()=>rB,sensor_aht11:()=>QV,sensor_bitbot_ALS:()=>zB,sensor_button_get_presses:()=>tG,sensor_button_is_pressed:()=>$B,sensor_button_was_pressed:()=>ZB,sensor_compass_reset:()=>hB,sensor_ds18x20:()=>HV,sensor_eulerangles:()=>nB,sensor_get_acceleration:()=>iB,sensor_get_temperature:()=>zV,sensor_get_the_coprocessor_version:()=>mG,sensor_hp203:()=>qV,sensor_light:()=>sG,sensor_lm35:()=>WV,sensor_mixbot_get_gyro:()=>QB,sensor_mixbot_patrol_calibrate:()=>KB,sensor_mixbot_patrol_value:()=>JB,sensor_mixbot_temperature:()=>qB,sensor_mixgo_LTR308:()=>UV,sensor_mixgo_button_attachInterrupt:()=>SV,sensor_mixgo_button_get_presses:()=>CV,sensor_mixgo_button_is_pressed:()=>cV,sensor_mixgo_button_was_pressed:()=>gV,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>XB,sensor_mixgo_cc_mmc5603_get_angle:()=>vB,sensor_mixgo_cc_mmc5603_get_magnetic:()=>YB,sensor_mixgo_light:()=>nG,sensor_mixgo_nova_LTR308:()=>kV,sensor_mixgo_nova_pin_near:()=>GV,sensor_mixgo_pin_near:()=>BV,sensor_mixgo_pin_near_double:()=>VV,sensor_mixgo_pin_near_single:()=>bV,sensor_mixgo_pin_pressed:()=>aB,sensor_mixgo_sant_color:()=>wV,sensor_mixgo_touch_slide:()=>pB,sensor_mixgocar42_button_attachInterrupt:()=>DV,sensor_mixgocar42_button_get_presses:()=>NV,sensor_mixgocar42_button_is_pressed:()=>AV,sensor_mixgocar42_button_was_pressed:()=>LV,sensor_mixgocar_battery_left:()=>WB,sensor_mixgocar_pin_near:()=>kB,sensor_mixgocar_pin_near_line:()=>wB,sensor_mixgocar_pin_near_state_change:()=>HB,sensor_mixgoce_pin_pressed:()=>oB,sensor_mixgoce_temperature:()=>xB,sensor_mixgome_temperature:()=>yB,sensor_mpu9250_calibrate_compass:()=>IB,sensor_mpu9250_field_strength:()=>MB,sensor_mpu9250_gesture:()=>sB,sensor_mpu9250_get_acceleration:()=>_B,sensor_mpu9250_get_gyro:()=>dB,sensor_mpu9250_get_magnetic:()=>lB,sensor_mpu9250_temperature:()=>TB,sensor_mpython_pin_pressed:()=>uB,sensor_mpython_qmi8658_get_gyro:()=>bB,sensor_mpython_qmi8658_temperature:()=>VB,sensor_onboard_compass_reset:()=>SB,sensor_onboard_mpu9250_calibrate_compass:()=>cB,sensor_onboard_mpu9250_field_strength:()=>CB,sensor_onboard_mpu9250_gesture:()=>mB,sensor_onboard_mpu9250_get_acceleration:()=>EB,sensor_onboard_mpu9250_get_gyro:()=>RB,sensor_onboard_mpu9250_get_magnetic:()=>OB,sensor_onboard_mpu9250_temperature:()=>gB,sensor_pin_near:()=>iG,sensor_pin_pressed:()=>eG,sensor_read:()=>pG,sensor_rm_acc:()=>UB,sensor_rm_battery_left:()=>GB,sensor_rm_pin_near_double:()=>BB,sensor_sound:()=>JV});var rt={};t.r(rt),t.d(rt,{serial_any:()=>gG,serial_print:()=>EG,serial_print_byte:()=>OG,serial_print_hex:()=>cG,serial_println:()=>RG,serial_read_from_ai:()=>vG,serial_readline:()=>SG,serial_readstr:()=>CG,serial_send_to_ai:()=>YG,serial_softserial:()=>AG,serial_softserial_new:()=>LG,system_input:()=>NG,system_print:()=>DG,system_print_end:()=>FG,system_print_inline:()=>fG,system_print_many:()=>PG});var lt={};t.r(lt),t.d(lt,{Panic_with_status_code:()=>WG,Timer_init:()=>oU,base_delay:()=>uU,controls_delay:()=>zG,controls_delay_new:()=>jG,controls_end_program:()=>JG,controls_millis:()=>KG,controls_uname:()=>QG,reset:()=>qG,system_bitbot_shutdown:()=>_U,system_device_name:()=>kG,system_device_serial_number:()=>HG,system_event_bus_source:()=>UG,system_event_bus_value:()=>wG,system_machine_reset:()=>sU,system_on_event:()=>VG,system_raise_event:()=>bG,system_reset:()=>yG,system_run_in_background:()=>XG,system_ticks_diff:()=>tU,system_timer:()=>ZG,system_timer_init:()=>eU,system_timestamp:()=>BG,system_value:()=>GG,system_wait:()=>xG,system_wdt_feed:()=>nU,system_wdt_init:()=>iU,time_ticks_diff:()=>aU,timer:()=>$G,timer2:()=>pU});var dt={};t.r(dt),t.d(dt,{Air_daily_content:()=>gU,Air_now_content:()=>MU,Geo_moon_content:()=>SU,Geo_sun_content:()=>CU,Life_suggestion_content:()=>mU,Location_search_content:()=>OU,Tide_daily_content:()=>EU,WEATHER_DAILY:()=>lU,WEATHER_HOUR:()=>dU,WEATHER_NOW:()=>rU,Weather_alarm_content:()=>hU,Weather_daily:()=>RU,Weather_daily_content:()=>cU,Weather_now:()=>IU,Weather_now_content:()=>TU});var It={};t.r(It),t.d(It,{controls_pin_attachInterrupt:()=>HU,inout_analog_atten:()=>XU,inout_analog_write:()=>YU,inout_analog_write_init:()=>VU,inout_analog_write_set:()=>vU,inout_analog_write_set_freq:()=>GU,inout_digital_init:()=>bU,inout_digital_read:()=>PU,inout_digital_write:()=>FU,inout_highlow:()=>fU,inout_pinMode:()=>UU,inout_pin_attachInterrupt:()=>xU,inout_pin_pressed:()=>yU,inout_pin_pressed_init:()=>BU,pin_pressed:()=>kU,pin_pressed_init:()=>wU});var Tt={};t.r(Tt),t.d(Tt,{mini_g2_aht11:()=>KU,mini_g2_hp203:()=>JU,mini_g2_rfid_readcontent:()=>zU,mini_g2_rfid_readid:()=>QU,mini_g2_rfid_status:()=>ZU,mini_g2_rfid_write:()=>jU,mini_g2_rfid_write_outcome:()=>$U,mini_g2_varistor:()=>qU});var Mt={};t.r(Mt),t.d(Mt,{me_go_dc_motor:()=>aw,me_go_get_led_bright:()=>nw,me_go_get_led_state:()=>sw,me_go_hall_attachInterrupt:()=>uw,me_go_hall_data:()=>lw,me_go_hall_initialize:()=>rw,me_go_led_bright:()=>iw,me_go_led_brightness:()=>_w,me_go_light_number:()=>ew,me_go_pin_light:()=>hw,me_go_pin_near:()=>Iw,me_go_pin_near_line:()=>dw,me_go_pin_near_state_change:()=>Tw,me_go_stepper_keep:()=>ow,me_go_stepper_stop:()=>pw,sensor_mixgome_eulerangles:()=>Mw});var ht={};t.r(ht),t.d(ht,{analog_input:()=>Aw,analog_output:()=>Nw,espnow_channel:()=>gw,haskylens_model:()=>Cw,i2c_A_pin:()=>Dw,i2c_B_pin:()=>fw,pins_analog:()=>Xw,pins_analog_pin:()=>yw,pins_axis:()=>$w,pins_brightness:()=>Zw,pins_builtinimg:()=>Ww,pins_builtinimg_extern:()=>Kw,pins_button:()=>Vw,pins_buttonB:()=>Bw,pins_dac:()=>xw,pins_dac_pin:()=>bw,pins_digital:()=>Ew,pins_digital_dot:()=>pk,pins_digital_pin:()=>Ow,pins_exlcdh:()=>zw,pins_exlcdv:()=>jw,pins_imglist:()=>Jw,pins_input_pin:()=>Rw,pins_one_more:()=>ok,pins_output_pin:()=>cw,pins_playlist:()=>qw,pins_playlist_extern:()=>Qw,pins_pwm:()=>Gw,pins_pwm_pin:()=>Uw,pins_radio_datarate:()=>_k,pins_radio_power:()=>sk,pins_serial:()=>Hw,pins_tone_notes:()=>nk,pins_touch:()=>kw,pins_touch_pin:()=>ww,pins_tts_bgmusic:()=>ik,pins_tts_builtin_music:()=>ek,pins_tts_voice:()=>tk,pwm_input:()=>Sw,pwm_output:()=>Lw,spi_A_pin:()=>Fw,spi_B_pin:()=>Pw,spi_C_pin:()=>Yw,spi_D_pin:()=>vw});var mt={};t.r(mt),t.d(mt,{actuator_neopixel_init:()=>ak});var Et={};t.r(Et),t.d(Et,{inout_analog_atten:()=>Ek,inout_analog_write:()=>dk,inout_analog_write_init:()=>mk,inout_analog_write_set:()=>Ik,inout_digital_init:()=>hk,inout_digital_read:()=>lk,inout_digital_write:()=>rk,inout_highlow:()=>uk,inout_pin_attachInterrupt:()=>Mk,inout_pin_pressed:()=>Tk,inout_pin_pressed_init:()=>Ok});var Ot={};t.r(Ot),t.d(Ot,{mini_g2_aht11:()=>Rk,mini_g2_hp203:()=>ck,mini_g2_rfid_readcontent:()=>Sk,mini_g2_rfid_readid:()=>Ck,mini_g2_rfid_status:()=>Nk,mini_g2_rfid_write:()=>Ak,mini_g2_rfid_write_outcome:()=>Lk,mini_g2_varistor:()=>gk});var Rt={};t.r(Rt),t.d(Rt,{me_go_dc_motor:()=>yk,me_go_get_led_bright:()=>Fk,me_go_get_led_state:()=>Pk,me_go_hall_attachInterrupt:()=>xk,me_go_hall_data:()=>Vk,me_go_hall_initialize:()=>bk,me_go_led_bright:()=>fk,me_go_led_brightness:()=>Yk,me_go_light_number:()=>Dk,me_go_pin_light:()=>kk,me_go_pin_near:()=>Gk,me_go_pin_near_line:()=>Bk,me_go_pin_near_state_change:()=>Uk,me_go_stepper_keep:()=>vk,me_go_stepper_stop:()=>Xk,sensor_mixgome_eulerangles:()=>wk});var ct={};t.r(ct),t.d(ct,{analog_input:()=>Zk,analog_output:()=>eH,espnow_channel:()=>jk,haskylens_model:()=>$k,i2c_A_pin:()=>iH,i2c_B_pin:()=>nH,pins_analog:()=>uH,pins_analog_pin:()=>aH,pins_axis:()=>CH,pins_brightness:()=>LH,pins_builtinimg:()=>EH,pins_builtinimg_extern:()=>OH,pins_button:()=>Wk,pins_buttonB:()=>Kk,pins_dac:()=>IH,pins_dac_pin:()=>dH,pins_digital:()=>Hk,pins_digital_dot:()=>XH,pins_digital_pin:()=>Jk,pins_exlcdh:()=>SH,pins_exlcdv:()=>AH,pins_imglist:()=>RH,pins_input_pin:()=>qk,pins_interrupt:()=>hH,pins_one_more:()=>vH,pins_output_pin:()=>Qk,pins_playlist:()=>cH,pins_playlist_extern:()=>gH,pins_pwm:()=>lH,pins_pwm_input:()=>zk,pins_pwm_pin:()=>rH,pins_radio_datarate:()=>YH,pins_radio_power:()=>PH,pins_serial:()=>mH,pins_tone_notes:()=>FH,pins_touch:()=>MH,pins_touch_pin:()=>TH,pins_tts_bgmusic:()=>fH,pins_tts_builtin_music:()=>DH,pins_tts_voice:()=>NH,pwm_output:()=>tH,spi_A_pin:()=>sH,spi_B_pin:()=>_H,spi_C_pin:()=>oH,spi_D_pin:()=>pH});const gt=Blockly,Ct=Mixly,St={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(o+=n)):i=o}else i="i";return i}},At=St; -/** - * @license - * Visual Blocks Editor - * - * Copyright 2012 Google Inc. - * https://developers.google.com/blockly/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class Lt{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(gt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(gt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(gt.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_if_else");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(gt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(gt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(gt.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Wt={init:function(){this.setColour(Bt),this.appendValueInput("FROM").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.PYTHON_RANGE).appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(gt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Kt={init:function(){this.setColour(Bt),this.appendValueInput("LIST").setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(gt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return gt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Jt={init:function(){this.setColour(Bt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(gt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new gt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(gt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:gt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:gt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},qt={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(gt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new gt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(gt.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(gt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(gt.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_finally");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(gt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(gt.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Qt={init:function(){this.setColour(Bt);var t=new gt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(gt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(gt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:gt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:gt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(gt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},zt={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new gt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return gt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},jt={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new gt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return gt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Jt.OPERATORS=[[gt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[gt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Qt.OPERATORS=[[gt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[gt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const $t={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(gt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Zt={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},te={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(gt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},ee={init:function(){this.setColour(Bt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},ie={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(gt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},ne={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(gt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},se={init:function(){this.jsonInit({message0:gt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:Bt,tooltip:gt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:gt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},_e={init:function(){this.setColour(Bt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(gt.Msg.MIXLY_STAT),this.setOutput(!0)}},oe={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},pe={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(gt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},ae={init:function(){this.appendDummyInput().appendField(gt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+gt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(gt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new gt.FieldDropdown([[gt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[gt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Bt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},ue={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},re={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},le={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},de={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET+gt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(gt.Msg.PROCEDURES_DEFRETURN_RETURN+gt.Msg.MIXLY_GET_UNIQUE_IDEN)}},Ie={init:function(){this.setColour(Bt),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(gt.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},Te={init:function(){this.setColour(Bt),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},Me=230;gt.FieldTextInput.math_number_validator=function(t){return String(t)},gt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const he={init:function(){this.setColour(Me),this.appendDummyInput().appendField(new gt.FieldTextInput("0",gt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MATH_NUMBER_TOOLTIP)}},me={init:function(){this.setColour(Me);this.appendDummyInput("").appendField(gt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new gt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:gt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:gt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Ee={init:function(){this.setColour(Me);this.appendDummyInput("").appendField(gt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new gt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:gt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:gt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Oe={init:function(){this.setColour(Me),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new gt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:gt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:gt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:gt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:gt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:gt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:gt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:gt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Re={init:function(){this.setColour(Me),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new gt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:gt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:gt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:gt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:gt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:gt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:gt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:gt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},ce={init:function(){this.setColour(Me),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new gt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},ge={init:function(){this.setColour(Me),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new gt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:gt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:gt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:gt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:gt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:gt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:gt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:gt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Ce={init:function(){var t=[[gt.Msg.MATH_BIN,"bin"],[gt.Msg.MATH_OCT,"oct"],[gt.Msg.MATH_HEX,"hex"]];this.setColour(Me),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new gt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:gt.Msg.MATH_DEC_TOOLTIP_BIN,oct:gt.Msg.MATH_DEC_TOOLTIP_OCT,hex:gt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Se={init:function(){var t=[[gt.Msg.LANG_MATH_TO_ROUND,"round"],[gt.Msg.LANG_MATH_TO_CEIL,"ceil"],[gt.Msg.LANG_MATH_TO_FLOOR,"floor"],[gt.Msg.MATH_ABS,"fabs"],[gt.Msg.MATH_SQRT,"sqrt"]];this.setColour(Me),this.appendValueInput("A").setCheck(Number).appendField(new gt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:gt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:gt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:gt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:gt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:gt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:gt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Ae={init:function(){var t=[[gt.Msg.MIXLY_MAX,"max"],[gt.Msg.MIXLY_MIN,"min"]];this.setColour(Me),this.appendValueInput("A").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(new gt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(gt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:gt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:gt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Le={init:function(){var t=[[gt.Msg.MATH_TWO,"two"],[gt.Msg.MATH_EIGHT,"eight"],[gt.Msg.MATH_TEN,"ten"],[gt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(Me),this.appendDummyInput("").appendField(gt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new gt.FieldDropdown(t),"OP").appendField(gt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.MATH_ZHW).appendField(new gt.FieldDropdown(t),"OP2").appendField(gt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:gt.Msg.MATH_Before_two,eight:gt.Msg.MATH_Before_eight,ten:gt.Msg.MATH_Before_ten,sixteen:gt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:gt.Msg.MATH_Behind_two,eight:gt.Msg.MATH_Behind_eight,ten:gt.Msg.MATH_Behind_ten,sixteen:gt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},Ne={init:function(){var t=[[gt.Msg.LANG_MATH_INT,"int"],[gt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Me),this.setOutput(!0,Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new gt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(gt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:gt.Msg.LANG_MATH_INT,float:gt.Msg.LANG_MATH_FLOAT_RANDOM};return gt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},De={init:function(){this.setColour(Me),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(gt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(gt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(gt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(gt.Msg.MATH_CONSTRAIN_TOOLTIP)}},fe={init:function(){this.setColour(Me),this.appendValueInput("NUM",Number).appendField(gt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(gt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(gt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Fe={init:function(){this.setColour(Me),this.appendDummyInput().appendField(new gt.FieldTextInput("0",gt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(gt.Msg.MATH_NUMBER_TOOLTIP)}},Pe={init:function(){this.setColour(Me),this.appendValueInput("NUM").setCheck(Number).appendField(gt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},Ye={init:function(){this.setColour(Me),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(gt.Msg.MATH_ROUND).appendField(gt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(gt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(gt.Msg.MATH_ROUND_NEW_TOOLTIP)}},ve={init:function(){var t=[[gt.Msg.MIXLY_TO_INT,"int"],[gt.Msg.MIXLY_TO_FLOAT,"float"],[gt.Msg.MIXLY_TO_BITES,"b"],[gt.Msg.LANG_MATH_BYTE+gt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(Me),this.appendValueInput("VAR").appendField(new gt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:gt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:gt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:gt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},Xe={init:function(){var t=[[gt.Msg.MIXLY_TO_INT,"int"],[gt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Me),this.appendValueInput("VAR").appendField(new gt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:gt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:gt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},ye=fe,xe={init:function(){this.setColour(Me),this.appendValueInput("VAR").appendField(gt.Msg.LANG_MATH_BYTE+gt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},be={init:function(){this.setColour(Me),this.itemCount_=1,this.setMutator(new gt.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(gt.Msg.MIXLY_PRODUCT+gt.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(gt.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(gt.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(gt.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const ke={init:function(){this.setColour(Ge),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new gt.FieldTextInput("",gt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(gt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new gt.FieldImage(e,7,12,'"')}},He={init:function(){this.setColour(Ge),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(gt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},We={init:function(){this.setColour(Ge),this.appendValueInput("VAR").setCheck(Number).appendField(gt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Ke={init:function(){this.setColour(Ge),this.appendValueInput("VAR").setCheck(String).appendField(gt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Je={init:function(){this.setColour(Ge),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},qe={init:function(){this.setColour(Ge),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Qe={init:function(){this.WHERE_OPTIONS=[[gt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[gt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[gt.Msg.TEXT_GET_INDEX_RANDOM+1+gt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(gt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ge),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(gt.Msg.LISTS_GET_INDEX_GET,"MODE"),gt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(gt.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=gt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=gt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=gt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=gt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+gt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",gt.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:gt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:gt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:gt.Msg.TEXT_GET_INDEX_RANDOM};return gt.Msg.PROCEDURES_DEFRETURN_RETURN+gt.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+gt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==gt.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),gt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(gt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new gt.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),gt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},ze={init:function(){this.setHelpUrl(gt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ge),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(gt.Msg.LISTS_GET_INDEX_GET+" "+gt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(gt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(gt.Msg.PROCEDURES_DEFRETURN_RETURN+gt.Msg.MIXLY_MICROBIT_TYPE_STRING+gt.Msg.LISTS_GET_INDEX_FROM_START+"n"+gt.Msg.TEXT_CHARAT2)}},je={init:function(){this.setHelpUrl(gt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ge),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(gt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(gt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},$e={init:function(){this.WHERE_OPTIONS_1=[[gt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[gt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[gt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[gt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[gt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[gt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(gt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ge),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(gt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==gt.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==gt.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),gt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(gt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new gt.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Ze={init:function(){this.setHelpUrl(gt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ge),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(gt.Msg.LISTS_GET_INDEX_GET+" "+gt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(gt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(gt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(gt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},ti={init:function(){var t=[[gt.Msg.MIXLY_EQUALS,"==="],[gt.Msg.MIXLY_STARTSWITH,"startswith"],[gt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Ge),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new gt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},ei={init:function(){this.setColour(Ge),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(gt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_COMPARETO_HELP)}},ii={init:function(){var t=[[gt.Msg.TEXT_UPPER,"upper"],[gt.Msg.TEXT_TITLE,"title"],[gt.Msg.TEXT_CAPITALIZE,"capitalize"],[gt.Msg.TEXT_SWAPCASE,"swapcase"],[gt.Msg.TEXT_LOWER,"lower"]];this.setColour(Ge),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new gt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:gt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:gt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:gt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:gt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:gt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},ni={init:function(){var t=[[gt.Msg.TEXT_LJUST,"ljust"],[gt.Msg.TEXT_CENTER,"center"],[gt.Msg.TEXT_RJUST,"rjust"]];this.setColour(Ge),this.appendValueInput("VAR").appendField(new gt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(gt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(gt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},si={init:function(){this.setColour(Ge),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(gt.Msg.MIXLY_MID+gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(gt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},_i={init:function(){this.setColour(Ge),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(gt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(gt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},oi={init:function(){this.setColour(Ge),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(gt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(gt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},pi={init:function(){this.setColour(Ge),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(gt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(gt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(gt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},ai={init:function(){var t=[[gt.Msg.TEXT_TRIM_BOTH,"strip"],[gt.Msg.TEXT_TRIM_LEFT,"lstrip"],[gt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Ge),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(gt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new gt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(gt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:gt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:gt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:gt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},ui={init:function(){this.setColour(Ge),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new gt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new gt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(gt.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},on={init:function(){this.setColour(sn),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(gt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},pn={init:function(){this.setColour(sn),this.appendDummyInput().appendField(gt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},an={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.DICT_KEYS),this.setTooltip(gt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},un={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(gt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(gt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(gt.Msg.DICTS_GET_TOOLTIP)}},rn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(gt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(gt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(gt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(gt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},ln={init:function(){this.setColour(sn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(gt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(gt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},dn={init:function(){this.setColour(sn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(gt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(gt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.DICTS_DELETE_TOOLTIP)}},In={init:function(){this.setColour(sn),this.appendValueInput("DICT2").setCheck("Dict").appendField(gt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(gt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MID),this.setTooltip(gt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.DICT_CLEAR),this.setTooltip(gt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Mn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.DICT_ITEMS),this.setTooltip(gt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},hn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.DICT_VALUES),this.setTooltip(gt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},mn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_LENGTH),this.setTooltip(gt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},En={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.DICT_DELDICT),this.setTooltip(gt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},On={init:function(){this.MODE=[[gt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[gt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(gt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(gt.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=gt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=gt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==gt.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new gt.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},Rn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(gt.Msg.DICTS_ADD_VALUE),this.setTooltip(gt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},cn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(gt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(gt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},gn={init:function(){this.setColour(sn),this.appendDummyInput("").appendField(new gt.FieldLabel(gt.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new gt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(gt.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Cn={init:function(){this.setColour(sn),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(gt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Sn={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_TO_JSON),this.setTooltip(gt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},An={init:function(){this.setColour(sn),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(gt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Ln={init:function(){this.setColour(sn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Nn={init:function(){this.setColour(sn),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_TO_JSON),this.setTooltip(gt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Dn=210,fn={init:function(){var t=gt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Dn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new gt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:gt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:gt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:gt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:gt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:gt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:gt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},Fn={init:function(){var t=gt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=gt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Dn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new gt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new gt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Pn={init:function(){var t=[[gt.Msg.LOGIC_OPERATION_AND,"AND"],[gt.Msg.LOGIC_OPERATION_OR,"OR"],[gt.Msg.LOGIC_OPERATION_NOR,"NOR"],[gt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Dn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new gt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:gt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:gt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:gt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:gt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},Yn={init:function(){this.setColour(Dn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(gt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(gt.Msg.LOGIC_NEGATE_TOOLTIP)}},vn={init:function(){var t=[[gt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[gt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Dn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new gt.FieldDropdown(t),"BOOL"),this.setTooltip(gt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Xn={init:function(){this.setColour(Dn),this.setOutput(!0),this.appendDummyInput().appendField(gt.Msg.LOGIC_NULL),this.setTooltip(gt.Msg.LOGIC_NULL_TOOLTIP)}},yn={init:function(){this.setColour(Dn),this.appendValueInput("A"),this.appendValueInput("B").appendField(gt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(gt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},xn={init:function(){var t=[[gt.Msg.TEXT_APPEND_TO,"in"],[gt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Dn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new gt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(gt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(gt.Msg.IN)}},bn={init:function(){var t=[[gt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[gt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Dn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new gt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},Vn={init:function(){this.setColour(Dn),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(gt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Bn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(gt.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Gn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=gt.Msg.MIXLY_USE,n=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=gt.Msg.MIXLY_BELONG;return i+{r:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Un={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=gt.Msg.MIXLY_USE,n=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=gt.Msg.MIXLY_BELONG,o=gt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},wn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(gt.Msg.MIXPY_TEXT_ENCODE).appendField(new gt.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=gt.Msg.MIXLY_USE,n=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=gt.Msg.MIXLY_BELONG,o=gt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},kn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+gt.Msg.MIXLY_MICROBIT_TYPE_STRING+gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Wn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},Kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(gt.Msg.MICROBIT_PYTHON_TYPE)}},Jn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(gt.Msg.HTML_FILE),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},qn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Qn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},zn={init:function(){this.setColour(0),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};gt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const jn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},$n={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+gt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},ts={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},es={init:function(){this.setColour(0),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},is={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return gt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+gt.Msg.MIXLY_ESP32_SET+{mkdir:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},ns={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(gt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},ss={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},_s={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.HTML_FILE,"isfile"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return gt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+gt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},os={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(gt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SETUP+gt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(gt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ps={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(gt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},as={init:function(){var t=gt.Procedures.findLegalName("",this),e=new gt.FieldTextInput(t,gt.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new gt.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&>.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(gt.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(gt.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(gt.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(gt.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=gt.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),gt.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{gt.Events.enable()}},mutationToDom:function(t){var e=gt.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(gt.Msg.MIXLY_AIP_ATTR).setAlign(gt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},i_={init:function(){this.setColour(zs),this.appendDummyInput().appendField(gt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},n_={init:function(){this.setColour(zs),this.appendDummyInput().appendField(gt.Msg.HTML_FORM_CONTENT).appendField(new gt.FieldDropdown([[gt.Msg.HTML_TEXT,"text"],[gt.Msg.HTML_EMAIL,"email"],[gt.Msg.HTML_NUMBER,"number"],[gt.Msg.HTML_PASSWORD,"password"],[gt.Msg.HTML_CHECKBOX,"checkbox"],[gt.Msg.HTML_RADIOBUTTON,"radiobutton"],[gt.Msg.HTML_BUTTON,"button"],[gt.Msg.HTML_COLOUR,"colour"],[gt.Msg.HTML_DATE,"date"],[gt.Msg.HTML_LOCALTIME,"local time"],[gt.Msg.HTML_FILE,"file"],[gt.Msg.HTML_HIDDEN,"hidden"],[gt.Msg.HTML_IMAGE,"image"],[gt.Msg.HTML_MONTH,"month"],[gt.Msg.HTML_RANGE,"range"],[gt.Msg.HTML_RESET,"reset"],[gt.Msg.HTML_SEARCH,"search"],[gt.Msg.HTML_SUBMIT,"submit"],[gt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[gt.Msg.HTML_TIME,"time"],[gt.Msg.HTML_URL,"url"],[gt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(gt.Msg.HTML_NAME).appendField(new gt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(gt.Msg.HTML_VALUE).appendField(new gt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(gt.Msg.MIXLY_AIP_ATTR).setAlign(gt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},s_={init:function(){this.setColour(zs),this.appendDummyInput().appendField(new gt.FieldTextInput("property"),"KEY").appendField(":").appendField(new gt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},__={init:function(){this.setColour(zs),this.appendDummyInput().appendField(new gt.FieldTextInput("property"),"KEY").appendField(":").appendField(new gt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},o_={init:function(){this.setColour(zs),this.appendDummyInput().appendField(gt.Msg.HTML_TEXT).appendField(new gt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},p_=160,a_={init:function(){this.setColour(p_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new gt.FieldTable(""),"TEXT")}},u_={init:function(){this.setColour(p_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new gt.FieldMultilineInput(""),"TEXT")}},r_={init:function(){this.setColour(p_),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new gt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},l_={init:function(){this.setColour(p_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},d_={init:function(){this.setColour(p_),this.appendDummyInput().appendTitle("Comment:").appendTitle(new gt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},I_={init:function(){this.setColour(p_),this.appendValueInput("VALUE").appendField(gt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},T_={init:function(){this.setColour(p_),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new gt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(gt.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=gt.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+t+", "+e+", "+i+")"},gt.isNumber(n)&>.isNumber(s)&>.isNumber(_))n=parseFloat(n),s=parseFloat(s),_=Math.abs(parseFloat(_)),0==n%1&&0==s%1&&0==_%1?(n<=s?(s++,t=0==n&&1==_?s:n+", "+s,1!=_&&(t+=", "+_)):t=n+", "+--s+", -"+_,t="range("+t+")"):(t=n",GTE:">="};const ua=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",_=e.valueToCode(this,"B",n)||"False";if("AND"==i)var o=s+" and "+_;else if("OR"==i)o=s+" or "+_;else if("NOR"==i)o="not("+s+"^"+_+")";else o=s+"^"+_;return[o,n]},ra=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},la=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},da=function(t,e){return["None",e.ORDER_ATOMIC]},Ia=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},Ta=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},Ma=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},ha=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},ma=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Ea=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Oa=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Ra=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ca=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},ga=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Ca=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Sa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Aa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},La=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},Na=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Da=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},fa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Fa=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Pa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Ya=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},va=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Xa=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},ya=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},xa=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},ba=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},Va=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Ba=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},Ga=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),gt.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var _=[],o=0;o\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},cu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},gu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},Cu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Su=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Au=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Lu=function(t,e){return'"},Nu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Du=function(){return this.getFieldValue("TEXT")+"\n"},fu=function(t){return t.getFieldValue("TEXT")+"\n"},Fu=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Pu=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Yu=function(){return""},vu=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Xu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n")},Vu.scrubNakedValue=function(t){return t+"\n"},Vu.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},Vu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Vu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=gt.utils.string.wrap(_,Vu.COMMENT_WRAP-3),n+=Vu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const Bu="#74A55B",Gu={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_RGB_PIN_COUNT)}},Uu={init:function(){this.setColour(Bu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(gt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},wu={init:function(){this.setColour(Bu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(gt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},ku={init:function(){this.setColour(Bu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(gt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Hu={init:function(){this.setColour(Bu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(gt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(gt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Wu={init:function(){this.setColour(Bu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Ku={init:function(){this.setColour(Bu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_RESET)}},Ju={init:function(){this.setColour(Bu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qu={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING).appendField(gt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Qu={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(gt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},zu={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(gt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},ju={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING).appendField(gt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},$u={init:function(){this.setColour(Bu),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_SETUP+gt.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Zu={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_SERVO).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SERVO_MOVE)}},tr={init:function(){this.setColour(Bu),this.appendValueInput("VAR").appendField("360°"+gt.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_SETTING+gt.Msg.blockpy_turtle_rotate+gt.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},er={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).appendField("180°"+gt.Msg.MIXLY_SERVO).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SERVO_MOVE)}},ir={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).appendField("360°"+gt.Msg.MIXLY_SERVO).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},nr={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).appendField("180°"+gt.Msg.MIXLY_SERVO).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},sr={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).appendField("360°"+gt.Msg.MIXLY_SERVO).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET+gt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},_r={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new gt.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(gt.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},or={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Direction).appendField(new gt.FieldDropdown([[gt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[gt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[gt.Msg.MOTOR_N,"ms32006.MOT_N"],[gt.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},pr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new gt.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Direction).appendField(new gt.FieldDropdown([[gt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[gt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},ar={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_RGB_PIN_COUNT)}},ur={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},rr={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},lr={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_WRI)}},dr={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.MIXLY_DURATION).appendField(gt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Ir={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.PYTHON_RANGE_STEP).appendField(gt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Tr={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(gt.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new gt.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SETUP+gt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new gt.FieldDropdown([["SYN6288"+gt.Msg.MIXLY_AipSpeech_synthesis,"SYN6288"],["NS9300"+gt.Msg.MIXLY_MUSIC_PLAYER,"NS9300"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Mr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_GET+gt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_WHETHER).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_STOPPED,"0"],[gt.Msg.MIXLY_PLAYING,"1"],[gt.Msg.MIXLY_PAUSED,"2"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},hr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_STAT).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MP3_PLAY,"1"],[gt.Msg.MIXLY_MP3_PAUSE,"2"],[gt.Msg.MIXLY_STOP,"3"],[gt.Msg.MIXLY_MP3_PREV,"4"],[gt.Msg.MIXLY_MP3_NEXT,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendValueInput("volume").appendField(gt.Msg.MIXLY_MP3_VOL+gt.Msg.MIXLY_STAT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_PLAYER_SET_VOLUME_TOOLTIP)}},Er={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MODE+gt.Msg.MIXLY_STAT).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MP3_LOOP_ALL,"0"],[gt.Msg.MIXLY_MP3_LOOP_ONE,"1"],[gt.Msg.MIXLY_PLAYER_DIRECTORY_LOOP,"2"],[gt.Msg.MIXLY_MP3_LOOP_RAM,"3"],[gt.Msg.MIXLY_PLAYER_SINGLE_STOP,"4"],[gt.Msg.MIXLY_PLAYER_SEQUENTIAL_PLAY,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Or={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_START_MELODY,"play"],[gt.Msg.MIXLY_PLAYER_INSERT_MUSIC,"insert"]]),"key"),this.appendValueInput("song"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_PLAYER_PLAY_MUSIC_TOOTIP)}},Rr={},cr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(gt.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},gr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Cr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(gt.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(gt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},Sr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(gt.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(gt.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(gt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},Ar={init:function(){this.setColour(Bu),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Lr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_MOTOR).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Nr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_MOTOR).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_GET+gt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Dr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_TRAFFIC_LIGHT).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.LISTS_SET_INDEX_SET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[gt.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[gt.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[gt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[gt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[gt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[gt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN).appendField(new gt.FieldDropdown([[gt.Msg.COLOUR_RGB_WHITE,"W"],[gt.Msg.COLOUR_RGB_RED,"R"],[gt.Msg.COLOUR_RGB_YELLOW,"Y"],[gt.Msg.COLOUR_RGB_GREEN,"G"],[gt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Fr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN).appendField(new gt.FieldDropdown([[gt.Msg.COLOUR_RGB_WHITE,"W"],[gt.Msg.COLOUR_RGB_RED,"R"],[gt.Msg.COLOUR_RGB_YELLOW,"Y"],[gt.Msg.COLOUR_RGB_GREEN,"G"],[gt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET+gt.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Pr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_SERVO_MOTOR).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[gt.Msg.MIXLY_SPEED,"[1]"],[gt.Msg.MATH_SINGLE_OP_ABSOLUTE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[gt.Msg.MIXLY_RELATIVE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[gt.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[gt.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[gt.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Yr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_SERVO_MOTOR).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[gt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[gt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_SERVO_MOTOR).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Xr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_SERVO_MOTOR).appendField(gt.Msg.MATH_SINGLE_OP_ABSOLUTE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+gt.Msg.MSG.run).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MODE).setAlign(gt.inputs.Align.RIGHT).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_SPEED+gt.Msg.MIXLY_MODE,"0"],[gt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+gt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(gt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(gt.inputs.Align.RIGHT).appendField(new gt.FieldDropdown([[gt.Msg.CLOCKWISE,"0"],[gt.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[gt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},yr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_SERVO_MOTOR).appendField(gt.Msg.MIXLY_RELATIVE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+gt.Msg.MSG.run).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},xr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_SERVO_MOTOR).appendField(gt.Msg.MIXLY_RELATIVE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+gt.Msg.MSG.run).appendField("("+gt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MODE).setAlign(gt.inputs.Align.RIGHT).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_SPEED+gt.Msg.MIXLY_MODE,"0"],[gt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+gt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(gt.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},br={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.ME_GO_MOTOR_EXTERN+gt.Msg.MIXLY_SERVO_MOTOR).appendField(gt.Msg.MIXLY_RELATIVE+gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+gt.Msg.MSG.run).appendField("("+gt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LEFT,"0"],[gt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MODE).setAlign(gt.inputs.Align.RIGHT).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_SPEED+gt.Msg.MIXLY_MODE,"0"],[gt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+gt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(gt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(gt.inputs.Align.RIGHT).appendField(new gt.FieldDropdown([[gt.Msg.CLOCKWISE,"0"],[gt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Vr={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.MIXBOT).appendField(gt.Msg.ME_GO_MOTOR_EXTERN).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MOTOR,"ext_motor"],[gt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[gt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[gt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[gt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[gt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[gt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[gt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},Br={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.MIXBOT).appendField(gt.Msg.ME_GO_MOTOR_EXTERN).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MOTOR,"ext_motor"],[gt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[gt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[gt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[gt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[gt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[gt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[gt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Gr={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_SETUP+gt.Msg.MIXLY_AT).appendField(gt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Ur={init:function(){this.setColour(Bu),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING),this.appendValueInput("pin").appendField("LED"),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},wr={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_SERVO+gt.Msg.MIXLY_SETUP+gt.Msg.MIXLY_AT).appendField(gt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},kr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_SERVO),this.appendValueInput("angle").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE),this.appendDummyInput().appendField(gt.Msg.DRAW_POINTER_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Hr={init:function(){this.setColour(Bu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_MOTOR+gt.Msg.MIXLY_SETUP+gt.Msg.MIXLY_AT).appendField(gt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Wr={init:function(){this.setColour(Bu),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MOTOR),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+gt.Msg.MIXLY_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Kr="#6C9858",Jr={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(new gt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},qr={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_ESP32_ON,"1"],[gt.Msg.MIXLY_ESP32_OFF,"0"],[gt.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Qr={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(gt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_SETONOFF)}},zr={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(gt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(gt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},jr={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(gt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},$r={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(gt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_SETTING+gt.Msg.MIXLY_BUILDIN_LED+gt.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},Zr={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(gt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(gt.Msg.MIXLY_LCD_SETCOLOR).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_LIGHT_RED,"1"],[gt.Msg.MIXLY_LIGHT_GREEN,"2"],[gt.Msg.MIXLY_LIGHT_BLUE,"3"],[gt.Msg.MIXLY_LIGHT_YELLOW,"4"],[gt.Msg.MIXLY_LIGHT_CYAN,"5"],[gt.Msg.MIXLY_LIGHT_PURPLE,"6"],[gt.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},tl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING).appendField(gt.Msg.MIXLY_BUILDIN_LED).appendField(new gt.FieldDropdown([[gt.Msg.COLOUR_RGB_RED,"r"],[gt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_SETONOFF)}},el={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(gt.Msg.MIXLY_BUILDIN_LED).appendField(new gt.FieldDropdown([[gt.Msg.COLOUR_RGB_RED,"r"],[gt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(gt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},il={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(gt.Msg.MIXLY_BUILDIN_LED).appendField(new gt.FieldDropdown([[gt.Msg.COLOUR_RGB_RED,"r"],[gt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},nl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING).appendField(gt.Msg.MIXLY_BUILDIN_LED).appendField(new gt.FieldDropdown([[gt.Msg.COLOUR_RGB_RED,"r"],[gt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_SETTING+gt.Msg.MIXLY_BUILDIN_LED+gt.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},sl={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(new gt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},_l={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Ct.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(gt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(gt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(gt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},ol={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},pl={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.MIXLY_DURATION).appendField(gt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},al={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(gt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.PYTHON_RANGE_STEP).appendField(gt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ul={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_WRI)}},rl={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Ct.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(gt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(gt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(gt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},ll={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},dl={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(gt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.PYTHON_RANGE_STEP).appendField(gt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Il={init:function(){this.setColour(Kr),this.appendValueInput("TICKS").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(gt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(gt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Tl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Ml={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_RESET)}},hl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(gt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},ml={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(gt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},El={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ol={init:function(){this.setColour(Kr),this.appendValueInput("LIST").appendField(gt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Rl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MOTOR_DC).appendField(new gt.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Direction).appendField(new gt.FieldDropdown([[gt.Msg.CLOCKWISE,"CW"],[gt.Msg.ANTI_CLOCKWISE,"CCW"],[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField("MixGo Car").appendField(new gt.FieldDropdown([[gt.Msg.blockpy_forward,"F"],[gt.Msg.blockpy_backward,"B"],[gt.Msg.blockpy_left,"L"],[gt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},gl={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField("MixGo Car").appendField(new gt.FieldDropdown([[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Cl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MOTOR_DC).appendField(new gt.FieldDropdown([[gt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[gt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Direction).appendField(new gt.FieldDropdown([[gt.Msg.CLOCKWISE,"CW"],[gt.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Sl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MOTOR_DC).appendField(new gt.FieldDropdown([[gt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[gt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(gt.Msg.MIXLY_STOP).appendField(new gt.FieldDropdown([[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Al={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Ll={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXBOT).appendField(new gt.FieldDropdown([[gt.Msg.blockpy_forward,"F"],[gt.Msg.blockpy_backward,"B"],[gt.Msg.blockpy_left,"L"],[gt.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[gt.Msg.MIXLY_SPEED,"SPEED"],[gt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Nl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXBOT).appendField(new gt.FieldDropdown([[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXBOT).appendField(gt.Msg.MIXLY_MOTOR).appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"1"],[gt.Msg.TEXT_TRIM_RIGHT,"2"],[gt.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[gt.Msg.MIXLY_SPEED,"SPEED"],[gt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},fl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[gt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Fl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.BITBOT).appendField(new gt.FieldDropdown([[gt.Msg.blockpy_forward,"F"],[gt.Msg.blockpy_backward,"B"],[gt.Msg.blockpy_left,"L"],[gt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Pl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.BITBOT).appendField(new gt.FieldDropdown([[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Yl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.BITBOT).appendField(gt.Msg.MIXLY_MOTOR).appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"0"],[gt.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Direction).appendField(new gt.FieldDropdown([[gt.Msg.CLOCKWISE,"CW"],[gt.Msg.ANTI_CLOCKWISE,"CCW"],[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vl={init:function(){this.setColour(Kr),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Xl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},yl={init:function(){this.setColour(Kr),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_SETTING+gt.Msg.MIXLY_MIXBOT_BUZZER+gt.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_SETONOFF)}},xl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET+gt.Msg.MIXLY_MIXBOT_BUZZER+gt.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},bl={init:function(){this.setColour(Kr),this.appendValueInput("PATH").appendField(gt.Msg.MIXLY_RECORD_AUDIO).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(gt.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Vl={init:function(){this.setColour(Kr),this.appendValueInput("PATH").appendField(gt.Msg.MIXLY_PLAY_AUDIO).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Bl={init:function(){this.setColour(Kr),this.appendValueInput("PATH").appendField(gt.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Gl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(gt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Ul={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.LISTS_SET_INDEX_SET+gt.Msg.ME_GO_MOTOR_EXTERN).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([["1","1"],["2","2"],["3","3"],["4","4"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.blynk_IOT_IR_POWER+gt.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},kl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET+gt.Msg.ME_GO_MOTOR_EXTERN).appendField(gt.Msg.PIN_NUMBERING).appendField(new gt.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.blynk_IOT_IR_POWER+gt.Msg.MIXLY_PINMODEOUT+gt.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Hl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.LISTS_SET_INDEX_SET+gt.Msg.ME_GO_MOTOR_EXTERN).appendField(gt.Msg.MIXLY_ALL+gt.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(gt.ALIGN_RIGHT).appendField(gt.Msg.blynk_IOT_IR_POWER+gt.Msg.MIXLY_PINMODEOUT+gt.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Wl={init:function(){this.setColour(Kr),this.appendDummyInput().appendField(gt.Msg.ANALOG+gt.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(gt.Msg.MIXLY_RELEASE).appendField(new gt.FieldDropdown([[gt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[gt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.ANALOG+gt.Msg.MIXLY_KEYBOARD_INPUT)}},Kl={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SPECIAL_KEY).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[gt.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[gt.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[gt.Msg.MIXLY_SPECIAL_KEY4,"0x04"],[gt.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[gt.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[gt.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[gt.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[gt.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},Jl={init:function(){this.setColour(Kr),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GENERAL_KEY).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],["A","0x04"],["B","0x05"],["C","0x06"],["D","0x07"],["E","0x08"],["F","0x09"],["G","0x0A"],["H","0x0B"],["I","0x0C"],["J","0x0D"],["K","0x0E"],["L","0x0F"],["M","0x10"],["N","0x11"],["O","0x12"],["P","0x13"],["Q","0x14"],["R","0x15"],["S","0x16"],["T","0x17"],["U","0x18"],["V","0x19"],["W","0x1A"],["X","0x1B"],["Y","0x1C"],["Z","0x1D"],["1 !","0x1E"],["2 @","0x1F"],["3 #","0x20"],["4 $","0x21"],["5 %","0x22"],["6 ^","0x23"],["7 &","0x24"],["8 *","0x25"],["9 (","0x26"],["0 )","0x27"],["ENTER","0x28"],["ESC","0x29"],["BACKSPACE","0x2A"],["TAB","0x2B"],["SPACE","0x2C"],["- _","0x2D"],["= +","0x2E"],["[ {","0x2F"],["] }","0x30"],["\\ |","0x31"],["; :","0x33"],["' \"","0x34"],["` ~","0x35"],[", <","0x36"],[". >","0x37"],["/ ?","0x38"],["CAPS_LOCK","0x39"],["F1","0x3A"],["F2","0x3B"],["F3","0x3C"],["F4","0x3D"],["F5","0x3E"],["F6","0x3F"],["F7","0x40"],["F8","0x41"],["F9","0x42"],["F10","0x43"],["F11","0x44"],["F12","0x45"],["PRINTSCREEN","0x46"],["SCROLL_LOCK","0x47"],["PAUSE","0x48"],["INSERT","0x49"],["HOME","0x4A"],["PAGE_UP","0x4B"],["DELETE","0x4C"],["END","0x4D"],["PAGE_DOWN","0x4E"],["RIGHT","0x4F"],["LEFT","0x50"],["DOWN","0x51"],["UP","0x52"],["NUM_LOCK","0x53"],["/","0x54"],["*","0x55"],["-","0x56"],["+","0x57"],["ENTER","0x58"],["1","0x59"],["2","0x5A"],["3","0x5B"],["4","0x5C"],["5","0x5D"],["6","0x5E"],["7","0x5F"],["8","0x60"],["9","0x61"],["0","0x62"],[".","0x63"]]),"op"),this.setOutput(!0)}},ql={init:function(){this.setColour(Kr),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new gt.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(gt.Msg.GENERALKEY_TUPLE_CREATE_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("generalkey_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;nnew Array(32).fill(0)))},xm={init:function(){this.jsonInit({colour:Lm,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:gt.Msg.MIXLY_MICROBIT_Built_in_image1,message0:gt.Msg.MIXLY_MICROBIT_Built_in_image})}},bm={init:function(){this.setColour(Lm),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new gt.FieldDropdown(Ct.Profile.default.builtinimg),"image"),this.setOutput(!0,["esp32_image","List"])}},Vm={init:function(){this.setColour(Lm),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(gt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new gt.FieldDropdown(Vm.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":gt.Msg.MIXLY_MICROBIT_image_add,"-":gt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[gt.Msg.MICROBIT_DISPLAY_UNION,"add"],[gt.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Bm={init:function(){this.setColour(Lm),this.appendValueInput("A").setCheck("esp32_image").appendField(gt.Msg.MIXLY_MICROBIT_Invert_image1),this.setInputsInline(!0),this.setOutput(!0,"esp32_image")}},Gm={init:function(){this.setColour(Lm),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(gt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(gt.Msg.DISPLAY_IMAGE_LET2).appendField(new gt.FieldDropdown(Gm.OPERATORS),"OP"),this.appendValueInput("val").appendField(gt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.DISPLAY_IMAGE_UNIT);Ct.Boards.getSelectedBoardKey();"Python ESP32-S3"===Ct.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(gt.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=gt.Msg.DISPLAY_IMAGE_LET,n=gt.Msg.DISPLAY_IMAGE_LET2,s=gt.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:gt.Msg.MIXLY_UP,shift_down:gt.Msg.MIXLY_DOWN,shift_left:gt.Msg.MIXLY_LEFT,shift_right:gt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[gt.Msg.MIXLY_UP,"shift_up"],[gt.Msg.MIXLY_DOWN,"shift_down"],[gt.Msg.MIXLY_LEFT,"shift_left"],[gt.Msg.MIXLY_RIGHT,"shift_right"]]},Um={init:function(){this.setColour(Lm),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},wm={init:function(){this.setColour(Lm),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},km={init:function(){this.setColour(Lm),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Hm={init:function(){this.setColour(Lm),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},Wm={init:function(){this.setColour(Lm),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Clear_display);Ct.Boards.getSelectedBoardKey();"Python ESP32-S3"===Ct.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(gt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Clear_display)}},Km={init:function(){this.setColour(Lm),this.appendDummyInput().appendField(gt.Msg.MIXLY_SHOW+gt.Msg.MIXLY_DISPLAY_MATRIX_WRITE_NOW),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Jm={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<8;i++)e.appendField(new gt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Lm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},qm={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(gt.inputs.Align.CENTRE).appendField(new gt.FieldBitmap(qm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Lm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},Qm={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new gt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Lm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},zm={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(gt.inputs.Align.CENTRE).appendField(new gt.FieldBitmap(zm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Lm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},jm={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<16;i++)e.appendField(new gt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,"esp32_image"),this.setColour(Lm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},$m={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(gt.inputs.Align.CENTRE).appendField(new gt.FieldBitmap($m.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Lm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},Zm={init:function(){this.setColour(Lm),this.appendDummyInput().appendField(gt.Msg.OLED_SET_FONT).appendField(new gt.FieldDropdown(Zm.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+gt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+gt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+gt.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},tE={init:function(){this.setColour(Lm),this.appendValueInput("data").appendField(gt.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.OLED_BITMAP_OR_STRING)}},eE={init:function(){this.setColour(Lm),this.appendValueInput("data").appendField(gt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.OLED_BITMAP_OR_STRING)}},iE={init:function(){this.setColour(Lm),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(gt.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.OLED_BITMAP_OR_STRING)}},nE={init:function(){this.setColour(Lm),this.appendValueInput("data").setCheck(String).appendField(gt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(gt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(gt.Msg.TEXT_CENTER).appendField(new gt.FieldDropdown([[gt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[gt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},sE={init:function(){this.setColour(Lm),this.appendValueInput("data").setCheck(String).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(gt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},_E={init:function(){this.setColour(Lm),this.appendValueInput("data").setCheck(String).appendField(gt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},oE={init:function(){this.setColour(Lm),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},pE={init:function(){this.jsonInit({colour:Lm,args0:[{name:"state",options:[[gt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[gt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"shape",options:[[gt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[gt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"}],inputsInline:!0,helpUrl:gt.Msg.mpython_HELPURL,tooltip:gt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:gt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},aE={init:function(){this.jsonInit({colour:Lm,args0:[{name:"state",options:[[gt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[gt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"dir_h_v",options:[[gt.Msg.mpython_vertical,"0"],[gt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"}],inputsInline:!0,helpUrl:gt.Msg.mpython_HELPURL,tooltip:gt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:gt.Msg.MPYTHON_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},uE={init:function(){this.jsonInit({colour:Lm,args0:[{name:"state",options:[[gt.Msg.mpython_display_hline_1,"1"],[gt.Msg.mpython_display_hline_0,"0"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"}],inputsInline:!0,helpUrl:gt.Msg.mpython_HELPURL,tooltip:gt.Msg.mpython_display_line_TOOLTIP,message0:gt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},rE={init:function(){this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new gt.FieldDropdown(rE.IMAGES),"path"),this.setColour(Lm),this.setOutput(!0)},IMAGES:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]]},lE={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<5;i++)e.appendField(new gt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Lm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},dE={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(gt.inputs.Align.CENTRE).appendField(new gt.FieldBitmap(dE.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Lm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},IE={init:function(){this.setColour(Lm),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},TE={init:function(){this.setColour(Lm),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_AMBIENTBRIGHT),this.setInputsInline(!0),this.setOutput(!0,Number)}},ME={init:function(){this.setColour(Lm),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},hE={init:function(){this.setColour(Lm),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new gt.FieldDropdown(hE.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[gt.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[gt.Msg.CLOCKWISE+"90"+gt.Msg.blockpy_setheading_degree,"1"],[gt.Msg.CLOCKWISE+"180"+gt.Msg.blockpy_setheading_degree,"2"],[gt.Msg.CLOCKWISE+"270"+gt.Msg.blockpy_setheading_degree,"3"]]},mE={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<12;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new gt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Lm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},EE={init:function(){this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(gt.inputs.Align.CENTRE).appendField(new gt.FieldBitmap(EE.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Lm),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},OE={init:function(){this.setColour(Lm),this.appendValueInput("data").appendField(gt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(gt.Msg.HTML_COLOUR);Ct.Boards.getSelectedBoardKey();"Python ESP32-S3"===Ct.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(gt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},RE={init:function(){this.setColour(Lm),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.OLED_BITMAP).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("direct").setCheck(String).appendField(gt.Msg.MIXLY_AipImageClassify_Image+gt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cE={init:function(){this.setColour(Lm),this.appendValueInput("data").setCheck(String).appendField(gt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(gt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(gt.Msg.TEXT_CENTER).appendField(new gt.FieldDropdown([[gt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[gt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.appendValueInput("VAR").appendField(gt.Msg.HTML_COLOUR);Ct.Boards.getSelectedBoardKey();"Python ESP32-S3"===Ct.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(gt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},gE={init:function(){this.setColour(Lm),this.appendValueInput("data").setCheck(String).appendField(gt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.appendValueInput("VAR").appendField(gt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},CE={init:function(){this.jsonInit({colour:Lm,args0:[{name:"shape",options:[[gt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[gt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:gt.Msg.mpython_HELPURL,tooltip:gt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:gt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},SE={init:function(){this.jsonInit({colour:Lm,args0:[{name:"dir_h_v",options:[[gt.Msg.mpython_vertical,"0"],[gt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:gt.Msg.mpython_HELPURL,tooltip:gt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:gt.Msg.ONBOARD_TFT_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},AE={init:function(){this.jsonInit({colour:Lm,args0:[{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:gt.Msg.mpython_HELPURL,tooltip:gt.Msg.mpython_display_line_TOOLTIP,message0:gt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},LE={init:function(){this.setColour(Lm),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(gt.Msg.HTML_COLOUR),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},NE={init:function(){this.setColour(Lm),this.appendValueInput("x").setCheck(Number).appendField(gt.Msg.MIXLY_LCD_SETCOLOR).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("VAR").appendField(gt.Msg.HTML_COLOUR);Ct.Boards.getSelectedBoardKey();"Python ESP32-S3"===Ct.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(gt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},DE={init:function(){this.setColour(Lm),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_SCREEN_FILL);Ct.Boards.getSelectedBoardKey();"Python ESP32-S3"===Ct.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(gt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fE={init:function(){this.setColour(Lm),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_INIT_CLOCK),this.appendDummyInput().appendField(gt.Msg.MIXLY_CENTER_POS),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.OLED_CIRCLE_RADIUS),this.appendValueInput("VAR").appendField(gt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},FE={init:function(){this.setColour(Lm),this.appendValueInput("SUB"),this.appendDummyInput().appendField(gt.Msg.GET_RTCTIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},PE={init:function(){this.setColour(Lm),this.appendValueInput("SUB"),this.appendDummyInput().appendField(gt.Msg.SET_TIME),this.appendValueInput("h").setCheck(Number).appendField(gt.Msg.MIXLY_HOUR),this.appendValueInput("m").setCheck(Number).appendField(gt.Msg.MIXLY_MINUTE),this.appendValueInput("s").setCheck(Number).appendField(gt.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},YE={init:function(){this.setColour(Lm),this.appendValueInput("SUB"),this.appendDummyInput().appendField(gt.Msg.DRAW_CLOCK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vE={init:function(){this.setColour(Lm),this.appendValueInput("SUB"),this.appendDummyInput().appendField(gt.Msg.CLEAR_CLOCK),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_STM32_TFT_BACKGROUND_COLOR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},XE={init:function(){this.jsonInit({colour:Lm,args0:[{name:"shape",options:[[gt.Msg.MPYTHON_DISPLAY_HOLLOW,"False"],[gt.Msg.MPYTHON_DISPLAY_SOLID,"True"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"r",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:gt.Msg.mpython_HELPURL,message0:gt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_CIRCLE_MESSAGE0,nextStatement:null,previousStatement:null})}},yE={init:function(){this.setColour(Lm),this.appendDummyInput().appendField(gt.Msg.DRAW_POINTER).appendField(gt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(gt.Msg.MIXLY_DRAW_POINTER_DU),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.DRAW_POINTER_TOOLTIP)}},xE={init:function(){this.setColour(Lm),this.appendDummyInput().appendField(gt.Msg.DRAW_POINTER).appendField(gt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(gt.Msg.MIXLY_DRAW_POINTER_DU),this.appendValueInput("VAR").appendField(gt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.DRAW_POINTER_TOOLTIP)}},bE={init:function(){this.setColour(Lm),this.appendValueInput("data").appendField(gt.Msg.MIXLY_Display_long_text),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(gt.Msg.HTML_COLOUR);Ct.Boards.getSelectedBoardKey();"Python ESP32-S3"===Ct.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(gt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},VE={init:function(){this.setColour(Lm),this.appendValueInput("data").appendField(gt.Msg.OLED_BITMAP),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.OLED_BITMAP_OR_STRING),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},BE={init:function(){fm.init.call(this),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},GE={init:function(){Ym.init.call(this),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},UE={init:function(){Gm.init.call(this),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},wE={init:function(){km.init.call(this),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},kE={init:function(){Hm.init.call(this),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},HE={init:function(){Wm.init.call(this),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},WE=180,KE={init:function(){this.setColour(WE),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(gt.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(gt.Msg.DISPLAY_IMAGE_LET2).appendField(new gt.FieldDropdown(KE.OPERATORS),"OP"),this.appendValueInput("val").appendField(gt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=gt.Msg.DISPLAY_IMAGE_LET,n=gt.Msg.DISPLAY_IMAGE_LET2,s=gt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:gt.Msg.MIXLY_UP,down:gt.Msg.MIXLY_DOWN,left:gt.Msg.MIXLY_LEFT,right:gt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[gt.Msg.MIXLY_UP,"up"],[gt.Msg.MIXLY_DOWN,"down"],[gt.Msg.MIXLY_LEFT,"left"],[gt.Msg.MIXLY_RIGHT,"right"]]},JE={init:function(){this.setColour(WE),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(gt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new gt.FieldDropdown(JE.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":gt.Msg.MIXLY_MICROBIT_image_add,"-":gt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[gt.Msg.MICROBIT_DISPLAY_UNION,"+"],[gt.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},qE={init:function(){this.setColour(WE),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+gt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new gt.FieldDropdown(qE.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+gt.Msg.MIXLY_MICROBIT_IMAGE+{height:gt.Msg.MIXLY_HEIGHT,width:gt.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[gt.Msg.MIXLY_HEIGHT,"height"],[gt.Msg.MIXLY_WIDTH,"width"]]},QE={init:function(){this.setColour(WE),this.appendValueInput("VAR").appendField(gt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RECT).appendField(new gt.FieldDropdown(QE.STATUS),"OP"),this.jsonInit({message0:gt.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_OLED_RECT)},STATUS:[[gt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[gt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},zE={init:function(){this.setColour(WE),this.appendValueInput("VAR").appendField(gt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new gt.FieldDropdown(zE.STATUS),"OP"),this.jsonInit({message0:gt.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[gt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[gt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},jE={init:function(){this.setColour(WE),this.appendValueInput("VAR").appendField(gt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_DISPLAY_DRAW+gt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new gt.FieldDropdown(jE.STATUS),"OP"),this.jsonInit({message0:gt.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(gt.Msg.MIXLY_DISPLAY_DRAW+gt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[gt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[gt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},$E="#777777",ZE={init:function(){this.setColour($E),this.appendDummyInput("").appendField("from ").appendField(new gt.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new gt.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},tO={init:function(){this.setColour($E),this.appendDummyInput("").appendField("import ").appendField(new gt.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},eO={init:function(){this.setColour($E),this.appendDummyInput("").appendField(new gt.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new gt.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},wO={init:function(){this.setColour(yO),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(gt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},kO={init:function(){this.setColour(yO),this.appendDummyInput().appendField(gt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},HO={init:function(){this.setColour(yO),this.appendDummyInput().appendField(gt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},WO={init:function(){this.setColour(yO),this.appendDummyInput().appendField(gt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(gt.Msg.MIXLY_EMQX_SERVER).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(gt.Msg.MIXLY_WIFI_USERNAME).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(gt.Msg.MIXLY_IOT_PASSWORD).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(gt.Msg.MIXLY_EMQX_PROJECT).setAlign(gt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},KO={init:function(){this.setColour(yO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(gt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(gt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(gt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},JO={init:function(){this.setColour(yO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(gt.Msg.MIXLY_EMQX_SUBSCRIBE+gt.Msg.MIXLY_MICROBIT_MSG).appendField(gt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(gt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},qO={init:function(){this.setColour(yO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},QO={init:function(){this.setColour(yO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(gt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zO={init:function(){this.setColour(yO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},jO={init:function(){this.setColour(yO),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(gt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},$O={init:function(){this.setColour(yO),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(gt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},ZO={init:function(){this.setColour(yO),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},tR={init:function(){this.setColour(yO),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},eR={init:function(){this.setColour(yO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(gt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},iR={init:function(){this.setColour(yO),this.appendDummyInput().appendField("MixIO").appendField(gt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(gt.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},nR={init:function(){this.setColour(yO),this.appendDummyInput().appendField(gt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(gt.Msg.MIXLY_EMQX_SERVER).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(gt.Msg.CONTROLS_FOR_INPUT_WITH+gt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(gt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sR={init:function(){this.setColour(yO),this.appendDummyInput().appendField(gt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(gt.Msg.MIXLY_EMQX_SERVER).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(gt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(gt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_R={init:function(){this.VISITOR_ID=Ct.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(yO),this.appendDummyInput("").appendField(new gt.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},oR={init:function(){this.setColour(yO),this.appendDummyInput().appendField("MixIO").appendField(gt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},pR={init:function(){this.setColour(yO),this.appendDummyInput().appendField("HTTP"+gt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(gt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(gt.Msg.MIXLY_REQUESTS_GET).appendField(gt.Msg.MIXLY_GET_CURRENT_TIME).appendField(gt.Msg.MIXLY_OPEN_DEBUG).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},aR={init:function(){this.setColour(yO),this.appendDummyInput().appendField("HTTP"+gt.Msg.MIXLY_Client).appendField(gt.Msg.MIXLY_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[gt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[gt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},uR={init:function(){this.setColour(yO),this.appendDummyInput().appendField("MQTT"+gt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(gt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(gt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(gt.Msg.MQTT_Topic).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(gt.Msg.MIXLY_OPEN_DEBUG).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[gt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},rR={init:function(){this.setColour(yO),this.appendDummyInput().appendField("MQTT"+gt.Msg.MIXLY_Client).appendField(gt.Msg.MIXLY_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[gt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[gt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},lR=xO,dR=bO,IR=VO,TR=BO,MR=UO,hR={init:function(){this.setColour(yO),this.appendDummyInput().appendField(gt.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(gt.Msg.MIXLY_EMQX_SERVER).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(gt.Msg.MODEL_NAME).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(gt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mR=hR,ER={init:function(){this.setColour(yO),this.appendDummyInput().appendField(gt.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(gt.Msg.MIXLY_EMQX_SERVER).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(gt.Msg.MIXLY_API_PRIVATE_KEY).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(gt.Msg.MODEL_NAME).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(gt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},OR={init:function(){this.setColour(yO),this.appendDummyInput().appendField(gt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(gt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(gt.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},RR={init:function(){this.setColour(yO),this.appendDummyInput().appendField(gt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(gt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(gt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},cR={init:function(){this.setColour(yO),this.appendDummyInput().appendField("Ollama "+gt.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gR=225,CR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(gt.Msg.MIXLY_NETWORK_MODE).appendField(new gt.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},SR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[gt.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=gt.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:gt.Msg.MIXLY_NETWORK_WIFI_OPEN,False:gt.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},AR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},LR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return gt.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:gt.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},NR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(gt.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(gt.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},DR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_NETWORK_WIFI_CONNECT+gt.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},fR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[gt.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[gt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return gt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:gt.Msg.MIXLY_ESP32_NETWORK_IP,1:gt.Msg.MIXLY_ESP32_NETWORK_MASK,2:gt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},FR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},PR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[gt.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},YR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(gt.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(gt.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},vR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},XR={init:function(){this.setColour(gR),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new gt.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},yR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},xR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},bR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},VR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},BR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},GR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},UR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},wR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},kR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},HR={init:function(){this.setColour(gR),this.appendValueInput("DOMAIN").appendField(gt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(gt.Msg.blockpy_REQUESTS_GET).appendField(new gt.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},WR={init:function(){this.appendValueInput("VAL"),this.setColour(gR),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new gt.FieldDropdown(WR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:gt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:gt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:gt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[gt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[gt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[gt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[gt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},KR={init:function(){this.appendValueInput("VAR").appendField(gt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(gR),this.appendDummyInput("").appendField(gt.Msg.blockpy_CONDUCT).appendField(new gt.FieldDropdown(KR.METHOD),"DIR"),this.appendDummyInput("").appendField(gt.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:gt.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:gt.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},JR={init:function(){this.setColour(gR),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(gt.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},qR={init:function(){this.setColour(gR),this.appendDummyInput("").appendField(new gt.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},QR="#3288dd",zR={init:function(){this.setColour(QR),this.appendValueInput("URL").appendField(gt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(gt.Msg.blockpy_CONDUCT).appendField(new gt.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(gt.Msg.blockpy_REQUESTS).appendField(gt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},jR={init:function(){this.setColour(QR),this.appendValueInput("URL").appendField(gt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(gt.Msg.blockpy_CONDUCT).appendField(new gt.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(gt.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(gt.Msg.blockpy_REQUESTS+gt.Msg.OLED_STRING),this.appendDummyInput("").appendField(gt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},$R={init:function(){this.appendValueInput("VAL"),this.setColour(QR),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new gt.FieldDropdown($R.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[gt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[gt.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[gt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[gt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[gt.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},ZR={init:function(){this.setColour(QR),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(gt.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(gt.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(gt.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(gt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},tc={init:function(){this.setColour(QR),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(gt.Msg.MIXLY_EMQX_SERVER).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(gt.Msg.MIXLY_EMQX_PORT).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(gt.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(gt.Msg.MIXLY_WIFI_USERNAME).setAlign(gt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(gt.Msg.MIXLY_IOT_PASSWORD).setAlign(gt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ec={init:function(){this.setColour(QR),this.appendValueInput("TOPIC").appendField(gt.Msg.MIXLY_EMQX_SUBSCRIBE+gt.Msg.MIXLY_MICROBIT_MSG).appendField(gt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(gt.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},ic={init:function(){this.setColour(QR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(gt.Msg.MIXLY_EMQX_SUBSCRIBE+gt.Msg.MIXLY_MICROBIT_MSG).appendField(gt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(gt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},nc={init:function(){this.setColour(QR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(gt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(gt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(gt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sc={init:function(){this.setColour(QR),this.appendDummyInput().appendField("mqtt"+gt.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},_c="#A58C5B",oc={init:function(){this.setColour(_c),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_BUTTON).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(gt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_SENOR_IS_PRESSED)}},pc={init:function(){this.setColour(_c),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_BUTTON).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(gt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_SENOR_WAS_PRESSED)}},ac={init:function(){this.setColour(_c),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_BUTTON).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(gt.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.PROCEDURES_DEFRETURN_RETURN+gt.Msg.MIXLY_BUTTON+gt.Msg.MIXLY_GET_PRESSES)}},uc={init:function(){this.setColour(_c),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_BUTTON).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[gt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[gt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},rc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_shake,"shake"],[gt.Msg.MIXLY_UP,"up"],[gt.Msg.MIXLY_DOWN,"down"],[gt.Msg.MIXLY_LEFT,"left"],[gt.Msg.MIXLY_RIGHT,"right"],[gt.Msg.MIXLY_MICROBIT_face_up,"face up"],[gt.Msg.MIXLY_MICROBIT_face_down,"face down"],[gt.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=gt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=gt.Msg.MSG.catSensor,s=gt.Msg.MIXLY_MICROBIT_JS_STATE,_=gt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:gt.Msg.MIXLY_MICROBIT_shake,up:gt.Msg.MIXLY_UP,down:gt.Msg.MIXLY_DOWN,left:gt.Msg.MIXLY_LEFT,right:gt.Msg.MIXLY_RIGHT,"face up":gt.Msg.MIXLY_MICROBIT_face_up,"face down":gt.Msg.MIXLY_MICROBIT_face_down,freefall:gt.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+_}))}},lc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new gt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=gt.Msg.MIXLY_MICROBIT_Direction,s=gt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":gt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},dc={init:function(){this.setColour(_c),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},Ic={init:function(){this.setColour(_c),this.appendValueInput("PIN",Number).appendField(new gt.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ic.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:gt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[gt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[gt.Msg.MIXLY_GETHUMIDITY,"humidity"]]},Tc={init:function(){this.setColour(_c),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},Mc={init:function(){this.setColour(_c),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},hc={init:function(){this.setColour(_c),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"left"],[gt.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(gt.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=gt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=gt.Msg.MIXLY_ESP32_NEAR;return i+{left:gt.Msg.TEXT_TRIM_LEFT,right:gt.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},mc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_ALTITUDE_SENSOR+" BMP280").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[gt.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":gt.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":gt.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},Ec={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+" SHT20").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[gt.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},Oc={init:function(){this.setColour(_c),this.appendValueInput("PIN",Number).appendField("DS18X20 "+gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},Rc={init:function(){this.setColour(_c),this.appendDummyInput("").appendField("LM35"+gt.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(gt.Msg.MIXLY_TOOLTIP_LM35)}},cc={init:function(){this.setColour(_c),this.appendValueInput("I2CSUB").appendField(gt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SETUP+gt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_ESP32_EXTERN_LIGHT+"(LTR308ALS)","LTR308"],[gt.Msg.MIXLY_COLOR_SENSOR+"(LTR381RGB)","LTR381RGB"],[gt.Msg.MIXLY_COLOR_SENSOR+"(UCS12071)","UCS12071"],[gt.Msg.MIXLY_EXTERN_LIGHTUV+"(LTR390UV)","LTR390UV"],[gt.Msg.MIXLY_ALTITUDE_SENSOR+"(HP203X)","HP203X"],[gt.Msg.MIXLY_ALTITUDE_SENSOR+"(SPL06_001)","SPL06_001"],[gt.Msg.MIXLY_ALTITUDE_SENSOR+"(MS5611)","MS5611"],[gt.Msg.MIXLY_ALTITUDE_SENSOR+"(BMP280)","BMP280"],[gt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHTC3)","SHTC3"],[gt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(AHT21)","AHT21"],[gt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHT20)","SHT20"],[gt.Msg.MIXLY_LASER_RANGE_SENSOR+"(VL53L0X)","VL53L0X"],[gt.Msg.MIXLY_GEOMAGNETIC_SENSOR+"(QMC5883L)","QMC5883L"],[gt.Msg.MIXLY_ESP32_MAX30102+"(MAX30102)","MAX30102"],[gt.Msg.HTML_COLOUR+"、"+gt.Msg.MIXLY_ENVIRONMENT_LIGHT+"、"+gt.Msg.MIXLY_NEXT+"、"+gt.Msg.MIXLY_ESP32_APDS9960+"(APDS9960)","APDS9960"],[gt.Msg.MIXLY_NINE_AXIS_SENSOR+"(MPU9250)","MPU9250"],[gt.Msg.MixGo_MPU9250+"(ADXL345)","ADXL345"],["RFID","RFID"],[gt.Msg.MIXLY_RADAR_SENSOR+"(CBR817)","CBR817"],[gt.Msg.MIXLY_AipSpeech_asr+"(CI130X)","CI130X"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},gc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.LISTS_SET_INDEX_SET+gt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(gt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+gt.Msg.MIXLY_DELAY_TIME_RANGE)}},Cc={init:function(){this.setColour(_c),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RADAR).appendField(gt.Msg.LISTS_SET_INDEX_SET+gt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(gt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+gt.Msg.MIXLY_DELAY_TIME_RANGE)}},Sc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},Ac={init:function(){this.setColour(_c),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RADAR).appendField(gt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},Lc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_IDENTIFY_ONCE_AND_SAVE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Nc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_HELLO_XIAOZHI,"1"],[gt.Msg.MIXLY_XIAOZHIXIAOZHI,"2"],[gt.Msg.MIXLY_THE_FIRST,"3"],[gt.Msg.MIXLY_THE_SECOND,"4"],[gt.Msg.MIXLY_THE_THIRD,"5"],[gt.Msg.MIXLY_THE_FOURTH,"6"],[gt.Msg.MIXLY_THE_FIFTH,"7"],[gt.Msg.MIXLY_THE_SIXTH,"8"],[gt.Msg.MIXLY_THE_SEVENTH,"9"],[gt.Msg.MIXLY_THE_EIGHTH,"10"],[gt.Msg.MIXLY_THE_NINTH,"11"],[gt.Msg.MIXLY_THE_TENTH,"12"],[gt.Msg.MIXLY_THE_ELEVENTH,"13"],[gt.Msg.MIXLY_THE_TWELFTH,"14"],[gt.Msg.MIXLY_THE_13TH,"15"],[gt.Msg.MIXLY_THE_14TH,"16"],[gt.Msg.MIXLY_THE_15TH,"17"],[gt.Msg.MIXLY_THE_16TH,"18"],[gt.Msg.MIXLY_THE_17TH,"19"],[gt.Msg.MIXLY_THE_18TH,"20"],[gt.Msg.MIXLY_THE_19TH,"21"],[gt.Msg.MIXLY_THE_20TH,"22"],[gt.Msg.MIXLY_Turn_on_the_lights,"23"],[gt.Msg.MIXLY_Turn_off_the_lights,"24"],[gt.Msg.MIXLY_Turn_up_the_brightness,"25"],[gt.Msg.MIXLY_Turn_down_the_brightness,"26"],[gt.Msg.MIXLY_Set_it_to_red,"27"],[gt.Msg.MIXLY_Set_it_to_orange,"28"],[gt.Msg.MIXLY_Set_it_to_yellow,"29"],[gt.Msg.MIXLY_Set_it_to_green,"30"],[gt.Msg.MIXLY_Set_it_to_cyan,"31"],[gt.Msg.MIXLY_Set_it_to_blue,"32"],[gt.Msg.MIXLY_Set_it_to_purple,"33"],[gt.Msg.MIXLY_Set_it_to_white,"34"],[gt.Msg.MIXLY_Turn_on_the_fan,"35"],[gt.Msg.MIXLY_Turn_off_the_fan,"36"],[gt.Msg.MIXLY_First_gear,"37"],[gt.Msg.MIXLY_Wind_speed_second,"38"],[gt.Msg.MIXLY_Third_gear,"39"],[gt.Msg.MIXLY_Previous,"40"],[gt.Msg.MIXLY_Next_page,"41"],[gt.Msg.MIXLY_Show_smiley_face,"42"],[gt.Msg.MIXLY_Show_crying_face,"43"],[gt.Msg.MIXLY_Show_love,"44"],[gt.Msg.MIXLY_Close_display,"45"],[gt.Msg.MIXLY_Start_execution,"46"],[gt.Msg.MIXLY_FORWARD,"47"],[gt.Msg.MIXLY_BACKWARD,"48"],[gt.Msg.MIXLY_TURNLEFT,"49"],[gt.Msg.MIXLY_TURNRIGHT,"50"],[gt.Msg.MIXLY_STOP,"51"],[gt.Msg.MIXLY_Accelerate,"52"],[gt.Msg.MIXLY_retard,"53"],[gt.Msg.ROTATION_FORWARD,"54"],[gt.Msg.ROTATION_BACKWARD,"55"],[gt.Msg.MIXLY_Query_temperature,"56"],[gt.Msg.MIXLY_Query_humidity,"57"],[gt.Msg.MIXLY_Query_brightness,"58"],[gt.Msg.MIXLY_Query_sound,"59"],[gt.Msg.MIXLY_Query_time,"60"],[gt.Msg.MIXLY_Query_distance,"61"],[gt.Msg.MIXLY_Query_pressure,"62"],[gt.Msg.MIXLY_Query_key,"63"],[gt.Msg.MIXLY_Query_touch,"64"],[gt.Msg.MIXLY_Query_color,"65"]]),"cmd").appendField(gt.Msg.MIXLY_WHETHER+gt.Msg.MIXLY_BE_IDENTIFIED),this.setOutput(!0),this.setInputsInline(!0)}},Dc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_RECOGNIZED_STATE,"status1"],[gt.Msg.MIXLY_WHETHER_BROADCAST,"status2"],[gt.Msg.MIXLY_THE_RECOGNIZED_CMD,"result"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_CI130X_GET_THE_RECOGNIZED_STATE_TOOLTIP)}},fc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MP3_PLAY).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[gt.Msg.MIXLY_WIND_SPEED,"154"],[gt.Msg.MIXLY_HYETAL,"155"],[gt.Msg.MIXLY_TEMPERATURE,"156"],[gt.Msg.MIXLY_Humidity,"157"],[gt.Msg.MIXLY_Altitude,"158"],[gt.Msg.MIXLY_SOUND,"159"],[gt.Msg.MIXLY_BRIGHTNESS,"160"],[gt.Msg.ME_GO_HALL_SENSOR_DISTANCE,"161"],[gt.Msg.MIXLY_SERVO,"162"],[gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"163"],[gt.Msg.MIXLY_BUTTON2,"164"],[gt.Msg.MIXLY_ESP32_TOUCH,"165"],[gt.Msg.MIXLY_PAY,"166"],[gt.Msg.MIXLY_CARSH_CHANGE,"167"],[gt.Msg.MIXLY_COUNTDOWN,"168"],[gt.Msg.MIXLY_TIMING,"169"],[gt.Msg.MIXLY_AT_THE_MOMENT,"170"],[gt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE,"171"],[gt.Msg.MIXLY_FORWARD,"172"],[gt.Msg.MIXLY_BACKWARD,"173"],[gt.Msg.MIXLY_TURNLEFT,"174"],[gt.Msg.MIXLY_TURNRIGHT,"175"],[gt.Msg.MIXLY_STOP,"176"],[gt.Msg.MIXLY_Accelerate,"177"],[gt.Msg.MIXLY_retard,"178"],[gt.Msg.ROTATION_FORWARD,"179"],[gt.Msg.ROTATION_BACKWARD,"180"],[gt.Msg.TUPLE_JOIN,"181"],[gt.Msg.MIXLY_SHOW,"182"],[gt.Msg.MIXLY_LAMPLIGHT,"183"],[gt.Msg.MIXLY_ACCELERATION,"184"]]),"star"),this.appendValueInput("NUM").appendField(gt.Msg.MIXLY_NUMBER),this.appendDummyInput("").appendField(gt.Msg.MIXLY_UNIT).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[gt.Msg.MIXLY_YEAR,"117"],[gt.Msg.MIXLY_MONTH,"118"],[gt.Msg.MIXLY_DAY,"119"],[gt.Msg.MIXLY_HOUR,"120"],[gt.Msg.MIXLY_MINUTE,"121"],[gt.Msg.MIXLY_SECOND,"122"],[gt.Msg.MIXLY_WEEK2,"123"],[gt.Msg.MIXLY_RMB_UNIT,"124"],[gt.Msg.blockpy_setheading_degree,"125"],[gt.Msg.MIXLY_GEAR,"126"],[gt.Msg.MIXLY_LAYER,"127"],[gt.Msg.MIXLY_GRAM,"128"],[gt.Msg.MIXLY_METER,"129"],[gt.Msg.MIXLY_CENTIMETER,"130"],[gt.Msg.MIXLY_MILLIMETER,"131"],[gt.Msg.MIXLY_LUMEN,"132"],[gt.Msg.MIXLY_DECIBEL,"133"],[gt.Msg.MIXLY_hectopascal,"134"],[gt.Msg.MIXLY_PERCENT,"135"],[gt.Msg.MIXLY_CELSIUS,"136"],[gt.Msg.MIXLY_METER_PER_SEC,"137"],[gt.Msg.MIXLY_MICROBIT_Turn_on_display,"138"],[gt.Msg.MIXLY_MICROBIT_Turn_off_display,"139"],[gt.Msg.MIXLY_SUCCESS,"140"],[gt.Msg.MIXLY_FAILED,"141"],[gt.Msg.MIXLY_WRONG,"142"],[gt.Msg.MIXLY_GOOD,"143"],[gt.Msg.MIXLY_blockpy_set_add,"144"],[gt.Msg.MIXLY_DECREASE,"145"],[gt.Msg.COLOUR_RGB_RED,"146"],[gt.Msg.COLOUR_RGB_ORANGE,"147"],[gt.Msg.COLOUR_YELLOW,"148"],[gt.Msg.COLOUR_RGB_GREEN,"149"],[gt.Msg.COLOUR_CYAN,"150"],[gt.Msg.COLOUR_RGB_BLUE,"151"],[gt.Msg.COLOUR_RGB_PURPLE,"152"],[gt.Msg.COLOUR_RGB_WHITE,"153"]]),"end"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Fc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.LISTS_SET_INDEX_SET+gt.Msg.MIXLY_SYSTEM+gt.Msg.MIXLY_CMD).appendField(new gt.FieldDropdown([[gt.Msg.MILXY_ENTER_WAKE_UP,"1"],[gt.Msg.MIXLY_INCREASE_VOLUME,"202"],[gt.Msg.MIXLY_REDUCE_VOLUME,"203"],[gt.Msg.MIXLY_MAX_VOLUME,"204"],[gt.Msg.MIXLY_MINIMUM,"205"],[gt.Msg.MIXLY_OPEN_RESPONSE,"206"],[gt.Msg.MIXLY_CLOSE_RESPONSE,"207"],[gt.Msg.MIXLY_QUIT_WAKE_UP,"208"]]),"cmd"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Pc={init:function(){this.setColour(_c),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[gt.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[gt.Msg.MIXLY_ESP32_MAX30102_IR+","+gt.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Yc={init:function(){this.setColour(_c),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[gt.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[gt.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},vc={init:function(){this.setColour(_c),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308ALS"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},Xc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.HTML_COLOUR+gt.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GET+gt.Msg.HTML_COLOUR,"[2]"],[gt.Msg.MIXLY_GET+gt.Msg.MIXLY_IR_STRENGTH,"[1]"],[gt.Msg.MIXLY_GET+gt.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},yc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.HTML_COLOUR+gt.Msg.MSG.catSensor+" UCS12071").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GET+"RGB"+gt.Msg.HTML_COLOUR,"0"],[gt.Msg.MIXLY_GET+gt.Msg.MIXLY_RGB_RAW,"1"],[gt.Msg.MIXLY_GET_ENV_LIGHT+gt.Msg.MIXLY_BRIGHTNESS,"2"],[gt.Msg.GET_IR_STRENGTH+gt.Msg.MIXLY_BRIGHTNESS,"3"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},xc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GET_ENV_LIGHT,"E"],[gt.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},bc={init:function(){this.setColour(_c),this.appendDummyInput().appendField(gt.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Vc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[gt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},Bc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[gt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},Gc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_Altitude+gt.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETPRESSURE,"pressure()"],[gt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[gt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Uc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_Altitude+gt.Msg.MSG.catSensor+" SPL06_001").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETPRESSURE,"pressure()"],[gt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[gt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},wc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_Altitude+gt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETPRESSURE,"pressure()"],[gt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[gt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},kc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_Altitude+gt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendValueInput("VAR").appendField(gt.Msg.MIXLY_REF_TO_PRESSURE),this.appendDummyInput().appendField(gt.Msg.MIXLY_CAL_TO_ALTITUDE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Hc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MIXGOPE_FIELD+gt.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[gt.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Wc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_shake,"shake"],[gt.Msg.MIXLY_UP,"up"],[gt.Msg.MIXLY_DOWN,"down"],[gt.Msg.MIXLY_LEFT,"left"],[gt.Msg.MIXLY_RIGHT,"right"],[gt.Msg.MIXLY_MICROBIT_face_up,"face up"],[gt.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=gt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=gt.Msg.MSG.catSensor,s=gt.Msg.MIXLY_MICROBIT_JS_STATE,_=gt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:gt.Msg.MIXLY_MICROBIT_shake,up:gt.Msg.MIXLY_UP,down:gt.Msg.MIXLY_DOWN,left:gt.Msg.MIXLY_LEFT,right:gt.Msg.MIXLY_RIGHT,"face up":gt.Msg.MIXLY_MICROBIT_face_up,"face down":gt.Msg.MIXLY_MICROBIT_face_down}[e]+_}))}},Kc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new gt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=gt.Msg.MIXLY_MICROBIT_Direction,s=gt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":gt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Jc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_JS_GET+gt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new gt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=gt.Msg.MIXLY_MICROBIT_Direction,s=gt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":gt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},qc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+gt.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new gt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=gt.Msg.MIXLY_MICROBIT_Direction,s=gt.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":gt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Qc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},zc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_GETTEMPERATUE)}},jc={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return gt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:gt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:gt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},$c={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},Zc={init:function(){this.setColour(_c),this.appendValueInput("SPISUB").appendField(gt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(gt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SETUP+gt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new gt.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},tg={init:function(){this.setColour(_c),this.appendDummyInput().appendField("RFID"+gt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(gt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[gt.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},eg={init:function(){this.setColour(_c),this.appendDummyInput().appendField("RFID"+gt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},ig={init:function(){this.setColour(_c),this.appendDummyInput().appendField("RFID"+gt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(gt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},ng={init:function(){this.setColour(_c),this.appendDummyInput().appendField(gt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(gt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(gt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},sg={init:function(){this.setColour(_c),this.appendDummyInput().appendField(gt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(gt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(gt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(gt.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},_g={init:function(){this.setColour(_c),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_RFID_SCAN_OK,"0"],[gt.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[gt.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},og={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new gt.FieldDropdown([["全部(元组)","data()[0]"],["全部(json)","data()[1]"],["全部(json,附带位置信息)","data()[2]"],["编号","data()[0][0]"],["电量","data()[0][1]"],["风速","data()[0][2]"],["阵风","data()[0][3]"],["风向","data()[0][4]"],["雨量","data()[0][5]"],["温度","data()[0][6]"],["湿度","data()[0][7]"],["光照","data()[0][8]"],["紫外线","data()[0][9]"],["大气压","data()[0][10]"],["信号强度","data()[0][11]"],["信噪比","data()[0][12]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip("返回气象数据元组 data= (设备id,电池状态,风速m/s,阵风m/s,风向°,雨量mm,温度℃,湿度%,光照Lux,UVI,大气压Pa,信号强度dB,信噪比dB)")}},pg={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},ag={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendValueInput("BASE").appendField("以主题"),this.appendDummyInput("").appendField("串口发送至MixIO"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ug={init:function(){this.setColour(_c),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new gt.icons.MutatorIcon(["weather_set_label_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("weather_set_label_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n>6),i.push(128|63&_)):(2048<=_&&_<=55295||57344<=_&&_<=65535)&&(n+=3,i.push(224|15&_>>12),i.push(128|63&_>>6),i.push(128|63&_))}for(s=0;s>8,255&n].concat(i)}(t,!0),i="",n=0;n=0?"0x700000":["mixgo_sant"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==o?(e.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+_+", font_address="+p+")\n"):"16x8 Matrix"==o&&(e.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+_+")\n"),i},uY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},rY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},lY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},dY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},IY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},TY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},MY=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},hY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},mY=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},EY=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},OY=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},RY=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},cY=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},gY=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_"+t.getFieldValue("OP")+"("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"B",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},CY=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},SY=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},AY=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},LY=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},NY=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"width",e.ORDER_ATOMIC),o=e.valueToCode(this,"height",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP");switch(p){case"True":return i+".show_fill_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n";case"False":return i+".show_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n"}},DY=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+_+", 1)\n"},fY=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},FY=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},PY=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},YY=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},vY=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"r",e.ORDER_ATOMIC),o="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(o){case"True":return i+".show_fill_circle("+n+", "+s+", "+_+", "+p+")\n";case"False":return i+".show_circle("+n+", "+s+", "+_+", "+p+")\n"}},XY=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),_=e.valueToCode(this,"x1",e.ORDER_ATOMIC),o=e.valueToCode(this,"y1",e.ORDER_ATOMIC),p=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",r=this.getFieldValue("OP");switch(u){case"True":return i+".show_fill_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n"}},yY=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+","+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+","+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},xY=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},bY=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),_=this.getFieldValue("key");return"TM1650"==_?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+_+"("+s+")\n"):"TM1637"==_&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+_+"("+s+")\n"),i},VY=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},BY=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},GY=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".showDP("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},UY=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},wY=function(t,e){e.definitions_.import_st7789="import st7789";var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_sant"].indexOf(i)>=0?"0xE00000":"0x3A0000";var s=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),_=e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC),o=e.valueToCode(this,"PINCS",e.ORDER_ATOMIC),p=e.valueToCode(this,"PINDC",e.ORDER_ATOMIC);return s+" = st7789.ST7789("+_+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+", dc_pin="+p+", cs_pin="+o+", rotation="+this.getFieldValue("rotate")+", font_address="+n+")\n"},kY=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".image("+n+", x="+s+", y="+_+", size="+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".image("+n+", x= "+s+",y="+_+", size="+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},HY=function(t,e){var i="0x"+this.getFieldValue("COLOR").slice(1);return["0x"+((16252928&i)>>8|(64512&i)>>5|(255&i)>>3).toString(16),e.ORDER_ATOMIC]},WY=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==a.slice(0,2))var r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color="+a+")\n";else{const t=a.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},KY=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p=i+".frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},JY=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},qY=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},QY=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"x1",e.ORDER_ATOMIC),s=e.valueToCode(this,"y1",e.ORDER_ATOMIC),_=e.valueToCode(this,"x2",e.ORDER_ATOMIC),o=e.valueToCode(this,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".line("+n+", "+s+", "+_+", "+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".line("+n+", "+s+", "+_+", "+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},zY=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=this.getFieldValue("key"),_=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return e.definitions_.import_i2clcd="import i2clcd",i+" = i2clcd.LCD("+n+", lcd_width="+s+", i2c_addr="+_+")\n"},jY=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+",center = "+this.getFieldValue("center")+")\n"},$Y=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".print("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},ZY=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},tv=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},ev=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC),_=this.getFieldValue("driver"),o=Ct.Boards.getSelectedBoardKey().split(":")[2],p="";return p=["mpython","mixgo_pe","mixgo_nova"].indexOf(o)>=0?"0x700000":["mixgo_sant"].indexOf(o)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+", address="+s+", font_address="+p+", types="+_+")\n"},iv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},nv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+")\n"},sv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},_v=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},ov=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},pv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},av=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},uv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},rv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},lv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},dv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},Iv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},Tv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=t.getFieldValue("state");return i+"."+t.getFieldValue("shape")+"("+n+", "+s+", "+_+", "+o+", "+p+")\n"+i+".show()\n"},Mv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=t.getFieldValue("state");return i+"."+("0"==t.getFieldValue("dir_h_v")?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\n"+i+".show()\n"},hv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".line("+e.valueToCode(t,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y2",e.ORDER_ATOMIC)+", "+t.getFieldValue("state")+")\n"+i+".show()\n"},mv=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("Python ESP32-S3"===Ct.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var s="onboard_tft.image("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff,sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n"}else if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled";s="oled.print("+n+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.shows("+n+")\n"}return s},Ev=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),_=this.getFieldValue("center");if("mixgo_sant"==i||"mixgo_nova"==i)return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+", space="+s+", center="+_+",sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n";if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled"}return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+", space="+s+", center="+_+")\n"},Ov=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var s="onboard_oled.frame("+n+")\n"}else if("Python ESP32-S3"===Ct.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";s="onboard_tft.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.frame("+n+")\n"}return s},Rv=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var _="onboard_oled.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", delay="+s+")\n"}else if("Python ESP32-S3"===Ct.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";_="onboard_tft.frame("+n+", size=5 , delay="+s+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";_="onboard_matrix.frame("+n+", delay="+s+")\n"}return _},cv=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else if("Python ESP32-S3"===Ct.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";n="onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},gv=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var o="onboard_oled.scroll("+n+", speed="+s+", space="+_+")\n"}else if("Python ESP32-S3"===Ct.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";o="onboard_tft.scroll("+n+", y=0, size=5, speed="+s+", space="+_+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";o="onboard_matrix.scroll("+n+", speed="+s+", space="+_+")\n"}return o},Cv=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},Sv=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},Av=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Ct.JSFuncs.getPlatform()){const i=t.getFieldValue("image").split(".");if(2!==i.length)throw Error("pin value error");e.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`;var n=i[1]}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix."+t.getFieldValue("image")}return[n,e.ORDER_ATOMIC]},Lv=function(t,e){var i={"#000000":"0","#ff0000":"1"};function n(t){let e="";if(t.length%2==1&&(t="0"+t),t.length<8){let e=8-t.length;for(let i=1;i<=e;i++)t="0"+t}for(let i=1;i<=t.length;i++)i%2==0&&i!==t.length?e=e+t[i-1]+",0x":e+=t[i-1];return"0x"+e}let s=[];for(let e=0;e<12;e++){let _="",o=0,p=0;for(let n=0;n<32;n++)n<8?p=7-n:n<16?p=23-n:n<24?p=39-n:n<32&&(p=55-n),o+=Number(i[t.getFieldValue(e+"-"+n)])*Math.pow(2,31-p);_+=n(o.toString(16)),s.unshift(_)}let _=[];for(let t=0;t>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},rX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.picture("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"direct",e.ORDER_ASSIGNMENT)+")\n"},lX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=this.getFieldValue("center"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True",r=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==r.slice(0,2))var l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color="+r+",sync="+u+")\n";else{const t=r.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color=0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+",sync="+u+")\n"}return l},dX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},IX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=t.getFieldValue("shape"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+",sync="+u+")\n";else{const t=p.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+",sync="+u+")\n"}return r},TX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("dir_h_v"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},MX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x1",e.ORDER_ATOMIC),s=e.valueToCode(t,"y1",e.ORDER_ATOMIC),_=e.valueToCode(t,"x2",e.ORDER_ATOMIC),o=e.valueToCode(t,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},hX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},mX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),o=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var p="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+",sync="+o+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+",sync="+o+")\n"}return p},EX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==n.slice(0,2))var _="onboard_tft.fill("+n+",sync="+s+")\n";else{const t=n.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_="onboard_tft.fill(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+",sync="+s+")\n"}return _},OX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=o+"=Clock("+n+", "+s+", "+_+", "+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=o+"=Clock("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},RX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},cX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_time("+e.valueToCode(this,"h",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"m",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"s",e.ORDER_ASSIGNMENT)+")\n"},gX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},CX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2))var _=n+".clear("+s+")\n";else{const t=s.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_=n+".clear(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+")\n"}return _},SX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"r",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("shape"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+", "+p+",sync="+a+")\n"}return u},AX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Ct.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n="onboard_tft.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}return n},LX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2));else{const t=s.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)}return"onboard_tft.pointern(angle="+n+")\n"},NX=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color="+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},DX=mv,fX=yv,FX=Yv,PX=yv,YX=xv,vX=Dv,XX=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},yX=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},xX=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},yG=function(){return"control.reset()\n"},xG=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Ct.Profile.default.serial)+")\n"},bG=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Ct.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Ct.Profile.default.serial)+")\n"},VG=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Ct.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Ct.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},BG=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},GG=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},UG=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},wG=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},kG=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},HG=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},WG=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},KG=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},JG=function(){return"while True:\n pass\n"},qG=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},QG=function(t,e){return e.definitions_.import_os="import os","os.uname()"},zG=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},jG=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},$G=function(t,e){return e.definitions_.import_mixgo="import mixgo",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period="+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=Timer."+(e.valueToCode(this,"mode",e.ORDER_NONE)||"None")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},ZG=function(t,e){return e.definitions_.import_machine="import machine",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period = "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=machine.Timer."+this.getFieldValue("mode")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},tU=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},eU=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},iU=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},nU=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},sU=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},_U=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},oU=eU,pU=ZG,aU=tU,uU=zG,rU=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},lU=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},dU=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api.weather_hourly("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"hour",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},IU=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")\n"},TU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_now.analysis()";else n='Weather_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},MU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Air_now.analysis()";else n='Air_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},hU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_alarm.analysis()";else n='Weather_alarm.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},mU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Life_suggestion.analysis()";else n='Life_suggestion.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},EU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Tide_daily.analysis()";else n='Tide_daily.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},OU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Location_search.analysis()";else n='Location_search.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},RU=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")\n"},cU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Weather_daily.analysis("+n+")";else s="Weather_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},gU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Air_daily.analysis("+n+")";else s="Air_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},CU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_sun.analysis("+n+")";else s="Geo_sun.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},SU=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_moon.analysis("+n+")";else s="Geo_moon.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},AU=new gt.Generator("Python");AU.INDENT=" ",AU.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),AU.ORDER_ATOMIC=0,AU.ORDER_COLLECTION=1,AU.ORDER_STRING_CONVERSION=1,AU.ORDER_UNARY_POSTFIX=1,AU.ORDER_UNARY_PREFIX=2,AU.ORDER_MEMBER=2.1,AU.ORDER_FUNCTION_CALL=2.2,AU.ORDER_EXPONENTIATION=3,AU.ORDER_UNARY_SIGN=4,AU.ORDER_BITWISE_NOT=4,AU.ORDER_MULTIPLICATIVE=5,AU.ORDER_ADDITIVE=6,AU.ORDER_BITWISE_SHIFT=7,AU.ORDER_BITWISE_AND=8,AU.ORDER_BITWISE_XOR=9,AU.ORDER_BITWISE_OR=10,AU.ORDER_RELATIONAL=11,AU.ORDER_EQUALITY=11,AU.ORDER_LOGICAL_NOT=12,AU.ORDER_LOGICAL_AND=13,AU.ORDER_LOGICAL_OR=14,AU.ORDER_ASSIGNMENT=14,AU.ORDER_CONDITIONAL=15,AU.ORDER_LAMBDA=16,AU.ORDER_NONE=99,AU.ORDER_OVERRIDES=[[AU.ORDER_FUNCTION_CALL,AU.ORDER_MEMBER],[AU.ORDER_FUNCTION_CALL,AU.ORDER_FUNCTION_CALL],[AU.ORDER_MEMBER,AU.ORDER_MEMBER],[AU.ORDER_MEMBER,AU.ORDER_FUNCTION_CALL]],AU.init=function(){AU.PASS=this.INDENT+"pass\n",AU.definitions_=Object.create(null),AU.functionNames_=Object.create(null),AU.setups_=Object.create(null),AU.loops_=Object.create(null),AU.codeEnd_=Object.create(null),AU.variableDB_?AU.variableDB_.reset():AU.variableDB_=new Nt(AU.RESERVED_WORDS_)},AU.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var _=this.definitions_[s];0===s.indexOf("import")?e.push(_):0===s.indexOf("var_declare")?i.push(_):n.push(_)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var o=[];for(var s in AU.functions_)o.push(AU.functions_[s]);o.length&&o.push("\n");var p=[];for(var s in AU.setups_)p.push(AU.setups_[s]);p.length&&p.push("\n");var a=[];for(var s in AU.loops_)a.push(AU.loops_[s]);var u=[];for(var s in AU.codeEnd_)u.push(AU.codeEnd_[s]);0!==u.length&&u.push("\n");let r="";return r=a.length>0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n"),r},AU.scrubNakedValue=function(t){return t+"\n"},AU.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},AU.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},AU.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=gt.utils.string.wrap(_,AU.COMMENT_WRAP-3),n+=AU.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const LU={};LU["MixGo MINI"]={description:"MicroPython[ESP32C3 MixGo MINI]",digital_pin:Ct.Profile.generate(["0-10","18"]),input_pin:Ct.Profile.generate(["0-10","18"]),output_pin:Ct.Profile.generate(["0-10","18"]),pwm_input:Ct.Profile.generate(["0-10","18"],"pwm","pwm"),analog_input:Ct.Profile.generate(["0-4"],"adc","adc"),pwm_output:Ct.Profile.generate(["0-10","18"],"pwm","pwm"),analog_output:Ct.Profile.generate(["0-4"],"adc","adc"),espnow_channel:Ct.Profile.generate(["1-13"]),haskylens_model:Ct.Profile.generate(["0-4"]),digital:Ct.Profile.generate(["0-10","18"],"pin","pin"),pwm_pin:Ct.Profile.generate(["0-10","18"]),pwm:Ct.Profile.generate(["0-10","18"],"pwm","pwm"),analog_pin:Ct.Profile.generate(["0-4"]),analog:Ct.Profile.generate(["0-4"],"adc","adc"),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Ct.Profile.generate(["0-4"]),exlcdh:Ct.Profile.generate(["0-11"]),exlcdv:Ct.Profile.generate(["0-7"]),brightness:Ct.Profile.generate(["0-9"]),tts_voice:Ct.Profile.generate(["0-16"]),tts_builtin_music:Ct.Profile.generate(["0-47"]),tts_bgmusic:Ct.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["ANGRY","onboard_matrix.ANGRY"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["DOOR_OPEN","onboard_matrix.DOOR_OPEN"],["DOOR_OPENING","onboard_matrix.DOOR_OPENING"],["DOOR_CLOSE","onboard_matrix.DOOR_CLOSE"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["BIRTHDAY","onboard_music.BIRTHDAY"],["BA_DING","onboard_music.BA_DING"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},LU["ESP32C2 Generic(2M)"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:Ct.Profile.generate(["0-11","18-21"]),input_pin:Ct.Profile.generate(["0-11","18-21"]),output_pin:Ct.Profile.generate(["0-11","18-21"]),pwm_input:Ct.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_input:Ct.Profile.generate(["0-5"],"adc","adc"),pwm_output:Ct.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_output:Ct.Profile.generate(["0-5"],"adc","adc"),espnow_channel:Ct.Profile.generate(["1-13"]),haskylens_model:Ct.Profile.generate(["0-4"]),digital:Ct.Profile.generate(["0-11","18-21"],"pin","pin"),pwm_pin:Ct.Profile.generate(["0-11","18-21"]),pwm:Ct.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_pin:Ct.Profile.generate(["0-5"]),analog:Ct.Profile.generate(["0-5"],"adc","adc"),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Ct.Profile.generate(["0-4"]),exlcdh:Ct.Profile.generate(["0-31"]),exlcdv:Ct.Profile.generate(["0-11"]),brightness:Ct.Profile.generate(["0-9"]),tts_voice:Ct.Profile.generate(["0-16"]),tts_builtin_music:Ct.Profile.generate(["0-47"]),tts_bgmusic:Ct.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]};const NU=LU,DU=20,fU={init:function(){this.setColour(DU),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_HIGH,"HIGH"],[gt.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},FU={init:function(){this.setColour(DU),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(gt.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},PU={init:function(){this.setColour(DU),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(gt.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},YU={init:function(){this.setColour(DU),this.appendValueInput("PIN",Number).appendField("DAC"+gt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(gt.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_TOOLTIP)}},vU={init:function(){this.setColour(DU),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_JS_PERIOD_MIL).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_mSecond,"period"],[gt.Msg.MIXLY_uSecond,"period_microseconds"]]),"key"),this.appendValueInput("NUM",Number).appendField(gt.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_SET_TOOLTIP)}},XU={init:function(){this.setColour(DU),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_REF_VOLTAGE+gt.Msg.MIXLY_STAT).appendField(new gt.FieldDropdown([["3.3V","machine.ADC.ATTN_11DB"],["2.2V","machine.ADC.ATTN_6DB"],["1.5V","machine.ADC.ATTN_2_5DB"],["1.2V","machine.ADC.ATTN_0DB"]]),"atten"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_ANALOG_ATTEN_TOOLTIP)}},yU={init:function(){this.setColour(DU),this.appendValueInput("pin").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(gt.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(gt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_TOOLTIP)}},xU={init:function(){this.setColour(20),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_ATTACHINTERRUPT_PIN).setCheck(Number),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MODE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[gt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[gt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},bU={init:function(){this.setColour(20),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETUP).appendField(new gt.FieldTextInput("pin#"),"PIN_OBJ"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROPYTHON_AS).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_Digital_PINMODEOUT,"machine.Pin.OUT"],[gt.Msg.MIXLY_Digital_PINMODEIN,"machine.Pin.IN"],[gt.Msg.MIXLY_PINMODEPULLUP,"machine.Pin.IN, machine.Pin.PULL_UP"],[gt.Msg.MIXLY_PINMODEPULLDOWN,"machine.Pin.IN, machine.Pin.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)},getVars:function(){return["pin#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},VU={init:function(){this.setColour(DU),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SETUP).appendField(new gt.FieldTextInput("dac#"),"PIN_OBJ").appendField(gt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("DAC"+gt.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_INIT_TOOLTIP)},getVars:function(){return["dac#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},BU={init:function(){this.setColour(DU),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SETUP).appendField(new gt.FieldTextInput("tc#"),"PIN_OBJ").appendField(gt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendValueInput("PIN",Number).appendField(gt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_INIT_TOOLTIP)},getVars:function(){return["tc#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){gt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},GU={init:function(){this.setColour(DU),this.appendValueInput("PIN",Number).appendField("PWM"+gt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(gt.Msg.MIXLY_FREQUENCY+gt.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(gt.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_SET_FREQ_TOOLTIP)}},UU=bU,wU=BU,kU=yU,HU=xU,WU=40,KU={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(WU),this.appendDummyInput("").appendField(t).appendField(gt.Msg.MIXLY_TEM_HUM+" AHT21").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[gt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key");return{temperature:gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:gt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[t]}))}},JU={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(WU),this.appendDummyInput("").appendField(t).appendField(gt.Msg.MIXLY_Altitude+gt.Msg.MSG.catSensor+" HP203X").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_GETPRESSURE,"pressure()"],[gt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[gt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},qU={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(WU),this.appendDummyInput().appendField(t).appendField(gt.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM),this.setOutput(!0,Number),this.setInputsInline(!0)}},QU={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(WU),this.appendDummyInput().appendField(t).appendField("RFID"+gt.Msg.MIXLY_RFID_READ_CARD),this.appendDummyInput("").appendField(gt.Msg.MIXLY_RFID_READ_CARD_UID),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,Number),this.setInputsInline(!0),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},zU={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(WU),this.appendDummyInput().appendField(t).appendField("RFID"+gt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SECTOR").appendField(gt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,Number),this.setInputsInline(!0),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},jU={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(WU),this.appendDummyInput().appendField(t).appendField(gt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(gt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(gt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},$U={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(WU),this.appendDummyInput().appendField(t).appendField(gt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(gt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(gt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(gt.Msg.RETURN_SUCCESS_OR_NOT),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setInputsInline(!0),this.setOutput(!0),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},ZU={init:function(){if("mixgo_me"==Ct.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(WU),this.appendDummyInput().appendField(t).appendField("RFID"),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_RFID_SCAN_OK,"True"],[gt.Msg.MIXLY_RFID_SCAN_NOTAGERR,"None"],[gt.Msg.MIXLY_RFID_SCAN_ERROR,"False"]]),"key"),this.appendDummyInput().appendField(`(${gt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,Number),this.setInputsInline(!0),this.setWarningText(gt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},tw=100,ew={init:function(){this.setColour(tw),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.MIXGO_LEFT_FRONT+gt.Msg.COLOUR_RGB_GREEN+gt.Msg.MIXLY_EXTERN_LED,"GLED[0]"],[gt.Msg.MIXGO_RIGHT_FRONT+gt.Msg.COLOUR_RGB_GREEN+gt.Msg.MIXLY_EXTERN_LED,"GLED[1]"],[gt.Msg.MIXGO_LEFT_BACK+gt.Msg.COLOUR_RGB_GREEN+gt.Msg.MIXLY_EXTERN_LED,"GLED[3]"],[gt.Msg.MIXGO_RIGHT_BACK+gt.Msg.COLOUR_RGB_GREEN+gt.Msg.MIXLY_EXTERN_LED,"GLED[2]"],[gt.Msg.MIXGO_LEFT_FRONT+gt.Msg.COLOUR_RGB_RED+gt.Msg.MIXLY_EXTERN_LED,"RLED[0]"],[gt.Msg.MIXGO_RIGHT_FRONT+gt.Msg.COLOUR_RGB_RED+gt.Msg.MIXLY_EXTERN_LED,"RLED[1]"],[gt.Msg.MIXGO_LEFT_BACK+gt.Msg.COLOUR_RGB_RED+gt.Msg.MIXLY_EXTERN_LED,"RLED[3]"],[gt.Msg.MIXGO_RIGHT_BACK+gt.Msg.COLOUR_RGB_RED+gt.Msg.MIXLY_EXTERN_LED,"RLED[2]"],[gt.Msg.ME_GO_LIGHT_HEADLIGHT,"WLED"]]),"op"),this.setOutput(!0)}},iw={init:function(){this.setColour(tw),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField("ME GO"),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_SETONOFF)}},nw={init:function(){this.setColour(tw),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField("ME GO"),this.appendDummyInput().appendField(gt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},sw={init:function(){this.setColour(tw),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField("ME GO"),this.appendDummyInput().appendField(gt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_ESP32_LED_GETONOFF)}},_w={init:function(){this.setColour(tw),this.appendDummyInput().appendField(gt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField("ME GO"),this.appendValueInput("bright").appendField(gt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(gt.Msg.MIXLY_SETTING+gt.Msg.MIXLY_BUILDIN_LED+gt.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},ow={init:function(){this.setColour(tw),this.appendDummyInput().appendField("ME GO").appendField(new gt.FieldDropdown([[gt.Msg.blockpy_forward,"F"],[gt.Msg.blockpy_backward,"B"],[gt.Msg.blockpy_left,"L"],[gt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},pw={init:function(){this.setColour(tw),this.appendDummyInput().appendField("ME GO").appendField(new gt.FieldDropdown([[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},aw={init:function(){this.setColour(tw),this.appendDummyInput().appendField("ME GO").appendField(gt.Msg.MOTOR_DC).appendField(new gt.FieldDropdown([[gt.Msg.MIXLYCAR_WHEEL_LEFT,"0"],[gt.Msg.MIXLYCAR_WHEEL_RIGHT,"1"],[gt.Msg.ME_GO_MOTOR_EXTERN,"2"]]),"wheel"),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_Direction).appendField(new gt.FieldDropdown([[gt.Msg.ROTATION_FORWARD,"CW"],[gt.Msg.ROTATION_BACKWARD,"CCW"],[gt.Msg.MOTOR_P,"P"],[gt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(gt.inputs.Align.RIGHT).appendField(gt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},uw={init:function(){this.setColour(tw),this.appendDummyInput("").appendField(gt.Msg.MIXLY_ESP32_INTERRUPT).appendField(gt.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"A"],[gt.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendValueInput("DO").appendField(gt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},rw={init:function(){this.setColour(tw),this.appendDummyInput("").appendField(gt.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"A"],[gt.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_SETUP),this.appendDummyInput("").appendField(new gt.FieldDropdown([["turns","turns"],["distance","distance"],["turns,distance","all"]]),"args"),this.appendValueInput("num").setCheck(Number),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},lw={init:function(){this.setColour(tw),this.appendDummyInput("").appendField(gt.Msg.ME_GO_HALL_SENSOR),this.appendDummyInput("").appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"A"],[gt.Msg.TEXT_TRIM_RIGHT,"B"]]),"mode"),this.appendDummyInput("").appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("").appendField(new gt.FieldDropdown([["turns","turns"],["distance","distance"],["speed","speed"]]),"args"),this.setOutput(!0),this.setInputsInline(!0)}},dw={init:function(){this.setColour(tw),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"[0]"],[gt.Msg.MIXGO_LEFT_MID,"[1]"],[gt.Msg.MIXGO_RIGHT_MID,"[2]"],[gt.Msg.TEXT_TRIM_RIGHT,"[3]"],[gt.Msg.MIXLY_ALL,""]]),"key").appendField(gt.Msg.MIXGO_LINE_SENSOR_VAL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return gt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+gt.Msg.MIXLY_ESP32_NEAR}))}},Iw={init:function(){this.setColour(tw),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new gt.FieldDropdown([[gt.Msg.MIXGO_LEFT_FRONT,"[0]"],[gt.Msg.MIXGO_RIGHT_FRONT,"[1]"],[gt.Msg.MIXGO_LEFT_BACK,"[3]"],[gt.Msg.MIXGO_RIGHT_BACK,"[2]"],[gt.Msg.MIXLY_ALL,""]]),"key").appendField(gt.Msg.MIXGO_PROXIMITY_SENSOR),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return gt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+gt.Msg.MIXLY_ESP32_NEAR}))}},Tw={init:function(){this.setColour(tw),this.appendDummyInput().appendField(gt.Msg.MIXLY_MIXGO_CAR_SENSOR_ONBOARD_CHANGE).appendField(new gt.FieldDropdown([[gt.Msg.MIXLY_ME_GO_CAR_SENSOR_ONBOARD_AUTO_CHANGE,"AS"],[gt.Msg.MIXLY_MIXGO_CAR_USE_LINE_ONLY,"LP"],[gt.Msg.MIXLY_MIXGO_CAR_USE_PROXIMITY_ONLY,"OA"],[gt.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_ONLY,"LS"],[gt.Msg.ME_GO_SENSOR_MODE_OFF,"CL"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Mw={init:function(){this.setColour(tw),this.appendDummyInput("").appendField(gt.Msg.MIXLY_GET_GESTURE).appendField(new gt.FieldDropdown([[gt.Msg.ME_GO_PITCH,"[0]"],[gt.Msg.ME_GO_ROLL,"[1]"],[gt.Msg.ME_GO_PITCH+", "+gt.Msg.ME_GO_ROLL,""]]),"angle"),this.appendDummyInput(""),this.setOutput(!0,Number),this.setInputsInline(!0)}},hw={init:function(){this.setColour(tw),this.appendDummyInput().appendField(gt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new gt.FieldDropdown([[gt.Msg.TEXT_TRIM_LEFT,"[0]"],[gt.Msg.MIXGO_LEFT_MID,"[1]"],[gt.Msg.MIXGO_RIGHT_MID,"[2]"],[gt.Msg.TEXT_TRIM_RIGHT,"[3]"],[gt.Msg.MIXLY_ALL,""]]),"key").appendField(gt.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_SENSOR),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return gt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+gt.Msg.MIXLY_ME_GO_CAR_LIGHT_SEEKING_SENSOR}))}},mw=230,Ew={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.digital),"PIN"),this.setOutput(!0)}},Ow={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},Rw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},cw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},gw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},Cw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},Sw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},Aw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},Lw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},Nw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},Dw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},fw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},Fw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},Pw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},Yw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},vw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},Xw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.analog),"PIN"),this.setOutput(!0)}},yw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},xw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.dac),"PIN"),this.setOutput(!0)}},bw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},Vw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},Bw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},Gw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.pwm),"PIN"),this.setOutput(!0)}},Uw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},ww={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},kw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.touch),"PIN"),this.setOutput(!0)}},Hw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},Ww={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},Kw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},Jw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.imglist),"PIN"),this.setOutput(!0)}},qw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.playlist),"PIN"),this.setOutput(!0)}},Qw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},zw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},jw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},$w={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},Zw={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},tk={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},ek={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},ik={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},nk={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},sk={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},_k={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},ok={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.one_more),"PIN"),this.setOutput(!0)}},pk={init:function(){this.setColour(mw),this.appendDummyInput("").appendField(new gt.FieldDropdown(Ct.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},ak=function(t,e){const i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),s=e.valueToCode(this,"LEDCOUNT",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ws2812x_NeoPixel="from ws2812x import NeoPixel";return`${i} = NeoPixel(machine.Pin(${n}), ${s})\n`},uk=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},rk=function(t,e){e.definitions_.import_machine="import machine";var i="";return i+=e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value("+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},lk=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},dk=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".write("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},Ik=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=e.valueToCode(this,"NUM",e.ORDER_ATOMIC);return i+".set_analog_"+this.getFieldValue("key")+"("+n+")\n"},Tk=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},Mk=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=this.getFieldValue("mode");return"machine.Pin("+i+").irq(handler = "+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+", trigger = "+n+")\n"},hk=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"pin#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),s=this.getFieldValue("MODE");return("pin#"==i?"pin"+n:e.variableDB_.getName(i,gt.Variables.NAME_TYPE))+" = machine.Pin("+n+", "+s+")\n"},mk=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"dac#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("dac#"==i?"dac"+n:e.variableDB_.getName(i,gt.Variables.NAME_TYPE))+" = machine.DAC(machine.Pin("+n+"))\n"},Ek=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},Ok=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"tc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("tc#"==i?"tc"+n:e.variableDB_.getName(i,gt.Variables.NAME_TYPE))+" = machine.TouchPad(machine.Pin("+n+"))\n"},Rk=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mini_g2="import mini_g2",["mini_g2.ext_ahtx0."+i+"()",e.ORDER_ATOMIC]},ck=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mini_g2="import mini_g2",["mini_g2.ext_hp203x."+i,e.ORDER_ATOMIC]},gk=function(t,e){e.definitions_.import_mini_g2="import mini_g2";return["mini_g2.varistor()",e.ORDER_ATOMIC]},Ck=function(t,e){e.definitions_.import_mini_g2="import mini_g2";var i=Ct.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var n='ext_rfid.read_card(0, x="id")'}else{e.definitions_["import_"+i+"_onboard_rfid"]="from "+i+" import onboard_rfid";n='onboard_rfid.read_card(0, x="id")'}return[n,e.ORDER_ATOMIC]},Sk=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC);if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var s="ext_rfid.read_card("+n+")"}else{e.definitions_["import_"+i+"_onboard_rfid"]="from "+i+" import onboard_rfid";s="onboard_rfid.read_card("+n+', x="content")'}return[s,e.ORDER_ATOMIC]},Ak=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),s=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC);if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var _="ext_rfid.write_card("+s+","+n+")\n"}else{e.definitions_["import_"+i+"_onboard_rfid"]="from "+i+" import onboard_rfid";_="onboard_rfid.write_card("+s+", "+n+")\n"}return _},Lk=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),s=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC);if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var _="ext_rfid.write_card("+s+","+n+")"}else{e.definitions_["import_"+i+"_onboard_rfid"]="from "+i+" import onboard_rfid";_="onboard_rfid.write_card("+s+", "+n+")"}return[_,e.ORDER_ATOMIC]},Nk=function(t,e){var i=Ct.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("key");if("mixgo_mini"==i){e.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var s="ext_rfid.scan_card()=="+n}else{e.definitions_["import_"+i+"_onboard_rfid"]="from "+i+" import onboard_rfid";s="onboard_rfid.scan_card()=="+n}return[s,e.ORDER_ATOMIC]},Dk=function(t,e){return e.definitions_.import_me_go_car="from me_go import car",["car."+this.getFieldValue("op"),e.ORDER_ATOMIC]},fk=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car","car.setonoff("+i+","+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},Fk=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car",["car.getrightness("+i+")",e.ORDER_ATOMIC]},Pk=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car",["car.getonoff("+i+")",e.ORDER_ATOMIC]},Yk=function(t,e){var i=e.valueToCode(this,"led",e.ORDER_ATOMIC);return e.definitions_.import_me_go_car="from me_go import car","car.setbrightness("+i+","+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},vk=function(t,e){var i=this.getFieldValue("VAR");return e.definitions_.import_me_go_car="from me_go import car",'car.move("'+i+'",'+e.valueToCode(this,"speed",e.ORDER_ASSIGNMENT)+")\n"},Xk=function(t,e){var i=this.getFieldValue("VAR");return e.definitions_.import_me_go_car="from me_go import car",'car.move("'+i+'")\n'},yk=function(t,e){var i=this.getFieldValue("wheel");e.definitions_.import_me_go_car="from me_go import car";var n=this.getFieldValue("direction");return 0==i&&("CW"==n?n="CCW":"CCW"==n&&(n="CW")),"car.motor(car.MOTO["+i+'],"'+n+'",'+e.valueToCode(this,"speed",e.ORDER_ATOMIC)+")\n"},xk=function(t,e){var i=this.getFieldValue("mode");return e.definitions_["import_me_go_hall_"+i]="from me_go import hall_"+i,"hall_"+i+".irq_cb("+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+")\n"},bk=function(t,e){var i=this.getFieldValue("mode"),n=this.getFieldValue("args");e.definitions_["import_me_go_hall_"+i]="from me_go import hall_"+i;var s=e.valueToCode(this,"num",e.ORDER_ATOMIC);return"all"==n?"hall_"+i+".initial(turns="+s+",distance="+s+")\n":"hall_"+i+".initial("+n+"="+s+")\n"},Vk=function(t,e){var i=this.getFieldValue("mode"),n=this.getFieldValue("args");return e.definitions_["import_me_go_hall_"+i]="from me_go import hall_"+i,["hall_"+i+"."+n,e.ORDER_ATOMIC]},Bk=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car",["car.patrol()"+i,e.ORDER_ATOMIC]},Gk=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car",["car.obstacle()"+i,e.ORDER_ATOMIC]},Uk=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car","car.ir_mode(car."+i+")\n"},wk=function(t,e){return e.definitions_.import_mixgo_me_onboard_mxc6655xa="from mixgo_me import onboard_mxc6655xa",["onboard_mxc6655xa.eulerangles(upright=True)"+this.getFieldValue("angle"),e.ORDER_ATOMIC]},kk=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_go_hall="from me_go import car",["car.light()"+i,e.ORDER_ATOMIC]},Hk=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},Wk=Hk,Kk=Hk,Jk=Hk,qk=Hk,Qk=Hk,zk=Hk,jk=Hk,$k=Hk,Zk=Hk,tH=Hk,eH=Hk,iH=Hk,nH=Hk,sH=Hk,_H=Hk,oH=Hk,pH=Hk,aH=Hk,uH=Hk,rH=Hk,lH=Hk,dH=Hk,IH=Hk,TH=Hk,MH=Hk,hH=Hk,mH=Hk,EH=Hk,OH=Hk,RH=Hk,cH=Hk,gH=Hk,CH=Hk,SH=Hk,AH=Hk,LH=Hk,NH=Hk,DH=Hk,fH=Hk,FH=Hk,PH=Hk,YH=Hk,vH=Hk,XH=Hk;Object.assign(gt.Variables,At),Object.assign(gt.Procedures,bu),gt.Python=Vu,gt.generator=Vu,Ct.Profile.default={},Object.assign(Ct.Profile,NU),Object.assign(Ct.Profile.default,NU["MixGo CC"]),Object.assign(gt.Blocks,e,i,n,s,_,o,p,a,u,r,l,d,I,B,W,H,y,G,K,f,P,k,w,U,F,D,N,b,x,V,Y,v,X,It,Tt,Mt,ht),Object.assign(gt.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,_t,lt,rt,et,ot,dt,Q,z,ut,at,pt,j,q,J,nt,it,st,$,Z,tt,mt,Et,Ot,Rt,ct)})(); \ No newline at end of file diff --git a/boards/default/micropython_esp32c3/index.xml b/boards/default/micropython_esp32c3/index.xml index 7bab0630..47181135 100644 --- a/boards/default/micropython_esp32c3/index.xml +++ b/boards/default/micropython_esp32c3/index.xml @@ -1 +1 @@ -02000attachInterrupt_funcattachInterrupt_func10,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!ms10timtim1000tim_callbacktim_callback5000200090x151100a10.998124.82997110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyMixly,HelloMixlyprompt02MixlyMixly0XFF00FFcodebMixlyMixly1attachInterrupt_func1attachInterrupt_funcattachInterrupt_func00Mixly0Mixly2022711420452023,1,1,12,0,0180292023,1,1,12,0,0100100100440440100004120000000000010001000Mixly0MixlyMixly500MixlyMixly50010.51001001000interrupt_funcinterrupt_functurnsdistance00Mixly0Mixlywifinamewifipassword8080AUTH TOKEN0_value02000notify0Your Target Emailsubjectbodycolor#FF0000wifinamewifipasswordmixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012http://mixio.mixly.org/time.phpmixio.mixly.cnwifinamewifipasswordcsub_cb31444082183.230.40.3914109261n63JySRowo13ZLDBKw6y896E0=MixlyRobotsub_cbEQmsg1ciot_dict"sound"ciot_dictccwifinamewifipasswordclientEnter Your API_KEYEnter Your SECRET_KEYclient1clientS72099北京今天天气如何?wifinamewifipasswordSVa3S0UKHIy9dDArs北京SVa3S0UKHIy9dDArs北京11111ble_cble_pMixlyble_cble_cMixlyble_cble_xble_xble_xMixlyble_xble_xble_methodble_methodEQdataMixlyhandlehandle_methodhandle_methodkey1key2key3keyxble_keyboard_mouse10Hello, Mixly!1002000001000009000,4500,563,5630x1234callbackcmdaddrrawpulsesi2c2221100000i2c00i2c00i2ci2ci2cspi2000004512spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345buf1Mixlyow12owowow12345ow12345owmy_now0my_nowmy_nowmy_nowFFFFFFFFFFFFmixlymy_nowmy_nowcbcbEQmsg1spi10000004512spi8my_lora433.925716my_loramy_loramy_loraMixlyi2c_extend45100000xsensori2c_extendxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor1013.25xsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor5000500xsensorxsensorxsensorxsensorxsensorxsensorspi10000004512spi8ysensorysensorysensor0ysensor0ysensor0Mixlyysensor0Mixlyysensorysensor39,119.96,31.67ysensorysensorstation45ps2_handle24512ps2_handle50ps2_handleps2_handlews_wr0121ws_wrws_wrws_wr360002zsensorzsensorzsensorzsensorweight12500weight100midi0midi440midi4401000midimidimidi4120midimidirgb04rgb0000rgb000rgb0001000rgb1000rgb100100i2c_extend45400000Motori2c_extendMotor100Motor1024102402actuatoractuatoractuatoractuatoractuator你好米思齐actuatoractuatoractuator20actuatoractuatormixly*.mp3i2c_extend45400000matrixi2c_extendmatrixmatrixmatrixMixly0matrixMixlymatrixMixly500matrixMixlymatrixMixly500matrixmatrix>matrixmatrix1matrixmatrixmatrix0.5matrixmatrixi2c_extend45100000dispi2c_extenddisp2333dispdisp1i2c_extend45100000lcdi2c_extend0x27lcdMixly00lcdMixly005lcdlcdi2c_extend45100000oledi2c_extend0x3coledoled001oledMixlyoledMixly0010oledMixlyoledMixly0550oledMixlyoledMixly5500oled0020oled005050oled20202015oled1oled00oled00oledspi1000000450spi78tft_st7789135240tft_st7789001#ffffff255,255,0tft_st7789Mixly0050#ffffff255,255,0tft_st7789Mixly0550#ffffff255,255,0tft_st7789Mixly5500#ffffff255,255,0tft_st7789004040#ffffff255,255,0tft_st778912ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor'ni-hao','hong-se','lv-se','lan-se','bai-se','hei-se'0.1ai_sensor1.wav5ai_sensor1.wav100ai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsai_sensor'猫','狗','笔记本','笔'mixgo5自模型训练infoai_sensor'猫','狗','笔记本','笔'mixgo自模型识别objectsinfoai_sensor0.1606, 0.3562, 0.4712, 0.9568, 0.9877, 1.9108, 1.8761, 3.5310, 3.4423, 5.6823/sd/masks.kmodel外部模型加载objects12ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor1.wav5ai_sensor1.wav100infoai_sensorlicensePlateinfoai_sensorfaceinfoai_sensor20objectsai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsfilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0wifinamewifipasswordwlanwlanwlanwlanwlan127.16.0.801234567wlanwlanwlanwlanwlan127.16.0.81connect_wifiwlanAPwlanTruewlanwlanSmallCabbage1WHILETRUEEQ0wlan0.0.0.0ms1000TRUEss0.0.0.080s192.168.0.180s5ss1024sbMixlyresponses1024sbMixlyresponse127.0.0.180sntp.aliyun.comresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponsehttp://192.168.1.1:11434qwen2.5-coder:0.5b5https://api.deepseek.comAPI Keydeepseek-chat5请介绍一下米思齐?content_callbackcontent_callbackcontent请介绍一下米思齐? \ No newline at end of file +02000attachInterrupt_funcattachInterrupt_func10,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!ms10timtim1000tim_callbacktim_callback5000200090x151100a10.998124.82997110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyMixly,HelloMixlyprompt02MixlyMixly0XFF00FFcodebMixlyMixly1attachInterrupt_func1attachInterrupt_funcattachInterrupt_func00Mixly0Mixly2022711420452023,1,1,12,0,0180292023,1,1,12,0,0100100100440440100004120000000000010001000Mixly0MixlyMixly500MixlyMixly50010.51001001000interrupt_funcinterrupt_functurnsdistance00Mixly0Mixlywifinamewifipassword8080AUTH TOKEN0_value02000notify0Your Target Emailsubjectbodycolor#FF0000wifinamewifipasswordmixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012http://mixio.mixly.org/time.phpmixio.mixly.cnwifinamewifipasswordcsub_cb31444082183.230.40.3914109261n63JySRowo13ZLDBKw6y896E0=MixlyRobotsub_cbEQmsg1ciot_dict"sound"ciot_dictccwifinamewifipasswordclientEnter Your API_KEYEnter Your SECRET_KEYclient1clientS72099北京今天天气如何?wifinamewifipasswordSVa3S0UKHIy9dDArs北京SVa3S0UKHIy9dDArs北京11111ble_cble_pMixlyble_cble_cMixlyble_cble_xble_xble_xMixlyble_xble_xble_methodble_methodEQdataMixlyhandlehandle_methodhandle_methodkey1key2key3keyxble_keyboard_mouse10Hello, Mixly!1002000001000009000,4500,563,5630x1234callbackcmdaddrrawpulsesi2c2221100000i2c00i2c00i2ci2ci2cspi2000004512spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345buf1Mixlyow12owowow12345ow12345owmy_now0my_nowmy_nowmy_nowFFFFFFFFFFFFmixlymy_nowmy_nowcbcbEQmsg1spi10000004512spi8my_lora433.925716my_loramy_loramy_loraMixlyi2c_extend45100000xsensori2c_extendxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor1013.25xsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor5000500xsensorxsensorxsensorxsensorxsensorxsensorspi10000004512spi8ysensorysensorysensor0ysensor0ysensor0Mixlyysensor0Mixlyysensorysensor39,119.96,31.67ysensorysensorstation45ps2_handle24512ps2_handle50ps2_handleps2_handlews_wr0121ws_wrws_wrws_wr360002zsensorzsensorzsensorzsensorweight12500weight100midi0midi440midi4401000midimidimidi4120midimidirgb04rgb0000rgb000rgb0001000rgb1000rgb100100i2c_extend45400000Motori2c_extendMotor100Motor1024102402actuatoractuatoractuatoractuatoractuator你好米思齐actuatoractuatoractuator20actuatoractuatormixly*.mp3i2c_extend45400000matrixi2c_extendmatrixmatrixmatrixMixly0matrixMixlymatrixMixly500matrixMixlymatrixMixly500matrixmatrix>matrixmatrix1matrixmatrixmatrix0.5matrixmatrixi2c_extend45100000dispi2c_extenddisp2333dispdisp1i2c_extend45100000lcdi2c_extend0x27lcdMixly00lcdMixly005lcdlcdi2c_extend45100000oledi2c_extend0x3coledoled001oledMixlyoledMixly0010oledMixlyoledMixly0550oledMixlyoledMixly5500oled0020oled005050oled20202015oled1oled00oled00oledspi1000000450spi78tft_st7789135240tft_st7789001#ffffff255,255,0tft_st7789Mixly0050#ffffff255,255,0tft_st7789Mixly0550#ffffff255,255,0tft_st7789Mixly5500#ffffff255,255,0tft_st7789004040#ffffff255,255,0tft_st778912ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor'ni-hao','hong-se','lv-se','lan-se','bai-se','hei-se'0.1ai_sensor1.wav5ai_sensor1.wav100ai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsai_sensor'猫','狗','笔记本','笔'mixgo5自模型训练infoai_sensor'猫','狗','笔记本','笔'mixgo自模型识别objectsinfoai_sensor0.1606, 0.3562, 0.4712, 0.9568, 0.9877, 1.9108, 1.8761, 3.5310, 3.4423, 5.6823/sd/masks.kmodel外部模型加载objects12ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor1.wav5ai_sensor1.wav100infoai_sensorlicensePlateinfoai_sensorfaceinfoai_sensor20objectsai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsfilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0wifinamewifipasswordwlanwlanwlanwlanwlan127.16.0.801234567wlanwlanwlanwlanwlan127.16.0.81connect_wifiwlanAPwlanTruewlanwlanSmallCabbage1WHILETRUEEQ0wlan0.0.0.0ms1000TRUEss0.0.0.080s192.168.0.180s5ss1024sbMixlyresponses1024sbMixlyresponse127.0.0.180sntp.aliyun.comresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponsehttp://192.168.1.1:11434qwen2.5-coder:0.5b5https://api.deepseek.comAPI Keydeepseek-chat5请介绍一下米思齐?content_callbackcontent_callbackcontent请介绍一下米思齐? \ No newline at end of file diff --git a/boards/default/micropython_esp32c3/main.bundle.5f76bcef.js b/boards/default/micropython_esp32c3/main.bundle.5f76bcef.js deleted file mode 100644 index 0030583b..00000000 --- a/boards/default/micropython_esp32c3/main.bundle.5f76bcef.js +++ /dev/null @@ -1,21 +0,0 @@ -(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>Dt,controls_typeLists:()=>ft,lists_zip:()=>Ft,lists_zip_container:()=>Pt,lists_zip_item:()=>Yt,unpack_iterable_object:()=>vt,variables_change:()=>Lt,variables_get:()=>St,variables_global:()=>Nt,variables_set:()=>At});var i={};t.r(i),t.d(i,{base_setup:()=>yt,controls_delay:()=>bt,controls_end_program:()=>Vt,controls_except:()=>jt,controls_finally:()=>$t,controls_flow_statements:()=>Ht,controls_for:()=>Wt,controls_forEach:()=>Ut,controls_for_range:()=>Kt,controls_if:()=>Bt,controls_if_else:()=>Qt,controls_if_elseif:()=>qt,controls_if_if:()=>Jt,controls_lambda:()=>te,controls_main:()=>xt,controls_pass:()=>ee,controls_range:()=>Gt,controls_repeat_ext:()=>Zt,controls_thread:()=>ie,controls_try:()=>zt,controls_try_finally:()=>kt,controls_whileUntil:()=>wt,datetime_fromtimestamp:()=>ae,do_while:()=>ne,garbage_collection:()=>se,gene_unique_identifier:()=>ue,get_mem_alloc:()=>_e,get_mem_free:()=>oe,get_unique_identifier:()=>pe});var n={};t.r(n),t.d(n,{base_map:()=>Fe,generate_cartesian_product:()=>Ye,math_arithmetic:()=>Te,math_bit:()=>he,math_constant:()=>de,math_constant_mp:()=>Ie,math_constrain:()=>Ce,math_dec:()=>Ee,math_degree_to_radian:()=>Xe,math_indexer_number:()=>Ae,math_map:()=>Se,math_max_min:()=>Re,math_number:()=>le,math_number_base_conversion:()=>ce,math_radian_to_degree:()=>ve,math_random:()=>ge,math_random_seed:()=>Le,math_round:()=>Ne,math_selfcalcu:()=>Me,math_to_int:()=>Oe,math_trig:()=>me,text_to_number:()=>De,text_to_number_skulpt:()=>fe,turn_to_int:()=>Pe});var s={};t.r(s),t.d(s,{ascii_to_char:()=>Ge,char_to_ascii:()=>Ue,number_to_text:()=>we,os_system:()=>Ii,text:()=>ye,text_capital:()=>je,text_center:()=>$e,text_char:()=>Ve,text_char_at:()=>We,text_char_at2:()=>He,text_char_at3:()=>ui,text_compareTo:()=>ai,text_compare_to:()=>ze,text_create_with_container:()=>_i,text_create_with_item:()=>oi,text_encode:()=>li,text_equals_starts_ends:()=>Qe,text_eval:()=>di,text_find:()=>Ze,text_format:()=>si,text_format_noreturn:()=>ri,text_join:()=>Be,text_join_seq:()=>ti,text_length:()=>ke,text_random_char:()=>Ke,text_replace:()=>ei,text_split:()=>ii,text_strip:()=>ni,text_substring:()=>qe,text_substring2:()=>Je,text_substring3:()=>pi,text_textarea:()=>be});var _={};t.r(_),t.d(_,{ENUMERATE:()=>Qi,content_in_lists:()=>ji,enumerate:()=>zi,list_many_input:()=>yi,list_tolist:()=>Gi,list_tolist2:()=>qi,list_trig:()=>vi,lists_2d_get_col_row_data:()=>Ei,lists_2d_get_data_with_col_row:()=>mi,lists_append_extend:()=>Si,lists_change_to:()=>xi,lists_change_to_general:()=>Vi,lists_clear:()=>fi,lists_create_with:()=>Oi,lists_create_with2:()=>Ui,lists_create_with_container:()=>ci,lists_create_with_item:()=>gi,lists_create_with_noreturn:()=>bi,lists_create_with_text:()=>Ri,lists_create_with_text2:()=>wi,lists_del_general:()=>Bi,lists_find:()=>Yi,lists_getIndex3:()=>ki,lists_getSublist3:()=>Hi,lists_get_index:()=>Mi,lists_get_random_item:()=>Ai,lists_get_random_sublist:()=>Li,lists_get_sublist:()=>hi,lists_insert_value:()=>Ni,lists_insert_value2:()=>Ki,lists_pop:()=>Pi,lists_remove_at:()=>Fi,lists_remove_at2:()=>Ji,lists_reverse:()=>Di,lists_setIndex3:()=>Wi,lists_set_index:()=>Ci,lists_sort:()=>Xi});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>Tn,dicts_add_or_change:()=>on,dicts_clear:()=>un,dicts_create_with:()=>Zi,dicts_create_with_container:()=>tn,dicts_create_with_item:()=>en,dicts_create_with_noreturn:()=>mn,dicts_deldict:()=>In,dicts_delete:()=>pn,dicts_get:()=>sn,dicts_get_default:()=>_n,dicts_items:()=>rn,dicts_keys:()=>nn,dicts_length:()=>dn,dicts_pop:()=>Mn,dicts_setdefault:()=>hn,dicts_to_json:()=>On,dicts_to_json2:()=>gn,dicts_to_to:()=>cn,dicts_todict:()=>En,dicts_update:()=>an,dicts_values:()=>ln,json_to_dicts:()=>Rn});var p={};t.r(p),t.d(p,{logic_boolean:()=>Dn,logic_compare:()=>Sn,logic_compare_continous:()=>An,logic_is:()=>Yn,logic_is_in:()=>Pn,logic_negate:()=>Nn,logic_null:()=>fn,logic_operation:()=>Ln,logic_tobool:()=>vn,logic_true_or_false:()=>Fn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>is,sdcard_use_spi_init:()=>es,storage_can_write_ornot:()=>wn,storage_change_dir:()=>Zn,storage_close_file:()=>Hn,storage_delete_file:()=>Kn,storage_file_seek:()=>Qn,storage_file_tell:()=>qn,storage_file_write:()=>Vn,storage_fileopen:()=>xn,storage_fileopen_new:()=>yn,storage_fileopen_new_encoding:()=>bn,storage_get_a_line:()=>Un,storage_get_contents:()=>Gn,storage_get_contents_without_para:()=>Bn,storage_get_current_dir:()=>zn,storage_get_file_size:()=>Jn,storage_get_filename:()=>kn,storage_is_file:()=>ts,storage_list_all_files:()=>Wn,storage_make_dir:()=>jn,storage_open_file_with_os:()=>Xn,storage_rename:()=>$n});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>ps,procedures_callreturn:()=>as,procedures_defnoreturn:()=>ns,procedures_defreturn:()=>ss,procedures_ifreturn:()=>us,procedures_mutatorarg:()=>os,procedures_mutatorcontainer:()=>_s,procedures_return:()=>rs});var r={};t.r(r),t.d(r,{tuple_change_to:()=>gs,tuple_create_with:()=>ds,tuple_create_with_container:()=>Is,tuple_create_with_item:()=>Ts,tuple_create_with_noreturn:()=>Ls,tuple_create_with_text2:()=>Ms,tuple_create_with_text_return:()=>hs,tuple_del:()=>Os,tuple_find:()=>Cs,tuple_getIndex:()=>ms,tuple_getSublist:()=>As,tuple_get_random_item:()=>Ds,tuple_get_sublist:()=>Ns,tuple_input:()=>Fs,tuple_join:()=>Rs,tuple_length:()=>Es,tuple_max:()=>cs,tuple_totuple:()=>fs,tuple_trig:()=>Ss});var l={};t.r(l),t.d(l,{set_add_discard:()=>Gs,set_clear:()=>bs,set_create_with:()=>Ys,set_create_with_container:()=>vs,set_create_with_item:()=>Xs,set_create_with_text_return:()=>ks,set_length:()=>xs,set_operate:()=>Vs,set_operate_update:()=>Bs,set_pop:()=>ys,set_sub:()=>Us,set_toset:()=>Hs,set_update:()=>ws});var d={};t.r(d),t.d(d,{html_content:()=>Qs,html_content_more:()=>zs,html_document:()=>Ks,html_form:()=>$s,html_head_body:()=>qs,html_style:()=>js,html_style_color:()=>t_,html_style_content:()=>Zs,html_text:()=>e_,html_title:()=>Js});var I={};t.r(I),t.d(I,{attribute_access:()=>M_,function_call:()=>d_,function_call_container:()=>I_,function_call_item:()=>T_,raw_block:()=>s_,raw_empty:()=>o_,raw_expression:()=>__,raw_table:()=>n_,text_comment:()=>p_,text_print_multiple:()=>u_,text_print_multiple_container:()=>r_,text_print_multiple_item:()=>l_,type_check:()=>a_});var T={};t.r(T),t.d(T,{controls_type:()=>R_,controls_typeLists:()=>c_,lists_zip:()=>g_,unpack_iterable_object:()=>C_,variables_change:()=>E_,variables_get:()=>h_,variables_global:()=>O_,variables_set:()=>m_});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>v_,base_setup:()=>A_,controls_delay:()=>Y_,controls_flow_statements:()=>P_,controls_for:()=>D_,controls_forEach:()=>V_,controls_for_range:()=>f_,controls_if:()=>L_,controls_interrupts:()=>y_,controls_lambda:()=>G_,controls_main:()=>S_,controls_millis:()=>X_,controls_nointerrupts:()=>b_,controls_pass:()=>w_,controls_range:()=>B_,controls_repeat:()=>z_,controls_repeat_ext:()=>W_,controls_thread:()=>k_,controls_try_finally:()=>N_,controls_whileUntil:()=>F_,datetime_fromtimestamp:()=>j_,do_while:()=>H_,garbage_collection:()=>K_,gene_unique_identifier:()=>$_,get_mem_alloc:()=>J_,get_mem_free:()=>q_,get_unique_identifier:()=>Q_,reset:()=>x_,time_sleep:()=>U_});var h={};t.r(h),t.d(h,{base_map:()=>Ro,generate_cartesian_product:()=>go,math_arithmetic:()=>no,math_bit:()=>io,math_constant:()=>to,math_constant_mp:()=>eo,math_constrain:()=>Io,math_dec:()=>po,math_degree_to_radian:()=>So,math_indexer_number:()=>ho,math_map:()=>lo,math_max_min:()=>uo,math_number:()=>Z_,math_number_base_conversion:()=>To,math_radian_to_degree:()=>Co,math_random:()=>ro,math_random_seed:()=>Mo,math_round:()=>mo,math_selfcalcu:()=>so,math_single:()=>_o,math_to_int:()=>ao,math_trig:()=>oo,text_to_number:()=>Eo,text_to_number_skulpt:()=>Oo,turn_to_int:()=>co});var m={};t.r(m),t.d(m,{ascii_to_char:()=>fo,char_to_ascii:()=>Fo,number_to_text:()=>Po,os_system:()=>tp,text:()=>Ao,text_capital:()=>Go,text_center:()=>Uo,text_char:()=>No,text_char_at:()=>Xo,text_char_at2:()=>vo,text_char_at3:()=>jo,text_compareTo:()=>zo,text_compare_to:()=>bo,text_encode:()=>$o,text_equals_starts_ends:()=>yo,text_eval:()=>Zo,text_find:()=>wo,text_format:()=>Jo,text_format_noreturn:()=>qo,text_join:()=>Do,text_join_seq:()=>ko,text_length:()=>Yo,text_random_char:()=>xo,text_replace:()=>Ho,text_split:()=>Wo,text_strip:()=>Ko,text_substring:()=>Bo,text_substring2:()=>Vo,text_substring3:()=>Qo,text_textarea:()=>Lo});var E={};t.r(E),t.d(E,{content_in_lists:()=>Xp,enumerate:()=>vp,list_many_input:()=>Rp,list_tolist:()=>Pp,list_tolist2:()=>Yp,list_trig:()=>mp,lists_2d_get_col_row_data:()=>np,lists_2d_get_data_with_col_row:()=>ip,lists_append_extend:()=>ap,lists_change_to:()=>Op,lists_change_to_general:()=>gp,lists_clear:()=>Ip,lists_create_with:()=>sp,lists_create_with2:()=>Sp,lists_create_with_noreturn:()=>cp,lists_create_with_text:()=>_p,lists_create_with_text2:()=>Ap,lists_del_general:()=>Cp,lists_find:()=>Tp,lists_getIndex3:()=>Lp,lists_getSublist3:()=>Np,lists_get_index:()=>op,lists_get_random_item:()=>up,lists_get_random_sublist:()=>rp,lists_get_sublist:()=>ep,lists_insert_value:()=>lp,lists_insert_value2:()=>fp,lists_pop:()=>hp,lists_remove_at:()=>Mp,lists_remove_at2:()=>Fp,lists_reverse:()=>dp,lists_setIndex3:()=>Dp,lists_set_index:()=>pp,lists_sort:()=>Ep});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Jp,dicts_add_or_change:()=>Bp,dicts_clear:()=>wp,dicts_create_with:()=>xp,dicts_create_with_noreturn:()=>zp,dicts_deldict:()=>Kp,dicts_delete:()=>Gp,dicts_get:()=>bp,dicts_get_default:()=>Vp,dicts_items:()=>kp,dicts_keys:()=>yp,dicts_length:()=>Wp,dicts_pop:()=>qp,dicts_setdefault:()=>Qp,dicts_to_json:()=>$p,dicts_to_json2:()=>ea,dicts_to_to:()=>ta,dicts_todict:()=>jp,dicts_update:()=>Up,dicts_values:()=>Hp,json_to_dicts:()=>Zp});var R={};t.r(R),t.d(R,{logic_boolean:()=>oa,logic_compare:()=>ia,logic_compare_continous:()=>na,logic_is:()=>ra,logic_is_in:()=>ua,logic_negate:()=>_a,logic_null:()=>pa,logic_operation:()=>sa,logic_tobool:()=>la,logic_true_or_false:()=>aa});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Xa,sdcard_use_spi_init:()=>va,storage_can_write_ornot:()=>Ra,storage_change_dir:()=>Da,storage_close_file:()=>ga,storage_delete_file:()=>Sa,storage_file_seek:()=>Na,storage_file_tell:()=>La,storage_file_write:()=>ha,storage_fileopen:()=>Ia,storage_fileopen_new:()=>Ta,storage_fileopen_new_encoding:()=>Ma,storage_get_a_line:()=>Oa,storage_get_contents:()=>Ea,storage_get_contents_without_para:()=>ma,storage_get_current_dir:()=>fa,storage_get_file_size:()=>Aa,storage_get_filename:()=>ca,storage_is_file:()=>Ya,storage_list_all_files:()=>Ca,storage_make_dir:()=>Fa,storage_open_file_with_os:()=>da,storage_rename:()=>Pa});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Va,procedures_callreturn:()=>ba,procedures_defnoreturn:()=>ya,procedures_defreturn:()=>xa,procedures_ifreturn:()=>Ba,procedures_return:()=>Ga});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Qa,tuple_create_with:()=>Ua,tuple_create_with_noreturn:()=>Za,tuple_create_with_text2:()=>wa,tuple_create_with_text_return:()=>ka,tuple_del:()=>Ka,tuple_find:()=>za,tuple_getIndex:()=>Ha,tuple_getSublist:()=>$a,tuple_get_random_item:()=>eu,tuple_get_sublist:()=>tu,tuple_input:()=>nu,tuple_join:()=>Ja,tuple_length:()=>Wa,tuple_max:()=>qa,tuple_totuple:()=>iu,tuple_trig:()=>ja});var S={};t.r(S),t.d(S,{set_add_discard:()=>ru,set_clear:()=>pu,set_create_with:()=>su,set_create_with_text_return:()=>Iu,set_length:()=>_u,set_operate:()=>au,set_operate_update:()=>uu,set_pop:()=>ou,set_sub:()=>lu,set_toset:()=>Tu,set_update:()=>du});var A={};t.r(A),t.d(A,{html_content:()=>Eu,html_content_more:()=>Ou,html_document:()=>Mu,html_form:()=>cu,html_head_body:()=>mu,html_style:()=>Ru,html_style_content:()=>gu,html_text:()=>Cu,html_title:()=>hu});var L={};t.r(L),t.d(L,{attribute_access:()=>Fu,function_call:()=>fu,raw_block:()=>Su,raw_empty:()=>Lu,raw_expression:()=>Au,raw_table:()=>Nu,type_check:()=>Du});var N={};t.r(N),t.d(N,{PIN_init:()=>xr,actuator_extern_get_led_bright:()=>Hu,actuator_extern_get_led_state:()=>Wu,actuator_extern_led_bright:()=>ku,actuator_extern_led_brightness:()=>Ku,actuator_ms32006_dcmotor:()=>er,actuator_ms32006_init:()=>tr,actuator_ms32006_stepper:()=>ir,actuator_neopixel_init:()=>nr,actuator_neopixel_rgb:()=>sr,actuator_neopixel_rgb_all:()=>_r,actuator_neopixel_rgb_show_all_chase:()=>ar,actuator_neopixel_rgb_show_all_rainbow:()=>pr,actuator_neopixel_write:()=>or,actuator_use_uart_init:()=>ur,esp32_music_get_tempo_extern:()=>Gu,esp32_music_pitch:()=>yu,esp32_music_pitch_init:()=>xu,esp32_music_pitch_with_time:()=>bu,esp32_music_play_list:()=>Vu,esp32_music_reset_extern:()=>Uu,esp32_music_set_tempo_extern:()=>Bu,esp32_music_stop:()=>wu,mixbot_actuator_extern_get_addr:()=>vr,mixbot_actuator_extern_set_addr:()=>Xr,mixbot_addr_extern:()=>Rr,parrot_PIN_init:()=>Br,parrot_move_speed:()=>Gr,pin_led_bright:()=>yr,player_insert_music:()=>Mr,player_play_music:()=>Tr,player_set_mode:()=>Ir,player_set_play:()=>lr,player_set_volume:()=>dr,player_whether_stop:()=>rr,robot_led_extern:()=>Sr,robot_led_extern_get_value:()=>Ar,robot_motor_extern:()=>cr,robot_motor_extern_get_speed:()=>gr,robot_servo_extern_absolute_run:()=>fr,robot_servo_extern_get_status:()=>Lr,robot_servo_extern_relative_continue:()=>Yr,robot_servo_extern_relative_origin:()=>Fr,robot_servo_extern_relative_run:()=>Pr,robot_servo_extern_stop:()=>Dr,robot_servo_extern_stop_mode:()=>Nr,robot_traffic_light_extern:()=>Cr,servo_PIN_init:()=>br,servo_get_angle:()=>$u,servo_get_speed:()=>Zu,servo_init:()=>Ju,servo_move:()=>qu,servo_move_angle:()=>Vr,servo_set_angle:()=>zu,servo_set_speed:()=>ju,servo_speed_360:()=>Qu,syn6288_builtin_voice:()=>Er,syn6288_get_voice:()=>mr,syn6288_set_voice:()=>hr,syn6288_tts_play:()=>Or});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>El,actuator_dc_motor_stop:()=>Ol,actuator_get_led_bright:()=>Wr,actuator_get_led_state:()=>Kr,actuator_led_bright:()=>Hr,actuator_led_brightness:()=>Jr,actuator_mixbot_buzzer_on_off:()=>Sl,actuator_mixgo_nova_mic_get:()=>fl,actuator_mixgo_nova_mic_set:()=>Dl,actuator_mixgo_nova_onboard_music_pitch:()=>xl,actuator_mixgo_nova_onboard_music_stop:()=>yl,actuator_mixgo_nova_play_audio:()=>vl,actuator_mixgo_nova_play_online_audio:()=>Xl,actuator_mixgo_nova_record_audio:()=>Yl,actuator_mixgo_nova_voice_get:()=>Pl,actuator_mixgo_nova_voice_set:()=>Fl,actuator_mixgo_zero_led_color:()=>qr,actuator_onboard_neopixel_rgb:()=>tl,actuator_onboard_neopixel_rgb_all:()=>el,actuator_onboard_neopixel_rgb_show_all_chase:()=>nl,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>il,actuator_onboard_neopixel_write:()=>sl,actuator_rm_onboard_neopixel_rgb:()=>_l,actuator_rm_onboard_neopixel_rgb_all:()=>ol,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>pl,actuator_stepper_keep:()=>hl,actuator_stepper_stop:()=>ml,analog_ble_keyboard_init:()=>Ql,analog_ble_keyboard_input:()=>$l,analog_ble_keyboard_mouse_init:()=>od,analog_ble_keyboard_mouse_input:()=>rd,analog_ble_keyboard_mouse_send_battery:()=>ud,analog_ble_keyboard_mouse_str:()=>ld,analog_ble_keyboard_send_battery:()=>td,analog_ble_keyboard_str:()=>Zl,analog_ble_mouse_init:()=>ed,analog_ble_mouse_input:()=>sd,analog_ble_mouse_keyboard_input:()=>dd,analog_ble_mouse_send_battery:()=>_d,analog_keyboard_input:()=>Gl,analog_keyboard_str:()=>ql,analog_mouse_input:()=>Kl,bitbot_motor:()=>Nl,bitbot_move:()=>Al,bitbot_stop:()=>Ll,ble_keyboard_connect:()=>jl,ble_keyboard_get_mac:()=>zl,ble_keyboard_mouse_connect:()=>ad,ble_keyboard_mouse_get_mac:()=>pd,ble_mouse_connect:()=>nd,ble_mouse_get_mac:()=>id,cc_number:()=>Zr,educore_ble_keyboard_input:()=>gd,educore_ble_sensor_connected:()=>cd,educore_ble_sensor_init:()=>Rd,educore_buzzer:()=>Id,educore_buzzer_play_tone:()=>Td,educore_buzzer_play_tone_time:()=>Md,educore_buzzer_stop:()=>hd,educore_neopixel_clear:()=>Od,educore_neopixel_rgb:()=>Ed,educore_rgb_light:()=>md,esp32_music_get_tempo:()=>ul,esp32_music_reset:()=>rl,esp32_music_set_tempo:()=>al,esp32_onboard_music_pitch:()=>ll,esp32_onboard_music_pitch_with_time:()=>dl,esp32_onboard_music_play_list:()=>Tl,esp32_onboard_music_stop:()=>Il,general_key:()=>wl,general_key_tuple:()=>kl,generalkey_container:()=>Hl,generalkey_create_with_item:()=>Wl,get_keyboard_light:()=>Cd,get_power_output:()=>Vl,ledswitch:()=>kr,mixbot_motor:()=>Cl,mixbot_motor_status:()=>Rl,mixbot_move:()=>cl,mixbot_stop:()=>gl,mouse_key:()=>Jl,number:()=>wr,rm_actuator_get_led_bright:()=>zr,rm_actuator_get_led_state:()=>jr,rm_actuator_led_bright:()=>Qr,rm_actuator_led_brightness:()=>$r,rm_motor:()=>Ml,set_all_power_output:()=>Bl,set_power_output:()=>bl,special_key:()=>Ul});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>nI,ai_sensor_ailocal_class:()=>Kd,ai_sensor_ailocal_class_result:()=>Jd,ai_sensor_ailocal_train:()=>Wd,ai_sensor_asr_recognize:()=>$d,ai_sensor_audio_play:()=>Qd,ai_sensor_audio_record:()=>qd,ai_sensor_barcode:()=>Pd,ai_sensor_circle:()=>bd,ai_sensor_classifier_faces:()=>iI,ai_sensor_color:()=>Ud,ai_sensor_color_chases:()=>Hd,ai_sensor_color_chases_result:()=>kd,ai_sensor_config:()=>fd,ai_sensor_face:()=>eI,ai_sensor_find_20objects:()=>sI,ai_sensor_find_barcodes:()=>Yd,ai_sensor_find_circles:()=>Vd,ai_sensor_find_colors:()=>wd,ai_sensor_find_licenseplates:()=>tI,ai_sensor_find_lines:()=>yd,ai_sensor_find_qrcodes:()=>Dd,ai_sensor_find_rects:()=>Gd,ai_sensor_find_tags:()=>Xd,ai_sensor_licenseplate:()=>Zd,ai_sensor_line:()=>xd,ai_sensor_qrcode:()=>Ld,ai_sensor_qrcode_lite:()=>Nd,ai_sensor_rect:()=>Bd,ai_sensor_rgb:()=>Fd,ai_sensor_tag:()=>vd,ai_sensor_use_uart_init:()=>Ad,ai_sensor_yolo_recognize:()=>zd,ai_sensor_yolo_recognize_result:()=>jd});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>pI,MICROPYTHON_AI_Speech_unit:()=>oI,MICROPYTHON_AI_client:()=>_I});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>gI,mpython_blynk_app_notify:()=>MI,mpython_blynk_email:()=>EI,mpython_blynk_get_timers:()=>OI,mpython_blynk_on_connected:()=>dI,mpython_blynk_on_disconnected:()=>lI,mpython_blynk_run:()=>TI,mpython_blynk_sensor_data_to_app:()=>cI,mpython_blynk_set_property:()=>mI,mpython_blynk_setup:()=>CI,mpython_blynk_stop_timers:()=>hI,mpython_blynk_sync_virtual:()=>rI,mpython_blynk_terminal_widget_vpin:()=>uI,mpython_blynktimer:()=>RI,mpython_blynktimer_run:()=>II});var Y={};t.r(Y),t.d(Y,{cc_g1_init:()=>SI,cc_g1_read_bat:()=>AI,cc_g1_read_joystick:()=>LI,cc_g1_read_key:()=>NI,cc_g1_turnoff:()=>DI});var v={};t.r(v),t.d(v,{ce_go_dc_motor:()=>bI,ce_go_get_led_bright:()=>YI,ce_go_get_led_state:()=>vI,ce_go_hall_attachInterrupt:()=>VI,ce_go_hall_data:()=>GI,ce_go_hall_initialize:()=>BI,ce_go_led_bright:()=>PI,ce_go_led_brightness:()=>XI,ce_go_light_number:()=>FI,ce_go_pin_light:()=>WI,ce_go_pin_near:()=>wI,ce_go_pin_near_line:()=>UI,ce_go_pin_near_state_change:()=>kI,ce_go_stepper_keep:()=>xI,ce_go_stepper_stop:()=>yI,educore_car:()=>KI,educore_car_pin_near:()=>zI,educore_car_pin_near_line:()=>QI,educore_car_stepper_keep:()=>JI,educore_car_stepper_stop:()=>qI,sensor_mixgome_eulerangles:()=>HI});var X={};t.r(X),t.d(X,{communicate_bluetooth_central_init:()=>YT,communicate_bluetooth_connect:()=>yT,communicate_bluetooth_disconnect:()=>bT,communicate_bluetooth_handle:()=>wT,communicate_bluetooth_is_connected:()=>BT,communicate_bluetooth_mac:()=>xT,communicate_bluetooth_peripheral_init:()=>vT,communicate_bluetooth_recv:()=>GT,communicate_bluetooth_recv_only:()=>UT,communicate_bluetooth_scan:()=>XT,communicate_bluetooth_send:()=>VT,communicate_espnow_init:()=>kT,communicate_espnow_init_new:()=>HT,communicate_i2c_available:()=>TT,communicate_i2c_init:()=>tT,communicate_i2c_master_read:()=>IT,communicate_i2c_onboard:()=>$I,communicate_i2c_read:()=>eT,communicate_i2c_scan:()=>nT,communicate_i2c_write:()=>iT,communicate_ir_recv_init:()=>gT,communicate_ir_send_init:()=>NT,communicate_ow_init:()=>hT,communicate_ow_read:()=>ET,communicate_ow_reset:()=>cT,communicate_ow_scan:()=>mT,communicate_ow_select:()=>RT,communicate_ow_write:()=>OT,communicate_spi_buffer:()=>oT,communicate_spi_init:()=>sT,communicate_spi_onboard:()=>ZI,communicate_spi_read:()=>pT,communicate_spi_read_output:()=>aT,communicate_spi_readinto:()=>uT,communicate_spi_readinto_output:()=>rT,communicate_spi_set:()=>_T,communicate_spi_write:()=>lT,communicate_spi_write_readinto:()=>dT,espnow_radio_channel:()=>zT,espnow_radio_channel_new:()=>$T,espnow_radio_on_off:()=>ZT,espnow_radio_rec:()=>eM,espnow_radio_recv:()=>nM,espnow_radio_recv_certain_msg:()=>sM,espnow_radio_recv_certain_msg_new:()=>oM,espnow_radio_recv_msg:()=>iM,espnow_radio_recv_new:()=>_M,espnow_radio_send:()=>tM,espnow_radio_txpower:()=>jT,i2c_available:()=>DM,i2c_init:()=>TM,i2c_master_reader2:()=>NM,i2c_read:()=>MM,i2c_scan:()=>mM,i2c_slave_onreceive:()=>MT,i2c_write:()=>hM,internal_variable:()=>CT,ir_recv_timeout:()=>LT,ir_transmit_busy:()=>PT,ir_transmit_conventional_data:()=>DT,ir_transmit_raw_code:()=>FT,ir_transmit_study_code:()=>fT,ir_whether_recv:()=>AT,lora_init:()=>pM,lora_packet:()=>aM,lora_recv:()=>rM,lora_send:()=>uM,network_espnow_info:()=>KT,network_espnow_mac:()=>WT,network_espnow_recv:()=>JT,network_espnow_recv_handle:()=>QT,network_espnow_send:()=>qT,recv_fun:()=>ST,spi_buffer:()=>RM,spi_init:()=>EM,spi_read:()=>cM,spi_read_output:()=>gM,spi_readinto:()=>CM,spi_readinto_output:()=>SM,spi_set:()=>OM,spi_write:()=>AM,spi_write_readinto:()=>LM,urequests_attribute:()=>dM,urequests_get:()=>lM,urequests_method:()=>IM});var x={};t.r(x),t.d(x,{display_animate:()=>oh,display_blink_rate:()=>ih,display_circle:()=>ph,display_color_seclet:()=>Oh,display_draw_4strings:()=>zM,display_fill:()=>_h,display_get_screen_image:()=>eh,display_help:()=>uh,display_image_size:()=>jM,display_lcd_use_i2c_init:()=>Ah,display_line:()=>ZM,display_line_arbitrarily:()=>th,display_matrix_extern_bright_point:()=>wM,display_matrix_extern_bright_screen:()=>HM,display_matrix_extern_clear:()=>WM,display_matrix_extern_get_pixel:()=>UM,display_matrix_extern_get_screen_pixel:()=>kM,display_matrix_extern_image_builtins:()=>KM,display_matrix_extern_scroll_string:()=>yM,display_matrix_extern_scroll_string_delay:()=>bM,display_matrix_extern_shift:()=>GM,display_matrix_extern_show_frame_string:()=>VM,display_matrix_extern_show_frame_string_delay:()=>BM,display_matrix_extern_show_image:()=>XM,display_matrix_extern_show_image_or_string_delay:()=>xM,display_matrix_use_i2c_init:()=>vM,display_oled_drawPixel:()=>lh,display_oled_showBitmap:()=>rh,display_oled_use_i2c_init:()=>Fh,display_onoff:()=>sh,display_rect:()=>$M,display_rgb_color:()=>nh,display_tm1650_power:()=>Ih,display_tm1650_set_brightness:()=>hh,display_tm1650_show_dot:()=>Mh,display_tm1650_show_num:()=>Th,display_tm_use_i2c_init:()=>dh,display_triangle:()=>ah,display_use_i2c_init:()=>QM,extern_oled_bright_point:()=>Uh,extern_oled_clear:()=>wh,extern_oled_get_pixel:()=>Gh,extern_oled_hvline:()=>Hh,extern_oled_line:()=>Wh,extern_oled_scroll_string:()=>xh,extern_oled_scroll_string_delay:()=>yh,extern_oled_shape_rect:()=>kh,extern_oled_shift:()=>Bh,extern_oled_show_frame_string:()=>bh,extern_oled_show_frame_string_delay:()=>Vh,extern_oled_show_image:()=>Ph,extern_oled_show_image_or_string_delay:()=>Xh,extern_oled_show_image_xy:()=>Yh,extern_oled_show_string:()=>vh,lcd_backlight:()=>Dh,lcd_clear:()=>fh,lcd_print_string:()=>Nh,lcd_show_image_or_string_delay:()=>Lh,matrix_extern_image_arithmetic:()=>JM,matrix_extern_image_invert:()=>qM,tft_fill:()=>Ch,tft_line_arbitrarily:()=>Sh,tft_scroll_string_delay:()=>ch,tft_show_frame_string_delay:()=>gh,tft_show_image_or_string_delay:()=>Rh,tft_show_image_xy:()=>Eh,tft_use_spi_init:()=>mh});var y={};t.r(y),t.d(y,{bitbot_display_bitmap_create:()=>Vm,bitbot_display_image_create:()=>bm,display_available:()=>dm,display_bitmap_create:()=>em,display_bright_point:()=>am,display_bright_screen:()=>rm,display_clear:()=>lm,display_get_pixel:()=>pm,display_get_screen_pixel:()=>um,display_image_builtins:()=>im,display_image_builtins_all:()=>nm,display_image_create:()=>tm,display_scroll_string:()=>Qh,display_scroll_string_delay:()=>zh,display_shift:()=>om,display_show_frame_string:()=>$h,display_show_frame_string_delay:()=>Zh,display_show_image:()=>Jh,display_show_image_or_string_delay:()=>qh,draw_pointer:()=>eE,image_arithmetic:()=>sm,image_invert:()=>_m,mixbot_display_bitmap_create:()=>Ym,mixbot_display_bright_screen:()=>xm,mixbot_display_get_ambientbright:()=>Xm,mixbot_display_get_screen_pixel:()=>vm,mixbot_display_image_create:()=>Pm,mixbot_display_rotate:()=>ym,mixgo_display_bitmap_create:()=>Em,mixgo_display_image_create_new:()=>mm,mixgome_display_bitmap_create:()=>Tm,mixgome_display_font:()=>Om,mixgome_display_image_create:()=>Im,mixgomini_display_bitmap_create:()=>hm,mixgomini_display_image_create:()=>Mm,mpython_display_hvline:()=>Dm,mpython_display_line:()=>fm,mpython_display_shape_rect:()=>Nm,mpython_pbm_image:()=>Fm,nova_draw_pointer:()=>iE,onboard_oled_bright_point:()=>Lm,onboard_oled_scroll_string_delay:()=>Sm,onboard_oled_show_frame_string_delay:()=>Am,onboard_oled_show_image:()=>Rm,onboard_oled_show_image_or_string_delay:()=>Cm,onboard_oled_show_image_xy:()=>cm,onboard_oled_show_string:()=>gm,onboard_tft_bright_point:()=>Jm,onboard_tft_bright_screen:()=>uE,onboard_tft_clear:()=>rE,onboard_tft_clock_clear:()=>Zm,onboard_tft_clock_draw:()=>$m,onboard_tft_clock_get_rtctime:()=>zm,onboard_tft_clock_init:()=>Qm,onboard_tft_clock_set_time:()=>jm,onboard_tft_display_hvline:()=>Hm,onboard_tft_display_line:()=>Wm,onboard_tft_display_shape_circle:()=>tE,onboard_tft_display_shape_rect:()=>km,onboard_tft_fill:()=>qm,onboard_tft_get_pixel:()=>Km,onboard_tft_get_screen_pixel:()=>aE,onboard_tft_scroll_string:()=>_E,onboard_tft_scroll_string_delay:()=>jh,onboard_tft_shift:()=>pE,onboard_tft_show_frame_string:()=>oE,onboard_tft_show_frame_string_delay:()=>wm,onboard_tft_show_image:()=>sE,onboard_tft_show_image_or_string_delay:()=>Um,onboard_tft_show_image_xy:()=>Bm,onboard_tft_show_image_xy_direct:()=>Gm,onboard_tft_show_texts:()=>nE});var b={};t.r(b),t.d(b,{factory_block:()=>DE,factory_block_return:()=>fE,factory_block_return_with_textarea:()=>PE,factory_block_with_textarea:()=>FE,factory_callMethod_noreturn:()=>LE,factory_callMethod_return:()=>NE,factory_create_with_container:()=>gE,factory_create_with_item:()=>CE,factory_declare:()=>AE,factory_from_import:()=>OE,factory_function_noreturn:()=>cE,factory_function_return:()=>SE,factory_import:()=>RE,folding_block:()=>YE});var V={};t.r(V),t.d(V,{controls_pin_attachInterrupt:()=>tO,inout_analog_atten:()=>wE,inout_analog_read:()=>UE,inout_analog_read_init:()=>qE,inout_analog_write:()=>VE,inout_analog_write_init:()=>JE,inout_analog_write_set:()=>BE,inout_analog_write_set_freq:()=>jE,inout_digital_init:()=>WE,inout_digital_read:()=>yE,inout_digital_write:()=>xE,inout_highlow:()=>XE,inout_pinMode:()=>zE,inout_pin_attachInterrupt:()=>HE,inout_pin_pressed:()=>kE,inout_pin_pressed_init:()=>QE,inout_pwm_analog_write:()=>bE,inout_pwm_analog_write_init:()=>KE,inout_pwm_analog_write_set_freq:()=>GE,pin_pressed:()=>ZE,pin_pressed_init:()=>$E});var B={};t.r(B),t.d(B,{IOT_CONNECT_OLLAMA:()=>bO,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>SO,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>CO,IOT_EMQX_PING:()=>cO,IOT_FORMATTING:()=>OO,IOT_FORMAT_STRING:()=>RO,IOT_MIXIO_NTP:()=>gO,IOT_MIXIO_PUBLISH:()=>dO,IOT_MIXIO_SUBSCRIBE:()=>IO,iot_checkonenet:()=>XO,iot_client_onboard:()=>LO,iot_connect_ollama:()=>yO,iot_connect_openai:()=>VO,iot_create_with_item:()=>rO,iot_http_client:()=>NO,iot_http_data:()=>DO,iot_mixio_check:()=>hO,iot_mixio_connect:()=>lO,iot_mixio_connect_only:()=>MO,iot_mixio_disconnect:()=>TO,iot_mixio_format_msg:()=>EO,iot_mixio_format_topic:()=>mO,iot_mixly_key:()=>AO,iot_mqtt_client:()=>fO,iot_mqtt_data:()=>FO,iot_onenet_check:()=>_O,iot_onenet_connect:()=>nO,iot_onenet_disconnect:()=>sO,iot_onenet_publish:()=>pO,iot_onenet_publish_dict:()=>oO,iot_onenetconnect:()=>YO,iot_onenetdisconnect:()=>vO,iot_publish:()=>xO,iot_publish_container:()=>aO,iot_publish_item:()=>uO,iot_wifi_connect:()=>iO,iot_wificonnect:()=>PO,ollama_empty_history:()=>UO,use_ollama_llm_to_chat:()=>BO,use_ollama_llm_to_chat_return:()=>GO});var G={};t.r(G),t.d(G,{educore_mqtt_connect:()=>RR,educore_mqtt_connect_success:()=>SR,educore_mqtt_subscribe_message:()=>cR,educore_mqtt_topic_publish:()=>CR,educore_mqtt_topic_subscribe:()=>gR,educore_wifi_connect:()=>OR,network_ap_connect:()=>$O,network_connect:()=>JO,network_get_connect:()=>QO,network_get_wifi:()=>jO,network_init:()=>kO,network_is_active:()=>WO,network_open:()=>HO,network_scan:()=>KO,network_server:()=>ZO,network_socket_accept:()=>sR,network_socket_bind:()=>eR,network_socket_close:()=>uR,network_socket_connect:()=>iR,network_socket_init:()=>tR,network_socket_listen:()=>nR,network_socket_receive:()=>_R,network_socket_receive_from:()=>pR,network_socket_send:()=>oR,network_socket_send_to:()=>aR,network_stop:()=>zO,network_wifi_connect:()=>qO,ntptime_address:()=>TR,ntptime_time:()=>IR,requests_attribute:()=>lR,requests_attribute2:()=>ER,requests_get:()=>rR,requests_get2:()=>hR,requests_method:()=>dR,requests_post:()=>mR});var U={};t.r(U),t.d(U,{CI130X_BROADCAST:()=>QR,CI130X_GET_THE_RECOGNIZED_CMD:()=>qR,CI130X_GET_WHETHER_IDENTIFY:()=>JR,CI130X_IDENTIFY_AND_SAVE:()=>KR,CI130X_SET_SYSTEM_CMD:()=>zR,HCSR04:()=>Vc,PS2_Button:()=>wc,PS2_Buttons:()=>Hc,PS2_Buttons_new:()=>qc,PS2_State:()=>kc,PS2_init:()=>Bc,PS2_init_new:()=>Kc,PS2_stk:()=>Wc,PS2_stk_new:()=>Qc,PS2_vibration:()=>Uc,PS2_vibration_new:()=>Jc,camera_sensor_init:()=>Ag,camera_sensor_result:()=>Lg,column_tube_foot:()=>Pg,define_keyboards:()=>Yg,educore_body_sensor:()=>Mg,educore_button_sensor_extern:()=>Og,educore_camera_sensor:()=>Sg,educore_infrared_sensor:()=>Eg,educore_soilhum_sensor:()=>hg,educore_temp_sensor:()=>Cg,educore_temphum_sensor:()=>mg,educore_ultrasonic_sensor:()=>cg,esp32_s2_weather_init:()=>Xc,esp32_s2_weather_rain:()=>yc,esp32_s2_weather_wd:()=>xc,esp32_s2_weather_ws:()=>bc,extern_rfid_read:()=>Rc,extern_rfid_readcontent:()=>gc,extern_rfid_readid:()=>cc,extern_rfid_status:()=>Ac,extern_rfid_write:()=>Cc,extern_rfid_write_return:()=>Sc,get_keboards_value:()=>vg,gnss_get_data:()=>Zc,gnss_have_data:()=>$c,init_matrix_keyboard:()=>fg,interaction_whether_to_interaction:()=>HR,interaction_whether_to_interaction_SANT:()=>WR,line_tube_foot:()=>Fg,mixbot_sensor_extern_get_addr:()=>pg,mixbot_sensor_extern_set_addr:()=>ag,pm25_get_data:()=>jc,radar_set_DETECTION_THRESHOLD:()=>wR,radar_set_DETECTION_THRESHOLD_SANT:()=>kR,robot_button_extern_get_value:()=>eg,robot_color_extern_get_value:()=>og,robot_infrared_extern_get_value:()=>ng,robot_infrared_extern_grey_get_value:()=>sg,robot_potentiometer_extern_get_value:()=>_g,robot_sonar_extern_get_value:()=>ug,robot_sonar_extern_led:()=>rg,robot_touch_extern_get_value:()=>ig,sensor_APDS9960_extern:()=>$R,sensor_DS18X20:()=>BR,sensor_LTR308_extern:()=>ZR,sensor_LTR390UV_extern:()=>ic,sensor_MAX30102_extern:()=>jR,sensor_QMC5883L_extern:()=>rc,sensor_VL530LX_extern:()=>nc,sensor_adxl345_get_acceleration:()=>PR,sensor_aht11_extern:()=>_c,sensor_bmp:()=>bR,sensor_compass_reset:()=>Ec,sensor_dht11:()=>vR,sensor_hp203_extern:()=>oc,sensor_light_level:()=>YR,sensor_lm35:()=>GR,sensor_ltr381_extern:()=>tc,sensor_mixgo_extern_button_attachInterrupt:()=>fR,sensor_mixgo_extern_button_get_presses:()=>DR,sensor_mixgo_extern_button_is_pressed:()=>LR,sensor_mixgo_extern_button_was_pressed:()=>NR,sensor_mixgo_extern_light:()=>XR,sensor_mixgo_extern_pin_near:()=>yR,sensor_mixgo_extern_sound:()=>xR,sensor_mixgoce_hot_wheel_degrees:()=>vc,sensor_mixgoce_hot_wheel_is_touched:()=>Yc,sensor_mpu9250_attachGestureInterrupt:()=>FR,sensor_mpu9250_calibrate_compass:()=>Mc,sensor_mpu9250_field_strength:()=>mc,sensor_mpu9250_gesture:()=>lc,sensor_mpu9250_get_acceleration:()=>dc,sensor_mpu9250_get_gyro:()=>Tc,sensor_mpu9250_get_magnetic:()=>Ic,sensor_mpu9250_temperature:()=>hc,sensor_ms5611_extern:()=>ac,sensor_ms5611_extern_altitude:()=>uc,sensor_read_humiture:()=>Rg,sensor_sht:()=>VR,sensor_shtc3_extern:()=>sc,sensor_spl06_001_extern:()=>pc,sensor_ucs12071_extern:()=>ec,sensor_use_i2c_init:()=>UR,sensor_use_spi_init:()=>Oc,sensor_use_uart_init:()=>zc,sensor_weather_solo_init:()=>lg,sensor_weather_solo_rain:()=>Tg,sensor_weather_solo_wd:()=>dg,sensor_weather_solo_ws:()=>Ig,sensor_weigh_init:()=>Ng,tvoc_get_data:()=>tg,ultrasonic_sensor_read_distance:()=>gg,weather_data:()=>Lc,weather_have_data:()=>Nc,weather_set_label:()=>fc,weather_set_label_container:()=>Fc,weather_set_label_item:()=>Pc,weather_uart_mixio:()=>Dc,weigh_sensor_get_weight:()=>Dg});var w={};t.r(w),t.d(w,{HCSR04:()=>zg,RTC_set_date:()=>Qg,RTC_set_time:()=>qg,bitbot_als_num:()=>_S,dht11:()=>dS,educore_button_sensor:()=>cS,educore_button_was_pressed:()=>gS,educore_gyroscope_sensor:()=>ES,educore_gyroscope_sensor_read:()=>OS,educore_gyroscope_sensor_shake:()=>RS,educore_light_sensor:()=>mS,educore_rfid_sensor:()=>CS,educore_rfid_sensor_scan:()=>SS,educore_rfid_sensor_scan_data:()=>AS,educore_voice_sensor:()=>MS,number1:()=>$g,number2:()=>Zg,number3:()=>tC,number4:()=>eC,number5:()=>iC,number6:()=>nC,number7:()=>sC,onboard_RTC_get_time:()=>dC,onboard_RTC_get_time_str:()=>EC,onboard_RTC_get_timestamp:()=>IC,onboard_RTC_get_timetuple_to_str:()=>OC,onboard_RTC_set_datetime:()=>hC,onboard_RTC_settime_string:()=>MC,onboard_RTC_timestamp_totuple:()=>TC,rfid_readcontent:()=>LC,rfid_readid:()=>AC,rfid_status:()=>fC,rfid_write:()=>NC,rfid_write_return:()=>DC,sensor_LTR308:()=>RC,sensor_aht11:()=>gC,sensor_bitbot_ALS:()=>sS,sensor_button_get_presses:()=>aS,sensor_button_is_pressed:()=>oS,sensor_button_was_pressed:()=>pS,sensor_distance_hrsc04:()=>Jg,sensor_eulerangles:()=>PC,sensor_field_strength:()=>IS,sensor_get_acceleration:()=>FC,sensor_get_temperature:()=>CC,sensor_get_the_coprocessor_version:()=>LS,sensor_hp203:()=>SC,sensor_light:()=>lS,sensor_mixbot_get_gyro:()=>nS,sensor_mixbot_patrol_calibrate:()=>tS,sensor_mixbot_patrol_value:()=>eS,sensor_mixbot_temperature:()=>iS,sensor_mixgo_LTR308:()=>rC,sensor_mixgo_button_attachInterrupt:()=>Vg,sensor_mixgo_button_get_presses:()=>bg,sensor_mixgo_button_is_pressed:()=>xg,sensor_mixgo_button_was_pressed:()=>yg,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>wC,sensor_mixgo_cc_mmc5603_get_angle:()=>UC,sensor_mixgo_cc_mmc5603_get_magnetic:()=>GC,sensor_mixgo_light:()=>jg,sensor_mixgo_nova_LTR308:()=>uC,sensor_mixgo_nova_pin_near:()=>aC,sensor_mixgo_pin_near:()=>pC,sensor_mixgo_pin_near_double:()=>oC,sensor_mixgo_pin_near_single:()=>_C,sensor_mixgo_pin_pressed:()=>kg,sensor_mixgo_sant_color:()=>lC,sensor_mixgo_touch_slide:()=>Kg,sensor_mixgocar42_button_attachInterrupt:()=>wg,sensor_mixgocar42_button_get_presses:()=>Ug,sensor_mixgocar42_button_is_pressed:()=>Bg,sensor_mixgocar42_button_was_pressed:()=>Gg,sensor_mixgocar_battery_left:()=>ZC,sensor_mixgocar_pin_near:()=>jC,sensor_mixgocar_pin_near_line:()=>zC,sensor_mixgocar_pin_near_state_change:()=>$C,sensor_mixgoce_pin_pressed:()=>Hg,sensor_mixgoce_temperature:()=>HC,sensor_mixgome_temperature:()=>kC,sensor_mpython_pin_pressed:()=>Wg,sensor_mpython_qmi8658_get_gyro:()=>WC,sensor_mpython_qmi8658_temperature:()=>KC,sensor_onboard_compass_reset:()=>BC,sensor_onboard_mpu9250_calibrate_compass:()=>yC,sensor_onboard_mpu9250_field_strength:()=>VC,sensor_onboard_mpu9250_gesture:()=>YC,sensor_onboard_mpu9250_get_acceleration:()=>vC,sensor_onboard_mpu9250_get_gyro:()=>xC,sensor_onboard_mpu9250_get_magnetic:()=>XC,sensor_onboard_mpu9250_temperature:()=>bC,sensor_pin_near:()=>rS,sensor_pin_pressed:()=>uS,sensor_read:()=>hS,sensor_rm_acc:()=>QC,sensor_rm_battery_left:()=>qC,sensor_rm_pin_near_double:()=>JC,sensor_rtc_init:()=>mC,sensor_sound:()=>cC,sensor_temperature:()=>TS});var k={};t.r(k),t.d(k,{serial_any:()=>yS,serial_begin:()=>US,serial_print:()=>PS,serial_print_byte:()=>FS,serial_print_hex:()=>vS,serial_println:()=>YS,serial_read_from_ai:()=>zS,serial_readline:()=>bS,serial_readstr:()=>xS,serial_readstr_until:()=>VS,serial_receive_data_event:()=>XS,serial_send_to_ai:()=>QS,serial_softserial:()=>GS,serial_softserial_new:()=>BS,system_input:()=>wS,system_print:()=>kS,system_print_container:()=>JS,system_print_end:()=>WS,system_print_inline:()=>HS,system_print_item:()=>qS,system_print_many:()=>KS});var H={};t.r(H),t.d(H,{Panic_with_status_code:()=>tA,Timer_init:()=>IA,base_delay:()=>hA,controls_delay:()=>ZS,controls_delay_new:()=>$S,controls_millis:()=>iA,controls_uname:()=>sA,raw_block:()=>nA,reset:()=>eA,system_bitbot_shutdown:()=>dA,system_machine_reset:()=>lA,system_ticks_diff:()=>pA,system_timer:()=>oA,system_timer_init:()=>aA,system_wdt_feed:()=>rA,system_wdt_init:()=>uA,time_ticks_diff:()=>MA,timer:()=>_A,timer2:()=>TA});var W={};t.r(W),t.d(W,{Air_daily_content:()=>FA,Air_now_content:()=>CA,Geo_moon_content:()=>YA,Geo_sun_content:()=>PA,Life_suggestion_content:()=>AA,Location_search_content:()=>NA,Tide_daily_content:()=>LA,WEATHER_DAILY:()=>OA,WEATHER_HOUR:()=>RA,WEATHER_NOW:()=>EA,Weather_alarm_content:()=>SA,Weather_daily:()=>DA,Weather_daily_content:()=>fA,Weather_now:()=>cA,Weather_now_content:()=>gA});var K={};t.r(K),t.d(K,{PIN_init:()=>YL,actuator_extern_get_led_bright:()=>$A,actuator_extern_get_led_state:()=>ZA,actuator_extern_led_bright:()=>jA,actuator_extern_led_brightness:()=>tL,actuator_ms32006_dcmotor:()=>GA,actuator_ms32006_init:()=>BA,actuator_ms32006_stepper:()=>UA,actuator_neopixel_init:()=>eL,actuator_neopixel_rgb:()=>sL,actuator_neopixel_rgb_all:()=>iL,actuator_neopixel_rgb_show_all_chase:()=>_L,actuator_neopixel_rgb_show_all_rainbow:()=>oL,actuator_neopixel_write:()=>nL,actuator_use_uart_init:()=>pL,esp32_music_get_tempo_extern:()=>JA,esp32_music_pitch:()=>kA,esp32_music_pitch_init:()=>wA,esp32_music_pitch_with_time:()=>HA,esp32_music_play_list:()=>qA,esp32_music_reset_extern:()=>QA,esp32_music_set_tempo_extern:()=>KA,esp32_music_stop:()=>WA,mixbot_actuator_extern_get_addr:()=>FL,mixbot_actuator_extern_set_addr:()=>PL,mixbot_addr_extern:()=>mL,parrot_PIN_init:()=>yL,parrot_move_speed:()=>bL,pin_led_bright:()=>vL,player_play_music:()=>dL,player_set_mode:()=>lL,player_set_play:()=>uL,player_set_volume:()=>rL,player_whether_stop:()=>aL,robot_led_extern:()=>cL,robot_led_extern_get_value:()=>gL,robot_motor_extern:()=>EL,robot_motor_extern_get_speed:()=>OL,robot_servo_extern_absolute_run:()=>LL,robot_servo_extern_get_status:()=>CL,robot_servo_extern_relative_continue:()=>fL,robot_servo_extern_relative_origin:()=>NL,robot_servo_extern_relative_run:()=>DL,robot_servo_extern_stop:()=>AL,robot_servo_extern_stop_mode:()=>SL,robot_traffic_light_extern:()=>RL,servo_PIN_init:()=>XL,servo_get_angle:()=>bA,servo_get_speed:()=>VA,servo_init:()=>vA,servo_move:()=>zA,servo_move_angle:()=>xL,servo_set_angle:()=>xA,servo_set_speed:()=>yA,servo_speed_360:()=>XA,syn6288_builtin_voice:()=>ML,syn6288_get_voice:()=>TL,syn6288_set_voice:()=>IL,syn6288_tts_play:()=>hL});var J={};t.r(J),t.d(J,{actuator_dc_motor:()=>lN,actuator_dc_motor_stop:()=>dN,actuator_get_led_bright:()=>qL,actuator_get_led_state:()=>QL,actuator_led_bright:()=>JL,actuator_led_brightness:()=>zL,actuator_mixbot_buzzer_on_off:()=>mN,actuator_mixgo_nova_mic_get:()=>gN,actuator_mixgo_nova_mic_set:()=>cN,actuator_mixgo_nova_onboard_music_pitch:()=>DN,actuator_mixgo_nova_onboard_music_stop:()=>fN,actuator_mixgo_nova_play_audio:()=>LN,actuator_mixgo_nova_play_online_audio:()=>NN,actuator_mixgo_nova_record_audio:()=>AN,actuator_mixgo_nova_voice_get:()=>SN,actuator_mixgo_nova_voice_set:()=>CN,actuator_mixgo_zero_led_color:()=>jL,actuator_onboard_neopixel_rgb:()=>sN,actuator_onboard_neopixel_rgb_all:()=>_N,actuator_onboard_neopixel_rgb_show_all_chase:()=>oN,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>pN,actuator_onboard_neopixel_write:()=>nN,actuator_stepper_keep:()=>uN,actuator_stepper_stop:()=>rN,analog_ble_keyboard_init:()=>GN,analog_ble_keyboard_input:()=>kN,analog_ble_keyboard_mouse_init:()=>jN,analog_ble_keyboard_mouse_input:()=>eD,analog_ble_keyboard_mouse_send_battery:()=>tD,analog_ble_keyboard_mouse_str:()=>iD,analog_ble_keyboard_send_battery:()=>WN,analog_ble_keyboard_str:()=>HN,analog_ble_mouse_init:()=>KN,analog_ble_mouse_input:()=>QN,analog_ble_mouse_keyboard_input:()=>nD,analog_ble_mouse_send_battery:()=>zN,analog_keyboard_input:()=>vN,analog_keyboard_str:()=>VN,analog_mouse_input:()=>yN,bitbot_motor:()=>RN,bitbot_move:()=>EN,bitbot_stop:()=>ON,ble_keyboard_connect:()=>wN,ble_keyboard_get_mac:()=>UN,ble_keyboard_mouse_connect:()=>ZN,ble_keyboard_mouse_get_mac:()=>$N,ble_mouse_connect:()=>qN,ble_mouse_get_mac:()=>JN,cc_number:()=>$L,educore_ble_keyboard_input:()=>ID,educore_ble_sensor_connected:()=>dD,educore_ble_sensor_init:()=>lD,educore_buzzer:()=>sD,educore_buzzer_play_tone:()=>_D,educore_buzzer_play_tone_time:()=>oD,educore_buzzer_stop:()=>pD,educore_neopixel_clear:()=>rD,educore_neopixel_rgb:()=>uD,educore_rgb_light:()=>aD,esp32_music_get_tempo:()=>BL,esp32_music_reset:()=>HL,esp32_music_set_tempo:()=>VL,esp32_onboard_music_pitch:()=>GL,esp32_onboard_music_pitch_with_time:()=>UL,esp32_onboard_music_play_list:()=>kL,esp32_onboard_music_stop:()=>wL,general_key:()=>xN,general_key_tuple:()=>BN,get_keyboard_light:()=>TD,get_power_output:()=>PN,ledswitch:()=>KL,mixbot_motor:()=>hN,mixbot_motor_status:()=>IN,mixbot_move:()=>TN,mixbot_stop:()=>MN,mouse_key:()=>bN,number:()=>WL,rm_actuator_get_led_bright:()=>tN,rm_actuator_get_led_state:()=>eN,rm_actuator_led_bright:()=>ZL,rm_actuator_led_brightness:()=>iN,rm_motor:()=>aN,set_all_power_output:()=>YN,set_power_output:()=>FN,special_key:()=>XN});var q={};t.r(q),t.d(q,{ai_sensor_20object:()=>JD,ai_sensor_ailocal_class:()=>yD,ai_sensor_ailocal_class_result:()=>bD,ai_sensor_ailocal_train:()=>xD,ai_sensor_asr_recognize:()=>wD,ai_sensor_audio_play:()=>BD,ai_sensor_audio_record:()=>VD,ai_sensor_barcode:()=>cD,ai_sensor_circle:()=>ND,ai_sensor_classifier_faces:()=>KD,ai_sensor_color:()=>PD,ai_sensor_color_chases:()=>XD,ai_sensor_color_chases_result:()=>vD,ai_sensor_config:()=>mD,ai_sensor_face:()=>WD,ai_sensor_find_20objects:()=>qD,ai_sensor_find_barcodes:()=>gD,ai_sensor_find_circles:()=>DD,ai_sensor_find_colors:()=>YD,ai_sensor_find_licenseplates:()=>HD,ai_sensor_find_lines:()=>LD,ai_sensor_find_qrcodes:()=>RD,ai_sensor_find_rects:()=>FD,ai_sensor_find_tags:()=>SD,ai_sensor_licenseplate:()=>kD,ai_sensor_line:()=>AD,ai_sensor_qrcode:()=>OD,ai_sensor_qrcode_lite:()=>hD,ai_sensor_rect:()=>fD,ai_sensor_rgb:()=>ED,ai_sensor_tag:()=>CD,ai_sensor_use_uart_init:()=>MD,ai_sensor_yolo_recognize:()=>GD,ai_sensor_yolo_recognize_result:()=>UD});var Q={};t.r(Q),t.d(Q,{MICROPYTHON_AI_Speech_asr:()=>jD,MICROPYTHON_AI_Speech_unit:()=>zD,MICROPYTHON_AI_client:()=>QD});var z={};t.r(z),t.d(z,{mpython_blynk_app_data:()=>rf,mpython_blynk_app_notify:()=>_f,mpython_blynk_email:()=>lf,mpython_blynk_get_timers:()=>pf,mpython_blynk_on_connected:()=>ef,mpython_blynk_on_disconnected:()=>tf,mpython_blynk_run:()=>sf,mpython_blynk_sensor_data_to_app:()=>uf,mpython_blynk_set_property:()=>df,mpython_blynk_setup:()=>If,mpython_blynk_stop_timers:()=>of,mpython_blynk_sync_virtual:()=>ZD,mpython_blynk_terminal_widget_vpin:()=>$D,mpython_blynktimer:()=>af,mpython_blynktimer_run:()=>nf});var j={};t.r(j),t.d(j,{cc_g1_read_bat:()=>Tf,cc_g1_read_joystick:()=>Mf,cc_g1_read_key:()=>hf,cc_g1_turnoff:()=>mf});var $={};t.r($),t.d($,{ce_go_dc_motor:()=>Af,ce_go_get_led_bright:()=>Rf,ce_go_get_led_state:()=>cf,ce_go_hall_attachInterrupt:()=>Lf,ce_go_hall_data:()=>Df,ce_go_hall_initialize:()=>Nf,ce_go_led_bright:()=>Of,ce_go_led_brightness:()=>gf,ce_go_light_number:()=>Ef,ce_go_pin_light:()=>vf,ce_go_pin_near:()=>Ff,ce_go_pin_near_line:()=>ff,ce_go_pin_near_state_change:()=>Pf,ce_go_stepper_keep:()=>Cf,ce_go_stepper_stop:()=>Sf,educore_car:()=>Xf,educore_car_pin_near:()=>Vf,educore_car_pin_near_line:()=>bf,educore_car_stepper_keep:()=>xf,educore_car_stepper_stop:()=>yf,sensor_mixgome_eulerangles:()=>Yf});var Z={};t.r(Z),t.d(Z,{communicate_bluetooth_central_init:()=>OF,communicate_bluetooth_connect:()=>gF,communicate_bluetooth_disconnect:()=>CF,communicate_bluetooth_handle:()=>fF,communicate_bluetooth_is_connected:()=>AF,communicate_bluetooth_mac:()=>SF,communicate_bluetooth_peripheral_init:()=>RF,communicate_bluetooth_recv:()=>DF,communicate_bluetooth_recv_only:()=>NF,communicate_bluetooth_scan:()=>cF,communicate_bluetooth_send:()=>LF,communicate_espnow_init:()=>FF,communicate_espnow_init_new:()=>PF,communicate_i2c_available:()=>Kf,communicate_i2c_init:()=>Uf,communicate_i2c_master_read:()=>Wf,communicate_i2c_onboard:()=>Bf,communicate_i2c_read:()=>wf,communicate_i2c_scan:()=>Hf,communicate_i2c_write:()=>kf,communicate_ir_recv_init:()=>uF,communicate_ir_send_init:()=>TF,communicate_ow_init:()=>nF,communicate_ow_read:()=>oF,communicate_ow_reset:()=>_F,communicate_ow_scan:()=>sF,communicate_ow_select:()=>aF,communicate_ow_write:()=>pF,communicate_spi_buffer:()=>zf,communicate_spi_init:()=>qf,communicate_spi_onboard:()=>Gf,communicate_spi_read:()=>jf,communicate_spi_read_output:()=>$f,communicate_spi_readinto:()=>Zf,communicate_spi_readinto_output:()=>tF,communicate_spi_set:()=>Qf,communicate_spi_write:()=>eF,communicate_spi_write_readinto:()=>iF,espnow_radio_channel:()=>bF,espnow_radio_channel_new:()=>BF,espnow_radio_on_off:()=>GF,espnow_radio_rec:()=>wF,espnow_radio_recv:()=>HF,espnow_radio_recv_certain_msg:()=>WF,espnow_radio_recv_certain_msg_new:()=>JF,espnow_radio_recv_msg:()=>kF,espnow_radio_recv_new:()=>KF,espnow_radio_send:()=>UF,espnow_radio_txpower:()=>VF,i2c_slave_onreceive:()=>Jf,internal_variable:()=>rF,ir_recv_timeout:()=>IF,ir_transmit_busy:()=>EF,ir_transmit_conventional_data:()=>MF,ir_transmit_raw_code:()=>mF,ir_transmit_study_code:()=>hF,ir_whether_recv:()=>dF,lora_init:()=>qF,lora_packet:()=>QF,lora_recv:()=>jF,lora_send:()=>zF,network_espnow_info:()=>vF,network_espnow_mac:()=>YF,network_espnow_recv:()=>XF,network_espnow_recv_handle:()=>yF,network_espnow_send:()=>xF,recv_fun:()=>lF,urequests_attribute:()=>ZF,urequests_get:()=>$F,urequests_method:()=>tP});var tt={};t.r(tt),t.d(tt,{display_animate:()=>AP,display_circle:()=>LP,display_color_seclet:()=>bP,display_draw_4strings:()=>EP,display_fill:()=>SP,display_lcd_use_i2c_init:()=>kP,display_line:()=>cP,display_line_arbitrarily:()=>OP,display_matrix_extern_bright_point:()=>lP,display_matrix_extern_bright_screen:()=>IP,display_matrix_extern_clear:()=>aP,display_matrix_extern_get_pixel:()=>rP,display_matrix_extern_get_screen_pixel:()=>dP,display_matrix_extern_image_builtins:()=>TP,display_matrix_extern_scroll_string:()=>oP,display_matrix_extern_scroll_string_delay:()=>pP,display_matrix_extern_shift:()=>uP,display_matrix_extern_show_frame_string:()=>sP,display_matrix_extern_show_frame_string_delay:()=>_P,display_matrix_extern_show_image:()=>iP,display_matrix_extern_show_image_or_string_delay:()=>nP,display_matrix_use_i2c_init:()=>eP,display_oled_drawPixel:()=>fP,display_oled_showBitmap:()=>DP,display_oled_use_i2c_init:()=>qP,display_onoff:()=>gP,display_rect:()=>RP,display_tm1650_power:()=>PP,display_tm1650_set_brightness:()=>XP,display_tm1650_show_dot:()=>vP,display_tm1650_show_num:()=>YP,display_tm_use_i2c_init:()=>FP,display_triangle:()=>NP,display_use_i2c_init:()=>mP,extern_oled_bright_point:()=>oY,extern_oled_clear:()=>nY,extern_oled_get_pixel:()=>_Y,extern_oled_hvline:()=>aY,extern_oled_line:()=>uY,extern_oled_scroll_string:()=>eY,extern_oled_scroll_string_delay:()=>iY,extern_oled_shape_rect:()=>pY,extern_oled_shift:()=>sY,extern_oled_show_frame_string:()=>ZP,extern_oled_show_frame_string_delay:()=>tY,extern_oled_show_image:()=>QP,extern_oled_show_image_or_string_delay:()=>$P,extern_oled_show_image_xy:()=>zP,extern_oled_show_string:()=>jP,image_shift:()=>CP,lcd_backlight:()=>KP,lcd_clear:()=>JP,lcd_print_string:()=>WP,lcd_show_image_or_string_delay:()=>HP,matrix_extern_image_arithmetic:()=>MP,matrix_extern_image_invert:()=>hP,tft_fill:()=>UP,tft_line_arbitrarily:()=>wP,tft_scroll_string_delay:()=>GP,tft_show_frame_string_delay:()=>BP,tft_show_image_or_string_delay:()=>VP,tft_show_image_xy:()=>yP,tft_use_spi_init:()=>xP});var et={};t.r(et),t.d(et,{bitbot_display_bitmap_create:()=>ev,bitbot_display_image_create:()=>tv,display_available:()=>gY,display_bitmap_create:()=>RY,display_bright_point:()=>NY,display_bright_screen:()=>fY,display_clear:()=>cY,display_get_pixel:()=>LY,display_get_screen_pixel:()=>DY,display_image_builtins:()=>mY,display_image_builtins_all:()=>EY,display_image_create:()=>OY,display_scroll_string:()=>TY,display_scroll_string_delay:()=>MY,display_shift:()=>AY,display_show_frame_string:()=>dY,display_show_frame_string_delay:()=>IY,display_show_image:()=>rY,display_show_image_or_string_delay:()=>lY,draw_pointer:()=>Ev,image_arithmetic:()=>CY,image_invert:()=>SY,mixbot_display_bitmap_create:()=>QY,mixbot_display_bright_screen:()=>$Y,mixbot_display_get_ambientbright:()=>jY,mixbot_display_get_screen_pixel:()=>zY,mixbot_display_image_create:()=>qY,mixbot_display_rotate:()=>ZY,mixgo_display_bitmap_create:()=>yY,mixgo_display_image_create_new:()=>xY,mixgome_display_bitmap_create:()=>PY,mixgome_display_font:()=>XY,mixgome_display_image_create:()=>FY,mixgomini_display_bitmap_create:()=>vY,mixgomini_display_image_create:()=>YY,mpython_display_hvline:()=>KY,mpython_display_line:()=>JY,mpython_display_shape_rect:()=>WY,mpython_pbm_image:()=>bY,nova_draw_pointer:()=>Ov,onboard_oled_bright_point:()=>HY,onboard_oled_scroll_string_delay:()=>kY,onboard_oled_show_frame_string_delay:()=>wY,onboard_oled_show_image:()=>VY,onboard_oled_show_image_or_string_delay:()=>UY,onboard_oled_show_image_xy:()=>BY,onboard_oled_show_string:()=>GY,onboard_tft_bright_point:()=>rv,onboard_tft_bright_screen:()=>Av,onboard_tft_clear:()=>Lv,onboard_tft_clock_clear:()=>hv,onboard_tft_clock_draw:()=>Mv,onboard_tft_clock_get_rtctime:()=>Iv,onboard_tft_clock_init:()=>dv,onboard_tft_clock_set_time:()=>Tv,onboard_tft_display_hvline:()=>pv,onboard_tft_display_line:()=>av,onboard_tft_display_shape_circle:()=>mv,onboard_tft_display_shape_rect:()=>ov,onboard_tft_fill:()=>lv,onboard_tft_get_pixel:()=>uv,onboard_tft_get_screen_pixel:()=>Sv,onboard_tft_scroll_string_delay:()=>hY,onboard_tft_shift:()=>Cv,onboard_tft_show_frame_string:()=>gv,onboard_tft_show_frame_string_delay:()=>_v,onboard_tft_show_image:()=>cv,onboard_tft_show_image_or_string_delay:()=>sv,onboard_tft_show_image_xy:()=>iv,onboard_tft_show_image_xy_direct:()=>nv,onboard_tft_show_texts:()=>Rv});var it={};t.r(it),t.d(it,{factory_block:()=>Xv,factory_block_return:()=>xv,factory_block_return_with_textarea:()=>bv,factory_block_with_textarea:()=>yv,factory_callMethod_noreturn:()=>Yv,factory_callMethod_return:()=>vv,factory_declare:()=>Pv,factory_from_import:()=>Nv,factory_function_noreturn:()=>fv,factory_function_return:()=>Fv,factory_import:()=>Dv,folding_block:()=>Vv});var nt={};t.r(nt),t.d(nt,{inout_analog_atten:()=>Zv,inout_analog_read:()=>Kv,inout_analog_read_init:()=>$v,inout_analog_write:()=>kv,inout_analog_write_init:()=>jv,inout_analog_write_set:()=>Hv,inout_digital_init:()=>Qv,inout_digital_read:()=>Uv,inout_digital_write:()=>Gv,inout_highlow:()=>Bv,inout_pin_attachInterrupt:()=>qv,inout_pin_pressed:()=>Jv,inout_pin_pressed_init:()=>tX,inout_pwm_analog_write:()=>wv,inout_pwm_analog_write_init:()=>zv,inout_pwm_analog_write_set_freq:()=>Wv});var st={};t.r(st),t.d(st,{IOT_CONNECT_OLLAMA:()=>DX,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>OX,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>mX,IOT_EMQX_PING:()=>RX,IOT_FORMATTING:()=>MX,IOT_FORMAT_STRING:()=>hX,IOT_MIXIO_NTP:()=>cX,IOT_MIXIO_PUBLISH:()=>aX,IOT_MIXIO_SUBSCRIBE:()=>uX,iot_client_onboard:()=>gX,iot_connect_ollama:()=>NX,iot_connect_openai:()=>fX,iot_http_client:()=>CX,iot_http_data:()=>SX,iot_mixio_check:()=>dX,iot_mixio_connect:()=>pX,iot_mixio_connect_only:()=>lX,iot_mixio_disconnect:()=>rX,iot_mixio_format_msg:()=>TX,iot_mixio_format_topic:()=>IX,iot_mixly_key:()=>EX,iot_mqtt_client:()=>AX,iot_mqtt_data:()=>LX,iot_onenet_check:()=>_X,iot_onenet_connect:()=>iX,iot_onenet_disconnect:()=>nX,iot_onenet_publish:()=>oX,iot_onenet_publish_dict:()=>sX,iot_wifi_connect:()=>eX,ollama_empty_history:()=>YX,use_ollama_llm_to_chat:()=>FX,use_ollama_llm_to_chat_return:()=>PX});var _t={};t.r(_t),t.d(_t,{educore_mqtt_connect:()=>ux,educore_mqtt_connect_success:()=>Ix,educore_mqtt_subscribe_message:()=>rx,educore_mqtt_topic_publish:()=>dx,educore_mqtt_topic_subscribe:()=>lx,educore_wifi_connect:()=>ax,network_ap_connect:()=>UX,network_connect:()=>XX,network_get_connect:()=>yX,network_get_wifi:()=>GX,network_init:()=>vX,network_is_active:()=>BX,network_open:()=>VX,network_scan:()=>wX,network_server:()=>kX,network_socket_accept:()=>qX,network_socket_bind:()=>WX,network_socket_close:()=>ZX,network_socket_connect:()=>KX,network_socket_init:()=>HX,network_socket_listen:()=>JX,network_socket_receive:()=>QX,network_socket_receive_from:()=>jX,network_socket_send:()=>zX,network_socket_send_to:()=>$X,network_stop:()=>bX,network_wifi_connect:()=>xX,ntptime_address:()=>sx,ntptime_time:()=>nx,requests_attribute:()=>ex,requests_attribute2:()=>ox,requests_get:()=>tx,requests_get2:()=>_x,requests_method:()=>ix,requests_post:()=>px});var ot={};t.r(ot),t.d(ot,{CI130X_BROADCAST:()=>yx,CI130X_GET_THE_RECOGNIZED_CMD:()=>xx,CI130X_GET_WHETHER_IDENTIFY:()=>Xx,CI130X_IDENTIFY_AND_SAVE:()=>vx,CI130X_SET_SYSTEM_CMD:()=>bx,HCSR04:()=>My,PS2_Button:()=>Ey,PS2_Buttons:()=>Oy,PS2_Buttons_new:()=>Ny,PS2_State:()=>Ry,PS2_init:()=>hy,PS2_init_new:()=>Ay,PS2_stk:()=>cy,PS2_stk_new:()=>Dy,PS2_vibration:()=>my,PS2_vibration_new:()=>Ly,RTC_get_time:()=>Cy,RTC_set_date:()=>cx,RTC_set_datetime:()=>gy,RTC_set_time:()=>Rx,camera_sensor_init:()=>_b,camera_sensor_result:()=>ob,column_tube_foot:()=>rb,define_keyboards:()=>lb,educore_body_sensor:()=>Qy,educore_button_sensor_extern:()=>Zy,educore_camera_sensor:()=>sb,educore_infrared_sensor:()=>$y,educore_soilhum_sensor:()=>zy,educore_temp_sensor:()=>nb,educore_temphum_sensor:()=>jy,educore_ultrasonic_sensor:()=>eb,esp32_s2_weather_init:()=>ly,esp32_s2_weather_rain:()=>Iy,esp32_s2_weather_wd:()=>dy,esp32_s2_weather_ws:()=>Ty,extern_rfid_read:()=>Zx,extern_rfid_readcontent:()=>ey,extern_rfid_readid:()=>ty,extern_rfid_status:()=>sy,extern_rfid_write:()=>iy,extern_rfid_write_return:()=>ny,get_keboards_value:()=>Ib,gnss_get_data:()=>Py,gnss_have_data:()=>Yy,init_matrix_keyboard:()=>db,interaction_whether_to_interaction:()=>Px,interaction_whether_to_interaction_SANT:()=>Yx,line_tube_foot:()=>ub,mixbot_sensor_extern_get_addr:()=>wy,mixbot_sensor_extern_set_addr:()=>ky,pm25_get_data:()=>Fy,radar_set_DETECTION_THRESHOLD:()=>fx,radar_set_DETECTION_THRESHOLD_SANT:()=>Fx,robot_button_extern_get_value:()=>Xy,robot_color_extern_get_value:()=>By,robot_infrared_extern_get_value:()=>yy,robot_infrared_extern_grey_get_value:()=>by,robot_potentiometer_extern_get_value:()=>Vy,robot_sonar_extern_get_value:()=>Gy,robot_sonar_extern_led:()=>Uy,robot_touch_extern_get_value:()=>xy,sensor_APDS9960_extern:()=>Bx,sensor_DS18X20:()=>qy,sensor_LTR308_extern:()=>Gx,sensor_LTR390UV_extern:()=>Jx,sensor_MAX30102_extern:()=>Vx,sensor_QMC5883L_extern:()=>qx,sensor_VL530LX_extern:()=>jx,sensor_aht11_extern:()=>zx,sensor_bmp:()=>Lx,sensor_dht11:()=>Sy,sensor_distance_hrsc04:()=>Ox,sensor_hp203_extern:()=>Ux,sensor_ltr381_extern:()=>Wx,sensor_mixgo_extern_button_attachInterrupt:()=>mx,sensor_mixgo_extern_button_get_presses:()=>hx,sensor_mixgo_extern_button_is_pressed:()=>Tx,sensor_mixgo_extern_button_was_pressed:()=>Mx,sensor_mixgo_extern_light:()=>gx,sensor_mixgo_extern_pin_near:()=>Sx,sensor_mixgo_extern_sound:()=>Cx,sensor_mixgoce_hot_wheel_degrees:()=>ry,sensor_mixgoce_hot_wheel_is_touched:()=>uy,sensor_mpu9250_attachGestureInterrupt:()=>Ex,sensor_ms5611_extern:()=>kx,sensor_ms5611_extern_altitude:()=>Hx,sensor_read_humiture:()=>tb,sensor_rtc_init:()=>Ax,sensor_sht:()=>Nx,sensor_shtc3_extern:()=>Qx,sensor_spl06_001_extern:()=>wx,sensor_ucs12071_extern:()=>Kx,sensor_use_i2c_init:()=>Dx,sensor_use_spi_init:()=>$x,sensor_use_uart_init:()=>fy,sensor_weather_solo_init:()=>Hy,sensor_weather_solo_rain:()=>Jy,sensor_weather_solo_wd:()=>Wy,sensor_weather_solo_ws:()=>Ky,sensor_weigh_init:()=>pb,tvoc_get_data:()=>vy,ultrasonic_sensor_read_distance:()=>ib,weather_data:()=>_y,weather_have_data:()=>oy,weather_set_label:()=>ay,weather_uart_mixio:()=>py,weigh_sensor_get_weight:()=>ab});var pt={};t.r(pt),t.d(pt,{HCSR04:()=>gb,bitbot_als_num:()=>HV,dht11:()=>$V,educore_button_sensor:()=>_B,educore_button_was_pressed:()=>oB,educore_gyroscope_sensor:()=>iB,educore_gyroscope_sensor_read:()=>nB,educore_gyroscope_sensor_shake:()=>sB,educore_light_sensor:()=>eB,educore_rfid_sensor:()=>pB,educore_rfid_sensor_scan:()=>aB,educore_rfid_sensor_scan_data:()=>uB,educore_voice_sensor:()=>ZV,number1:()=>Cb,number2:()=>Sb,number3:()=>Ab,number4:()=>Lb,number5:()=>Nb,number6:()=>Db,number7:()=>fb,onboard_RTC_get_time:()=>RV,onboard_RTC_get_time_str:()=>CV,onboard_RTC_get_timestamp:()=>cV,onboard_RTC_get_timetuple_to_str:()=>SV,onboard_RTC_set_datetime:()=>EV,onboard_RTC_settime_string:()=>OV,onboard_RTC_timestamp_totuple:()=>gV,rfid_readcontent:()=>Wb,rfid_readid:()=>Hb,rfid_status:()=>qb,rfid_write:()=>Kb,rfid_write_return:()=>Jb,sensor_LTR308:()=>Bb,sensor_adxl345_get_acceleration:()=>nV,sensor_aht11:()=>wb,sensor_bitbot_ALS:()=>kV,sensor_button_get_presses:()=>JV,sensor_button_is_pressed:()=>WV,sensor_button_was_pressed:()=>KV,sensor_compass_reset:()=>uV,sensor_ds18x20:()=>bb,sensor_eulerangles:()=>zb,sensor_get_acceleration:()=>Qb,sensor_get_temperature:()=>kb,sensor_get_the_coprocessor_version:()=>rB,sensor_hp203:()=>Ub,sensor_light:()=>jV,sensor_lm35:()=>Vb,sensor_mixbot_get_gyro:()=>wV,sensor_mixbot_patrol_calibrate:()=>BV,sensor_mixbot_patrol_value:()=>GV,sensor_mixbot_temperature:()=>UV,sensor_mixgo_LTR308:()=>Xb,sensor_mixgo_button_attachInterrupt:()=>mb,sensor_mixgo_button_get_presses:()=>hb,sensor_mixgo_button_is_pressed:()=>Tb,sensor_mixgo_button_was_pressed:()=>Mb,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>NV,sensor_mixgo_cc_mmc5603_get_angle:()=>LV,sensor_mixgo_cc_mmc5603_get_magnetic:()=>AV,sensor_mixgo_light:()=>zV,sensor_mixgo_nova_LTR308:()=>yb,sensor_mixgo_nova_pin_near:()=>vb,sensor_mixgo_pin_near:()=>Yb,sensor_mixgo_pin_near_double:()=>Pb,sensor_mixgo_pin_near_single:()=>Fb,sensor_mixgo_pin_pressed:()=>eV,sensor_mixgo_sant_color:()=>xb,sensor_mixgo_touch_slide:()=>tV,sensor_mixgocar42_button_attachInterrupt:()=>cb,sensor_mixgocar42_button_get_presses:()=>Rb,sensor_mixgocar42_button_is_pressed:()=>Eb,sensor_mixgocar42_button_was_pressed:()=>Ob,sensor_mixgocar_battery_left:()=>VV,sensor_mixgocar_pin_near:()=>yV,sensor_mixgocar_pin_near_line:()=>xV,sensor_mixgocar_pin_near_state_change:()=>bV,sensor_mixgoce_pin_pressed:()=>Zb,sensor_mixgoce_temperature:()=>fV,sensor_mixgome_temperature:()=>DV,sensor_mpu9250_calibrate_compass:()=>oV,sensor_mpu9250_field_strength:()=>aV,sensor_mpu9250_gesture:()=>jb,sensor_mpu9250_get_acceleration:()=>$b,sensor_mpu9250_get_gyro:()=>_V,sensor_mpu9250_get_magnetic:()=>sV,sensor_mpu9250_temperature:()=>pV,sensor_mpython_pin_pressed:()=>iV,sensor_mpython_qmi8658_get_gyro:()=>FV,sensor_mpython_qmi8658_temperature:()=>PV,sensor_onboard_compass_reset:()=>mV,sensor_onboard_mpu9250_calibrate_compass:()=>TV,sensor_onboard_mpu9250_field_strength:()=>hV,sensor_onboard_mpu9250_gesture:()=>rV,sensor_onboard_mpu9250_get_acceleration:()=>lV,sensor_onboard_mpu9250_get_gyro:()=>IV,sensor_onboard_mpu9250_get_magnetic:()=>dV,sensor_onboard_mpu9250_temperature:()=>MV,sensor_pin_near:()=>QV,sensor_pin_pressed:()=>qV,sensor_read:()=>tB,sensor_rm_acc:()=>XV,sensor_rm_battery_left:()=>vV,sensor_rm_pin_near_double:()=>YV,sensor_sound:()=>Gb});var at={};t.r(at),t.d(at,{serial_any:()=>MB,serial_print:()=>lB,serial_print_byte:()=>dB,serial_print_hex:()=>TB,serial_println:()=>IB,serial_read_from_ai:()=>LB,serial_readline:()=>mB,serial_readstr:()=>hB,serial_send_to_ai:()=>AB,serial_softserial:()=>EB,serial_softserial_new:()=>OB,system_input:()=>RB,system_print:()=>cB,system_print_end:()=>CB,system_print_inline:()=>gB,system_print_many:()=>SB});var ut={};t.r(ut),t.d(ut,{Panic_with_status_code:()=>VB,Timer_init:()=>ZB,base_delay:()=>iG,controls_delay:()=>kB,controls_delay_new:()=>HB,controls_end_program:()=>GB,controls_millis:()=>BB,controls_uname:()=>wB,reset:()=>UB,system_bitbot_shutdown:()=>$B,system_device_name:()=>yB,system_device_serial_number:()=>bB,system_event_bus_source:()=>XB,system_event_bus_value:()=>xB,system_machine_reset:()=>jB,system_on_event:()=>PB,system_raise_event:()=>FB,system_reset:()=>DB,system_run_in_background:()=>NB,system_ticks_diff:()=>JB,system_timer:()=>KB,system_timer_init:()=>qB,system_timestamp:()=>YB,system_value:()=>vB,system_wait:()=>fB,system_wdt_feed:()=>zB,system_wdt_init:()=>QB,time_ticks_diff:()=>eG,timer:()=>WB,timer2:()=>tG});var rt={};t.r(rt),t.d(rt,{Air_daily_content:()=>MG,Air_now_content:()=>aG,Geo_moon_content:()=>mG,Geo_sun_content:()=>hG,Life_suggestion_content:()=>rG,Location_search_content:()=>dG,Tide_daily_content:()=>lG,WEATHER_DAILY:()=>sG,WEATHER_HOUR:()=>_G,WEATHER_NOW:()=>nG,Weather_alarm_content:()=>uG,Weather_daily:()=>IG,Weather_daily_content:()=>TG,Weather_now:()=>oG,Weather_now_content:()=>pG});var lt={};t.r(lt),t.d(lt,{controls_pin_attachInterrupt:()=>bG,inout_analog_atten:()=>NG,inout_analog_write:()=>AG,inout_analog_write_init:()=>PG,inout_analog_write_set:()=>LG,inout_analog_write_set_freq:()=>vG,inout_digital_init:()=>FG,inout_digital_read:()=>SG,inout_digital_write:()=>CG,inout_highlow:()=>gG,inout_pinMode:()=>XG,inout_pin_attachInterrupt:()=>fG,inout_pin_pressed:()=>DG,inout_pin_pressed_init:()=>YG,pin_pressed:()=>yG,pin_pressed_init:()=>xG});var dt={};t.r(dt),t.d(dt,{me_g1_aht11:()=>BG,me_g1_hp203:()=>GG,me_g1_rfid_readcontent:()=>kG,me_g1_rfid_readid:()=>wG,me_g1_rfid_status:()=>KG,me_g1_rfid_write:()=>HG,me_g1_rfid_write_outcome:()=>WG,me_g1_varistor:()=>UG});var It={};t.r(It),t.d(It,{analog_input:()=>eU,analog_output:()=>nU,espnow_channel:()=>$G,haskylens_model:()=>ZG,i2c_A_pin:()=>sU,i2c_B_pin:()=>_U,pins_analog:()=>rU,pins_analog_pin:()=>lU,pins_axis:()=>DU,pins_brightness:()=>fU,pins_builtinimg:()=>cU,pins_builtinimg_extern:()=>gU,pins_button:()=>TU,pins_buttonB:()=>MU,pins_dac:()=>dU,pins_dac_pin:()=>IU,pins_digital:()=>qG,pins_digital_dot:()=>bU,pins_digital_pin:()=>QG,pins_exlcdh:()=>LU,pins_exlcdv:()=>NU,pins_imglist:()=>CU,pins_input_pin:()=>zG,pins_one_more:()=>yU,pins_output_pin:()=>jG,pins_playlist:()=>SU,pins_playlist_extern:()=>AU,pins_pwm:()=>hU,pins_pwm_pin:()=>mU,pins_radio_datarate:()=>xU,pins_radio_power:()=>XU,pins_serial:()=>RU,pins_tone_notes:()=>vU,pins_touch:()=>OU,pins_touch_pin:()=>EU,pins_tts_bgmusic:()=>YU,pins_tts_builtin_music:()=>PU,pins_tts_voice:()=>FU,pwm_input:()=>tU,pwm_output:()=>iU,spi_A_pin:()=>oU,spi_B_pin:()=>pU,spi_C_pin:()=>aU,spi_D_pin:()=>uU});var Tt={};t.r(Tt),t.d(Tt,{inout_analog_atten:()=>JU,inout_analog_write:()=>UU,inout_analog_write_init:()=>KU,inout_analog_write_set:()=>wU,inout_digital_init:()=>WU,inout_digital_read:()=>GU,inout_digital_write:()=>BU,inout_highlow:()=>VU,inout_pin_attachInterrupt:()=>HU,inout_pin_pressed:()=>kU,inout_pin_pressed_init:()=>qU});var Mt={};t.r(Mt),t.d(Mt,{me_g1_aht11:()=>QU,me_g1_hp203:()=>zU,me_g1_rfid_readcontent:()=>ZU,me_g1_rfid_readid:()=>$U,me_g1_rfid_status:()=>iw,me_g1_rfid_write:()=>tw,me_g1_rfid_write_outcome:()=>ew,me_g1_varistor:()=>jU});var ht={};t.r(ht),t.d(ht,{analog_input:()=>dw,analog_output:()=>Tw,espnow_channel:()=>rw,haskylens_model:()=>lw,i2c_A_pin:()=>Mw,i2c_B_pin:()=>hw,pins_analog:()=>gw,pins_analog_pin:()=>cw,pins_axis:()=>yw,pins_brightness:()=>Bw,pins_builtinimg:()=>Pw,pins_builtinimg_extern:()=>Yw,pins_button:()=>sw,pins_buttonB:()=>_w,pins_dac:()=>Lw,pins_dac_pin:()=>Aw,pins_digital:()=>nw,pins_digital_dot:()=>Jw,pins_digital_pin:()=>ow,pins_exlcdh:()=>bw,pins_exlcdv:()=>Vw,pins_imglist:()=>vw,pins_input_pin:()=>pw,pins_interrupt:()=>fw,pins_one_more:()=>Kw,pins_output_pin:()=>aw,pins_playlist:()=>Xw,pins_playlist_extern:()=>xw,pins_pwm:()=>Sw,pins_pwm_input:()=>uw,pins_pwm_pin:()=>Cw,pins_radio_datarate:()=>Ww,pins_radio_power:()=>Hw,pins_serial:()=>Fw,pins_tone_notes:()=>kw,pins_touch:()=>Dw,pins_touch_pin:()=>Nw,pins_tts_bgmusic:()=>ww,pins_tts_builtin_music:()=>Uw,pins_tts_voice:()=>Gw,pwm_output:()=>Iw,spi_A_pin:()=>mw,spi_B_pin:()=>Ew,spi_C_pin:()=>Ow,spi_D_pin:()=>Rw});const mt=Blockly,Et=Mixly,Ot={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(o+=n)):i=o}else i="i";return i}},Rt=Ot; -/** - * @license - * Visual Blocks Editor - * - * Copyright 2012 Google Inc. - * https://developers.google.com/blockly/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class ct{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(mt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(mt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_if_else");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(mt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(mt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Gt={init:function(){this.setColour(Xt),this.appendValueInput("FROM").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.PYTHON_RANGE).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Ut={init:function(){this.setColour(Xt),this.appendValueInput("LIST").setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(mt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return mt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},wt={init:function(){this.setColour(Xt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new mt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(mt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:mt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:mt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},kt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new mt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(mt.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_finally");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Ht={init:function(){this.setColour(Xt);var t=new mt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:mt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:mt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Wt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new mt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return mt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Kt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new mt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return mt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};wt.OPERATORS=[[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Ht.OPERATORS=[[mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Jt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},qt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Qt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(mt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},zt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},jt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(mt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},$t={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(mt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Zt={init:function(){this.jsonInit({message0:mt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:Xt,tooltip:mt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:mt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},te={init:function(){this.setColour(Xt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_STAT),this.setOutput(!0)}},ee={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},ie={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},ne={init:function(){this.appendDummyInput().appendField(mt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+mt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(mt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new mt.FieldDropdown([[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Xt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},se={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_e={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},oe={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},pe={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_GET_UNIQUE_IDEN)}},ae={init:function(){this.setColour(Xt),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(mt.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},ue={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},re=230;mt.FieldTextInput.math_number_validator=function(t){return String(t)},mt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const le={init:function(){this.setColour(re),this.appendDummyInput().appendField(new mt.FieldTextInput("0",mt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MATH_NUMBER_TOOLTIP)}},de={init:function(){this.setColour(re);this.appendDummyInput("").appendField(mt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new mt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Ie={init:function(){this.setColour(re);this.appendDummyInput("").appendField(mt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new mt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Te={init:function(){this.setColour(re),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:mt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:mt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:mt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Me={init:function(){this.setColour(re),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:mt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:mt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:mt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},he={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new mt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},me={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new mt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:mt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:mt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:mt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:mt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:mt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:mt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:mt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Ee={init:function(){var t=[[mt.Msg.MATH_BIN,"bin"],[mt.Msg.MATH_OCT,"oct"],[mt.Msg.MATH_HEX,"hex"]];this.setColour(re),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new mt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:mt.Msg.MATH_DEC_TOOLTIP_BIN,oct:mt.Msg.MATH_DEC_TOOLTIP_OCT,hex:mt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Oe={init:function(){var t=[[mt.Msg.LANG_MATH_TO_ROUND,"round"],[mt.Msg.LANG_MATH_TO_CEIL,"ceil"],[mt.Msg.LANG_MATH_TO_FLOOR,"floor"],[mt.Msg.MATH_ABS,"fabs"],[mt.Msg.MATH_SQRT,"sqrt"]];this.setColour(re),this.appendValueInput("A").setCheck(Number).appendField(new mt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:mt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:mt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:mt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:mt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:mt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:mt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Re={init:function(){var t=[[mt.Msg.MIXLY_MAX,"max"],[mt.Msg.MIXLY_MIN,"min"]];this.setColour(re),this.appendValueInput("A").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(mt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:mt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:mt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},ce={init:function(){var t=[[mt.Msg.MATH_TWO,"two"],[mt.Msg.MATH_EIGHT,"eight"],[mt.Msg.MATH_TEN,"ten"],[mt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(re),this.appendDummyInput("").appendField(mt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new mt.FieldDropdown(t),"OP").appendField(mt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MATH_ZHW).appendField(new mt.FieldDropdown(t),"OP2").appendField(mt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:mt.Msg.MATH_Before_two,eight:mt.Msg.MATH_Before_eight,ten:mt.Msg.MATH_Before_ten,sixteen:mt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:mt.Msg.MATH_Behind_two,eight:mt.Msg.MATH_Behind_eight,ten:mt.Msg.MATH_Behind_ten,sixteen:mt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},ge={init:function(){var t=[[mt.Msg.LANG_MATH_INT,"int"],[mt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(re),this.setOutput(!0,Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new mt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:mt.Msg.LANG_MATH_INT,float:mt.Msg.LANG_MATH_FLOAT_RANDOM};return mt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Ce={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(mt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(mt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(mt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(mt.Msg.MATH_CONSTRAIN_TOOLTIP)}},Se={init:function(){this.setColour(re),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(mt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(mt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Ae={init:function(){this.setColour(re),this.appendDummyInput().appendField(new mt.FieldTextInput("0",mt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(mt.Msg.MATH_NUMBER_TOOLTIP)}},Le={init:function(){this.setColour(re),this.appendValueInput("NUM").setCheck(Number).appendField(mt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},Ne={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MATH_ROUND).appendField(mt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(mt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(mt.Msg.MATH_ROUND_NEW_TOOLTIP)}},De={init:function(){var t=[[mt.Msg.MIXLY_TO_INT,"int"],[mt.Msg.MIXLY_TO_FLOAT,"float"],[mt.Msg.MIXLY_TO_BITES,"b"],[mt.Msg.LANG_MATH_BYTE+mt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(re),this.appendValueInput("VAR").appendField(new mt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:mt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:mt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:mt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},fe={init:function(){var t=[[mt.Msg.MIXLY_TO_INT,"int"],[mt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(re),this.appendValueInput("VAR").appendField(new mt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:mt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:mt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},Fe=Se,Pe={init:function(){this.setColour(re),this.appendValueInput("VAR").appendField(mt.Msg.LANG_MATH_BYTE+mt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},Ye={init:function(){this.setColour(re),this.itemCount_=1,this.setMutator(new mt.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(mt.Msg.MIXLY_PRODUCT+mt.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(mt.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(mt.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(mt.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const Ve={init:function(){this.setColour(xe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new mt.FieldTextInput("",mt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(mt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new mt.FieldImage(e,7,12,'"')}},Be={init:function(){this.setColour(xe),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(mt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},Ge={init:function(){this.setColour(xe),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Ue={init:function(){this.setColour(xe),this.appendValueInput("VAR").setCheck(String).appendField(mt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},we={init:function(){this.setColour(xe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},ke={init:function(){this.setColour(xe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},He={init:function(){this.WHERE_OPTIONS=[[mt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[mt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[mt.Msg.TEXT_GET_INDEX_RANDOM+1+mt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(xe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(mt.Msg.LISTS_GET_INDEX_GET,"MODE"),mt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(mt.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+mt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",mt.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:mt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:mt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:mt.Msg.TEXT_GET_INDEX_RANDOM};return mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+mt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==mt.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),mt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(mt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new mt.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),mt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},We={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(xe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(mt.Msg.LISTS_GET_INDEX_GET+" "+mt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(mt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_MICROBIT_TYPE_STRING+mt.Msg.LISTS_GET_INDEX_FROM_START+"n"+mt.Msg.TEXT_CHARAT2)}},Ke={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(xe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(mt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(mt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Je={init:function(){this.WHERE_OPTIONS_1=[[mt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[mt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[mt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[mt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[mt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[mt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(xe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(mt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==mt.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==mt.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),mt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(mt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new mt.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},qe={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(xe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(mt.Msg.LISTS_GET_INDEX_GET+" "+mt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(mt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(mt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(mt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},Qe={init:function(){var t=[[mt.Msg.MIXLY_EQUALS,"==="],[mt.Msg.MIXLY_STARTSWITH,"startswith"],[mt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(xe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new mt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},ze={init:function(){this.setColour(xe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(mt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_COMPARETO_HELP)}},je={init:function(){var t=[[mt.Msg.TEXT_UPPER,"upper"],[mt.Msg.TEXT_TITLE,"title"],[mt.Msg.TEXT_CAPITALIZE,"capitalize"],[mt.Msg.TEXT_SWAPCASE,"swapcase"],[mt.Msg.TEXT_LOWER,"lower"]];this.setColour(xe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new mt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:mt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:mt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:mt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:mt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:mt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},$e={init:function(){var t=[[mt.Msg.TEXT_LJUST,"ljust"],[mt.Msg.TEXT_CENTER,"center"],[mt.Msg.TEXT_RJUST,"rjust"]];this.setColour(xe),this.appendValueInput("VAR").appendField(new mt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(mt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(mt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Ze={init:function(){this.setColour(xe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(mt.Msg.MIXLY_MID+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(mt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ti={init:function(){this.setColour(xe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},ei={init:function(){this.setColour(xe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(mt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(mt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},ii={init:function(){this.setColour(xe),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(mt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(mt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},ni={init:function(){var t=[[mt.Msg.TEXT_TRIM_BOTH,"strip"],[mt.Msg.TEXT_TRIM_LEFT,"lstrip"],[mt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(xe),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(mt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new mt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(mt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:mt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:mt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:mt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},si={init:function(){this.setColour(xe),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new mt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new mt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},tn={init:function(){this.setColour($i),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},en={init:function(){this.setColour($i),this.appendDummyInput().appendField(mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},nn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_KEYS),this.setTooltip(mt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},sn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(mt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(mt.Msg.DICTS_GET_TOOLTIP)}},_n={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(mt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(mt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(mt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},on={init:function(){this.setColour($i),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(mt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},pn={init:function(){this.setColour($i),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(mt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_DELETE_TOOLTIP)}},an={init:function(){this.setColour($i),this.appendValueInput("DICT2").setCheck("Dict").appendField(mt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(mt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MID),this.setTooltip(mt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},un={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_CLEAR),this.setTooltip(mt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},rn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_ITEMS),this.setTooltip(mt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},ln={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_VALUES),this.setTooltip(mt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},dn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_LENGTH),this.setTooltip(mt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},In={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_DELDICT),this.setTooltip(mt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tn={init:function(){this.MODE=[[mt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[mt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(mt.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=mt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=mt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==mt.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new mt.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},Mn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(mt.Msg.DICTS_ADD_VALUE),this.setTooltip(mt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},hn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(mt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},mn={init:function(){this.setColour($i),this.appendDummyInput("").appendField(new mt.FieldLabel(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new mt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},En={init:function(){this.setColour($i),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},On={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TO_JSON),this.setTooltip(mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Rn={init:function(){this.setColour($i),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},cn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},gn={init:function(){this.setColour($i),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TO_JSON),this.setTooltip(mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Cn=210,Sn={init:function(){var t=mt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:mt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:mt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:mt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:mt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:mt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:mt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},An={init:function(){var t=mt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=mt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new mt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Ln={init:function(){var t=[[mt.Msg.LOGIC_OPERATION_AND,"AND"],[mt.Msg.LOGIC_OPERATION_OR,"OR"],[mt.Msg.LOGIC_OPERATION_NOR,"NOR"],[mt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new mt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:mt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:mt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:mt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:mt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},Nn={init:function(){this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(mt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(mt.Msg.LOGIC_NEGATE_TOOLTIP)}},Dn={init:function(){var t=[[mt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[mt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new mt.FieldDropdown(t),"BOOL"),this.setTooltip(mt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},fn={init:function(){this.setColour(Cn),this.setOutput(!0),this.appendDummyInput().appendField(mt.Msg.LOGIC_NULL),this.setTooltip(mt.Msg.LOGIC_NULL_TOOLTIP)}},Fn={init:function(){this.setColour(Cn),this.appendValueInput("A"),this.appendValueInput("B").appendField(mt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(mt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},Pn={init:function(){var t=[[mt.Msg.TEXT_APPEND_TO,"in"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Cn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new mt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(mt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.IN)}},Yn={init:function(){var t=[[mt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Cn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},vn={init:function(){this.setColour(Cn),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Xn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(mt.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},xn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_USE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=mt.Msg.MIXLY_BELONG;return i+{r:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},yn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_USE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=mt.Msg.MIXLY_BELONG,o=mt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},bn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(mt.Msg.MIXPY_TEXT_ENCODE).appendField(new mt.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_USE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=mt.Msg.MIXLY_BELONG,o=mt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},Vn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+mt.Msg.MIXLY_MICROBIT_TYPE_STRING+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Gn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(mt.Msg.MICROBIT_PYTHON_TYPE)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.HTML_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Wn={init:function(){this.setColour(0),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Kn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Jn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},zn={init:function(){this.setColour(0),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},jn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+mt.Msg.MIXLY_ESP32_SET+{mkdir:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},$n={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(mt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},ts={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.HTML_FILE,"isfile"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},es={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(mt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},is={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(mt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},ns={init:function(){var t=mt.Procedures.findLegalName("",this),e=new mt.FieldTextInput(t,mt.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new mt.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&mt.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(mt.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(mt.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(mt.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(mt.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=mt.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),mt.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{mt.Events.enable()}},mutationToDom:function(t){var e=mt.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(mt.Msg.MIXLY_AIP_ATTR).setAlign(mt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},js={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(mt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},$s={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(mt.Msg.HTML_FORM_CONTENT).appendField(new mt.FieldDropdown([[mt.Msg.HTML_TEXT,"text"],[mt.Msg.HTML_EMAIL,"email"],[mt.Msg.HTML_NUMBER,"number"],[mt.Msg.HTML_PASSWORD,"password"],[mt.Msg.HTML_CHECKBOX,"checkbox"],[mt.Msg.HTML_RADIOBUTTON,"radiobutton"],[mt.Msg.HTML_BUTTON,"button"],[mt.Msg.HTML_COLOUR,"colour"],[mt.Msg.HTML_DATE,"date"],[mt.Msg.HTML_LOCALTIME,"local time"],[mt.Msg.HTML_FILE,"file"],[mt.Msg.HTML_HIDDEN,"hidden"],[mt.Msg.HTML_IMAGE,"image"],[mt.Msg.HTML_MONTH,"month"],[mt.Msg.HTML_RANGE,"range"],[mt.Msg.HTML_RESET,"reset"],[mt.Msg.HTML_SEARCH,"search"],[mt.Msg.HTML_SUBMIT,"submit"],[mt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[mt.Msg.HTML_TIME,"time"],[mt.Msg.HTML_URL,"url"],[mt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(mt.Msg.HTML_NAME).appendField(new mt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(mt.Msg.HTML_VALUE).appendField(new mt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(mt.Msg.MIXLY_AIP_ATTR).setAlign(mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zs={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},t_={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},e_={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(mt.Msg.HTML_TEXT).appendField(new mt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},i_=160,n_={init:function(){this.setColour(i_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new mt.FieldTable(""),"TEXT")}},s_={init:function(){this.setColour(i_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT")}},__={init:function(){this.setColour(i_),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},o_={init:function(){this.setColour(i_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},p_={init:function(){this.setColour(i_),this.appendDummyInput().appendTitle("Comment:").appendTitle(new mt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},a_={init:function(){this.setColour(i_),this.appendValueInput("VALUE").appendField(mt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},u_={init:function(){this.setColour(i_),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new mt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(mt.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=mt.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+t+", "+e+", "+i+")"},mt.isNumber(n)&&mt.isNumber(s)&&mt.isNumber(_))n=parseFloat(n),s=parseFloat(s),_=Math.abs(parseFloat(_)),0==n%1&&0==s%1&&0==_%1?(n<=s?(s++,t=0==n&&1==_?s:n+", "+s,1!=_&&(t+=", "+_)):t=n+", "+--s+", -"+_,t="range("+t+")"):(t=n",GTE:">="};const sa=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",_=e.valueToCode(this,"B",n)||"False";if("AND"==i)var o=s+" and "+_;else if("OR"==i)o=s+" or "+_;else if("NOR"==i)o="not("+s+"^"+_+")";else o=s+"^"+_;return[o,n]},_a=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},oa=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},pa=function(t,e){return["None",e.ORDER_ATOMIC]},aa=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},ua=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},ra=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},la=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},da=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Ia=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Ta=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Ma=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ha=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},ma=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Ea=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Oa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ra=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},ca=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},ga=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Ca=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Sa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Aa=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},La=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Na=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},Da=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},fa=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Fa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Pa=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},Ya=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},va=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Xa=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},xa=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),mt.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var _=[],o=0;o\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},hu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},mu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},Eu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Ou=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Ru=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},cu=function(t,e){return'"},gu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Cu=function(){return this.getFieldValue("TEXT")+"\n"},Su=function(t){return t.getFieldValue("TEXT")+"\n"},Au=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Lu=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Nu=function(){return""},Du=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},fu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n")},vu.scrubNakedValue=function(t){return t+"\n"},vu.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},vu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},vu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=mt.utils.string.wrap(_,vu.COMMENT_WRAP-3),n+=vu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const Xu="#74A55B",xu={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_RGB_PIN_COUNT)}},yu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},bu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Vu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Bu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(mt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(mt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Gu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Uu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_RESET)}},wu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ku={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Hu={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Wu={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Ku={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Ju={init:function(){this.setColour(Xu),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},qu={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_MOVE)}},Qu={init:function(){this.setColour(Xu),this.appendValueInput("VAR").appendField("360°"+mt.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SETTING+mt.Msg.blockpy_turtle_rotate+mt.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},zu={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("180°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_MOVE)}},ju={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("360°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},$u={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("180°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Zu={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("360°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},tr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new mt.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(mt.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},er={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[mt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[mt.Msg.MOTOR_N,"ms32006.MOT_N"],[mt.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},ir={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new mt.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[mt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},nr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_RGB_PIN_COUNT)}},sr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},_r={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},or={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_WRI)}},pr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ar={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.PYTHON_RANGE_STEP).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ur={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new mt.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new mt.FieldDropdown([["SYN6288"+mt.Msg.MIXLY_AipSpeech_synthesis,"SYN6288"],["NS9300"+mt.Msg.MIXLY_MUSIC_PLAYER,"NS9300"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},rr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_WHETHER).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_STOPPED,"0"],[mt.Msg.MIXLY_PLAYING,"1"],[mt.Msg.MIXLY_PAUSED,"2"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},lr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_STAT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MP3_PLAY,"1"],[mt.Msg.MIXLY_MP3_PAUSE,"2"],[mt.Msg.MIXLY_STOP,"3"],[mt.Msg.MIXLY_MP3_PREV,"4"],[mt.Msg.MIXLY_MP3_NEXT,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendValueInput("volume").appendField(mt.Msg.MIXLY_MP3_VOL+mt.Msg.MIXLY_STAT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_PLAYER_SET_VOLUME_TOOLTIP)}},Ir={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MODE+mt.Msg.MIXLY_STAT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MP3_LOOP_ALL,"0"],[mt.Msg.MIXLY_MP3_LOOP_ONE,"1"],[mt.Msg.MIXLY_PLAYER_DIRECTORY_LOOP,"2"],[mt.Msg.MIXLY_MP3_LOOP_RAM,"3"],[mt.Msg.MIXLY_PLAYER_SINGLE_STOP,"4"],[mt.Msg.MIXLY_PLAYER_SEQUENTIAL_PLAY,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_START_MELODY,"play"],[mt.Msg.MIXLY_PLAYER_INSERT_MUSIC,"insert"]]),"key"),this.appendValueInput("song"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_PLAYER_PLAY_MUSIC_TOOTIP)}},Mr={},hr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(mt.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},mr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Er={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(mt.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(mt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},Or={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(mt.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(mt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},Rr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},cr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},gr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Cr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_TRAFFIC_LIGHT).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LISTS_SET_INDEX_SET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Sr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_WHITE,"W"],[mt.Msg.COLOUR_RGB_RED,"R"],[mt.Msg.COLOUR_RGB_YELLOW,"Y"],[mt.Msg.COLOUR_RGB_GREEN,"G"],[mt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ar={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_WHITE,"W"],[mt.Msg.COLOUR_RGB_RED,"R"],[mt.Msg.COLOUR_RGB_YELLOW,"Y"],[mt.Msg.COLOUR_RGB_GREEN,"G"],[mt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Lr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[mt.Msg.MIXLY_SPEED,"[1]"],[mt.Msg.MATH_SINGLE_OP_ABSOLUTE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[mt.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[mt.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[mt.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Nr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[mt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[mt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MATH_SINGLE_OP_ABSOLUTE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MODE).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPEED+mt.Msg.MIXLY_MODE,"0"],[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+mt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"0"],[mt.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[mt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},Fr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Pr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField("("+mt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MODE).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPEED+mt.Msg.MIXLY_MODE,"0"],[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+mt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},Yr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField("("+mt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MODE).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPEED+mt.Msg.MIXLY_MODE,"0"],[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+mt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"0"],[mt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MOTOR,"ext_motor"],[mt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[mt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[mt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[mt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[mt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[mt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[mt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},Xr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MOTOR,"ext_motor"],[mt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[mt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[mt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[mt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[mt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[mt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[mt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},xr={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_AT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},yr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("pin").appendField("LED"),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},br={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SERVO+mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_AT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Vr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_SERVO),this.appendValueInput("angle").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE),this.appendDummyInput().appendField(mt.Msg.DRAW_POINTER_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Br={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_MOTOR+mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_AT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Gr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MOTOR),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+mt.Msg.MIXLY_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ur="#6C9858",wr={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},kr={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_ON,"1"],[mt.Msg.MIXLY_ESP32_OFF,"0"],[mt.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Hr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Wr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(mt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Kr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Jr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SETTING+mt.Msg.MIXLY_BUILDIN_LED+mt.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},qr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(mt.Msg.MIXLY_LCD_SETCOLOR).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LIGHT_RED,"1"],[mt.Msg.MIXLY_LIGHT_GREEN,"2"],[mt.Msg.MIXLY_LIGHT_BLUE,"3"],[mt.Msg.MIXLY_LIGHT_YELLOW,"4"],[mt.Msg.MIXLY_LIGHT_CYAN,"5"],[mt.Msg.MIXLY_LIGHT_PURPLE,"6"],[mt.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Qr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},zr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(mt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},jr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},$r={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SETTING+mt.Msg.MIXLY_BUILDIN_LED+mt.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},Zr={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},tl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Et.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},el={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},il={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},nl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.PYTHON_RANGE_STEP).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},sl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_WRI)}},_l={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Et.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},ol={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},pl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.PYTHON_RANGE_STEP).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},al={init:function(){this.setColour(Ur),this.appendValueInput("TICKS").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(mt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(mt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},ul={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},rl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_RESET)}},ll={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},dl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Il={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tl={init:function(){this.setColour(Ur),this.appendValueInput("LIST").appendField(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Ml={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MOTOR_DC).appendField(new mt.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"CW"],[mt.Msg.ANTI_CLOCKWISE,"CCW"],[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},hl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField("MixGo Car").appendField(new mt.FieldDropdown([[mt.Msg.blockpy_forward,"F"],[mt.Msg.blockpy_backward,"B"],[mt.Msg.blockpy_left,"L"],[mt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ml={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField("MixGo Car").appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},El={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MOTOR_DC).appendField(new mt.FieldDropdown([[mt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[mt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"CW"],[mt.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ol={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MOTOR_DC).appendField(new mt.FieldDropdown([[mt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[mt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_STOP).appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Rl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},cl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(new mt.FieldDropdown([[mt.Msg.blockpy_forward,"F"],[mt.Msg.blockpy_backward,"B"],[mt.Msg.blockpy_left,"L"],[mt.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[mt.Msg.MIXLY_SPEED,"SPEED"],[mt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},gl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Cl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(mt.Msg.MIXLY_MOTOR).appendField(new mt.FieldDropdown([[mt.Msg.TEXT_TRIM_LEFT,"1"],[mt.Msg.TEXT_TRIM_RIGHT,"2"],[mt.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[mt.Msg.MIXLY_SPEED,"SPEED"],[mt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Sl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[mt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Al={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.BITBOT).appendField(new mt.FieldDropdown([[mt.Msg.blockpy_forward,"F"],[mt.Msg.blockpy_backward,"B"],[mt.Msg.blockpy_left,"L"],[mt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ll={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.BITBOT).appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Nl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.BITBOT).appendField(mt.Msg.MIXLY_MOTOR).appendField(new mt.FieldDropdown([[mt.Msg.TEXT_TRIM_LEFT,"0"],[mt.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"CW"],[mt.Msg.ANTI_CLOCKWISE,"CCW"],[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dl={init:function(){this.setColour(Ur),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},fl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Fl={init:function(){this.setColour(Ur),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_SETTING+mt.Msg.MIXLY_MIXBOT_BUZZER+mt.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Pl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_MIXBOT_BUZZER+mt.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Yl={init:function(){this.setColour(Ur),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_RECORD_AUDIO).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(mt.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},vl={init:function(){this.setColour(Ur),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_PLAY_AUDIO).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Xl={init:function(){this.setColour(Ur),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},xl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},yl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.ME_GO_MOTOR_EXTERN).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([["1","1"],["2","2"],["3","3"],["4","4"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.blynk_IOT_IR_POWER+mt.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Vl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.ME_GO_MOTOR_EXTERN).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.blynk_IOT_IR_POWER+mt.Msg.MIXLY_PINMODEOUT+mt.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Bl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.ME_GO_MOTOR_EXTERN).appendField(mt.Msg.MIXLY_ALL+mt.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(mt.ALIGN_RIGHT).appendField(mt.Msg.blynk_IOT_IR_POWER+mt.Msg.MIXLY_PINMODEOUT+mt.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Gl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.ANALOG+mt.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(mt.Msg.MIXLY_RELEASE).appendField(new mt.FieldDropdown([[mt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[mt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.ANALOG+mt.Msg.MIXLY_KEYBOARD_INPUT)}},Ul={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SPECIAL_KEY).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[mt.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[mt.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[mt.Msg.MIXLY_SPECIAL_KEY4,"0x04"],[mt.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[mt.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[mt.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[mt.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[mt.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},wl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GENERAL_KEY).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],["A","0x04"],["B","0x05"],["C","0x06"],["D","0x07"],["E","0x08"],["F","0x09"],["G","0x0A"],["H","0x0B"],["I","0x0C"],["J","0x0D"],["K","0x0E"],["L","0x0F"],["M","0x10"],["N","0x11"],["O","0x12"],["P","0x13"],["Q","0x14"],["R","0x15"],["S","0x16"],["T","0x17"],["U","0x18"],["V","0x19"],["W","0x1A"],["X","0x1B"],["Y","0x1C"],["Z","0x1D"],["1 !","0x1E"],["2 @","0x1F"],["3 #","0x20"],["4 $","0x21"],["5 %","0x22"],["6 ^","0x23"],["7 &","0x24"],["8 *","0x25"],["9 (","0x26"],["0 )","0x27"],["ENTER","0x28"],["ESC","0x29"],["BACKSPACE","0x2A"],["TAB","0x2B"],["SPACE","0x2C"],["- _","0x2D"],["= +","0x2E"],["[ {","0x2F"],["] }","0x30"],["\\ |","0x31"],["; :","0x33"],["' \"","0x34"],["` ~","0x35"],[", <","0x36"],[". >","0x37"],["/ ?","0x38"],["CAPS_LOCK","0x39"],["F1","0x3A"],["F2","0x3B"],["F3","0x3C"],["F4","0x3D"],["F5","0x3E"],["F6","0x3F"],["F7","0x40"],["F8","0x41"],["F9","0x42"],["F10","0x43"],["F11","0x44"],["F12","0x45"],["PRINTSCREEN","0x46"],["SCROLL_LOCK","0x47"],["PAUSE","0x48"],["INSERT","0x49"],["HOME","0x4A"],["PAGE_UP","0x4B"],["DELETE","0x4C"],["END","0x4D"],["PAGE_DOWN","0x4E"],["RIGHT","0x4F"],["LEFT","0x50"],["DOWN","0x51"],["UP","0x52"],["NUM_LOCK","0x53"],["/","0x54"],["*","0x55"],["-","0x56"],["+","0x57"],["ENTER","0x58"],["1","0x59"],["2","0x5A"],["3","0x5B"],["4","0x5C"],["5","0x5D"],["6","0x5E"],["7","0x5F"],["8","0x60"],["9","0x61"],["0","0x62"],[".","0x63"]]),"op"),this.setOutput(!0)}},kl={init:function(){this.setColour(Ur),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new mt.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(mt.Msg.GENERALKEY_TUPLE_CREATE_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("generalkey_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;nnew Array(32).fill(0)))},im={init:function(){this.jsonInit({colour:Kh,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:mt.Msg.MIXLY_MICROBIT_Built_in_image1,message0:mt.Msg.MIXLY_MICROBIT_Built_in_image})}},nm={init:function(){this.setColour(Kh),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg),"image"),this.setOutput(!0,["esp32_image","List"])}},sm={init:function(){this.setColour(Kh),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(mt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new mt.FieldDropdown(sm.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":mt.Msg.MIXLY_MICROBIT_image_add,"-":mt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[mt.Msg.MICROBIT_DISPLAY_UNION,"add"],[mt.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},_m={init:function(){this.setColour(Kh),this.appendValueInput("A").setCheck("esp32_image").appendField(mt.Msg.MIXLY_MICROBIT_Invert_image1),this.setInputsInline(!0),this.setOutput(!0,"esp32_image")}},om={init:function(){this.setColour(Kh),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_LET2).appendField(new mt.FieldDropdown(om.OPERATORS),"OP"),this.appendValueInput("val").appendField(mt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_UNIT);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=mt.Msg.DISPLAY_IMAGE_LET,n=mt.Msg.DISPLAY_IMAGE_LET2,s=mt.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:mt.Msg.MIXLY_UP,shift_down:mt.Msg.MIXLY_DOWN,shift_left:mt.Msg.MIXLY_LEFT,shift_right:mt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[mt.Msg.MIXLY_UP,"shift_up"],[mt.Msg.MIXLY_DOWN,"shift_down"],[mt.Msg.MIXLY_LEFT,"shift_left"],[mt.Msg.MIXLY_RIGHT,"shift_right"]]},pm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},am={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},um={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},rm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},lm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Clear_display);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Clear_display)}},dm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_SHOW+mt.Msg.MIXLY_DISPLAY_MATRIX_WRITE_NOW),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Im={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<8;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Tm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(Tm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},Mm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},hm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(hm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},mm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<16;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,"esp32_image"),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Em={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(Em.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},Om={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.OLED_SET_FONT).appendField(new mt.FieldDropdown(Om.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+mt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+mt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+mt.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Rm={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING)}},cm={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING)}},gm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(mt.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING)}},Cm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(mt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(mt.Msg.TEXT_CENTER).appendField(new mt.FieldDropdown([[mt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[mt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},Sm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(mt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},Am={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Lm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Nm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"state",options:[[mt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[mt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"shape",options:[[mt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[mt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:mt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Dm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"state",options:[[mt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[mt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"dir_h_v",options:[[mt.Msg.mpython_vertical,"0"],[mt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:mt.Msg.MPYTHON_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},fm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"state",options:[[mt.Msg.mpython_display_hline_1,"1"],[mt.Msg.mpython_display_hline_0,"0"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.mpython_display_line_TOOLTIP,message0:mt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},Fm={init:function(){this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new mt.FieldDropdown(Fm.IMAGES),"path"),this.setColour(Kh),this.setOutput(!0)},IMAGES:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]]},Pm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<5;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Ym={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(Ym.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},vm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Xm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_AMBIENTBRIGHT),this.setInputsInline(!0),this.setOutput(!0,Number)}},xm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},ym={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new mt.FieldDropdown(ym.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[mt.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[mt.Msg.CLOCKWISE+"90"+mt.Msg.blockpy_setheading_degree,"1"],[mt.Msg.CLOCKWISE+"180"+mt.Msg.blockpy_setheading_degree,"2"],[mt.Msg.CLOCKWISE+"270"+mt.Msg.blockpy_setheading_degree,"3"]]},bm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<12;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Vm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(Vm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},Bm={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Gm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.OLED_BITMAP).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("direct").setCheck(String).appendField(mt.Msg.MIXLY_AipImageClassify_Image+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Um={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(mt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(mt.Msg.TEXT_CENTER).appendField(new mt.FieldDropdown([[mt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[mt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},wm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},km={init:function(){this.jsonInit({colour:Kh,args0:[{name:"shape",options:[[mt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[mt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:mt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Hm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"dir_h_v",options:[[mt.Msg.mpython_vertical,"0"],[mt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:mt.Msg.ONBOARD_TFT_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},Wm={init:function(){this.jsonInit({colour:Kh,args0:[{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.mpython_display_line_TOOLTIP,message0:mt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},Km={init:function(){this.setColour(Kh),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(mt.Msg.HTML_COLOUR),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},Jm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_LCD_SETCOLOR).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},qm={init:function(){this.setColour(Kh),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_SCREEN_FILL);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Qm={init:function(){this.setColour(Kh),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_INIT_CLOCK),this.appendDummyInput().appendField(mt.Msg.MIXLY_CENTER_POS),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.OLED_CIRCLE_RADIUS),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},zm={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.GET_RTCTIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},jm={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.SET_TIME),this.appendValueInput("h").setCheck(Number).appendField(mt.Msg.MIXLY_HOUR),this.appendValueInput("m").setCheck(Number).appendField(mt.Msg.MIXLY_MINUTE),this.appendValueInput("s").setCheck(Number).appendField(mt.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},$m={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.DRAW_CLOCK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Zm={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.CLEAR_CLOCK),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_STM32_TFT_BACKGROUND_COLOR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},tE={init:function(){this.jsonInit({colour:Kh,args0:[{name:"shape",options:[[mt.Msg.MPYTHON_DISPLAY_HOLLOW,"False"],[mt.Msg.MPYTHON_DISPLAY_SOLID,"True"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"r",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,message0:mt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_CIRCLE_MESSAGE0,nextStatement:null,previousStatement:null})}},eE={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.DRAW_POINTER).appendField(mt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(mt.Msg.MIXLY_DRAW_POINTER_DU),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.DRAW_POINTER_TOOLTIP)}},iE={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.DRAW_POINTER).appendField(mt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(mt.Msg.MIXLY_DRAW_POINTER_DU),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.DRAW_POINTER_TOOLTIP)}},nE={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.MIXLY_Display_long_text),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},sE={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},_E={init:function(){Qh.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},oE={init:function(){$h.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},pE={init:function(){om.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},aE={init:function(){um.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},uE={init:function(){rm.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},rE={init:function(){lm.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},lE=180,dE={init:function(){this.setColour(lE),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(mt.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_LET2).appendField(new mt.FieldDropdown(dE.OPERATORS),"OP"),this.appendValueInput("val").appendField(mt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=mt.Msg.DISPLAY_IMAGE_LET,n=mt.Msg.DISPLAY_IMAGE_LET2,s=mt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:mt.Msg.MIXLY_UP,down:mt.Msg.MIXLY_DOWN,left:mt.Msg.MIXLY_LEFT,right:mt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[mt.Msg.MIXLY_UP,"up"],[mt.Msg.MIXLY_DOWN,"down"],[mt.Msg.MIXLY_LEFT,"left"],[mt.Msg.MIXLY_RIGHT,"right"]]},IE={init:function(){this.setColour(lE),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(mt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new mt.FieldDropdown(IE.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":mt.Msg.MIXLY_MICROBIT_image_add,"-":mt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[mt.Msg.MICROBIT_DISPLAY_UNION,"+"],[mt.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},TE={init:function(){this.setColour(lE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+mt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new mt.FieldDropdown(TE.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+mt.Msg.MIXLY_MICROBIT_IMAGE+{height:mt.Msg.MIXLY_HEIGHT,width:mt.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[mt.Msg.MIXLY_HEIGHT,"height"],[mt.Msg.MIXLY_WIDTH,"width"]]},ME={init:function(){this.setColour(lE),this.appendValueInput("VAR").appendField(mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RECT).appendField(new mt.FieldDropdown(ME.STATUS),"OP"),this.jsonInit({message0:mt.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_OLED_RECT)},STATUS:[[mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},hE={init:function(){this.setColour(lE),this.appendValueInput("VAR").appendField(mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new mt.FieldDropdown(hE.STATUS),"OP"),this.jsonInit({message0:mt.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},mE={init:function(){this.setColour(lE),this.appendValueInput("VAR").appendField(mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_DISPLAY_DRAW+mt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new mt.FieldDropdown(mE.STATUS),"OP"),this.jsonInit({message0:mt.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_DISPLAY_DRAW+mt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},EE="#777777",OE={init:function(){this.setColour(EE),this.appendDummyInput("").appendField("from ").appendField(new mt.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new mt.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},RE={init:function(){this.setColour(EE),this.appendDummyInput("").appendField("import ").appendField(new mt.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cE={init:function(){this.setColour(EE),this.appendDummyInput("").appendField(new mt.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new mt.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},aO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},uO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},rO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},lO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(mt.Msg.MIXLY_WIFI_USERNAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(mt.Msg.MIXLY_IOT_PASSWORD).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_PROJECT).setAlign(mt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(mt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},IO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_SUBSCRIBE+mt.Msg.MIXLY_MICROBIT_MSG).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(mt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},TO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},MO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},EO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},OO={init:function(){this.setColour(eO),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},RO={init:function(){this.setColour(eO),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},cO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},gO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO").appendField(mt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(mt.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},CO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+mt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},SO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},AO={init:function(){this.VISITOR_ID=Et.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(eO),this.appendDummyInput("").appendField(new mt.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},LO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO").appendField(mt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},NO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("HTTP"+mt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(mt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(mt.Msg.MIXLY_REQUESTS_GET).appendField(mt.Msg.MIXLY_GET_CURRENT_TIME).appendField(mt.Msg.MIXLY_OPEN_DEBUG).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},DO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("HTTP"+mt.Msg.MIXLY_Client).appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[mt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[mt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},fO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MQTT"+mt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(mt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(mt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(mt.Msg.MQTT_Topic).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(mt.Msg.MIXLY_OPEN_DEBUG).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},FO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MQTT"+mt.Msg.MIXLY_Client).appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[mt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[mt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},PO=iO,YO=nO,vO=sO,XO=_O,xO=pO,yO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(mt.Msg.MODEL_NAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(mt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bO=yO,VO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(mt.Msg.MIXLY_API_PRIVATE_KEY).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(mt.Msg.MODEL_NAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(mt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},BO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(mt.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},GO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(mt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},UO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("Ollama "+mt.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wO=225,kO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(mt.Msg.MIXLY_NETWORK_MODE).appendField(new mt.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},HO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[mt.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=mt.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:mt.Msg.MIXLY_NETWORK_WIFI_OPEN,False:mt.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},WO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},KO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return mt.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:mt.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},JO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(mt.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(mt.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},qO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_CONNECT+mt.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},QO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[mt.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[mt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:mt.Msg.MIXLY_ESP32_NETWORK_IP,1:mt.Msg.MIXLY_ESP32_NETWORK_MASK,2:mt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},zO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},jO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[mt.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},$O={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(mt.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(mt.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},ZO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},tR={init:function(){this.setColour(wO),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new mt.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},eR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},iR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},nR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},sR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},_R={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},oR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},pR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},aR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},uR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},rR={init:function(){this.setColour(wO),this.appendValueInput("DOMAIN").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(mt.Msg.blockpy_REQUESTS_GET).appendField(new mt.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},lR={init:function(){this.appendValueInput("VAL"),this.setColour(wO),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(lR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:mt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:mt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:mt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[mt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},dR={init:function(){this.appendValueInput("VAR").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(wO),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown(dR.METHOD),"DIR"),this.appendDummyInput("").appendField(mt.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:mt.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:mt.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},IR={init:function(){this.setColour(wO),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(mt.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},TR={init:function(){this.setColour(wO),this.appendDummyInput("").appendField(new mt.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},MR="#3288dd",hR={init:function(){this.setColour(MR),this.appendValueInput("URL").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(mt.Msg.blockpy_REQUESTS).appendField(mt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},mR={init:function(){this.setColour(MR),this.appendValueInput("URL").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(mt.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(mt.Msg.blockpy_REQUESTS+mt.Msg.OLED_STRING),this.appendDummyInput("").appendField(mt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},ER={init:function(){this.appendValueInput("VAL"),this.setColour(MR),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(ER.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[mt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[mt.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},OR={init:function(){this.setColour(MR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(mt.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(mt.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(mt.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},RR={init:function(){this.setColour(MR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(mt.Msg.MIXLY_EMQX_PORT).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(mt.Msg.MIXLY_WIFI_USERNAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(mt.Msg.MIXLY_IOT_PASSWORD).setAlign(mt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cR={init:function(){this.setColour(MR),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_SUBSCRIBE+mt.Msg.MIXLY_MICROBIT_MSG).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(mt.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},gR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_SUBSCRIBE+mt.Msg.MIXLY_MICROBIT_MSG).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(mt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},CR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(mt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},SR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("mqtt"+mt.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},AR="#A58C5B",LR={init:function(){this.setColour(AR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(mt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SENOR_IS_PRESSED)}},NR={init:function(){this.setColour(AR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(mt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SENOR_WAS_PRESSED)}},DR={init:function(){this.setColour(AR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_BUTTON+mt.Msg.MIXLY_GET_PRESSES)}},fR={init:function(){this.setColour(AR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[mt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[mt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},FR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_shake,"shake"],[mt.Msg.MIXLY_UP,"up"],[mt.Msg.MIXLY_DOWN,"down"],[mt.Msg.MIXLY_LEFT,"left"],[mt.Msg.MIXLY_RIGHT,"right"],[mt.Msg.MIXLY_MICROBIT_face_up,"face up"],[mt.Msg.MIXLY_MICROBIT_face_down,"face down"],[mt.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=mt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=mt.Msg.MSG.catSensor,s=mt.Msg.MIXLY_MICROBIT_JS_STATE,_=mt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:mt.Msg.MIXLY_MICROBIT_shake,up:mt.Msg.MIXLY_UP,down:mt.Msg.MIXLY_DOWN,left:mt.Msg.MIXLY_LEFT,right:mt.Msg.MIXLY_RIGHT,"face up":mt.Msg.MIXLY_MICROBIT_face_up,"face down":mt.Msg.MIXLY_MICROBIT_face_down,freefall:mt.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+_}))}},PR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},YR={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},vR={init:function(){this.setColour(AR),this.appendValueInput("PIN",Number).appendField(new mt.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new mt.FieldDropdown(vR.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]},XR={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},xR={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},yR={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new mt.FieldDropdown([[mt.Msg.TEXT_TRIM_LEFT,"left"],[mt.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(mt.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=mt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=mt.Msg.MIXLY_ESP32_NEAR;return i+{left:mt.Msg.TEXT_TRIM_LEFT,right:mt.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},bR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_ALTITUDE_SENSOR+" BMP280").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[mt.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":mt.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":mt.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},VR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+" SHT20").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[mt.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},BR={init:function(){this.setColour(AR),this.appendValueInput("PIN",Number).appendField("DS18X20 "+mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},GR={init:function(){this.setColour(AR),this.appendDummyInput("").appendField("LM35"+mt.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_LM35)}},UR={init:function(){this.setColour(AR),this.appendValueInput("I2CSUB").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_EXTERN_LIGHT+"(LTR308ALS)","LTR308"],[mt.Msg.MIXLY_COLOR_SENSOR+"(LTR381RGB)","LTR381RGB"],[mt.Msg.MIXLY_COLOR_SENSOR+"(UCS12071)","UCS12071"],[mt.Msg.MIXLY_EXTERN_LIGHTUV+"(LTR390UV)","LTR390UV"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(HP203X)","HP203X"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(SPL06_001)","SPL06_001"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(MS5611)","MS5611"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(BMP280)","BMP280"],[mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHTC3)","SHTC3"],[mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(AHT21)","AHT21"],[mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHT20)","SHT20"],[mt.Msg.MIXLY_LASER_RANGE_SENSOR+"(VL53L0X)","VL53L0X"],[mt.Msg.MIXLY_GEOMAGNETIC_SENSOR+"(QMC5883L)","QMC5883L"],[mt.Msg.MIXLY_ESP32_MAX30102+"(MAX30102)","MAX30102"],[mt.Msg.HTML_COLOUR+"、"+mt.Msg.MIXLY_ENVIRONMENT_LIGHT+"、"+mt.Msg.MIXLY_NEXT+"、"+mt.Msg.MIXLY_ESP32_APDS9960+"(APDS9960)","APDS9960"],[mt.Msg.MIXLY_NINE_AXIS_SENSOR+"(MPU9250)","MPU9250"],[mt.Msg.MixGo_MPU9250+"(ADXL345)","ADXL345"],["RFID","RFID"],[mt.Msg.MIXLY_RADAR_SENSOR+"(CBR817)","CBR817"],[mt.Msg.MIXLY_AipSpeech_asr+"(CI130X)","CI130X"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},wR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(mt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+mt.Msg.MIXLY_DELAY_TIME_RANGE)}},kR={init:function(){this.setColour(AR),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RADAR).appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(mt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+mt.Msg.MIXLY_DELAY_TIME_RANGE)}},HR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},WR={init:function(){this.setColour(AR),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RADAR).appendField(mt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},KR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_IDENTIFY_ONCE_AND_SAVE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},JR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_HELLO_XIAOZHI,"1"],[mt.Msg.MIXLY_XIAOZHIXIAOZHI,"2"],[mt.Msg.MIXLY_THE_FIRST,"3"],[mt.Msg.MIXLY_THE_SECOND,"4"],[mt.Msg.MIXLY_THE_THIRD,"5"],[mt.Msg.MIXLY_THE_FOURTH,"6"],[mt.Msg.MIXLY_THE_FIFTH,"7"],[mt.Msg.MIXLY_THE_SIXTH,"8"],[mt.Msg.MIXLY_THE_SEVENTH,"9"],[mt.Msg.MIXLY_THE_EIGHTH,"10"],[mt.Msg.MIXLY_THE_NINTH,"11"],[mt.Msg.MIXLY_THE_TENTH,"12"],[mt.Msg.MIXLY_THE_ELEVENTH,"13"],[mt.Msg.MIXLY_THE_TWELFTH,"14"],[mt.Msg.MIXLY_THE_13TH,"15"],[mt.Msg.MIXLY_THE_14TH,"16"],[mt.Msg.MIXLY_THE_15TH,"17"],[mt.Msg.MIXLY_THE_16TH,"18"],[mt.Msg.MIXLY_THE_17TH,"19"],[mt.Msg.MIXLY_THE_18TH,"20"],[mt.Msg.MIXLY_THE_19TH,"21"],[mt.Msg.MIXLY_THE_20TH,"22"],[mt.Msg.MIXLY_Turn_on_the_lights,"23"],[mt.Msg.MIXLY_Turn_off_the_lights,"24"],[mt.Msg.MIXLY_Turn_up_the_brightness,"25"],[mt.Msg.MIXLY_Turn_down_the_brightness,"26"],[mt.Msg.MIXLY_Set_it_to_red,"27"],[mt.Msg.MIXLY_Set_it_to_orange,"28"],[mt.Msg.MIXLY_Set_it_to_yellow,"29"],[mt.Msg.MIXLY_Set_it_to_green,"30"],[mt.Msg.MIXLY_Set_it_to_cyan,"31"],[mt.Msg.MIXLY_Set_it_to_blue,"32"],[mt.Msg.MIXLY_Set_it_to_purple,"33"],[mt.Msg.MIXLY_Set_it_to_white,"34"],[mt.Msg.MIXLY_Turn_on_the_fan,"35"],[mt.Msg.MIXLY_Turn_off_the_fan,"36"],[mt.Msg.MIXLY_First_gear,"37"],[mt.Msg.MIXLY_Wind_speed_second,"38"],[mt.Msg.MIXLY_Third_gear,"39"],[mt.Msg.MIXLY_Previous,"40"],[mt.Msg.MIXLY_Next_page,"41"],[mt.Msg.MIXLY_Show_smiley_face,"42"],[mt.Msg.MIXLY_Show_crying_face,"43"],[mt.Msg.MIXLY_Show_love,"44"],[mt.Msg.MIXLY_Close_display,"45"],[mt.Msg.MIXLY_Start_execution,"46"],[mt.Msg.MIXLY_FORWARD,"47"],[mt.Msg.MIXLY_BACKWARD,"48"],[mt.Msg.MIXLY_TURNLEFT,"49"],[mt.Msg.MIXLY_TURNRIGHT,"50"],[mt.Msg.MIXLY_STOP,"51"],[mt.Msg.MIXLY_Accelerate,"52"],[mt.Msg.MIXLY_retard,"53"],[mt.Msg.ROTATION_FORWARD,"54"],[mt.Msg.ROTATION_BACKWARD,"55"],[mt.Msg.MIXLY_Query_temperature,"56"],[mt.Msg.MIXLY_Query_humidity,"57"],[mt.Msg.MIXLY_Query_brightness,"58"],[mt.Msg.MIXLY_Query_sound,"59"],[mt.Msg.MIXLY_Query_time,"60"],[mt.Msg.MIXLY_Query_distance,"61"],[mt.Msg.MIXLY_Query_pressure,"62"],[mt.Msg.MIXLY_Query_key,"63"],[mt.Msg.MIXLY_Query_touch,"64"],[mt.Msg.MIXLY_Query_color,"65"]]),"cmd").appendField(mt.Msg.MIXLY_WHETHER+mt.Msg.MIXLY_BE_IDENTIFIED),this.setOutput(!0),this.setInputsInline(!0)}},qR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RECOGNIZED_STATE,"status1"],[mt.Msg.MIXLY_WHETHER_BROADCAST,"status2"],[mt.Msg.MIXLY_THE_RECOGNIZED_CMD,"result"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_CI130X_GET_THE_RECOGNIZED_STATE_TOOLTIP)}},QR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MP3_PLAY).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[mt.Msg.MIXLY_WIND_SPEED,"154"],[mt.Msg.MIXLY_HYETAL,"155"],[mt.Msg.MIXLY_TEMPERATURE,"156"],[mt.Msg.MIXLY_Humidity,"157"],[mt.Msg.MIXLY_Altitude,"158"],[mt.Msg.MIXLY_SOUND,"159"],[mt.Msg.MIXLY_BRIGHTNESS,"160"],[mt.Msg.ME_GO_HALL_SENSOR_DISTANCE,"161"],[mt.Msg.MIXLY_SERVO,"162"],[mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"163"],[mt.Msg.MIXLY_BUTTON2,"164"],[mt.Msg.MIXLY_ESP32_TOUCH,"165"],[mt.Msg.MIXLY_PAY,"166"],[mt.Msg.MIXLY_CARSH_CHANGE,"167"],[mt.Msg.MIXLY_COUNTDOWN,"168"],[mt.Msg.MIXLY_TIMING,"169"],[mt.Msg.MIXLY_AT_THE_MOMENT,"170"],[mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE,"171"],[mt.Msg.MIXLY_FORWARD,"172"],[mt.Msg.MIXLY_BACKWARD,"173"],[mt.Msg.MIXLY_TURNLEFT,"174"],[mt.Msg.MIXLY_TURNRIGHT,"175"],[mt.Msg.MIXLY_STOP,"176"],[mt.Msg.MIXLY_Accelerate,"177"],[mt.Msg.MIXLY_retard,"178"],[mt.Msg.ROTATION_FORWARD,"179"],[mt.Msg.ROTATION_BACKWARD,"180"],[mt.Msg.TUPLE_JOIN,"181"],[mt.Msg.MIXLY_SHOW,"182"],[mt.Msg.MIXLY_LAMPLIGHT,"183"],[mt.Msg.MIXLY_ACCELERATION,"184"]]),"star"),this.appendValueInput("NUM").appendField(mt.Msg.MIXLY_NUMBER),this.appendDummyInput("").appendField(mt.Msg.MIXLY_UNIT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[mt.Msg.MIXLY_YEAR,"117"],[mt.Msg.MIXLY_MONTH,"118"],[mt.Msg.MIXLY_DAY,"119"],[mt.Msg.MIXLY_HOUR,"120"],[mt.Msg.MIXLY_MINUTE,"121"],[mt.Msg.MIXLY_SECOND,"122"],[mt.Msg.MIXLY_WEEK2,"123"],[mt.Msg.MIXLY_RMB_UNIT,"124"],[mt.Msg.blockpy_setheading_degree,"125"],[mt.Msg.MIXLY_GEAR,"126"],[mt.Msg.MIXLY_LAYER,"127"],[mt.Msg.MIXLY_GRAM,"128"],[mt.Msg.MIXLY_METER,"129"],[mt.Msg.MIXLY_CENTIMETER,"130"],[mt.Msg.MIXLY_MILLIMETER,"131"],[mt.Msg.MIXLY_LUMEN,"132"],[mt.Msg.MIXLY_DECIBEL,"133"],[mt.Msg.MIXLY_hectopascal,"134"],[mt.Msg.MIXLY_PERCENT,"135"],[mt.Msg.MIXLY_CELSIUS,"136"],[mt.Msg.MIXLY_METER_PER_SEC,"137"],[mt.Msg.MIXLY_MICROBIT_Turn_on_display,"138"],[mt.Msg.MIXLY_MICROBIT_Turn_off_display,"139"],[mt.Msg.MIXLY_SUCCESS,"140"],[mt.Msg.MIXLY_FAILED,"141"],[mt.Msg.MIXLY_WRONG,"142"],[mt.Msg.MIXLY_GOOD,"143"],[mt.Msg.MIXLY_blockpy_set_add,"144"],[mt.Msg.MIXLY_DECREASE,"145"],[mt.Msg.COLOUR_RGB_RED,"146"],[mt.Msg.COLOUR_RGB_ORANGE,"147"],[mt.Msg.COLOUR_YELLOW,"148"],[mt.Msg.COLOUR_RGB_GREEN,"149"],[mt.Msg.COLOUR_CYAN,"150"],[mt.Msg.COLOUR_RGB_BLUE,"151"],[mt.Msg.COLOUR_RGB_PURPLE,"152"],[mt.Msg.COLOUR_RGB_WHITE,"153"]]),"end"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},zR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.MIXLY_SYSTEM+mt.Msg.MIXLY_CMD).appendField(new mt.FieldDropdown([[mt.Msg.MILXY_ENTER_WAKE_UP,"1"],[mt.Msg.MIXLY_INCREASE_VOLUME,"202"],[mt.Msg.MIXLY_REDUCE_VOLUME,"203"],[mt.Msg.MIXLY_MAX_VOLUME,"204"],[mt.Msg.MIXLY_MINIMUM,"205"],[mt.Msg.MIXLY_OPEN_RESPONSE,"206"],[mt.Msg.MIXLY_CLOSE_RESPONSE,"207"],[mt.Msg.MIXLY_QUIT_WAKE_UP,"208"]]),"cmd"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},jR={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[mt.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[mt.Msg.MIXLY_ESP32_MAX30102_IR+","+mt.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},$R={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[mt.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[mt.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ZR={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308ALS"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},tc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.HTML_COLOUR+mt.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET+mt.Msg.HTML_COLOUR,"[2]"],[mt.Msg.MIXLY_GET+mt.Msg.MIXLY_IR_STRENGTH,"[1]"],[mt.Msg.MIXLY_GET+mt.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ec={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.HTML_COLOUR+mt.Msg.MSG.catSensor+" UCS12071").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET+"RGB"+mt.Msg.HTML_COLOUR,"0"],[mt.Msg.MIXLY_GET+mt.Msg.MIXLY_RGB_RAW,"1"],[mt.Msg.MIXLY_GET_ENV_LIGHT+mt.Msg.MIXLY_BRIGHTNESS,"2"],[mt.Msg.GET_IR_STRENGTH+mt.Msg.MIXLY_BRIGHTNESS,"3"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ic={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET_ENV_LIGHT,"E"],[mt.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},nc={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},sc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},_c={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},oc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETPRESSURE,"pressure()"],[mt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[mt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},pc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" SPL06_001").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETPRESSURE,"pressure()"],[mt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[mt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ac={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETPRESSURE,"pressure()"],[mt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[mt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},uc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_REF_TO_PRESSURE),this.appendDummyInput().appendField(mt.Msg.MIXLY_CAL_TO_ALTITUDE),this.setOutput(!0,Number),this.setInputsInline(!0)}},rc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MIXGOPE_FIELD+mt.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[mt.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},lc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_shake,"shake"],[mt.Msg.MIXLY_UP,"up"],[mt.Msg.MIXLY_DOWN,"down"],[mt.Msg.MIXLY_LEFT,"left"],[mt.Msg.MIXLY_RIGHT,"right"],[mt.Msg.MIXLY_MICROBIT_face_up,"face up"],[mt.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=mt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=mt.Msg.MSG.catSensor,s=mt.Msg.MIXLY_MICROBIT_JS_STATE,_=mt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:mt.Msg.MIXLY_MICROBIT_shake,up:mt.Msg.MIXLY_UP,down:mt.Msg.MIXLY_DOWN,left:mt.Msg.MIXLY_LEFT,right:mt.Msg.MIXLY_RIGHT,"face up":mt.Msg.MIXLY_MICROBIT_face_up,"face down":mt.Msg.MIXLY_MICROBIT_face_down}[e]+_}))}},dc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Ic={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_GET+mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Tc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+mt.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Mc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},hc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_GETTEMPERATUE)}},mc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return mt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},Ec={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},Oc={init:function(){this.setColour(AR),this.appendValueInput("SPISUB").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new mt.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},Rc={init:function(){this.setColour(AR),this.appendDummyInput().appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[mt.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},cc={init:function(){this.setColour(AR),this.appendDummyInput().appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},gc={init:function(){this.setColour(AR),this.appendDummyInput().appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},Cc={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(mt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Sc={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(mt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(mt.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},Ac={init:function(){this.setColour(AR),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RFID_SCAN_OK,"0"],[mt.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[mt.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Lc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown([["全部(元组)","data()[0]"],["全部(json)","data()[1]"],["全部(json,附带位置信息)","data()[2]"],["编号","data()[0][0]"],["电量","data()[0][1]"],["风速","data()[0][2]"],["阵风","data()[0][3]"],["风向","data()[0][4]"],["雨量","data()[0][5]"],["温度","data()[0][6]"],["湿度","data()[0][7]"],["光照","data()[0][8]"],["紫外线","data()[0][9]"],["大气压","data()[0][10]"],["信号强度","data()[0][11]"],["信噪比","data()[0][12]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip("返回气象数据元组 data= (设备id,电池状态,风速m/s,阵风m/s,风向°,雨量mm,温度℃,湿度%,光照Lux,UVI,大气压Pa,信号强度dB,信噪比dB)")}},Nc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Dc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendValueInput("BASE").appendField("以主题"),this.appendDummyInput("").appendField("串口发送至MixIO"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},fc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new mt.icons.MutatorIcon(["weather_set_label_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("weather_set_label_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n>6),i.push(128|63&_)):(2048<=_&&_<=55295||57344<=_&&_<=65535)&&(n+=3,i.push(224|15&_>>12),i.push(128|63&_>>6),i.push(128|63&_))}for(s=0;s>8,255&n].concat(i)}(t,!0),i="",n=0;n=0?"0x700000":["mixgo_sant"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==o?(e.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+_+", font_address="+p+")\n"):"16x8 Matrix"==o&&(e.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+_+")\n"),i},iP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},nP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},sP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},_P=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},oP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},pP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},aP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},uP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},rP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},lP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},dP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},IP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},TP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},MP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_"+t.getFieldValue("OP")+"("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"B",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},hP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},mP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},EP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},OP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},RP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"width",e.ORDER_ATOMIC),o=e.valueToCode(this,"height",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP");switch(p){case"True":return i+".show_fill_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n";case"False":return i+".show_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n"}},cP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+_+", 1)\n"},gP=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},CP=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},SP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},AP=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},LP=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"r",e.ORDER_ATOMIC),o="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(o){case"True":return i+".show_fill_circle("+n+", "+s+", "+_+", "+p+")\n";case"False":return i+".show_circle("+n+", "+s+", "+_+", "+p+")\n"}},NP=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),_=e.valueToCode(this,"x1",e.ORDER_ATOMIC),o=e.valueToCode(this,"y1",e.ORDER_ATOMIC),p=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",r=this.getFieldValue("OP");switch(u){case"True":return i+".show_fill_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n"}},DP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+","+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+","+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},fP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},FP=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),_=this.getFieldValue("key");return"TM1650"==_?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+_+"("+s+")\n"):"TM1637"==_&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+_+"("+s+")\n"),i},PP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},YP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},vP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".showDP("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},XP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},xP=function(t,e){e.definitions_.import_st7789="import st7789";var i=Et.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_sant"].indexOf(i)>=0?"0xE00000":"0x3A0000";var s=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),_=e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC),o=e.valueToCode(this,"PINCS",e.ORDER_ATOMIC),p=e.valueToCode(this,"PINDC",e.ORDER_ATOMIC);return s+" = st7789.ST7789("+_+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+", dc_pin="+p+", cs_pin="+o+", rotation="+this.getFieldValue("rotate")+", font_address="+n+")\n"},yP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".image("+n+", x="+s+", y="+_+", size="+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".image("+n+", x= "+s+",y="+_+", size="+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},bP=function(t,e){var i="0x"+this.getFieldValue("COLOR").slice(1);return["0x"+((16252928&i)>>8|(64512&i)>>5|(255&i)>>3).toString(16),e.ORDER_ATOMIC]},VP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==a.slice(0,2))var r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color="+a+")\n";else{const t=a.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},BP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p=i+".frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},GP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},UP=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},wP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"x1",e.ORDER_ATOMIC),s=e.valueToCode(this,"y1",e.ORDER_ATOMIC),_=e.valueToCode(this,"x2",e.ORDER_ATOMIC),o=e.valueToCode(this,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".line("+n+", "+s+", "+_+", "+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".line("+n+", "+s+", "+_+", "+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},kP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=this.getFieldValue("key"),_=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return e.definitions_.import_i2clcd="import i2clcd",i+" = i2clcd.LCD("+n+", lcd_width="+s+", i2c_addr="+_+")\n"},HP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+",center = "+this.getFieldValue("center")+")\n"},WP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".print("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},KP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},JP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},qP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC),_=this.getFieldValue("driver"),o=Et.Boards.getSelectedBoardKey().split(":")[2],p="";return p=["mpython","mixgo_pe","mixgo_nova"].indexOf(o)>=0?"0x700000":["mixgo_sant"].indexOf(o)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+", address="+s+", font_address="+p+", types="+_+")\n"},QP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},zP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+")\n"},jP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},$P=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},ZP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},tY=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},eY=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},iY=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},nY=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},sY=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},_Y=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},oY=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},pY=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=t.getFieldValue("state");return i+"."+t.getFieldValue("shape")+"("+n+", "+s+", "+_+", "+o+", "+p+")\n"+i+".show()\n"},aY=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=t.getFieldValue("state");return i+"."+("0"==t.getFieldValue("dir_h_v")?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\n"+i+".show()\n"},uY=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".line("+e.valueToCode(t,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y2",e.ORDER_ATOMIC)+", "+t.getFieldValue("state")+")\n"+i+".show()\n"},rY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var s="onboard_tft.image("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff,sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n"}else if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled";s="oled.print("+n+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.shows("+n+")\n"}return s},lY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),_=this.getFieldValue("center");if("mixgo_sant"==i||"mixgo_nova"==i)return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+", space="+s+", center="+_+",sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n";if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled"}return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+", space="+s+", center="+_+")\n"},dY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var s="onboard_oled.frame("+n+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";s="onboard_tft.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.frame("+n+")\n"}return s},IY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var _="onboard_oled.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", delay="+s+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";_="onboard_tft.frame("+n+", size=5 , delay="+s+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";_="onboard_matrix.frame("+n+", delay="+s+")\n"}return _},TY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";n="onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},MY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var o="onboard_oled.scroll("+n+", speed="+s+", space="+_+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";o="onboard_tft.scroll("+n+", y=0, size=5, speed="+s+", space="+_+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";o="onboard_matrix.scroll("+n+", speed="+s+", space="+_+")\n"}return o},hY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},mY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},EY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){const i=t.getFieldValue("image").split(".");if(2!==i.length)throw Error("pin value error");e.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`;var n=i[1]}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix."+t.getFieldValue("image")}return[n,e.ORDER_ATOMIC]},OY=function(t,e){var i={"#000000":"0","#ff0000":"1"};function n(t){let e="";if(t.length%2==1&&(t="0"+t),t.length<8){let e=8-t.length;for(let i=1;i<=e;i++)t="0"+t}for(let i=1;i<=t.length;i++)i%2==0&&i!==t.length?e=e+t[i-1]+",0x":e+=t[i-1];return"0x"+e}let s=[];for(let e=0;e<12;e++){let _="",o=0,p=0;for(let n=0;n<32;n++)n<8?p=7-n:n<16?p=23-n:n<24?p=39-n:n<32&&(p=55-n),o+=Number(i[t.getFieldValue(e+"-"+n)])*Math.pow(2,31-p);_+=n(o.toString(16)),s.unshift(_)}let _=[];for(let t=0;t>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},nv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.picture("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"direct",e.ORDER_ASSIGNMENT)+")\n"},sv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=this.getFieldValue("center"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True",r=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==r.slice(0,2))var l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color="+r+",sync="+u+")\n";else{const t=r.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color=0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+",sync="+u+")\n"}return l},_v=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},ov=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=t.getFieldValue("shape"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+",sync="+u+")\n";else{const t=p.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+",sync="+u+")\n"}return r},pv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("dir_h_v"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},av=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x1",e.ORDER_ATOMIC),s=e.valueToCode(t,"y1",e.ORDER_ATOMIC),_=e.valueToCode(t,"x2",e.ORDER_ATOMIC),o=e.valueToCode(t,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},uv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},rv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),o=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var p="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+",sync="+o+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+",sync="+o+")\n"}return p},lv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==n.slice(0,2))var _="onboard_tft.fill("+n+",sync="+s+")\n";else{const t=n.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_="onboard_tft.fill(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+",sync="+s+")\n"}return _},dv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=o+"=Clock("+n+", "+s+", "+_+", "+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=o+"=Clock("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},Iv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},Tv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_time("+e.valueToCode(this,"h",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"m",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"s",e.ORDER_ASSIGNMENT)+")\n"},Mv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},hv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2))var _=n+".clear("+s+")\n";else{const t=s.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_=n+".clear(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+")\n"}return _},mv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"r",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("shape"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+", "+p+",sync="+a+")\n"}return u},Ev=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n="onboard_tft.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}return n},Ov=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2));else{const t=s.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)}return"onboard_tft.pointern(angle="+n+")\n"},Rv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color="+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},cv=rY,gv=DY,Cv=AY,Sv=DY,Av=fY,Lv=cY,Nv=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},Dv=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},fv=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},DB=function(){return"control.reset()\n"},fB=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Et.Profile.default.serial)+")\n"},FB=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Et.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Et.Profile.default.serial)+")\n"},PB=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Et.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Et.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},YB=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},vB=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},XB=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},xB=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},yB=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},bB=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},VB=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},BB=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},GB=function(){return"while True:\n pass\n"},UB=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},wB=function(t,e){return e.definitions_.import_os="import os","os.uname()"},kB=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},HB=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},WB=function(t,e){return e.definitions_.import_mixgo="import mixgo",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period="+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=Timer."+(e.valueToCode(this,"mode",e.ORDER_NONE)||"None")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},KB=function(t,e){return e.definitions_.import_machine="import machine",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period = "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=machine.Timer."+this.getFieldValue("mode")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},JB=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},qB=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},QB=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},zB=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},jB=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},$B=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},ZB=qB,tG=KB,eG=JB,iG=kB,nG=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},sG=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},_G=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api.weather_hourly("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"hour",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},oG=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")\n"},pG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_now.analysis()";else n='Weather_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},aG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Air_now.analysis()";else n='Air_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},uG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_alarm.analysis()";else n='Weather_alarm.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},rG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Life_suggestion.analysis()";else n='Life_suggestion.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},lG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Tide_daily.analysis()";else n='Tide_daily.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},dG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Location_search.analysis()";else n='Location_search.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},IG=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")\n"},TG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Weather_daily.analysis("+n+")";else s="Weather_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},MG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Air_daily.analysis("+n+")";else s="Air_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},hG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_sun.analysis("+n+")";else s="Geo_sun.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},mG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_moon.analysis("+n+")";else s="Geo_moon.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},EG=new mt.Generator("Python");EG.INDENT=" ",EG.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),EG.ORDER_ATOMIC=0,EG.ORDER_COLLECTION=1,EG.ORDER_STRING_CONVERSION=1,EG.ORDER_UNARY_POSTFIX=1,EG.ORDER_UNARY_PREFIX=2,EG.ORDER_MEMBER=2.1,EG.ORDER_FUNCTION_CALL=2.2,EG.ORDER_EXPONENTIATION=3,EG.ORDER_UNARY_SIGN=4,EG.ORDER_BITWISE_NOT=4,EG.ORDER_MULTIPLICATIVE=5,EG.ORDER_ADDITIVE=6,EG.ORDER_BITWISE_SHIFT=7,EG.ORDER_BITWISE_AND=8,EG.ORDER_BITWISE_XOR=9,EG.ORDER_BITWISE_OR=10,EG.ORDER_RELATIONAL=11,EG.ORDER_EQUALITY=11,EG.ORDER_LOGICAL_NOT=12,EG.ORDER_LOGICAL_AND=13,EG.ORDER_LOGICAL_OR=14,EG.ORDER_ASSIGNMENT=14,EG.ORDER_CONDITIONAL=15,EG.ORDER_LAMBDA=16,EG.ORDER_NONE=99,EG.ORDER_OVERRIDES=[[EG.ORDER_FUNCTION_CALL,EG.ORDER_MEMBER],[EG.ORDER_FUNCTION_CALL,EG.ORDER_FUNCTION_CALL],[EG.ORDER_MEMBER,EG.ORDER_MEMBER],[EG.ORDER_MEMBER,EG.ORDER_FUNCTION_CALL]],EG.init=function(){EG.PASS=this.INDENT+"pass\n",EG.definitions_=Object.create(null),EG.functionNames_=Object.create(null),EG.setups_=Object.create(null),EG.loops_=Object.create(null),EG.codeEnd_=Object.create(null),EG.variableDB_?EG.variableDB_.reset():EG.variableDB_=new gt(EG.RESERVED_WORDS_)},EG.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var _=this.definitions_[s];0===s.indexOf("import")?e.push(_):0===s.indexOf("var_declare")?i.push(_):n.push(_)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var o=[];for(var s in EG.functions_)o.push(EG.functions_[s]);o.length&&o.push("\n");var p=[];for(var s in EG.setups_)p.push(EG.setups_[s]);p.length&&p.push("\n");var a=[];for(var s in EG.loops_)a.push(EG.loops_[s]);var u=[];for(var s in EG.codeEnd_)u.push(EG.codeEnd_[s]);0!==u.length&&u.push("\n");let r="";return r=a.length>0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n"),r},EG.scrubNakedValue=function(t){return t+"\n"},EG.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},EG.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},EG.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=mt.utils.string.wrap(_,EG.COMMENT_WRAP-3),n+=EG.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const OG={};OG["MixGo CC"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:Et.Profile.generate(["0-11","18-21"]),input_pin:Et.Profile.generate(["0-11","18-21"]),output_pin:Et.Profile.generate(["0-11","18-21"]),pwm_input:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_input:Et.Profile.generate(["0-5"],"adc","adc"),pwm_output:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_output:Et.Profile.generate(["0-5"],"adc","adc"),espnow_channel:Et.Profile.generate(["1-13"]),haskylens_model:Et.Profile.generate(["0-4"]),digital:Et.Profile.generate(["0-11","18-21"],"pin","pin"),pwm_pin:Et.Profile.generate(["0-11","18-21"]),pwm:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_pin:Et.Profile.generate(["0-5"]),analog:Et.Profile.generate(["0-5"],"adc","adc"),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Et.Profile.generate(["0-4"]),exlcdh:Et.Profile.generate(["0-31"]),exlcdv:Et.Profile.generate(["0-11"]),brightness:Et.Profile.generate(["0-9"]),tts_voice:Et.Profile.generate(["0-16"]),tts_builtin_music:Et.Profile.generate(["0-47"]),tts_bgmusic:Et.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["MUSIC_QUAVERS","onboard_matrix.MUSIC_QUAVERS"],["MUSIC_QUAVER","onboard_matrix.MUSIC_QUAVER"],["MUSIC_CROTCHET","onboard_matrix.MUSIC_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},OG["MixGo ME"]={description:"MicroPython[ESP32C3 MixGo ME]",digital_pin:Et.Profile.generate(["0-11","18-21"]),input_pin:Et.Profile.generate(["0-11","18-21"]),output_pin:Et.Profile.generate(["0-11","18-21"]),pwm_input:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_input:Et.Profile.generate(["0-5"],"adc","adc"),pwm_output:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_output:Et.Profile.generate(["0-5"],"adc","adc"),espnow_channel:Et.Profile.generate(["1-13"]),haskylens_model:Et.Profile.generate(["0-4"]),digital:Et.Profile.generate(["0-11","18-21"],"pin","pin"),pwm_pin:Et.Profile.generate(["0-11","18-21"]),pwm:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_pin:Et.Profile.generate(["0-5"]),analog:Et.Profile.generate(["0-5"],"adc","adc"),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Et.Profile.generate(["0-4"]),exlcdh:Et.Profile.generate(["0-7"]),exlcdv:Et.Profile.generate(["0-4"]),brightness:Et.Profile.generate(["0-9"]),tts_voice:Et.Profile.generate(["0-16"]),tts_builtin_music:Et.Profile.generate(["0-47"]),tts_bgmusic:Et.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["MUSIC_QUAVERS","onboard_matrix.MUSIC_QUAVERS"],["MUSIC_QUAVER","onboard_matrix.MUSIC_QUAVER"],["MUSIC_CROTCHET","onboard_matrix.MUSIC_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},OG["MixGo Car 4.2"]={description:"MicroPython[ESP32]",digital_pin:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["20","20"],["21","21"]],digital:[["pin0","pin0"],["pin1","pin1"],["pin2","pin2"],["pin3","pin3"],["pin4","pin4"],["pin5","pin5"],["pin6","pin6"],["pin7","pin7"],["pin8","pin8"],["pin9","pin9"],["pin10","pin10"],["pin20","pin20"],["pin21","pin21"]],pwm_pin:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["20","20"],["21","21"]],pwm:[["pwm0","pwm0"],["pwm1","pwm1"],["pwm2","pwm2"],["pwm3","pwm3"],["pwm4","pwm4"],["pwm5","pwm5"],["pwm6","pwm6"],["pwm7","pwm7"],["pwm8","pwm8"],["pwm9","pwm9"],["pwm10","pwm10"],["pwm20","pwm20"],["pwm21","pwm21"]],espnow_channel:[["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"]],i2c_A_pin:[["6","6"],["9","9"]],i2c_B_pin:[["7","7"],["10","10"]],spi_A_pin:[["6","6"],["9","9"]],spi_B_pin:[["7","7"],["10","10"]],spi_C_pin:[["9","9"],["20","20"]],spi_D_pin:[["10","10"],["21","21"]],analog_pin:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],analog:[["adc0","adc0"],["adc1","adc1"],["adc2","adc2"],["adc3","adc3"],["adc4","adc4"]],dac_pin:[["25","25"],["26","26"]],dac:[["dac25","dac25"],["dac26","dac26"]],touch:[["tc0","tc0"],["tc2","tc2"],["tc4","tc4"],["tc12","tc12"],["tc13","tc13"],["tc14","tc14"],["tc15","tc15"],["tc27","tc27"],["tc32","tc32"],["tc33","tc33"]],touch_pin:[["0","0"],["2","2"],["4","4"],["12","12"],["13","13"],["14","14"],["15","15"],["27","27"],["32","32"],["33","33"]],button:[["A","button_a"],["B","button_b"]],buttonB:[["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["24","24"],["25","25"],["26","26"],["27","27"],["28","28"],["29","29"],["30","30"],["31","31"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],builtinimg:[["HEART","matrix.Image.HEART"],["HEART_SMALL","matrix.Image.HEART_SMALL"],["HAPPY","matrix.Image.HAPPY"],["SAD","matrix.Image.SAD"],["SMILE","matrix.Image.SMILE"],["SILLY","matrix.Image.SILLY"],["FABULOUS","matrix.Image.FABULOUS"],["SURPRISED","matrix.Image.SURPRISED"],["ASLEEP","matrix.Image.ASLEEP"],["ANGRY","matrix.Image.ANGRY"],["CONFUSED","matrix.Image.CONFUSED"],["NO","matrix.Image.NO"],["YES","matrix.Image.YES"],["LEFT_ARROW","matrix.Image.LEFT_ARROW"],["RIGHT_ARROW","matrix.Image.RIGHT_ARROW"],["DRESS","matrix.Image.DRESS"],["TRANSFORMERS","matrix.Image.TRANSFORMERS"],["SCISSORS","matrix.Image.SCISSORS"],["EXIT","matrix.Image.EXIT"],["TREE","matrix.Image.TREE"],["PACMAN","matrix.Image.PACMAN"],["TARGET","matrix.Image.TARGET"],["TSHIRT","matrix.Image.TSHIRT"],["ROLLERSKATE","matrix.Image.ROLLERSKATE"],["DUCK","matrix.Image.DUCK"],["HOUSE","matrix.Image.HOUSE"],["TORTOISE","matrix.Image.TORTOISE"],["BUTTERFLY","matrix.Image.BUTTERFLY"],["STICKFIGURE","matrix.Image.STICKFIGURE"],["GHOST","matrix.Image.GHOST"],["PITCHFORK","matrix.Image.PITCHFORK"],["MUSIC_QUAVERS","matrix.Image.MUSIC_QUAVERS"],["MUSIC_QUAVER","matrix.Image.MUSIC_QUAVER"],["MUSIC_CROTCHET","matrix.Image.MUSIC_CROTCHET"],["COW","matrix.Image.COW"],["RABBIT","matrix.Image.RABBIT"],["SQUARE_SMALL","matrix.Image.SQUARE_SMALL"],["SQUARE","matrix.Image.SQUARE"],["DIAMOND_SMALL","matrix.Image.DIAMOND_SMALL"],["DIAMOND","matrix.Image.DIAMOND"],["CHESSBOARD","matrix.Image.CHESSBOARD"],["TRIANGLE_LEFT","matrix.Image.TRIANGLE_LEFT"],["TRIANGLE","matrix.Image.TRIANGLE"],["SNAKE","matrix.Image.SNAKE"],["UMBRELLA","matrix.Image.UMBRELLA"],["SKULL","matrix.Image.SKULL"],["GIRAFFE","matrix.Image.GIRAFFE"],["SWORD","matrix.Image.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","music.DADADADUM"],["ENTERTAINER","music.ENTERTAINER"],["PRELUDE","music.PRELUDE"],["ODE","music.ODE"],["NYAN","music.NYAN"],["RINGTONE","music.RINGTONE"],["FUNK","music.FUNK"],["BLUES","music.BLUES"],["BIRTHDAY","music.BIRTHDAY"],["WEDDING","music.WEDDING"],["FUNERAL","music.FUNERAL"],["PUNCHLINE","music.PUNCHLINE"],["PYTHON","music.PYTHON"],["BADDY","music.BADDY"],["CHASE","music.CHASE"],["BA_DING","music.BA_DING"],["WAWAWAWAA","music.WAWAWAWAA"],["JUMP_UP","music.JUMP_UP"],["JUMP_DOWN","music.JUMP_DOWN"],["POWER_UP","music.POWER_UP"],["POWER_DOWN","music.POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},OG["ESP32C3 Generic"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:Et.Profile.generate(["0-11","18-21"]),input_pin:Et.Profile.generate(["0-11","18-21"]),output_pin:Et.Profile.generate(["0-11","18-21"]),pwm_input:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_input:Et.Profile.generate(["0-5"],"adc","adc"),pwm_output:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_output:Et.Profile.generate(["0-5"],"adc","adc"),espnow_channel:Et.Profile.generate(["1-13"]),haskylens_model:Et.Profile.generate(["0-4"]),digital:Et.Profile.generate(["0-11","18-21"],"pin","pin"),pwm_pin:Et.Profile.generate(["0-11","18-21"]),pwm:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_pin:Et.Profile.generate(["0-5"]),analog:Et.Profile.generate(["0-5"],"adc","adc"),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Et.Profile.generate(["0-4"]),exlcdh:Et.Profile.generate(["0-31"]),exlcdv:Et.Profile.generate(["0-11"]),brightness:Et.Profile.generate(["0-9"]),tts_voice:Et.Profile.generate(["0-16"]),tts_builtin_music:Et.Profile.generate(["0-47"]),tts_bgmusic:Et.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]};const RG=OG,cG=20,gG={init:function(){this.setColour(cG),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_HIGH,"HIGH"],[mt.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},CG={init:function(){this.setColour(cG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(mt.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},SG={init:function(){this.setColour(cG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},AG={init:function(){this.setColour(cG),this.appendValueInput("PIN",Number).appendField("DAC"+mt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_TOOLTIP)}},LG={init:function(){this.setColour(cG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_PERIOD_MIL).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_mSecond,"period"],[mt.Msg.MIXLY_uSecond,"period_microseconds"]]),"key"),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_SET_TOOLTIP)}},NG={init:function(){this.setColour(cG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_REF_VOLTAGE+mt.Msg.MIXLY_STAT).appendField(new mt.FieldDropdown([["3.3V","machine.ADC.ATTN_11DB"],["2.2V","machine.ADC.ATTN_6DB"],["1.5V","machine.ADC.ATTN_2_5DB"],["1.2V","machine.ADC.ATTN_0DB"]]),"atten"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_ATTEN_TOOLTIP)}},DG={init:function(){this.setColour(cG),this.appendValueInput("pin").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_TOOLTIP)}},fG={init:function(){this.setColour(20),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_ATTACHINTERRUPT_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[mt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[mt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},FG={init:function(){this.setColour(20),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("pin#"),"PIN_OBJ"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROPYTHON_AS).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_Digital_PINMODEOUT,"machine.Pin.OUT"],[mt.Msg.MIXLY_Digital_PINMODEIN,"machine.Pin.IN"],[mt.Msg.MIXLY_PINMODEPULLUP,"machine.Pin.IN, machine.Pin.PULL_UP"],[mt.Msg.MIXLY_PINMODEPULLDOWN,"machine.Pin.IN, machine.Pin.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)},getVars:function(){return["pin#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},PG={init:function(){this.setColour(cG),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("dac#"),"PIN_OBJ").appendField(mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("DAC"+mt.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_INIT_TOOLTIP)},getVars:function(){return["dac#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},YG={init:function(){this.setColour(cG),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("tc#"),"PIN_OBJ").appendField(mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_INIT_TOOLTIP)},getVars:function(){return["tc#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},vG={init:function(){this.setColour(cG),this.appendValueInput("PIN",Number).appendField("PWM"+mt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_FREQUENCY+mt.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_SET_FREQ_TOOLTIP)}},XG=FG,xG=YG,yG=DG,bG=fG,VG=40,BG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput("").appendField(t).appendField(mt.Msg.MIXLY_TEM_HUM+" AHT21").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key");return{temperature:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[t]}))}},GG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput("").appendField(t).appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" HP203X").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETPRESSURE,"pressure()"],[mt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[mt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},UG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput().appendField(t).appendField(mt.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM),this.setOutput(!0,Number),this.setInputsInline(!0)}},wG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput().appendField(t).appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RFID_READ_CARD_UID),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,Number),this.setInputsInline(!0),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},kG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput().appendField(t).appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,Number),this.setInputsInline(!0),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},HG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput().appendField(t).appendField(mt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(mt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},WG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput().appendField(t).appendField(mt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(mt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(mt.Msg.RETURN_SUCCESS_OR_NOT),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setInputsInline(!0),this.setOutput(!0),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},KG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput().appendField(t).appendField("RFID"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RFID_SCAN_OK,"0"],[mt.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[mt.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,Number),this.setInputsInline(!0),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},JG=230,qG={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital),"PIN"),this.setOutput(!0)}},QG={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},zG={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},jG={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},$G={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},ZG={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},tU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},eU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},iU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},nU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},sU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},_U={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},oU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},pU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},aU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},uU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},rU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog),"PIN"),this.setOutput(!0)}},lU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},dU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.dac),"PIN"),this.setOutput(!0)}},IU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},TU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},MU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},hU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm),"PIN"),this.setOutput(!0)}},mU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},EU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},OU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.touch),"PIN"),this.setOutput(!0)}},RU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},cU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},gU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},CU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.imglist),"PIN"),this.setOutput(!0)}},SU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.playlist),"PIN"),this.setOutput(!0)}},AU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},LU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},NU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},DU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},fU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},FU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},PU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},YU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},vU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},XU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},xU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},yU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.one_more),"PIN"),this.setOutput(!0)}},bU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},VU=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},BU=function(t,e){e.definitions_.import_machine="import machine";var i="";return i+=e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value("+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},GU=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},UU=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".write("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},wU=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=e.valueToCode(this,"NUM",e.ORDER_ATOMIC);return i+".set_analog_"+this.getFieldValue("key")+"("+n+")\n"},kU=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},HU=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=this.getFieldValue("mode");return"machine.Pin("+i+").irq(handler = "+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+", trigger = "+n+")\n"},WU=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"pin#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),s=this.getFieldValue("MODE");return("pin#"==i?"pin"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.Pin("+n+", "+s+")\n"},KU=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"dac#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("dac#"==i?"dac"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.DAC(machine.Pin("+n+"))\n"},JU=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},qU=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"tc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("tc#"==i?"tc"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.TouchPad(machine.Pin("+n+"))\n"},QU=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_g1="import me_g1",["me_g1.ext_ahtx0."+i+"()",e.ORDER_ATOMIC]},zU=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_g1="import me_g1",["me_g1.ext_hp203x."+i,e.ORDER_ATOMIC]},jU=function(t,e){e.definitions_.import_me_g1="import me_g1";return["me_g1.varistor()",e.ORDER_ATOMIC]},$U=function(t,e){e.definitions_.import_me_g1="import me_g1";return['me_g1.ext_rc522.read_card(0, x="id")',e.ORDER_ATOMIC]},ZU=function(t,e){var i=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC);return e.definitions_.import_me_g1="import me_g1",["me_g1.ext_rc522.read_card("+i+")",e.ORDER_ATOMIC]},tw=function(t,e){var i=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),n=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC);return e.definitions_.import_me_g1="import me_g1","me_g1.ext_rc522.write_card("+n+","+i+")\n"},ew=function(t,e){var i=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),n=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC);return e.definitions_.import_me_g1="import me_g1",["me_g1.ext_rc522.write_card("+n+","+i+")",e.ORDER_ATOMIC]},iw=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_g1="import me_g1",["me_g1.ext_rc522.scan_card()=="+i,e.ORDER_ATOMIC]},nw=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},sw=nw,_w=nw,ow=nw,pw=nw,aw=nw,uw=nw,rw=nw,lw=nw,dw=nw,Iw=nw,Tw=nw,Mw=nw,hw=nw,mw=nw,Ew=nw,Ow=nw,Rw=nw,cw=nw,gw=nw,Cw=nw,Sw=nw,Aw=nw,Lw=nw,Nw=nw,Dw=nw,fw=nw,Fw=nw,Pw=nw,Yw=nw,vw=nw,Xw=nw,xw=nw,yw=nw,bw=nw,Vw=nw,Bw=nw,Gw=nw,Uw=nw,ww=nw,kw=nw,Hw=nw,Ww=nw,Kw=nw,Jw=nw;Object.assign(mt.Variables,Rt),Object.assign(mt.Procedures,Yu),mt.Python=vu,mt.generator=vu,Et.Profile.default={},Object.assign(Et.Profile,RG),Object.assign(Et.Profile.default,RG["MixGo CC"]),Object.assign(mt.Blocks,e,i,n,s,_,o,p,a,u,r,l,d,I,V,H,k,X,B,W,f,w,U,G,F,D,N,y,x,b,P,Y,v,lt,dt,It),Object.assign(mt.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,nt,ut,at,Z,st,rt,q,pt,ot,_t,Q,J,K,et,tt,it,z,j,$,Tt,Mt,ht)})(); \ No newline at end of file diff --git a/boards/default/micropython_esp32c3/main.bundle.7e6a4505.js b/boards/default/micropython_esp32c3/main.bundle.7e6a4505.js new file mode 100644 index 00000000..3c778650 --- /dev/null +++ b/boards/default/micropython_esp32c3/main.bundle.7e6a4505.js @@ -0,0 +1,21 @@ +(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>Dt,controls_typeLists:()=>ft,lists_zip:()=>Ft,lists_zip_container:()=>Pt,lists_zip_item:()=>Yt,unpack_iterable_object:()=>vt,variables_change:()=>Lt,variables_get:()=>St,variables_global:()=>Nt,variables_set:()=>At});var i={};t.r(i),t.d(i,{base_setup:()=>yt,controls_delay:()=>bt,controls_end_program:()=>Vt,controls_except:()=>jt,controls_finally:()=>$t,controls_flow_statements:()=>Ht,controls_for:()=>Wt,controls_forEach:()=>Ut,controls_for_range:()=>Kt,controls_if:()=>Bt,controls_if_else:()=>Qt,controls_if_elseif:()=>qt,controls_if_if:()=>Jt,controls_lambda:()=>te,controls_main:()=>xt,controls_pass:()=>ee,controls_range:()=>Gt,controls_repeat_ext:()=>Zt,controls_thread:()=>ie,controls_try:()=>zt,controls_try_finally:()=>kt,controls_whileUntil:()=>wt,datetime_fromtimestamp:()=>ae,do_while:()=>ne,garbage_collection:()=>se,gene_unique_identifier:()=>ue,get_mem_alloc:()=>_e,get_mem_free:()=>oe,get_unique_identifier:()=>pe});var n={};t.r(n),t.d(n,{base_map:()=>Fe,generate_cartesian_product:()=>Ye,math_arithmetic:()=>Te,math_bit:()=>he,math_constant:()=>de,math_constant_mp:()=>Ie,math_constrain:()=>Ce,math_dec:()=>Ee,math_degree_to_radian:()=>Xe,math_indexer_number:()=>Ae,math_map:()=>Se,math_max_min:()=>Re,math_number:()=>le,math_number_base_conversion:()=>ce,math_radian_to_degree:()=>ve,math_random:()=>ge,math_random_seed:()=>Le,math_round:()=>Ne,math_selfcalcu:()=>Me,math_to_int:()=>Oe,math_trig:()=>me,text_to_number:()=>De,text_to_number_skulpt:()=>fe,turn_to_int:()=>Pe});var s={};t.r(s),t.d(s,{ascii_to_char:()=>Ge,char_to_ascii:()=>Ue,number_to_text:()=>we,os_system:()=>Ii,text:()=>ye,text_capital:()=>je,text_center:()=>$e,text_char:()=>Ve,text_char_at:()=>We,text_char_at2:()=>He,text_char_at3:()=>ui,text_compareTo:()=>ai,text_compare_to:()=>ze,text_create_with_container:()=>_i,text_create_with_item:()=>oi,text_encode:()=>li,text_equals_starts_ends:()=>Qe,text_eval:()=>di,text_find:()=>Ze,text_format:()=>si,text_format_noreturn:()=>ri,text_join:()=>Be,text_join_seq:()=>ti,text_length:()=>ke,text_random_char:()=>Ke,text_replace:()=>ei,text_split:()=>ii,text_strip:()=>ni,text_substring:()=>qe,text_substring2:()=>Je,text_substring3:()=>pi,text_textarea:()=>be});var _={};t.r(_),t.d(_,{ENUMERATE:()=>Qi,content_in_lists:()=>ji,enumerate:()=>zi,list_many_input:()=>yi,list_tolist:()=>Gi,list_tolist2:()=>qi,list_trig:()=>vi,lists_2d_get_col_row_data:()=>Ei,lists_2d_get_data_with_col_row:()=>mi,lists_append_extend:()=>Si,lists_change_to:()=>xi,lists_change_to_general:()=>Vi,lists_clear:()=>fi,lists_create_with:()=>Oi,lists_create_with2:()=>Ui,lists_create_with_container:()=>ci,lists_create_with_item:()=>gi,lists_create_with_noreturn:()=>bi,lists_create_with_text:()=>Ri,lists_create_with_text2:()=>wi,lists_del_general:()=>Bi,lists_find:()=>Yi,lists_getIndex3:()=>ki,lists_getSublist3:()=>Hi,lists_get_index:()=>Mi,lists_get_random_item:()=>Ai,lists_get_random_sublist:()=>Li,lists_get_sublist:()=>hi,lists_insert_value:()=>Ni,lists_insert_value2:()=>Ki,lists_pop:()=>Pi,lists_remove_at:()=>Fi,lists_remove_at2:()=>Ji,lists_reverse:()=>Di,lists_setIndex3:()=>Wi,lists_set_index:()=>Ci,lists_sort:()=>Xi});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>Tn,dicts_add_or_change:()=>on,dicts_clear:()=>un,dicts_create_with:()=>Zi,dicts_create_with_container:()=>tn,dicts_create_with_item:()=>en,dicts_create_with_noreturn:()=>mn,dicts_deldict:()=>In,dicts_delete:()=>pn,dicts_get:()=>sn,dicts_get_default:()=>_n,dicts_items:()=>rn,dicts_keys:()=>nn,dicts_length:()=>dn,dicts_pop:()=>Mn,dicts_setdefault:()=>hn,dicts_to_json:()=>On,dicts_to_json2:()=>gn,dicts_to_to:()=>cn,dicts_todict:()=>En,dicts_update:()=>an,dicts_values:()=>ln,json_to_dicts:()=>Rn});var p={};t.r(p),t.d(p,{logic_boolean:()=>Dn,logic_compare:()=>Sn,logic_compare_continous:()=>An,logic_is:()=>Yn,logic_is_in:()=>Pn,logic_negate:()=>Nn,logic_null:()=>fn,logic_operation:()=>Ln,logic_tobool:()=>vn,logic_true_or_false:()=>Fn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>is,sdcard_use_spi_init:()=>es,storage_can_write_ornot:()=>wn,storage_change_dir:()=>Zn,storage_close_file:()=>Hn,storage_delete_file:()=>Kn,storage_file_seek:()=>Qn,storage_file_tell:()=>qn,storage_file_write:()=>Vn,storage_fileopen:()=>xn,storage_fileopen_new:()=>yn,storage_fileopen_new_encoding:()=>bn,storage_get_a_line:()=>Un,storage_get_contents:()=>Gn,storage_get_contents_without_para:()=>Bn,storage_get_current_dir:()=>zn,storage_get_file_size:()=>Jn,storage_get_filename:()=>kn,storage_is_file:()=>ts,storage_list_all_files:()=>Wn,storage_make_dir:()=>jn,storage_open_file_with_os:()=>Xn,storage_rename:()=>$n});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>ps,procedures_callreturn:()=>as,procedures_defnoreturn:()=>ns,procedures_defreturn:()=>ss,procedures_ifreturn:()=>us,procedures_mutatorarg:()=>os,procedures_mutatorcontainer:()=>_s,procedures_return:()=>rs});var r={};t.r(r),t.d(r,{tuple_change_to:()=>gs,tuple_create_with:()=>ds,tuple_create_with_container:()=>Is,tuple_create_with_item:()=>Ts,tuple_create_with_noreturn:()=>Ls,tuple_create_with_text2:()=>Ms,tuple_create_with_text_return:()=>hs,tuple_del:()=>Os,tuple_find:()=>Cs,tuple_getIndex:()=>ms,tuple_getSublist:()=>As,tuple_get_random_item:()=>Ds,tuple_get_sublist:()=>Ns,tuple_input:()=>Fs,tuple_join:()=>Rs,tuple_length:()=>Es,tuple_max:()=>cs,tuple_totuple:()=>fs,tuple_trig:()=>Ss});var l={};t.r(l),t.d(l,{set_add_discard:()=>Gs,set_clear:()=>bs,set_create_with:()=>Ys,set_create_with_container:()=>vs,set_create_with_item:()=>Xs,set_create_with_text_return:()=>ks,set_length:()=>xs,set_operate:()=>Vs,set_operate_update:()=>Bs,set_pop:()=>ys,set_sub:()=>Us,set_toset:()=>Hs,set_update:()=>ws});var d={};t.r(d),t.d(d,{html_content:()=>Qs,html_content_more:()=>zs,html_document:()=>Ks,html_form:()=>$s,html_head_body:()=>qs,html_style:()=>js,html_style_color:()=>t_,html_style_content:()=>Zs,html_text:()=>e_,html_title:()=>Js});var I={};t.r(I),t.d(I,{attribute_access:()=>M_,function_call:()=>d_,function_call_container:()=>I_,function_call_item:()=>T_,raw_block:()=>s_,raw_empty:()=>o_,raw_expression:()=>__,raw_table:()=>n_,text_comment:()=>p_,text_print_multiple:()=>u_,text_print_multiple_container:()=>r_,text_print_multiple_item:()=>l_,type_check:()=>a_});var T={};t.r(T),t.d(T,{controls_type:()=>R_,controls_typeLists:()=>c_,lists_zip:()=>g_,unpack_iterable_object:()=>C_,variables_change:()=>E_,variables_get:()=>h_,variables_global:()=>O_,variables_set:()=>m_});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>v_,base_setup:()=>A_,controls_delay:()=>Y_,controls_flow_statements:()=>P_,controls_for:()=>D_,controls_forEach:()=>V_,controls_for_range:()=>f_,controls_if:()=>L_,controls_interrupts:()=>y_,controls_lambda:()=>G_,controls_main:()=>S_,controls_millis:()=>X_,controls_nointerrupts:()=>b_,controls_pass:()=>w_,controls_range:()=>B_,controls_repeat:()=>z_,controls_repeat_ext:()=>W_,controls_thread:()=>k_,controls_try_finally:()=>N_,controls_whileUntil:()=>F_,datetime_fromtimestamp:()=>j_,do_while:()=>H_,garbage_collection:()=>K_,gene_unique_identifier:()=>$_,get_mem_alloc:()=>J_,get_mem_free:()=>q_,get_unique_identifier:()=>Q_,reset:()=>x_,time_sleep:()=>U_});var h={};t.r(h),t.d(h,{base_map:()=>Ro,generate_cartesian_product:()=>go,math_arithmetic:()=>no,math_bit:()=>io,math_constant:()=>to,math_constant_mp:()=>eo,math_constrain:()=>Io,math_dec:()=>po,math_degree_to_radian:()=>So,math_indexer_number:()=>ho,math_map:()=>lo,math_max_min:()=>uo,math_number:()=>Z_,math_number_base_conversion:()=>To,math_radian_to_degree:()=>Co,math_random:()=>ro,math_random_seed:()=>Mo,math_round:()=>mo,math_selfcalcu:()=>so,math_single:()=>_o,math_to_int:()=>ao,math_trig:()=>oo,text_to_number:()=>Eo,text_to_number_skulpt:()=>Oo,turn_to_int:()=>co});var m={};t.r(m),t.d(m,{ascii_to_char:()=>fo,char_to_ascii:()=>Fo,number_to_text:()=>Po,os_system:()=>tp,text:()=>Ao,text_capital:()=>Go,text_center:()=>Uo,text_char:()=>No,text_char_at:()=>Xo,text_char_at2:()=>vo,text_char_at3:()=>jo,text_compareTo:()=>zo,text_compare_to:()=>bo,text_encode:()=>$o,text_equals_starts_ends:()=>yo,text_eval:()=>Zo,text_find:()=>wo,text_format:()=>Jo,text_format_noreturn:()=>qo,text_join:()=>Do,text_join_seq:()=>ko,text_length:()=>Yo,text_random_char:()=>xo,text_replace:()=>Ho,text_split:()=>Wo,text_strip:()=>Ko,text_substring:()=>Bo,text_substring2:()=>Vo,text_substring3:()=>Qo,text_textarea:()=>Lo});var E={};t.r(E),t.d(E,{content_in_lists:()=>Xp,enumerate:()=>vp,list_many_input:()=>Rp,list_tolist:()=>Pp,list_tolist2:()=>Yp,list_trig:()=>mp,lists_2d_get_col_row_data:()=>np,lists_2d_get_data_with_col_row:()=>ip,lists_append_extend:()=>ap,lists_change_to:()=>Op,lists_change_to_general:()=>gp,lists_clear:()=>Ip,lists_create_with:()=>sp,lists_create_with2:()=>Sp,lists_create_with_noreturn:()=>cp,lists_create_with_text:()=>_p,lists_create_with_text2:()=>Ap,lists_del_general:()=>Cp,lists_find:()=>Tp,lists_getIndex3:()=>Lp,lists_getSublist3:()=>Np,lists_get_index:()=>op,lists_get_random_item:()=>up,lists_get_random_sublist:()=>rp,lists_get_sublist:()=>ep,lists_insert_value:()=>lp,lists_insert_value2:()=>fp,lists_pop:()=>hp,lists_remove_at:()=>Mp,lists_remove_at2:()=>Fp,lists_reverse:()=>dp,lists_setIndex3:()=>Dp,lists_set_index:()=>pp,lists_sort:()=>Ep});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Jp,dicts_add_or_change:()=>Bp,dicts_clear:()=>wp,dicts_create_with:()=>xp,dicts_create_with_noreturn:()=>zp,dicts_deldict:()=>Kp,dicts_delete:()=>Gp,dicts_get:()=>bp,dicts_get_default:()=>Vp,dicts_items:()=>kp,dicts_keys:()=>yp,dicts_length:()=>Wp,dicts_pop:()=>qp,dicts_setdefault:()=>Qp,dicts_to_json:()=>$p,dicts_to_json2:()=>ea,dicts_to_to:()=>ta,dicts_todict:()=>jp,dicts_update:()=>Up,dicts_values:()=>Hp,json_to_dicts:()=>Zp});var R={};t.r(R),t.d(R,{logic_boolean:()=>oa,logic_compare:()=>ia,logic_compare_continous:()=>na,logic_is:()=>ra,logic_is_in:()=>ua,logic_negate:()=>_a,logic_null:()=>pa,logic_operation:()=>sa,logic_tobool:()=>la,logic_true_or_false:()=>aa});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Xa,sdcard_use_spi_init:()=>va,storage_can_write_ornot:()=>Ra,storage_change_dir:()=>Da,storage_close_file:()=>ga,storage_delete_file:()=>Sa,storage_file_seek:()=>Na,storage_file_tell:()=>La,storage_file_write:()=>ha,storage_fileopen:()=>Ia,storage_fileopen_new:()=>Ta,storage_fileopen_new_encoding:()=>Ma,storage_get_a_line:()=>Oa,storage_get_contents:()=>Ea,storage_get_contents_without_para:()=>ma,storage_get_current_dir:()=>fa,storage_get_file_size:()=>Aa,storage_get_filename:()=>ca,storage_is_file:()=>Ya,storage_list_all_files:()=>Ca,storage_make_dir:()=>Fa,storage_open_file_with_os:()=>da,storage_rename:()=>Pa});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Va,procedures_callreturn:()=>ba,procedures_defnoreturn:()=>ya,procedures_defreturn:()=>xa,procedures_ifreturn:()=>Ba,procedures_return:()=>Ga});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Qa,tuple_create_with:()=>Ua,tuple_create_with_noreturn:()=>Za,tuple_create_with_text2:()=>wa,tuple_create_with_text_return:()=>ka,tuple_del:()=>Ka,tuple_find:()=>za,tuple_getIndex:()=>Ha,tuple_getSublist:()=>$a,tuple_get_random_item:()=>eu,tuple_get_sublist:()=>tu,tuple_input:()=>nu,tuple_join:()=>Ja,tuple_length:()=>Wa,tuple_max:()=>qa,tuple_totuple:()=>iu,tuple_trig:()=>ja});var S={};t.r(S),t.d(S,{set_add_discard:()=>ru,set_clear:()=>pu,set_create_with:()=>su,set_create_with_text_return:()=>Iu,set_length:()=>_u,set_operate:()=>au,set_operate_update:()=>uu,set_pop:()=>ou,set_sub:()=>lu,set_toset:()=>Tu,set_update:()=>du});var A={};t.r(A),t.d(A,{html_content:()=>Eu,html_content_more:()=>Ou,html_document:()=>Mu,html_form:()=>cu,html_head_body:()=>mu,html_style:()=>Ru,html_style_content:()=>gu,html_text:()=>Cu,html_title:()=>hu});var L={};t.r(L),t.d(L,{attribute_access:()=>Fu,function_call:()=>fu,raw_block:()=>Su,raw_empty:()=>Lu,raw_expression:()=>Au,raw_table:()=>Nu,type_check:()=>Du});var N={};t.r(N),t.d(N,{PIN_init:()=>xr,actuator_extern_get_led_bright:()=>Hu,actuator_extern_get_led_state:()=>Wu,actuator_extern_led_bright:()=>ku,actuator_extern_led_brightness:()=>Ku,actuator_ms32006_dcmotor:()=>er,actuator_ms32006_init:()=>tr,actuator_ms32006_stepper:()=>ir,actuator_neopixel_init:()=>nr,actuator_neopixel_rgb:()=>sr,actuator_neopixel_rgb_all:()=>_r,actuator_neopixel_rgb_show_all_chase:()=>ar,actuator_neopixel_rgb_show_all_rainbow:()=>pr,actuator_neopixel_write:()=>or,actuator_use_uart_init:()=>ur,esp32_music_get_tempo_extern:()=>Gu,esp32_music_pitch:()=>yu,esp32_music_pitch_init:()=>xu,esp32_music_pitch_with_time:()=>bu,esp32_music_play_list:()=>Vu,esp32_music_reset_extern:()=>Uu,esp32_music_set_tempo_extern:()=>Bu,esp32_music_stop:()=>wu,mixbot_actuator_extern_get_addr:()=>vr,mixbot_actuator_extern_set_addr:()=>Xr,mixbot_addr_extern:()=>Rr,parrot_PIN_init:()=>Br,parrot_move_speed:()=>Gr,pin_led_bright:()=>yr,player_insert_music:()=>Mr,player_play_music:()=>Tr,player_set_mode:()=>Ir,player_set_play:()=>lr,player_set_volume:()=>dr,player_whether_stop:()=>rr,robot_led_extern:()=>Sr,robot_led_extern_get_value:()=>Ar,robot_motor_extern:()=>cr,robot_motor_extern_get_speed:()=>gr,robot_servo_extern_absolute_run:()=>fr,robot_servo_extern_get_status:()=>Lr,robot_servo_extern_relative_continue:()=>Yr,robot_servo_extern_relative_origin:()=>Fr,robot_servo_extern_relative_run:()=>Pr,robot_servo_extern_stop:()=>Dr,robot_servo_extern_stop_mode:()=>Nr,robot_traffic_light_extern:()=>Cr,servo_PIN_init:()=>br,servo_get_angle:()=>$u,servo_get_speed:()=>Zu,servo_init:()=>Ju,servo_move:()=>qu,servo_move_angle:()=>Vr,servo_set_angle:()=>zu,servo_set_speed:()=>ju,servo_speed_360:()=>Qu,syn6288_builtin_voice:()=>Er,syn6288_get_voice:()=>mr,syn6288_set_voice:()=>hr,syn6288_tts_play:()=>Or});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>El,actuator_dc_motor_stop:()=>Ol,actuator_get_led_bright:()=>Wr,actuator_get_led_state:()=>Kr,actuator_led_bright:()=>Hr,actuator_led_brightness:()=>Jr,actuator_mixbot_buzzer_on_off:()=>Sl,actuator_mixgo_nova_mic_get:()=>fl,actuator_mixgo_nova_mic_set:()=>Dl,actuator_mixgo_nova_onboard_music_pitch:()=>xl,actuator_mixgo_nova_onboard_music_stop:()=>yl,actuator_mixgo_nova_play_audio:()=>vl,actuator_mixgo_nova_play_online_audio:()=>Xl,actuator_mixgo_nova_record_audio:()=>Yl,actuator_mixgo_nova_voice_get:()=>Pl,actuator_mixgo_nova_voice_set:()=>Fl,actuator_mixgo_zero_led_color:()=>qr,actuator_onboard_neopixel_rgb:()=>tl,actuator_onboard_neopixel_rgb_all:()=>el,actuator_onboard_neopixel_rgb_show_all_chase:()=>nl,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>il,actuator_onboard_neopixel_write:()=>sl,actuator_rm_onboard_neopixel_rgb:()=>_l,actuator_rm_onboard_neopixel_rgb_all:()=>ol,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>pl,actuator_stepper_keep:()=>hl,actuator_stepper_stop:()=>ml,analog_ble_keyboard_init:()=>Ql,analog_ble_keyboard_input:()=>$l,analog_ble_keyboard_mouse_init:()=>od,analog_ble_keyboard_mouse_input:()=>rd,analog_ble_keyboard_mouse_send_battery:()=>ud,analog_ble_keyboard_mouse_str:()=>ld,analog_ble_keyboard_send_battery:()=>td,analog_ble_keyboard_str:()=>Zl,analog_ble_mouse_init:()=>ed,analog_ble_mouse_input:()=>sd,analog_ble_mouse_keyboard_input:()=>dd,analog_ble_mouse_send_battery:()=>_d,analog_keyboard_input:()=>Gl,analog_keyboard_str:()=>ql,analog_mouse_input:()=>Kl,bitbot_motor:()=>Nl,bitbot_move:()=>Al,bitbot_stop:()=>Ll,ble_keyboard_connect:()=>jl,ble_keyboard_get_mac:()=>zl,ble_keyboard_mouse_connect:()=>ad,ble_keyboard_mouse_get_mac:()=>pd,ble_mouse_connect:()=>nd,ble_mouse_get_mac:()=>id,cc_number:()=>Zr,educore_ble_keyboard_input:()=>gd,educore_ble_sensor_connected:()=>cd,educore_ble_sensor_init:()=>Rd,educore_buzzer:()=>Id,educore_buzzer_play_tone:()=>Td,educore_buzzer_play_tone_time:()=>Md,educore_buzzer_stop:()=>hd,educore_neopixel_clear:()=>Od,educore_neopixel_rgb:()=>Ed,educore_rgb_light:()=>md,esp32_music_get_tempo:()=>ul,esp32_music_reset:()=>rl,esp32_music_set_tempo:()=>al,esp32_onboard_music_pitch:()=>ll,esp32_onboard_music_pitch_with_time:()=>dl,esp32_onboard_music_play_list:()=>Tl,esp32_onboard_music_stop:()=>Il,general_key:()=>wl,general_key_tuple:()=>kl,generalkey_container:()=>Hl,generalkey_create_with_item:()=>Wl,get_keyboard_light:()=>Cd,get_power_output:()=>Vl,ledswitch:()=>kr,mixbot_motor:()=>Cl,mixbot_motor_status:()=>Rl,mixbot_move:()=>cl,mixbot_stop:()=>gl,mouse_key:()=>Jl,number:()=>wr,rm_actuator_get_led_bright:()=>zr,rm_actuator_get_led_state:()=>jr,rm_actuator_led_bright:()=>Qr,rm_actuator_led_brightness:()=>$r,rm_motor:()=>Ml,set_all_power_output:()=>Bl,set_power_output:()=>bl,special_key:()=>Ul});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>nI,ai_sensor_ailocal_class:()=>Kd,ai_sensor_ailocal_class_result:()=>Jd,ai_sensor_ailocal_train:()=>Wd,ai_sensor_asr_recognize:()=>$d,ai_sensor_audio_play:()=>Qd,ai_sensor_audio_record:()=>qd,ai_sensor_barcode:()=>Pd,ai_sensor_circle:()=>bd,ai_sensor_classifier_faces:()=>iI,ai_sensor_color:()=>Ud,ai_sensor_color_chases:()=>Hd,ai_sensor_color_chases_result:()=>kd,ai_sensor_config:()=>fd,ai_sensor_face:()=>eI,ai_sensor_find_20objects:()=>sI,ai_sensor_find_barcodes:()=>Yd,ai_sensor_find_circles:()=>Vd,ai_sensor_find_colors:()=>wd,ai_sensor_find_licenseplates:()=>tI,ai_sensor_find_lines:()=>yd,ai_sensor_find_qrcodes:()=>Dd,ai_sensor_find_rects:()=>Gd,ai_sensor_find_tags:()=>Xd,ai_sensor_licenseplate:()=>Zd,ai_sensor_line:()=>xd,ai_sensor_qrcode:()=>Ld,ai_sensor_qrcode_lite:()=>Nd,ai_sensor_rect:()=>Bd,ai_sensor_rgb:()=>Fd,ai_sensor_tag:()=>vd,ai_sensor_use_uart_init:()=>Ad,ai_sensor_yolo_recognize:()=>zd,ai_sensor_yolo_recognize_result:()=>jd});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>pI,MICROPYTHON_AI_Speech_unit:()=>oI,MICROPYTHON_AI_client:()=>_I});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>gI,mpython_blynk_app_notify:()=>MI,mpython_blynk_email:()=>EI,mpython_blynk_get_timers:()=>OI,mpython_blynk_on_connected:()=>dI,mpython_blynk_on_disconnected:()=>lI,mpython_blynk_run:()=>TI,mpython_blynk_sensor_data_to_app:()=>cI,mpython_blynk_set_property:()=>mI,mpython_blynk_setup:()=>CI,mpython_blynk_stop_timers:()=>hI,mpython_blynk_sync_virtual:()=>rI,mpython_blynk_terminal_widget_vpin:()=>uI,mpython_blynktimer:()=>RI,mpython_blynktimer_run:()=>II});var Y={};t.r(Y),t.d(Y,{cc_g1_init:()=>SI,cc_g1_read_bat:()=>AI,cc_g1_read_joystick:()=>LI,cc_g1_read_key:()=>NI,cc_g1_turnoff:()=>DI});var v={};t.r(v),t.d(v,{ce_go_dc_motor:()=>bI,ce_go_get_led_bright:()=>YI,ce_go_get_led_state:()=>vI,ce_go_hall_attachInterrupt:()=>VI,ce_go_hall_data:()=>GI,ce_go_hall_initialize:()=>BI,ce_go_led_bright:()=>PI,ce_go_led_brightness:()=>XI,ce_go_light_number:()=>FI,ce_go_pin_light:()=>WI,ce_go_pin_near:()=>wI,ce_go_pin_near_line:()=>UI,ce_go_pin_near_state_change:()=>kI,ce_go_stepper_keep:()=>xI,ce_go_stepper_stop:()=>yI,educore_car:()=>KI,educore_car_pin_near:()=>zI,educore_car_pin_near_line:()=>QI,educore_car_stepper_keep:()=>JI,educore_car_stepper_stop:()=>qI,sensor_mixgome_eulerangles:()=>HI});var X={};t.r(X),t.d(X,{communicate_bluetooth_central_init:()=>YT,communicate_bluetooth_connect:()=>yT,communicate_bluetooth_disconnect:()=>bT,communicate_bluetooth_handle:()=>wT,communicate_bluetooth_is_connected:()=>BT,communicate_bluetooth_mac:()=>xT,communicate_bluetooth_peripheral_init:()=>vT,communicate_bluetooth_recv:()=>GT,communicate_bluetooth_recv_only:()=>UT,communicate_bluetooth_scan:()=>XT,communicate_bluetooth_send:()=>VT,communicate_espnow_init:()=>kT,communicate_espnow_init_new:()=>HT,communicate_i2c_available:()=>TT,communicate_i2c_init:()=>tT,communicate_i2c_master_read:()=>IT,communicate_i2c_onboard:()=>$I,communicate_i2c_read:()=>eT,communicate_i2c_scan:()=>nT,communicate_i2c_write:()=>iT,communicate_ir_recv_init:()=>gT,communicate_ir_send_init:()=>NT,communicate_ow_init:()=>hT,communicate_ow_read:()=>ET,communicate_ow_reset:()=>cT,communicate_ow_scan:()=>mT,communicate_ow_select:()=>RT,communicate_ow_write:()=>OT,communicate_spi_buffer:()=>oT,communicate_spi_init:()=>sT,communicate_spi_onboard:()=>ZI,communicate_spi_read:()=>pT,communicate_spi_read_output:()=>aT,communicate_spi_readinto:()=>uT,communicate_spi_readinto_output:()=>rT,communicate_spi_set:()=>_T,communicate_spi_write:()=>lT,communicate_spi_write_readinto:()=>dT,espnow_radio_channel:()=>zT,espnow_radio_channel_new:()=>$T,espnow_radio_on_off:()=>ZT,espnow_radio_rec:()=>eM,espnow_radio_recv:()=>nM,espnow_radio_recv_certain_msg:()=>sM,espnow_radio_recv_certain_msg_new:()=>oM,espnow_radio_recv_msg:()=>iM,espnow_radio_recv_new:()=>_M,espnow_radio_send:()=>tM,espnow_radio_txpower:()=>jT,i2c_available:()=>DM,i2c_init:()=>TM,i2c_master_reader2:()=>NM,i2c_read:()=>MM,i2c_scan:()=>mM,i2c_slave_onreceive:()=>MT,i2c_write:()=>hM,internal_variable:()=>CT,ir_recv_timeout:()=>LT,ir_transmit_busy:()=>PT,ir_transmit_conventional_data:()=>DT,ir_transmit_raw_code:()=>FT,ir_transmit_study_code:()=>fT,ir_whether_recv:()=>AT,lora_init:()=>pM,lora_packet:()=>aM,lora_recv:()=>rM,lora_send:()=>uM,network_espnow_info:()=>KT,network_espnow_mac:()=>WT,network_espnow_recv:()=>JT,network_espnow_recv_handle:()=>QT,network_espnow_send:()=>qT,recv_fun:()=>ST,spi_buffer:()=>RM,spi_init:()=>EM,spi_read:()=>cM,spi_read_output:()=>gM,spi_readinto:()=>CM,spi_readinto_output:()=>SM,spi_set:()=>OM,spi_write:()=>AM,spi_write_readinto:()=>LM,urequests_attribute:()=>dM,urequests_get:()=>lM,urequests_method:()=>IM});var x={};t.r(x),t.d(x,{display_animate:()=>oh,display_blink_rate:()=>ih,display_circle:()=>ph,display_color_seclet:()=>Oh,display_draw_4strings:()=>zM,display_fill:()=>_h,display_get_screen_image:()=>eh,display_help:()=>uh,display_image_size:()=>jM,display_lcd_use_i2c_init:()=>Ah,display_line:()=>ZM,display_line_arbitrarily:()=>th,display_matrix_extern_bright_point:()=>wM,display_matrix_extern_bright_screen:()=>HM,display_matrix_extern_clear:()=>WM,display_matrix_extern_get_pixel:()=>UM,display_matrix_extern_get_screen_pixel:()=>kM,display_matrix_extern_image_builtins:()=>KM,display_matrix_extern_scroll_string:()=>yM,display_matrix_extern_scroll_string_delay:()=>bM,display_matrix_extern_shift:()=>GM,display_matrix_extern_show_frame_string:()=>VM,display_matrix_extern_show_frame_string_delay:()=>BM,display_matrix_extern_show_image:()=>XM,display_matrix_extern_show_image_or_string_delay:()=>xM,display_matrix_use_i2c_init:()=>vM,display_oled_drawPixel:()=>lh,display_oled_showBitmap:()=>rh,display_oled_use_i2c_init:()=>Fh,display_onoff:()=>sh,display_rect:()=>$M,display_rgb_color:()=>nh,display_tm1650_power:()=>Ih,display_tm1650_set_brightness:()=>hh,display_tm1650_show_dot:()=>Mh,display_tm1650_show_num:()=>Th,display_tm_use_i2c_init:()=>dh,display_triangle:()=>ah,display_use_i2c_init:()=>QM,extern_oled_bright_point:()=>Uh,extern_oled_clear:()=>wh,extern_oled_get_pixel:()=>Gh,extern_oled_hvline:()=>Hh,extern_oled_line:()=>Wh,extern_oled_scroll_string:()=>xh,extern_oled_scroll_string_delay:()=>yh,extern_oled_shape_rect:()=>kh,extern_oled_shift:()=>Bh,extern_oled_show_frame_string:()=>bh,extern_oled_show_frame_string_delay:()=>Vh,extern_oled_show_image:()=>Ph,extern_oled_show_image_or_string_delay:()=>Xh,extern_oled_show_image_xy:()=>Yh,extern_oled_show_string:()=>vh,lcd_backlight:()=>Dh,lcd_clear:()=>fh,lcd_print_string:()=>Nh,lcd_show_image_or_string_delay:()=>Lh,matrix_extern_image_arithmetic:()=>JM,matrix_extern_image_invert:()=>qM,tft_fill:()=>Ch,tft_line_arbitrarily:()=>Sh,tft_scroll_string_delay:()=>ch,tft_show_frame_string_delay:()=>gh,tft_show_image_or_string_delay:()=>Rh,tft_show_image_xy:()=>Eh,tft_use_spi_init:()=>mh});var y={};t.r(y),t.d(y,{bitbot_display_bitmap_create:()=>Vm,bitbot_display_image_create:()=>bm,display_available:()=>dm,display_bitmap_create:()=>em,display_bright_point:()=>am,display_bright_screen:()=>rm,display_clear:()=>lm,display_get_pixel:()=>pm,display_get_screen_pixel:()=>um,display_image_builtins:()=>im,display_image_builtins_all:()=>nm,display_image_create:()=>tm,display_scroll_string:()=>Qh,display_scroll_string_delay:()=>zh,display_shift:()=>om,display_show_frame_string:()=>$h,display_show_frame_string_delay:()=>Zh,display_show_image:()=>Jh,display_show_image_or_string_delay:()=>qh,draw_pointer:()=>eE,image_arithmetic:()=>sm,image_invert:()=>_m,mixbot_display_bitmap_create:()=>Ym,mixbot_display_bright_screen:()=>xm,mixbot_display_get_ambientbright:()=>Xm,mixbot_display_get_screen_pixel:()=>vm,mixbot_display_image_create:()=>Pm,mixbot_display_rotate:()=>ym,mixgo_display_bitmap_create:()=>Em,mixgo_display_image_create_new:()=>mm,mixgome_display_bitmap_create:()=>Tm,mixgome_display_font:()=>Om,mixgome_display_image_create:()=>Im,mixgomini_display_bitmap_create:()=>hm,mixgomini_display_image_create:()=>Mm,mpython_display_hvline:()=>Dm,mpython_display_line:()=>fm,mpython_display_shape_rect:()=>Nm,mpython_pbm_image:()=>Fm,nova_draw_pointer:()=>iE,onboard_oled_bright_point:()=>Lm,onboard_oled_scroll_string_delay:()=>Sm,onboard_oled_show_frame_string_delay:()=>Am,onboard_oled_show_image:()=>Rm,onboard_oled_show_image_or_string_delay:()=>Cm,onboard_oled_show_image_xy:()=>cm,onboard_oled_show_string:()=>gm,onboard_tft_bright_point:()=>Jm,onboard_tft_bright_screen:()=>uE,onboard_tft_clear:()=>rE,onboard_tft_clock_clear:()=>Zm,onboard_tft_clock_draw:()=>$m,onboard_tft_clock_get_rtctime:()=>zm,onboard_tft_clock_init:()=>Qm,onboard_tft_clock_set_time:()=>jm,onboard_tft_display_hvline:()=>Hm,onboard_tft_display_line:()=>Wm,onboard_tft_display_shape_circle:()=>tE,onboard_tft_display_shape_rect:()=>km,onboard_tft_fill:()=>qm,onboard_tft_get_pixel:()=>Km,onboard_tft_get_screen_pixel:()=>aE,onboard_tft_scroll_string:()=>_E,onboard_tft_scroll_string_delay:()=>jh,onboard_tft_shift:()=>pE,onboard_tft_show_frame_string:()=>oE,onboard_tft_show_frame_string_delay:()=>wm,onboard_tft_show_image:()=>sE,onboard_tft_show_image_or_string_delay:()=>Um,onboard_tft_show_image_xy:()=>Bm,onboard_tft_show_image_xy_direct:()=>Gm,onboard_tft_show_texts:()=>nE});var b={};t.r(b),t.d(b,{factory_block:()=>DE,factory_block_return:()=>fE,factory_block_return_with_textarea:()=>PE,factory_block_with_textarea:()=>FE,factory_callMethod_noreturn:()=>LE,factory_callMethod_return:()=>NE,factory_create_with_container:()=>gE,factory_create_with_item:()=>CE,factory_declare:()=>AE,factory_from_import:()=>OE,factory_function_noreturn:()=>cE,factory_function_return:()=>SE,factory_import:()=>RE,folding_block:()=>YE});var V={};t.r(V),t.d(V,{controls_pin_attachInterrupt:()=>tO,inout_analog_atten:()=>wE,inout_analog_read:()=>UE,inout_analog_read_init:()=>qE,inout_analog_write:()=>VE,inout_analog_write_init:()=>JE,inout_analog_write_set:()=>BE,inout_analog_write_set_freq:()=>jE,inout_digital_init:()=>WE,inout_digital_read:()=>yE,inout_digital_write:()=>xE,inout_highlow:()=>XE,inout_pinMode:()=>zE,inout_pin_attachInterrupt:()=>HE,inout_pin_pressed:()=>kE,inout_pin_pressed_init:()=>QE,inout_pwm_analog_write:()=>bE,inout_pwm_analog_write_init:()=>KE,inout_pwm_analog_write_set_freq:()=>GE,pin_pressed:()=>ZE,pin_pressed_init:()=>$E});var B={};t.r(B),t.d(B,{IOT_CONNECT_OLLAMA:()=>bO,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>SO,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>CO,IOT_EMQX_PING:()=>cO,IOT_FORMATTING:()=>OO,IOT_FORMAT_STRING:()=>RO,IOT_MIXIO_NTP:()=>gO,IOT_MIXIO_PUBLISH:()=>dO,IOT_MIXIO_SUBSCRIBE:()=>IO,iot_checkonenet:()=>XO,iot_client_onboard:()=>LO,iot_connect_ollama:()=>yO,iot_connect_openai:()=>VO,iot_create_with_item:()=>rO,iot_http_client:()=>NO,iot_http_data:()=>DO,iot_mixio_check:()=>hO,iot_mixio_connect:()=>lO,iot_mixio_connect_only:()=>MO,iot_mixio_disconnect:()=>TO,iot_mixio_format_msg:()=>EO,iot_mixio_format_topic:()=>mO,iot_mixly_key:()=>AO,iot_mqtt_client:()=>fO,iot_mqtt_data:()=>FO,iot_onenet_check:()=>_O,iot_onenet_connect:()=>nO,iot_onenet_disconnect:()=>sO,iot_onenet_publish:()=>pO,iot_onenet_publish_dict:()=>oO,iot_onenetconnect:()=>YO,iot_onenetdisconnect:()=>vO,iot_publish:()=>xO,iot_publish_container:()=>aO,iot_publish_item:()=>uO,iot_wifi_connect:()=>iO,iot_wificonnect:()=>PO,ollama_empty_history:()=>UO,use_ollama_llm_to_chat:()=>BO,use_ollama_llm_to_chat_return:()=>GO});var G={};t.r(G),t.d(G,{educore_mqtt_connect:()=>RR,educore_mqtt_connect_success:()=>SR,educore_mqtt_subscribe_message:()=>cR,educore_mqtt_topic_publish:()=>CR,educore_mqtt_topic_subscribe:()=>gR,educore_wifi_connect:()=>OR,network_ap_connect:()=>$O,network_connect:()=>JO,network_get_connect:()=>QO,network_get_wifi:()=>jO,network_init:()=>kO,network_is_active:()=>WO,network_open:()=>HO,network_scan:()=>KO,network_server:()=>ZO,network_socket_accept:()=>sR,network_socket_bind:()=>eR,network_socket_close:()=>uR,network_socket_connect:()=>iR,network_socket_init:()=>tR,network_socket_listen:()=>nR,network_socket_receive:()=>_R,network_socket_receive_from:()=>pR,network_socket_send:()=>oR,network_socket_send_to:()=>aR,network_stop:()=>zO,network_wifi_connect:()=>qO,ntptime_address:()=>TR,ntptime_time:()=>IR,requests_attribute:()=>lR,requests_attribute2:()=>ER,requests_get:()=>rR,requests_get2:()=>hR,requests_method:()=>dR,requests_post:()=>mR});var U={};t.r(U),t.d(U,{CI130X_BROADCAST:()=>QR,CI130X_GET_THE_RECOGNIZED_CMD:()=>qR,CI130X_GET_WHETHER_IDENTIFY:()=>JR,CI130X_IDENTIFY_AND_SAVE:()=>KR,CI130X_SET_SYSTEM_CMD:()=>zR,HCSR04:()=>Vc,PS2_Button:()=>wc,PS2_Buttons:()=>Hc,PS2_Buttons_new:()=>qc,PS2_State:()=>kc,PS2_init:()=>Bc,PS2_init_new:()=>Kc,PS2_stk:()=>Wc,PS2_stk_new:()=>Qc,PS2_vibration:()=>Uc,PS2_vibration_new:()=>Jc,camera_sensor_init:()=>Ag,camera_sensor_result:()=>Lg,column_tube_foot:()=>Pg,define_keyboards:()=>Yg,educore_body_sensor:()=>Mg,educore_button_sensor_extern:()=>Og,educore_camera_sensor:()=>Sg,educore_infrared_sensor:()=>Eg,educore_soilhum_sensor:()=>hg,educore_temp_sensor:()=>Cg,educore_temphum_sensor:()=>mg,educore_ultrasonic_sensor:()=>cg,esp32_s2_weather_init:()=>Xc,esp32_s2_weather_rain:()=>yc,esp32_s2_weather_wd:()=>xc,esp32_s2_weather_ws:()=>bc,extern_rfid_read:()=>Rc,extern_rfid_readcontent:()=>gc,extern_rfid_readid:()=>cc,extern_rfid_status:()=>Ac,extern_rfid_write:()=>Cc,extern_rfid_write_return:()=>Sc,get_keboards_value:()=>vg,gnss_get_data:()=>Zc,gnss_have_data:()=>$c,init_matrix_keyboard:()=>fg,interaction_whether_to_interaction:()=>HR,interaction_whether_to_interaction_SANT:()=>WR,line_tube_foot:()=>Fg,mixbot_sensor_extern_get_addr:()=>pg,mixbot_sensor_extern_set_addr:()=>ag,pm25_get_data:()=>jc,radar_set_DETECTION_THRESHOLD:()=>wR,radar_set_DETECTION_THRESHOLD_SANT:()=>kR,robot_button_extern_get_value:()=>eg,robot_color_extern_get_value:()=>og,robot_infrared_extern_get_value:()=>ng,robot_infrared_extern_grey_get_value:()=>sg,robot_potentiometer_extern_get_value:()=>_g,robot_sonar_extern_get_value:()=>ug,robot_sonar_extern_led:()=>rg,robot_touch_extern_get_value:()=>ig,sensor_APDS9960_extern:()=>$R,sensor_DS18X20:()=>BR,sensor_LTR308_extern:()=>ZR,sensor_LTR390UV_extern:()=>ic,sensor_MAX30102_extern:()=>jR,sensor_QMC5883L_extern:()=>rc,sensor_VL530LX_extern:()=>nc,sensor_adxl345_get_acceleration:()=>PR,sensor_aht11_extern:()=>_c,sensor_bmp:()=>bR,sensor_compass_reset:()=>Ec,sensor_dht11:()=>vR,sensor_hp203_extern:()=>oc,sensor_light_level:()=>YR,sensor_lm35:()=>GR,sensor_ltr381_extern:()=>tc,sensor_mixgo_extern_button_attachInterrupt:()=>fR,sensor_mixgo_extern_button_get_presses:()=>DR,sensor_mixgo_extern_button_is_pressed:()=>LR,sensor_mixgo_extern_button_was_pressed:()=>NR,sensor_mixgo_extern_light:()=>XR,sensor_mixgo_extern_pin_near:()=>yR,sensor_mixgo_extern_sound:()=>xR,sensor_mixgoce_hot_wheel_degrees:()=>vc,sensor_mixgoce_hot_wheel_is_touched:()=>Yc,sensor_mpu9250_attachGestureInterrupt:()=>FR,sensor_mpu9250_calibrate_compass:()=>Mc,sensor_mpu9250_field_strength:()=>mc,sensor_mpu9250_gesture:()=>lc,sensor_mpu9250_get_acceleration:()=>dc,sensor_mpu9250_get_gyro:()=>Tc,sensor_mpu9250_get_magnetic:()=>Ic,sensor_mpu9250_temperature:()=>hc,sensor_ms5611_extern:()=>ac,sensor_ms5611_extern_altitude:()=>uc,sensor_read_humiture:()=>Rg,sensor_sht:()=>VR,sensor_shtc3_extern:()=>sc,sensor_spl06_001_extern:()=>pc,sensor_ucs12071_extern:()=>ec,sensor_use_i2c_init:()=>UR,sensor_use_spi_init:()=>Oc,sensor_use_uart_init:()=>zc,sensor_weather_solo_init:()=>lg,sensor_weather_solo_rain:()=>Tg,sensor_weather_solo_wd:()=>dg,sensor_weather_solo_ws:()=>Ig,sensor_weigh_init:()=>Ng,tvoc_get_data:()=>tg,ultrasonic_sensor_read_distance:()=>gg,weather_data:()=>Lc,weather_have_data:()=>Nc,weather_set_label:()=>fc,weather_set_label_container:()=>Fc,weather_set_label_item:()=>Pc,weather_uart_mixio:()=>Dc,weigh_sensor_get_weight:()=>Dg});var w={};t.r(w),t.d(w,{HCSR04:()=>zg,RTC_set_date:()=>Qg,RTC_set_time:()=>qg,bitbot_als_num:()=>_S,dht11:()=>dS,educore_button_sensor:()=>cS,educore_button_was_pressed:()=>gS,educore_gyroscope_sensor:()=>ES,educore_gyroscope_sensor_read:()=>OS,educore_gyroscope_sensor_shake:()=>RS,educore_light_sensor:()=>mS,educore_rfid_sensor:()=>CS,educore_rfid_sensor_scan:()=>SS,educore_rfid_sensor_scan_data:()=>AS,educore_voice_sensor:()=>MS,number1:()=>$g,number2:()=>Zg,number3:()=>tC,number4:()=>eC,number5:()=>iC,number6:()=>nC,number7:()=>sC,onboard_RTC_get_time:()=>dC,onboard_RTC_get_time_str:()=>EC,onboard_RTC_get_timestamp:()=>IC,onboard_RTC_get_timetuple_to_str:()=>OC,onboard_RTC_set_datetime:()=>hC,onboard_RTC_settime_string:()=>MC,onboard_RTC_timestamp_totuple:()=>TC,rfid_readcontent:()=>LC,rfid_readid:()=>AC,rfid_status:()=>fC,rfid_write:()=>NC,rfid_write_return:()=>DC,sensor_LTR308:()=>RC,sensor_aht11:()=>gC,sensor_bitbot_ALS:()=>sS,sensor_button_get_presses:()=>aS,sensor_button_is_pressed:()=>oS,sensor_button_was_pressed:()=>pS,sensor_distance_hrsc04:()=>Jg,sensor_eulerangles:()=>PC,sensor_field_strength:()=>IS,sensor_get_acceleration:()=>FC,sensor_get_temperature:()=>CC,sensor_get_the_coprocessor_version:()=>LS,sensor_hp203:()=>SC,sensor_light:()=>lS,sensor_mixbot_get_gyro:()=>nS,sensor_mixbot_patrol_calibrate:()=>tS,sensor_mixbot_patrol_value:()=>eS,sensor_mixbot_temperature:()=>iS,sensor_mixgo_LTR308:()=>rC,sensor_mixgo_button_attachInterrupt:()=>Vg,sensor_mixgo_button_get_presses:()=>bg,sensor_mixgo_button_is_pressed:()=>xg,sensor_mixgo_button_was_pressed:()=>yg,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>wC,sensor_mixgo_cc_mmc5603_get_angle:()=>UC,sensor_mixgo_cc_mmc5603_get_magnetic:()=>GC,sensor_mixgo_light:()=>jg,sensor_mixgo_nova_LTR308:()=>uC,sensor_mixgo_nova_pin_near:()=>aC,sensor_mixgo_pin_near:()=>pC,sensor_mixgo_pin_near_double:()=>oC,sensor_mixgo_pin_near_single:()=>_C,sensor_mixgo_pin_pressed:()=>kg,sensor_mixgo_sant_color:()=>lC,sensor_mixgo_touch_slide:()=>Kg,sensor_mixgocar42_button_attachInterrupt:()=>wg,sensor_mixgocar42_button_get_presses:()=>Ug,sensor_mixgocar42_button_is_pressed:()=>Bg,sensor_mixgocar42_button_was_pressed:()=>Gg,sensor_mixgocar_battery_left:()=>ZC,sensor_mixgocar_pin_near:()=>jC,sensor_mixgocar_pin_near_line:()=>zC,sensor_mixgocar_pin_near_state_change:()=>$C,sensor_mixgoce_pin_pressed:()=>Hg,sensor_mixgoce_temperature:()=>HC,sensor_mixgome_temperature:()=>kC,sensor_mpython_pin_pressed:()=>Wg,sensor_mpython_qmi8658_get_gyro:()=>WC,sensor_mpython_qmi8658_temperature:()=>KC,sensor_onboard_compass_reset:()=>BC,sensor_onboard_mpu9250_calibrate_compass:()=>yC,sensor_onboard_mpu9250_field_strength:()=>VC,sensor_onboard_mpu9250_gesture:()=>YC,sensor_onboard_mpu9250_get_acceleration:()=>vC,sensor_onboard_mpu9250_get_gyro:()=>xC,sensor_onboard_mpu9250_get_magnetic:()=>XC,sensor_onboard_mpu9250_temperature:()=>bC,sensor_pin_near:()=>rS,sensor_pin_pressed:()=>uS,sensor_read:()=>hS,sensor_rm_acc:()=>QC,sensor_rm_battery_left:()=>qC,sensor_rm_pin_near_double:()=>JC,sensor_rtc_init:()=>mC,sensor_sound:()=>cC,sensor_temperature:()=>TS});var k={};t.r(k),t.d(k,{serial_any:()=>yS,serial_begin:()=>US,serial_print:()=>PS,serial_print_byte:()=>FS,serial_print_hex:()=>vS,serial_println:()=>YS,serial_read_from_ai:()=>zS,serial_readline:()=>bS,serial_readstr:()=>xS,serial_readstr_until:()=>VS,serial_receive_data_event:()=>XS,serial_send_to_ai:()=>QS,serial_softserial:()=>GS,serial_softserial_new:()=>BS,system_input:()=>wS,system_print:()=>kS,system_print_container:()=>JS,system_print_end:()=>WS,system_print_inline:()=>HS,system_print_item:()=>qS,system_print_many:()=>KS});var H={};t.r(H),t.d(H,{Panic_with_status_code:()=>tA,Timer_init:()=>IA,base_delay:()=>hA,controls_delay:()=>ZS,controls_delay_new:()=>$S,controls_millis:()=>iA,controls_uname:()=>sA,raw_block:()=>nA,reset:()=>eA,system_bitbot_shutdown:()=>dA,system_machine_reset:()=>lA,system_ticks_diff:()=>pA,system_timer:()=>oA,system_timer_init:()=>aA,system_wdt_feed:()=>rA,system_wdt_init:()=>uA,time_ticks_diff:()=>MA,timer:()=>_A,timer2:()=>TA});var W={};t.r(W),t.d(W,{Air_daily_content:()=>FA,Air_now_content:()=>CA,Geo_moon_content:()=>YA,Geo_sun_content:()=>PA,Life_suggestion_content:()=>AA,Location_search_content:()=>NA,Tide_daily_content:()=>LA,WEATHER_DAILY:()=>OA,WEATHER_HOUR:()=>RA,WEATHER_NOW:()=>EA,Weather_alarm_content:()=>SA,Weather_daily:()=>DA,Weather_daily_content:()=>fA,Weather_now:()=>cA,Weather_now_content:()=>gA});var K={};t.r(K),t.d(K,{PIN_init:()=>YL,actuator_extern_get_led_bright:()=>$A,actuator_extern_get_led_state:()=>ZA,actuator_extern_led_bright:()=>jA,actuator_extern_led_brightness:()=>tL,actuator_ms32006_dcmotor:()=>GA,actuator_ms32006_init:()=>BA,actuator_ms32006_stepper:()=>UA,actuator_neopixel_init:()=>eL,actuator_neopixel_rgb:()=>sL,actuator_neopixel_rgb_all:()=>iL,actuator_neopixel_rgb_show_all_chase:()=>_L,actuator_neopixel_rgb_show_all_rainbow:()=>oL,actuator_neopixel_write:()=>nL,actuator_use_uart_init:()=>pL,esp32_music_get_tempo_extern:()=>JA,esp32_music_pitch:()=>kA,esp32_music_pitch_init:()=>wA,esp32_music_pitch_with_time:()=>HA,esp32_music_play_list:()=>qA,esp32_music_reset_extern:()=>QA,esp32_music_set_tempo_extern:()=>KA,esp32_music_stop:()=>WA,mixbot_actuator_extern_get_addr:()=>FL,mixbot_actuator_extern_set_addr:()=>PL,mixbot_addr_extern:()=>mL,parrot_PIN_init:()=>yL,parrot_move_speed:()=>bL,pin_led_bright:()=>vL,player_play_music:()=>dL,player_set_mode:()=>lL,player_set_play:()=>uL,player_set_volume:()=>rL,player_whether_stop:()=>aL,robot_led_extern:()=>cL,robot_led_extern_get_value:()=>gL,robot_motor_extern:()=>EL,robot_motor_extern_get_speed:()=>OL,robot_servo_extern_absolute_run:()=>LL,robot_servo_extern_get_status:()=>CL,robot_servo_extern_relative_continue:()=>fL,robot_servo_extern_relative_origin:()=>NL,robot_servo_extern_relative_run:()=>DL,robot_servo_extern_stop:()=>AL,robot_servo_extern_stop_mode:()=>SL,robot_traffic_light_extern:()=>RL,servo_PIN_init:()=>XL,servo_get_angle:()=>bA,servo_get_speed:()=>VA,servo_init:()=>vA,servo_move:()=>zA,servo_move_angle:()=>xL,servo_set_angle:()=>xA,servo_set_speed:()=>yA,servo_speed_360:()=>XA,syn6288_builtin_voice:()=>ML,syn6288_get_voice:()=>TL,syn6288_set_voice:()=>IL,syn6288_tts_play:()=>hL});var J={};t.r(J),t.d(J,{actuator_dc_motor:()=>lN,actuator_dc_motor_stop:()=>dN,actuator_get_led_bright:()=>qL,actuator_get_led_state:()=>QL,actuator_led_bright:()=>JL,actuator_led_brightness:()=>zL,actuator_mixbot_buzzer_on_off:()=>mN,actuator_mixgo_nova_mic_get:()=>gN,actuator_mixgo_nova_mic_set:()=>cN,actuator_mixgo_nova_onboard_music_pitch:()=>DN,actuator_mixgo_nova_onboard_music_stop:()=>fN,actuator_mixgo_nova_play_audio:()=>LN,actuator_mixgo_nova_play_online_audio:()=>NN,actuator_mixgo_nova_record_audio:()=>AN,actuator_mixgo_nova_voice_get:()=>SN,actuator_mixgo_nova_voice_set:()=>CN,actuator_mixgo_zero_led_color:()=>jL,actuator_onboard_neopixel_rgb:()=>sN,actuator_onboard_neopixel_rgb_all:()=>_N,actuator_onboard_neopixel_rgb_show_all_chase:()=>oN,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>pN,actuator_onboard_neopixel_write:()=>nN,actuator_stepper_keep:()=>uN,actuator_stepper_stop:()=>rN,analog_ble_keyboard_init:()=>GN,analog_ble_keyboard_input:()=>kN,analog_ble_keyboard_mouse_init:()=>jN,analog_ble_keyboard_mouse_input:()=>eD,analog_ble_keyboard_mouse_send_battery:()=>tD,analog_ble_keyboard_mouse_str:()=>iD,analog_ble_keyboard_send_battery:()=>WN,analog_ble_keyboard_str:()=>HN,analog_ble_mouse_init:()=>KN,analog_ble_mouse_input:()=>QN,analog_ble_mouse_keyboard_input:()=>nD,analog_ble_mouse_send_battery:()=>zN,analog_keyboard_input:()=>vN,analog_keyboard_str:()=>VN,analog_mouse_input:()=>yN,bitbot_motor:()=>RN,bitbot_move:()=>EN,bitbot_stop:()=>ON,ble_keyboard_connect:()=>wN,ble_keyboard_get_mac:()=>UN,ble_keyboard_mouse_connect:()=>ZN,ble_keyboard_mouse_get_mac:()=>$N,ble_mouse_connect:()=>qN,ble_mouse_get_mac:()=>JN,cc_number:()=>$L,educore_ble_keyboard_input:()=>ID,educore_ble_sensor_connected:()=>dD,educore_ble_sensor_init:()=>lD,educore_buzzer:()=>sD,educore_buzzer_play_tone:()=>_D,educore_buzzer_play_tone_time:()=>oD,educore_buzzer_stop:()=>pD,educore_neopixel_clear:()=>rD,educore_neopixel_rgb:()=>uD,educore_rgb_light:()=>aD,esp32_music_get_tempo:()=>BL,esp32_music_reset:()=>HL,esp32_music_set_tempo:()=>VL,esp32_onboard_music_pitch:()=>GL,esp32_onboard_music_pitch_with_time:()=>UL,esp32_onboard_music_play_list:()=>kL,esp32_onboard_music_stop:()=>wL,general_key:()=>xN,general_key_tuple:()=>BN,get_keyboard_light:()=>TD,get_power_output:()=>PN,ledswitch:()=>KL,mixbot_motor:()=>hN,mixbot_motor_status:()=>IN,mixbot_move:()=>TN,mixbot_stop:()=>MN,mouse_key:()=>bN,number:()=>WL,rm_actuator_get_led_bright:()=>tN,rm_actuator_get_led_state:()=>eN,rm_actuator_led_bright:()=>ZL,rm_actuator_led_brightness:()=>iN,rm_motor:()=>aN,set_all_power_output:()=>YN,set_power_output:()=>FN,special_key:()=>XN});var q={};t.r(q),t.d(q,{ai_sensor_20object:()=>JD,ai_sensor_ailocal_class:()=>yD,ai_sensor_ailocal_class_result:()=>bD,ai_sensor_ailocal_train:()=>xD,ai_sensor_asr_recognize:()=>wD,ai_sensor_audio_play:()=>BD,ai_sensor_audio_record:()=>VD,ai_sensor_barcode:()=>cD,ai_sensor_circle:()=>ND,ai_sensor_classifier_faces:()=>KD,ai_sensor_color:()=>PD,ai_sensor_color_chases:()=>XD,ai_sensor_color_chases_result:()=>vD,ai_sensor_config:()=>mD,ai_sensor_face:()=>WD,ai_sensor_find_20objects:()=>qD,ai_sensor_find_barcodes:()=>gD,ai_sensor_find_circles:()=>DD,ai_sensor_find_colors:()=>YD,ai_sensor_find_licenseplates:()=>HD,ai_sensor_find_lines:()=>LD,ai_sensor_find_qrcodes:()=>RD,ai_sensor_find_rects:()=>FD,ai_sensor_find_tags:()=>SD,ai_sensor_licenseplate:()=>kD,ai_sensor_line:()=>AD,ai_sensor_qrcode:()=>OD,ai_sensor_qrcode_lite:()=>hD,ai_sensor_rect:()=>fD,ai_sensor_rgb:()=>ED,ai_sensor_tag:()=>CD,ai_sensor_use_uart_init:()=>MD,ai_sensor_yolo_recognize:()=>GD,ai_sensor_yolo_recognize_result:()=>UD});var Q={};t.r(Q),t.d(Q,{MICROPYTHON_AI_Speech_asr:()=>jD,MICROPYTHON_AI_Speech_unit:()=>zD,MICROPYTHON_AI_client:()=>QD});var z={};t.r(z),t.d(z,{mpython_blynk_app_data:()=>rf,mpython_blynk_app_notify:()=>_f,mpython_blynk_email:()=>lf,mpython_blynk_get_timers:()=>pf,mpython_blynk_on_connected:()=>ef,mpython_blynk_on_disconnected:()=>tf,mpython_blynk_run:()=>sf,mpython_blynk_sensor_data_to_app:()=>uf,mpython_blynk_set_property:()=>df,mpython_blynk_setup:()=>If,mpython_blynk_stop_timers:()=>of,mpython_blynk_sync_virtual:()=>ZD,mpython_blynk_terminal_widget_vpin:()=>$D,mpython_blynktimer:()=>af,mpython_blynktimer_run:()=>nf});var j={};t.r(j),t.d(j,{cc_g1_read_bat:()=>Tf,cc_g1_read_joystick:()=>Mf,cc_g1_read_key:()=>hf,cc_g1_turnoff:()=>mf});var $={};t.r($),t.d($,{ce_go_dc_motor:()=>Af,ce_go_get_led_bright:()=>Rf,ce_go_get_led_state:()=>cf,ce_go_hall_attachInterrupt:()=>Lf,ce_go_hall_data:()=>Df,ce_go_hall_initialize:()=>Nf,ce_go_led_bright:()=>Of,ce_go_led_brightness:()=>gf,ce_go_light_number:()=>Ef,ce_go_pin_light:()=>vf,ce_go_pin_near:()=>Ff,ce_go_pin_near_line:()=>ff,ce_go_pin_near_state_change:()=>Pf,ce_go_stepper_keep:()=>Cf,ce_go_stepper_stop:()=>Sf,educore_car:()=>Xf,educore_car_pin_near:()=>Vf,educore_car_pin_near_line:()=>bf,educore_car_stepper_keep:()=>xf,educore_car_stepper_stop:()=>yf,sensor_mixgome_eulerangles:()=>Yf});var Z={};t.r(Z),t.d(Z,{communicate_bluetooth_central_init:()=>OF,communicate_bluetooth_connect:()=>gF,communicate_bluetooth_disconnect:()=>CF,communicate_bluetooth_handle:()=>fF,communicate_bluetooth_is_connected:()=>AF,communicate_bluetooth_mac:()=>SF,communicate_bluetooth_peripheral_init:()=>RF,communicate_bluetooth_recv:()=>DF,communicate_bluetooth_recv_only:()=>NF,communicate_bluetooth_scan:()=>cF,communicate_bluetooth_send:()=>LF,communicate_espnow_init:()=>FF,communicate_espnow_init_new:()=>PF,communicate_i2c_available:()=>Kf,communicate_i2c_init:()=>Uf,communicate_i2c_master_read:()=>Wf,communicate_i2c_onboard:()=>Bf,communicate_i2c_read:()=>wf,communicate_i2c_scan:()=>Hf,communicate_i2c_write:()=>kf,communicate_ir_recv_init:()=>uF,communicate_ir_send_init:()=>TF,communicate_ow_init:()=>nF,communicate_ow_read:()=>oF,communicate_ow_reset:()=>_F,communicate_ow_scan:()=>sF,communicate_ow_select:()=>aF,communicate_ow_write:()=>pF,communicate_spi_buffer:()=>zf,communicate_spi_init:()=>qf,communicate_spi_onboard:()=>Gf,communicate_spi_read:()=>jf,communicate_spi_read_output:()=>$f,communicate_spi_readinto:()=>Zf,communicate_spi_readinto_output:()=>tF,communicate_spi_set:()=>Qf,communicate_spi_write:()=>eF,communicate_spi_write_readinto:()=>iF,espnow_radio_channel:()=>bF,espnow_radio_channel_new:()=>BF,espnow_radio_on_off:()=>GF,espnow_radio_rec:()=>wF,espnow_radio_recv:()=>HF,espnow_radio_recv_certain_msg:()=>WF,espnow_radio_recv_certain_msg_new:()=>JF,espnow_radio_recv_msg:()=>kF,espnow_radio_recv_new:()=>KF,espnow_radio_send:()=>UF,espnow_radio_txpower:()=>VF,i2c_slave_onreceive:()=>Jf,internal_variable:()=>rF,ir_recv_timeout:()=>IF,ir_transmit_busy:()=>EF,ir_transmit_conventional_data:()=>MF,ir_transmit_raw_code:()=>mF,ir_transmit_study_code:()=>hF,ir_whether_recv:()=>dF,lora_init:()=>qF,lora_packet:()=>QF,lora_recv:()=>jF,lora_send:()=>zF,network_espnow_info:()=>vF,network_espnow_mac:()=>YF,network_espnow_recv:()=>XF,network_espnow_recv_handle:()=>yF,network_espnow_send:()=>xF,recv_fun:()=>lF,urequests_attribute:()=>ZF,urequests_get:()=>$F,urequests_method:()=>tP});var tt={};t.r(tt),t.d(tt,{display_animate:()=>AP,display_circle:()=>LP,display_color_seclet:()=>bP,display_draw_4strings:()=>EP,display_fill:()=>SP,display_lcd_use_i2c_init:()=>kP,display_line:()=>cP,display_line_arbitrarily:()=>OP,display_matrix_extern_bright_point:()=>lP,display_matrix_extern_bright_screen:()=>IP,display_matrix_extern_clear:()=>aP,display_matrix_extern_get_pixel:()=>rP,display_matrix_extern_get_screen_pixel:()=>dP,display_matrix_extern_image_builtins:()=>TP,display_matrix_extern_scroll_string:()=>oP,display_matrix_extern_scroll_string_delay:()=>pP,display_matrix_extern_shift:()=>uP,display_matrix_extern_show_frame_string:()=>sP,display_matrix_extern_show_frame_string_delay:()=>_P,display_matrix_extern_show_image:()=>iP,display_matrix_extern_show_image_or_string_delay:()=>nP,display_matrix_use_i2c_init:()=>eP,display_oled_drawPixel:()=>fP,display_oled_showBitmap:()=>DP,display_oled_use_i2c_init:()=>qP,display_onoff:()=>gP,display_rect:()=>RP,display_tm1650_power:()=>PP,display_tm1650_set_brightness:()=>XP,display_tm1650_show_dot:()=>vP,display_tm1650_show_num:()=>YP,display_tm_use_i2c_init:()=>FP,display_triangle:()=>NP,display_use_i2c_init:()=>mP,extern_oled_bright_point:()=>oY,extern_oled_clear:()=>nY,extern_oled_get_pixel:()=>_Y,extern_oled_hvline:()=>aY,extern_oled_line:()=>uY,extern_oled_scroll_string:()=>eY,extern_oled_scroll_string_delay:()=>iY,extern_oled_shape_rect:()=>pY,extern_oled_shift:()=>sY,extern_oled_show_frame_string:()=>ZP,extern_oled_show_frame_string_delay:()=>tY,extern_oled_show_image:()=>QP,extern_oled_show_image_or_string_delay:()=>$P,extern_oled_show_image_xy:()=>zP,extern_oled_show_string:()=>jP,image_shift:()=>CP,lcd_backlight:()=>KP,lcd_clear:()=>JP,lcd_print_string:()=>WP,lcd_show_image_or_string_delay:()=>HP,matrix_extern_image_arithmetic:()=>MP,matrix_extern_image_invert:()=>hP,tft_fill:()=>UP,tft_line_arbitrarily:()=>wP,tft_scroll_string_delay:()=>GP,tft_show_frame_string_delay:()=>BP,tft_show_image_or_string_delay:()=>VP,tft_show_image_xy:()=>yP,tft_use_spi_init:()=>xP});var et={};t.r(et),t.d(et,{bitbot_display_bitmap_create:()=>ev,bitbot_display_image_create:()=>tv,display_available:()=>gY,display_bitmap_create:()=>RY,display_bright_point:()=>NY,display_bright_screen:()=>fY,display_clear:()=>cY,display_get_pixel:()=>LY,display_get_screen_pixel:()=>DY,display_image_builtins:()=>mY,display_image_builtins_all:()=>EY,display_image_create:()=>OY,display_scroll_string:()=>TY,display_scroll_string_delay:()=>MY,display_shift:()=>AY,display_show_frame_string:()=>dY,display_show_frame_string_delay:()=>IY,display_show_image:()=>rY,display_show_image_or_string_delay:()=>lY,draw_pointer:()=>Ev,image_arithmetic:()=>CY,image_invert:()=>SY,mixbot_display_bitmap_create:()=>QY,mixbot_display_bright_screen:()=>$Y,mixbot_display_get_ambientbright:()=>jY,mixbot_display_get_screen_pixel:()=>zY,mixbot_display_image_create:()=>qY,mixbot_display_rotate:()=>ZY,mixgo_display_bitmap_create:()=>yY,mixgo_display_image_create_new:()=>xY,mixgome_display_bitmap_create:()=>PY,mixgome_display_font:()=>XY,mixgome_display_image_create:()=>FY,mixgomini_display_bitmap_create:()=>vY,mixgomini_display_image_create:()=>YY,mpython_display_hvline:()=>KY,mpython_display_line:()=>JY,mpython_display_shape_rect:()=>WY,mpython_pbm_image:()=>bY,nova_draw_pointer:()=>Ov,onboard_oled_bright_point:()=>HY,onboard_oled_scroll_string_delay:()=>kY,onboard_oled_show_frame_string_delay:()=>wY,onboard_oled_show_image:()=>VY,onboard_oled_show_image_or_string_delay:()=>UY,onboard_oled_show_image_xy:()=>BY,onboard_oled_show_string:()=>GY,onboard_tft_bright_point:()=>rv,onboard_tft_bright_screen:()=>Av,onboard_tft_clear:()=>Lv,onboard_tft_clock_clear:()=>hv,onboard_tft_clock_draw:()=>Mv,onboard_tft_clock_get_rtctime:()=>Iv,onboard_tft_clock_init:()=>dv,onboard_tft_clock_set_time:()=>Tv,onboard_tft_display_hvline:()=>pv,onboard_tft_display_line:()=>av,onboard_tft_display_shape_circle:()=>mv,onboard_tft_display_shape_rect:()=>ov,onboard_tft_fill:()=>lv,onboard_tft_get_pixel:()=>uv,onboard_tft_get_screen_pixel:()=>Sv,onboard_tft_scroll_string_delay:()=>hY,onboard_tft_shift:()=>Cv,onboard_tft_show_frame_string:()=>gv,onboard_tft_show_frame_string_delay:()=>_v,onboard_tft_show_image:()=>cv,onboard_tft_show_image_or_string_delay:()=>sv,onboard_tft_show_image_xy:()=>iv,onboard_tft_show_image_xy_direct:()=>nv,onboard_tft_show_texts:()=>Rv});var it={};t.r(it),t.d(it,{factory_block:()=>Xv,factory_block_return:()=>xv,factory_block_return_with_textarea:()=>bv,factory_block_with_textarea:()=>yv,factory_callMethod_noreturn:()=>Yv,factory_callMethod_return:()=>vv,factory_declare:()=>Pv,factory_from_import:()=>Nv,factory_function_noreturn:()=>fv,factory_function_return:()=>Fv,factory_import:()=>Dv,folding_block:()=>Vv});var nt={};t.r(nt),t.d(nt,{inout_analog_atten:()=>Zv,inout_analog_read:()=>Kv,inout_analog_read_init:()=>$v,inout_analog_write:()=>kv,inout_analog_write_init:()=>jv,inout_analog_write_set:()=>Hv,inout_digital_init:()=>Qv,inout_digital_read:()=>Uv,inout_digital_write:()=>Gv,inout_highlow:()=>Bv,inout_pin_attachInterrupt:()=>qv,inout_pin_pressed:()=>Jv,inout_pin_pressed_init:()=>tX,inout_pwm_analog_write:()=>wv,inout_pwm_analog_write_init:()=>zv,inout_pwm_analog_write_set_freq:()=>Wv});var st={};t.r(st),t.d(st,{IOT_CONNECT_OLLAMA:()=>DX,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>OX,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>mX,IOT_EMQX_PING:()=>RX,IOT_FORMATTING:()=>MX,IOT_FORMAT_STRING:()=>hX,IOT_MIXIO_NTP:()=>cX,IOT_MIXIO_PUBLISH:()=>aX,IOT_MIXIO_SUBSCRIBE:()=>uX,iot_client_onboard:()=>gX,iot_connect_ollama:()=>NX,iot_connect_openai:()=>fX,iot_http_client:()=>CX,iot_http_data:()=>SX,iot_mixio_check:()=>dX,iot_mixio_connect:()=>pX,iot_mixio_connect_only:()=>lX,iot_mixio_disconnect:()=>rX,iot_mixio_format_msg:()=>TX,iot_mixio_format_topic:()=>IX,iot_mixly_key:()=>EX,iot_mqtt_client:()=>AX,iot_mqtt_data:()=>LX,iot_onenet_check:()=>_X,iot_onenet_connect:()=>iX,iot_onenet_disconnect:()=>nX,iot_onenet_publish:()=>oX,iot_onenet_publish_dict:()=>sX,iot_wifi_connect:()=>eX,ollama_empty_history:()=>YX,use_ollama_llm_to_chat:()=>FX,use_ollama_llm_to_chat_return:()=>PX});var _t={};t.r(_t),t.d(_t,{educore_mqtt_connect:()=>ux,educore_mqtt_connect_success:()=>Ix,educore_mqtt_subscribe_message:()=>rx,educore_mqtt_topic_publish:()=>dx,educore_mqtt_topic_subscribe:()=>lx,educore_wifi_connect:()=>ax,network_ap_connect:()=>UX,network_connect:()=>XX,network_get_connect:()=>yX,network_get_wifi:()=>GX,network_init:()=>vX,network_is_active:()=>BX,network_open:()=>VX,network_scan:()=>wX,network_server:()=>kX,network_socket_accept:()=>qX,network_socket_bind:()=>WX,network_socket_close:()=>ZX,network_socket_connect:()=>KX,network_socket_init:()=>HX,network_socket_listen:()=>JX,network_socket_receive:()=>QX,network_socket_receive_from:()=>jX,network_socket_send:()=>zX,network_socket_send_to:()=>$X,network_stop:()=>bX,network_wifi_connect:()=>xX,ntptime_address:()=>sx,ntptime_time:()=>nx,requests_attribute:()=>ex,requests_attribute2:()=>ox,requests_get:()=>tx,requests_get2:()=>_x,requests_method:()=>ix,requests_post:()=>px});var ot={};t.r(ot),t.d(ot,{CI130X_BROADCAST:()=>yx,CI130X_GET_THE_RECOGNIZED_CMD:()=>xx,CI130X_GET_WHETHER_IDENTIFY:()=>Xx,CI130X_IDENTIFY_AND_SAVE:()=>vx,CI130X_SET_SYSTEM_CMD:()=>bx,HCSR04:()=>My,PS2_Button:()=>Ey,PS2_Buttons:()=>Oy,PS2_Buttons_new:()=>Ny,PS2_State:()=>Ry,PS2_init:()=>hy,PS2_init_new:()=>Ay,PS2_stk:()=>cy,PS2_stk_new:()=>Dy,PS2_vibration:()=>my,PS2_vibration_new:()=>Ly,RTC_get_time:()=>Cy,RTC_set_date:()=>cx,RTC_set_datetime:()=>gy,RTC_set_time:()=>Rx,camera_sensor_init:()=>_b,camera_sensor_result:()=>ob,column_tube_foot:()=>rb,define_keyboards:()=>lb,educore_body_sensor:()=>Qy,educore_button_sensor_extern:()=>Zy,educore_camera_sensor:()=>sb,educore_infrared_sensor:()=>$y,educore_soilhum_sensor:()=>zy,educore_temp_sensor:()=>nb,educore_temphum_sensor:()=>jy,educore_ultrasonic_sensor:()=>eb,esp32_s2_weather_init:()=>ly,esp32_s2_weather_rain:()=>Iy,esp32_s2_weather_wd:()=>dy,esp32_s2_weather_ws:()=>Ty,extern_rfid_read:()=>Zx,extern_rfid_readcontent:()=>ey,extern_rfid_readid:()=>ty,extern_rfid_status:()=>sy,extern_rfid_write:()=>iy,extern_rfid_write_return:()=>ny,get_keboards_value:()=>Ib,gnss_get_data:()=>Py,gnss_have_data:()=>Yy,init_matrix_keyboard:()=>db,interaction_whether_to_interaction:()=>Px,interaction_whether_to_interaction_SANT:()=>Yx,line_tube_foot:()=>ub,mixbot_sensor_extern_get_addr:()=>wy,mixbot_sensor_extern_set_addr:()=>ky,pm25_get_data:()=>Fy,radar_set_DETECTION_THRESHOLD:()=>fx,radar_set_DETECTION_THRESHOLD_SANT:()=>Fx,robot_button_extern_get_value:()=>Xy,robot_color_extern_get_value:()=>By,robot_infrared_extern_get_value:()=>yy,robot_infrared_extern_grey_get_value:()=>by,robot_potentiometer_extern_get_value:()=>Vy,robot_sonar_extern_get_value:()=>Gy,robot_sonar_extern_led:()=>Uy,robot_touch_extern_get_value:()=>xy,sensor_APDS9960_extern:()=>Bx,sensor_DS18X20:()=>qy,sensor_LTR308_extern:()=>Gx,sensor_LTR390UV_extern:()=>Jx,sensor_MAX30102_extern:()=>Vx,sensor_QMC5883L_extern:()=>qx,sensor_VL530LX_extern:()=>jx,sensor_aht11_extern:()=>zx,sensor_bmp:()=>Lx,sensor_dht11:()=>Sy,sensor_distance_hrsc04:()=>Ox,sensor_hp203_extern:()=>Ux,sensor_ltr381_extern:()=>Wx,sensor_mixgo_extern_button_attachInterrupt:()=>mx,sensor_mixgo_extern_button_get_presses:()=>hx,sensor_mixgo_extern_button_is_pressed:()=>Tx,sensor_mixgo_extern_button_was_pressed:()=>Mx,sensor_mixgo_extern_light:()=>gx,sensor_mixgo_extern_pin_near:()=>Sx,sensor_mixgo_extern_sound:()=>Cx,sensor_mixgoce_hot_wheel_degrees:()=>ry,sensor_mixgoce_hot_wheel_is_touched:()=>uy,sensor_mpu9250_attachGestureInterrupt:()=>Ex,sensor_ms5611_extern:()=>kx,sensor_ms5611_extern_altitude:()=>Hx,sensor_read_humiture:()=>tb,sensor_rtc_init:()=>Ax,sensor_sht:()=>Nx,sensor_shtc3_extern:()=>Qx,sensor_spl06_001_extern:()=>wx,sensor_ucs12071_extern:()=>Kx,sensor_use_i2c_init:()=>Dx,sensor_use_spi_init:()=>$x,sensor_use_uart_init:()=>fy,sensor_weather_solo_init:()=>Hy,sensor_weather_solo_rain:()=>Jy,sensor_weather_solo_wd:()=>Wy,sensor_weather_solo_ws:()=>Ky,sensor_weigh_init:()=>pb,tvoc_get_data:()=>vy,ultrasonic_sensor_read_distance:()=>ib,weather_data:()=>_y,weather_have_data:()=>oy,weather_set_label:()=>ay,weather_uart_mixio:()=>py,weigh_sensor_get_weight:()=>ab});var pt={};t.r(pt),t.d(pt,{HCSR04:()=>gb,bitbot_als_num:()=>HV,dht11:()=>$V,educore_button_sensor:()=>_B,educore_button_was_pressed:()=>oB,educore_gyroscope_sensor:()=>iB,educore_gyroscope_sensor_read:()=>nB,educore_gyroscope_sensor_shake:()=>sB,educore_light_sensor:()=>eB,educore_rfid_sensor:()=>pB,educore_rfid_sensor_scan:()=>aB,educore_rfid_sensor_scan_data:()=>uB,educore_voice_sensor:()=>ZV,number1:()=>Cb,number2:()=>Sb,number3:()=>Ab,number4:()=>Lb,number5:()=>Nb,number6:()=>Db,number7:()=>fb,onboard_RTC_get_time:()=>RV,onboard_RTC_get_time_str:()=>CV,onboard_RTC_get_timestamp:()=>cV,onboard_RTC_get_timetuple_to_str:()=>SV,onboard_RTC_set_datetime:()=>EV,onboard_RTC_settime_string:()=>OV,onboard_RTC_timestamp_totuple:()=>gV,rfid_readcontent:()=>Wb,rfid_readid:()=>Hb,rfid_status:()=>qb,rfid_write:()=>Kb,rfid_write_return:()=>Jb,sensor_LTR308:()=>Bb,sensor_adxl345_get_acceleration:()=>nV,sensor_aht11:()=>wb,sensor_bitbot_ALS:()=>kV,sensor_button_get_presses:()=>JV,sensor_button_is_pressed:()=>WV,sensor_button_was_pressed:()=>KV,sensor_compass_reset:()=>uV,sensor_ds18x20:()=>bb,sensor_eulerangles:()=>zb,sensor_get_acceleration:()=>Qb,sensor_get_temperature:()=>kb,sensor_get_the_coprocessor_version:()=>rB,sensor_hp203:()=>Ub,sensor_light:()=>jV,sensor_lm35:()=>Vb,sensor_mixbot_get_gyro:()=>wV,sensor_mixbot_patrol_calibrate:()=>BV,sensor_mixbot_patrol_value:()=>GV,sensor_mixbot_temperature:()=>UV,sensor_mixgo_LTR308:()=>Xb,sensor_mixgo_button_attachInterrupt:()=>mb,sensor_mixgo_button_get_presses:()=>hb,sensor_mixgo_button_is_pressed:()=>Tb,sensor_mixgo_button_was_pressed:()=>Mb,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>NV,sensor_mixgo_cc_mmc5603_get_angle:()=>LV,sensor_mixgo_cc_mmc5603_get_magnetic:()=>AV,sensor_mixgo_light:()=>zV,sensor_mixgo_nova_LTR308:()=>yb,sensor_mixgo_nova_pin_near:()=>vb,sensor_mixgo_pin_near:()=>Yb,sensor_mixgo_pin_near_double:()=>Pb,sensor_mixgo_pin_near_single:()=>Fb,sensor_mixgo_pin_pressed:()=>eV,sensor_mixgo_sant_color:()=>xb,sensor_mixgo_touch_slide:()=>tV,sensor_mixgocar42_button_attachInterrupt:()=>cb,sensor_mixgocar42_button_get_presses:()=>Rb,sensor_mixgocar42_button_is_pressed:()=>Eb,sensor_mixgocar42_button_was_pressed:()=>Ob,sensor_mixgocar_battery_left:()=>VV,sensor_mixgocar_pin_near:()=>yV,sensor_mixgocar_pin_near_line:()=>xV,sensor_mixgocar_pin_near_state_change:()=>bV,sensor_mixgoce_pin_pressed:()=>Zb,sensor_mixgoce_temperature:()=>fV,sensor_mixgome_temperature:()=>DV,sensor_mpu9250_calibrate_compass:()=>oV,sensor_mpu9250_field_strength:()=>aV,sensor_mpu9250_gesture:()=>jb,sensor_mpu9250_get_acceleration:()=>$b,sensor_mpu9250_get_gyro:()=>_V,sensor_mpu9250_get_magnetic:()=>sV,sensor_mpu9250_temperature:()=>pV,sensor_mpython_pin_pressed:()=>iV,sensor_mpython_qmi8658_get_gyro:()=>FV,sensor_mpython_qmi8658_temperature:()=>PV,sensor_onboard_compass_reset:()=>mV,sensor_onboard_mpu9250_calibrate_compass:()=>TV,sensor_onboard_mpu9250_field_strength:()=>hV,sensor_onboard_mpu9250_gesture:()=>rV,sensor_onboard_mpu9250_get_acceleration:()=>lV,sensor_onboard_mpu9250_get_gyro:()=>IV,sensor_onboard_mpu9250_get_magnetic:()=>dV,sensor_onboard_mpu9250_temperature:()=>MV,sensor_pin_near:()=>QV,sensor_pin_pressed:()=>qV,sensor_read:()=>tB,sensor_rm_acc:()=>XV,sensor_rm_battery_left:()=>vV,sensor_rm_pin_near_double:()=>YV,sensor_sound:()=>Gb});var at={};t.r(at),t.d(at,{serial_any:()=>MB,serial_print:()=>lB,serial_print_byte:()=>dB,serial_print_hex:()=>TB,serial_println:()=>IB,serial_read_from_ai:()=>LB,serial_readline:()=>mB,serial_readstr:()=>hB,serial_send_to_ai:()=>AB,serial_softserial:()=>EB,serial_softserial_new:()=>OB,system_input:()=>RB,system_print:()=>cB,system_print_end:()=>CB,system_print_inline:()=>gB,system_print_many:()=>SB});var ut={};t.r(ut),t.d(ut,{Panic_with_status_code:()=>VB,Timer_init:()=>ZB,base_delay:()=>iG,controls_delay:()=>kB,controls_delay_new:()=>HB,controls_end_program:()=>GB,controls_millis:()=>BB,controls_uname:()=>wB,reset:()=>UB,system_bitbot_shutdown:()=>$B,system_device_name:()=>yB,system_device_serial_number:()=>bB,system_event_bus_source:()=>XB,system_event_bus_value:()=>xB,system_machine_reset:()=>jB,system_on_event:()=>PB,system_raise_event:()=>FB,system_reset:()=>DB,system_run_in_background:()=>NB,system_ticks_diff:()=>JB,system_timer:()=>KB,system_timer_init:()=>qB,system_timestamp:()=>YB,system_value:()=>vB,system_wait:()=>fB,system_wdt_feed:()=>zB,system_wdt_init:()=>QB,time_ticks_diff:()=>eG,timer:()=>WB,timer2:()=>tG});var rt={};t.r(rt),t.d(rt,{Air_daily_content:()=>MG,Air_now_content:()=>aG,Geo_moon_content:()=>mG,Geo_sun_content:()=>hG,Life_suggestion_content:()=>rG,Location_search_content:()=>dG,Tide_daily_content:()=>lG,WEATHER_DAILY:()=>sG,WEATHER_HOUR:()=>_G,WEATHER_NOW:()=>nG,Weather_alarm_content:()=>uG,Weather_daily:()=>IG,Weather_daily_content:()=>TG,Weather_now:()=>oG,Weather_now_content:()=>pG});var lt={};t.r(lt),t.d(lt,{controls_pin_attachInterrupt:()=>bG,inout_analog_atten:()=>NG,inout_analog_write:()=>AG,inout_analog_write_init:()=>PG,inout_analog_write_set:()=>LG,inout_analog_write_set_freq:()=>vG,inout_digital_init:()=>FG,inout_digital_read:()=>SG,inout_digital_write:()=>CG,inout_highlow:()=>gG,inout_pinMode:()=>XG,inout_pin_attachInterrupt:()=>fG,inout_pin_pressed:()=>DG,inout_pin_pressed_init:()=>YG,pin_pressed:()=>yG,pin_pressed_init:()=>xG});var dt={};t.r(dt),t.d(dt,{me_g1_aht11:()=>BG,me_g1_hp203:()=>GG,me_g1_rfid_readcontent:()=>kG,me_g1_rfid_readid:()=>wG,me_g1_rfid_status:()=>KG,me_g1_rfid_write:()=>HG,me_g1_rfid_write_outcome:()=>WG,me_g1_varistor:()=>UG});var It={};t.r(It),t.d(It,{analog_input:()=>eU,analog_output:()=>nU,espnow_channel:()=>$G,haskylens_model:()=>ZG,i2c_A_pin:()=>sU,i2c_B_pin:()=>_U,pins_analog:()=>rU,pins_analog_pin:()=>lU,pins_axis:()=>DU,pins_brightness:()=>fU,pins_builtinimg:()=>cU,pins_builtinimg_extern:()=>gU,pins_button:()=>TU,pins_buttonB:()=>MU,pins_dac:()=>dU,pins_dac_pin:()=>IU,pins_digital:()=>qG,pins_digital_dot:()=>bU,pins_digital_pin:()=>QG,pins_exlcdh:()=>LU,pins_exlcdv:()=>NU,pins_imglist:()=>CU,pins_input_pin:()=>zG,pins_one_more:()=>yU,pins_output_pin:()=>jG,pins_playlist:()=>SU,pins_playlist_extern:()=>AU,pins_pwm:()=>hU,pins_pwm_pin:()=>mU,pins_radio_datarate:()=>xU,pins_radio_power:()=>XU,pins_serial:()=>RU,pins_tone_notes:()=>vU,pins_touch:()=>OU,pins_touch_pin:()=>EU,pins_tts_bgmusic:()=>YU,pins_tts_builtin_music:()=>PU,pins_tts_voice:()=>FU,pwm_input:()=>tU,pwm_output:()=>iU,spi_A_pin:()=>oU,spi_B_pin:()=>pU,spi_C_pin:()=>aU,spi_D_pin:()=>uU});var Tt={};t.r(Tt),t.d(Tt,{inout_analog_atten:()=>JU,inout_analog_write:()=>UU,inout_analog_write_init:()=>KU,inout_analog_write_set:()=>wU,inout_digital_init:()=>WU,inout_digital_read:()=>GU,inout_digital_write:()=>BU,inout_highlow:()=>VU,inout_pin_attachInterrupt:()=>HU,inout_pin_pressed:()=>kU,inout_pin_pressed_init:()=>qU});var Mt={};t.r(Mt),t.d(Mt,{me_g1_aht11:()=>QU,me_g1_hp203:()=>zU,me_g1_rfid_readcontent:()=>ZU,me_g1_rfid_readid:()=>$U,me_g1_rfid_status:()=>iw,me_g1_rfid_write:()=>tw,me_g1_rfid_write_outcome:()=>ew,me_g1_varistor:()=>jU});var ht={};t.r(ht),t.d(ht,{analog_input:()=>dw,analog_output:()=>Tw,espnow_channel:()=>rw,haskylens_model:()=>lw,i2c_A_pin:()=>Mw,i2c_B_pin:()=>hw,pins_analog:()=>gw,pins_analog_pin:()=>cw,pins_axis:()=>yw,pins_brightness:()=>Bw,pins_builtinimg:()=>Pw,pins_builtinimg_extern:()=>Yw,pins_button:()=>sw,pins_buttonB:()=>_w,pins_dac:()=>Lw,pins_dac_pin:()=>Aw,pins_digital:()=>nw,pins_digital_dot:()=>Jw,pins_digital_pin:()=>ow,pins_exlcdh:()=>bw,pins_exlcdv:()=>Vw,pins_imglist:()=>vw,pins_input_pin:()=>pw,pins_interrupt:()=>fw,pins_one_more:()=>Kw,pins_output_pin:()=>aw,pins_playlist:()=>Xw,pins_playlist_extern:()=>xw,pins_pwm:()=>Sw,pins_pwm_input:()=>uw,pins_pwm_pin:()=>Cw,pins_radio_datarate:()=>Ww,pins_radio_power:()=>Hw,pins_serial:()=>Fw,pins_tone_notes:()=>kw,pins_touch:()=>Dw,pins_touch_pin:()=>Nw,pins_tts_bgmusic:()=>ww,pins_tts_builtin_music:()=>Uw,pins_tts_voice:()=>Gw,pwm_output:()=>Iw,spi_A_pin:()=>mw,spi_B_pin:()=>Ew,spi_C_pin:()=>Ow,spi_D_pin:()=>Rw});const mt=Blockly,Et=Mixly,Ot={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(o+=n)):i=o}else i="i";return i}},Rt=Ot; +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class ct{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(mt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(mt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_if_else");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(mt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(mt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Gt={init:function(){this.setColour(Xt),this.appendValueInput("FROM").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.PYTHON_RANGE).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Ut={init:function(){this.setColour(Xt),this.appendValueInput("LIST").setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(mt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return mt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},wt={init:function(){this.setColour(Xt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new mt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(mt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:mt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:mt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},kt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new mt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(mt.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_finally");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Ht={init:function(){this.setColour(Xt);var t=new mt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:mt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:mt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Wt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new mt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return mt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Kt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new mt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return mt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};wt.OPERATORS=[[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Ht.OPERATORS=[[mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Jt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},qt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Qt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(mt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},zt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},jt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(mt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},$t={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(mt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Zt={init:function(){this.jsonInit({message0:mt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:Xt,tooltip:mt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:mt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},te={init:function(){this.setColour(Xt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_STAT),this.setOutput(!0)}},ee={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},ie={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},ne={init:function(){this.appendDummyInput().appendField(mt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+mt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(mt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new mt.FieldDropdown([[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Xt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},se={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_e={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},oe={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},pe={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_GET_UNIQUE_IDEN)}},ae={init:function(){this.setColour(Xt),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(mt.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},ue={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},re=230;mt.FieldTextInput.math_number_validator=function(t){return String(t)},mt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const le={init:function(){this.setColour(re),this.appendDummyInput().appendField(new mt.FieldTextInput("0",mt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MATH_NUMBER_TOOLTIP)}},de={init:function(){this.setColour(re);this.appendDummyInput("").appendField(mt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new mt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Ie={init:function(){this.setColour(re);this.appendDummyInput("").appendField(mt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new mt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Te={init:function(){this.setColour(re),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:mt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:mt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:mt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Me={init:function(){this.setColour(re),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:mt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:mt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:mt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},he={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new mt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},me={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new mt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:mt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:mt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:mt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:mt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:mt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:mt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:mt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Ee={init:function(){var t=[[mt.Msg.MATH_BIN,"bin"],[mt.Msg.MATH_OCT,"oct"],[mt.Msg.MATH_HEX,"hex"]];this.setColour(re),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new mt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:mt.Msg.MATH_DEC_TOOLTIP_BIN,oct:mt.Msg.MATH_DEC_TOOLTIP_OCT,hex:mt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Oe={init:function(){var t=[[mt.Msg.LANG_MATH_TO_ROUND,"round"],[mt.Msg.LANG_MATH_TO_CEIL,"ceil"],[mt.Msg.LANG_MATH_TO_FLOOR,"floor"],[mt.Msg.MATH_ABS,"fabs"],[mt.Msg.MATH_SQRT,"sqrt"]];this.setColour(re),this.appendValueInput("A").setCheck(Number).appendField(new mt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:mt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:mt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:mt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:mt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:mt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:mt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Re={init:function(){var t=[[mt.Msg.MIXLY_MAX,"max"],[mt.Msg.MIXLY_MIN,"min"]];this.setColour(re),this.appendValueInput("A").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(mt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:mt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:mt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},ce={init:function(){var t=[[mt.Msg.MATH_TWO,"two"],[mt.Msg.MATH_EIGHT,"eight"],[mt.Msg.MATH_TEN,"ten"],[mt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(re),this.appendDummyInput("").appendField(mt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new mt.FieldDropdown(t),"OP").appendField(mt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MATH_ZHW).appendField(new mt.FieldDropdown(t),"OP2").appendField(mt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:mt.Msg.MATH_Before_two,eight:mt.Msg.MATH_Before_eight,ten:mt.Msg.MATH_Before_ten,sixteen:mt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:mt.Msg.MATH_Behind_two,eight:mt.Msg.MATH_Behind_eight,ten:mt.Msg.MATH_Behind_ten,sixteen:mt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},ge={init:function(){var t=[[mt.Msg.LANG_MATH_INT,"int"],[mt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(re),this.setOutput(!0,Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new mt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:mt.Msg.LANG_MATH_INT,float:mt.Msg.LANG_MATH_FLOAT_RANDOM};return mt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Ce={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(mt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(mt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(mt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(mt.Msg.MATH_CONSTRAIN_TOOLTIP)}},Se={init:function(){this.setColour(re),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(mt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(mt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Ae={init:function(){this.setColour(re),this.appendDummyInput().appendField(new mt.FieldTextInput("0",mt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(mt.Msg.MATH_NUMBER_TOOLTIP)}},Le={init:function(){this.setColour(re),this.appendValueInput("NUM").setCheck(Number).appendField(mt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},Ne={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MATH_ROUND).appendField(mt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(mt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(mt.Msg.MATH_ROUND_NEW_TOOLTIP)}},De={init:function(){var t=[[mt.Msg.MIXLY_TO_INT,"int"],[mt.Msg.MIXLY_TO_FLOAT,"float"],[mt.Msg.MIXLY_TO_BITES,"b"],[mt.Msg.LANG_MATH_BYTE+mt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(re),this.appendValueInput("VAR").appendField(new mt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:mt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:mt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:mt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},fe={init:function(){var t=[[mt.Msg.MIXLY_TO_INT,"int"],[mt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(re),this.appendValueInput("VAR").appendField(new mt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:mt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:mt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},Fe=Se,Pe={init:function(){this.setColour(re),this.appendValueInput("VAR").appendField(mt.Msg.LANG_MATH_BYTE+mt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},Ye={init:function(){this.setColour(re),this.itemCount_=1,this.setMutator(new mt.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(mt.Msg.MIXLY_PRODUCT+mt.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(mt.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(mt.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(mt.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const Ve={init:function(){this.setColour(xe),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new mt.FieldTextInput("",mt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(mt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new mt.FieldImage(e,7,12,'"')}},Be={init:function(){this.setColour(xe),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(mt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},Ge={init:function(){this.setColour(xe),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Ue={init:function(){this.setColour(xe),this.appendValueInput("VAR").setCheck(String).appendField(mt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},we={init:function(){this.setColour(xe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},ke={init:function(){this.setColour(xe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},He={init:function(){this.WHERE_OPTIONS=[[mt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[mt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[mt.Msg.TEXT_GET_INDEX_RANDOM+1+mt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(xe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(mt.Msg.LISTS_GET_INDEX_GET,"MODE"),mt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(mt.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+mt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",mt.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:mt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:mt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:mt.Msg.TEXT_GET_INDEX_RANDOM};return mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+mt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==mt.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),mt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(mt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new mt.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),mt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},We={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(xe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(mt.Msg.LISTS_GET_INDEX_GET+" "+mt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(mt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_MICROBIT_TYPE_STRING+mt.Msg.LISTS_GET_INDEX_FROM_START+"n"+mt.Msg.TEXT_CHARAT2)}},Ke={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(xe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(mt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(mt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Je={init:function(){this.WHERE_OPTIONS_1=[[mt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[mt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[mt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[mt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[mt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[mt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(xe),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(mt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==mt.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==mt.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),mt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(mt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new mt.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},qe={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(xe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(mt.Msg.LISTS_GET_INDEX_GET+" "+mt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(mt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(mt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(mt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},Qe={init:function(){var t=[[mt.Msg.MIXLY_EQUALS,"==="],[mt.Msg.MIXLY_STARTSWITH,"startswith"],[mt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(xe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new mt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},ze={init:function(){this.setColour(xe),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(mt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_COMPARETO_HELP)}},je={init:function(){var t=[[mt.Msg.TEXT_UPPER,"upper"],[mt.Msg.TEXT_TITLE,"title"],[mt.Msg.TEXT_CAPITALIZE,"capitalize"],[mt.Msg.TEXT_SWAPCASE,"swapcase"],[mt.Msg.TEXT_LOWER,"lower"]];this.setColour(xe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new mt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:mt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:mt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:mt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:mt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:mt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},$e={init:function(){var t=[[mt.Msg.TEXT_LJUST,"ljust"],[mt.Msg.TEXT_CENTER,"center"],[mt.Msg.TEXT_RJUST,"rjust"]];this.setColour(xe),this.appendValueInput("VAR").appendField(new mt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(mt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(mt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Ze={init:function(){this.setColour(xe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(mt.Msg.MIXLY_MID+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(mt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ti={init:function(){this.setColour(xe),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},ei={init:function(){this.setColour(xe),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(mt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(mt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},ii={init:function(){this.setColour(xe),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(mt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(mt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},ni={init:function(){var t=[[mt.Msg.TEXT_TRIM_BOTH,"strip"],[mt.Msg.TEXT_TRIM_LEFT,"lstrip"],[mt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(xe),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(mt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new mt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(mt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:mt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:mt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:mt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},si={init:function(){this.setColour(xe),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new mt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new mt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},tn={init:function(){this.setColour($i),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},en={init:function(){this.setColour($i),this.appendDummyInput().appendField(mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},nn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_KEYS),this.setTooltip(mt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},sn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(mt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(mt.Msg.DICTS_GET_TOOLTIP)}},_n={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(mt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(mt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(mt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},on={init:function(){this.setColour($i),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(mt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},pn={init:function(){this.setColour($i),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(mt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_DELETE_TOOLTIP)}},an={init:function(){this.setColour($i),this.appendValueInput("DICT2").setCheck("Dict").appendField(mt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(mt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MID),this.setTooltip(mt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},un={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_CLEAR),this.setTooltip(mt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},rn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_ITEMS),this.setTooltip(mt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},ln={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_VALUES),this.setTooltip(mt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},dn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_LENGTH),this.setTooltip(mt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},In={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_DELDICT),this.setTooltip(mt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tn={init:function(){this.MODE=[[mt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[mt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(mt.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=mt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=mt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==mt.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new mt.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},Mn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(mt.Msg.DICTS_ADD_VALUE),this.setTooltip(mt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},hn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(mt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},mn={init:function(){this.setColour($i),this.appendDummyInput("").appendField(new mt.FieldLabel(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new mt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},En={init:function(){this.setColour($i),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},On={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TO_JSON),this.setTooltip(mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Rn={init:function(){this.setColour($i),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},cn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},gn={init:function(){this.setColour($i),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TO_JSON),this.setTooltip(mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Cn=210,Sn={init:function(){var t=mt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:mt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:mt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:mt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:mt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:mt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:mt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},An={init:function(){var t=mt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=mt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new mt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Ln={init:function(){var t=[[mt.Msg.LOGIC_OPERATION_AND,"AND"],[mt.Msg.LOGIC_OPERATION_OR,"OR"],[mt.Msg.LOGIC_OPERATION_NOR,"NOR"],[mt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new mt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:mt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:mt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:mt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:mt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},Nn={init:function(){this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(mt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(mt.Msg.LOGIC_NEGATE_TOOLTIP)}},Dn={init:function(){var t=[[mt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[mt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new mt.FieldDropdown(t),"BOOL"),this.setTooltip(mt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},fn={init:function(){this.setColour(Cn),this.setOutput(!0),this.appendDummyInput().appendField(mt.Msg.LOGIC_NULL),this.setTooltip(mt.Msg.LOGIC_NULL_TOOLTIP)}},Fn={init:function(){this.setColour(Cn),this.appendValueInput("A"),this.appendValueInput("B").appendField(mt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(mt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},Pn={init:function(){var t=[[mt.Msg.TEXT_APPEND_TO,"in"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Cn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new mt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(mt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.IN)}},Yn={init:function(){var t=[[mt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Cn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},vn={init:function(){this.setColour(Cn),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Xn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(mt.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},xn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_USE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=mt.Msg.MIXLY_BELONG;return i+{r:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},yn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_USE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=mt.Msg.MIXLY_BELONG,o=mt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},bn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(mt.Msg.MIXPY_TEXT_ENCODE).appendField(new mt.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_USE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=mt.Msg.MIXLY_BELONG,o=mt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},Vn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+mt.Msg.MIXLY_MICROBIT_TYPE_STRING+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Gn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(mt.Msg.MICROBIT_PYTHON_TYPE)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.HTML_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Wn={init:function(){this.setColour(0),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Kn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Jn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},zn={init:function(){this.setColour(0),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},jn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+mt.Msg.MIXLY_ESP32_SET+{mkdir:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},$n={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(mt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},ts={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.HTML_FILE,"isfile"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},es={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(mt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},is={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(mt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},ns={init:function(){var t=mt.Procedures.findLegalName("",this),e=new mt.FieldTextInput(t,mt.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new mt.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&mt.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(mt.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(mt.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(mt.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(mt.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=mt.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),mt.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{mt.Events.enable()}},mutationToDom:function(t){var e=mt.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(mt.Msg.MIXLY_AIP_ATTR).setAlign(mt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},js={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(mt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},$s={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(mt.Msg.HTML_FORM_CONTENT).appendField(new mt.FieldDropdown([[mt.Msg.HTML_TEXT,"text"],[mt.Msg.HTML_EMAIL,"email"],[mt.Msg.HTML_NUMBER,"number"],[mt.Msg.HTML_PASSWORD,"password"],[mt.Msg.HTML_CHECKBOX,"checkbox"],[mt.Msg.HTML_RADIOBUTTON,"radiobutton"],[mt.Msg.HTML_BUTTON,"button"],[mt.Msg.HTML_COLOUR,"colour"],[mt.Msg.HTML_DATE,"date"],[mt.Msg.HTML_LOCALTIME,"local time"],[mt.Msg.HTML_FILE,"file"],[mt.Msg.HTML_HIDDEN,"hidden"],[mt.Msg.HTML_IMAGE,"image"],[mt.Msg.HTML_MONTH,"month"],[mt.Msg.HTML_RANGE,"range"],[mt.Msg.HTML_RESET,"reset"],[mt.Msg.HTML_SEARCH,"search"],[mt.Msg.HTML_SUBMIT,"submit"],[mt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[mt.Msg.HTML_TIME,"time"],[mt.Msg.HTML_URL,"url"],[mt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(mt.Msg.HTML_NAME).appendField(new mt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(mt.Msg.HTML_VALUE).appendField(new mt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(mt.Msg.MIXLY_AIP_ATTR).setAlign(mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zs={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},t_={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},e_={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(mt.Msg.HTML_TEXT).appendField(new mt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},i_=160,n_={init:function(){this.setColour(i_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new mt.FieldTable(""),"TEXT")}},s_={init:function(){this.setColour(i_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT")}},__={init:function(){this.setColour(i_),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},o_={init:function(){this.setColour(i_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},p_={init:function(){this.setColour(i_),this.appendDummyInput().appendTitle("Comment:").appendTitle(new mt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},a_={init:function(){this.setColour(i_),this.appendValueInput("VALUE").appendField(mt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},u_={init:function(){this.setColour(i_),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new mt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(mt.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=mt.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+t+", "+e+", "+i+")"},mt.isNumber(n)&&mt.isNumber(s)&&mt.isNumber(_))n=parseFloat(n),s=parseFloat(s),_=Math.abs(parseFloat(_)),0==n%1&&0==s%1&&0==_%1?(n<=s?(s++,t=0==n&&1==_?s:n+", "+s,1!=_&&(t+=", "+_)):t=n+", "+--s+", -"+_,t="range("+t+")"):(t=n",GTE:">="};const sa=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",_=e.valueToCode(this,"B",n)||"False";if("AND"==i)var o=s+" and "+_;else if("OR"==i)o=s+" or "+_;else if("NOR"==i)o="not("+s+"^"+_+")";else o=s+"^"+_;return[o,n]},_a=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},oa=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},pa=function(t,e){return["None",e.ORDER_ATOMIC]},aa=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},ua=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},ra=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},la=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},da=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Ia=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Ta=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Ma=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ha=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},ma=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Ea=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Oa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ra=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},ca=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},ga=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Ca=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Sa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Aa=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},La=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Na=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},Da=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},fa=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Fa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Pa=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},Ya=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},va=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Xa=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},xa=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),mt.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var _=[],o=0;o\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},hu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},mu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},Eu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Ou=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Ru=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},cu=function(t,e){return'"},gu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Cu=function(){return this.getFieldValue("TEXT")+"\n"},Su=function(t){return t.getFieldValue("TEXT")+"\n"},Au=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Lu=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Nu=function(){return""},Du=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},fu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n")},vu.scrubNakedValue=function(t){return t+"\n"},vu.quote_=function(t){var e="'";return-1!==t.indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},vu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},vu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=mt.utils.string.wrap(_,vu.COMMENT_WRAP-3),n+=vu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const Xu="#74A55B",xu={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_RGB_PIN_COUNT)}},yu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},bu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Vu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Bu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(mt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(mt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Gu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Uu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_RESET)}},wu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ku={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Hu={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Wu={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Ku={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Ju={init:function(){this.setColour(Xu),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},qu={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_MOVE)}},Qu={init:function(){this.setColour(Xu),this.appendValueInput("VAR").appendField("360°"+mt.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SETTING+mt.Msg.blockpy_turtle_rotate+mt.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},zu={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("180°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_MOVE)}},ju={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("360°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},$u={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("180°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Zu={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("360°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},tr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new mt.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(mt.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},er={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[mt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[mt.Msg.MOTOR_N,"ms32006.MOT_N"],[mt.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},ir={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new mt.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[mt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},nr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_RGB_PIN_COUNT)}},sr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},_r={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},or={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_WRI)}},pr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ar={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.PYTHON_RANGE_STEP).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ur={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new mt.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new mt.FieldDropdown([["SYN6288"+mt.Msg.MIXLY_AipSpeech_synthesis,"SYN6288"],["NS9300"+mt.Msg.MIXLY_MUSIC_PLAYER,"NS9300"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},rr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_WHETHER).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_STOPPED,"0"],[mt.Msg.MIXLY_PLAYING,"1"],[mt.Msg.MIXLY_PAUSED,"2"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},lr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_STAT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MP3_PLAY,"1"],[mt.Msg.MIXLY_MP3_PAUSE,"2"],[mt.Msg.MIXLY_STOP,"3"],[mt.Msg.MIXLY_MP3_PREV,"4"],[mt.Msg.MIXLY_MP3_NEXT,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendValueInput("volume").appendField(mt.Msg.MIXLY_MP3_VOL+mt.Msg.MIXLY_STAT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_PLAYER_SET_VOLUME_TOOLTIP)}},Ir={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MODE+mt.Msg.MIXLY_STAT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MP3_LOOP_ALL,"0"],[mt.Msg.MIXLY_MP3_LOOP_ONE,"1"],[mt.Msg.MIXLY_PLAYER_DIRECTORY_LOOP,"2"],[mt.Msg.MIXLY_MP3_LOOP_RAM,"3"],[mt.Msg.MIXLY_PLAYER_SINGLE_STOP,"4"],[mt.Msg.MIXLY_PLAYER_SEQUENTIAL_PLAY,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_START_MELODY,"play"],[mt.Msg.MIXLY_PLAYER_INSERT_MUSIC,"insert"]]),"key"),this.appendValueInput("song"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_PLAYER_PLAY_MUSIC_TOOTIP)}},Mr={},hr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(mt.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},mr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Er={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(mt.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(mt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},Or={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(mt.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(mt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},Rr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},cr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},gr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Cr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_TRAFFIC_LIGHT).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LISTS_SET_INDEX_SET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Sr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_WHITE,"W"],[mt.Msg.COLOUR_RGB_RED,"R"],[mt.Msg.COLOUR_RGB_YELLOW,"Y"],[mt.Msg.COLOUR_RGB_GREEN,"G"],[mt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ar={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_WHITE,"W"],[mt.Msg.COLOUR_RGB_RED,"R"],[mt.Msg.COLOUR_RGB_YELLOW,"Y"],[mt.Msg.COLOUR_RGB_GREEN,"G"],[mt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Lr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[mt.Msg.MIXLY_SPEED,"[1]"],[mt.Msg.MATH_SINGLE_OP_ABSOLUTE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[mt.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[mt.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[mt.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Nr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[mt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[mt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MATH_SINGLE_OP_ABSOLUTE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MODE).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPEED+mt.Msg.MIXLY_MODE,"0"],[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+mt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"0"],[mt.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[mt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},Fr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Pr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField("("+mt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MODE).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPEED+mt.Msg.MIXLY_MODE,"0"],[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+mt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},Yr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField("("+mt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MODE).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPEED+mt.Msg.MIXLY_MODE,"0"],[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+mt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"0"],[mt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MOTOR,"ext_motor"],[mt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[mt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[mt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[mt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[mt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[mt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[mt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},Xr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MOTOR,"ext_motor"],[mt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[mt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[mt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[mt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[mt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[mt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[mt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},xr={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_AT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},yr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("pin").appendField("LED"),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},br={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SERVO+mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_AT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Vr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_SERVO),this.appendValueInput("angle").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE),this.appendDummyInput().appendField(mt.Msg.DRAW_POINTER_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Br={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_MOTOR+mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_AT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Gr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MOTOR),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+mt.Msg.MIXLY_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ur="#6C9858",wr={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},kr={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_ON,"1"],[mt.Msg.MIXLY_ESP32_OFF,"0"],[mt.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Hr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Wr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(mt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Kr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Jr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SETTING+mt.Msg.MIXLY_BUILDIN_LED+mt.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},qr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(mt.Msg.MIXLY_LCD_SETCOLOR).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LIGHT_RED,"1"],[mt.Msg.MIXLY_LIGHT_GREEN,"2"],[mt.Msg.MIXLY_LIGHT_BLUE,"3"],[mt.Msg.MIXLY_LIGHT_YELLOW,"4"],[mt.Msg.MIXLY_LIGHT_CYAN,"5"],[mt.Msg.MIXLY_LIGHT_PURPLE,"6"],[mt.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Qr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},zr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(mt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},jr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},$r={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SETTING+mt.Msg.MIXLY_BUILDIN_LED+mt.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},Zr={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},tl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Et.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},el={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},il={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},nl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.PYTHON_RANGE_STEP).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},sl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_WRI)}},_l={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Et.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},ol={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},pl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.PYTHON_RANGE_STEP).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},al={init:function(){this.setColour(Ur),this.appendValueInput("TICKS").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(mt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(mt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},ul={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},rl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_RESET)}},ll={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},dl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Il={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tl={init:function(){this.setColour(Ur),this.appendValueInput("LIST").appendField(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Ml={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MOTOR_DC).appendField(new mt.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"CW"],[mt.Msg.ANTI_CLOCKWISE,"CCW"],[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},hl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField("MixGo Car").appendField(new mt.FieldDropdown([[mt.Msg.blockpy_forward,"F"],[mt.Msg.blockpy_backward,"B"],[mt.Msg.blockpy_left,"L"],[mt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ml={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField("MixGo Car").appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},El={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MOTOR_DC).appendField(new mt.FieldDropdown([[mt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[mt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"CW"],[mt.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ol={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MOTOR_DC).appendField(new mt.FieldDropdown([[mt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[mt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_STOP).appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Rl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},cl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(new mt.FieldDropdown([[mt.Msg.blockpy_forward,"F"],[mt.Msg.blockpy_backward,"B"],[mt.Msg.blockpy_left,"L"],[mt.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[mt.Msg.MIXLY_SPEED,"SPEED"],[mt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},gl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Cl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(mt.Msg.MIXLY_MOTOR).appendField(new mt.FieldDropdown([[mt.Msg.TEXT_TRIM_LEFT,"1"],[mt.Msg.TEXT_TRIM_RIGHT,"2"],[mt.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[mt.Msg.MIXLY_SPEED,"SPEED"],[mt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Sl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[mt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Al={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.BITBOT).appendField(new mt.FieldDropdown([[mt.Msg.blockpy_forward,"F"],[mt.Msg.blockpy_backward,"B"],[mt.Msg.blockpy_left,"L"],[mt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ll={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.BITBOT).appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Nl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.BITBOT).appendField(mt.Msg.MIXLY_MOTOR).appendField(new mt.FieldDropdown([[mt.Msg.TEXT_TRIM_LEFT,"0"],[mt.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"CW"],[mt.Msg.ANTI_CLOCKWISE,"CCW"],[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dl={init:function(){this.setColour(Ur),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},fl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Fl={init:function(){this.setColour(Ur),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_SETTING+mt.Msg.MIXLY_MIXBOT_BUZZER+mt.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Pl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_MIXBOT_BUZZER+mt.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Yl={init:function(){this.setColour(Ur),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_RECORD_AUDIO).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(mt.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},vl={init:function(){this.setColour(Ur),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_PLAY_AUDIO).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Xl={init:function(){this.setColour(Ur),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},xl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},yl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.ME_GO_MOTOR_EXTERN).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([["1","1"],["2","2"],["3","3"],["4","4"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.blynk_IOT_IR_POWER+mt.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Vl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.ME_GO_MOTOR_EXTERN).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.blynk_IOT_IR_POWER+mt.Msg.MIXLY_PINMODEOUT+mt.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Bl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.ME_GO_MOTOR_EXTERN).appendField(mt.Msg.MIXLY_ALL+mt.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(mt.ALIGN_RIGHT).appendField(mt.Msg.blynk_IOT_IR_POWER+mt.Msg.MIXLY_PINMODEOUT+mt.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Gl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.ANALOG+mt.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(mt.Msg.MIXLY_RELEASE).appendField(new mt.FieldDropdown([[mt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[mt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.ANALOG+mt.Msg.MIXLY_KEYBOARD_INPUT)}},Ul={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SPECIAL_KEY).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[mt.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[mt.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[mt.Msg.MIXLY_SPECIAL_KEY4,"0x04"],[mt.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[mt.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[mt.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[mt.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[mt.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},wl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GENERAL_KEY).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],["A","0x04"],["B","0x05"],["C","0x06"],["D","0x07"],["E","0x08"],["F","0x09"],["G","0x0A"],["H","0x0B"],["I","0x0C"],["J","0x0D"],["K","0x0E"],["L","0x0F"],["M","0x10"],["N","0x11"],["O","0x12"],["P","0x13"],["Q","0x14"],["R","0x15"],["S","0x16"],["T","0x17"],["U","0x18"],["V","0x19"],["W","0x1A"],["X","0x1B"],["Y","0x1C"],["Z","0x1D"],["1 !","0x1E"],["2 @","0x1F"],["3 #","0x20"],["4 $","0x21"],["5 %","0x22"],["6 ^","0x23"],["7 &","0x24"],["8 *","0x25"],["9 (","0x26"],["0 )","0x27"],["ENTER","0x28"],["ESC","0x29"],["BACKSPACE","0x2A"],["TAB","0x2B"],["SPACE","0x2C"],["- _","0x2D"],["= +","0x2E"],["[ {","0x2F"],["] }","0x30"],["\\ |","0x31"],["; :","0x33"],["' \"","0x34"],["` ~","0x35"],[", <","0x36"],[". >","0x37"],["/ ?","0x38"],["CAPS_LOCK","0x39"],["F1","0x3A"],["F2","0x3B"],["F3","0x3C"],["F4","0x3D"],["F5","0x3E"],["F6","0x3F"],["F7","0x40"],["F8","0x41"],["F9","0x42"],["F10","0x43"],["F11","0x44"],["F12","0x45"],["PRINTSCREEN","0x46"],["SCROLL_LOCK","0x47"],["PAUSE","0x48"],["INSERT","0x49"],["HOME","0x4A"],["PAGE_UP","0x4B"],["DELETE","0x4C"],["END","0x4D"],["PAGE_DOWN","0x4E"],["RIGHT","0x4F"],["LEFT","0x50"],["DOWN","0x51"],["UP","0x52"],["NUM_LOCK","0x53"],["/","0x54"],["*","0x55"],["-","0x56"],["+","0x57"],["ENTER","0x58"],["1","0x59"],["2","0x5A"],["3","0x5B"],["4","0x5C"],["5","0x5D"],["6","0x5E"],["7","0x5F"],["8","0x60"],["9","0x61"],["0","0x62"],[".","0x63"]]),"op"),this.setOutput(!0)}},kl={init:function(){this.setColour(Ur),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new mt.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(mt.Msg.GENERALKEY_TUPLE_CREATE_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("generalkey_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;nnew Array(32).fill(0)))},im={init:function(){this.jsonInit({colour:Kh,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:mt.Msg.MIXLY_MICROBIT_Built_in_image1,message0:mt.Msg.MIXLY_MICROBIT_Built_in_image})}},nm={init:function(){this.setColour(Kh),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg),"image"),this.setOutput(!0,["esp32_image","List"])}},sm={init:function(){this.setColour(Kh),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(mt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new mt.FieldDropdown(sm.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":mt.Msg.MIXLY_MICROBIT_image_add,"-":mt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[mt.Msg.MICROBIT_DISPLAY_UNION,"add"],[mt.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},_m={init:function(){this.setColour(Kh),this.appendValueInput("A").setCheck("esp32_image").appendField(mt.Msg.MIXLY_MICROBIT_Invert_image1),this.setInputsInline(!0),this.setOutput(!0,"esp32_image")}},om={init:function(){this.setColour(Kh),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_LET2).appendField(new mt.FieldDropdown(om.OPERATORS),"OP"),this.appendValueInput("val").appendField(mt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_UNIT);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=mt.Msg.DISPLAY_IMAGE_LET,n=mt.Msg.DISPLAY_IMAGE_LET2,s=mt.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:mt.Msg.MIXLY_UP,shift_down:mt.Msg.MIXLY_DOWN,shift_left:mt.Msg.MIXLY_LEFT,shift_right:mt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[mt.Msg.MIXLY_UP,"shift_up"],[mt.Msg.MIXLY_DOWN,"shift_down"],[mt.Msg.MIXLY_LEFT,"shift_left"],[mt.Msg.MIXLY_RIGHT,"shift_right"]]},pm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},am={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},um={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},rm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},lm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Clear_display);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Clear_display)}},dm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_SHOW+mt.Msg.MIXLY_DISPLAY_MATRIX_WRITE_NOW),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Im={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<8;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Tm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(Tm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},Mm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},hm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(hm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},mm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<16;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,"esp32_image"),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Em={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(Em.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},Om={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.OLED_SET_FONT).appendField(new mt.FieldDropdown(Om.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+mt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+mt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+mt.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Rm={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING)}},cm={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING)}},gm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(mt.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING)}},Cm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(mt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(mt.Msg.TEXT_CENTER).appendField(new mt.FieldDropdown([[mt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[mt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},Sm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(mt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},Am={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Lm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Nm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"state",options:[[mt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[mt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"shape",options:[[mt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[mt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:mt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Dm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"state",options:[[mt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[mt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"dir_h_v",options:[[mt.Msg.mpython_vertical,"0"],[mt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:mt.Msg.MPYTHON_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},fm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"state",options:[[mt.Msg.mpython_display_hline_1,"1"],[mt.Msg.mpython_display_hline_0,"0"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.mpython_display_line_TOOLTIP,message0:mt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},Fm={init:function(){this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new mt.FieldDropdown(Fm.IMAGES),"path"),this.setColour(Kh),this.setOutput(!0)},IMAGES:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]]},Pm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<5;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Ym={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(Ym.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},vm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Xm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_AMBIENTBRIGHT),this.setInputsInline(!0),this.setOutput(!0,Number)}},xm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},ym={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new mt.FieldDropdown(ym.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[mt.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[mt.Msg.CLOCKWISE+"90"+mt.Msg.blockpy_setheading_degree,"1"],[mt.Msg.CLOCKWISE+"180"+mt.Msg.blockpy_setheading_degree,"2"],[mt.Msg.CLOCKWISE+"270"+mt.Msg.blockpy_setheading_degree,"3"]]},bm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<12;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Vm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(Vm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},Bm={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Gm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.OLED_BITMAP).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("direct").setCheck(String).appendField(mt.Msg.MIXLY_AipImageClassify_Image+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Um={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(mt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(mt.Msg.TEXT_CENTER).appendField(new mt.FieldDropdown([[mt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[mt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},wm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},km={init:function(){this.jsonInit({colour:Kh,args0:[{name:"shape",options:[[mt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[mt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:mt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Hm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"dir_h_v",options:[[mt.Msg.mpython_vertical,"0"],[mt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:mt.Msg.ONBOARD_TFT_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},Wm={init:function(){this.jsonInit({colour:Kh,args0:[{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.mpython_display_line_TOOLTIP,message0:mt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},Km={init:function(){this.setColour(Kh),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(mt.Msg.HTML_COLOUR),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},Jm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_LCD_SETCOLOR).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},qm={init:function(){this.setColour(Kh),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_SCREEN_FILL);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Qm={init:function(){this.setColour(Kh),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_INIT_CLOCK),this.appendDummyInput().appendField(mt.Msg.MIXLY_CENTER_POS),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.OLED_CIRCLE_RADIUS),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},zm={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.GET_RTCTIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},jm={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.SET_TIME),this.appendValueInput("h").setCheck(Number).appendField(mt.Msg.MIXLY_HOUR),this.appendValueInput("m").setCheck(Number).appendField(mt.Msg.MIXLY_MINUTE),this.appendValueInput("s").setCheck(Number).appendField(mt.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},$m={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.DRAW_CLOCK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Zm={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.CLEAR_CLOCK),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_STM32_TFT_BACKGROUND_COLOR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},tE={init:function(){this.jsonInit({colour:Kh,args0:[{name:"shape",options:[[mt.Msg.MPYTHON_DISPLAY_HOLLOW,"False"],[mt.Msg.MPYTHON_DISPLAY_SOLID,"True"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"r",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,message0:mt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_CIRCLE_MESSAGE0,nextStatement:null,previousStatement:null})}},eE={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.DRAW_POINTER).appendField(mt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(mt.Msg.MIXLY_DRAW_POINTER_DU),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.DRAW_POINTER_TOOLTIP)}},iE={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.DRAW_POINTER).appendField(mt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(mt.Msg.MIXLY_DRAW_POINTER_DU),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.DRAW_POINTER_TOOLTIP)}},nE={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.MIXLY_Display_long_text),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},sE={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},_E={init:function(){Qh.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},oE={init:function(){$h.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},pE={init:function(){om.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},aE={init:function(){um.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},uE={init:function(){rm.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},rE={init:function(){lm.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},lE=180,dE={init:function(){this.setColour(lE),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(mt.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_LET2).appendField(new mt.FieldDropdown(dE.OPERATORS),"OP"),this.appendValueInput("val").appendField(mt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=mt.Msg.DISPLAY_IMAGE_LET,n=mt.Msg.DISPLAY_IMAGE_LET2,s=mt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:mt.Msg.MIXLY_UP,down:mt.Msg.MIXLY_DOWN,left:mt.Msg.MIXLY_LEFT,right:mt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[mt.Msg.MIXLY_UP,"up"],[mt.Msg.MIXLY_DOWN,"down"],[mt.Msg.MIXLY_LEFT,"left"],[mt.Msg.MIXLY_RIGHT,"right"]]},IE={init:function(){this.setColour(lE),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(mt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new mt.FieldDropdown(IE.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":mt.Msg.MIXLY_MICROBIT_image_add,"-":mt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[mt.Msg.MICROBIT_DISPLAY_UNION,"+"],[mt.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},TE={init:function(){this.setColour(lE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+mt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new mt.FieldDropdown(TE.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+mt.Msg.MIXLY_MICROBIT_IMAGE+{height:mt.Msg.MIXLY_HEIGHT,width:mt.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[mt.Msg.MIXLY_HEIGHT,"height"],[mt.Msg.MIXLY_WIDTH,"width"]]},ME={init:function(){this.setColour(lE),this.appendValueInput("VAR").appendField(mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RECT).appendField(new mt.FieldDropdown(ME.STATUS),"OP"),this.jsonInit({message0:mt.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_OLED_RECT)},STATUS:[[mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},hE={init:function(){this.setColour(lE),this.appendValueInput("VAR").appendField(mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new mt.FieldDropdown(hE.STATUS),"OP"),this.jsonInit({message0:mt.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},mE={init:function(){this.setColour(lE),this.appendValueInput("VAR").appendField(mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_DISPLAY_DRAW+mt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new mt.FieldDropdown(mE.STATUS),"OP"),this.jsonInit({message0:mt.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_DISPLAY_DRAW+mt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},EE="#777777",OE={init:function(){this.setColour(EE),this.appendDummyInput("").appendField("from ").appendField(new mt.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new mt.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},RE={init:function(){this.setColour(EE),this.appendDummyInput("").appendField("import ").appendField(new mt.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cE={init:function(){this.setColour(EE),this.appendDummyInput("").appendField(new mt.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new mt.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},aO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},uO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},rO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},lO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(mt.Msg.MIXLY_WIFI_USERNAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(mt.Msg.MIXLY_IOT_PASSWORD).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_PROJECT).setAlign(mt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(mt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},IO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_SUBSCRIBE+mt.Msg.MIXLY_MICROBIT_MSG).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(mt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},TO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},MO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},EO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},OO={init:function(){this.setColour(eO),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},RO={init:function(){this.setColour(eO),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},cO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},gO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO").appendField(mt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(mt.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},CO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+mt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},SO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},AO={init:function(){this.VISITOR_ID=Et.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(eO),this.appendDummyInput("").appendField(new mt.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},LO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO").appendField(mt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},NO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("HTTP"+mt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(mt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(mt.Msg.MIXLY_REQUESTS_GET).appendField(mt.Msg.MIXLY_GET_CURRENT_TIME).appendField(mt.Msg.MIXLY_OPEN_DEBUG).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},DO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("HTTP"+mt.Msg.MIXLY_Client).appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[mt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[mt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},fO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MQTT"+mt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(mt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(mt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(mt.Msg.MQTT_Topic).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(mt.Msg.MIXLY_OPEN_DEBUG).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},FO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MQTT"+mt.Msg.MIXLY_Client).appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[mt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[mt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},PO=iO,YO=nO,vO=sO,XO=_O,xO=pO,yO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(mt.Msg.MODEL_NAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(mt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bO=yO,VO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(mt.Msg.MIXLY_API_PRIVATE_KEY).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(mt.Msg.MODEL_NAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(mt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},BO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(mt.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},GO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(mt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},UO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("Ollama "+mt.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wO=225,kO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(mt.Msg.MIXLY_NETWORK_MODE).appendField(new mt.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},HO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[mt.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=mt.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:mt.Msg.MIXLY_NETWORK_WIFI_OPEN,False:mt.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},WO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},KO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return mt.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:mt.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},JO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(mt.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(mt.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},qO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_CONNECT+mt.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},QO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[mt.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[mt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:mt.Msg.MIXLY_ESP32_NETWORK_IP,1:mt.Msg.MIXLY_ESP32_NETWORK_MASK,2:mt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},zO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},jO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[mt.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},$O={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(mt.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(mt.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},ZO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},tR={init:function(){this.setColour(wO),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new mt.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},eR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},iR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},nR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},sR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},_R={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},oR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},pR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},aR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},uR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},rR={init:function(){this.setColour(wO),this.appendValueInput("DOMAIN").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(mt.Msg.blockpy_REQUESTS_GET).appendField(new mt.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},lR={init:function(){this.appendValueInput("VAL"),this.setColour(wO),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(lR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:mt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:mt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:mt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[mt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},dR={init:function(){this.appendValueInput("VAR").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(wO),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown(dR.METHOD),"DIR"),this.appendDummyInput("").appendField(mt.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:mt.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:mt.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},IR={init:function(){this.setColour(wO),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(mt.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},TR={init:function(){this.setColour(wO),this.appendDummyInput("").appendField(new mt.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},MR="#3288dd",hR={init:function(){this.setColour(MR),this.appendValueInput("URL").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(mt.Msg.blockpy_REQUESTS).appendField(mt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},mR={init:function(){this.setColour(MR),this.appendValueInput("URL").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(mt.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(mt.Msg.blockpy_REQUESTS+mt.Msg.OLED_STRING),this.appendDummyInput("").appendField(mt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},ER={init:function(){this.appendValueInput("VAL"),this.setColour(MR),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(ER.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[mt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[mt.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},OR={init:function(){this.setColour(MR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(mt.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(mt.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(mt.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},RR={init:function(){this.setColour(MR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(mt.Msg.MIXLY_EMQX_PORT).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(mt.Msg.MIXLY_WIFI_USERNAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(mt.Msg.MIXLY_IOT_PASSWORD).setAlign(mt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cR={init:function(){this.setColour(MR),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_SUBSCRIBE+mt.Msg.MIXLY_MICROBIT_MSG).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(mt.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},gR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_SUBSCRIBE+mt.Msg.MIXLY_MICROBIT_MSG).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(mt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},CR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(mt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},SR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("mqtt"+mt.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},AR="#A58C5B",LR={init:function(){this.setColour(AR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(mt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SENOR_IS_PRESSED)}},NR={init:function(){this.setColour(AR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(mt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SENOR_WAS_PRESSED)}},DR={init:function(){this.setColour(AR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_BUTTON+mt.Msg.MIXLY_GET_PRESSES)}},fR={init:function(){this.setColour(AR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[mt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[mt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},FR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_shake,"shake"],[mt.Msg.MIXLY_UP,"up"],[mt.Msg.MIXLY_DOWN,"down"],[mt.Msg.MIXLY_LEFT,"left"],[mt.Msg.MIXLY_RIGHT,"right"],[mt.Msg.MIXLY_MICROBIT_face_up,"face up"],[mt.Msg.MIXLY_MICROBIT_face_down,"face down"],[mt.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=mt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=mt.Msg.MSG.catSensor,s=mt.Msg.MIXLY_MICROBIT_JS_STATE,_=mt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:mt.Msg.MIXLY_MICROBIT_shake,up:mt.Msg.MIXLY_UP,down:mt.Msg.MIXLY_DOWN,left:mt.Msg.MIXLY_LEFT,right:mt.Msg.MIXLY_RIGHT,"face up":mt.Msg.MIXLY_MICROBIT_face_up,"face down":mt.Msg.MIXLY_MICROBIT_face_down,freefall:mt.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+_}))}},PR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},YR={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},vR={init:function(){this.setColour(AR),this.appendValueInput("PIN",Number).appendField(new mt.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new mt.FieldDropdown(vR.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]},XR={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},xR={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},yR={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new mt.FieldDropdown([[mt.Msg.TEXT_TRIM_LEFT,"left"],[mt.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(mt.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=mt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=mt.Msg.MIXLY_ESP32_NEAR;return i+{left:mt.Msg.TEXT_TRIM_LEFT,right:mt.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},bR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_ALTITUDE_SENSOR+" BMP280").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[mt.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":mt.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":mt.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},VR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+" SHT20").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[mt.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},BR={init:function(){this.setColour(AR),this.appendValueInput("PIN",Number).appendField("DS18X20 "+mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},GR={init:function(){this.setColour(AR),this.appendDummyInput("").appendField("LM35"+mt.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_LM35)}},UR={init:function(){this.setColour(AR),this.appendValueInput("I2CSUB").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_EXTERN_LIGHT+"(LTR308ALS)","LTR308"],[mt.Msg.MIXLY_COLOR_SENSOR+"(LTR381RGB)","LTR381RGB"],[mt.Msg.MIXLY_COLOR_SENSOR+"(UCS12071)","UCS12071"],[mt.Msg.MIXLY_EXTERN_LIGHTUV+"(LTR390UV)","LTR390UV"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(HP203X)","HP203X"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(SPL06_001)","SPL06_001"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(MS5611)","MS5611"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(BMP280)","BMP280"],[mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHTC3)","SHTC3"],[mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(AHT21)","AHT21"],[mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHT20)","SHT20"],[mt.Msg.MIXLY_LASER_RANGE_SENSOR+"(VL53L0X)","VL53L0X"],[mt.Msg.MIXLY_GEOMAGNETIC_SENSOR+"(QMC5883L)","QMC5883L"],[mt.Msg.MIXLY_ESP32_MAX30102+"(MAX30102)","MAX30102"],[mt.Msg.HTML_COLOUR+"、"+mt.Msg.MIXLY_ENVIRONMENT_LIGHT+"、"+mt.Msg.MIXLY_NEXT+"、"+mt.Msg.MIXLY_ESP32_APDS9960+"(APDS9960)","APDS9960"],[mt.Msg.MIXLY_NINE_AXIS_SENSOR+"(MPU9250)","MPU9250"],[mt.Msg.MixGo_MPU9250+"(ADXL345)","ADXL345"],["RFID","RFID"],[mt.Msg.MIXLY_RADAR_SENSOR+"(CBR817)","CBR817"],[mt.Msg.MIXLY_AipSpeech_asr+"(CI130X)","CI130X"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},wR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(mt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+mt.Msg.MIXLY_DELAY_TIME_RANGE)}},kR={init:function(){this.setColour(AR),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RADAR).appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(mt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+mt.Msg.MIXLY_DELAY_TIME_RANGE)}},HR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},WR={init:function(){this.setColour(AR),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RADAR).appendField(mt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},KR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_IDENTIFY_ONCE_AND_SAVE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},JR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_HELLO_XIAOZHI,"1"],[mt.Msg.MIXLY_XIAOZHIXIAOZHI,"2"],[mt.Msg.MIXLY_THE_FIRST,"3"],[mt.Msg.MIXLY_THE_SECOND,"4"],[mt.Msg.MIXLY_THE_THIRD,"5"],[mt.Msg.MIXLY_THE_FOURTH,"6"],[mt.Msg.MIXLY_THE_FIFTH,"7"],[mt.Msg.MIXLY_THE_SIXTH,"8"],[mt.Msg.MIXLY_THE_SEVENTH,"9"],[mt.Msg.MIXLY_THE_EIGHTH,"10"],[mt.Msg.MIXLY_THE_NINTH,"11"],[mt.Msg.MIXLY_THE_TENTH,"12"],[mt.Msg.MIXLY_THE_ELEVENTH,"13"],[mt.Msg.MIXLY_THE_TWELFTH,"14"],[mt.Msg.MIXLY_THE_13TH,"15"],[mt.Msg.MIXLY_THE_14TH,"16"],[mt.Msg.MIXLY_THE_15TH,"17"],[mt.Msg.MIXLY_THE_16TH,"18"],[mt.Msg.MIXLY_THE_17TH,"19"],[mt.Msg.MIXLY_THE_18TH,"20"],[mt.Msg.MIXLY_THE_19TH,"21"],[mt.Msg.MIXLY_THE_20TH,"22"],[mt.Msg.MIXLY_Turn_on_the_lights,"23"],[mt.Msg.MIXLY_Turn_off_the_lights,"24"],[mt.Msg.MIXLY_Turn_up_the_brightness,"25"],[mt.Msg.MIXLY_Turn_down_the_brightness,"26"],[mt.Msg.MIXLY_Set_it_to_red,"27"],[mt.Msg.MIXLY_Set_it_to_orange,"28"],[mt.Msg.MIXLY_Set_it_to_yellow,"29"],[mt.Msg.MIXLY_Set_it_to_green,"30"],[mt.Msg.MIXLY_Set_it_to_cyan,"31"],[mt.Msg.MIXLY_Set_it_to_blue,"32"],[mt.Msg.MIXLY_Set_it_to_purple,"33"],[mt.Msg.MIXLY_Set_it_to_white,"34"],[mt.Msg.MIXLY_Turn_on_the_fan,"35"],[mt.Msg.MIXLY_Turn_off_the_fan,"36"],[mt.Msg.MIXLY_First_gear,"37"],[mt.Msg.MIXLY_Wind_speed_second,"38"],[mt.Msg.MIXLY_Third_gear,"39"],[mt.Msg.MIXLY_Previous,"40"],[mt.Msg.MIXLY_Next_page,"41"],[mt.Msg.MIXLY_Show_smiley_face,"42"],[mt.Msg.MIXLY_Show_crying_face,"43"],[mt.Msg.MIXLY_Show_love,"44"],[mt.Msg.MIXLY_Close_display,"45"],[mt.Msg.MIXLY_Start_execution,"46"],[mt.Msg.MIXLY_FORWARD,"47"],[mt.Msg.MIXLY_BACKWARD,"48"],[mt.Msg.MIXLY_TURNLEFT,"49"],[mt.Msg.MIXLY_TURNRIGHT,"50"],[mt.Msg.MIXLY_STOP,"51"],[mt.Msg.MIXLY_Accelerate,"52"],[mt.Msg.MIXLY_retard,"53"],[mt.Msg.ROTATION_FORWARD,"54"],[mt.Msg.ROTATION_BACKWARD,"55"],[mt.Msg.MIXLY_Query_temperature,"56"],[mt.Msg.MIXLY_Query_humidity,"57"],[mt.Msg.MIXLY_Query_brightness,"58"],[mt.Msg.MIXLY_Query_sound,"59"],[mt.Msg.MIXLY_Query_time,"60"],[mt.Msg.MIXLY_Query_distance,"61"],[mt.Msg.MIXLY_Query_pressure,"62"],[mt.Msg.MIXLY_Query_key,"63"],[mt.Msg.MIXLY_Query_touch,"64"],[mt.Msg.MIXLY_Query_color,"65"]]),"cmd").appendField(mt.Msg.MIXLY_WHETHER+mt.Msg.MIXLY_BE_IDENTIFIED),this.setOutput(!0),this.setInputsInline(!0)}},qR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RECOGNIZED_STATE,"status1"],[mt.Msg.MIXLY_WHETHER_BROADCAST,"status2"],[mt.Msg.MIXLY_THE_RECOGNIZED_CMD,"result"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_CI130X_GET_THE_RECOGNIZED_STATE_TOOLTIP)}},QR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MP3_PLAY).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[mt.Msg.MIXLY_WIND_SPEED,"154"],[mt.Msg.MIXLY_HYETAL,"155"],[mt.Msg.MIXLY_TEMPERATURE,"156"],[mt.Msg.MIXLY_Humidity,"157"],[mt.Msg.MIXLY_Altitude,"158"],[mt.Msg.MIXLY_SOUND,"159"],[mt.Msg.MIXLY_BRIGHTNESS,"160"],[mt.Msg.ME_GO_HALL_SENSOR_DISTANCE,"161"],[mt.Msg.MIXLY_SERVO,"162"],[mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"163"],[mt.Msg.MIXLY_BUTTON2,"164"],[mt.Msg.MIXLY_ESP32_TOUCH,"165"],[mt.Msg.MIXLY_PAY,"166"],[mt.Msg.MIXLY_CARSH_CHANGE,"167"],[mt.Msg.MIXLY_COUNTDOWN,"168"],[mt.Msg.MIXLY_TIMING,"169"],[mt.Msg.MIXLY_AT_THE_MOMENT,"170"],[mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE,"171"],[mt.Msg.MIXLY_FORWARD,"172"],[mt.Msg.MIXLY_BACKWARD,"173"],[mt.Msg.MIXLY_TURNLEFT,"174"],[mt.Msg.MIXLY_TURNRIGHT,"175"],[mt.Msg.MIXLY_STOP,"176"],[mt.Msg.MIXLY_Accelerate,"177"],[mt.Msg.MIXLY_retard,"178"],[mt.Msg.ROTATION_FORWARD,"179"],[mt.Msg.ROTATION_BACKWARD,"180"],[mt.Msg.TUPLE_JOIN,"181"],[mt.Msg.MIXLY_SHOW,"182"],[mt.Msg.MIXLY_LAMPLIGHT,"183"],[mt.Msg.MIXLY_ACCELERATION,"184"]]),"star"),this.appendValueInput("NUM").appendField(mt.Msg.MIXLY_NUMBER),this.appendDummyInput("").appendField(mt.Msg.MIXLY_UNIT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[mt.Msg.MIXLY_YEAR,"117"],[mt.Msg.MIXLY_MONTH,"118"],[mt.Msg.MIXLY_DAY,"119"],[mt.Msg.MIXLY_HOUR,"120"],[mt.Msg.MIXLY_MINUTE,"121"],[mt.Msg.MIXLY_SECOND,"122"],[mt.Msg.MIXLY_WEEK2,"123"],[mt.Msg.MIXLY_RMB_UNIT,"124"],[mt.Msg.blockpy_setheading_degree,"125"],[mt.Msg.MIXLY_GEAR,"126"],[mt.Msg.MIXLY_LAYER,"127"],[mt.Msg.MIXLY_GRAM,"128"],[mt.Msg.MIXLY_METER,"129"],[mt.Msg.MIXLY_CENTIMETER,"130"],[mt.Msg.MIXLY_MILLIMETER,"131"],[mt.Msg.MIXLY_LUMEN,"132"],[mt.Msg.MIXLY_DECIBEL,"133"],[mt.Msg.MIXLY_hectopascal,"134"],[mt.Msg.MIXLY_PERCENT,"135"],[mt.Msg.MIXLY_CELSIUS,"136"],[mt.Msg.MIXLY_METER_PER_SEC,"137"],[mt.Msg.MIXLY_MICROBIT_Turn_on_display,"138"],[mt.Msg.MIXLY_MICROBIT_Turn_off_display,"139"],[mt.Msg.MIXLY_SUCCESS,"140"],[mt.Msg.MIXLY_FAILED,"141"],[mt.Msg.MIXLY_WRONG,"142"],[mt.Msg.MIXLY_GOOD,"143"],[mt.Msg.MIXLY_blockpy_set_add,"144"],[mt.Msg.MIXLY_DECREASE,"145"],[mt.Msg.COLOUR_RGB_RED,"146"],[mt.Msg.COLOUR_RGB_ORANGE,"147"],[mt.Msg.COLOUR_YELLOW,"148"],[mt.Msg.COLOUR_RGB_GREEN,"149"],[mt.Msg.COLOUR_CYAN,"150"],[mt.Msg.COLOUR_RGB_BLUE,"151"],[mt.Msg.COLOUR_RGB_PURPLE,"152"],[mt.Msg.COLOUR_RGB_WHITE,"153"]]),"end"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},zR={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.MIXLY_SYSTEM+mt.Msg.MIXLY_CMD).appendField(new mt.FieldDropdown([[mt.Msg.MILXY_ENTER_WAKE_UP,"1"],[mt.Msg.MIXLY_INCREASE_VOLUME,"202"],[mt.Msg.MIXLY_REDUCE_VOLUME,"203"],[mt.Msg.MIXLY_MAX_VOLUME,"204"],[mt.Msg.MIXLY_MINIMUM,"205"],[mt.Msg.MIXLY_OPEN_RESPONSE,"206"],[mt.Msg.MIXLY_CLOSE_RESPONSE,"207"],[mt.Msg.MIXLY_QUIT_WAKE_UP,"208"]]),"cmd"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},jR={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[mt.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[mt.Msg.MIXLY_ESP32_MAX30102_IR+","+mt.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},$R={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[mt.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[mt.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ZR={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308ALS"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},tc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.HTML_COLOUR+mt.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET+mt.Msg.HTML_COLOUR,"[2]"],[mt.Msg.MIXLY_GET+mt.Msg.MIXLY_IR_STRENGTH,"[1]"],[mt.Msg.MIXLY_GET+mt.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ec={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.HTML_COLOUR+mt.Msg.MSG.catSensor+" UCS12071").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET+"RGB"+mt.Msg.HTML_COLOUR,"0"],[mt.Msg.MIXLY_GET+mt.Msg.MIXLY_RGB_RAW,"1"],[mt.Msg.MIXLY_GET_ENV_LIGHT+mt.Msg.MIXLY_BRIGHTNESS,"2"],[mt.Msg.GET_IR_STRENGTH+mt.Msg.MIXLY_BRIGHTNESS,"3"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ic={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET_ENV_LIGHT,"E"],[mt.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},nc={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},sc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},_c={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},oc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETPRESSURE,"pressure()"],[mt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[mt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},pc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" SPL06_001").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETPRESSURE,"pressure()"],[mt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[mt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ac={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETPRESSURE,"pressure()"],[mt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[mt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},uc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_REF_TO_PRESSURE),this.appendDummyInput().appendField(mt.Msg.MIXLY_CAL_TO_ALTITUDE),this.setOutput(!0,Number),this.setInputsInline(!0)}},rc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MIXGOPE_FIELD+mt.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[mt.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},lc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_shake,"shake"],[mt.Msg.MIXLY_UP,"up"],[mt.Msg.MIXLY_DOWN,"down"],[mt.Msg.MIXLY_LEFT,"left"],[mt.Msg.MIXLY_RIGHT,"right"],[mt.Msg.MIXLY_MICROBIT_face_up,"face up"],[mt.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=mt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=mt.Msg.MSG.catSensor,s=mt.Msg.MIXLY_MICROBIT_JS_STATE,_=mt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:mt.Msg.MIXLY_MICROBIT_shake,up:mt.Msg.MIXLY_UP,down:mt.Msg.MIXLY_DOWN,left:mt.Msg.MIXLY_LEFT,right:mt.Msg.MIXLY_RIGHT,"face up":mt.Msg.MIXLY_MICROBIT_face_up,"face down":mt.Msg.MIXLY_MICROBIT_face_down}[e]+_}))}},dc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Ic={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_GET+mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Tc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+mt.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Mc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},hc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_GETTEMPERATUE)}},mc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return mt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},Ec={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},Oc={init:function(){this.setColour(AR),this.appendValueInput("SPISUB").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new mt.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},Rc={init:function(){this.setColour(AR),this.appendDummyInput().appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[mt.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},cc={init:function(){this.setColour(AR),this.appendDummyInput().appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},gc={init:function(){this.setColour(AR),this.appendDummyInput().appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},Cc={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(mt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Sc={init:function(){this.setColour(AR),this.appendDummyInput().appendField(mt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(mt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(mt.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},Ac={init:function(){this.setColour(AR),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RFID_SCAN_OK,"0"],[mt.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[mt.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Lc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown([["全部(元组)","data()[0]"],["全部(json)","data()[1]"],["全部(json,附带位置信息)","data()[2]"],["编号","data()[0][0]"],["电量","data()[0][1]"],["风速","data()[0][2]"],["阵风","data()[0][3]"],["风向","data()[0][4]"],["雨量","data()[0][5]"],["温度","data()[0][6]"],["湿度","data()[0][7]"],["光照","data()[0][8]"],["紫外线","data()[0][9]"],["大气压","data()[0][10]"],["信号强度","data()[0][11]"],["信噪比","data()[0][12]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip("返回气象数据元组 data= (设备id,电池状态,风速m/s,阵风m/s,风向°,雨量mm,温度℃,湿度%,光照Lux,UVI,大气压Pa,信号强度dB,信噪比dB)")}},Nc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Dc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendValueInput("BASE").appendField("以主题"),this.appendDummyInput("").appendField("串口发送至MixIO"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},fc={init:function(){this.setColour(AR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new mt.icons.MutatorIcon(["weather_set_label_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("weather_set_label_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n>6),i.push(128|63&_)):(2048<=_&&_<=55295||57344<=_&&_<=65535)&&(n+=3,i.push(224|15&_>>12),i.push(128|63&_>>6),i.push(128|63&_))}for(s=0;s>8,255&n].concat(i)}(t,!0),i="",n=0;n=0?"0x700000":["mixgo_sant"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==o?(e.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+_+", font_address="+p+")\n"):"16x8 Matrix"==o&&(e.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+_+")\n"),i},iP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},nP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},sP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},_P=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},oP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},pP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},aP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},uP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},rP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},lP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},dP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},IP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},TP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},MP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_"+t.getFieldValue("OP")+"("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"B",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},hP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},mP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},EP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},OP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},RP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"width",e.ORDER_ATOMIC),o=e.valueToCode(this,"height",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP");switch(p){case"True":return i+".show_fill_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n";case"False":return i+".show_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n"}},cP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+_+", 1)\n"},gP=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},CP=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},SP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},AP=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},LP=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"r",e.ORDER_ATOMIC),o="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(o){case"True":return i+".show_fill_circle("+n+", "+s+", "+_+", "+p+")\n";case"False":return i+".show_circle("+n+", "+s+", "+_+", "+p+")\n"}},NP=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),_=e.valueToCode(this,"x1",e.ORDER_ATOMIC),o=e.valueToCode(this,"y1",e.ORDER_ATOMIC),p=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",r=this.getFieldValue("OP");switch(u){case"True":return i+".show_fill_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n"}},DP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+","+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+","+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},fP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},FP=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),_=this.getFieldValue("key");return"TM1650"==_?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+_+"("+s+")\n"):"TM1637"==_&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+_+"("+s+")\n"),i},PP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},YP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},vP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".showDP("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},XP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},xP=function(t,e){e.definitions_.import_st7789="import st7789";var i=Et.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_sant"].indexOf(i)>=0?"0xE00000":"0x3A0000";var s=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),_=e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC),o=e.valueToCode(this,"PINCS",e.ORDER_ATOMIC),p=e.valueToCode(this,"PINDC",e.ORDER_ATOMIC);return s+" = st7789.ST7789("+_+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+", dc_pin="+p+", cs_pin="+o+", rotation="+this.getFieldValue("rotate")+", font_address="+n+")\n"},yP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".image("+n+", x="+s+", y="+_+", size="+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".image("+n+", x= "+s+",y="+_+", size="+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},bP=function(t,e){var i="0x"+this.getFieldValue("COLOR").slice(1);return["0x"+((16252928&i)>>8|(64512&i)>>5|(255&i)>>3).toString(16),e.ORDER_ATOMIC]},VP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==a.slice(0,2))var r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color="+a+")\n";else{const t=a.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},BP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p=i+".frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},GP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},UP=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},wP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"x1",e.ORDER_ATOMIC),s=e.valueToCode(this,"y1",e.ORDER_ATOMIC),_=e.valueToCode(this,"x2",e.ORDER_ATOMIC),o=e.valueToCode(this,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".line("+n+", "+s+", "+_+", "+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".line("+n+", "+s+", "+_+", "+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},kP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=this.getFieldValue("key"),_=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return e.definitions_.import_i2clcd="import i2clcd",i+" = i2clcd.LCD("+n+", lcd_width="+s+", i2c_addr="+_+")\n"},HP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+",center = "+this.getFieldValue("center")+")\n"},WP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".print("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},KP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},JP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},qP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC),_=this.getFieldValue("driver"),o=Et.Boards.getSelectedBoardKey().split(":")[2],p="";return p=["mpython","mixgo_pe","mixgo_nova"].indexOf(o)>=0?"0x700000":["mixgo_sant"].indexOf(o)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+", address="+s+", font_address="+p+", types="+_+")\n"},QP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},zP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+")\n"},jP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},$P=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},ZP=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},tY=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},eY=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},iY=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},nY=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},sY=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},_Y=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},oY=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},pY=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=t.getFieldValue("state");return i+"."+t.getFieldValue("shape")+"("+n+", "+s+", "+_+", "+o+", "+p+")\n"+i+".show()\n"},aY=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=t.getFieldValue("state");return i+"."+("0"==t.getFieldValue("dir_h_v")?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\n"+i+".show()\n"},uY=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".line("+e.valueToCode(t,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y2",e.ORDER_ATOMIC)+", "+t.getFieldValue("state")+")\n"+i+".show()\n"},rY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var s="onboard_tft.image("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff,sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n"}else if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled";s="oled.print("+n+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.shows("+n+")\n"}return s},lY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),_=this.getFieldValue("center");if("mixgo_sant"==i||"mixgo_nova"==i)return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+", space="+s+", center="+_+",sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n";if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled"}return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+", space="+s+", center="+_+")\n"},dY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var s="onboard_oled.frame("+n+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";s="onboard_tft.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.frame("+n+")\n"}return s},IY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var _="onboard_oled.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", delay="+s+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";_="onboard_tft.frame("+n+", size=5 , delay="+s+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";_="onboard_matrix.frame("+n+", delay="+s+")\n"}return _},TY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";n="onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},MY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var o="onboard_oled.scroll("+n+", speed="+s+", space="+_+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";o="onboard_tft.scroll("+n+", y=0, size=5, speed="+s+", space="+_+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";o="onboard_matrix.scroll("+n+", speed="+s+", space="+_+")\n"}return o},hY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},mY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},EY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){const i=t.getFieldValue("image").split(".");if(2!==i.length)throw Error("pin value error");e.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`;var n=i[1]}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix."+t.getFieldValue("image")}return[n,e.ORDER_ATOMIC]},OY=function(t,e){var i={"#000000":"0","#ff0000":"1"};function n(t){let e="";if(t.length%2==1&&(t="0"+t),t.length<8){let e=8-t.length;for(let i=1;i<=e;i++)t="0"+t}for(let i=1;i<=t.length;i++)i%2==0&&i!==t.length?e=e+t[i-1]+",0x":e+=t[i-1];return"0x"+e}let s=[];for(let e=0;e<12;e++){let _="",o=0,p=0;for(let n=0;n<32;n++)n<8?p=7-n:n<16?p=23-n:n<24?p=39-n:n<32&&(p=55-n),o+=Number(i[t.getFieldValue(e+"-"+n)])*Math.pow(2,31-p);_+=n(o.toString(16)),s.unshift(_)}let _=[];for(let t=0;t>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},nv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.picture("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"direct",e.ORDER_ASSIGNMENT)+")\n"},sv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=this.getFieldValue("center"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True",r=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==r.slice(0,2))var l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color="+r+",sync="+u+")\n";else{const t=r.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color=0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+",sync="+u+")\n"}return l},_v=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},ov=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=t.getFieldValue("shape"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+",sync="+u+")\n";else{const t=p.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+",sync="+u+")\n"}return r},pv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("dir_h_v"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},av=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x1",e.ORDER_ATOMIC),s=e.valueToCode(t,"y1",e.ORDER_ATOMIC),_=e.valueToCode(t,"x2",e.ORDER_ATOMIC),o=e.valueToCode(t,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},uv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},rv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),o=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var p="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+",sync="+o+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+",sync="+o+")\n"}return p},lv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==n.slice(0,2))var _="onboard_tft.fill("+n+",sync="+s+")\n";else{const t=n.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_="onboard_tft.fill(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+",sync="+s+")\n"}return _},dv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=o+"=Clock("+n+", "+s+", "+_+", "+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=o+"=Clock("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},Iv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},Tv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_time("+e.valueToCode(this,"h",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"m",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"s",e.ORDER_ASSIGNMENT)+")\n"},Mv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},hv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2))var _=n+".clear("+s+")\n";else{const t=s.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_=n+".clear(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+")\n"}return _},mv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"r",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("shape"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+", "+p+",sync="+a+")\n"}return u},Ev=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n="onboard_tft.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}return n},Ov=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2));else{const t=s.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)}return"onboard_tft.pointern(angle="+n+")\n"},Rv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color="+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},cv=rY,gv=DY,Cv=AY,Sv=DY,Av=fY,Lv=cY,Nv=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},Dv=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},fv=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},DB=function(){return"control.reset()\n"},fB=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Et.Profile.default.serial)+")\n"},FB=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Et.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Et.Profile.default.serial)+")\n"},PB=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Et.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Et.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},YB=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},vB=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},XB=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},xB=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},yB=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},bB=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},VB=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},BB=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},GB=function(){return"while True:\n pass\n"},UB=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},wB=function(t,e){return e.definitions_.import_os="import os","os.uname()"},kB=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},HB=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},WB=function(t,e){return e.definitions_.import_mixgo="import mixgo",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period="+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=Timer."+(e.valueToCode(this,"mode",e.ORDER_NONE)||"None")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},KB=function(t,e){return e.definitions_.import_machine="import machine",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period = "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=machine.Timer."+this.getFieldValue("mode")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},JB=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},qB=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},QB=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},zB=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},jB=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},$B=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},ZB=qB,tG=KB,eG=JB,iG=kB,nG=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},sG=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},_G=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api.weather_hourly("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"hour",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},oG=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")\n"},pG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_now.analysis()";else n='Weather_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},aG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Air_now.analysis()";else n='Air_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},uG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_alarm.analysis()";else n='Weather_alarm.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},rG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Life_suggestion.analysis()";else n='Life_suggestion.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},lG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Tide_daily.analysis()";else n='Tide_daily.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},dG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Location_search.analysis()";else n='Location_search.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},IG=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")\n"},TG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Weather_daily.analysis("+n+")";else s="Weather_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},MG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Air_daily.analysis("+n+")";else s="Air_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},hG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_sun.analysis("+n+")";else s="Geo_sun.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},mG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_moon.analysis("+n+")";else s="Geo_moon.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},EG=new mt.Generator("Python");EG.INDENT=" ",EG.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),EG.ORDER_ATOMIC=0,EG.ORDER_COLLECTION=1,EG.ORDER_STRING_CONVERSION=1,EG.ORDER_UNARY_POSTFIX=1,EG.ORDER_UNARY_PREFIX=2,EG.ORDER_MEMBER=2.1,EG.ORDER_FUNCTION_CALL=2.2,EG.ORDER_EXPONENTIATION=3,EG.ORDER_UNARY_SIGN=4,EG.ORDER_BITWISE_NOT=4,EG.ORDER_MULTIPLICATIVE=5,EG.ORDER_ADDITIVE=6,EG.ORDER_BITWISE_SHIFT=7,EG.ORDER_BITWISE_AND=8,EG.ORDER_BITWISE_XOR=9,EG.ORDER_BITWISE_OR=10,EG.ORDER_RELATIONAL=11,EG.ORDER_EQUALITY=11,EG.ORDER_LOGICAL_NOT=12,EG.ORDER_LOGICAL_AND=13,EG.ORDER_LOGICAL_OR=14,EG.ORDER_ASSIGNMENT=14,EG.ORDER_CONDITIONAL=15,EG.ORDER_LAMBDA=16,EG.ORDER_NONE=99,EG.ORDER_OVERRIDES=[[EG.ORDER_FUNCTION_CALL,EG.ORDER_MEMBER],[EG.ORDER_FUNCTION_CALL,EG.ORDER_FUNCTION_CALL],[EG.ORDER_MEMBER,EG.ORDER_MEMBER],[EG.ORDER_MEMBER,EG.ORDER_FUNCTION_CALL]],EG.init=function(){EG.PASS=this.INDENT+"pass\n",EG.definitions_=Object.create(null),EG.functionNames_=Object.create(null),EG.setups_=Object.create(null),EG.loops_=Object.create(null),EG.codeEnd_=Object.create(null),EG.variableDB_?EG.variableDB_.reset():EG.variableDB_=new gt(EG.RESERVED_WORDS_)},EG.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var _=this.definitions_[s];0===s.indexOf("import")?e.push(_):0===s.indexOf("var_declare")?i.push(_):n.push(_)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var o=[];for(var s in EG.functions_)o.push(EG.functions_[s]);o.length&&o.push("\n");var p=[];for(var s in EG.setups_)p.push(EG.setups_[s]);p.length&&p.push("\n");var a=[];for(var s in EG.loops_)a.push(EG.loops_[s]);var u=[];for(var s in EG.codeEnd_)u.push(EG.codeEnd_[s]);0!==u.length&&u.push("\n");let r="";return r=a.length>0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n"),r},EG.scrubNakedValue=function(t){return t+"\n"},EG.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},EG.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},EG.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=mt.utils.string.wrap(_,EG.COMMENT_WRAP-3),n+=EG.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const OG={};OG["MixGo CC"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:Et.Profile.generate(["0-11","18-21"]),input_pin:Et.Profile.generate(["0-11","18-21"]),output_pin:Et.Profile.generate(["0-11","18-21"]),pwm_input:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_input:Et.Profile.generate(["0-5"],"adc","adc"),pwm_output:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_output:Et.Profile.generate(["0-5"],"adc","adc"),espnow_channel:Et.Profile.generate(["1-13"]),haskylens_model:Et.Profile.generate(["0-4"]),digital:Et.Profile.generate(["0-11","18-21"],"pin","pin"),pwm_pin:Et.Profile.generate(["0-11","18-21"]),pwm:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_pin:Et.Profile.generate(["0-5"]),analog:Et.Profile.generate(["0-5"],"adc","adc"),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Et.Profile.generate(["0-4"]),exlcdh:Et.Profile.generate(["0-31"]),exlcdv:Et.Profile.generate(["0-11"]),brightness:Et.Profile.generate(["0-9"]),tts_voice:Et.Profile.generate(["0-16"]),tts_builtin_music:Et.Profile.generate(["0-47"]),tts_bgmusic:Et.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["MUSIC_QUAVERS","onboard_matrix.MUSIC_QUAVERS"],["MUSIC_QUAVER","onboard_matrix.MUSIC_QUAVER"],["MUSIC_CROTCHET","onboard_matrix.MUSIC_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},OG["MixGo ME"]={description:"MicroPython[ESP32C3 MixGo ME]",digital_pin:Et.Profile.generate(["0-11","18-21"]),input_pin:Et.Profile.generate(["0-11","18-21"]),output_pin:Et.Profile.generate(["0-11","18-21"]),pwm_input:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_input:Et.Profile.generate(["0-5"],"adc","adc"),pwm_output:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_output:Et.Profile.generate(["0-5"],"adc","adc"),espnow_channel:Et.Profile.generate(["1-13"]),haskylens_model:Et.Profile.generate(["0-4"]),digital:Et.Profile.generate(["0-11","18-21"],"pin","pin"),pwm_pin:Et.Profile.generate(["0-11","18-21"]),pwm:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_pin:Et.Profile.generate(["0-5"]),analog:Et.Profile.generate(["0-5"],"adc","adc"),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Et.Profile.generate(["0-4"]),exlcdh:Et.Profile.generate(["0-7"]),exlcdv:Et.Profile.generate(["0-4"]),brightness:Et.Profile.generate(["0-9"]),tts_voice:Et.Profile.generate(["0-16"]),tts_builtin_music:Et.Profile.generate(["0-47"]),tts_bgmusic:Et.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["MUSIC_QUAVERS","onboard_matrix.MUSIC_QUAVERS"],["MUSIC_QUAVER","onboard_matrix.MUSIC_QUAVER"],["MUSIC_CROTCHET","onboard_matrix.MUSIC_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},OG["MixGo Car 4.2"]={description:"MicroPython[ESP32]",digital_pin:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["20","20"],["21","21"]],digital:[["pin0","pin0"],["pin1","pin1"],["pin2","pin2"],["pin3","pin3"],["pin4","pin4"],["pin5","pin5"],["pin6","pin6"],["pin7","pin7"],["pin8","pin8"],["pin9","pin9"],["pin10","pin10"],["pin20","pin20"],["pin21","pin21"]],pwm_pin:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["20","20"],["21","21"]],pwm:[["pwm0","pwm0"],["pwm1","pwm1"],["pwm2","pwm2"],["pwm3","pwm3"],["pwm4","pwm4"],["pwm5","pwm5"],["pwm6","pwm6"],["pwm7","pwm7"],["pwm8","pwm8"],["pwm9","pwm9"],["pwm10","pwm10"],["pwm20","pwm20"],["pwm21","pwm21"]],espnow_channel:[["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"]],i2c_A_pin:[["6","6"],["9","9"]],i2c_B_pin:[["7","7"],["10","10"]],spi_A_pin:[["6","6"],["9","9"]],spi_B_pin:[["7","7"],["10","10"]],spi_C_pin:[["9","9"],["20","20"]],spi_D_pin:[["10","10"],["21","21"]],analog_pin:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],analog:[["adc0","adc0"],["adc1","adc1"],["adc2","adc2"],["adc3","adc3"],["adc4","adc4"]],dac_pin:[["25","25"],["26","26"]],dac:[["dac25","dac25"],["dac26","dac26"]],touch:[["tc0","tc0"],["tc2","tc2"],["tc4","tc4"],["tc12","tc12"],["tc13","tc13"],["tc14","tc14"],["tc15","tc15"],["tc27","tc27"],["tc32","tc32"],["tc33","tc33"]],touch_pin:[["0","0"],["2","2"],["4","4"],["12","12"],["13","13"],["14","14"],["15","15"],["27","27"],["32","32"],["33","33"]],button:[["A","button_a"],["B","button_b"]],buttonB:[["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["24","24"],["25","25"],["26","26"],["27","27"],["28","28"],["29","29"],["30","30"],["31","31"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],builtinimg:[["HEART","matrix.Image.HEART"],["HEART_SMALL","matrix.Image.HEART_SMALL"],["HAPPY","matrix.Image.HAPPY"],["SAD","matrix.Image.SAD"],["SMILE","matrix.Image.SMILE"],["SILLY","matrix.Image.SILLY"],["FABULOUS","matrix.Image.FABULOUS"],["SURPRISED","matrix.Image.SURPRISED"],["ASLEEP","matrix.Image.ASLEEP"],["ANGRY","matrix.Image.ANGRY"],["CONFUSED","matrix.Image.CONFUSED"],["NO","matrix.Image.NO"],["YES","matrix.Image.YES"],["LEFT_ARROW","matrix.Image.LEFT_ARROW"],["RIGHT_ARROW","matrix.Image.RIGHT_ARROW"],["DRESS","matrix.Image.DRESS"],["TRANSFORMERS","matrix.Image.TRANSFORMERS"],["SCISSORS","matrix.Image.SCISSORS"],["EXIT","matrix.Image.EXIT"],["TREE","matrix.Image.TREE"],["PACMAN","matrix.Image.PACMAN"],["TARGET","matrix.Image.TARGET"],["TSHIRT","matrix.Image.TSHIRT"],["ROLLERSKATE","matrix.Image.ROLLERSKATE"],["DUCK","matrix.Image.DUCK"],["HOUSE","matrix.Image.HOUSE"],["TORTOISE","matrix.Image.TORTOISE"],["BUTTERFLY","matrix.Image.BUTTERFLY"],["STICKFIGURE","matrix.Image.STICKFIGURE"],["GHOST","matrix.Image.GHOST"],["PITCHFORK","matrix.Image.PITCHFORK"],["MUSIC_QUAVERS","matrix.Image.MUSIC_QUAVERS"],["MUSIC_QUAVER","matrix.Image.MUSIC_QUAVER"],["MUSIC_CROTCHET","matrix.Image.MUSIC_CROTCHET"],["COW","matrix.Image.COW"],["RABBIT","matrix.Image.RABBIT"],["SQUARE_SMALL","matrix.Image.SQUARE_SMALL"],["SQUARE","matrix.Image.SQUARE"],["DIAMOND_SMALL","matrix.Image.DIAMOND_SMALL"],["DIAMOND","matrix.Image.DIAMOND"],["CHESSBOARD","matrix.Image.CHESSBOARD"],["TRIANGLE_LEFT","matrix.Image.TRIANGLE_LEFT"],["TRIANGLE","matrix.Image.TRIANGLE"],["SNAKE","matrix.Image.SNAKE"],["UMBRELLA","matrix.Image.UMBRELLA"],["SKULL","matrix.Image.SKULL"],["GIRAFFE","matrix.Image.GIRAFFE"],["SWORD","matrix.Image.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","music.DADADADUM"],["ENTERTAINER","music.ENTERTAINER"],["PRELUDE","music.PRELUDE"],["ODE","music.ODE"],["NYAN","music.NYAN"],["RINGTONE","music.RINGTONE"],["FUNK","music.FUNK"],["BLUES","music.BLUES"],["BIRTHDAY","music.BIRTHDAY"],["WEDDING","music.WEDDING"],["FUNERAL","music.FUNERAL"],["PUNCHLINE","music.PUNCHLINE"],["PYTHON","music.PYTHON"],["BADDY","music.BADDY"],["CHASE","music.CHASE"],["BA_DING","music.BA_DING"],["WAWAWAWAA","music.WAWAWAWAA"],["JUMP_UP","music.JUMP_UP"],["JUMP_DOWN","music.JUMP_DOWN"],["POWER_UP","music.POWER_UP"],["POWER_DOWN","music.POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},OG["ESP32C3 Generic"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:Et.Profile.generate(["0-11","18-21"]),input_pin:Et.Profile.generate(["0-11","18-21"]),output_pin:Et.Profile.generate(["0-11","18-21"]),pwm_input:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_input:Et.Profile.generate(["0-5"],"adc","adc"),pwm_output:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_output:Et.Profile.generate(["0-5"],"adc","adc"),espnow_channel:Et.Profile.generate(["1-13"]),haskylens_model:Et.Profile.generate(["0-4"]),digital:Et.Profile.generate(["0-11","18-21"],"pin","pin"),pwm_pin:Et.Profile.generate(["0-11","18-21"]),pwm:Et.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_pin:Et.Profile.generate(["0-5"]),analog:Et.Profile.generate(["0-5"],"adc","adc"),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Et.Profile.generate(["0-4"]),exlcdh:Et.Profile.generate(["0-31"]),exlcdv:Et.Profile.generate(["0-11"]),brightness:Et.Profile.generate(["0-9"]),tts_voice:Et.Profile.generate(["0-16"]),tts_builtin_music:Et.Profile.generate(["0-47"]),tts_bgmusic:Et.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]};const RG=OG,cG=20,gG={init:function(){this.setColour(cG),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_HIGH,"HIGH"],[mt.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},CG={init:function(){this.setColour(cG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(mt.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},SG={init:function(){this.setColour(cG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},AG={init:function(){this.setColour(cG),this.appendValueInput("PIN",Number).appendField("DAC"+mt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_TOOLTIP)}},LG={init:function(){this.setColour(cG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_PERIOD_MIL).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_mSecond,"period"],[mt.Msg.MIXLY_uSecond,"period_microseconds"]]),"key"),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_SET_TOOLTIP)}},NG={init:function(){this.setColour(cG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_REF_VOLTAGE+mt.Msg.MIXLY_STAT).appendField(new mt.FieldDropdown([["3.3V","machine.ADC.ATTN_11DB"],["2.2V","machine.ADC.ATTN_6DB"],["1.5V","machine.ADC.ATTN_2_5DB"],["1.2V","machine.ADC.ATTN_0DB"]]),"atten"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_ATTEN_TOOLTIP)}},DG={init:function(){this.setColour(cG),this.appendValueInput("pin").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_TOOLTIP)}},fG={init:function(){this.setColour(20),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_ATTACHINTERRUPT_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[mt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[mt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},FG={init:function(){this.setColour(20),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("pin#"),"PIN_OBJ"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROPYTHON_AS).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_Digital_PINMODEOUT,"machine.Pin.OUT"],[mt.Msg.MIXLY_Digital_PINMODEIN,"machine.Pin.IN"],[mt.Msg.MIXLY_PINMODEPULLUP,"machine.Pin.IN, machine.Pin.PULL_UP"],[mt.Msg.MIXLY_PINMODEPULLDOWN,"machine.Pin.IN, machine.Pin.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)},getVars:function(){return["pin#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},PG={init:function(){this.setColour(cG),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("dac#"),"PIN_OBJ").appendField(mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("DAC"+mt.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_INIT_TOOLTIP)},getVars:function(){return["dac#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},YG={init:function(){this.setColour(cG),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("tc#"),"PIN_OBJ").appendField(mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_INIT_TOOLTIP)},getVars:function(){return["tc#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},vG={init:function(){this.setColour(cG),this.appendValueInput("PIN",Number).appendField("PWM"+mt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_FREQUENCY+mt.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_SET_FREQ_TOOLTIP)}},XG=FG,xG=YG,yG=DG,bG=fG,VG=40,BG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput("").appendField(t).appendField(mt.Msg.MIXLY_TEM_HUM+" AHT21").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key");return{temperature:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[t]}))}},GG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput("").appendField(t).appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" HP203X").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETPRESSURE,"pressure()"],[mt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[mt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},UG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput().appendField(t).appendField(mt.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM),this.setOutput(!0,Number),this.setInputsInline(!0)}},wG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput().appendField(t).appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RFID_READ_CARD_UID),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,Number),this.setInputsInline(!0),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},kG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput().appendField(t).appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,Number),this.setInputsInline(!0),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},HG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput().appendField(t).appendField(mt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(mt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},WG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput().appendField(t).appendField(mt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(mt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(mt.Msg.RETURN_SUCCESS_OR_NOT),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setInputsInline(!0),this.setOutput(!0),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},KG={init:function(){if("mixgo_me"==Et.Boards.getSelectedBoardKey().split(":")[2])var t="ME G1";this.setColour(VG),this.appendDummyInput().appendField(t).appendField("RFID"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RFID_SCAN_OK,"0"],[mt.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[mt.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,Number),this.setInputsInline(!0),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},JG=230,qG={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital),"PIN"),this.setOutput(!0)}},QG={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},zG={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},jG={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},$G={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},ZG={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},tU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},eU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},iU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},nU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},sU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},_U={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},oU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},pU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},aU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},uU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},rU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog),"PIN"),this.setOutput(!0)}},lU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},dU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.dac),"PIN"),this.setOutput(!0)}},IU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},TU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},MU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},hU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm),"PIN"),this.setOutput(!0)}},mU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},EU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},OU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.touch),"PIN"),this.setOutput(!0)}},RU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},cU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},gU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},CU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.imglist),"PIN"),this.setOutput(!0)}},SU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.playlist),"PIN"),this.setOutput(!0)}},AU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},LU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},NU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},DU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},fU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},FU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},PU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},YU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},vU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},XU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},xU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},yU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.one_more),"PIN"),this.setOutput(!0)}},bU={init:function(){this.setColour(JG),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},VU=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},BU=function(t,e){e.definitions_.import_machine="import machine";var i="";return i+=e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value("+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},GU=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},UU=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".write("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},wU=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=e.valueToCode(this,"NUM",e.ORDER_ATOMIC);return i+".set_analog_"+this.getFieldValue("key")+"("+n+")\n"},kU=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},HU=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=this.getFieldValue("mode");return"machine.Pin("+i+").irq(handler = "+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+", trigger = "+n+")\n"},WU=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"pin#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),s=this.getFieldValue("MODE");return("pin#"==i?"pin"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.Pin("+n+", "+s+")\n"},KU=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"dac#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("dac#"==i?"dac"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.DAC(machine.Pin("+n+"))\n"},JU=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},qU=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"tc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("tc#"==i?"tc"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.TouchPad(machine.Pin("+n+"))\n"},QU=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_g1="import me_g1",["me_g1.ext_ahtx0."+i+"()",e.ORDER_ATOMIC]},zU=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_g1="import me_g1",["me_g1.ext_hp203x."+i,e.ORDER_ATOMIC]},jU=function(t,e){e.definitions_.import_me_g1="import me_g1";return["me_g1.varistor()",e.ORDER_ATOMIC]},$U=function(t,e){e.definitions_.import_me_g1="import me_g1";return['me_g1.ext_rc522.read_card(0, x="id")',e.ORDER_ATOMIC]},ZU=function(t,e){var i=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC);return e.definitions_.import_me_g1="import me_g1",["me_g1.ext_rc522.read_card("+i+")",e.ORDER_ATOMIC]},tw=function(t,e){var i=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),n=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC);return e.definitions_.import_me_g1="import me_g1","me_g1.ext_rc522.write_card("+n+","+i+")\n"},ew=function(t,e){var i=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),n=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC);return e.definitions_.import_me_g1="import me_g1",["me_g1.ext_rc522.write_card("+n+","+i+")",e.ORDER_ATOMIC]},iw=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_me_g1="import me_g1",["me_g1.ext_rc522.scan_card()=="+i,e.ORDER_ATOMIC]},nw=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},sw=nw,_w=nw,ow=nw,pw=nw,aw=nw,uw=nw,rw=nw,lw=nw,dw=nw,Iw=nw,Tw=nw,Mw=nw,hw=nw,mw=nw,Ew=nw,Ow=nw,Rw=nw,cw=nw,gw=nw,Cw=nw,Sw=nw,Aw=nw,Lw=nw,Nw=nw,Dw=nw,fw=nw,Fw=nw,Pw=nw,Yw=nw,vw=nw,Xw=nw,xw=nw,yw=nw,bw=nw,Vw=nw,Bw=nw,Gw=nw,Uw=nw,ww=nw,kw=nw,Hw=nw,Ww=nw,Kw=nw,Jw=nw;Object.assign(mt.Variables,Rt),Object.assign(mt.Procedures,Yu),mt.Python=vu,mt.generator=vu,Et.Profile.default={},Object.assign(Et.Profile,RG),Object.assign(Et.Profile.default,RG["MixGo CC"]),Object.assign(mt.Blocks,e,i,n,s,_,o,p,a,u,r,l,d,I,V,H,k,X,B,W,f,w,U,G,F,D,N,y,x,b,P,Y,v,lt,dt,It),Object.assign(mt.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,nt,ut,at,Z,st,rt,q,pt,ot,_t,Q,J,K,et,tt,it,z,j,$,Tt,Mt,ht)})(); \ No newline at end of file diff --git a/boards/default/micropython_esp32s2/index.xml b/boards/default/micropython_esp32s2/index.xml index 7f77afe1..308dbf02 100644 --- a/boards/default/micropython_esp32s2/index.xml +++ b/boards/default/micropython_esp32s2/index.xml @@ -1 +1 @@ -02000attachInterrupt_funcattachInterrupt_func010,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!ms10timtim1000tim_callbacktim_callback5000200090x151100a10.998124.82997110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyMixly,HelloMixlyprompt02MixlyMixly0XFF00FFcodebMixlyMixly1attachInterrupt_funcattachInterrupt_func2022711420452023,1,1,12,0,0180292023,1,1,12,0,0100440440100004120000000000010001000Mixly0MixlyMixly500MixlyMixly500>10.51001001000interrupt_funcinterrupt_functurnsdistancei2c_extend1718400000g6i2c_extendg6g6100g6g6100g6g6100g6wifinamewifipassword8080AUTH TOKEN0_value02000notify0Your Target Emailsubjectbodycolor#FF0000wifinamewifipasswordmixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012http://mixio.mixly.cn/time.phpmixio.mixly.cnwifinamewifipasswordcsub_cb31444082183.230.40.3914109261n63JySRowo13ZLDBKw6y896E0=MixlyRobotsub_cbEQmsg1ciot_dict"tc"tc0ciot_dictccwifinamewifipasswordclientEnter Your API_KEYEnter Your SECRET_KEYclient1clientS72099北京今天天气如何?wifinamewifipasswordSVa3S0UKHIy9dDArs北京SVa3S0UKHIy9dDArs北京111113820000391000009000,4500,563,5630x1234callbackcmdaddrrawpulsesi2c2221100000i2c00i2c00i2ci2ci2cspi200000045spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345buf1Mixlyow12owowow12345ow12345owmy_now0my_nowmy_nowmy_nowFFFFFFFFFFFFmixlymy_nowmy_nowcbcbEQmsg1spi10000004512spi8my_lora433.925716my_loramy_loramy_loraMixlyi2c_extend45100000xsensori2c_extendxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor1013.25xsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor5000500xsensorxsensorxsensorxsensorxsensorxsensorspi10000004512spi8ysensorysensorysensor0ysensor0ysensor0Mixlyysensor0Mixlyysensorysensor39,119.96,31.67ysensorysensorstation45ps2_handle24512ps2_handle50ps2_handleps2_handlews_wr124ws_wrws_wrws_wr360010zsensorzsensorzsensorzsensorweight12500weightmidi0midi440midi4401000midimidimidi4120midimidirgb04rgb0000rgb000rgb0001000rgb1000rgb100100i2c_extend45400000Motori2c_extendMotor100Motor1024102402actuatoractuatoractuatoractuatoractuator你好米思齐actuatoractuatoractuator20actuatoractuatormixly*.mp3i2c_extend45400000matrixi2c_extendmatrixmatrixmatrixMixly0matrixMixlymatrixMixly500matrixMixlymatrixMixly500matrixmatrix>matrixmatrix1matrixmatrixmatrix0.5matrixmatrixi2c_extend45100000dispi2c_extenddisp2333dispdisp1i2c_extend45100000lcdi2c_extend0x27lcdMixly00lcdMixly005lcdlcdi2c_extend45100000oledi2c_extend0x3coledoled001oledMixlyoledMixly0010oledMixlyoledMixly0550oledMixlyoledMixly5500oled0020oled005050oled20202015oled1oled00oled00oledspi10000001246spi45tft_st7789135240tft_st7789001#ffffff255,255,0tft_st7789Mixly0050#ffffff255,255,0tft_st7789Mixly0550#ffffff255,255,0tft_st7789Mixly5500#ffffff255,255,0tft_st7789004040#ffffff255,255,0tft_st778912ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor'ni-hao','hong-se','lv-se','lan-se','bai-se','hei-se'0.1ai_sensor1.wav5ai_sensor1.wav100ai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsai_sensor'猫','狗','笔记本','笔'mixgo5自模型训练infoai_sensor'猫','狗','笔记本','笔'mixgo自模型识别objectsinfoai_sensor0.1606, 0.3562, 0.4712, 0.9568, 0.9877, 1.9108, 1.8761, 3.5310, 3.4423, 5.6823/sd/masks.kmodel外部模型加载objects12ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor1.wav5ai_sensor1.wav100infoai_sensorlicensePlateinfoai_sensorfaceinfoai_sensor20objectsai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsfilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0wifinamewifipasswordwlanwlanwlanwlanwlan127.16.0.801234567wlanwlanwlanwlanwlan127.16.0.81connect_wifiwlanAPwlanTruewlanwlanSmallCabbage1WHILETRUEEQ0wlan0.0.0.0ms1000TRUEss0.0.0.080s192.168.0.180s5ss1024sbMixlyresponses1024sbMixlyresponse127.0.0.180sntp.aliyun.comresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponsehttp://192.168.1.1:11434qwen2.5-coder:0.5b5https://api.deepseek.comAPI Keydeepseek-chat5请介绍一下米思齐?content_callbackcontent_callbackcontent请介绍一下米思齐? \ No newline at end of file +02000attachInterrupt_funcattachInterrupt_func010,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!ms10timtim1000tim_callbacktim_callback5000200090x151100a10.998124.82997110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyMixly,HelloMixlyprompt02MixlyMixly0XFF00FFcodebMixlyMixly1attachInterrupt_funcattachInterrupt_func2022711420452023,1,1,12,0,0180292023,1,1,12,0,0100440440100004120000000000010001000Mixly0MixlyMixly500MixlyMixly500>10.51001001000interrupt_funcinterrupt_functurnsdistancei2c_extend1718400000g6i2c_extendg6g6100g6g6100g6g6100g6wifinamewifipassword8080AUTH TOKEN0_value02000notify0Your Target Emailsubjectbodycolor#FF0000wifinamewifipasswordmixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012http://mixio.mixly.cn/time.phpmixio.mixly.cnwifinamewifipasswordcsub_cb31444082183.230.40.3914109261n63JySRowo13ZLDBKw6y896E0=MixlyRobotsub_cbEQmsg1ciot_dict"tc"tc0ciot_dictccwifinamewifipasswordclientEnter Your API_KEYEnter Your SECRET_KEYclient1clientS72099北京今天天气如何?wifinamewifipasswordSVa3S0UKHIy9dDArs北京SVa3S0UKHIy9dDArs北京111113820000391000009000,4500,563,5630x1234callbackcmdaddrrawpulsesi2c2221100000i2c00i2c00i2ci2ci2cspi200000045spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345buf1Mixlyow12owowow12345ow12345owmy_now0my_nowmy_nowmy_nowFFFFFFFFFFFFmixlymy_nowmy_nowcbcbEQmsg1spi10000004512spi8my_lora433.925716my_loramy_loramy_loraMixlyi2c_extend45100000xsensori2c_extendxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor1013.25xsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor5000500xsensorxsensorxsensorxsensorxsensorxsensorspi10000004512spi8ysensorysensorysensor0ysensor0ysensor0Mixlyysensor0Mixlyysensorysensor39,119.96,31.67ysensorysensorstation45ps2_handle24512ps2_handle50ps2_handleps2_handlews_wr124ws_wrws_wrws_wr360010zsensorzsensorzsensorzsensorweight12500weightmidi0midi440midi4401000midimidimidi4120midimidirgb04rgb0000rgb000rgb0001000rgb1000rgb100100i2c_extend45400000Motori2c_extendMotor100Motor1024102402actuatoractuatoractuatoractuatoractuator你好米思齐actuatoractuatoractuator20actuatoractuatormixly*.mp3i2c_extend45400000matrixi2c_extendmatrixmatrixmatrixMixly0matrixMixlymatrixMixly500matrixMixlymatrixMixly500matrixmatrix>matrixmatrix1matrixmatrixmatrix0.5matrixmatrixi2c_extend45100000dispi2c_extenddisp2333dispdisp1i2c_extend45100000lcdi2c_extend0x27lcdMixly00lcdMixly005lcdlcdi2c_extend45100000oledi2c_extend0x3coledoled001oledMixlyoledMixly0010oledMixlyoledMixly0550oledMixlyoledMixly5500oled0020oled005050oled20202015oled1oled00oled00oledspi10000001246spi45tft_st7789135240tft_st7789001#ffffff255,255,0tft_st7789Mixly0050#ffffff255,255,0tft_st7789Mixly0550#ffffff255,255,0tft_st7789Mixly5500#ffffff255,255,0tft_st7789004040#ffffff255,255,0tft_st778912ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor'ni-hao','hong-se','lv-se','lan-se','bai-se','hei-se'0.1ai_sensor1.wav5ai_sensor1.wav100ai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsai_sensor'猫','狗','笔记本','笔'mixgo5自模型训练infoai_sensor'猫','狗','笔记本','笔'mixgo自模型识别objectsinfoai_sensor0.1606, 0.3562, 0.4712, 0.9568, 0.9877, 1.9108, 1.8761, 3.5310, 3.4423, 5.6823/sd/masks.kmodel外部模型加载objects12ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor1.wav5ai_sensor1.wav100infoai_sensorlicensePlateinfoai_sensorfaceinfoai_sensor20objectsai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsfilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0wifinamewifipasswordwlanwlanwlanwlanwlan127.16.0.801234567wlanwlanwlanwlanwlan127.16.0.81connect_wifiwlanAPwlanTruewlanwlanSmallCabbage1WHILETRUEEQ0wlan0.0.0.0ms1000TRUEss0.0.0.080s192.168.0.180s5ss1024sbMixlyresponses1024sbMixlyresponse127.0.0.180sntp.aliyun.comresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponsehttp://192.168.1.1:11434qwen2.5-coder:0.5b5https://api.deepseek.comAPI Keydeepseek-chat5请介绍一下米思齐?content_callbackcontent_callbackcontent请介绍一下米思齐? \ No newline at end of file diff --git a/boards/default/micropython_esp32s2/main.bundle.745d5d73.js b/boards/default/micropython_esp32s2/main.bundle.745d5d73.js new file mode 100644 index 00000000..512f90da --- /dev/null +++ b/boards/default/micropython_esp32s2/main.bundle.745d5d73.js @@ -0,0 +1,21 @@ +(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>Dt,controls_typeLists:()=>ft,lists_zip:()=>Ft,lists_zip_container:()=>Pt,lists_zip_item:()=>vt,unpack_iterable_object:()=>Yt,variables_change:()=>Lt,variables_get:()=>St,variables_global:()=>Nt,variables_set:()=>At});var i={};t.r(i),t.d(i,{base_setup:()=>xt,controls_delay:()=>bt,controls_end_program:()=>Vt,controls_except:()=>jt,controls_finally:()=>$t,controls_flow_statements:()=>Ht,controls_for:()=>Wt,controls_forEach:()=>Ut,controls_for_range:()=>Kt,controls_if:()=>Bt,controls_if_else:()=>zt,controls_if_elseif:()=>qt,controls_if_if:()=>Jt,controls_lambda:()=>te,controls_main:()=>yt,controls_pass:()=>ee,controls_range:()=>Gt,controls_repeat_ext:()=>Zt,controls_thread:()=>ie,controls_try:()=>Qt,controls_try_finally:()=>kt,controls_whileUntil:()=>wt,datetime_fromtimestamp:()=>ae,do_while:()=>ne,garbage_collection:()=>se,gene_unique_identifier:()=>ue,get_mem_alloc:()=>_e,get_mem_free:()=>oe,get_unique_identifier:()=>pe});var n={};t.r(n),t.d(n,{base_map:()=>Fe,generate_cartesian_product:()=>ve,math_arithmetic:()=>Te,math_bit:()=>he,math_constant:()=>de,math_constant_mp:()=>Ie,math_constrain:()=>Ce,math_dec:()=>Ee,math_degree_to_radian:()=>Xe,math_indexer_number:()=>Ae,math_map:()=>Se,math_max_min:()=>Re,math_number:()=>le,math_number_base_conversion:()=>ce,math_radian_to_degree:()=>Ye,math_random:()=>ge,math_random_seed:()=>Le,math_round:()=>Ne,math_selfcalcu:()=>Me,math_to_int:()=>Oe,math_trig:()=>me,text_to_number:()=>De,text_to_number_skulpt:()=>fe,turn_to_int:()=>Pe});var s={};t.r(s),t.d(s,{ascii_to_char:()=>Ge,char_to_ascii:()=>Ue,number_to_text:()=>we,os_system:()=>Ii,text:()=>xe,text_capital:()=>je,text_center:()=>$e,text_char:()=>Ve,text_char_at:()=>We,text_char_at2:()=>He,text_char_at3:()=>ui,text_compareTo:()=>ai,text_compare_to:()=>Qe,text_create_with_container:()=>_i,text_create_with_item:()=>oi,text_encode:()=>li,text_equals_starts_ends:()=>ze,text_eval:()=>di,text_find:()=>Ze,text_format:()=>si,text_format_noreturn:()=>ri,text_join:()=>Be,text_join_seq:()=>ti,text_length:()=>ke,text_random_char:()=>Ke,text_replace:()=>ei,text_split:()=>ii,text_strip:()=>ni,text_substring:()=>qe,text_substring2:()=>Je,text_substring3:()=>pi,text_textarea:()=>be});var _={};t.r(_),t.d(_,{ENUMERATE:()=>zi,content_in_lists:()=>ji,enumerate:()=>Qi,list_many_input:()=>xi,list_tolist:()=>Gi,list_tolist2:()=>qi,list_trig:()=>Yi,lists_2d_get_col_row_data:()=>Ei,lists_2d_get_data_with_col_row:()=>mi,lists_append_extend:()=>Si,lists_change_to:()=>yi,lists_change_to_general:()=>Vi,lists_clear:()=>fi,lists_create_with:()=>Oi,lists_create_with2:()=>Ui,lists_create_with_container:()=>ci,lists_create_with_item:()=>gi,lists_create_with_noreturn:()=>bi,lists_create_with_text:()=>Ri,lists_create_with_text2:()=>wi,lists_del_general:()=>Bi,lists_find:()=>vi,lists_getIndex3:()=>ki,lists_getSublist3:()=>Hi,lists_get_index:()=>Mi,lists_get_random_item:()=>Ai,lists_get_random_sublist:()=>Li,lists_get_sublist:()=>hi,lists_insert_value:()=>Ni,lists_insert_value2:()=>Ki,lists_pop:()=>Pi,lists_remove_at:()=>Fi,lists_remove_at2:()=>Ji,lists_reverse:()=>Di,lists_setIndex3:()=>Wi,lists_set_index:()=>Ci,lists_sort:()=>Xi});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>Tn,dicts_add_or_change:()=>on,dicts_clear:()=>un,dicts_create_with:()=>Zi,dicts_create_with_container:()=>tn,dicts_create_with_item:()=>en,dicts_create_with_noreturn:()=>mn,dicts_deldict:()=>In,dicts_delete:()=>pn,dicts_get:()=>sn,dicts_get_default:()=>_n,dicts_items:()=>rn,dicts_keys:()=>nn,dicts_length:()=>dn,dicts_pop:()=>Mn,dicts_setdefault:()=>hn,dicts_to_json:()=>On,dicts_to_json2:()=>gn,dicts_to_to:()=>cn,dicts_todict:()=>En,dicts_update:()=>an,dicts_values:()=>ln,json_to_dicts:()=>Rn});var p={};t.r(p),t.d(p,{logic_boolean:()=>Dn,logic_compare:()=>Sn,logic_compare_continous:()=>An,logic_is:()=>vn,logic_is_in:()=>Pn,logic_negate:()=>Nn,logic_null:()=>fn,logic_operation:()=>Ln,logic_tobool:()=>Yn,logic_true_or_false:()=>Fn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>is,sdcard_use_spi_init:()=>es,storage_can_write_ornot:()=>wn,storage_change_dir:()=>Zn,storage_close_file:()=>Hn,storage_delete_file:()=>Kn,storage_file_seek:()=>zn,storage_file_tell:()=>qn,storage_file_write:()=>Vn,storage_fileopen:()=>yn,storage_fileopen_new:()=>xn,storage_fileopen_new_encoding:()=>bn,storage_get_a_line:()=>Un,storage_get_contents:()=>Gn,storage_get_contents_without_para:()=>Bn,storage_get_current_dir:()=>Qn,storage_get_file_size:()=>Jn,storage_get_filename:()=>kn,storage_is_file:()=>ts,storage_list_all_files:()=>Wn,storage_make_dir:()=>jn,storage_open_file_with_os:()=>Xn,storage_rename:()=>$n});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>ps,procedures_callreturn:()=>as,procedures_defnoreturn:()=>ns,procedures_defreturn:()=>ss,procedures_ifreturn:()=>us,procedures_mutatorarg:()=>os,procedures_mutatorcontainer:()=>_s,procedures_return:()=>rs});var r={};t.r(r),t.d(r,{tuple_change_to:()=>gs,tuple_create_with:()=>ds,tuple_create_with_container:()=>Is,tuple_create_with_item:()=>Ts,tuple_create_with_noreturn:()=>Ls,tuple_create_with_text2:()=>Ms,tuple_create_with_text_return:()=>hs,tuple_del:()=>Os,tuple_find:()=>Cs,tuple_getIndex:()=>ms,tuple_getSublist:()=>As,tuple_get_random_item:()=>Ds,tuple_get_sublist:()=>Ns,tuple_input:()=>Fs,tuple_join:()=>Rs,tuple_length:()=>Es,tuple_max:()=>cs,tuple_totuple:()=>fs,tuple_trig:()=>Ss});var l={};t.r(l),t.d(l,{set_add_discard:()=>Gs,set_clear:()=>bs,set_create_with:()=>vs,set_create_with_container:()=>Ys,set_create_with_item:()=>Xs,set_create_with_text_return:()=>ks,set_length:()=>ys,set_operate:()=>Vs,set_operate_update:()=>Bs,set_pop:()=>xs,set_sub:()=>Us,set_toset:()=>Hs,set_update:()=>ws});var d={};t.r(d),t.d(d,{html_content:()=>zs,html_content_more:()=>Qs,html_document:()=>Ks,html_form:()=>$s,html_head_body:()=>qs,html_style:()=>js,html_style_color:()=>t_,html_style_content:()=>Zs,html_text:()=>e_,html_title:()=>Js});var I={};t.r(I),t.d(I,{attribute_access:()=>M_,function_call:()=>d_,function_call_container:()=>I_,function_call_item:()=>T_,raw_block:()=>s_,raw_empty:()=>o_,raw_expression:()=>__,raw_table:()=>n_,text_comment:()=>p_,text_print_multiple:()=>u_,text_print_multiple_container:()=>r_,text_print_multiple_item:()=>l_,type_check:()=>a_});var T={};t.r(T),t.d(T,{controls_type:()=>R_,controls_typeLists:()=>c_,lists_zip:()=>g_,unpack_iterable_object:()=>C_,variables_change:()=>E_,variables_get:()=>h_,variables_global:()=>O_,variables_set:()=>m_});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>Y_,base_setup:()=>A_,controls_delay:()=>v_,controls_flow_statements:()=>P_,controls_for:()=>D_,controls_forEach:()=>V_,controls_for_range:()=>f_,controls_if:()=>L_,controls_interrupts:()=>x_,controls_lambda:()=>G_,controls_main:()=>S_,controls_millis:()=>X_,controls_nointerrupts:()=>b_,controls_pass:()=>w_,controls_range:()=>B_,controls_repeat:()=>Q_,controls_repeat_ext:()=>W_,controls_thread:()=>k_,controls_try_finally:()=>N_,controls_whileUntil:()=>F_,datetime_fromtimestamp:()=>j_,do_while:()=>H_,garbage_collection:()=>K_,gene_unique_identifier:()=>$_,get_mem_alloc:()=>J_,get_mem_free:()=>q_,get_unique_identifier:()=>z_,reset:()=>y_,time_sleep:()=>U_});var h={};t.r(h),t.d(h,{base_map:()=>Ro,generate_cartesian_product:()=>go,math_arithmetic:()=>no,math_bit:()=>io,math_constant:()=>to,math_constant_mp:()=>eo,math_constrain:()=>Io,math_dec:()=>po,math_degree_to_radian:()=>So,math_indexer_number:()=>ho,math_map:()=>lo,math_max_min:()=>uo,math_number:()=>Z_,math_number_base_conversion:()=>To,math_radian_to_degree:()=>Co,math_random:()=>ro,math_random_seed:()=>Mo,math_round:()=>mo,math_selfcalcu:()=>so,math_single:()=>_o,math_to_int:()=>ao,math_trig:()=>oo,text_to_number:()=>Eo,text_to_number_skulpt:()=>Oo,turn_to_int:()=>co});var m={};t.r(m),t.d(m,{ascii_to_char:()=>fo,char_to_ascii:()=>Fo,number_to_text:()=>Po,os_system:()=>tp,text:()=>Ao,text_capital:()=>Go,text_center:()=>Uo,text_char:()=>No,text_char_at:()=>Xo,text_char_at2:()=>Yo,text_char_at3:()=>jo,text_compareTo:()=>Qo,text_compare_to:()=>bo,text_encode:()=>$o,text_equals_starts_ends:()=>xo,text_eval:()=>Zo,text_find:()=>wo,text_format:()=>Jo,text_format_noreturn:()=>qo,text_join:()=>Do,text_join_seq:()=>ko,text_length:()=>vo,text_random_char:()=>yo,text_replace:()=>Ho,text_split:()=>Wo,text_strip:()=>Ko,text_substring:()=>Bo,text_substring2:()=>Vo,text_substring3:()=>zo,text_textarea:()=>Lo});var E={};t.r(E),t.d(E,{content_in_lists:()=>Xp,enumerate:()=>Yp,list_many_input:()=>Rp,list_tolist:()=>Pp,list_tolist2:()=>vp,list_trig:()=>mp,lists_2d_get_col_row_data:()=>np,lists_2d_get_data_with_col_row:()=>ip,lists_append_extend:()=>ap,lists_change_to:()=>Op,lists_change_to_general:()=>gp,lists_clear:()=>Ip,lists_create_with:()=>sp,lists_create_with2:()=>Sp,lists_create_with_noreturn:()=>cp,lists_create_with_text:()=>_p,lists_create_with_text2:()=>Ap,lists_del_general:()=>Cp,lists_find:()=>Tp,lists_getIndex3:()=>Lp,lists_getSublist3:()=>Np,lists_get_index:()=>op,lists_get_random_item:()=>up,lists_get_random_sublist:()=>rp,lists_get_sublist:()=>ep,lists_insert_value:()=>lp,lists_insert_value2:()=>fp,lists_pop:()=>hp,lists_remove_at:()=>Mp,lists_remove_at2:()=>Fp,lists_reverse:()=>dp,lists_setIndex3:()=>Dp,lists_set_index:()=>pp,lists_sort:()=>Ep});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Jp,dicts_add_or_change:()=>Bp,dicts_clear:()=>wp,dicts_create_with:()=>yp,dicts_create_with_noreturn:()=>Qp,dicts_deldict:()=>Kp,dicts_delete:()=>Gp,dicts_get:()=>bp,dicts_get_default:()=>Vp,dicts_items:()=>kp,dicts_keys:()=>xp,dicts_length:()=>Wp,dicts_pop:()=>qp,dicts_setdefault:()=>zp,dicts_to_json:()=>$p,dicts_to_json2:()=>ea,dicts_to_to:()=>ta,dicts_todict:()=>jp,dicts_update:()=>Up,dicts_values:()=>Hp,json_to_dicts:()=>Zp});var R={};t.r(R),t.d(R,{logic_boolean:()=>oa,logic_compare:()=>ia,logic_compare_continous:()=>na,logic_is:()=>ra,logic_is_in:()=>ua,logic_negate:()=>_a,logic_null:()=>pa,logic_operation:()=>sa,logic_tobool:()=>la,logic_true_or_false:()=>aa});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Xa,sdcard_use_spi_init:()=>Ya,storage_can_write_ornot:()=>Ra,storage_change_dir:()=>Da,storage_close_file:()=>ga,storage_delete_file:()=>Sa,storage_file_seek:()=>Na,storage_file_tell:()=>La,storage_file_write:()=>ha,storage_fileopen:()=>Ia,storage_fileopen_new:()=>Ta,storage_fileopen_new_encoding:()=>Ma,storage_get_a_line:()=>Oa,storage_get_contents:()=>Ea,storage_get_contents_without_para:()=>ma,storage_get_current_dir:()=>fa,storage_get_file_size:()=>Aa,storage_get_filename:()=>ca,storage_is_file:()=>va,storage_list_all_files:()=>Ca,storage_make_dir:()=>Fa,storage_open_file_with_os:()=>da,storage_rename:()=>Pa});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Va,procedures_callreturn:()=>ba,procedures_defnoreturn:()=>xa,procedures_defreturn:()=>ya,procedures_ifreturn:()=>Ba,procedures_return:()=>Ga});var C={};t.r(C),t.d(C,{tuple_change_to:()=>za,tuple_create_with:()=>Ua,tuple_create_with_noreturn:()=>Za,tuple_create_with_text2:()=>wa,tuple_create_with_text_return:()=>ka,tuple_del:()=>Ka,tuple_find:()=>Qa,tuple_getIndex:()=>Ha,tuple_getSublist:()=>$a,tuple_get_random_item:()=>eu,tuple_get_sublist:()=>tu,tuple_input:()=>nu,tuple_join:()=>Ja,tuple_length:()=>Wa,tuple_max:()=>qa,tuple_totuple:()=>iu,tuple_trig:()=>ja});var S={};t.r(S),t.d(S,{set_add_discard:()=>ru,set_clear:()=>pu,set_create_with:()=>su,set_create_with_text_return:()=>Iu,set_length:()=>_u,set_operate:()=>au,set_operate_update:()=>uu,set_pop:()=>ou,set_sub:()=>lu,set_toset:()=>Tu,set_update:()=>du});var A={};t.r(A),t.d(A,{html_content:()=>Eu,html_content_more:()=>Ou,html_document:()=>Mu,html_form:()=>cu,html_head_body:()=>mu,html_style:()=>Ru,html_style_content:()=>gu,html_text:()=>Cu,html_title:()=>hu});var L={};t.r(L),t.d(L,{attribute_access:()=>Fu,function_call:()=>fu,raw_block:()=>Su,raw_empty:()=>Lu,raw_expression:()=>Au,raw_table:()=>Nu,type_check:()=>Du});var N={};t.r(N),t.d(N,{PIN_init:()=>yr,actuator_extern_get_led_bright:()=>Hu,actuator_extern_get_led_state:()=>Wu,actuator_extern_led_bright:()=>ku,actuator_extern_led_brightness:()=>Ku,actuator_ms32006_dcmotor:()=>er,actuator_ms32006_init:()=>tr,actuator_ms32006_stepper:()=>ir,actuator_neopixel_init:()=>nr,actuator_neopixel_rgb:()=>sr,actuator_neopixel_rgb_all:()=>_r,actuator_neopixel_rgb_show_all_chase:()=>ar,actuator_neopixel_rgb_show_all_rainbow:()=>pr,actuator_neopixel_write:()=>or,actuator_use_uart_init:()=>ur,esp32_music_get_tempo_extern:()=>Gu,esp32_music_pitch:()=>xu,esp32_music_pitch_init:()=>yu,esp32_music_pitch_with_time:()=>bu,esp32_music_play_list:()=>Vu,esp32_music_reset_extern:()=>Uu,esp32_music_set_tempo_extern:()=>Bu,esp32_music_stop:()=>wu,mixbot_actuator_extern_get_addr:()=>Yr,mixbot_actuator_extern_set_addr:()=>Xr,mixbot_addr_extern:()=>Rr,parrot_PIN_init:()=>Br,parrot_move_speed:()=>Gr,pin_led_bright:()=>xr,player_insert_music:()=>Mr,player_play_music:()=>Tr,player_set_mode:()=>Ir,player_set_play:()=>lr,player_set_volume:()=>dr,player_whether_stop:()=>rr,robot_led_extern:()=>Sr,robot_led_extern_get_value:()=>Ar,robot_motor_extern:()=>cr,robot_motor_extern_get_speed:()=>gr,robot_servo_extern_absolute_run:()=>fr,robot_servo_extern_get_status:()=>Lr,robot_servo_extern_relative_continue:()=>vr,robot_servo_extern_relative_origin:()=>Fr,robot_servo_extern_relative_run:()=>Pr,robot_servo_extern_stop:()=>Dr,robot_servo_extern_stop_mode:()=>Nr,robot_traffic_light_extern:()=>Cr,servo_PIN_init:()=>br,servo_get_angle:()=>$u,servo_get_speed:()=>Zu,servo_init:()=>Ju,servo_move:()=>qu,servo_move_angle:()=>Vr,servo_set_angle:()=>Qu,servo_set_speed:()=>ju,servo_speed_360:()=>zu,syn6288_builtin_voice:()=>Er,syn6288_get_voice:()=>mr,syn6288_set_voice:()=>hr,syn6288_tts_play:()=>Or});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>El,actuator_dc_motor_stop:()=>Ol,actuator_get_led_bright:()=>Wr,actuator_get_led_state:()=>Kr,actuator_led_bright:()=>Hr,actuator_led_brightness:()=>Jr,actuator_mixbot_buzzer_on_off:()=>Sl,actuator_mixgo_nova_mic_get:()=>fl,actuator_mixgo_nova_mic_set:()=>Dl,actuator_mixgo_nova_onboard_music_pitch:()=>yl,actuator_mixgo_nova_onboard_music_stop:()=>xl,actuator_mixgo_nova_play_audio:()=>Yl,actuator_mixgo_nova_play_online_audio:()=>Xl,actuator_mixgo_nova_record_audio:()=>vl,actuator_mixgo_nova_voice_get:()=>Pl,actuator_mixgo_nova_voice_set:()=>Fl,actuator_mixgo_zero_led_color:()=>qr,actuator_onboard_neopixel_rgb:()=>tl,actuator_onboard_neopixel_rgb_all:()=>el,actuator_onboard_neopixel_rgb_show_all_chase:()=>nl,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>il,actuator_onboard_neopixel_write:()=>sl,actuator_rm_onboard_neopixel_rgb:()=>_l,actuator_rm_onboard_neopixel_rgb_all:()=>ol,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>pl,actuator_stepper_keep:()=>hl,actuator_stepper_stop:()=>ml,analog_ble_keyboard_init:()=>zl,analog_ble_keyboard_input:()=>$l,analog_ble_keyboard_mouse_init:()=>od,analog_ble_keyboard_mouse_input:()=>rd,analog_ble_keyboard_mouse_send_battery:()=>ud,analog_ble_keyboard_mouse_str:()=>ld,analog_ble_keyboard_send_battery:()=>td,analog_ble_keyboard_str:()=>Zl,analog_ble_mouse_init:()=>ed,analog_ble_mouse_input:()=>sd,analog_ble_mouse_keyboard_input:()=>dd,analog_ble_mouse_send_battery:()=>_d,analog_keyboard_input:()=>Gl,analog_keyboard_str:()=>ql,analog_mouse_input:()=>Kl,bitbot_motor:()=>Nl,bitbot_move:()=>Al,bitbot_stop:()=>Ll,ble_keyboard_connect:()=>jl,ble_keyboard_get_mac:()=>Ql,ble_keyboard_mouse_connect:()=>ad,ble_keyboard_mouse_get_mac:()=>pd,ble_mouse_connect:()=>nd,ble_mouse_get_mac:()=>id,cc_number:()=>Zr,educore_ble_keyboard_input:()=>gd,educore_ble_sensor_connected:()=>cd,educore_ble_sensor_init:()=>Rd,educore_buzzer:()=>Id,educore_buzzer_play_tone:()=>Td,educore_buzzer_play_tone_time:()=>Md,educore_buzzer_stop:()=>hd,educore_neopixel_clear:()=>Od,educore_neopixel_rgb:()=>Ed,educore_rgb_light:()=>md,esp32_music_get_tempo:()=>ul,esp32_music_reset:()=>rl,esp32_music_set_tempo:()=>al,esp32_onboard_music_pitch:()=>ll,esp32_onboard_music_pitch_with_time:()=>dl,esp32_onboard_music_play_list:()=>Tl,esp32_onboard_music_stop:()=>Il,general_key:()=>wl,general_key_tuple:()=>kl,generalkey_container:()=>Hl,generalkey_create_with_item:()=>Wl,get_keyboard_light:()=>Cd,get_power_output:()=>Vl,ledswitch:()=>kr,mixbot_motor:()=>Cl,mixbot_motor_status:()=>Rl,mixbot_move:()=>cl,mixbot_stop:()=>gl,mouse_key:()=>Jl,number:()=>wr,rm_actuator_get_led_bright:()=>Qr,rm_actuator_get_led_state:()=>jr,rm_actuator_led_bright:()=>zr,rm_actuator_led_brightness:()=>$r,rm_motor:()=>Ml,set_all_power_output:()=>Bl,set_power_output:()=>bl,special_key:()=>Ul});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>nI,ai_sensor_ailocal_class:()=>Kd,ai_sensor_ailocal_class_result:()=>Jd,ai_sensor_ailocal_train:()=>Wd,ai_sensor_asr_recognize:()=>$d,ai_sensor_audio_play:()=>zd,ai_sensor_audio_record:()=>qd,ai_sensor_barcode:()=>Pd,ai_sensor_circle:()=>bd,ai_sensor_classifier_faces:()=>iI,ai_sensor_color:()=>Ud,ai_sensor_color_chases:()=>Hd,ai_sensor_color_chases_result:()=>kd,ai_sensor_config:()=>fd,ai_sensor_face:()=>eI,ai_sensor_find_20objects:()=>sI,ai_sensor_find_barcodes:()=>vd,ai_sensor_find_circles:()=>Vd,ai_sensor_find_colors:()=>wd,ai_sensor_find_licenseplates:()=>tI,ai_sensor_find_lines:()=>xd,ai_sensor_find_qrcodes:()=>Dd,ai_sensor_find_rects:()=>Gd,ai_sensor_find_tags:()=>Xd,ai_sensor_licenseplate:()=>Zd,ai_sensor_line:()=>yd,ai_sensor_qrcode:()=>Ld,ai_sensor_qrcode_lite:()=>Nd,ai_sensor_rect:()=>Bd,ai_sensor_rgb:()=>Fd,ai_sensor_tag:()=>Yd,ai_sensor_use_uart_init:()=>Ad,ai_sensor_yolo_recognize:()=>Qd,ai_sensor_yolo_recognize_result:()=>jd});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>pI,MICROPYTHON_AI_Speech_unit:()=>oI,MICROPYTHON_AI_client:()=>_I});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>gI,mpython_blynk_app_notify:()=>MI,mpython_blynk_email:()=>EI,mpython_blynk_get_timers:()=>OI,mpython_blynk_on_connected:()=>dI,mpython_blynk_on_disconnected:()=>lI,mpython_blynk_run:()=>TI,mpython_blynk_sensor_data_to_app:()=>cI,mpython_blynk_set_property:()=>mI,mpython_blynk_setup:()=>CI,mpython_blynk_stop_timers:()=>hI,mpython_blynk_sync_virtual:()=>rI,mpython_blynk_terminal_widget_vpin:()=>uI,mpython_blynktimer:()=>RI,mpython_blynktimer_run:()=>II});var v={};t.r(v),t.d(v,{cc_g1_init:()=>SI,cc_g1_read_bat:()=>AI,cc_g1_read_joystick:()=>LI,cc_g1_read_key:()=>NI,cc_g1_turnoff:()=>DI});var Y={};t.r(Y),t.d(Y,{ce_go_dc_motor:()=>bI,ce_go_get_led_bright:()=>vI,ce_go_get_led_state:()=>YI,ce_go_hall_attachInterrupt:()=>VI,ce_go_hall_data:()=>GI,ce_go_hall_initialize:()=>BI,ce_go_led_bright:()=>PI,ce_go_led_brightness:()=>XI,ce_go_light_number:()=>FI,ce_go_pin_light:()=>WI,ce_go_pin_near:()=>wI,ce_go_pin_near_line:()=>UI,ce_go_pin_near_state_change:()=>kI,ce_go_stepper_keep:()=>yI,ce_go_stepper_stop:()=>xI,educore_car:()=>KI,educore_car_pin_near:()=>QI,educore_car_pin_near_line:()=>zI,educore_car_stepper_keep:()=>JI,educore_car_stepper_stop:()=>qI,sensor_mixgome_eulerangles:()=>HI});var X={};t.r(X),t.d(X,{communicate_bluetooth_central_init:()=>vT,communicate_bluetooth_connect:()=>xT,communicate_bluetooth_disconnect:()=>bT,communicate_bluetooth_handle:()=>wT,communicate_bluetooth_is_connected:()=>BT,communicate_bluetooth_mac:()=>yT,communicate_bluetooth_peripheral_init:()=>YT,communicate_bluetooth_recv:()=>GT,communicate_bluetooth_recv_only:()=>UT,communicate_bluetooth_scan:()=>XT,communicate_bluetooth_send:()=>VT,communicate_espnow_init:()=>kT,communicate_espnow_init_new:()=>HT,communicate_i2c_available:()=>TT,communicate_i2c_init:()=>tT,communicate_i2c_master_read:()=>IT,communicate_i2c_onboard:()=>$I,communicate_i2c_read:()=>eT,communicate_i2c_scan:()=>nT,communicate_i2c_write:()=>iT,communicate_ir_recv_init:()=>gT,communicate_ir_send_init:()=>NT,communicate_ow_init:()=>hT,communicate_ow_read:()=>ET,communicate_ow_reset:()=>cT,communicate_ow_scan:()=>mT,communicate_ow_select:()=>RT,communicate_ow_write:()=>OT,communicate_spi_buffer:()=>oT,communicate_spi_init:()=>sT,communicate_spi_onboard:()=>ZI,communicate_spi_read:()=>pT,communicate_spi_read_output:()=>aT,communicate_spi_readinto:()=>uT,communicate_spi_readinto_output:()=>rT,communicate_spi_set:()=>_T,communicate_spi_write:()=>lT,communicate_spi_write_readinto:()=>dT,espnow_radio_channel:()=>QT,espnow_radio_channel_new:()=>$T,espnow_radio_on_off:()=>ZT,espnow_radio_rec:()=>eM,espnow_radio_recv:()=>nM,espnow_radio_recv_certain_msg:()=>sM,espnow_radio_recv_certain_msg_new:()=>oM,espnow_radio_recv_msg:()=>iM,espnow_radio_recv_new:()=>_M,espnow_radio_send:()=>tM,espnow_radio_txpower:()=>jT,i2c_available:()=>DM,i2c_init:()=>TM,i2c_master_reader2:()=>NM,i2c_read:()=>MM,i2c_scan:()=>mM,i2c_slave_onreceive:()=>MT,i2c_write:()=>hM,internal_variable:()=>CT,ir_recv_timeout:()=>LT,ir_transmit_busy:()=>PT,ir_transmit_conventional_data:()=>DT,ir_transmit_raw_code:()=>FT,ir_transmit_study_code:()=>fT,ir_whether_recv:()=>AT,lora_init:()=>pM,lora_packet:()=>aM,lora_recv:()=>rM,lora_send:()=>uM,network_espnow_info:()=>KT,network_espnow_mac:()=>WT,network_espnow_recv:()=>JT,network_espnow_recv_handle:()=>zT,network_espnow_send:()=>qT,recv_fun:()=>ST,spi_buffer:()=>RM,spi_init:()=>EM,spi_read:()=>cM,spi_read_output:()=>gM,spi_readinto:()=>CM,spi_readinto_output:()=>SM,spi_set:()=>OM,spi_write:()=>AM,spi_write_readinto:()=>LM,urequests_attribute:()=>dM,urequests_get:()=>lM,urequests_method:()=>IM});var y={};t.r(y),t.d(y,{display_animate:()=>oh,display_blink_rate:()=>ih,display_circle:()=>ph,display_color_seclet:()=>Oh,display_draw_4strings:()=>QM,display_fill:()=>_h,display_get_screen_image:()=>eh,display_help:()=>uh,display_image_size:()=>jM,display_lcd_use_i2c_init:()=>Ah,display_line:()=>ZM,display_line_arbitrarily:()=>th,display_matrix_extern_bright_point:()=>wM,display_matrix_extern_bright_screen:()=>HM,display_matrix_extern_clear:()=>WM,display_matrix_extern_get_pixel:()=>UM,display_matrix_extern_get_screen_pixel:()=>kM,display_matrix_extern_image_builtins:()=>KM,display_matrix_extern_scroll_string:()=>xM,display_matrix_extern_scroll_string_delay:()=>bM,display_matrix_extern_shift:()=>GM,display_matrix_extern_show_frame_string:()=>VM,display_matrix_extern_show_frame_string_delay:()=>BM,display_matrix_extern_show_image:()=>XM,display_matrix_extern_show_image_or_string_delay:()=>yM,display_matrix_use_i2c_init:()=>YM,display_oled_drawPixel:()=>lh,display_oled_showBitmap:()=>rh,display_oled_use_i2c_init:()=>Fh,display_onoff:()=>sh,display_rect:()=>$M,display_rgb_color:()=>nh,display_tm1650_power:()=>Ih,display_tm1650_set_brightness:()=>hh,display_tm1650_show_dot:()=>Mh,display_tm1650_show_num:()=>Th,display_tm_use_i2c_init:()=>dh,display_triangle:()=>ah,display_use_i2c_init:()=>zM,extern_oled_bright_point:()=>Uh,extern_oled_clear:()=>wh,extern_oled_get_pixel:()=>Gh,extern_oled_hvline:()=>Hh,extern_oled_line:()=>Wh,extern_oled_scroll_string:()=>yh,extern_oled_scroll_string_delay:()=>xh,extern_oled_shape_rect:()=>kh,extern_oled_shift:()=>Bh,extern_oled_show_frame_string:()=>bh,extern_oled_show_frame_string_delay:()=>Vh,extern_oled_show_image:()=>Ph,extern_oled_show_image_or_string_delay:()=>Xh,extern_oled_show_image_xy:()=>vh,extern_oled_show_string:()=>Yh,lcd_backlight:()=>Dh,lcd_clear:()=>fh,lcd_print_string:()=>Nh,lcd_show_image_or_string_delay:()=>Lh,matrix_extern_image_arithmetic:()=>JM,matrix_extern_image_invert:()=>qM,tft_fill:()=>Ch,tft_line_arbitrarily:()=>Sh,tft_scroll_string_delay:()=>ch,tft_show_frame_string_delay:()=>gh,tft_show_image_or_string_delay:()=>Rh,tft_show_image_xy:()=>Eh,tft_use_spi_init:()=>mh});var x={};t.r(x),t.d(x,{bitbot_display_bitmap_create:()=>Vm,bitbot_display_image_create:()=>bm,display_available:()=>dm,display_bitmap_create:()=>em,display_bright_point:()=>am,display_bright_screen:()=>rm,display_clear:()=>lm,display_get_pixel:()=>pm,display_get_screen_pixel:()=>um,display_image_builtins:()=>im,display_image_builtins_all:()=>nm,display_image_create:()=>tm,display_scroll_string:()=>zh,display_scroll_string_delay:()=>Qh,display_shift:()=>om,display_show_frame_string:()=>$h,display_show_frame_string_delay:()=>Zh,display_show_image:()=>Jh,display_show_image_or_string_delay:()=>qh,draw_pointer:()=>eE,image_arithmetic:()=>sm,image_invert:()=>_m,mixbot_display_bitmap_create:()=>vm,mixbot_display_bright_screen:()=>ym,mixbot_display_get_ambientbright:()=>Xm,mixbot_display_get_screen_pixel:()=>Ym,mixbot_display_image_create:()=>Pm,mixbot_display_rotate:()=>xm,mixgo_display_bitmap_create:()=>Em,mixgo_display_image_create_new:()=>mm,mixgome_display_bitmap_create:()=>Tm,mixgome_display_font:()=>Om,mixgome_display_image_create:()=>Im,mixgomini_display_bitmap_create:()=>hm,mixgomini_display_image_create:()=>Mm,mpython_display_hvline:()=>Dm,mpython_display_line:()=>fm,mpython_display_shape_rect:()=>Nm,mpython_pbm_image:()=>Fm,nova_draw_pointer:()=>iE,onboard_oled_bright_point:()=>Lm,onboard_oled_scroll_string_delay:()=>Sm,onboard_oled_show_frame_string_delay:()=>Am,onboard_oled_show_image:()=>Rm,onboard_oled_show_image_or_string_delay:()=>Cm,onboard_oled_show_image_xy:()=>cm,onboard_oled_show_string:()=>gm,onboard_tft_bright_point:()=>Jm,onboard_tft_bright_screen:()=>uE,onboard_tft_clear:()=>rE,onboard_tft_clock_clear:()=>Zm,onboard_tft_clock_draw:()=>$m,onboard_tft_clock_get_rtctime:()=>Qm,onboard_tft_clock_init:()=>zm,onboard_tft_clock_set_time:()=>jm,onboard_tft_display_hvline:()=>Hm,onboard_tft_display_line:()=>Wm,onboard_tft_display_shape_circle:()=>tE,onboard_tft_display_shape_rect:()=>km,onboard_tft_fill:()=>qm,onboard_tft_get_pixel:()=>Km,onboard_tft_get_screen_pixel:()=>aE,onboard_tft_scroll_string:()=>_E,onboard_tft_scroll_string_delay:()=>jh,onboard_tft_shift:()=>pE,onboard_tft_show_frame_string:()=>oE,onboard_tft_show_frame_string_delay:()=>wm,onboard_tft_show_image:()=>sE,onboard_tft_show_image_or_string_delay:()=>Um,onboard_tft_show_image_xy:()=>Bm,onboard_tft_show_image_xy_direct:()=>Gm,onboard_tft_show_texts:()=>nE});var b={};t.r(b),t.d(b,{factory_block:()=>DE,factory_block_return:()=>fE,factory_block_return_with_textarea:()=>PE,factory_block_with_textarea:()=>FE,factory_callMethod_noreturn:()=>LE,factory_callMethod_return:()=>NE,factory_create_with_container:()=>gE,factory_create_with_item:()=>CE,factory_declare:()=>AE,factory_from_import:()=>OE,factory_function_noreturn:()=>cE,factory_function_return:()=>SE,factory_import:()=>RE,folding_block:()=>vE});var V={};t.r(V),t.d(V,{controls_pin_attachInterrupt:()=>tO,inout_analog_atten:()=>wE,inout_analog_read:()=>UE,inout_analog_read_init:()=>qE,inout_analog_write:()=>VE,inout_analog_write_init:()=>JE,inout_analog_write_set:()=>BE,inout_analog_write_set_freq:()=>jE,inout_digital_init:()=>WE,inout_digital_read:()=>xE,inout_digital_write:()=>yE,inout_highlow:()=>XE,inout_pinMode:()=>QE,inout_pin_attachInterrupt:()=>HE,inout_pin_pressed:()=>kE,inout_pin_pressed_init:()=>zE,inout_pwm_analog_write:()=>bE,inout_pwm_analog_write_init:()=>KE,inout_pwm_analog_write_set_freq:()=>GE,pin_pressed:()=>ZE,pin_pressed_init:()=>$E});var B={};t.r(B),t.d(B,{IOT_CONNECT_OLLAMA:()=>bO,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>SO,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>CO,IOT_EMQX_PING:()=>cO,IOT_FORMATTING:()=>OO,IOT_FORMAT_STRING:()=>RO,IOT_MIXIO_NTP:()=>gO,IOT_MIXIO_PUBLISH:()=>dO,IOT_MIXIO_SUBSCRIBE:()=>IO,iot_checkonenet:()=>XO,iot_client_onboard:()=>LO,iot_connect_ollama:()=>xO,iot_connect_openai:()=>VO,iot_create_with_item:()=>rO,iot_http_client:()=>NO,iot_http_data:()=>DO,iot_mixio_check:()=>hO,iot_mixio_connect:()=>lO,iot_mixio_connect_only:()=>MO,iot_mixio_disconnect:()=>TO,iot_mixio_format_msg:()=>EO,iot_mixio_format_topic:()=>mO,iot_mixly_key:()=>AO,iot_mqtt_client:()=>fO,iot_mqtt_data:()=>FO,iot_onenet_check:()=>_O,iot_onenet_connect:()=>nO,iot_onenet_disconnect:()=>sO,iot_onenet_publish:()=>pO,iot_onenet_publish_dict:()=>oO,iot_onenetconnect:()=>vO,iot_onenetdisconnect:()=>YO,iot_publish:()=>yO,iot_publish_container:()=>aO,iot_publish_item:()=>uO,iot_wifi_connect:()=>iO,iot_wificonnect:()=>PO,ollama_empty_history:()=>UO,use_ollama_llm_to_chat:()=>BO,use_ollama_llm_to_chat_return:()=>GO});var G={};t.r(G),t.d(G,{educore_mqtt_connect:()=>RR,educore_mqtt_connect_success:()=>SR,educore_mqtt_subscribe_message:()=>cR,educore_mqtt_topic_publish:()=>CR,educore_mqtt_topic_subscribe:()=>gR,educore_wifi_connect:()=>OR,network_ap_connect:()=>$O,network_connect:()=>JO,network_get_connect:()=>zO,network_get_wifi:()=>jO,network_init:()=>kO,network_is_active:()=>WO,network_open:()=>HO,network_scan:()=>KO,network_server:()=>ZO,network_socket_accept:()=>sR,network_socket_bind:()=>eR,network_socket_close:()=>uR,network_socket_connect:()=>iR,network_socket_init:()=>tR,network_socket_listen:()=>nR,network_socket_receive:()=>_R,network_socket_receive_from:()=>pR,network_socket_send:()=>oR,network_socket_send_to:()=>aR,network_stop:()=>QO,network_wifi_connect:()=>qO,ntptime_address:()=>TR,ntptime_time:()=>IR,requests_attribute:()=>lR,requests_attribute2:()=>ER,requests_get:()=>rR,requests_get2:()=>hR,requests_method:()=>dR,requests_post:()=>mR});var U={};t.r(U),t.d(U,{pe_g1_battery_left:()=>NR,pe_g1_dc_motor:()=>DR,pe_g1_dc_motor_speed:()=>fR,pe_g1_servo_get_angle:()=>vR,pe_g1_servo_get_speed:()=>YR,pe_g1_servo_set_angle:()=>FR,pe_g1_servo_set_speed:()=>PR,pe_g1_use_i2c_init:()=>LR});var w={};t.r(w),t.d(w,{CI130X_BROADCAST:()=>sc,CI130X_GET_THE_RECOGNIZED_CMD:()=>nc,CI130X_GET_WHETHER_IDENTIFY:()=>ic,CI130X_IDENTIFY_AND_SAVE:()=>ec,CI130X_SET_SYSTEM_CMD:()=>_c,HCSR04:()=>Jc,PS2_Button:()=>jc,PS2_Buttons:()=>Zc,PS2_Buttons_new:()=>ng,PS2_State:()=>$c,PS2_init:()=>qc,PS2_init_new:()=>eg,PS2_stk:()=>tg,PS2_stk_new:()=>sg,PS2_vibration:()=>Qc,PS2_vibration_new:()=>ig,camera_sensor_init:()=>Xg,camera_sensor_result:()=>yg,column_tube_foot:()=>Gg,define_keyboards:()=>Ug,educore_body_sensor:()=>Sg,educore_button_sensor_extern:()=>Dg,educore_camera_sensor:()=>Yg,educore_infrared_sensor:()=>Ng,educore_soilhum_sensor:()=>Ag,educore_temp_sensor:()=>vg,educore_temphum_sensor:()=>Lg,educore_ultrasonic_sensor:()=>Fg,esp32_s2_weather_init:()=>kc,esp32_s2_weather_rain:()=>Wc,esp32_s2_weather_wd:()=>Hc,esp32_s2_weather_ws:()=>Kc,extern_rfid_read:()=>fc,extern_rfid_readcontent:()=>Pc,extern_rfid_readid:()=>Fc,extern_rfid_status:()=>Xc,extern_rfid_write:()=>vc,extern_rfid_write_return:()=>Yc,get_keboards_value:()=>wg,gnss_get_data:()=>ag,gnss_have_data:()=>pg,init_matrix_keyboard:()=>Vg,interaction_whether_to_interaction:()=>ZR,interaction_whether_to_interaction_SANT:()=>tc,line_tube_foot:()=>Bg,mixbot_sensor_extern_get_addr:()=>hg,mixbot_sensor_extern_set_addr:()=>mg,pm25_get_data:()=>og,radar_set_DETECTION_THRESHOLD:()=>jR,radar_set_DETECTION_THRESHOLD_SANT:()=>$R,robot_button_extern_get_value:()=>rg,robot_color_extern_get_value:()=>Mg,robot_infrared_extern_get_value:()=>dg,robot_infrared_extern_grey_get_value:()=>Ig,robot_potentiometer_extern_get_value:()=>Tg,robot_sonar_extern_get_value:()=>Eg,robot_sonar_extern_led:()=>Og,robot_touch_extern_get_value:()=>lg,sensor_APDS9960_extern:()=>pc,sensor_DS18X20:()=>qR,sensor_LTR308_extern:()=>ac,sensor_LTR390UV_extern:()=>lc,sensor_MAX30102_extern:()=>oc,sensor_QMC5883L_extern:()=>Oc,sensor_VL530LX_extern:()=>dc,sensor_adxl345_get_acceleration:()=>GR,sensor_aht11_extern:()=>Tc,sensor_bmp:()=>KR,sensor_compass_reset:()=>Nc,sensor_dht11:()=>wR,sensor_hp203_extern:()=>Mc,sensor_light_level:()=>UR,sensor_lm35:()=>zR,sensor_ltr381_extern:()=>uc,sensor_mixgo_extern_button_attachInterrupt:()=>VR,sensor_mixgo_extern_button_get_presses:()=>bR,sensor_mixgo_extern_button_is_pressed:()=>yR,sensor_mixgo_extern_button_was_pressed:()=>xR,sensor_mixgo_extern_light:()=>kR,sensor_mixgo_extern_pin_near:()=>WR,sensor_mixgo_extern_sound:()=>HR,sensor_mixgoce_hot_wheel_degrees:()=>wc,sensor_mixgoce_hot_wheel_is_touched:()=>Uc,sensor_mpu9250_attachGestureInterrupt:()=>BR,sensor_mpu9250_calibrate_compass:()=>Sc,sensor_mpu9250_field_strength:()=>Lc,sensor_mpu9250_gesture:()=>Rc,sensor_mpu9250_get_acceleration:()=>cc,sensor_mpu9250_get_gyro:()=>Cc,sensor_mpu9250_get_magnetic:()=>gc,sensor_mpu9250_temperature:()=>Ac,sensor_ms5611_extern:()=>mc,sensor_ms5611_extern_altitude:()=>Ec,sensor_read_humiture:()=>fg,sensor_sht:()=>JR,sensor_shtc3_extern:()=>Ic,sensor_spl06_001_extern:()=>hc,sensor_ucs12071_extern:()=>rc,sensor_use_i2c_init:()=>QR,sensor_use_spi_init:()=>Dc,sensor_use_uart_init:()=>_g,sensor_weather_solo_init:()=>Rg,sensor_weather_solo_rain:()=>Cg,sensor_weather_solo_wd:()=>cg,sensor_weather_solo_ws:()=>gg,sensor_weigh_init:()=>xg,tvoc_get_data:()=>ug,ultrasonic_sensor_read_distance:()=>Pg,weather_data:()=>yc,weather_have_data:()=>xc,weather_set_label:()=>Vc,weather_set_label_container:()=>Bc,weather_set_label_item:()=>Gc,weather_uart_mixio:()=>bc,weigh_sensor_get_weight:()=>bg});var k={};t.r(k),t.d(k,{HCSR04:()=>_C,RTC_set_date:()=>sC,RTC_set_time:()=>nC,bitbot_als_num:()=>TS,dht11:()=>cS,educore_button_sensor:()=>FS,educore_button_was_pressed:()=>PS,educore_gyroscope_sensor:()=>NS,educore_gyroscope_sensor_read:()=>DS,educore_gyroscope_sensor_shake:()=>fS,educore_light_sensor:()=>LS,educore_rfid_sensor:()=>vS,educore_rfid_sensor_scan:()=>YS,educore_rfid_sensor_scan_data:()=>XS,educore_voice_sensor:()=>SS,number1:()=>pC,number2:()=>aC,number3:()=>uC,number4:()=>rC,number5:()=>lC,number6:()=>dC,number7:()=>IC,onboard_RTC_get_time:()=>cC,onboard_RTC_get_time_str:()=>NC,onboard_RTC_get_timestamp:()=>gC,onboard_RTC_get_timetuple_to_str:()=>DC,onboard_RTC_set_datetime:()=>AC,onboard_RTC_settime_string:()=>SC,onboard_RTC_timestamp_totuple:()=>CC,rfid_readcontent:()=>yC,rfid_readid:()=>XC,rfid_status:()=>VC,rfid_write:()=>xC,rfid_write_return:()=>bC,sensor_LTR308:()=>fC,sensor_aht11:()=>PC,sensor_bitbot_ALS:()=>IS,sensor_button_get_presses:()=>mS,sensor_button_is_pressed:()=>MS,sensor_button_was_pressed:()=>hS,sensor_distance_hrsc04:()=>iC,sensor_eulerangles:()=>GC,sensor_field_strength:()=>gS,sensor_get_acceleration:()=>BC,sensor_get_temperature:()=>vC,sensor_get_the_coprocessor_version:()=>yS,sensor_hp203:()=>YC,sensor_light:()=>RS,sensor_mixbot_get_gyro:()=>dS,sensor_mixbot_patrol_calibrate:()=>uS,sensor_mixbot_patrol_value:()=>rS,sensor_mixbot_temperature:()=>lS,sensor_mixgo_LTR308:()=>OC,sensor_mixgo_button_attachInterrupt:()=>Jg,sensor_mixgo_button_get_presses:()=>Kg,sensor_mixgo_button_is_pressed:()=>Hg,sensor_mixgo_button_was_pressed:()=>Wg,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>jC,sensor_mixgo_cc_mmc5603_get_angle:()=>QC,sensor_mixgo_cc_mmc5603_get_magnetic:()=>zC,sensor_mixgo_light:()=>oC,sensor_mixgo_nova_LTR308:()=>EC,sensor_mixgo_nova_pin_near:()=>mC,sensor_mixgo_pin_near:()=>hC,sensor_mixgo_pin_near_double:()=>MC,sensor_mixgo_pin_near_single:()=>TC,sensor_mixgo_pin_pressed:()=>$g,sensor_mixgo_sant_color:()=>RC,sensor_mixgo_touch_slide:()=>eC,sensor_mixgocar42_button_attachInterrupt:()=>jg,sensor_mixgocar42_button_get_presses:()=>Qg,sensor_mixgocar42_button_is_pressed:()=>qg,sensor_mixgocar42_button_was_pressed:()=>zg,sensor_mixgocar_battery_left:()=>aS,sensor_mixgocar_pin_near:()=>oS,sensor_mixgocar_pin_near_line:()=>_S,sensor_mixgocar_pin_near_state_change:()=>pS,sensor_mixgoce_pin_pressed:()=>Zg,sensor_mixgoce_temperature:()=>ZC,sensor_mixgome_temperature:()=>$C,sensor_mpython_pin_pressed:()=>tC,sensor_mpython_qmi8658_get_gyro:()=>tS,sensor_mpython_qmi8658_temperature:()=>eS,sensor_onboard_compass_reset:()=>qC,sensor_onboard_mpu9250_calibrate_compass:()=>WC,sensor_onboard_mpu9250_field_strength:()=>JC,sensor_onboard_mpu9250_gesture:()=>UC,sensor_onboard_mpu9250_get_acceleration:()=>wC,sensor_onboard_mpu9250_get_gyro:()=>HC,sensor_onboard_mpu9250_get_magnetic:()=>kC,sensor_onboard_mpu9250_temperature:()=>KC,sensor_pin_near:()=>OS,sensor_pin_pressed:()=>ES,sensor_read:()=>AS,sensor_rm_acc:()=>sS,sensor_rm_battery_left:()=>nS,sensor_rm_pin_near_double:()=>iS,sensor_rtc_init:()=>LC,sensor_sound:()=>FC,sensor_temperature:()=>CS});var H={};t.r(H),t.d(H,{serial_any:()=>WS,serial_begin:()=>QS,serial_print:()=>GS,serial_print_byte:()=>BS,serial_print_hex:()=>wS,serial_println:()=>US,serial_read_from_ai:()=>_A,serial_readline:()=>KS,serial_readstr:()=>HS,serial_readstr_until:()=>JS,serial_receive_data_event:()=>kS,serial_send_to_ai:()=>sA,serial_softserial:()=>zS,serial_softserial_new:()=>qS,system_input:()=>jS,system_print:()=>$S,system_print_container:()=>iA,system_print_end:()=>tA,system_print_inline:()=>ZS,system_print_item:()=>nA,system_print_many:()=>eA});var W={};t.r(W),t.d(W,{Panic_with_status_code:()=>uA,Timer_init:()=>gA,base_delay:()=>AA,controls_delay:()=>aA,controls_delay_new:()=>pA,controls_millis:()=>lA,controls_uname:()=>IA,raw_block:()=>dA,reset:()=>rA,system_bitbot_shutdown:()=>cA,system_machine_reset:()=>RA,system_ticks_diff:()=>hA,system_timer:()=>MA,system_timer_init:()=>mA,system_wdt_feed:()=>OA,system_wdt_init:()=>EA,time_ticks_diff:()=>SA,timer:()=>TA,timer2:()=>CA});var K={};t.r(K),t.d(K,{Air_daily_content:()=>BA,Air_now_content:()=>vA,Geo_moon_content:()=>UA,Geo_sun_content:()=>GA,Life_suggestion_content:()=>XA,Location_search_content:()=>xA,Tide_daily_content:()=>yA,WEATHER_DAILY:()=>DA,WEATHER_HOUR:()=>fA,WEATHER_NOW:()=>NA,Weather_alarm_content:()=>YA,Weather_daily:()=>bA,Weather_daily_content:()=>VA,Weather_now:()=>FA,Weather_now_content:()=>PA});var J={};t.r(J),t.d(J,{PIN_init:()=>UL,actuator_extern_get_led_bright:()=>pL,actuator_extern_get_led_state:()=>aL,actuator_extern_led_bright:()=>oL,actuator_extern_led_brightness:()=>uL,actuator_ms32006_dcmotor:()=>zA,actuator_ms32006_init:()=>qA,actuator_ms32006_stepper:()=>QA,actuator_neopixel_init:()=>rL,actuator_neopixel_rgb:()=>IL,actuator_neopixel_rgb_all:()=>lL,actuator_neopixel_rgb_show_all_chase:()=>TL,actuator_neopixel_rgb_show_all_rainbow:()=>ML,actuator_neopixel_write:()=>dL,actuator_use_uart_init:()=>hL,esp32_music_get_tempo_extern:()=>iL,esp32_music_pitch:()=>$A,esp32_music_pitch_init:()=>jA,esp32_music_pitch_with_time:()=>ZA,esp32_music_play_list:()=>nL,esp32_music_reset_extern:()=>sL,esp32_music_set_tempo_extern:()=>eL,esp32_music_stop:()=>tL,mixbot_actuator_extern_get_addr:()=>BL,mixbot_actuator_extern_set_addr:()=>GL,mixbot_addr_extern:()=>LL,parrot_PIN_init:()=>WL,parrot_move_speed:()=>KL,pin_led_bright:()=>wL,player_play_music:()=>cL,player_set_mode:()=>RL,player_set_play:()=>EL,player_set_volume:()=>OL,player_whether_stop:()=>mL,robot_led_extern:()=>FL,robot_led_extern_get_value:()=>PL,robot_motor_extern:()=>NL,robot_motor_extern_get_speed:()=>DL,robot_servo_extern_absolute_run:()=>yL,robot_servo_extern_get_status:()=>vL,robot_servo_extern_relative_continue:()=>VL,robot_servo_extern_relative_origin:()=>xL,robot_servo_extern_relative_run:()=>bL,robot_servo_extern_stop:()=>XL,robot_servo_extern_stop_mode:()=>YL,robot_traffic_light_extern:()=>fL,servo_PIN_init:()=>kL,servo_get_angle:()=>KA,servo_get_speed:()=>JA,servo_init:()=>wA,servo_move:()=>_L,servo_move_angle:()=>HL,servo_set_angle:()=>HA,servo_set_speed:()=>WA,servo_speed_360:()=>kA,syn6288_builtin_voice:()=>SL,syn6288_get_voice:()=>CL,syn6288_set_voice:()=>gL,syn6288_tts_play:()=>AL});var q={};t.r(q),t.d(q,{actuator_dc_motor:()=>RN,actuator_dc_motor_stop:()=>cN,actuator_get_led_bright:()=>nN,actuator_get_led_state:()=>sN,actuator_led_bright:()=>iN,actuator_led_brightness:()=>_N,actuator_mixbot_buzzer_on_off:()=>LN,actuator_mixgo_nova_mic_get:()=>PN,actuator_mixgo_nova_mic_set:()=>FN,actuator_mixgo_nova_onboard_music_pitch:()=>bN,actuator_mixgo_nova_onboard_music_stop:()=>VN,actuator_mixgo_nova_play_audio:()=>yN,actuator_mixgo_nova_play_online_audio:()=>xN,actuator_mixgo_nova_record_audio:()=>XN,actuator_mixgo_nova_voice_get:()=>YN,actuator_mixgo_nova_voice_set:()=>vN,actuator_mixgo_zero_led_color:()=>oN,actuator_onboard_neopixel_rgb:()=>IN,actuator_onboard_neopixel_rgb_all:()=>TN,actuator_onboard_neopixel_rgb_show_all_chase:()=>MN,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>hN,actuator_onboard_neopixel_write:()=>dN,actuator_stepper_keep:()=>EN,actuator_stepper_stop:()=>ON,analog_ble_keyboard_init:()=>zN,analog_ble_keyboard_input:()=>$N,analog_ble_keyboard_mouse_init:()=>oD,analog_ble_keyboard_mouse_input:()=>rD,analog_ble_keyboard_mouse_send_battery:()=>uD,analog_ble_keyboard_mouse_str:()=>lD,analog_ble_keyboard_send_battery:()=>tD,analog_ble_keyboard_str:()=>ZN,analog_ble_mouse_init:()=>eD,analog_ble_mouse_input:()=>sD,analog_ble_mouse_keyboard_input:()=>dD,analog_ble_mouse_send_battery:()=>_D,analog_keyboard_input:()=>wN,analog_keyboard_str:()=>JN,analog_mouse_input:()=>WN,bitbot_motor:()=>fN,bitbot_move:()=>NN,bitbot_stop:()=>DN,ble_keyboard_connect:()=>jN,ble_keyboard_get_mac:()=>QN,ble_keyboard_mouse_connect:()=>aD,ble_keyboard_mouse_get_mac:()=>pD,ble_mouse_connect:()=>nD,ble_mouse_get_mac:()=>iD,cc_number:()=>pN,educore_ble_keyboard_input:()=>gD,educore_ble_sensor_connected:()=>cD,educore_ble_sensor_init:()=>RD,educore_buzzer:()=>ID,educore_buzzer_play_tone:()=>TD,educore_buzzer_play_tone_time:()=>MD,educore_buzzer_stop:()=>hD,educore_neopixel_clear:()=>OD,educore_neopixel_rgb:()=>ED,educore_rgb_light:()=>mD,esp32_music_get_tempo:()=>qL,esp32_music_reset:()=>ZL,esp32_music_set_tempo:()=>JL,esp32_onboard_music_pitch:()=>zL,esp32_onboard_music_pitch_with_time:()=>QL,esp32_onboard_music_play_list:()=>$L,esp32_onboard_music_stop:()=>jL,general_key:()=>HN,general_key_tuple:()=>qN,get_keyboard_light:()=>CD,get_power_output:()=>GN,ledswitch:()=>eN,mixbot_motor:()=>AN,mixbot_motor_status:()=>gN,mixbot_move:()=>CN,mixbot_stop:()=>SN,mouse_key:()=>KN,number:()=>tN,rm_actuator_get_led_bright:()=>uN,rm_actuator_get_led_state:()=>rN,rm_actuator_led_bright:()=>aN,rm_actuator_led_brightness:()=>lN,rm_motor:()=>mN,set_all_power_output:()=>UN,set_power_output:()=>BN,special_key:()=>kN});var z={};t.r(z),t.d(z,{ai_sensor_20object:()=>nf,ai_sensor_ailocal_class:()=>WD,ai_sensor_ailocal_class_result:()=>KD,ai_sensor_ailocal_train:()=>HD,ai_sensor_asr_recognize:()=>jD,ai_sensor_audio_play:()=>qD,ai_sensor_audio_record:()=>JD,ai_sensor_barcode:()=>FD,ai_sensor_circle:()=>xD,ai_sensor_classifier_faces:()=>ef,ai_sensor_color:()=>GD,ai_sensor_color_chases:()=>kD,ai_sensor_color_chases_result:()=>wD,ai_sensor_config:()=>LD,ai_sensor_face:()=>tf,ai_sensor_find_20objects:()=>sf,ai_sensor_find_barcodes:()=>PD,ai_sensor_find_circles:()=>bD,ai_sensor_find_colors:()=>UD,ai_sensor_find_licenseplates:()=>ZD,ai_sensor_find_lines:()=>yD,ai_sensor_find_qrcodes:()=>fD,ai_sensor_find_rects:()=>BD,ai_sensor_find_tags:()=>YD,ai_sensor_licenseplate:()=>$D,ai_sensor_line:()=>XD,ai_sensor_qrcode:()=>DD,ai_sensor_qrcode_lite:()=>AD,ai_sensor_rect:()=>VD,ai_sensor_rgb:()=>ND,ai_sensor_tag:()=>vD,ai_sensor_use_uart_init:()=>SD,ai_sensor_yolo_recognize:()=>zD,ai_sensor_yolo_recognize_result:()=>QD});var Q={};t.r(Q),t.d(Q,{MICROPYTHON_AI_Speech_asr:()=>pf,MICROPYTHON_AI_Speech_unit:()=>of,MICROPYTHON_AI_client:()=>_f});var j={};t.r(j),t.d(j,{mpython_blynk_app_data:()=>Of,mpython_blynk_app_notify:()=>Tf,mpython_blynk_email:()=>Rf,mpython_blynk_get_timers:()=>hf,mpython_blynk_on_connected:()=>lf,mpython_blynk_on_disconnected:()=>rf,mpython_blynk_run:()=>If,mpython_blynk_sensor_data_to_app:()=>Ef,mpython_blynk_set_property:()=>cf,mpython_blynk_setup:()=>gf,mpython_blynk_stop_timers:()=>Mf,mpython_blynk_sync_virtual:()=>uf,mpython_blynk_terminal_widget_vpin:()=>af,mpython_blynktimer:()=>mf,mpython_blynktimer_run:()=>df});var $={};t.r($),t.d($,{cc_g1_read_bat:()=>Cf,cc_g1_read_joystick:()=>Sf,cc_g1_read_key:()=>Af,cc_g1_turnoff:()=>Lf});var Z={};t.r(Z),t.d(Z,{ce_go_dc_motor:()=>Xf,ce_go_get_led_bright:()=>ff,ce_go_get_led_state:()=>Ff,ce_go_hall_attachInterrupt:()=>yf,ce_go_hall_data:()=>bf,ce_go_hall_initialize:()=>xf,ce_go_led_bright:()=>Df,ce_go_led_brightness:()=>Pf,ce_go_light_number:()=>Nf,ce_go_pin_light:()=>wf,ce_go_pin_near:()=>Bf,ce_go_pin_near_line:()=>Vf,ce_go_pin_near_state_change:()=>Gf,ce_go_stepper_keep:()=>vf,ce_go_stepper_stop:()=>Yf,educore_car:()=>kf,educore_car_pin_near:()=>Jf,educore_car_pin_near_line:()=>Kf,educore_car_stepper_keep:()=>Hf,educore_car_stepper_stop:()=>Wf,sensor_mixgome_eulerangles:()=>Uf});var tt={};t.r(tt),t.d(tt,{communicate_bluetooth_central_init:()=>DF,communicate_bluetooth_connect:()=>PF,communicate_bluetooth_disconnect:()=>vF,communicate_bluetooth_handle:()=>VF,communicate_bluetooth_is_connected:()=>XF,communicate_bluetooth_mac:()=>YF,communicate_bluetooth_peripheral_init:()=>fF,communicate_bluetooth_recv:()=>bF,communicate_bluetooth_recv_only:()=>xF,communicate_bluetooth_scan:()=>FF,communicate_bluetooth_send:()=>yF,communicate_espnow_init:()=>BF,communicate_espnow_init_new:()=>GF,communicate_i2c_available:()=>eF,communicate_i2c_init:()=>Qf,communicate_i2c_master_read:()=>tF,communicate_i2c_onboard:()=>qf,communicate_i2c_read:()=>jf,communicate_i2c_scan:()=>Zf,communicate_i2c_write:()=>$f,communicate_ir_recv_init:()=>EF,communicate_ir_send_init:()=>CF,communicate_ow_init:()=>dF,communicate_ow_read:()=>MF,communicate_ow_reset:()=>TF,communicate_ow_scan:()=>IF,communicate_ow_select:()=>mF,communicate_ow_write:()=>hF,communicate_spi_buffer:()=>_F,communicate_spi_init:()=>nF,communicate_spi_onboard:()=>zf,communicate_spi_read:()=>oF,communicate_spi_read_output:()=>pF,communicate_spi_readinto:()=>aF,communicate_spi_readinto_output:()=>uF,communicate_spi_set:()=>sF,communicate_spi_write:()=>rF,communicate_spi_write_readinto:()=>lF,espnow_radio_channel:()=>KF,espnow_radio_channel_new:()=>qF,espnow_radio_on_off:()=>zF,espnow_radio_rec:()=>jF,espnow_radio_recv:()=>ZF,espnow_radio_recv_certain_msg:()=>tP,espnow_radio_recv_certain_msg_new:()=>iP,espnow_radio_recv_msg:()=>$F,espnow_radio_recv_new:()=>eP,espnow_radio_send:()=>QF,espnow_radio_txpower:()=>JF,i2c_slave_onreceive:()=>iF,internal_variable:()=>OF,ir_recv_timeout:()=>gF,ir_transmit_busy:()=>NF,ir_transmit_conventional_data:()=>SF,ir_transmit_raw_code:()=>LF,ir_transmit_study_code:()=>AF,ir_whether_recv:()=>cF,lora_init:()=>nP,lora_packet:()=>sP,lora_recv:()=>oP,lora_send:()=>_P,network_espnow_info:()=>wF,network_espnow_mac:()=>UF,network_espnow_recv:()=>kF,network_espnow_recv_handle:()=>WF,network_espnow_send:()=>HF,recv_fun:()=>RF,urequests_attribute:()=>aP,urequests_get:()=>pP,urequests_method:()=>uP});var et={};t.r(et),t.d(et,{display_animate:()=>XP,display_circle:()=>yP,display_color_seclet:()=>KP,display_draw_4strings:()=>NP,display_fill:()=>YP,display_lcd_use_i2c_init:()=>$P,display_line:()=>FP,display_line_arbitrarily:()=>DP,display_matrix_extern_bright_point:()=>RP,display_matrix_extern_bright_screen:()=>gP,display_matrix_extern_clear:()=>mP,display_matrix_extern_get_pixel:()=>OP,display_matrix_extern_get_screen_pixel:()=>cP,display_matrix_extern_image_builtins:()=>CP,display_matrix_extern_scroll_string:()=>MP,display_matrix_extern_scroll_string_delay:()=>hP,display_matrix_extern_shift:()=>EP,display_matrix_extern_show_frame_string:()=>IP,display_matrix_extern_show_frame_string_delay:()=>TP,display_matrix_extern_show_image:()=>lP,display_matrix_extern_show_image_or_string_delay:()=>dP,display_matrix_use_i2c_init:()=>rP,display_oled_drawPixel:()=>VP,display_oled_showBitmap:()=>bP,display_oled_use_i2c_init:()=>nv,display_onoff:()=>PP,display_rect:()=>fP,display_tm1650_power:()=>GP,display_tm1650_set_brightness:()=>kP,display_tm1650_show_dot:()=>wP,display_tm1650_show_num:()=>UP,display_tm_use_i2c_init:()=>BP,display_triangle:()=>xP,display_use_i2c_init:()=>LP,extern_oled_bright_point:()=>Mv,extern_oled_clear:()=>dv,extern_oled_get_pixel:()=>Tv,extern_oled_hvline:()=>mv,extern_oled_line:()=>Ev,extern_oled_scroll_string:()=>rv,extern_oled_scroll_string_delay:()=>lv,extern_oled_shape_rect:()=>hv,extern_oled_shift:()=>Iv,extern_oled_show_frame_string:()=>av,extern_oled_show_frame_string_delay:()=>uv,extern_oled_show_image:()=>sv,extern_oled_show_image_or_string_delay:()=>pv,extern_oled_show_image_xy:()=>_v,extern_oled_show_string:()=>ov,image_shift:()=>vP,lcd_backlight:()=>ev,lcd_clear:()=>iv,lcd_print_string:()=>tv,lcd_show_image_or_string_delay:()=>ZP,matrix_extern_image_arithmetic:()=>SP,matrix_extern_image_invert:()=>AP,tft_fill:()=>QP,tft_line_arbitrarily:()=>jP,tft_scroll_string_delay:()=>zP,tft_show_frame_string_delay:()=>qP,tft_show_image_or_string_delay:()=>JP,tft_show_image_xy:()=>WP,tft_use_spi_init:()=>HP});var it={};t.r(it),t.d(it,{bitbot_display_bitmap_create:()=>rY,bitbot_display_image_create:()=>uY,display_available:()=>Pv,display_bitmap_create:()=>fv,display_bright_point:()=>xv,display_bright_screen:()=>Vv,display_clear:()=>Fv,display_get_pixel:()=>yv,display_get_screen_pixel:()=>bv,display_image_builtins:()=>Lv,display_image_builtins_all:()=>Nv,display_image_create:()=>Dv,display_scroll_string:()=>Cv,display_scroll_string_delay:()=>Sv,display_shift:()=>Xv,display_show_frame_string:()=>cv,display_show_frame_string_delay:()=>gv,display_show_image:()=>Ov,display_show_image_or_string_delay:()=>Rv,draw_pointer:()=>NY,image_arithmetic:()=>vv,image_invert:()=>Yv,mixbot_display_bitmap_create:()=>sY,mixbot_display_bright_screen:()=>pY,mixbot_display_get_ambientbright:()=>oY,mixbot_display_get_screen_pixel:()=>_Y,mixbot_display_image_create:()=>nY,mixbot_display_rotate:()=>aY,mixgo_display_bitmap_create:()=>Wv,mixgo_display_image_create_new:()=>Hv,mixgome_display_bitmap_create:()=>Gv,mixgome_display_font:()=>kv,mixgome_display_image_create:()=>Bv,mixgomini_display_bitmap_create:()=>wv,mixgomini_display_image_create:()=>Uv,mpython_display_hvline:()=>eY,mpython_display_line:()=>iY,mpython_display_shape_rect:()=>tY,mpython_pbm_image:()=>Kv,nova_draw_pointer:()=>DY,onboard_oled_bright_point:()=>Zv,onboard_oled_scroll_string_delay:()=>$v,onboard_oled_show_frame_string_delay:()=>jv,onboard_oled_show_image:()=>Jv,onboard_oled_show_image_or_string_delay:()=>Qv,onboard_oled_show_image_xy:()=>qv,onboard_oled_show_string:()=>zv,onboard_tft_bright_point:()=>OY,onboard_tft_bright_screen:()=>XY,onboard_tft_clear:()=>yY,onboard_tft_clock_clear:()=>AY,onboard_tft_clock_draw:()=>SY,onboard_tft_clock_get_rtctime:()=>gY,onboard_tft_clock_init:()=>cY,onboard_tft_clock_set_time:()=>CY,onboard_tft_display_hvline:()=>hY,onboard_tft_display_line:()=>mY,onboard_tft_display_shape_circle:()=>LY,onboard_tft_display_shape_rect:()=>MY,onboard_tft_fill:()=>RY,onboard_tft_get_pixel:()=>EY,onboard_tft_get_screen_pixel:()=>YY,onboard_tft_scroll_string_delay:()=>Av,onboard_tft_shift:()=>vY,onboard_tft_show_frame_string:()=>PY,onboard_tft_show_frame_string_delay:()=>TY,onboard_tft_show_image:()=>FY,onboard_tft_show_image_or_string_delay:()=>IY,onboard_tft_show_image_xy:()=>lY,onboard_tft_show_image_xy_direct:()=>dY,onboard_tft_show_texts:()=>fY});var nt={};t.r(nt),t.d(nt,{factory_block:()=>kY,factory_block_return:()=>HY,factory_block_return_with_textarea:()=>KY,factory_block_with_textarea:()=>WY,factory_callMethod_noreturn:()=>UY,factory_callMethod_return:()=>wY,factory_declare:()=>GY,factory_from_import:()=>xY,factory_function_noreturn:()=>VY,factory_function_return:()=>BY,factory_import:()=>bY,folding_block:()=>JY});var st={};t.r(st),t.d(st,{inout_analog_atten:()=>aX,inout_analog_read:()=>eX,inout_analog_read_init:()=>pX,inout_analog_write:()=>$Y,inout_analog_write_init:()=>oX,inout_analog_write_set:()=>ZY,inout_digital_init:()=>sX,inout_digital_read:()=>QY,inout_digital_write:()=>zY,inout_highlow:()=>qY,inout_pin_attachInterrupt:()=>nX,inout_pin_pressed:()=>iX,inout_pin_pressed_init:()=>uX,inout_pwm_analog_write:()=>jY,inout_pwm_analog_write_init:()=>_X,inout_pwm_analog_write_set_freq:()=>tX});var _t={};t.r(_t),t.d(_t,{IOT_CONNECT_OLLAMA:()=>bX,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>DX,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>LX,IOT_EMQX_PING:()=>fX,IOT_FORMATTING:()=>SX,IOT_FORMAT_STRING:()=>AX,IOT_MIXIO_NTP:()=>FX,IOT_MIXIO_PUBLISH:()=>mX,IOT_MIXIO_SUBSCRIBE:()=>EX,iot_client_onboard:()=>PX,iot_connect_ollama:()=>xX,iot_connect_openai:()=>VX,iot_http_client:()=>vX,iot_http_data:()=>YX,iot_mixio_check:()=>cX,iot_mixio_connect:()=>hX,iot_mixio_connect_only:()=>RX,iot_mixio_disconnect:()=>OX,iot_mixio_format_msg:()=>CX,iot_mixio_format_topic:()=>gX,iot_mixly_key:()=>NX,iot_mqtt_client:()=>XX,iot_mqtt_data:()=>yX,iot_onenet_check:()=>TX,iot_onenet_connect:()=>lX,iot_onenet_disconnect:()=>dX,iot_onenet_publish:()=>MX,iot_onenet_publish_dict:()=>IX,iot_wifi_connect:()=>rX,ollama_empty_history:()=>UX,use_ollama_llm_to_chat:()=>BX,use_ollama_llm_to_chat_return:()=>GX});var ot={};t.r(ot),t.d(ot,{educore_mqtt_connect:()=>Ey,educore_mqtt_connect_success:()=>gy,educore_mqtt_subscribe_message:()=>Oy,educore_mqtt_topic_publish:()=>cy,educore_mqtt_topic_subscribe:()=>Ry,educore_wifi_connect:()=>my,network_ap_connect:()=>QX,network_connect:()=>kX,network_get_connect:()=>WX,network_get_wifi:()=>zX,network_init:()=>wX,network_is_active:()=>qX,network_open:()=>JX,network_scan:()=>jX,network_server:()=>$X,network_socket_accept:()=>ny,network_socket_bind:()=>ty,network_socket_close:()=>ay,network_socket_connect:()=>ey,network_socket_init:()=>ZX,network_socket_listen:()=>iy,network_socket_receive:()=>sy,network_socket_receive_from:()=>oy,network_socket_send:()=>_y,network_socket_send_to:()=>py,network_stop:()=>KX,network_wifi_connect:()=>HX,ntptime_address:()=>Iy,ntptime_time:()=>dy,requests_attribute:()=>ry,requests_attribute2:()=>My,requests_get:()=>uy,requests_get2:()=>Ty,requests_method:()=>ly,requests_post:()=>hy});var pt={};t.r(pt),t.d(pt,{pe_g1_battery_left:()=>Sy,pe_g1_dc_motor:()=>Ay,pe_g1_dc_motor_speed:()=>Ly,pe_g1_servo_get_angle:()=>fy,pe_g1_servo_get_speed:()=>Fy,pe_g1_servo_set_angle:()=>Ny,pe_g1_servo_set_speed:()=>Dy,pe_g1_use_i2c_init:()=>Cy});var at={};t.r(at),t.d(at,{CI130X_BROADCAST:()=>Zy,CI130X_GET_THE_RECOGNIZED_CMD:()=>$y,CI130X_GET_WHETHER_IDENTIFY:()=>jy,CI130X_IDENTIFY_AND_SAVE:()=>Qy,CI130X_SET_SYSTEM_CMD:()=>tx,HCSR04:()=>vx,PS2_Button:()=>yx,PS2_Buttons:()=>xx,PS2_Buttons_new:()=>Hx,PS2_State:()=>bx,PS2_init:()=>Yx,PS2_init_new:()=>wx,PS2_stk:()=>Vx,PS2_stk_new:()=>Wx,PS2_vibration:()=>Xx,PS2_vibration_new:()=>kx,RTC_get_time:()=>Gx,RTC_set_date:()=>Vy,RTC_set_datetime:()=>Bx,RTC_set_time:()=>by,camera_sensor_init:()=>gb,camera_sensor_result:()=>Cb,column_tube_foot:()=>Nb,define_keyboards:()=>Db,educore_body_sensor:()=>db,educore_button_sensor_extern:()=>hb,educore_camera_sensor:()=>cb,educore_infrared_sensor:()=>Mb,educore_soilhum_sensor:()=>Ib,educore_temp_sensor:()=>Rb,educore_temphum_sensor:()=>Tb,educore_ultrasonic_sensor:()=>Eb,esp32_s2_weather_init:()=>Dx,esp32_s2_weather_rain:()=>Fx,esp32_s2_weather_wd:()=>fx,esp32_s2_weather_ws:()=>Px,extern_rfid_read:()=>hx,extern_rfid_readcontent:()=>Ex,extern_rfid_readid:()=>mx,extern_rfid_status:()=>cx,extern_rfid_write:()=>Ox,extern_rfid_write_return:()=>Rx,get_keboards_value:()=>Fb,gnss_get_data:()=>qx,gnss_have_data:()=>zx,init_matrix_keyboard:()=>fb,interaction_whether_to_interaction:()=>qy,interaction_whether_to_interaction_SANT:()=>zy,line_tube_foot:()=>Lb,mixbot_sensor_extern_get_addr:()=>_b,mixbot_sensor_extern_set_addr:()=>ob,pm25_get_data:()=>Jx,radar_set_DETECTION_THRESHOLD:()=>Ky,radar_set_DETECTION_THRESHOLD_SANT:()=>Jy,robot_button_extern_get_value:()=>jx,robot_color_extern_get_value:()=>ib,robot_infrared_extern_get_value:()=>Zx,robot_infrared_extern_grey_get_value:()=>tb,robot_potentiometer_extern_get_value:()=>eb,robot_sonar_extern_get_value:()=>nb,robot_sonar_extern_led:()=>sb,robot_touch_extern_get_value:()=>$x,sensor_APDS9960_extern:()=>ix,sensor_DS18X20:()=>lb,sensor_LTR308_extern:()=>nx,sensor_LTR390UV_extern:()=>rx,sensor_MAX30102_extern:()=>ex,sensor_QMC5883L_extern:()=>lx,sensor_VL530LX_extern:()=>Tx,sensor_aht11_extern:()=>Ix,sensor_bmp:()=>ky,sensor_dht11:()=>Ux,sensor_distance_hrsc04:()=>xy,sensor_hp203_extern:()=>sx,sensor_ltr381_extern:()=>ax,sensor_mixgo_extern_button_attachInterrupt:()=>Xy,sensor_mixgo_extern_button_get_presses:()=>Yy,sensor_mixgo_extern_button_is_pressed:()=>Py,sensor_mixgo_extern_button_was_pressed:()=>vy,sensor_mixgo_extern_light:()=>By,sensor_mixgo_extern_pin_near:()=>Uy,sensor_mixgo_extern_sound:()=>Gy,sensor_mixgoce_hot_wheel_degrees:()=>Nx,sensor_mixgoce_hot_wheel_is_touched:()=>Lx,sensor_mpu9250_attachGestureInterrupt:()=>yy,sensor_ms5611_extern:()=>ox,sensor_ms5611_extern_altitude:()=>px,sensor_read_humiture:()=>mb,sensor_rtc_init:()=>wy,sensor_sht:()=>Hy,sensor_shtc3_extern:()=>dx,sensor_spl06_001_extern:()=>_x,sensor_ucs12071_extern:()=>ux,sensor_use_i2c_init:()=>Wy,sensor_use_spi_init:()=>Mx,sensor_use_uart_init:()=>Kx,sensor_weather_solo_init:()=>pb,sensor_weather_solo_rain:()=>rb,sensor_weather_solo_wd:()=>ab,sensor_weather_solo_ws:()=>ub,sensor_weigh_init:()=>Sb,tvoc_get_data:()=>Qx,ultrasonic_sensor_read_distance:()=>Ob,weather_data:()=>gx,weather_have_data:()=>Cx,weather_set_label:()=>Ax,weather_uart_mixio:()=>Sx,weigh_sensor_get_weight:()=>Ab});var ut={};t.r(ut),t.d(ut,{HCSR04:()=>Bb,bitbot_als_num:()=>pB,dht11:()=>MB,educore_button_sensor:()=>gB,educore_button_was_pressed:()=>CB,educore_gyroscope_sensor:()=>OB,educore_gyroscope_sensor_read:()=>RB,educore_gyroscope_sensor_shake:()=>cB,educore_light_sensor:()=>EB,educore_rfid_sensor:()=>SB,educore_rfid_sensor_scan:()=>AB,educore_rfid_sensor_scan_data:()=>LB,educore_voice_sensor:()=>hB,number1:()=>Gb,number2:()=>Ub,number3:()=>wb,number4:()=>kb,number5:()=>Hb,number6:()=>Wb,number7:()=>Kb,onboard_RTC_get_time:()=>bV,onboard_RTC_get_time_str:()=>GV,onboard_RTC_get_timestamp:()=>VV,onboard_RTC_get_timetuple_to_str:()=>UV,onboard_RTC_set_datetime:()=>yV,onboard_RTC_settime_string:()=>xV,onboard_RTC_timestamp_totuple:()=>BV,rfid_readcontent:()=>aV,rfid_readid:()=>pV,rfid_status:()=>lV,rfid_write:()=>uV,rfid_write_return:()=>rV,sensor_LTR308:()=>iV,sensor_adxl345_get_acceleration:()=>RV,sensor_aht11:()=>_V,sensor_bitbot_ALS:()=>oB,sensor_button_get_presses:()=>rB,sensor_button_is_pressed:()=>aB,sensor_button_was_pressed:()=>uB,sensor_compass_reset:()=>LV,sensor_ds18x20:()=>tV,sensor_eulerangles:()=>IV,sensor_get_acceleration:()=>dV,sensor_get_temperature:()=>oV,sensor_get_the_coprocessor_version:()=>NB,sensor_hp203:()=>sV,sensor_light:()=>TB,sensor_lm35:()=>eV,sensor_mixbot_get_gyro:()=>_B,sensor_mixbot_patrol_calibrate:()=>iB,sensor_mixbot_patrol_value:()=>nB,sensor_mixbot_temperature:()=>sB,sensor_mixgo_LTR308:()=>jb,sensor_mixgo_button_attachInterrupt:()=>Xb,sensor_mixgo_button_get_presses:()=>Yb,sensor_mixgo_button_is_pressed:()=>Pb,sensor_mixgo_button_was_pressed:()=>vb,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>HV,sensor_mixgo_cc_mmc5603_get_angle:()=>kV,sensor_mixgo_cc_mmc5603_get_magnetic:()=>wV,sensor_mixgo_light:()=>IB,sensor_mixgo_nova_LTR308:()=>Zb,sensor_mixgo_nova_pin_near:()=>Qb,sensor_mixgo_pin_near:()=>zb,sensor_mixgo_pin_near_double:()=>qb,sensor_mixgo_pin_near_single:()=>Jb,sensor_mixgo_pin_pressed:()=>EV,sensor_mixgo_sant_color:()=>$b,sensor_mixgo_touch_slide:()=>mV,sensor_mixgocar42_button_attachInterrupt:()=>Vb,sensor_mixgocar42_button_get_presses:()=>bb,sensor_mixgocar42_button_is_pressed:()=>yb,sensor_mixgocar42_button_was_pressed:()=>xb,sensor_mixgocar_battery_left:()=>eB,sensor_mixgocar_pin_near:()=>ZV,sensor_mixgocar_pin_near_line:()=>$V,sensor_mixgocar_pin_near_state_change:()=>tB,sensor_mixgoce_pin_pressed:()=>hV,sensor_mixgoce_temperature:()=>KV,sensor_mixgome_temperature:()=>WV,sensor_mpu9250_calibrate_compass:()=>CV,sensor_mpu9250_field_strength:()=>AV,sensor_mpu9250_gesture:()=>TV,sensor_mpu9250_get_acceleration:()=>MV,sensor_mpu9250_get_gyro:()=>gV,sensor_mpu9250_get_magnetic:()=>cV,sensor_mpu9250_temperature:()=>SV,sensor_mpython_pin_pressed:()=>OV,sensor_mpython_qmi8658_get_gyro:()=>JV,sensor_mpython_qmi8658_temperature:()=>qV,sensor_onboard_compass_reset:()=>XV,sensor_onboard_mpu9250_calibrate_compass:()=>PV,sensor_onboard_mpu9250_field_strength:()=>YV,sensor_onboard_mpu9250_gesture:()=>NV,sensor_onboard_mpu9250_get_acceleration:()=>DV,sensor_onboard_mpu9250_get_gyro:()=>FV,sensor_onboard_mpu9250_get_magnetic:()=>fV,sensor_onboard_mpu9250_temperature:()=>vV,sensor_pin_near:()=>dB,sensor_pin_pressed:()=>lB,sensor_read:()=>mB,sensor_rm_acc:()=>jV,sensor_rm_battery_left:()=>QV,sensor_rm_pin_near_double:()=>zV,sensor_sound:()=>nV});var rt={};t.r(rt),t.d(rt,{serial_any:()=>vB,serial_print:()=>DB,serial_print_byte:()=>fB,serial_print_hex:()=>PB,serial_println:()=>FB,serial_read_from_ai:()=>kB,serial_readline:()=>XB,serial_readstr:()=>YB,serial_send_to_ai:()=>wB,serial_softserial:()=>yB,serial_softserial_new:()=>xB,system_input:()=>bB,system_print:()=>VB,system_print_end:()=>GB,system_print_inline:()=>BB,system_print_many:()=>UB});var lt={};t.r(lt),t.d(lt,{Panic_with_status_code:()=>eG,Timer_init:()=>hG,base_delay:()=>OG,controls_delay:()=>oG,controls_delay_new:()=>pG,controls_end_program:()=>nG,controls_millis:()=>iG,controls_uname:()=>_G,reset:()=>sG,system_bitbot_shutdown:()=>MG,system_device_name:()=>ZB,system_device_serial_number:()=>tG,system_event_bus_source:()=>jB,system_event_bus_value:()=>$B,system_machine_reset:()=>TG,system_on_event:()=>qB,system_raise_event:()=>JB,system_reset:()=>WB,system_run_in_background:()=>HB,system_ticks_diff:()=>rG,system_timer:()=>uG,system_timer_init:()=>lG,system_timestamp:()=>zB,system_value:()=>QB,system_wait:()=>KB,system_wdt_feed:()=>IG,system_wdt_init:()=>dG,time_ticks_diff:()=>EG,timer:()=>aG,timer2:()=>mG});var dt={};t.r(dt),t.d(dt,{Air_daily_content:()=>vG,Air_now_content:()=>AG,Geo_moon_content:()=>XG,Geo_sun_content:()=>YG,Life_suggestion_content:()=>NG,Location_search_content:()=>fG,Tide_daily_content:()=>DG,WEATHER_DAILY:()=>cG,WEATHER_HOUR:()=>gG,WEATHER_NOW:()=>RG,Weather_alarm_content:()=>LG,Weather_daily:()=>FG,Weather_daily_content:()=>PG,Weather_now:()=>CG,Weather_now_content:()=>SG});var It={};t.r(It),t.d(It,{controls_pin_attachInterrupt:()=>tU,inout_analog_atten:()=>HG,inout_analog_write:()=>wG,inout_analog_write_init:()=>qG,inout_analog_write_set:()=>kG,inout_analog_write_set_freq:()=>QG,inout_digital_init:()=>JG,inout_digital_read:()=>UG,inout_digital_write:()=>GG,inout_highlow:()=>BG,inout_pinMode:()=>jG,inout_pin_attachInterrupt:()=>KG,inout_pin_pressed:()=>WG,inout_pin_pressed_init:()=>zG,pin_pressed:()=>ZG,pin_pressed_init:()=>$G});var Tt={};t.r(Tt),t.d(Tt,{analog_input:()=>uU,analog_output:()=>lU,espnow_channel:()=>oU,haskylens_model:()=>pU,i2c_A_pin:()=>dU,i2c_B_pin:()=>IU,pins_analog:()=>EU,pins_analog_pin:()=>OU,pins_axis:()=>xU,pins_brightness:()=>bU,pins_builtinimg:()=>fU,pins_builtinimg_extern:()=>FU,pins_button:()=>gU,pins_buttonB:()=>CU,pins_dac:()=>RU,pins_dac_pin:()=>cU,pins_digital:()=>iU,pins_digital_dot:()=>WU,pins_digital_pin:()=>nU,pins_exlcdh:()=>XU,pins_exlcdv:()=>yU,pins_imglist:()=>PU,pins_input_pin:()=>sU,pins_one_more:()=>HU,pins_output_pin:()=>_U,pins_playlist:()=>vU,pins_playlist_extern:()=>YU,pins_pwm:()=>SU,pins_pwm_pin:()=>AU,pins_radio_datarate:()=>kU,pins_radio_power:()=>wU,pins_serial:()=>DU,pins_tone_notes:()=>UU,pins_touch:()=>NU,pins_touch_pin:()=>LU,pins_tts_bgmusic:()=>GU,pins_tts_builtin_music:()=>BU,pins_tts_voice:()=>VU,pwm_input:()=>aU,pwm_output:()=>rU,spi_A_pin:()=>TU,spi_B_pin:()=>MU,spi_C_pin:()=>hU,spi_D_pin:()=>mU});var Mt={};t.r(Mt),t.d(Mt,{inout_analog_atten:()=>ew,inout_analog_write:()=>zU,inout_analog_write_init:()=>tw,inout_analog_write_set:()=>QU,inout_digital_init:()=>ZU,inout_digital_read:()=>qU,inout_digital_write:()=>JU,inout_highlow:()=>KU,inout_pin_attachInterrupt:()=>$U,inout_pin_pressed:()=>jU,inout_pin_pressed_init:()=>iw});var ht={};t.r(ht),t.d(ht,{analog_input:()=>dw,analog_output:()=>Tw,espnow_channel:()=>rw,haskylens_model:()=>lw,i2c_A_pin:()=>Mw,i2c_B_pin:()=>hw,pins_analog:()=>gw,pins_analog_pin:()=>cw,pins_axis:()=>xw,pins_brightness:()=>Bw,pins_builtinimg:()=>Pw,pins_builtinimg_extern:()=>vw,pins_button:()=>sw,pins_buttonB:()=>_w,pins_dac:()=>Lw,pins_dac_pin:()=>Aw,pins_digital:()=>nw,pins_digital_dot:()=>Jw,pins_digital_pin:()=>ow,pins_exlcdh:()=>bw,pins_exlcdv:()=>Vw,pins_imglist:()=>Yw,pins_input_pin:()=>pw,pins_interrupt:()=>fw,pins_one_more:()=>Kw,pins_output_pin:()=>aw,pins_playlist:()=>Xw,pins_playlist_extern:()=>yw,pins_pwm:()=>Sw,pins_pwm_input:()=>uw,pins_pwm_pin:()=>Cw,pins_radio_datarate:()=>Ww,pins_radio_power:()=>Hw,pins_serial:()=>Fw,pins_tone_notes:()=>kw,pins_touch:()=>Dw,pins_touch_pin:()=>Nw,pins_tts_bgmusic:()=>ww,pins_tts_builtin_music:()=>Uw,pins_tts_voice:()=>Gw,pwm_output:()=>Iw,spi_A_pin:()=>mw,spi_B_pin:()=>Ew,spi_C_pin:()=>Ow,spi_D_pin:()=>Rw});const mt=Blockly,Et=Mixly,Ot={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(o+=n)):i=o}else i="i";return i}},Rt=Ot; +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class ct{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(mt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(mt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_if_else");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(mt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(mt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Gt={init:function(){this.setColour(Xt),this.appendValueInput("FROM").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.PYTHON_RANGE).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Ut={init:function(){this.setColour(Xt),this.appendValueInput("LIST").setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(mt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return mt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},wt={init:function(){this.setColour(Xt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new mt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(mt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:mt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:mt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},kt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new mt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(mt.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_finally");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Ht={init:function(){this.setColour(Xt);var t=new mt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:mt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:mt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Wt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new mt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return mt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Kt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new mt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return mt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};wt.OPERATORS=[[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Ht.OPERATORS=[[mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Jt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},qt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},zt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(mt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Qt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},jt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(mt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},$t={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(mt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Zt={init:function(){this.jsonInit({message0:mt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:Xt,tooltip:mt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:mt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},te={init:function(){this.setColour(Xt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_STAT),this.setOutput(!0)}},ee={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},ie={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},ne={init:function(){this.appendDummyInput().appendField(mt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+mt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(mt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new mt.FieldDropdown([[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Xt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},se={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_e={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},oe={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},pe={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_GET_UNIQUE_IDEN)}},ae={init:function(){this.setColour(Xt),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(mt.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},ue={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},re=230;mt.FieldTextInput.math_number_validator=function(t){return String(t)},mt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const le={init:function(){this.setColour(re),this.appendDummyInput().appendField(new mt.FieldTextInput("0",mt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MATH_NUMBER_TOOLTIP)}},de={init:function(){this.setColour(re);this.appendDummyInput("").appendField(mt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new mt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Ie={init:function(){this.setColour(re);this.appendDummyInput("").appendField(mt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new mt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Te={init:function(){this.setColour(re),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:mt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:mt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:mt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Me={init:function(){this.setColour(re),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:mt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:mt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:mt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},he={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new mt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},me={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new mt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:mt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:mt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:mt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:mt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:mt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:mt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:mt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Ee={init:function(){var t=[[mt.Msg.MATH_BIN,"bin"],[mt.Msg.MATH_OCT,"oct"],[mt.Msg.MATH_HEX,"hex"]];this.setColour(re),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new mt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:mt.Msg.MATH_DEC_TOOLTIP_BIN,oct:mt.Msg.MATH_DEC_TOOLTIP_OCT,hex:mt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Oe={init:function(){var t=[[mt.Msg.LANG_MATH_TO_ROUND,"round"],[mt.Msg.LANG_MATH_TO_CEIL,"ceil"],[mt.Msg.LANG_MATH_TO_FLOOR,"floor"],[mt.Msg.MATH_ABS,"fabs"],[mt.Msg.MATH_SQRT,"sqrt"]];this.setColour(re),this.appendValueInput("A").setCheck(Number).appendField(new mt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:mt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:mt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:mt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:mt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:mt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:mt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Re={init:function(){var t=[[mt.Msg.MIXLY_MAX,"max"],[mt.Msg.MIXLY_MIN,"min"]];this.setColour(re),this.appendValueInput("A").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(mt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:mt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:mt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},ce={init:function(){var t=[[mt.Msg.MATH_TWO,"two"],[mt.Msg.MATH_EIGHT,"eight"],[mt.Msg.MATH_TEN,"ten"],[mt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(re),this.appendDummyInput("").appendField(mt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new mt.FieldDropdown(t),"OP").appendField(mt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MATH_ZHW).appendField(new mt.FieldDropdown(t),"OP2").appendField(mt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:mt.Msg.MATH_Before_two,eight:mt.Msg.MATH_Before_eight,ten:mt.Msg.MATH_Before_ten,sixteen:mt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:mt.Msg.MATH_Behind_two,eight:mt.Msg.MATH_Behind_eight,ten:mt.Msg.MATH_Behind_ten,sixteen:mt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},ge={init:function(){var t=[[mt.Msg.LANG_MATH_INT,"int"],[mt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(re),this.setOutput(!0,Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new mt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:mt.Msg.LANG_MATH_INT,float:mt.Msg.LANG_MATH_FLOAT_RANDOM};return mt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Ce={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(mt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(mt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(mt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(mt.Msg.MATH_CONSTRAIN_TOOLTIP)}},Se={init:function(){this.setColour(re),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(mt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(mt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Ae={init:function(){this.setColour(re),this.appendDummyInput().appendField(new mt.FieldTextInput("0",mt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(mt.Msg.MATH_NUMBER_TOOLTIP)}},Le={init:function(){this.setColour(re),this.appendValueInput("NUM").setCheck(Number).appendField(mt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},Ne={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MATH_ROUND).appendField(mt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(mt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(mt.Msg.MATH_ROUND_NEW_TOOLTIP)}},De={init:function(){var t=[[mt.Msg.MIXLY_TO_INT,"int"],[mt.Msg.MIXLY_TO_FLOAT,"float"],[mt.Msg.MIXLY_TO_BITES,"b"],[mt.Msg.LANG_MATH_BYTE+mt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(re),this.appendValueInput("VAR").appendField(new mt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:mt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:mt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:mt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},fe={init:function(){var t=[[mt.Msg.MIXLY_TO_INT,"int"],[mt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(re),this.appendValueInput("VAR").appendField(new mt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:mt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:mt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},Fe=Se,Pe={init:function(){this.setColour(re),this.appendValueInput("VAR").appendField(mt.Msg.LANG_MATH_BYTE+mt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},ve={init:function(){this.setColour(re),this.itemCount_=1,this.setMutator(new mt.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(mt.Msg.MIXLY_PRODUCT+mt.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(mt.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(mt.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(mt.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const Ve={init:function(){this.setColour(ye),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new mt.FieldTextInput("",mt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(mt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new mt.FieldImage(e,7,12,'"')}},Be={init:function(){this.setColour(ye),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(mt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},Ge={init:function(){this.setColour(ye),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Ue={init:function(){this.setColour(ye),this.appendValueInput("VAR").setCheck(String).appendField(mt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},we={init:function(){this.setColour(ye),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},ke={init:function(){this.setColour(ye),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},He={init:function(){this.WHERE_OPTIONS=[[mt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[mt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[mt.Msg.TEXT_GET_INDEX_RANDOM+1+mt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ye),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(mt.Msg.LISTS_GET_INDEX_GET,"MODE"),mt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(mt.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+mt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",mt.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:mt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:mt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:mt.Msg.TEXT_GET_INDEX_RANDOM};return mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+mt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==mt.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),mt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(mt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new mt.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),mt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},We={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ye),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(mt.Msg.LISTS_GET_INDEX_GET+" "+mt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(mt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_MICROBIT_TYPE_STRING+mt.Msg.LISTS_GET_INDEX_FROM_START+"n"+mt.Msg.TEXT_CHARAT2)}},Ke={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ye),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(mt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(mt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Je={init:function(){this.WHERE_OPTIONS_1=[[mt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[mt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[mt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[mt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[mt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[mt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ye),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(mt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==mt.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==mt.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),mt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(mt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new mt.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},qe={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ye),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(mt.Msg.LISTS_GET_INDEX_GET+" "+mt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(mt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(mt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(mt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},ze={init:function(){var t=[[mt.Msg.MIXLY_EQUALS,"==="],[mt.Msg.MIXLY_STARTSWITH,"startswith"],[mt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(ye),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new mt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Qe={init:function(){this.setColour(ye),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(mt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_COMPARETO_HELP)}},je={init:function(){var t=[[mt.Msg.TEXT_UPPER,"upper"],[mt.Msg.TEXT_TITLE,"title"],[mt.Msg.TEXT_CAPITALIZE,"capitalize"],[mt.Msg.TEXT_SWAPCASE,"swapcase"],[mt.Msg.TEXT_LOWER,"lower"]];this.setColour(ye),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new mt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:mt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:mt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:mt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:mt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:mt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},$e={init:function(){var t=[[mt.Msg.TEXT_LJUST,"ljust"],[mt.Msg.TEXT_CENTER,"center"],[mt.Msg.TEXT_RJUST,"rjust"]];this.setColour(ye),this.appendValueInput("VAR").appendField(new mt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(mt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(mt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Ze={init:function(){this.setColour(ye),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(mt.Msg.MIXLY_MID+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(mt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ti={init:function(){this.setColour(ye),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},ei={init:function(){this.setColour(ye),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(mt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(mt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},ii={init:function(){this.setColour(ye),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(mt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(mt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},ni={init:function(){var t=[[mt.Msg.TEXT_TRIM_BOTH,"strip"],[mt.Msg.TEXT_TRIM_LEFT,"lstrip"],[mt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(ye),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(mt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new mt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(mt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:mt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:mt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:mt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},si={init:function(){this.setColour(ye),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new mt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new mt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},tn={init:function(){this.setColour($i),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},en={init:function(){this.setColour($i),this.appendDummyInput().appendField(mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},nn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_KEYS),this.setTooltip(mt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},sn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(mt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(mt.Msg.DICTS_GET_TOOLTIP)}},_n={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(mt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(mt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(mt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},on={init:function(){this.setColour($i),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(mt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},pn={init:function(){this.setColour($i),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(mt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_DELETE_TOOLTIP)}},an={init:function(){this.setColour($i),this.appendValueInput("DICT2").setCheck("Dict").appendField(mt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(mt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MID),this.setTooltip(mt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},un={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_CLEAR),this.setTooltip(mt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},rn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_ITEMS),this.setTooltip(mt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},ln={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_VALUES),this.setTooltip(mt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},dn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_LENGTH),this.setTooltip(mt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},In={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_DELDICT),this.setTooltip(mt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tn={init:function(){this.MODE=[[mt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[mt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(mt.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=mt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=mt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==mt.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new mt.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},Mn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(mt.Msg.DICTS_ADD_VALUE),this.setTooltip(mt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},hn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(mt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},mn={init:function(){this.setColour($i),this.appendDummyInput("").appendField(new mt.FieldLabel(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new mt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},En={init:function(){this.setColour($i),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},On={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TO_JSON),this.setTooltip(mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Rn={init:function(){this.setColour($i),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},cn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},gn={init:function(){this.setColour($i),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TO_JSON),this.setTooltip(mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Cn=210,Sn={init:function(){var t=mt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:mt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:mt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:mt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:mt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:mt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:mt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},An={init:function(){var t=mt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=mt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new mt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Ln={init:function(){var t=[[mt.Msg.LOGIC_OPERATION_AND,"AND"],[mt.Msg.LOGIC_OPERATION_OR,"OR"],[mt.Msg.LOGIC_OPERATION_NOR,"NOR"],[mt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new mt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:mt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:mt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:mt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:mt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},Nn={init:function(){this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(mt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(mt.Msg.LOGIC_NEGATE_TOOLTIP)}},Dn={init:function(){var t=[[mt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[mt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new mt.FieldDropdown(t),"BOOL"),this.setTooltip(mt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},fn={init:function(){this.setColour(Cn),this.setOutput(!0),this.appendDummyInput().appendField(mt.Msg.LOGIC_NULL),this.setTooltip(mt.Msg.LOGIC_NULL_TOOLTIP)}},Fn={init:function(){this.setColour(Cn),this.appendValueInput("A"),this.appendValueInput("B").appendField(mt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(mt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},Pn={init:function(){var t=[[mt.Msg.TEXT_APPEND_TO,"in"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Cn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new mt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(mt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.IN)}},vn={init:function(){var t=[[mt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Cn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},Yn={init:function(){this.setColour(Cn),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Xn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(mt.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},yn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_USE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=mt.Msg.MIXLY_BELONG;return i+{r:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},xn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_USE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=mt.Msg.MIXLY_BELONG,o=mt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},bn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(mt.Msg.MIXPY_TEXT_ENCODE).appendField(new mt.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_USE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=mt.Msg.MIXLY_BELONG,o=mt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},Vn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+mt.Msg.MIXLY_MICROBIT_TYPE_STRING+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Gn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(mt.Msg.MICROBIT_PYTHON_TYPE)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.HTML_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Wn={init:function(){this.setColour(0),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Kn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Jn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},Qn={init:function(){this.setColour(0),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},jn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+mt.Msg.MIXLY_ESP32_SET+{mkdir:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},$n={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(mt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},ts={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.HTML_FILE,"isfile"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},es={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(mt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},is={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(mt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},ns={init:function(){var t=mt.Procedures.findLegalName("",this),e=new mt.FieldTextInput(t,mt.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new mt.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&mt.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(mt.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(mt.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(mt.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(mt.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=mt.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),mt.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{mt.Events.enable()}},mutationToDom:function(t){var e=mt.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(mt.Msg.MIXLY_AIP_ATTR).setAlign(mt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},js={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(mt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},$s={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(mt.Msg.HTML_FORM_CONTENT).appendField(new mt.FieldDropdown([[mt.Msg.HTML_TEXT,"text"],[mt.Msg.HTML_EMAIL,"email"],[mt.Msg.HTML_NUMBER,"number"],[mt.Msg.HTML_PASSWORD,"password"],[mt.Msg.HTML_CHECKBOX,"checkbox"],[mt.Msg.HTML_RADIOBUTTON,"radiobutton"],[mt.Msg.HTML_BUTTON,"button"],[mt.Msg.HTML_COLOUR,"colour"],[mt.Msg.HTML_DATE,"date"],[mt.Msg.HTML_LOCALTIME,"local time"],[mt.Msg.HTML_FILE,"file"],[mt.Msg.HTML_HIDDEN,"hidden"],[mt.Msg.HTML_IMAGE,"image"],[mt.Msg.HTML_MONTH,"month"],[mt.Msg.HTML_RANGE,"range"],[mt.Msg.HTML_RESET,"reset"],[mt.Msg.HTML_SEARCH,"search"],[mt.Msg.HTML_SUBMIT,"submit"],[mt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[mt.Msg.HTML_TIME,"time"],[mt.Msg.HTML_URL,"url"],[mt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(mt.Msg.HTML_NAME).appendField(new mt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(mt.Msg.HTML_VALUE).appendField(new mt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(mt.Msg.MIXLY_AIP_ATTR).setAlign(mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zs={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},t_={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},e_={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(mt.Msg.HTML_TEXT).appendField(new mt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},i_=160,n_={init:function(){this.setColour(i_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new mt.FieldTable(""),"TEXT")}},s_={init:function(){this.setColour(i_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT")}},__={init:function(){this.setColour(i_),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},o_={init:function(){this.setColour(i_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},p_={init:function(){this.setColour(i_),this.appendDummyInput().appendTitle("Comment:").appendTitle(new mt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},a_={init:function(){this.setColour(i_),this.appendValueInput("VALUE").appendField(mt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},u_={init:function(){this.setColour(i_),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new mt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(mt.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=mt.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+t+", "+e+", "+i+")"},mt.isNumber(n)&&mt.isNumber(s)&&mt.isNumber(_))n=parseFloat(n),s=parseFloat(s),_=Math.abs(parseFloat(_)),0==n%1&&0==s%1&&0==_%1?(n<=s?(s++,t=0==n&&1==_?s:n+", "+s,1!=_&&(t+=", "+_)):t=n+", "+--s+", -"+_,t="range("+t+")"):(t=n",GTE:">="};const sa=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",_=e.valueToCode(this,"B",n)||"False";if("AND"==i)var o=s+" and "+_;else if("OR"==i)o=s+" or "+_;else if("NOR"==i)o="not("+s+"^"+_+")";else o=s+"^"+_;return[o,n]},_a=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},oa=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},pa=function(t,e){return["None",e.ORDER_ATOMIC]},aa=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},ua=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},ra=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},la=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},da=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Ia=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Ta=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Ma=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ha=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},ma=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Ea=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Oa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ra=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},ca=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},ga=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Ca=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Sa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Aa=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},La=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Na=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},Da=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},fa=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Fa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Pa=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},va=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},Ya=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Xa=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},ya=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),mt.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var _=[],o=0;o\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},hu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},mu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},Eu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Ou=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Ru=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},cu=function(t,e){return'"},gu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Cu=function(){return this.getFieldValue("TEXT")+"\n"},Su=function(t){return t.getFieldValue("TEXT")+"\n"},Au=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Lu=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Nu=function(){return""},Du=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},fu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n")},Yu.scrubNakedValue=function(t){return t+"\n"},Yu.quote_=function(t){var e="'";return-1!==t.indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},Yu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Yu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=mt.utils.string.wrap(_,Yu.COMMENT_WRAP-3),n+=Yu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const Xu="#74A55B",yu={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_RGB_PIN_COUNT)}},xu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},bu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Vu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Bu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(mt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(mt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Gu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Uu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_RESET)}},wu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ku={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Hu={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Wu={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Ku={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Ju={init:function(){this.setColour(Xu),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},qu={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_MOVE)}},zu={init:function(){this.setColour(Xu),this.appendValueInput("VAR").appendField("360°"+mt.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SETTING+mt.Msg.blockpy_turtle_rotate+mt.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},Qu={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("180°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_MOVE)}},ju={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("360°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},$u={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("180°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Zu={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("360°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},tr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new mt.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(mt.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},er={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[mt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[mt.Msg.MOTOR_N,"ms32006.MOT_N"],[mt.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},ir={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new mt.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[mt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},nr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_RGB_PIN_COUNT)}},sr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},_r={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},or={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_WRI)}},pr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ar={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.PYTHON_RANGE_STEP).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ur={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new mt.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new mt.FieldDropdown([["SYN6288"+mt.Msg.MIXLY_AipSpeech_synthesis,"SYN6288"],["NS9300"+mt.Msg.MIXLY_MUSIC_PLAYER,"NS9300"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},rr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_WHETHER).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_STOPPED,"0"],[mt.Msg.MIXLY_PLAYING,"1"],[mt.Msg.MIXLY_PAUSED,"2"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},lr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_STAT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MP3_PLAY,"1"],[mt.Msg.MIXLY_MP3_PAUSE,"2"],[mt.Msg.MIXLY_STOP,"3"],[mt.Msg.MIXLY_MP3_PREV,"4"],[mt.Msg.MIXLY_MP3_NEXT,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendValueInput("volume").appendField(mt.Msg.MIXLY_MP3_VOL+mt.Msg.MIXLY_STAT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_PLAYER_SET_VOLUME_TOOLTIP)}},Ir={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MODE+mt.Msg.MIXLY_STAT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MP3_LOOP_ALL,"0"],[mt.Msg.MIXLY_MP3_LOOP_ONE,"1"],[mt.Msg.MIXLY_PLAYER_DIRECTORY_LOOP,"2"],[mt.Msg.MIXLY_MP3_LOOP_RAM,"3"],[mt.Msg.MIXLY_PLAYER_SINGLE_STOP,"4"],[mt.Msg.MIXLY_PLAYER_SEQUENTIAL_PLAY,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_START_MELODY,"play"],[mt.Msg.MIXLY_PLAYER_INSERT_MUSIC,"insert"]]),"key"),this.appendValueInput("song"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_PLAYER_PLAY_MUSIC_TOOTIP)}},Mr={},hr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(mt.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},mr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Er={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(mt.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(mt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},Or={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(mt.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(mt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},Rr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},cr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},gr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Cr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_TRAFFIC_LIGHT).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LISTS_SET_INDEX_SET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Sr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_WHITE,"W"],[mt.Msg.COLOUR_RGB_RED,"R"],[mt.Msg.COLOUR_RGB_YELLOW,"Y"],[mt.Msg.COLOUR_RGB_GREEN,"G"],[mt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ar={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_WHITE,"W"],[mt.Msg.COLOUR_RGB_RED,"R"],[mt.Msg.COLOUR_RGB_YELLOW,"Y"],[mt.Msg.COLOUR_RGB_GREEN,"G"],[mt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Lr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[mt.Msg.MIXLY_SPEED,"[1]"],[mt.Msg.MATH_SINGLE_OP_ABSOLUTE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[mt.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[mt.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[mt.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Nr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[mt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[mt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MATH_SINGLE_OP_ABSOLUTE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MODE).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPEED+mt.Msg.MIXLY_MODE,"0"],[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+mt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"0"],[mt.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[mt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},Fr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Pr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField("("+mt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MODE).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPEED+mt.Msg.MIXLY_MODE,"0"],[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+mt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},vr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField("("+mt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MODE).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPEED+mt.Msg.MIXLY_MODE,"0"],[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+mt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"0"],[mt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Yr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MOTOR,"ext_motor"],[mt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[mt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[mt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[mt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[mt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[mt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[mt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},Xr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MOTOR,"ext_motor"],[mt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[mt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[mt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[mt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[mt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[mt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[mt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},yr={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_AT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},xr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("pin").appendField("LED"),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},br={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SERVO+mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_AT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Vr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_SERVO),this.appendValueInput("angle").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE),this.appendDummyInput().appendField(mt.Msg.DRAW_POINTER_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Br={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_MOTOR+mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_AT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Gr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MOTOR),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+mt.Msg.MIXLY_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ur="#6C9858",wr={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},kr={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_ON,"1"],[mt.Msg.MIXLY_ESP32_OFF,"0"],[mt.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Hr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Wr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(mt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Kr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Jr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SETTING+mt.Msg.MIXLY_BUILDIN_LED+mt.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},qr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(mt.Msg.MIXLY_LCD_SETCOLOR).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LIGHT_RED,"1"],[mt.Msg.MIXLY_LIGHT_GREEN,"2"],[mt.Msg.MIXLY_LIGHT_BLUE,"3"],[mt.Msg.MIXLY_LIGHT_YELLOW,"4"],[mt.Msg.MIXLY_LIGHT_CYAN,"5"],[mt.Msg.MIXLY_LIGHT_PURPLE,"6"],[mt.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},zr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Qr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(mt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},jr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},$r={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SETTING+mt.Msg.MIXLY_BUILDIN_LED+mt.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},Zr={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},tl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Et.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},el={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},il={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},nl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.PYTHON_RANGE_STEP).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},sl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_WRI)}},_l={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Et.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},ol={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},pl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.PYTHON_RANGE_STEP).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},al={init:function(){this.setColour(Ur),this.appendValueInput("TICKS").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(mt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(mt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},ul={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},rl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_RESET)}},ll={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},dl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Il={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tl={init:function(){this.setColour(Ur),this.appendValueInput("LIST").appendField(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Ml={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MOTOR_DC).appendField(new mt.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"CW"],[mt.Msg.ANTI_CLOCKWISE,"CCW"],[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},hl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField("MixGo Car").appendField(new mt.FieldDropdown([[mt.Msg.blockpy_forward,"F"],[mt.Msg.blockpy_backward,"B"],[mt.Msg.blockpy_left,"L"],[mt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ml={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField("MixGo Car").appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},El={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MOTOR_DC).appendField(new mt.FieldDropdown([[mt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[mt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"CW"],[mt.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ol={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MOTOR_DC).appendField(new mt.FieldDropdown([[mt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[mt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_STOP).appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Rl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},cl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(new mt.FieldDropdown([[mt.Msg.blockpy_forward,"F"],[mt.Msg.blockpy_backward,"B"],[mt.Msg.blockpy_left,"L"],[mt.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[mt.Msg.MIXLY_SPEED,"SPEED"],[mt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},gl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Cl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(mt.Msg.MIXLY_MOTOR).appendField(new mt.FieldDropdown([[mt.Msg.TEXT_TRIM_LEFT,"1"],[mt.Msg.TEXT_TRIM_RIGHT,"2"],[mt.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[mt.Msg.MIXLY_SPEED,"SPEED"],[mt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Sl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[mt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Al={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.BITBOT).appendField(new mt.FieldDropdown([[mt.Msg.blockpy_forward,"F"],[mt.Msg.blockpy_backward,"B"],[mt.Msg.blockpy_left,"L"],[mt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ll={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.BITBOT).appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Nl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.BITBOT).appendField(mt.Msg.MIXLY_MOTOR).appendField(new mt.FieldDropdown([[mt.Msg.TEXT_TRIM_LEFT,"0"],[mt.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"CW"],[mt.Msg.ANTI_CLOCKWISE,"CCW"],[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dl={init:function(){this.setColour(Ur),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},fl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Fl={init:function(){this.setColour(Ur),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_SETTING+mt.Msg.MIXLY_MIXBOT_BUZZER+mt.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Pl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_MIXBOT_BUZZER+mt.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},vl={init:function(){this.setColour(Ur),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_RECORD_AUDIO).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(mt.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Yl={init:function(){this.setColour(Ur),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_PLAY_AUDIO).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Xl={init:function(){this.setColour(Ur),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},yl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},xl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.ME_GO_MOTOR_EXTERN).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([["1","1"],["2","2"],["3","3"],["4","4"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.blynk_IOT_IR_POWER+mt.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Vl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.ME_GO_MOTOR_EXTERN).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.blynk_IOT_IR_POWER+mt.Msg.MIXLY_PINMODEOUT+mt.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Bl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.ME_GO_MOTOR_EXTERN).appendField(mt.Msg.MIXLY_ALL+mt.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(mt.ALIGN_RIGHT).appendField(mt.Msg.blynk_IOT_IR_POWER+mt.Msg.MIXLY_PINMODEOUT+mt.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Gl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.ANALOG+mt.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(mt.Msg.MIXLY_RELEASE).appendField(new mt.FieldDropdown([[mt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[mt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.ANALOG+mt.Msg.MIXLY_KEYBOARD_INPUT)}},Ul={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SPECIAL_KEY).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[mt.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[mt.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[mt.Msg.MIXLY_SPECIAL_KEY4,"0x04"],[mt.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[mt.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[mt.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[mt.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[mt.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},wl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GENERAL_KEY).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],["A","0x04"],["B","0x05"],["C","0x06"],["D","0x07"],["E","0x08"],["F","0x09"],["G","0x0A"],["H","0x0B"],["I","0x0C"],["J","0x0D"],["K","0x0E"],["L","0x0F"],["M","0x10"],["N","0x11"],["O","0x12"],["P","0x13"],["Q","0x14"],["R","0x15"],["S","0x16"],["T","0x17"],["U","0x18"],["V","0x19"],["W","0x1A"],["X","0x1B"],["Y","0x1C"],["Z","0x1D"],["1 !","0x1E"],["2 @","0x1F"],["3 #","0x20"],["4 $","0x21"],["5 %","0x22"],["6 ^","0x23"],["7 &","0x24"],["8 *","0x25"],["9 (","0x26"],["0 )","0x27"],["ENTER","0x28"],["ESC","0x29"],["BACKSPACE","0x2A"],["TAB","0x2B"],["SPACE","0x2C"],["- _","0x2D"],["= +","0x2E"],["[ {","0x2F"],["] }","0x30"],["\\ |","0x31"],["; :","0x33"],["' \"","0x34"],["` ~","0x35"],[", <","0x36"],[". >","0x37"],["/ ?","0x38"],["CAPS_LOCK","0x39"],["F1","0x3A"],["F2","0x3B"],["F3","0x3C"],["F4","0x3D"],["F5","0x3E"],["F6","0x3F"],["F7","0x40"],["F8","0x41"],["F9","0x42"],["F10","0x43"],["F11","0x44"],["F12","0x45"],["PRINTSCREEN","0x46"],["SCROLL_LOCK","0x47"],["PAUSE","0x48"],["INSERT","0x49"],["HOME","0x4A"],["PAGE_UP","0x4B"],["DELETE","0x4C"],["END","0x4D"],["PAGE_DOWN","0x4E"],["RIGHT","0x4F"],["LEFT","0x50"],["DOWN","0x51"],["UP","0x52"],["NUM_LOCK","0x53"],["/","0x54"],["*","0x55"],["-","0x56"],["+","0x57"],["ENTER","0x58"],["1","0x59"],["2","0x5A"],["3","0x5B"],["4","0x5C"],["5","0x5D"],["6","0x5E"],["7","0x5F"],["8","0x60"],["9","0x61"],["0","0x62"],[".","0x63"]]),"op"),this.setOutput(!0)}},kl={init:function(){this.setColour(Ur),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new mt.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(mt.Msg.GENERALKEY_TUPLE_CREATE_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("generalkey_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;nnew Array(32).fill(0)))},im={init:function(){this.jsonInit({colour:Kh,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:mt.Msg.MIXLY_MICROBIT_Built_in_image1,message0:mt.Msg.MIXLY_MICROBIT_Built_in_image})}},nm={init:function(){this.setColour(Kh),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg),"image"),this.setOutput(!0,["esp32_image","List"])}},sm={init:function(){this.setColour(Kh),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(mt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new mt.FieldDropdown(sm.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":mt.Msg.MIXLY_MICROBIT_image_add,"-":mt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[mt.Msg.MICROBIT_DISPLAY_UNION,"add"],[mt.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},_m={init:function(){this.setColour(Kh),this.appendValueInput("A").setCheck("esp32_image").appendField(mt.Msg.MIXLY_MICROBIT_Invert_image1),this.setInputsInline(!0),this.setOutput(!0,"esp32_image")}},om={init:function(){this.setColour(Kh),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_LET2).appendField(new mt.FieldDropdown(om.OPERATORS),"OP"),this.appendValueInput("val").appendField(mt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_UNIT);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=mt.Msg.DISPLAY_IMAGE_LET,n=mt.Msg.DISPLAY_IMAGE_LET2,s=mt.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:mt.Msg.MIXLY_UP,shift_down:mt.Msg.MIXLY_DOWN,shift_left:mt.Msg.MIXLY_LEFT,shift_right:mt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[mt.Msg.MIXLY_UP,"shift_up"],[mt.Msg.MIXLY_DOWN,"shift_down"],[mt.Msg.MIXLY_LEFT,"shift_left"],[mt.Msg.MIXLY_RIGHT,"shift_right"]]},pm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},am={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},um={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},rm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},lm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Clear_display);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Clear_display)}},dm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_SHOW+mt.Msg.MIXLY_DISPLAY_MATRIX_WRITE_NOW),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Im={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<8;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Tm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(Tm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},Mm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},hm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(hm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},mm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<16;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,"esp32_image"),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Em={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(Em.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},Om={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.OLED_SET_FONT).appendField(new mt.FieldDropdown(Om.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+mt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+mt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+mt.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Rm={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING)}},cm={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING)}},gm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(mt.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING)}},Cm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(mt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(mt.Msg.TEXT_CENTER).appendField(new mt.FieldDropdown([[mt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[mt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},Sm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(mt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},Am={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Lm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Nm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"state",options:[[mt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[mt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"shape",options:[[mt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[mt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:mt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Dm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"state",options:[[mt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[mt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"dir_h_v",options:[[mt.Msg.mpython_vertical,"0"],[mt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:mt.Msg.MPYTHON_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},fm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"state",options:[[mt.Msg.mpython_display_hline_1,"1"],[mt.Msg.mpython_display_hline_0,"0"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.mpython_display_line_TOOLTIP,message0:mt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},Fm={init:function(){this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new mt.FieldDropdown(Fm.IMAGES),"path"),this.setColour(Kh),this.setOutput(!0)},IMAGES:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]]},Pm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<5;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},vm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(vm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},Ym={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Xm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_AMBIENTBRIGHT),this.setInputsInline(!0),this.setOutput(!0,Number)}},ym={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},xm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new mt.FieldDropdown(xm.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[mt.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[mt.Msg.CLOCKWISE+"90"+mt.Msg.blockpy_setheading_degree,"1"],[mt.Msg.CLOCKWISE+"180"+mt.Msg.blockpy_setheading_degree,"2"],[mt.Msg.CLOCKWISE+"270"+mt.Msg.blockpy_setheading_degree,"3"]]},bm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<12;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Vm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(Vm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},Bm={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Gm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.OLED_BITMAP).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("direct").setCheck(String).appendField(mt.Msg.MIXLY_AipImageClassify_Image+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Um={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(mt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(mt.Msg.TEXT_CENTER).appendField(new mt.FieldDropdown([[mt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[mt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},wm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},km={init:function(){this.jsonInit({colour:Kh,args0:[{name:"shape",options:[[mt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[mt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:mt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Hm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"dir_h_v",options:[[mt.Msg.mpython_vertical,"0"],[mt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:mt.Msg.ONBOARD_TFT_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},Wm={init:function(){this.jsonInit({colour:Kh,args0:[{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.mpython_display_line_TOOLTIP,message0:mt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},Km={init:function(){this.setColour(Kh),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(mt.Msg.HTML_COLOUR),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},Jm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_LCD_SETCOLOR).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},qm={init:function(){this.setColour(Kh),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_SCREEN_FILL);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},zm={init:function(){this.setColour(Kh),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_INIT_CLOCK),this.appendDummyInput().appendField(mt.Msg.MIXLY_CENTER_POS),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.OLED_CIRCLE_RADIUS),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Qm={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.GET_RTCTIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},jm={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.SET_TIME),this.appendValueInput("h").setCheck(Number).appendField(mt.Msg.MIXLY_HOUR),this.appendValueInput("m").setCheck(Number).appendField(mt.Msg.MIXLY_MINUTE),this.appendValueInput("s").setCheck(Number).appendField(mt.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},$m={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.DRAW_CLOCK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Zm={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.CLEAR_CLOCK),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_STM32_TFT_BACKGROUND_COLOR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},tE={init:function(){this.jsonInit({colour:Kh,args0:[{name:"shape",options:[[mt.Msg.MPYTHON_DISPLAY_HOLLOW,"False"],[mt.Msg.MPYTHON_DISPLAY_SOLID,"True"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"r",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,message0:mt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_CIRCLE_MESSAGE0,nextStatement:null,previousStatement:null})}},eE={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.DRAW_POINTER).appendField(mt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(mt.Msg.MIXLY_DRAW_POINTER_DU),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.DRAW_POINTER_TOOLTIP)}},iE={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.DRAW_POINTER).appendField(mt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(mt.Msg.MIXLY_DRAW_POINTER_DU),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.DRAW_POINTER_TOOLTIP)}},nE={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.MIXLY_Display_long_text),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},sE={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},_E={init:function(){zh.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},oE={init:function(){$h.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},pE={init:function(){om.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},aE={init:function(){um.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},uE={init:function(){rm.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},rE={init:function(){lm.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},lE=180,dE={init:function(){this.setColour(lE),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(mt.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_LET2).appendField(new mt.FieldDropdown(dE.OPERATORS),"OP"),this.appendValueInput("val").appendField(mt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=mt.Msg.DISPLAY_IMAGE_LET,n=mt.Msg.DISPLAY_IMAGE_LET2,s=mt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:mt.Msg.MIXLY_UP,down:mt.Msg.MIXLY_DOWN,left:mt.Msg.MIXLY_LEFT,right:mt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[mt.Msg.MIXLY_UP,"up"],[mt.Msg.MIXLY_DOWN,"down"],[mt.Msg.MIXLY_LEFT,"left"],[mt.Msg.MIXLY_RIGHT,"right"]]},IE={init:function(){this.setColour(lE),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(mt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new mt.FieldDropdown(IE.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":mt.Msg.MIXLY_MICROBIT_image_add,"-":mt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[mt.Msg.MICROBIT_DISPLAY_UNION,"+"],[mt.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},TE={init:function(){this.setColour(lE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+mt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new mt.FieldDropdown(TE.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+mt.Msg.MIXLY_MICROBIT_IMAGE+{height:mt.Msg.MIXLY_HEIGHT,width:mt.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[mt.Msg.MIXLY_HEIGHT,"height"],[mt.Msg.MIXLY_WIDTH,"width"]]},ME={init:function(){this.setColour(lE),this.appendValueInput("VAR").appendField(mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RECT).appendField(new mt.FieldDropdown(ME.STATUS),"OP"),this.jsonInit({message0:mt.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_OLED_RECT)},STATUS:[[mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},hE={init:function(){this.setColour(lE),this.appendValueInput("VAR").appendField(mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new mt.FieldDropdown(hE.STATUS),"OP"),this.jsonInit({message0:mt.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},mE={init:function(){this.setColour(lE),this.appendValueInput("VAR").appendField(mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_DISPLAY_DRAW+mt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new mt.FieldDropdown(mE.STATUS),"OP"),this.jsonInit({message0:mt.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_DISPLAY_DRAW+mt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},EE="#777777",OE={init:function(){this.setColour(EE),this.appendDummyInput("").appendField("from ").appendField(new mt.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new mt.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},RE={init:function(){this.setColour(EE),this.appendDummyInput("").appendField("import ").appendField(new mt.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cE={init:function(){this.setColour(EE),this.appendDummyInput("").appendField(new mt.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new mt.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},aO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},uO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},rO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},lO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(mt.Msg.MIXLY_WIFI_USERNAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(mt.Msg.MIXLY_IOT_PASSWORD).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_PROJECT).setAlign(mt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(mt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},IO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_SUBSCRIBE+mt.Msg.MIXLY_MICROBIT_MSG).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(mt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},TO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},MO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},EO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},OO={init:function(){this.setColour(eO),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},RO={init:function(){this.setColour(eO),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},cO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},gO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO").appendField(mt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(mt.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},CO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+mt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},SO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},AO={init:function(){this.VISITOR_ID=Et.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(eO),this.appendDummyInput("").appendField(new mt.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},LO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO").appendField(mt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},NO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("HTTP"+mt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(mt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(mt.Msg.MIXLY_REQUESTS_GET).appendField(mt.Msg.MIXLY_GET_CURRENT_TIME).appendField(mt.Msg.MIXLY_OPEN_DEBUG).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},DO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("HTTP"+mt.Msg.MIXLY_Client).appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[mt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[mt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},fO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MQTT"+mt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(mt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(mt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(mt.Msg.MQTT_Topic).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(mt.Msg.MIXLY_OPEN_DEBUG).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},FO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MQTT"+mt.Msg.MIXLY_Client).appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[mt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[mt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},PO=iO,vO=nO,YO=sO,XO=_O,yO=pO,xO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(mt.Msg.MODEL_NAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(mt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bO=xO,VO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(mt.Msg.MIXLY_API_PRIVATE_KEY).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(mt.Msg.MODEL_NAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(mt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},BO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(mt.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},GO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(mt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},UO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("Ollama "+mt.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wO=225,kO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(mt.Msg.MIXLY_NETWORK_MODE).appendField(new mt.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},HO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[mt.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=mt.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:mt.Msg.MIXLY_NETWORK_WIFI_OPEN,False:mt.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},WO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},KO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return mt.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:mt.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},JO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(mt.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(mt.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},qO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_CONNECT+mt.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},zO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[mt.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[mt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:mt.Msg.MIXLY_ESP32_NETWORK_IP,1:mt.Msg.MIXLY_ESP32_NETWORK_MASK,2:mt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},QO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},jO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[mt.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},$O={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(mt.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(mt.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},ZO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},tR={init:function(){this.setColour(wO),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new mt.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},eR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},iR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},nR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},sR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},_R={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},oR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},pR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},aR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},uR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},rR={init:function(){this.setColour(wO),this.appendValueInput("DOMAIN").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(mt.Msg.blockpy_REQUESTS_GET).appendField(new mt.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},lR={init:function(){this.appendValueInput("VAL"),this.setColour(wO),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(lR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:mt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:mt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:mt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[mt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},dR={init:function(){this.appendValueInput("VAR").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(wO),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown(dR.METHOD),"DIR"),this.appendDummyInput("").appendField(mt.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:mt.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:mt.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},IR={init:function(){this.setColour(wO),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(mt.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},TR={init:function(){this.setColour(wO),this.appendDummyInput("").appendField(new mt.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},MR="#3288dd",hR={init:function(){this.setColour(MR),this.appendValueInput("URL").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(mt.Msg.blockpy_REQUESTS).appendField(mt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},mR={init:function(){this.setColour(MR),this.appendValueInput("URL").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(mt.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(mt.Msg.blockpy_REQUESTS+mt.Msg.OLED_STRING),this.appendDummyInput("").appendField(mt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},ER={init:function(){this.appendValueInput("VAL"),this.setColour(MR),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(ER.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[mt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[mt.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},OR={init:function(){this.setColour(MR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(mt.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(mt.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(mt.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},RR={init:function(){this.setColour(MR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(mt.Msg.MIXLY_EMQX_PORT).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(mt.Msg.MIXLY_WIFI_USERNAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(mt.Msg.MIXLY_IOT_PASSWORD).setAlign(mt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cR={init:function(){this.setColour(MR),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_SUBSCRIBE+mt.Msg.MIXLY_MICROBIT_MSG).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(mt.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},gR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_SUBSCRIBE+mt.Msg.MIXLY_MICROBIT_MSG).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(mt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},CR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(mt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},SR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("mqtt"+mt.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},AR=100,LR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("I2CSUB").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(e),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},NR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0,Number),this.setInputsInline(!0)}},DR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField(mt.Msg.MOTOR_DC).appendField(mt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"CW"],[mt.Msg.ANTI_CLOCKWISE,"CCW"],[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField(mt.Msg.MOTOR_DC).appendField(mt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(mt.Msg.MIXLY_STEPPER_GET_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},FR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_MOVE)}},PR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},vR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+mt.Msg.MIXLY_SERVO),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},YR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},XR="#A58C5B",yR={init:function(){this.setColour(XR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(mt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SENOR_IS_PRESSED)}},xR={init:function(){this.setColour(XR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(mt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SENOR_WAS_PRESSED)}},bR={init:function(){this.setColour(XR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_BUTTON+mt.Msg.MIXLY_GET_PRESSES)}},VR={init:function(){this.setColour(XR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[mt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[mt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},BR={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_shake,"shake"],[mt.Msg.MIXLY_UP,"up"],[mt.Msg.MIXLY_DOWN,"down"],[mt.Msg.MIXLY_LEFT,"left"],[mt.Msg.MIXLY_RIGHT,"right"],[mt.Msg.MIXLY_MICROBIT_face_up,"face up"],[mt.Msg.MIXLY_MICROBIT_face_down,"face down"],[mt.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=mt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=mt.Msg.MSG.catSensor,s=mt.Msg.MIXLY_MICROBIT_JS_STATE,_=mt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:mt.Msg.MIXLY_MICROBIT_shake,up:mt.Msg.MIXLY_UP,down:mt.Msg.MIXLY_DOWN,left:mt.Msg.MIXLY_LEFT,right:mt.Msg.MIXLY_RIGHT,"face up":mt.Msg.MIXLY_MICROBIT_face_up,"face down":mt.Msg.MIXLY_MICROBIT_face_down,freefall:mt.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+_}))}},GR={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},UR={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},wR={init:function(){this.setColour(XR),this.appendValueInput("PIN",Number).appendField(new mt.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new mt.FieldDropdown(wR.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]},kR={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},HR={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},WR={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new mt.FieldDropdown([[mt.Msg.TEXT_TRIM_LEFT,"left"],[mt.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(mt.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=mt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=mt.Msg.MIXLY_ESP32_NEAR;return i+{left:mt.Msg.TEXT_TRIM_LEFT,right:mt.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},KR={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_ALTITUDE_SENSOR+" BMP280").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[mt.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":mt.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":mt.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},JR={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+" SHT20").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[mt.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},qR={init:function(){this.setColour(XR),this.appendValueInput("PIN",Number).appendField("DS18X20 "+mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},zR={init:function(){this.setColour(XR),this.appendDummyInput("").appendField("LM35"+mt.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_LM35)}},QR={init:function(){this.setColour(XR),this.appendValueInput("I2CSUB").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_EXTERN_LIGHT+"(LTR308ALS)","LTR308"],[mt.Msg.MIXLY_COLOR_SENSOR+"(LTR381RGB)","LTR381RGB"],[mt.Msg.MIXLY_COLOR_SENSOR+"(UCS12071)","UCS12071"],[mt.Msg.MIXLY_EXTERN_LIGHTUV+"(LTR390UV)","LTR390UV"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(HP203X)","HP203X"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(SPL06_001)","SPL06_001"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(MS5611)","MS5611"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(BMP280)","BMP280"],[mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHTC3)","SHTC3"],[mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(AHT21)","AHT21"],[mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHT20)","SHT20"],[mt.Msg.MIXLY_LASER_RANGE_SENSOR+"(VL53L0X)","VL53L0X"],[mt.Msg.MIXLY_GEOMAGNETIC_SENSOR+"(QMC5883L)","QMC5883L"],[mt.Msg.MIXLY_ESP32_MAX30102+"(MAX30102)","MAX30102"],[mt.Msg.HTML_COLOUR+"、"+mt.Msg.MIXLY_ENVIRONMENT_LIGHT+"、"+mt.Msg.MIXLY_NEXT+"、"+mt.Msg.MIXLY_ESP32_APDS9960+"(APDS9960)","APDS9960"],[mt.Msg.MIXLY_NINE_AXIS_SENSOR+"(MPU9250)","MPU9250"],[mt.Msg.MixGo_MPU9250+"(ADXL345)","ADXL345"],["RFID","RFID"],[mt.Msg.MIXLY_RADAR_SENSOR+"(CBR817)","CBR817"],[mt.Msg.MIXLY_AipSpeech_asr+"(CI130X)","CI130X"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},jR={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(mt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+mt.Msg.MIXLY_DELAY_TIME_RANGE)}},$R={init:function(){this.setColour(XR),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RADAR).appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(mt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+mt.Msg.MIXLY_DELAY_TIME_RANGE)}},ZR={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},tc={init:function(){this.setColour(XR),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RADAR).appendField(mt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},ec={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_IDENTIFY_ONCE_AND_SAVE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ic={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_HELLO_XIAOZHI,"1"],[mt.Msg.MIXLY_XIAOZHIXIAOZHI,"2"],[mt.Msg.MIXLY_THE_FIRST,"3"],[mt.Msg.MIXLY_THE_SECOND,"4"],[mt.Msg.MIXLY_THE_THIRD,"5"],[mt.Msg.MIXLY_THE_FOURTH,"6"],[mt.Msg.MIXLY_THE_FIFTH,"7"],[mt.Msg.MIXLY_THE_SIXTH,"8"],[mt.Msg.MIXLY_THE_SEVENTH,"9"],[mt.Msg.MIXLY_THE_EIGHTH,"10"],[mt.Msg.MIXLY_THE_NINTH,"11"],[mt.Msg.MIXLY_THE_TENTH,"12"],[mt.Msg.MIXLY_THE_ELEVENTH,"13"],[mt.Msg.MIXLY_THE_TWELFTH,"14"],[mt.Msg.MIXLY_THE_13TH,"15"],[mt.Msg.MIXLY_THE_14TH,"16"],[mt.Msg.MIXLY_THE_15TH,"17"],[mt.Msg.MIXLY_THE_16TH,"18"],[mt.Msg.MIXLY_THE_17TH,"19"],[mt.Msg.MIXLY_THE_18TH,"20"],[mt.Msg.MIXLY_THE_19TH,"21"],[mt.Msg.MIXLY_THE_20TH,"22"],[mt.Msg.MIXLY_Turn_on_the_lights,"23"],[mt.Msg.MIXLY_Turn_off_the_lights,"24"],[mt.Msg.MIXLY_Turn_up_the_brightness,"25"],[mt.Msg.MIXLY_Turn_down_the_brightness,"26"],[mt.Msg.MIXLY_Set_it_to_red,"27"],[mt.Msg.MIXLY_Set_it_to_orange,"28"],[mt.Msg.MIXLY_Set_it_to_yellow,"29"],[mt.Msg.MIXLY_Set_it_to_green,"30"],[mt.Msg.MIXLY_Set_it_to_cyan,"31"],[mt.Msg.MIXLY_Set_it_to_blue,"32"],[mt.Msg.MIXLY_Set_it_to_purple,"33"],[mt.Msg.MIXLY_Set_it_to_white,"34"],[mt.Msg.MIXLY_Turn_on_the_fan,"35"],[mt.Msg.MIXLY_Turn_off_the_fan,"36"],[mt.Msg.MIXLY_First_gear,"37"],[mt.Msg.MIXLY_Wind_speed_second,"38"],[mt.Msg.MIXLY_Third_gear,"39"],[mt.Msg.MIXLY_Previous,"40"],[mt.Msg.MIXLY_Next_page,"41"],[mt.Msg.MIXLY_Show_smiley_face,"42"],[mt.Msg.MIXLY_Show_crying_face,"43"],[mt.Msg.MIXLY_Show_love,"44"],[mt.Msg.MIXLY_Close_display,"45"],[mt.Msg.MIXLY_Start_execution,"46"],[mt.Msg.MIXLY_FORWARD,"47"],[mt.Msg.MIXLY_BACKWARD,"48"],[mt.Msg.MIXLY_TURNLEFT,"49"],[mt.Msg.MIXLY_TURNRIGHT,"50"],[mt.Msg.MIXLY_STOP,"51"],[mt.Msg.MIXLY_Accelerate,"52"],[mt.Msg.MIXLY_retard,"53"],[mt.Msg.ROTATION_FORWARD,"54"],[mt.Msg.ROTATION_BACKWARD,"55"],[mt.Msg.MIXLY_Query_temperature,"56"],[mt.Msg.MIXLY_Query_humidity,"57"],[mt.Msg.MIXLY_Query_brightness,"58"],[mt.Msg.MIXLY_Query_sound,"59"],[mt.Msg.MIXLY_Query_time,"60"],[mt.Msg.MIXLY_Query_distance,"61"],[mt.Msg.MIXLY_Query_pressure,"62"],[mt.Msg.MIXLY_Query_key,"63"],[mt.Msg.MIXLY_Query_touch,"64"],[mt.Msg.MIXLY_Query_color,"65"]]),"cmd").appendField(mt.Msg.MIXLY_WHETHER+mt.Msg.MIXLY_BE_IDENTIFIED),this.setOutput(!0),this.setInputsInline(!0)}},nc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RECOGNIZED_STATE,"status1"],[mt.Msg.MIXLY_WHETHER_BROADCAST,"status2"],[mt.Msg.MIXLY_THE_RECOGNIZED_CMD,"result"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_CI130X_GET_THE_RECOGNIZED_STATE_TOOLTIP)}},sc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MP3_PLAY).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[mt.Msg.MIXLY_WIND_SPEED,"154"],[mt.Msg.MIXLY_HYETAL,"155"],[mt.Msg.MIXLY_TEMPERATURE,"156"],[mt.Msg.MIXLY_Humidity,"157"],[mt.Msg.MIXLY_Altitude,"158"],[mt.Msg.MIXLY_SOUND,"159"],[mt.Msg.MIXLY_BRIGHTNESS,"160"],[mt.Msg.ME_GO_HALL_SENSOR_DISTANCE,"161"],[mt.Msg.MIXLY_SERVO,"162"],[mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"163"],[mt.Msg.MIXLY_BUTTON2,"164"],[mt.Msg.MIXLY_ESP32_TOUCH,"165"],[mt.Msg.MIXLY_PAY,"166"],[mt.Msg.MIXLY_CARSH_CHANGE,"167"],[mt.Msg.MIXLY_COUNTDOWN,"168"],[mt.Msg.MIXLY_TIMING,"169"],[mt.Msg.MIXLY_AT_THE_MOMENT,"170"],[mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE,"171"],[mt.Msg.MIXLY_FORWARD,"172"],[mt.Msg.MIXLY_BACKWARD,"173"],[mt.Msg.MIXLY_TURNLEFT,"174"],[mt.Msg.MIXLY_TURNRIGHT,"175"],[mt.Msg.MIXLY_STOP,"176"],[mt.Msg.MIXLY_Accelerate,"177"],[mt.Msg.MIXLY_retard,"178"],[mt.Msg.ROTATION_FORWARD,"179"],[mt.Msg.ROTATION_BACKWARD,"180"],[mt.Msg.TUPLE_JOIN,"181"],[mt.Msg.MIXLY_SHOW,"182"],[mt.Msg.MIXLY_LAMPLIGHT,"183"],[mt.Msg.MIXLY_ACCELERATION,"184"]]),"star"),this.appendValueInput("NUM").appendField(mt.Msg.MIXLY_NUMBER),this.appendDummyInput("").appendField(mt.Msg.MIXLY_UNIT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[mt.Msg.MIXLY_YEAR,"117"],[mt.Msg.MIXLY_MONTH,"118"],[mt.Msg.MIXLY_DAY,"119"],[mt.Msg.MIXLY_HOUR,"120"],[mt.Msg.MIXLY_MINUTE,"121"],[mt.Msg.MIXLY_SECOND,"122"],[mt.Msg.MIXLY_WEEK2,"123"],[mt.Msg.MIXLY_RMB_UNIT,"124"],[mt.Msg.blockpy_setheading_degree,"125"],[mt.Msg.MIXLY_GEAR,"126"],[mt.Msg.MIXLY_LAYER,"127"],[mt.Msg.MIXLY_GRAM,"128"],[mt.Msg.MIXLY_METER,"129"],[mt.Msg.MIXLY_CENTIMETER,"130"],[mt.Msg.MIXLY_MILLIMETER,"131"],[mt.Msg.MIXLY_LUMEN,"132"],[mt.Msg.MIXLY_DECIBEL,"133"],[mt.Msg.MIXLY_hectopascal,"134"],[mt.Msg.MIXLY_PERCENT,"135"],[mt.Msg.MIXLY_CELSIUS,"136"],[mt.Msg.MIXLY_METER_PER_SEC,"137"],[mt.Msg.MIXLY_MICROBIT_Turn_on_display,"138"],[mt.Msg.MIXLY_MICROBIT_Turn_off_display,"139"],[mt.Msg.MIXLY_SUCCESS,"140"],[mt.Msg.MIXLY_FAILED,"141"],[mt.Msg.MIXLY_WRONG,"142"],[mt.Msg.MIXLY_GOOD,"143"],[mt.Msg.MIXLY_blockpy_set_add,"144"],[mt.Msg.MIXLY_DECREASE,"145"],[mt.Msg.COLOUR_RGB_RED,"146"],[mt.Msg.COLOUR_RGB_ORANGE,"147"],[mt.Msg.COLOUR_YELLOW,"148"],[mt.Msg.COLOUR_RGB_GREEN,"149"],[mt.Msg.COLOUR_CYAN,"150"],[mt.Msg.COLOUR_RGB_BLUE,"151"],[mt.Msg.COLOUR_RGB_PURPLE,"152"],[mt.Msg.COLOUR_RGB_WHITE,"153"]]),"end"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},_c={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.MIXLY_SYSTEM+mt.Msg.MIXLY_CMD).appendField(new mt.FieldDropdown([[mt.Msg.MILXY_ENTER_WAKE_UP,"1"],[mt.Msg.MIXLY_INCREASE_VOLUME,"202"],[mt.Msg.MIXLY_REDUCE_VOLUME,"203"],[mt.Msg.MIXLY_MAX_VOLUME,"204"],[mt.Msg.MIXLY_MINIMUM,"205"],[mt.Msg.MIXLY_OPEN_RESPONSE,"206"],[mt.Msg.MIXLY_CLOSE_RESPONSE,"207"],[mt.Msg.MIXLY_QUIT_WAKE_UP,"208"]]),"cmd"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},oc={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[mt.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[mt.Msg.MIXLY_ESP32_MAX30102_IR+","+mt.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},pc={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[mt.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[mt.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ac={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308ALS"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},uc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.HTML_COLOUR+mt.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET+mt.Msg.HTML_COLOUR,"[2]"],[mt.Msg.MIXLY_GET+mt.Msg.MIXLY_IR_STRENGTH,"[1]"],[mt.Msg.MIXLY_GET+mt.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},rc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.HTML_COLOUR+mt.Msg.MSG.catSensor+" UCS12071").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET+"RGB"+mt.Msg.HTML_COLOUR,"0"],[mt.Msg.MIXLY_GET+mt.Msg.MIXLY_RGB_RAW,"1"],[mt.Msg.MIXLY_GET_ENV_LIGHT+mt.Msg.MIXLY_BRIGHTNESS,"2"],[mt.Msg.GET_IR_STRENGTH+mt.Msg.MIXLY_BRIGHTNESS,"3"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},lc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET_ENV_LIGHT,"E"],[mt.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},dc={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ic={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},Tc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},Mc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETPRESSURE,"pressure()"],[mt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[mt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},hc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" SPL06_001").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETPRESSURE,"pressure()"],[mt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[mt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},mc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETPRESSURE,"pressure()"],[mt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[mt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ec={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_REF_TO_PRESSURE),this.appendDummyInput().appendField(mt.Msg.MIXLY_CAL_TO_ALTITUDE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Oc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MIXGOPE_FIELD+mt.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[mt.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Rc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_shake,"shake"],[mt.Msg.MIXLY_UP,"up"],[mt.Msg.MIXLY_DOWN,"down"],[mt.Msg.MIXLY_LEFT,"left"],[mt.Msg.MIXLY_RIGHT,"right"],[mt.Msg.MIXLY_MICROBIT_face_up,"face up"],[mt.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=mt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=mt.Msg.MSG.catSensor,s=mt.Msg.MIXLY_MICROBIT_JS_STATE,_=mt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:mt.Msg.MIXLY_MICROBIT_shake,up:mt.Msg.MIXLY_UP,down:mt.Msg.MIXLY_DOWN,left:mt.Msg.MIXLY_LEFT,right:mt.Msg.MIXLY_RIGHT,"face up":mt.Msg.MIXLY_MICROBIT_face_up,"face down":mt.Msg.MIXLY_MICROBIT_face_down}[e]+_}))}},cc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},gc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_GET+mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Cc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+mt.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Sc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},Ac={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_GETTEMPERATUE)}},Lc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return mt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},Nc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},Dc={init:function(){this.setColour(XR),this.appendValueInput("SPISUB").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new mt.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},fc={init:function(){this.setColour(XR),this.appendDummyInput().appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[mt.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Fc={init:function(){this.setColour(XR),this.appendDummyInput().appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},Pc={init:function(){this.setColour(XR),this.appendDummyInput().appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},vc={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(mt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Yc={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(mt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(mt.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},Xc={init:function(){this.setColour(XR),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RFID_SCAN_OK,"0"],[mt.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[mt.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},yc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown([["全部(元组)","data()[0]"],["全部(json)","data()[1]"],["全部(json,附带位置信息)","data()[2]"],["编号","data()[0][0]"],["电量","data()[0][1]"],["风速","data()[0][2]"],["阵风","data()[0][3]"],["风向","data()[0][4]"],["雨量","data()[0][5]"],["温度","data()[0][6]"],["湿度","data()[0][7]"],["光照","data()[0][8]"],["紫外线","data()[0][9]"],["大气压","data()[0][10]"],["信号强度","data()[0][11]"],["信噪比","data()[0][12]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip("返回气象数据元组 data= (设备id,电池状态,风速m/s,阵风m/s,风向°,雨量mm,温度℃,湿度%,光照Lux,UVI,大气压Pa,信号强度dB,信噪比dB)")}},xc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},bc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendValueInput("BASE").appendField("以主题"),this.appendDummyInput("").appendField("串口发送至MixIO"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Vc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new mt.icons.MutatorIcon(["weather_set_label_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("weather_set_label_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n>6),i.push(128|63&_)):(2048<=_&&_<=55295||57344<=_&&_<=65535)&&(n+=3,i.push(224|15&_>>12),i.push(128|63&_>>6),i.push(128|63&_))}for(s=0;s>8,255&n].concat(i)}(t,!0),i="",n=0;n=0?"0x700000":["mixgo_sant"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==o?(e.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+_+", font_address="+p+")\n"):"16x8 Matrix"==o&&(e.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+_+")\n"),i},lP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},dP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},IP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},TP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},MP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},hP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},mP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},EP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},OP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},RP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},cP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},gP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},CP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},SP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_"+t.getFieldValue("OP")+"("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"B",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},AP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},LP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},NP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},DP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},fP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"width",e.ORDER_ATOMIC),o=e.valueToCode(this,"height",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP");switch(p){case"True":return i+".show_fill_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n";case"False":return i+".show_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n"}},FP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+_+", 1)\n"},PP=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},vP=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},YP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},XP=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},yP=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"r",e.ORDER_ATOMIC),o="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(o){case"True":return i+".show_fill_circle("+n+", "+s+", "+_+", "+p+")\n";case"False":return i+".show_circle("+n+", "+s+", "+_+", "+p+")\n"}},xP=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),_=e.valueToCode(this,"x1",e.ORDER_ATOMIC),o=e.valueToCode(this,"y1",e.ORDER_ATOMIC),p=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",r=this.getFieldValue("OP");switch(u){case"True":return i+".show_fill_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n"}},bP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+","+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+","+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},VP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},BP=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),_=this.getFieldValue("key");return"TM1650"==_?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+_+"("+s+")\n"):"TM1637"==_&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+_+"("+s+")\n"),i},GP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},UP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},wP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".showDP("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},kP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},HP=function(t,e){e.definitions_.import_st7789="import st7789";var i=Et.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_sant"].indexOf(i)>=0?"0xE00000":"0x3A0000";var s=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),_=e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC),o=e.valueToCode(this,"PINCS",e.ORDER_ATOMIC),p=e.valueToCode(this,"PINDC",e.ORDER_ATOMIC);return s+" = st7789.ST7789("+_+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+", dc_pin="+p+", cs_pin="+o+", rotation="+this.getFieldValue("rotate")+", font_address="+n+")\n"},WP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".image("+n+", x="+s+", y="+_+", size="+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".image("+n+", x= "+s+",y="+_+", size="+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},KP=function(t,e){var i="0x"+this.getFieldValue("COLOR").slice(1);return["0x"+((16252928&i)>>8|(64512&i)>>5|(255&i)>>3).toString(16),e.ORDER_ATOMIC]},JP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==a.slice(0,2))var r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color="+a+")\n";else{const t=a.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},qP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p=i+".frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},zP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},QP=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},jP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"x1",e.ORDER_ATOMIC),s=e.valueToCode(this,"y1",e.ORDER_ATOMIC),_=e.valueToCode(this,"x2",e.ORDER_ATOMIC),o=e.valueToCode(this,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".line("+n+", "+s+", "+_+", "+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".line("+n+", "+s+", "+_+", "+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},$P=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=this.getFieldValue("key"),_=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return e.definitions_.import_i2clcd="import i2clcd",i+" = i2clcd.LCD("+n+", lcd_width="+s+", i2c_addr="+_+")\n"},ZP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+",center = "+this.getFieldValue("center")+")\n"},tv=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".print("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},ev=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},iv=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},nv=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC),_=this.getFieldValue("driver"),o=Et.Boards.getSelectedBoardKey().split(":")[2],p="";return p=["mpython","mixgo_pe","mixgo_nova"].indexOf(o)>=0?"0x700000":["mixgo_sant"].indexOf(o)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+", address="+s+", font_address="+p+", types="+_+")\n"},sv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},_v=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+")\n"},ov=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},pv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},av=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},uv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},rv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},lv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},dv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},Iv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},Tv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},Mv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},hv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=t.getFieldValue("state");return i+"."+t.getFieldValue("shape")+"("+n+", "+s+", "+_+", "+o+", "+p+")\n"+i+".show()\n"},mv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=t.getFieldValue("state");return i+"."+("0"==t.getFieldValue("dir_h_v")?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\n"+i+".show()\n"},Ev=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".line("+e.valueToCode(t,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y2",e.ORDER_ATOMIC)+", "+t.getFieldValue("state")+")\n"+i+".show()\n"},Ov=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var s="onboard_tft.image("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff,sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n"}else if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled";s="oled.print("+n+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.shows("+n+")\n"}return s},Rv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),_=this.getFieldValue("center");if("mixgo_sant"==i||"mixgo_nova"==i)return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+", space="+s+", center="+_+",sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n";if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled"}return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+", space="+s+", center="+_+")\n"},cv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var s="onboard_oled.frame("+n+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";s="onboard_tft.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.frame("+n+")\n"}return s},gv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var _="onboard_oled.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", delay="+s+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";_="onboard_tft.frame("+n+", size=5 , delay="+s+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";_="onboard_matrix.frame("+n+", delay="+s+")\n"}return _},Cv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";n="onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},Sv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var o="onboard_oled.scroll("+n+", speed="+s+", space="+_+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";o="onboard_tft.scroll("+n+", y=0, size=5, speed="+s+", space="+_+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";o="onboard_matrix.scroll("+n+", speed="+s+", space="+_+")\n"}return o},Av=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},Lv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},Nv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){const i=t.getFieldValue("image").split(".");if(2!==i.length)throw Error("pin value error");e.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`;var n=i[1]}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix."+t.getFieldValue("image")}return[n,e.ORDER_ATOMIC]},Dv=function(t,e){var i={"#000000":"0","#ff0000":"1"};function n(t){let e="";if(t.length%2==1&&(t="0"+t),t.length<8){let e=8-t.length;for(let i=1;i<=e;i++)t="0"+t}for(let i=1;i<=t.length;i++)i%2==0&&i!==t.length?e=e+t[i-1]+",0x":e+=t[i-1];return"0x"+e}let s=[];for(let e=0;e<12;e++){let _="",o=0,p=0;for(let n=0;n<32;n++)n<8?p=7-n:n<16?p=23-n:n<24?p=39-n:n<32&&(p=55-n),o+=Number(i[t.getFieldValue(e+"-"+n)])*Math.pow(2,31-p);_+=n(o.toString(16)),s.unshift(_)}let _=[];for(let t=0;t>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},dY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.picture("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"direct",e.ORDER_ASSIGNMENT)+")\n"},IY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=this.getFieldValue("center"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True",r=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==r.slice(0,2))var l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color="+r+",sync="+u+")\n";else{const t=r.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color=0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+",sync="+u+")\n"}return l},TY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},MY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=t.getFieldValue("shape"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+",sync="+u+")\n";else{const t=p.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+",sync="+u+")\n"}return r},hY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("dir_h_v"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},mY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x1",e.ORDER_ATOMIC),s=e.valueToCode(t,"y1",e.ORDER_ATOMIC),_=e.valueToCode(t,"x2",e.ORDER_ATOMIC),o=e.valueToCode(t,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},EY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},OY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),o=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var p="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+",sync="+o+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+",sync="+o+")\n"}return p},RY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==n.slice(0,2))var _="onboard_tft.fill("+n+",sync="+s+")\n";else{const t=n.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_="onboard_tft.fill(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+",sync="+s+")\n"}return _},cY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=o+"=Clock("+n+", "+s+", "+_+", "+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=o+"=Clock("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},gY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},CY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_time("+e.valueToCode(this,"h",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"m",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"s",e.ORDER_ASSIGNMENT)+")\n"},SY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},AY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2))var _=n+".clear("+s+")\n";else{const t=s.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_=n+".clear(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+")\n"}return _},LY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"r",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("shape"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+", "+p+",sync="+a+")\n"}return u},NY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n="onboard_tft.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}return n},DY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2));else{const t=s.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)}return"onboard_tft.pointern(angle="+n+")\n"},fY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color="+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},FY=Ov,PY=bv,vY=Xv,YY=bv,XY=Vv,yY=Fv,xY=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},bY=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},VY=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},WB=function(){return"control.reset()\n"},KB=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Et.Profile.default.serial)+")\n"},JB=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Et.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Et.Profile.default.serial)+")\n"},qB=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Et.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Et.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},zB=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},QB=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},jB=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},$B=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},ZB=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},tG=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},eG=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},iG=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},nG=function(){return"while True:\n pass\n"},sG=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},_G=function(t,e){return e.definitions_.import_os="import os","os.uname()"},oG=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},pG=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},aG=function(t,e){return e.definitions_.import_mixgo="import mixgo",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period="+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=Timer."+(e.valueToCode(this,"mode",e.ORDER_NONE)||"None")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},uG=function(t,e){return e.definitions_.import_machine="import machine",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period = "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=machine.Timer."+this.getFieldValue("mode")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},rG=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},lG=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},dG=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},IG=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},TG=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},MG=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},hG=lG,mG=uG,EG=rG,OG=oG,RG=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},cG=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},gG=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api.weather_hourly("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"hour",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},CG=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")\n"},SG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_now.analysis()";else n='Weather_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},AG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Air_now.analysis()";else n='Air_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},LG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_alarm.analysis()";else n='Weather_alarm.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},NG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Life_suggestion.analysis()";else n='Life_suggestion.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},DG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Tide_daily.analysis()";else n='Tide_daily.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},fG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Location_search.analysis()";else n='Location_search.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},FG=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")\n"},PG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Weather_daily.analysis("+n+")";else s="Weather_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},vG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Air_daily.analysis("+n+")";else s="Air_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},YG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_sun.analysis("+n+")";else s="Geo_sun.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},XG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_moon.analysis("+n+")";else s="Geo_moon.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},yG=new mt.Generator("Python");yG.INDENT=" ",yG.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),yG.ORDER_ATOMIC=0,yG.ORDER_COLLECTION=1,yG.ORDER_STRING_CONVERSION=1,yG.ORDER_UNARY_POSTFIX=1,yG.ORDER_UNARY_PREFIX=2,yG.ORDER_MEMBER=2.1,yG.ORDER_FUNCTION_CALL=2.2,yG.ORDER_EXPONENTIATION=3,yG.ORDER_UNARY_SIGN=4,yG.ORDER_BITWISE_NOT=4,yG.ORDER_MULTIPLICATIVE=5,yG.ORDER_ADDITIVE=6,yG.ORDER_BITWISE_SHIFT=7,yG.ORDER_BITWISE_AND=8,yG.ORDER_BITWISE_XOR=9,yG.ORDER_BITWISE_OR=10,yG.ORDER_RELATIONAL=11,yG.ORDER_EQUALITY=11,yG.ORDER_LOGICAL_NOT=12,yG.ORDER_LOGICAL_AND=13,yG.ORDER_LOGICAL_OR=14,yG.ORDER_ASSIGNMENT=14,yG.ORDER_CONDITIONAL=15,yG.ORDER_LAMBDA=16,yG.ORDER_NONE=99,yG.ORDER_OVERRIDES=[[yG.ORDER_FUNCTION_CALL,yG.ORDER_MEMBER],[yG.ORDER_FUNCTION_CALL,yG.ORDER_FUNCTION_CALL],[yG.ORDER_MEMBER,yG.ORDER_MEMBER],[yG.ORDER_MEMBER,yG.ORDER_FUNCTION_CALL]],yG.init=function(){yG.PASS=this.INDENT+"pass\n",yG.definitions_=Object.create(null),yG.functionNames_=Object.create(null),yG.setups_=Object.create(null),yG.loops_=Object.create(null),yG.codeEnd_=Object.create(null),yG.variableDB_?yG.variableDB_.reset():yG.variableDB_=new gt(yG.RESERVED_WORDS_)},yG.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var _=this.definitions_[s];0===s.indexOf("import")?e.push(_):0===s.indexOf("var_declare")?i.push(_):n.push(_)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var o=[];for(var s in yG.functions_)o.push(yG.functions_[s]);o.length&&o.push("\n");var p=[];for(var s in yG.setups_)p.push(yG.setups_[s]);p.length&&p.push("\n");var a=[];for(var s in yG.loops_)a.push(yG.loops_[s]);var u=[];for(var s in yG.codeEnd_)u.push(yG.codeEnd_[s]);0!==u.length&&u.push("\n");let r="";return r=a.length>0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n"),r},yG.scrubNakedValue=function(t){return t+"\n"},yG.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},yG.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},yG.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=mt.utils.string.wrap(_,yG.COMMENT_WRAP-3),n+=yG.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const xG={};xG["MixGo CE"]={description:"MicroPython[ESP32C3 MixGo CE]",digital_pin:Et.Profile.generate(["0-18","21-46"]),input_pin:Et.Profile.generate(["0-18","21-46"]),output_pin:Et.Profile.generate(["0-18","21-45"]),pwm_input:Et.Profile.generate(["0-18","21-46"],"pwm","pwm"),analog_input:Et.Profile.generate(["0-18","21-46"],"adc","adc"),pwm_output:Et.Profile.generate(["0-18","21-45"],"pwm","pwm"),analog_output:Et.Profile.generate(["0-18","21-45"],"adc","adc"),espnow_channel:Et.Profile.generate(["1-13"]),haskylens_model:Et.Profile.generate(["0-4"]),digital:Et.Profile.generate(["0-18","21-45"],"pin","pin"),pwm_pin:Et.Profile.generate(["0-18","21-45"]),pwm:Et.Profile.generate(["0-18","21-45"],"pwm","pwm"),analog_pin:Et.Profile.generate(["1-18"]),analog:Et.Profile.generate(["1-18"],"adc","adc"),dac_pin:Et.Profile.generate(["17-18"]),dac:Et.Profile.generate(["17-18"],"dac","dac"),touch:Et.Profile.generate(["1-14"],"tc","tc"),touch_pin:Et.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Et.Profile.generate(["0-4"]),exlcdh:Et.Profile.generate(["0-15"]),exlcdv:Et.Profile.generate(["0-7"]),brightness:Et.Profile.generate(["0-9"]),tts_voice:Et.Profile.generate(["0-16"]),tts_builtin_music:Et.Profile.generate(["0-47"]),tts_bgmusic:Et.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["MUSIC_QUAVERS","onboard_matrix.MUSIC_QUAVERS"],["MUSIC_QUAVER","onboard_matrix.MUSIC_QUAVER"],["MUSIC_CROTCHET","onboard_matrix.MUSIC_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},xG["ESP32S2 Generic"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:Et.Profile.generate(["0-42","45"]),input_pin:Et.Profile.generate(["0-42","45-46"]),output_pin:Et.Profile.generate(["0-42","45"]),pwm_input:Et.Profile.generate(["0-42","45-46"],"pwm","pwm"),analog_input:Et.Profile.generate(["0-18","21-46"],"adc","adc"),pwm_output:Et.Profile.generate(["0-42","45"],"pwm","pwm"),analog_output:Et.Profile.generate(["0-42","45"],"adc","adc"),espnow_channel:Et.Profile.generate(["1-13"]),haskylens_model:Et.Profile.generate(["0-4"]),digital:Et.Profile.generate(["0-42","45"],"pin","pin"),pwm_pin:Et.Profile.generate(["0-42","45"]),pwm:Et.Profile.generate(["0-42","45"],"pwm","pwm"),analog_pin:Et.Profile.generate(["1-20"]),analog:Et.Profile.generate(["1-20"],"adc","adc"),dac_pin:Et.Profile.generate(["17-18"]),dac:Et.Profile.generate(["17-18"],"dac","dac"),touch:Et.Profile.generate(["1-14"],"tc","tc"),touch_pin:Et.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Et.Profile.generate(["0-4"]),exlcdh:Et.Profile.generate(["0-15"]),exlcdv:Et.Profile.generate(["0-7"]),brightness:Et.Profile.generate(["0-9"]),tts_voice:Et.Profile.generate(["0-16"]),tts_builtin_music:Et.Profile.generate(["0-47"]),tts_bgmusic:Et.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["MUSIC_QUAVERS","onboard_matrix.MUSIC_QUAVERS"],["MUSIC_QUAVER","onboard_matrix.MUSIC_QUAVER"],["MUSIC_CROTCHET","onboard_matrix.MUSIC_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]};const bG=xG,VG=20,BG={init:function(){this.setColour(VG),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_HIGH,"HIGH"],[mt.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},GG={init:function(){this.setColour(VG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(mt.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},UG={init:function(){this.setColour(VG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},wG={init:function(){this.setColour(VG),this.appendValueInput("PIN",Number).appendField("DAC"+mt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_TOOLTIP)}},kG={init:function(){this.setColour(VG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_PERIOD_MIL).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_mSecond,"period"],[mt.Msg.MIXLY_uSecond,"period_microseconds"]]),"key"),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_SET_TOOLTIP)}},HG={init:function(){this.setColour(VG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_REF_VOLTAGE+mt.Msg.MIXLY_STAT).appendField(new mt.FieldDropdown([["3.3V","machine.ADC.ATTN_11DB"],["2.2V","machine.ADC.ATTN_6DB"],["1.5V","machine.ADC.ATTN_2_5DB"],["1.2V","machine.ADC.ATTN_0DB"]]),"atten"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_ATTEN_TOOLTIP)}},WG={init:function(){this.setColour(VG),this.appendValueInput("pin").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_TOOLTIP)}},KG={init:function(){this.setColour(20),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_ATTACHINTERRUPT_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[mt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[mt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},JG={init:function(){this.setColour(20),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("pin#"),"PIN_OBJ"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROPYTHON_AS).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_Digital_PINMODEOUT,"machine.Pin.OUT"],[mt.Msg.MIXLY_Digital_PINMODEIN,"machine.Pin.IN"],[mt.Msg.MIXLY_PINMODEPULLUP,"machine.Pin.IN, machine.Pin.PULL_UP"],[mt.Msg.MIXLY_PINMODEPULLDOWN,"machine.Pin.IN, machine.Pin.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)},getVars:function(){return["pin#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},qG={init:function(){this.setColour(VG),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("dac#"),"PIN_OBJ").appendField(mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("DAC"+mt.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_INIT_TOOLTIP)},getVars:function(){return["dac#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},zG={init:function(){this.setColour(VG),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("tc#"),"PIN_OBJ").appendField(mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_INIT_TOOLTIP)},getVars:function(){return["tc#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},QG={init:function(){this.setColour(VG),this.appendValueInput("PIN",Number).appendField("PWM"+mt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_FREQUENCY+mt.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_SET_FREQ_TOOLTIP)}},jG=JG,$G=zG,ZG=WG,tU=KG,eU=230,iU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital),"PIN"),this.setOutput(!0)}},nU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},sU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},_U={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},oU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},pU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},aU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},uU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},rU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},lU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},dU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},IU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},TU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},MU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},hU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},mU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},EU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog),"PIN"),this.setOutput(!0)}},OU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},RU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.dac),"PIN"),this.setOutput(!0)}},cU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},gU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},CU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},SU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm),"PIN"),this.setOutput(!0)}},AU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},LU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},NU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.touch),"PIN"),this.setOutput(!0)}},DU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},fU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},FU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},PU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.imglist),"PIN"),this.setOutput(!0)}},vU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.playlist),"PIN"),this.setOutput(!0)}},YU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},XU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},yU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},xU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},bU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},VU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},BU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},GU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},UU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},wU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},kU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},HU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.one_more),"PIN"),this.setOutput(!0)}},WU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},KU=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},JU=function(t,e){e.definitions_.import_machine="import machine";var i="";return i+=e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value("+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},qU=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},zU=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".write("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},QU=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=e.valueToCode(this,"NUM",e.ORDER_ATOMIC);return i+".set_analog_"+this.getFieldValue("key")+"("+n+")\n"},jU=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},$U=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=this.getFieldValue("mode");return"machine.Pin("+i+").irq(handler = "+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+", trigger = "+n+")\n"},ZU=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"pin#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),s=this.getFieldValue("MODE");return("pin#"==i?"pin"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.Pin("+n+", "+s+")\n"},tw=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"dac#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("dac#"==i?"dac"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.DAC(machine.Pin("+n+"))\n"},ew=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},iw=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"tc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("tc#"==i?"tc"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.TouchPad(machine.Pin("+n+"))\n"},nw=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},sw=nw,_w=nw,ow=nw,pw=nw,aw=nw,uw=nw,rw=nw,lw=nw,dw=nw,Iw=nw,Tw=nw,Mw=nw,hw=nw,mw=nw,Ew=nw,Ow=nw,Rw=nw,cw=nw,gw=nw,Cw=nw,Sw=nw,Aw=nw,Lw=nw,Nw=nw,Dw=nw,fw=nw,Fw=nw,Pw=nw,vw=nw,Yw=nw,Xw=nw,yw=nw,xw=nw,bw=nw,Vw=nw,Bw=nw,Gw=nw,Uw=nw,ww=nw,kw=nw,Hw=nw,Ww=nw,Kw=nw,Jw=nw;Object.assign(mt.Variables,Rt),Object.assign(mt.Procedures,vu),mt.Python=Yu,mt.generator=Yu,Et.Profile.default={},Object.assign(Et.Profile,bG),Object.assign(Et.Profile.default,bG["MixGo CE"]),Object.assign(mt.Blocks,e,i,n,s,_,o,p,a,u,r,l,d,I,V,W,H,X,B,K,f,k,w,U,G,F,D,N,x,y,b,P,v,Y,It,Tt),Object.assign(mt.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,st,lt,rt,tt,_t,dt,z,ut,at,pt,ot,Q,q,J,it,et,nt,j,$,Z,Mt,ht)})(); \ No newline at end of file diff --git a/boards/default/micropython_esp32s2/main.bundle.7f964d3e.js b/boards/default/micropython_esp32s2/main.bundle.7f964d3e.js deleted file mode 100644 index b8d4bd20..00000000 --- a/boards/default/micropython_esp32s2/main.bundle.7f964d3e.js +++ /dev/null @@ -1,21 +0,0 @@ -(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>Dt,controls_typeLists:()=>ft,lists_zip:()=>Ft,lists_zip_container:()=>Pt,lists_zip_item:()=>vt,unpack_iterable_object:()=>Yt,variables_change:()=>Lt,variables_get:()=>St,variables_global:()=>Nt,variables_set:()=>At});var i={};t.r(i),t.d(i,{base_setup:()=>xt,controls_delay:()=>bt,controls_end_program:()=>Vt,controls_except:()=>jt,controls_finally:()=>$t,controls_flow_statements:()=>Ht,controls_for:()=>Wt,controls_forEach:()=>Ut,controls_for_range:()=>Kt,controls_if:()=>Bt,controls_if_else:()=>zt,controls_if_elseif:()=>qt,controls_if_if:()=>Jt,controls_lambda:()=>te,controls_main:()=>yt,controls_pass:()=>ee,controls_range:()=>Gt,controls_repeat_ext:()=>Zt,controls_thread:()=>ie,controls_try:()=>Qt,controls_try_finally:()=>kt,controls_whileUntil:()=>wt,datetime_fromtimestamp:()=>ae,do_while:()=>ne,garbage_collection:()=>se,gene_unique_identifier:()=>ue,get_mem_alloc:()=>_e,get_mem_free:()=>oe,get_unique_identifier:()=>pe});var n={};t.r(n),t.d(n,{base_map:()=>Fe,generate_cartesian_product:()=>ve,math_arithmetic:()=>Te,math_bit:()=>he,math_constant:()=>de,math_constant_mp:()=>Ie,math_constrain:()=>Ce,math_dec:()=>Ee,math_degree_to_radian:()=>Xe,math_indexer_number:()=>Ae,math_map:()=>Se,math_max_min:()=>Re,math_number:()=>le,math_number_base_conversion:()=>ce,math_radian_to_degree:()=>Ye,math_random:()=>ge,math_random_seed:()=>Le,math_round:()=>Ne,math_selfcalcu:()=>Me,math_to_int:()=>Oe,math_trig:()=>me,text_to_number:()=>De,text_to_number_skulpt:()=>fe,turn_to_int:()=>Pe});var s={};t.r(s),t.d(s,{ascii_to_char:()=>Ge,char_to_ascii:()=>Ue,number_to_text:()=>we,os_system:()=>Ii,text:()=>xe,text_capital:()=>je,text_center:()=>$e,text_char:()=>Ve,text_char_at:()=>We,text_char_at2:()=>He,text_char_at3:()=>ui,text_compareTo:()=>ai,text_compare_to:()=>Qe,text_create_with_container:()=>_i,text_create_with_item:()=>oi,text_encode:()=>li,text_equals_starts_ends:()=>ze,text_eval:()=>di,text_find:()=>Ze,text_format:()=>si,text_format_noreturn:()=>ri,text_join:()=>Be,text_join_seq:()=>ti,text_length:()=>ke,text_random_char:()=>Ke,text_replace:()=>ei,text_split:()=>ii,text_strip:()=>ni,text_substring:()=>qe,text_substring2:()=>Je,text_substring3:()=>pi,text_textarea:()=>be});var _={};t.r(_),t.d(_,{ENUMERATE:()=>zi,content_in_lists:()=>ji,enumerate:()=>Qi,list_many_input:()=>xi,list_tolist:()=>Gi,list_tolist2:()=>qi,list_trig:()=>Yi,lists_2d_get_col_row_data:()=>Ei,lists_2d_get_data_with_col_row:()=>mi,lists_append_extend:()=>Si,lists_change_to:()=>yi,lists_change_to_general:()=>Vi,lists_clear:()=>fi,lists_create_with:()=>Oi,lists_create_with2:()=>Ui,lists_create_with_container:()=>ci,lists_create_with_item:()=>gi,lists_create_with_noreturn:()=>bi,lists_create_with_text:()=>Ri,lists_create_with_text2:()=>wi,lists_del_general:()=>Bi,lists_find:()=>vi,lists_getIndex3:()=>ki,lists_getSublist3:()=>Hi,lists_get_index:()=>Mi,lists_get_random_item:()=>Ai,lists_get_random_sublist:()=>Li,lists_get_sublist:()=>hi,lists_insert_value:()=>Ni,lists_insert_value2:()=>Ki,lists_pop:()=>Pi,lists_remove_at:()=>Fi,lists_remove_at2:()=>Ji,lists_reverse:()=>Di,lists_setIndex3:()=>Wi,lists_set_index:()=>Ci,lists_sort:()=>Xi});var o={};t.r(o),t.d(o,{dicts_add_change_del:()=>Tn,dicts_add_or_change:()=>on,dicts_clear:()=>un,dicts_create_with:()=>Zi,dicts_create_with_container:()=>tn,dicts_create_with_item:()=>en,dicts_create_with_noreturn:()=>mn,dicts_deldict:()=>In,dicts_delete:()=>pn,dicts_get:()=>sn,dicts_get_default:()=>_n,dicts_items:()=>rn,dicts_keys:()=>nn,dicts_length:()=>dn,dicts_pop:()=>Mn,dicts_setdefault:()=>hn,dicts_to_json:()=>On,dicts_to_json2:()=>gn,dicts_to_to:()=>cn,dicts_todict:()=>En,dicts_update:()=>an,dicts_values:()=>ln,json_to_dicts:()=>Rn});var p={};t.r(p),t.d(p,{logic_boolean:()=>Dn,logic_compare:()=>Sn,logic_compare_continous:()=>An,logic_is:()=>vn,logic_is_in:()=>Pn,logic_negate:()=>Nn,logic_null:()=>fn,logic_operation:()=>Ln,logic_tobool:()=>Yn,logic_true_or_false:()=>Fn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>is,sdcard_use_spi_init:()=>es,storage_can_write_ornot:()=>wn,storage_change_dir:()=>Zn,storage_close_file:()=>Hn,storage_delete_file:()=>Kn,storage_file_seek:()=>zn,storage_file_tell:()=>qn,storage_file_write:()=>Vn,storage_fileopen:()=>yn,storage_fileopen_new:()=>xn,storage_fileopen_new_encoding:()=>bn,storage_get_a_line:()=>Un,storage_get_contents:()=>Gn,storage_get_contents_without_para:()=>Bn,storage_get_current_dir:()=>Qn,storage_get_file_size:()=>Jn,storage_get_filename:()=>kn,storage_is_file:()=>ts,storage_list_all_files:()=>Wn,storage_make_dir:()=>jn,storage_open_file_with_os:()=>Xn,storage_rename:()=>$n});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>ps,procedures_callreturn:()=>as,procedures_defnoreturn:()=>ns,procedures_defreturn:()=>ss,procedures_ifreturn:()=>us,procedures_mutatorarg:()=>os,procedures_mutatorcontainer:()=>_s,procedures_return:()=>rs});var r={};t.r(r),t.d(r,{tuple_change_to:()=>gs,tuple_create_with:()=>ds,tuple_create_with_container:()=>Is,tuple_create_with_item:()=>Ts,tuple_create_with_noreturn:()=>Ls,tuple_create_with_text2:()=>Ms,tuple_create_with_text_return:()=>hs,tuple_del:()=>Os,tuple_find:()=>Cs,tuple_getIndex:()=>ms,tuple_getSublist:()=>As,tuple_get_random_item:()=>Ds,tuple_get_sublist:()=>Ns,tuple_input:()=>Fs,tuple_join:()=>Rs,tuple_length:()=>Es,tuple_max:()=>cs,tuple_totuple:()=>fs,tuple_trig:()=>Ss});var l={};t.r(l),t.d(l,{set_add_discard:()=>Gs,set_clear:()=>bs,set_create_with:()=>vs,set_create_with_container:()=>Ys,set_create_with_item:()=>Xs,set_create_with_text_return:()=>ks,set_length:()=>ys,set_operate:()=>Vs,set_operate_update:()=>Bs,set_pop:()=>xs,set_sub:()=>Us,set_toset:()=>Hs,set_update:()=>ws});var d={};t.r(d),t.d(d,{html_content:()=>zs,html_content_more:()=>Qs,html_document:()=>Ks,html_form:()=>$s,html_head_body:()=>qs,html_style:()=>js,html_style_color:()=>t_,html_style_content:()=>Zs,html_text:()=>e_,html_title:()=>Js});var I={};t.r(I),t.d(I,{attribute_access:()=>M_,function_call:()=>d_,function_call_container:()=>I_,function_call_item:()=>T_,raw_block:()=>s_,raw_empty:()=>o_,raw_expression:()=>__,raw_table:()=>n_,text_comment:()=>p_,text_print_multiple:()=>u_,text_print_multiple_container:()=>r_,text_print_multiple_item:()=>l_,type_check:()=>a_});var T={};t.r(T),t.d(T,{controls_type:()=>R_,controls_typeLists:()=>c_,lists_zip:()=>g_,unpack_iterable_object:()=>C_,variables_change:()=>E_,variables_get:()=>h_,variables_global:()=>O_,variables_set:()=>m_});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>Y_,base_setup:()=>A_,controls_delay:()=>v_,controls_flow_statements:()=>P_,controls_for:()=>D_,controls_forEach:()=>V_,controls_for_range:()=>f_,controls_if:()=>L_,controls_interrupts:()=>x_,controls_lambda:()=>G_,controls_main:()=>S_,controls_millis:()=>X_,controls_nointerrupts:()=>b_,controls_pass:()=>w_,controls_range:()=>B_,controls_repeat:()=>Q_,controls_repeat_ext:()=>W_,controls_thread:()=>k_,controls_try_finally:()=>N_,controls_whileUntil:()=>F_,datetime_fromtimestamp:()=>j_,do_while:()=>H_,garbage_collection:()=>K_,gene_unique_identifier:()=>$_,get_mem_alloc:()=>J_,get_mem_free:()=>q_,get_unique_identifier:()=>z_,reset:()=>y_,time_sleep:()=>U_});var h={};t.r(h),t.d(h,{base_map:()=>Ro,generate_cartesian_product:()=>go,math_arithmetic:()=>no,math_bit:()=>io,math_constant:()=>to,math_constant_mp:()=>eo,math_constrain:()=>Io,math_dec:()=>po,math_degree_to_radian:()=>So,math_indexer_number:()=>ho,math_map:()=>lo,math_max_min:()=>uo,math_number:()=>Z_,math_number_base_conversion:()=>To,math_radian_to_degree:()=>Co,math_random:()=>ro,math_random_seed:()=>Mo,math_round:()=>mo,math_selfcalcu:()=>so,math_single:()=>_o,math_to_int:()=>ao,math_trig:()=>oo,text_to_number:()=>Eo,text_to_number_skulpt:()=>Oo,turn_to_int:()=>co});var m={};t.r(m),t.d(m,{ascii_to_char:()=>fo,char_to_ascii:()=>Fo,number_to_text:()=>Po,os_system:()=>tp,text:()=>Ao,text_capital:()=>Go,text_center:()=>Uo,text_char:()=>No,text_char_at:()=>Xo,text_char_at2:()=>Yo,text_char_at3:()=>jo,text_compareTo:()=>Qo,text_compare_to:()=>bo,text_encode:()=>$o,text_equals_starts_ends:()=>xo,text_eval:()=>Zo,text_find:()=>wo,text_format:()=>Jo,text_format_noreturn:()=>qo,text_join:()=>Do,text_join_seq:()=>ko,text_length:()=>vo,text_random_char:()=>yo,text_replace:()=>Ho,text_split:()=>Wo,text_strip:()=>Ko,text_substring:()=>Bo,text_substring2:()=>Vo,text_substring3:()=>zo,text_textarea:()=>Lo});var E={};t.r(E),t.d(E,{content_in_lists:()=>Xp,enumerate:()=>Yp,list_many_input:()=>Rp,list_tolist:()=>Pp,list_tolist2:()=>vp,list_trig:()=>mp,lists_2d_get_col_row_data:()=>np,lists_2d_get_data_with_col_row:()=>ip,lists_append_extend:()=>ap,lists_change_to:()=>Op,lists_change_to_general:()=>gp,lists_clear:()=>Ip,lists_create_with:()=>sp,lists_create_with2:()=>Sp,lists_create_with_noreturn:()=>cp,lists_create_with_text:()=>_p,lists_create_with_text2:()=>Ap,lists_del_general:()=>Cp,lists_find:()=>Tp,lists_getIndex3:()=>Lp,lists_getSublist3:()=>Np,lists_get_index:()=>op,lists_get_random_item:()=>up,lists_get_random_sublist:()=>rp,lists_get_sublist:()=>ep,lists_insert_value:()=>lp,lists_insert_value2:()=>fp,lists_pop:()=>hp,lists_remove_at:()=>Mp,lists_remove_at2:()=>Fp,lists_reverse:()=>dp,lists_setIndex3:()=>Dp,lists_set_index:()=>pp,lists_sort:()=>Ep});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Jp,dicts_add_or_change:()=>Bp,dicts_clear:()=>wp,dicts_create_with:()=>yp,dicts_create_with_noreturn:()=>Qp,dicts_deldict:()=>Kp,dicts_delete:()=>Gp,dicts_get:()=>bp,dicts_get_default:()=>Vp,dicts_items:()=>kp,dicts_keys:()=>xp,dicts_length:()=>Wp,dicts_pop:()=>qp,dicts_setdefault:()=>zp,dicts_to_json:()=>$p,dicts_to_json2:()=>ea,dicts_to_to:()=>ta,dicts_todict:()=>jp,dicts_update:()=>Up,dicts_values:()=>Hp,json_to_dicts:()=>Zp});var R={};t.r(R),t.d(R,{logic_boolean:()=>oa,logic_compare:()=>ia,logic_compare_continous:()=>na,logic_is:()=>ra,logic_is_in:()=>ua,logic_negate:()=>_a,logic_null:()=>pa,logic_operation:()=>sa,logic_tobool:()=>la,logic_true_or_false:()=>aa});var c={};t.r(c),t.d(c,{sdcard_mount:()=>Xa,sdcard_use_spi_init:()=>Ya,storage_can_write_ornot:()=>Ra,storage_change_dir:()=>Da,storage_close_file:()=>ga,storage_delete_file:()=>Sa,storage_file_seek:()=>Na,storage_file_tell:()=>La,storage_file_write:()=>ha,storage_fileopen:()=>Ia,storage_fileopen_new:()=>Ta,storage_fileopen_new_encoding:()=>Ma,storage_get_a_line:()=>Oa,storage_get_contents:()=>Ea,storage_get_contents_without_para:()=>ma,storage_get_current_dir:()=>fa,storage_get_file_size:()=>Aa,storage_get_filename:()=>ca,storage_is_file:()=>va,storage_list_all_files:()=>Ca,storage_make_dir:()=>Fa,storage_open_file_with_os:()=>da,storage_rename:()=>Pa});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Va,procedures_callreturn:()=>ba,procedures_defnoreturn:()=>xa,procedures_defreturn:()=>ya,procedures_ifreturn:()=>Ba,procedures_return:()=>Ga});var C={};t.r(C),t.d(C,{tuple_change_to:()=>za,tuple_create_with:()=>Ua,tuple_create_with_noreturn:()=>Za,tuple_create_with_text2:()=>wa,tuple_create_with_text_return:()=>ka,tuple_del:()=>Ka,tuple_find:()=>Qa,tuple_getIndex:()=>Ha,tuple_getSublist:()=>$a,tuple_get_random_item:()=>eu,tuple_get_sublist:()=>tu,tuple_input:()=>nu,tuple_join:()=>Ja,tuple_length:()=>Wa,tuple_max:()=>qa,tuple_totuple:()=>iu,tuple_trig:()=>ja});var S={};t.r(S),t.d(S,{set_add_discard:()=>ru,set_clear:()=>pu,set_create_with:()=>su,set_create_with_text_return:()=>Iu,set_length:()=>_u,set_operate:()=>au,set_operate_update:()=>uu,set_pop:()=>ou,set_sub:()=>lu,set_toset:()=>Tu,set_update:()=>du});var A={};t.r(A),t.d(A,{html_content:()=>Eu,html_content_more:()=>Ou,html_document:()=>Mu,html_form:()=>cu,html_head_body:()=>mu,html_style:()=>Ru,html_style_content:()=>gu,html_text:()=>Cu,html_title:()=>hu});var L={};t.r(L),t.d(L,{attribute_access:()=>Fu,function_call:()=>fu,raw_block:()=>Su,raw_empty:()=>Lu,raw_expression:()=>Au,raw_table:()=>Nu,type_check:()=>Du});var N={};t.r(N),t.d(N,{PIN_init:()=>yr,actuator_extern_get_led_bright:()=>Hu,actuator_extern_get_led_state:()=>Wu,actuator_extern_led_bright:()=>ku,actuator_extern_led_brightness:()=>Ku,actuator_ms32006_dcmotor:()=>er,actuator_ms32006_init:()=>tr,actuator_ms32006_stepper:()=>ir,actuator_neopixel_init:()=>nr,actuator_neopixel_rgb:()=>sr,actuator_neopixel_rgb_all:()=>_r,actuator_neopixel_rgb_show_all_chase:()=>ar,actuator_neopixel_rgb_show_all_rainbow:()=>pr,actuator_neopixel_write:()=>or,actuator_use_uart_init:()=>ur,esp32_music_get_tempo_extern:()=>Gu,esp32_music_pitch:()=>xu,esp32_music_pitch_init:()=>yu,esp32_music_pitch_with_time:()=>bu,esp32_music_play_list:()=>Vu,esp32_music_reset_extern:()=>Uu,esp32_music_set_tempo_extern:()=>Bu,esp32_music_stop:()=>wu,mixbot_actuator_extern_get_addr:()=>Yr,mixbot_actuator_extern_set_addr:()=>Xr,mixbot_addr_extern:()=>Rr,parrot_PIN_init:()=>Br,parrot_move_speed:()=>Gr,pin_led_bright:()=>xr,player_insert_music:()=>Mr,player_play_music:()=>Tr,player_set_mode:()=>Ir,player_set_play:()=>lr,player_set_volume:()=>dr,player_whether_stop:()=>rr,robot_led_extern:()=>Sr,robot_led_extern_get_value:()=>Ar,robot_motor_extern:()=>cr,robot_motor_extern_get_speed:()=>gr,robot_servo_extern_absolute_run:()=>fr,robot_servo_extern_get_status:()=>Lr,robot_servo_extern_relative_continue:()=>vr,robot_servo_extern_relative_origin:()=>Fr,robot_servo_extern_relative_run:()=>Pr,robot_servo_extern_stop:()=>Dr,robot_servo_extern_stop_mode:()=>Nr,robot_traffic_light_extern:()=>Cr,servo_PIN_init:()=>br,servo_get_angle:()=>$u,servo_get_speed:()=>Zu,servo_init:()=>Ju,servo_move:()=>qu,servo_move_angle:()=>Vr,servo_set_angle:()=>Qu,servo_set_speed:()=>ju,servo_speed_360:()=>zu,syn6288_builtin_voice:()=>Er,syn6288_get_voice:()=>mr,syn6288_set_voice:()=>hr,syn6288_tts_play:()=>Or});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>El,actuator_dc_motor_stop:()=>Ol,actuator_get_led_bright:()=>Wr,actuator_get_led_state:()=>Kr,actuator_led_bright:()=>Hr,actuator_led_brightness:()=>Jr,actuator_mixbot_buzzer_on_off:()=>Sl,actuator_mixgo_nova_mic_get:()=>fl,actuator_mixgo_nova_mic_set:()=>Dl,actuator_mixgo_nova_onboard_music_pitch:()=>yl,actuator_mixgo_nova_onboard_music_stop:()=>xl,actuator_mixgo_nova_play_audio:()=>Yl,actuator_mixgo_nova_play_online_audio:()=>Xl,actuator_mixgo_nova_record_audio:()=>vl,actuator_mixgo_nova_voice_get:()=>Pl,actuator_mixgo_nova_voice_set:()=>Fl,actuator_mixgo_zero_led_color:()=>qr,actuator_onboard_neopixel_rgb:()=>tl,actuator_onboard_neopixel_rgb_all:()=>el,actuator_onboard_neopixel_rgb_show_all_chase:()=>nl,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>il,actuator_onboard_neopixel_write:()=>sl,actuator_rm_onboard_neopixel_rgb:()=>_l,actuator_rm_onboard_neopixel_rgb_all:()=>ol,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>pl,actuator_stepper_keep:()=>hl,actuator_stepper_stop:()=>ml,analog_ble_keyboard_init:()=>zl,analog_ble_keyboard_input:()=>$l,analog_ble_keyboard_mouse_init:()=>od,analog_ble_keyboard_mouse_input:()=>rd,analog_ble_keyboard_mouse_send_battery:()=>ud,analog_ble_keyboard_mouse_str:()=>ld,analog_ble_keyboard_send_battery:()=>td,analog_ble_keyboard_str:()=>Zl,analog_ble_mouse_init:()=>ed,analog_ble_mouse_input:()=>sd,analog_ble_mouse_keyboard_input:()=>dd,analog_ble_mouse_send_battery:()=>_d,analog_keyboard_input:()=>Gl,analog_keyboard_str:()=>ql,analog_mouse_input:()=>Kl,bitbot_motor:()=>Nl,bitbot_move:()=>Al,bitbot_stop:()=>Ll,ble_keyboard_connect:()=>jl,ble_keyboard_get_mac:()=>Ql,ble_keyboard_mouse_connect:()=>ad,ble_keyboard_mouse_get_mac:()=>pd,ble_mouse_connect:()=>nd,ble_mouse_get_mac:()=>id,cc_number:()=>Zr,educore_ble_keyboard_input:()=>gd,educore_ble_sensor_connected:()=>cd,educore_ble_sensor_init:()=>Rd,educore_buzzer:()=>Id,educore_buzzer_play_tone:()=>Td,educore_buzzer_play_tone_time:()=>Md,educore_buzzer_stop:()=>hd,educore_neopixel_clear:()=>Od,educore_neopixel_rgb:()=>Ed,educore_rgb_light:()=>md,esp32_music_get_tempo:()=>ul,esp32_music_reset:()=>rl,esp32_music_set_tempo:()=>al,esp32_onboard_music_pitch:()=>ll,esp32_onboard_music_pitch_with_time:()=>dl,esp32_onboard_music_play_list:()=>Tl,esp32_onboard_music_stop:()=>Il,general_key:()=>wl,general_key_tuple:()=>kl,generalkey_container:()=>Hl,generalkey_create_with_item:()=>Wl,get_keyboard_light:()=>Cd,get_power_output:()=>Vl,ledswitch:()=>kr,mixbot_motor:()=>Cl,mixbot_motor_status:()=>Rl,mixbot_move:()=>cl,mixbot_stop:()=>gl,mouse_key:()=>Jl,number:()=>wr,rm_actuator_get_led_bright:()=>Qr,rm_actuator_get_led_state:()=>jr,rm_actuator_led_bright:()=>zr,rm_actuator_led_brightness:()=>$r,rm_motor:()=>Ml,set_all_power_output:()=>Bl,set_power_output:()=>bl,special_key:()=>Ul});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>nI,ai_sensor_ailocal_class:()=>Kd,ai_sensor_ailocal_class_result:()=>Jd,ai_sensor_ailocal_train:()=>Wd,ai_sensor_asr_recognize:()=>$d,ai_sensor_audio_play:()=>zd,ai_sensor_audio_record:()=>qd,ai_sensor_barcode:()=>Pd,ai_sensor_circle:()=>bd,ai_sensor_classifier_faces:()=>iI,ai_sensor_color:()=>Ud,ai_sensor_color_chases:()=>Hd,ai_sensor_color_chases_result:()=>kd,ai_sensor_config:()=>fd,ai_sensor_face:()=>eI,ai_sensor_find_20objects:()=>sI,ai_sensor_find_barcodes:()=>vd,ai_sensor_find_circles:()=>Vd,ai_sensor_find_colors:()=>wd,ai_sensor_find_licenseplates:()=>tI,ai_sensor_find_lines:()=>xd,ai_sensor_find_qrcodes:()=>Dd,ai_sensor_find_rects:()=>Gd,ai_sensor_find_tags:()=>Xd,ai_sensor_licenseplate:()=>Zd,ai_sensor_line:()=>yd,ai_sensor_qrcode:()=>Ld,ai_sensor_qrcode_lite:()=>Nd,ai_sensor_rect:()=>Bd,ai_sensor_rgb:()=>Fd,ai_sensor_tag:()=>Yd,ai_sensor_use_uart_init:()=>Ad,ai_sensor_yolo_recognize:()=>Qd,ai_sensor_yolo_recognize_result:()=>jd});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>pI,MICROPYTHON_AI_Speech_unit:()=>oI,MICROPYTHON_AI_client:()=>_I});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>gI,mpython_blynk_app_notify:()=>MI,mpython_blynk_email:()=>EI,mpython_blynk_get_timers:()=>OI,mpython_blynk_on_connected:()=>dI,mpython_blynk_on_disconnected:()=>lI,mpython_blynk_run:()=>TI,mpython_blynk_sensor_data_to_app:()=>cI,mpython_blynk_set_property:()=>mI,mpython_blynk_setup:()=>CI,mpython_blynk_stop_timers:()=>hI,mpython_blynk_sync_virtual:()=>rI,mpython_blynk_terminal_widget_vpin:()=>uI,mpython_blynktimer:()=>RI,mpython_blynktimer_run:()=>II});var v={};t.r(v),t.d(v,{cc_g1_init:()=>SI,cc_g1_read_bat:()=>AI,cc_g1_read_joystick:()=>LI,cc_g1_read_key:()=>NI,cc_g1_turnoff:()=>DI});var Y={};t.r(Y),t.d(Y,{ce_go_dc_motor:()=>bI,ce_go_get_led_bright:()=>vI,ce_go_get_led_state:()=>YI,ce_go_hall_attachInterrupt:()=>VI,ce_go_hall_data:()=>GI,ce_go_hall_initialize:()=>BI,ce_go_led_bright:()=>PI,ce_go_led_brightness:()=>XI,ce_go_light_number:()=>FI,ce_go_pin_light:()=>WI,ce_go_pin_near:()=>wI,ce_go_pin_near_line:()=>UI,ce_go_pin_near_state_change:()=>kI,ce_go_stepper_keep:()=>yI,ce_go_stepper_stop:()=>xI,educore_car:()=>KI,educore_car_pin_near:()=>QI,educore_car_pin_near_line:()=>zI,educore_car_stepper_keep:()=>JI,educore_car_stepper_stop:()=>qI,sensor_mixgome_eulerangles:()=>HI});var X={};t.r(X),t.d(X,{communicate_bluetooth_central_init:()=>vT,communicate_bluetooth_connect:()=>xT,communicate_bluetooth_disconnect:()=>bT,communicate_bluetooth_handle:()=>wT,communicate_bluetooth_is_connected:()=>BT,communicate_bluetooth_mac:()=>yT,communicate_bluetooth_peripheral_init:()=>YT,communicate_bluetooth_recv:()=>GT,communicate_bluetooth_recv_only:()=>UT,communicate_bluetooth_scan:()=>XT,communicate_bluetooth_send:()=>VT,communicate_espnow_init:()=>kT,communicate_espnow_init_new:()=>HT,communicate_i2c_available:()=>TT,communicate_i2c_init:()=>tT,communicate_i2c_master_read:()=>IT,communicate_i2c_onboard:()=>$I,communicate_i2c_read:()=>eT,communicate_i2c_scan:()=>nT,communicate_i2c_write:()=>iT,communicate_ir_recv_init:()=>gT,communicate_ir_send_init:()=>NT,communicate_ow_init:()=>hT,communicate_ow_read:()=>ET,communicate_ow_reset:()=>cT,communicate_ow_scan:()=>mT,communicate_ow_select:()=>RT,communicate_ow_write:()=>OT,communicate_spi_buffer:()=>oT,communicate_spi_init:()=>sT,communicate_spi_onboard:()=>ZI,communicate_spi_read:()=>pT,communicate_spi_read_output:()=>aT,communicate_spi_readinto:()=>uT,communicate_spi_readinto_output:()=>rT,communicate_spi_set:()=>_T,communicate_spi_write:()=>lT,communicate_spi_write_readinto:()=>dT,espnow_radio_channel:()=>QT,espnow_radio_channel_new:()=>$T,espnow_radio_on_off:()=>ZT,espnow_radio_rec:()=>eM,espnow_radio_recv:()=>nM,espnow_radio_recv_certain_msg:()=>sM,espnow_radio_recv_certain_msg_new:()=>oM,espnow_radio_recv_msg:()=>iM,espnow_radio_recv_new:()=>_M,espnow_radio_send:()=>tM,espnow_radio_txpower:()=>jT,i2c_available:()=>DM,i2c_init:()=>TM,i2c_master_reader2:()=>NM,i2c_read:()=>MM,i2c_scan:()=>mM,i2c_slave_onreceive:()=>MT,i2c_write:()=>hM,internal_variable:()=>CT,ir_recv_timeout:()=>LT,ir_transmit_busy:()=>PT,ir_transmit_conventional_data:()=>DT,ir_transmit_raw_code:()=>FT,ir_transmit_study_code:()=>fT,ir_whether_recv:()=>AT,lora_init:()=>pM,lora_packet:()=>aM,lora_recv:()=>rM,lora_send:()=>uM,network_espnow_info:()=>KT,network_espnow_mac:()=>WT,network_espnow_recv:()=>JT,network_espnow_recv_handle:()=>zT,network_espnow_send:()=>qT,recv_fun:()=>ST,spi_buffer:()=>RM,spi_init:()=>EM,spi_read:()=>cM,spi_read_output:()=>gM,spi_readinto:()=>CM,spi_readinto_output:()=>SM,spi_set:()=>OM,spi_write:()=>AM,spi_write_readinto:()=>LM,urequests_attribute:()=>dM,urequests_get:()=>lM,urequests_method:()=>IM});var y={};t.r(y),t.d(y,{display_animate:()=>oh,display_blink_rate:()=>ih,display_circle:()=>ph,display_color_seclet:()=>Oh,display_draw_4strings:()=>QM,display_fill:()=>_h,display_get_screen_image:()=>eh,display_help:()=>uh,display_image_size:()=>jM,display_lcd_use_i2c_init:()=>Ah,display_line:()=>ZM,display_line_arbitrarily:()=>th,display_matrix_extern_bright_point:()=>wM,display_matrix_extern_bright_screen:()=>HM,display_matrix_extern_clear:()=>WM,display_matrix_extern_get_pixel:()=>UM,display_matrix_extern_get_screen_pixel:()=>kM,display_matrix_extern_image_builtins:()=>KM,display_matrix_extern_scroll_string:()=>xM,display_matrix_extern_scroll_string_delay:()=>bM,display_matrix_extern_shift:()=>GM,display_matrix_extern_show_frame_string:()=>VM,display_matrix_extern_show_frame_string_delay:()=>BM,display_matrix_extern_show_image:()=>XM,display_matrix_extern_show_image_or_string_delay:()=>yM,display_matrix_use_i2c_init:()=>YM,display_oled_drawPixel:()=>lh,display_oled_showBitmap:()=>rh,display_oled_use_i2c_init:()=>Fh,display_onoff:()=>sh,display_rect:()=>$M,display_rgb_color:()=>nh,display_tm1650_power:()=>Ih,display_tm1650_set_brightness:()=>hh,display_tm1650_show_dot:()=>Mh,display_tm1650_show_num:()=>Th,display_tm_use_i2c_init:()=>dh,display_triangle:()=>ah,display_use_i2c_init:()=>zM,extern_oled_bright_point:()=>Uh,extern_oled_clear:()=>wh,extern_oled_get_pixel:()=>Gh,extern_oled_hvline:()=>Hh,extern_oled_line:()=>Wh,extern_oled_scroll_string:()=>yh,extern_oled_scroll_string_delay:()=>xh,extern_oled_shape_rect:()=>kh,extern_oled_shift:()=>Bh,extern_oled_show_frame_string:()=>bh,extern_oled_show_frame_string_delay:()=>Vh,extern_oled_show_image:()=>Ph,extern_oled_show_image_or_string_delay:()=>Xh,extern_oled_show_image_xy:()=>vh,extern_oled_show_string:()=>Yh,lcd_backlight:()=>Dh,lcd_clear:()=>fh,lcd_print_string:()=>Nh,lcd_show_image_or_string_delay:()=>Lh,matrix_extern_image_arithmetic:()=>JM,matrix_extern_image_invert:()=>qM,tft_fill:()=>Ch,tft_line_arbitrarily:()=>Sh,tft_scroll_string_delay:()=>ch,tft_show_frame_string_delay:()=>gh,tft_show_image_or_string_delay:()=>Rh,tft_show_image_xy:()=>Eh,tft_use_spi_init:()=>mh});var x={};t.r(x),t.d(x,{bitbot_display_bitmap_create:()=>Vm,bitbot_display_image_create:()=>bm,display_available:()=>dm,display_bitmap_create:()=>em,display_bright_point:()=>am,display_bright_screen:()=>rm,display_clear:()=>lm,display_get_pixel:()=>pm,display_get_screen_pixel:()=>um,display_image_builtins:()=>im,display_image_builtins_all:()=>nm,display_image_create:()=>tm,display_scroll_string:()=>zh,display_scroll_string_delay:()=>Qh,display_shift:()=>om,display_show_frame_string:()=>$h,display_show_frame_string_delay:()=>Zh,display_show_image:()=>Jh,display_show_image_or_string_delay:()=>qh,draw_pointer:()=>eE,image_arithmetic:()=>sm,image_invert:()=>_m,mixbot_display_bitmap_create:()=>vm,mixbot_display_bright_screen:()=>ym,mixbot_display_get_ambientbright:()=>Xm,mixbot_display_get_screen_pixel:()=>Ym,mixbot_display_image_create:()=>Pm,mixbot_display_rotate:()=>xm,mixgo_display_bitmap_create:()=>Em,mixgo_display_image_create_new:()=>mm,mixgome_display_bitmap_create:()=>Tm,mixgome_display_font:()=>Om,mixgome_display_image_create:()=>Im,mixgomini_display_bitmap_create:()=>hm,mixgomini_display_image_create:()=>Mm,mpython_display_hvline:()=>Dm,mpython_display_line:()=>fm,mpython_display_shape_rect:()=>Nm,mpython_pbm_image:()=>Fm,nova_draw_pointer:()=>iE,onboard_oled_bright_point:()=>Lm,onboard_oled_scroll_string_delay:()=>Sm,onboard_oled_show_frame_string_delay:()=>Am,onboard_oled_show_image:()=>Rm,onboard_oled_show_image_or_string_delay:()=>Cm,onboard_oled_show_image_xy:()=>cm,onboard_oled_show_string:()=>gm,onboard_tft_bright_point:()=>Jm,onboard_tft_bright_screen:()=>uE,onboard_tft_clear:()=>rE,onboard_tft_clock_clear:()=>Zm,onboard_tft_clock_draw:()=>$m,onboard_tft_clock_get_rtctime:()=>Qm,onboard_tft_clock_init:()=>zm,onboard_tft_clock_set_time:()=>jm,onboard_tft_display_hvline:()=>Hm,onboard_tft_display_line:()=>Wm,onboard_tft_display_shape_circle:()=>tE,onboard_tft_display_shape_rect:()=>km,onboard_tft_fill:()=>qm,onboard_tft_get_pixel:()=>Km,onboard_tft_get_screen_pixel:()=>aE,onboard_tft_scroll_string:()=>_E,onboard_tft_scroll_string_delay:()=>jh,onboard_tft_shift:()=>pE,onboard_tft_show_frame_string:()=>oE,onboard_tft_show_frame_string_delay:()=>wm,onboard_tft_show_image:()=>sE,onboard_tft_show_image_or_string_delay:()=>Um,onboard_tft_show_image_xy:()=>Bm,onboard_tft_show_image_xy_direct:()=>Gm,onboard_tft_show_texts:()=>nE});var b={};t.r(b),t.d(b,{factory_block:()=>DE,factory_block_return:()=>fE,factory_block_return_with_textarea:()=>PE,factory_block_with_textarea:()=>FE,factory_callMethod_noreturn:()=>LE,factory_callMethod_return:()=>NE,factory_create_with_container:()=>gE,factory_create_with_item:()=>CE,factory_declare:()=>AE,factory_from_import:()=>OE,factory_function_noreturn:()=>cE,factory_function_return:()=>SE,factory_import:()=>RE,folding_block:()=>vE});var V={};t.r(V),t.d(V,{controls_pin_attachInterrupt:()=>tO,inout_analog_atten:()=>wE,inout_analog_read:()=>UE,inout_analog_read_init:()=>qE,inout_analog_write:()=>VE,inout_analog_write_init:()=>JE,inout_analog_write_set:()=>BE,inout_analog_write_set_freq:()=>jE,inout_digital_init:()=>WE,inout_digital_read:()=>xE,inout_digital_write:()=>yE,inout_highlow:()=>XE,inout_pinMode:()=>QE,inout_pin_attachInterrupt:()=>HE,inout_pin_pressed:()=>kE,inout_pin_pressed_init:()=>zE,inout_pwm_analog_write:()=>bE,inout_pwm_analog_write_init:()=>KE,inout_pwm_analog_write_set_freq:()=>GE,pin_pressed:()=>ZE,pin_pressed_init:()=>$E});var B={};t.r(B),t.d(B,{IOT_CONNECT_OLLAMA:()=>bO,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>SO,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>CO,IOT_EMQX_PING:()=>cO,IOT_FORMATTING:()=>OO,IOT_FORMAT_STRING:()=>RO,IOT_MIXIO_NTP:()=>gO,IOT_MIXIO_PUBLISH:()=>dO,IOT_MIXIO_SUBSCRIBE:()=>IO,iot_checkonenet:()=>XO,iot_client_onboard:()=>LO,iot_connect_ollama:()=>xO,iot_connect_openai:()=>VO,iot_create_with_item:()=>rO,iot_http_client:()=>NO,iot_http_data:()=>DO,iot_mixio_check:()=>hO,iot_mixio_connect:()=>lO,iot_mixio_connect_only:()=>MO,iot_mixio_disconnect:()=>TO,iot_mixio_format_msg:()=>EO,iot_mixio_format_topic:()=>mO,iot_mixly_key:()=>AO,iot_mqtt_client:()=>fO,iot_mqtt_data:()=>FO,iot_onenet_check:()=>_O,iot_onenet_connect:()=>nO,iot_onenet_disconnect:()=>sO,iot_onenet_publish:()=>pO,iot_onenet_publish_dict:()=>oO,iot_onenetconnect:()=>vO,iot_onenetdisconnect:()=>YO,iot_publish:()=>yO,iot_publish_container:()=>aO,iot_publish_item:()=>uO,iot_wifi_connect:()=>iO,iot_wificonnect:()=>PO,ollama_empty_history:()=>UO,use_ollama_llm_to_chat:()=>BO,use_ollama_llm_to_chat_return:()=>GO});var G={};t.r(G),t.d(G,{educore_mqtt_connect:()=>RR,educore_mqtt_connect_success:()=>SR,educore_mqtt_subscribe_message:()=>cR,educore_mqtt_topic_publish:()=>CR,educore_mqtt_topic_subscribe:()=>gR,educore_wifi_connect:()=>OR,network_ap_connect:()=>$O,network_connect:()=>JO,network_get_connect:()=>zO,network_get_wifi:()=>jO,network_init:()=>kO,network_is_active:()=>WO,network_open:()=>HO,network_scan:()=>KO,network_server:()=>ZO,network_socket_accept:()=>sR,network_socket_bind:()=>eR,network_socket_close:()=>uR,network_socket_connect:()=>iR,network_socket_init:()=>tR,network_socket_listen:()=>nR,network_socket_receive:()=>_R,network_socket_receive_from:()=>pR,network_socket_send:()=>oR,network_socket_send_to:()=>aR,network_stop:()=>QO,network_wifi_connect:()=>qO,ntptime_address:()=>TR,ntptime_time:()=>IR,requests_attribute:()=>lR,requests_attribute2:()=>ER,requests_get:()=>rR,requests_get2:()=>hR,requests_method:()=>dR,requests_post:()=>mR});var U={};t.r(U),t.d(U,{pe_g1_battery_left:()=>NR,pe_g1_dc_motor:()=>DR,pe_g1_dc_motor_speed:()=>fR,pe_g1_servo_get_angle:()=>vR,pe_g1_servo_get_speed:()=>YR,pe_g1_servo_set_angle:()=>FR,pe_g1_servo_set_speed:()=>PR,pe_g1_use_i2c_init:()=>LR});var w={};t.r(w),t.d(w,{CI130X_BROADCAST:()=>sc,CI130X_GET_THE_RECOGNIZED_CMD:()=>nc,CI130X_GET_WHETHER_IDENTIFY:()=>ic,CI130X_IDENTIFY_AND_SAVE:()=>ec,CI130X_SET_SYSTEM_CMD:()=>_c,HCSR04:()=>Jc,PS2_Button:()=>jc,PS2_Buttons:()=>Zc,PS2_Buttons_new:()=>ng,PS2_State:()=>$c,PS2_init:()=>qc,PS2_init_new:()=>eg,PS2_stk:()=>tg,PS2_stk_new:()=>sg,PS2_vibration:()=>Qc,PS2_vibration_new:()=>ig,camera_sensor_init:()=>Xg,camera_sensor_result:()=>yg,column_tube_foot:()=>Gg,define_keyboards:()=>Ug,educore_body_sensor:()=>Sg,educore_button_sensor_extern:()=>Dg,educore_camera_sensor:()=>Yg,educore_infrared_sensor:()=>Ng,educore_soilhum_sensor:()=>Ag,educore_temp_sensor:()=>vg,educore_temphum_sensor:()=>Lg,educore_ultrasonic_sensor:()=>Fg,esp32_s2_weather_init:()=>kc,esp32_s2_weather_rain:()=>Wc,esp32_s2_weather_wd:()=>Hc,esp32_s2_weather_ws:()=>Kc,extern_rfid_read:()=>fc,extern_rfid_readcontent:()=>Pc,extern_rfid_readid:()=>Fc,extern_rfid_status:()=>Xc,extern_rfid_write:()=>vc,extern_rfid_write_return:()=>Yc,get_keboards_value:()=>wg,gnss_get_data:()=>ag,gnss_have_data:()=>pg,init_matrix_keyboard:()=>Vg,interaction_whether_to_interaction:()=>ZR,interaction_whether_to_interaction_SANT:()=>tc,line_tube_foot:()=>Bg,mixbot_sensor_extern_get_addr:()=>hg,mixbot_sensor_extern_set_addr:()=>mg,pm25_get_data:()=>og,radar_set_DETECTION_THRESHOLD:()=>jR,radar_set_DETECTION_THRESHOLD_SANT:()=>$R,robot_button_extern_get_value:()=>rg,robot_color_extern_get_value:()=>Mg,robot_infrared_extern_get_value:()=>dg,robot_infrared_extern_grey_get_value:()=>Ig,robot_potentiometer_extern_get_value:()=>Tg,robot_sonar_extern_get_value:()=>Eg,robot_sonar_extern_led:()=>Og,robot_touch_extern_get_value:()=>lg,sensor_APDS9960_extern:()=>pc,sensor_DS18X20:()=>qR,sensor_LTR308_extern:()=>ac,sensor_LTR390UV_extern:()=>lc,sensor_MAX30102_extern:()=>oc,sensor_QMC5883L_extern:()=>Oc,sensor_VL530LX_extern:()=>dc,sensor_adxl345_get_acceleration:()=>GR,sensor_aht11_extern:()=>Tc,sensor_bmp:()=>KR,sensor_compass_reset:()=>Nc,sensor_dht11:()=>wR,sensor_hp203_extern:()=>Mc,sensor_light_level:()=>UR,sensor_lm35:()=>zR,sensor_ltr381_extern:()=>uc,sensor_mixgo_extern_button_attachInterrupt:()=>VR,sensor_mixgo_extern_button_get_presses:()=>bR,sensor_mixgo_extern_button_is_pressed:()=>yR,sensor_mixgo_extern_button_was_pressed:()=>xR,sensor_mixgo_extern_light:()=>kR,sensor_mixgo_extern_pin_near:()=>WR,sensor_mixgo_extern_sound:()=>HR,sensor_mixgoce_hot_wheel_degrees:()=>wc,sensor_mixgoce_hot_wheel_is_touched:()=>Uc,sensor_mpu9250_attachGestureInterrupt:()=>BR,sensor_mpu9250_calibrate_compass:()=>Sc,sensor_mpu9250_field_strength:()=>Lc,sensor_mpu9250_gesture:()=>Rc,sensor_mpu9250_get_acceleration:()=>cc,sensor_mpu9250_get_gyro:()=>Cc,sensor_mpu9250_get_magnetic:()=>gc,sensor_mpu9250_temperature:()=>Ac,sensor_ms5611_extern:()=>mc,sensor_ms5611_extern_altitude:()=>Ec,sensor_read_humiture:()=>fg,sensor_sht:()=>JR,sensor_shtc3_extern:()=>Ic,sensor_spl06_001_extern:()=>hc,sensor_ucs12071_extern:()=>rc,sensor_use_i2c_init:()=>QR,sensor_use_spi_init:()=>Dc,sensor_use_uart_init:()=>_g,sensor_weather_solo_init:()=>Rg,sensor_weather_solo_rain:()=>Cg,sensor_weather_solo_wd:()=>cg,sensor_weather_solo_ws:()=>gg,sensor_weigh_init:()=>xg,tvoc_get_data:()=>ug,ultrasonic_sensor_read_distance:()=>Pg,weather_data:()=>yc,weather_have_data:()=>xc,weather_set_label:()=>Vc,weather_set_label_container:()=>Bc,weather_set_label_item:()=>Gc,weather_uart_mixio:()=>bc,weigh_sensor_get_weight:()=>bg});var k={};t.r(k),t.d(k,{HCSR04:()=>_C,RTC_set_date:()=>sC,RTC_set_time:()=>nC,bitbot_als_num:()=>TS,dht11:()=>cS,educore_button_sensor:()=>FS,educore_button_was_pressed:()=>PS,educore_gyroscope_sensor:()=>NS,educore_gyroscope_sensor_read:()=>DS,educore_gyroscope_sensor_shake:()=>fS,educore_light_sensor:()=>LS,educore_rfid_sensor:()=>vS,educore_rfid_sensor_scan:()=>YS,educore_rfid_sensor_scan_data:()=>XS,educore_voice_sensor:()=>SS,number1:()=>pC,number2:()=>aC,number3:()=>uC,number4:()=>rC,number5:()=>lC,number6:()=>dC,number7:()=>IC,onboard_RTC_get_time:()=>cC,onboard_RTC_get_time_str:()=>NC,onboard_RTC_get_timestamp:()=>gC,onboard_RTC_get_timetuple_to_str:()=>DC,onboard_RTC_set_datetime:()=>AC,onboard_RTC_settime_string:()=>SC,onboard_RTC_timestamp_totuple:()=>CC,rfid_readcontent:()=>yC,rfid_readid:()=>XC,rfid_status:()=>VC,rfid_write:()=>xC,rfid_write_return:()=>bC,sensor_LTR308:()=>fC,sensor_aht11:()=>PC,sensor_bitbot_ALS:()=>IS,sensor_button_get_presses:()=>mS,sensor_button_is_pressed:()=>MS,sensor_button_was_pressed:()=>hS,sensor_distance_hrsc04:()=>iC,sensor_eulerangles:()=>GC,sensor_field_strength:()=>gS,sensor_get_acceleration:()=>BC,sensor_get_temperature:()=>vC,sensor_get_the_coprocessor_version:()=>yS,sensor_hp203:()=>YC,sensor_light:()=>RS,sensor_mixbot_get_gyro:()=>dS,sensor_mixbot_patrol_calibrate:()=>uS,sensor_mixbot_patrol_value:()=>rS,sensor_mixbot_temperature:()=>lS,sensor_mixgo_LTR308:()=>OC,sensor_mixgo_button_attachInterrupt:()=>Jg,sensor_mixgo_button_get_presses:()=>Kg,sensor_mixgo_button_is_pressed:()=>Hg,sensor_mixgo_button_was_pressed:()=>Wg,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>jC,sensor_mixgo_cc_mmc5603_get_angle:()=>QC,sensor_mixgo_cc_mmc5603_get_magnetic:()=>zC,sensor_mixgo_light:()=>oC,sensor_mixgo_nova_LTR308:()=>EC,sensor_mixgo_nova_pin_near:()=>mC,sensor_mixgo_pin_near:()=>hC,sensor_mixgo_pin_near_double:()=>MC,sensor_mixgo_pin_near_single:()=>TC,sensor_mixgo_pin_pressed:()=>$g,sensor_mixgo_sant_color:()=>RC,sensor_mixgo_touch_slide:()=>eC,sensor_mixgocar42_button_attachInterrupt:()=>jg,sensor_mixgocar42_button_get_presses:()=>Qg,sensor_mixgocar42_button_is_pressed:()=>qg,sensor_mixgocar42_button_was_pressed:()=>zg,sensor_mixgocar_battery_left:()=>aS,sensor_mixgocar_pin_near:()=>oS,sensor_mixgocar_pin_near_line:()=>_S,sensor_mixgocar_pin_near_state_change:()=>pS,sensor_mixgoce_pin_pressed:()=>Zg,sensor_mixgoce_temperature:()=>ZC,sensor_mixgome_temperature:()=>$C,sensor_mpython_pin_pressed:()=>tC,sensor_mpython_qmi8658_get_gyro:()=>tS,sensor_mpython_qmi8658_temperature:()=>eS,sensor_onboard_compass_reset:()=>qC,sensor_onboard_mpu9250_calibrate_compass:()=>WC,sensor_onboard_mpu9250_field_strength:()=>JC,sensor_onboard_mpu9250_gesture:()=>UC,sensor_onboard_mpu9250_get_acceleration:()=>wC,sensor_onboard_mpu9250_get_gyro:()=>HC,sensor_onboard_mpu9250_get_magnetic:()=>kC,sensor_onboard_mpu9250_temperature:()=>KC,sensor_pin_near:()=>OS,sensor_pin_pressed:()=>ES,sensor_read:()=>AS,sensor_rm_acc:()=>sS,sensor_rm_battery_left:()=>nS,sensor_rm_pin_near_double:()=>iS,sensor_rtc_init:()=>LC,sensor_sound:()=>FC,sensor_temperature:()=>CS});var H={};t.r(H),t.d(H,{serial_any:()=>WS,serial_begin:()=>QS,serial_print:()=>GS,serial_print_byte:()=>BS,serial_print_hex:()=>wS,serial_println:()=>US,serial_read_from_ai:()=>_A,serial_readline:()=>KS,serial_readstr:()=>HS,serial_readstr_until:()=>JS,serial_receive_data_event:()=>kS,serial_send_to_ai:()=>sA,serial_softserial:()=>zS,serial_softserial_new:()=>qS,system_input:()=>jS,system_print:()=>$S,system_print_container:()=>iA,system_print_end:()=>tA,system_print_inline:()=>ZS,system_print_item:()=>nA,system_print_many:()=>eA});var W={};t.r(W),t.d(W,{Panic_with_status_code:()=>uA,Timer_init:()=>gA,base_delay:()=>AA,controls_delay:()=>aA,controls_delay_new:()=>pA,controls_millis:()=>lA,controls_uname:()=>IA,raw_block:()=>dA,reset:()=>rA,system_bitbot_shutdown:()=>cA,system_machine_reset:()=>RA,system_ticks_diff:()=>hA,system_timer:()=>MA,system_timer_init:()=>mA,system_wdt_feed:()=>OA,system_wdt_init:()=>EA,time_ticks_diff:()=>SA,timer:()=>TA,timer2:()=>CA});var K={};t.r(K),t.d(K,{Air_daily_content:()=>BA,Air_now_content:()=>vA,Geo_moon_content:()=>UA,Geo_sun_content:()=>GA,Life_suggestion_content:()=>XA,Location_search_content:()=>xA,Tide_daily_content:()=>yA,WEATHER_DAILY:()=>DA,WEATHER_HOUR:()=>fA,WEATHER_NOW:()=>NA,Weather_alarm_content:()=>YA,Weather_daily:()=>bA,Weather_daily_content:()=>VA,Weather_now:()=>FA,Weather_now_content:()=>PA});var J={};t.r(J),t.d(J,{PIN_init:()=>UL,actuator_extern_get_led_bright:()=>pL,actuator_extern_get_led_state:()=>aL,actuator_extern_led_bright:()=>oL,actuator_extern_led_brightness:()=>uL,actuator_ms32006_dcmotor:()=>zA,actuator_ms32006_init:()=>qA,actuator_ms32006_stepper:()=>QA,actuator_neopixel_init:()=>rL,actuator_neopixel_rgb:()=>IL,actuator_neopixel_rgb_all:()=>lL,actuator_neopixel_rgb_show_all_chase:()=>TL,actuator_neopixel_rgb_show_all_rainbow:()=>ML,actuator_neopixel_write:()=>dL,actuator_use_uart_init:()=>hL,esp32_music_get_tempo_extern:()=>iL,esp32_music_pitch:()=>$A,esp32_music_pitch_init:()=>jA,esp32_music_pitch_with_time:()=>ZA,esp32_music_play_list:()=>nL,esp32_music_reset_extern:()=>sL,esp32_music_set_tempo_extern:()=>eL,esp32_music_stop:()=>tL,mixbot_actuator_extern_get_addr:()=>BL,mixbot_actuator_extern_set_addr:()=>GL,mixbot_addr_extern:()=>LL,parrot_PIN_init:()=>WL,parrot_move_speed:()=>KL,pin_led_bright:()=>wL,player_play_music:()=>cL,player_set_mode:()=>RL,player_set_play:()=>EL,player_set_volume:()=>OL,player_whether_stop:()=>mL,robot_led_extern:()=>FL,robot_led_extern_get_value:()=>PL,robot_motor_extern:()=>NL,robot_motor_extern_get_speed:()=>DL,robot_servo_extern_absolute_run:()=>yL,robot_servo_extern_get_status:()=>vL,robot_servo_extern_relative_continue:()=>VL,robot_servo_extern_relative_origin:()=>xL,robot_servo_extern_relative_run:()=>bL,robot_servo_extern_stop:()=>XL,robot_servo_extern_stop_mode:()=>YL,robot_traffic_light_extern:()=>fL,servo_PIN_init:()=>kL,servo_get_angle:()=>KA,servo_get_speed:()=>JA,servo_init:()=>wA,servo_move:()=>_L,servo_move_angle:()=>HL,servo_set_angle:()=>HA,servo_set_speed:()=>WA,servo_speed_360:()=>kA,syn6288_builtin_voice:()=>SL,syn6288_get_voice:()=>CL,syn6288_set_voice:()=>gL,syn6288_tts_play:()=>AL});var q={};t.r(q),t.d(q,{actuator_dc_motor:()=>RN,actuator_dc_motor_stop:()=>cN,actuator_get_led_bright:()=>nN,actuator_get_led_state:()=>sN,actuator_led_bright:()=>iN,actuator_led_brightness:()=>_N,actuator_mixbot_buzzer_on_off:()=>LN,actuator_mixgo_nova_mic_get:()=>PN,actuator_mixgo_nova_mic_set:()=>FN,actuator_mixgo_nova_onboard_music_pitch:()=>bN,actuator_mixgo_nova_onboard_music_stop:()=>VN,actuator_mixgo_nova_play_audio:()=>yN,actuator_mixgo_nova_play_online_audio:()=>xN,actuator_mixgo_nova_record_audio:()=>XN,actuator_mixgo_nova_voice_get:()=>YN,actuator_mixgo_nova_voice_set:()=>vN,actuator_mixgo_zero_led_color:()=>oN,actuator_onboard_neopixel_rgb:()=>IN,actuator_onboard_neopixel_rgb_all:()=>TN,actuator_onboard_neopixel_rgb_show_all_chase:()=>MN,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>hN,actuator_onboard_neopixel_write:()=>dN,actuator_stepper_keep:()=>EN,actuator_stepper_stop:()=>ON,analog_ble_keyboard_init:()=>zN,analog_ble_keyboard_input:()=>$N,analog_ble_keyboard_mouse_init:()=>oD,analog_ble_keyboard_mouse_input:()=>rD,analog_ble_keyboard_mouse_send_battery:()=>uD,analog_ble_keyboard_mouse_str:()=>lD,analog_ble_keyboard_send_battery:()=>tD,analog_ble_keyboard_str:()=>ZN,analog_ble_mouse_init:()=>eD,analog_ble_mouse_input:()=>sD,analog_ble_mouse_keyboard_input:()=>dD,analog_ble_mouse_send_battery:()=>_D,analog_keyboard_input:()=>wN,analog_keyboard_str:()=>JN,analog_mouse_input:()=>WN,bitbot_motor:()=>fN,bitbot_move:()=>NN,bitbot_stop:()=>DN,ble_keyboard_connect:()=>jN,ble_keyboard_get_mac:()=>QN,ble_keyboard_mouse_connect:()=>aD,ble_keyboard_mouse_get_mac:()=>pD,ble_mouse_connect:()=>nD,ble_mouse_get_mac:()=>iD,cc_number:()=>pN,educore_ble_keyboard_input:()=>gD,educore_ble_sensor_connected:()=>cD,educore_ble_sensor_init:()=>RD,educore_buzzer:()=>ID,educore_buzzer_play_tone:()=>TD,educore_buzzer_play_tone_time:()=>MD,educore_buzzer_stop:()=>hD,educore_neopixel_clear:()=>OD,educore_neopixel_rgb:()=>ED,educore_rgb_light:()=>mD,esp32_music_get_tempo:()=>qL,esp32_music_reset:()=>ZL,esp32_music_set_tempo:()=>JL,esp32_onboard_music_pitch:()=>zL,esp32_onboard_music_pitch_with_time:()=>QL,esp32_onboard_music_play_list:()=>$L,esp32_onboard_music_stop:()=>jL,general_key:()=>HN,general_key_tuple:()=>qN,get_keyboard_light:()=>CD,get_power_output:()=>GN,ledswitch:()=>eN,mixbot_motor:()=>AN,mixbot_motor_status:()=>gN,mixbot_move:()=>CN,mixbot_stop:()=>SN,mouse_key:()=>KN,number:()=>tN,rm_actuator_get_led_bright:()=>uN,rm_actuator_get_led_state:()=>rN,rm_actuator_led_bright:()=>aN,rm_actuator_led_brightness:()=>lN,rm_motor:()=>mN,set_all_power_output:()=>UN,set_power_output:()=>BN,special_key:()=>kN});var z={};t.r(z),t.d(z,{ai_sensor_20object:()=>nf,ai_sensor_ailocal_class:()=>WD,ai_sensor_ailocal_class_result:()=>KD,ai_sensor_ailocal_train:()=>HD,ai_sensor_asr_recognize:()=>jD,ai_sensor_audio_play:()=>qD,ai_sensor_audio_record:()=>JD,ai_sensor_barcode:()=>FD,ai_sensor_circle:()=>xD,ai_sensor_classifier_faces:()=>ef,ai_sensor_color:()=>GD,ai_sensor_color_chases:()=>kD,ai_sensor_color_chases_result:()=>wD,ai_sensor_config:()=>LD,ai_sensor_face:()=>tf,ai_sensor_find_20objects:()=>sf,ai_sensor_find_barcodes:()=>PD,ai_sensor_find_circles:()=>bD,ai_sensor_find_colors:()=>UD,ai_sensor_find_licenseplates:()=>ZD,ai_sensor_find_lines:()=>yD,ai_sensor_find_qrcodes:()=>fD,ai_sensor_find_rects:()=>BD,ai_sensor_find_tags:()=>YD,ai_sensor_licenseplate:()=>$D,ai_sensor_line:()=>XD,ai_sensor_qrcode:()=>DD,ai_sensor_qrcode_lite:()=>AD,ai_sensor_rect:()=>VD,ai_sensor_rgb:()=>ND,ai_sensor_tag:()=>vD,ai_sensor_use_uart_init:()=>SD,ai_sensor_yolo_recognize:()=>zD,ai_sensor_yolo_recognize_result:()=>QD});var Q={};t.r(Q),t.d(Q,{MICROPYTHON_AI_Speech_asr:()=>pf,MICROPYTHON_AI_Speech_unit:()=>of,MICROPYTHON_AI_client:()=>_f});var j={};t.r(j),t.d(j,{mpython_blynk_app_data:()=>Of,mpython_blynk_app_notify:()=>Tf,mpython_blynk_email:()=>Rf,mpython_blynk_get_timers:()=>hf,mpython_blynk_on_connected:()=>lf,mpython_blynk_on_disconnected:()=>rf,mpython_blynk_run:()=>If,mpython_blynk_sensor_data_to_app:()=>Ef,mpython_blynk_set_property:()=>cf,mpython_blynk_setup:()=>gf,mpython_blynk_stop_timers:()=>Mf,mpython_blynk_sync_virtual:()=>uf,mpython_blynk_terminal_widget_vpin:()=>af,mpython_blynktimer:()=>mf,mpython_blynktimer_run:()=>df});var $={};t.r($),t.d($,{cc_g1_read_bat:()=>Cf,cc_g1_read_joystick:()=>Sf,cc_g1_read_key:()=>Af,cc_g1_turnoff:()=>Lf});var Z={};t.r(Z),t.d(Z,{ce_go_dc_motor:()=>Xf,ce_go_get_led_bright:()=>ff,ce_go_get_led_state:()=>Ff,ce_go_hall_attachInterrupt:()=>yf,ce_go_hall_data:()=>bf,ce_go_hall_initialize:()=>xf,ce_go_led_bright:()=>Df,ce_go_led_brightness:()=>Pf,ce_go_light_number:()=>Nf,ce_go_pin_light:()=>wf,ce_go_pin_near:()=>Bf,ce_go_pin_near_line:()=>Vf,ce_go_pin_near_state_change:()=>Gf,ce_go_stepper_keep:()=>vf,ce_go_stepper_stop:()=>Yf,educore_car:()=>kf,educore_car_pin_near:()=>Jf,educore_car_pin_near_line:()=>Kf,educore_car_stepper_keep:()=>Hf,educore_car_stepper_stop:()=>Wf,sensor_mixgome_eulerangles:()=>Uf});var tt={};t.r(tt),t.d(tt,{communicate_bluetooth_central_init:()=>DF,communicate_bluetooth_connect:()=>PF,communicate_bluetooth_disconnect:()=>vF,communicate_bluetooth_handle:()=>VF,communicate_bluetooth_is_connected:()=>XF,communicate_bluetooth_mac:()=>YF,communicate_bluetooth_peripheral_init:()=>fF,communicate_bluetooth_recv:()=>bF,communicate_bluetooth_recv_only:()=>xF,communicate_bluetooth_scan:()=>FF,communicate_bluetooth_send:()=>yF,communicate_espnow_init:()=>BF,communicate_espnow_init_new:()=>GF,communicate_i2c_available:()=>eF,communicate_i2c_init:()=>Qf,communicate_i2c_master_read:()=>tF,communicate_i2c_onboard:()=>qf,communicate_i2c_read:()=>jf,communicate_i2c_scan:()=>Zf,communicate_i2c_write:()=>$f,communicate_ir_recv_init:()=>EF,communicate_ir_send_init:()=>CF,communicate_ow_init:()=>dF,communicate_ow_read:()=>MF,communicate_ow_reset:()=>TF,communicate_ow_scan:()=>IF,communicate_ow_select:()=>mF,communicate_ow_write:()=>hF,communicate_spi_buffer:()=>_F,communicate_spi_init:()=>nF,communicate_spi_onboard:()=>zf,communicate_spi_read:()=>oF,communicate_spi_read_output:()=>pF,communicate_spi_readinto:()=>aF,communicate_spi_readinto_output:()=>uF,communicate_spi_set:()=>sF,communicate_spi_write:()=>rF,communicate_spi_write_readinto:()=>lF,espnow_radio_channel:()=>KF,espnow_radio_channel_new:()=>qF,espnow_radio_on_off:()=>zF,espnow_radio_rec:()=>jF,espnow_radio_recv:()=>ZF,espnow_radio_recv_certain_msg:()=>tP,espnow_radio_recv_certain_msg_new:()=>iP,espnow_radio_recv_msg:()=>$F,espnow_radio_recv_new:()=>eP,espnow_radio_send:()=>QF,espnow_radio_txpower:()=>JF,i2c_slave_onreceive:()=>iF,internal_variable:()=>OF,ir_recv_timeout:()=>gF,ir_transmit_busy:()=>NF,ir_transmit_conventional_data:()=>SF,ir_transmit_raw_code:()=>LF,ir_transmit_study_code:()=>AF,ir_whether_recv:()=>cF,lora_init:()=>nP,lora_packet:()=>sP,lora_recv:()=>oP,lora_send:()=>_P,network_espnow_info:()=>wF,network_espnow_mac:()=>UF,network_espnow_recv:()=>kF,network_espnow_recv_handle:()=>WF,network_espnow_send:()=>HF,recv_fun:()=>RF,urequests_attribute:()=>aP,urequests_get:()=>pP,urequests_method:()=>uP});var et={};t.r(et),t.d(et,{display_animate:()=>XP,display_circle:()=>yP,display_color_seclet:()=>KP,display_draw_4strings:()=>NP,display_fill:()=>YP,display_lcd_use_i2c_init:()=>$P,display_line:()=>FP,display_line_arbitrarily:()=>DP,display_matrix_extern_bright_point:()=>RP,display_matrix_extern_bright_screen:()=>gP,display_matrix_extern_clear:()=>mP,display_matrix_extern_get_pixel:()=>OP,display_matrix_extern_get_screen_pixel:()=>cP,display_matrix_extern_image_builtins:()=>CP,display_matrix_extern_scroll_string:()=>MP,display_matrix_extern_scroll_string_delay:()=>hP,display_matrix_extern_shift:()=>EP,display_matrix_extern_show_frame_string:()=>IP,display_matrix_extern_show_frame_string_delay:()=>TP,display_matrix_extern_show_image:()=>lP,display_matrix_extern_show_image_or_string_delay:()=>dP,display_matrix_use_i2c_init:()=>rP,display_oled_drawPixel:()=>VP,display_oled_showBitmap:()=>bP,display_oled_use_i2c_init:()=>nv,display_onoff:()=>PP,display_rect:()=>fP,display_tm1650_power:()=>GP,display_tm1650_set_brightness:()=>kP,display_tm1650_show_dot:()=>wP,display_tm1650_show_num:()=>UP,display_tm_use_i2c_init:()=>BP,display_triangle:()=>xP,display_use_i2c_init:()=>LP,extern_oled_bright_point:()=>Mv,extern_oled_clear:()=>dv,extern_oled_get_pixel:()=>Tv,extern_oled_hvline:()=>mv,extern_oled_line:()=>Ev,extern_oled_scroll_string:()=>rv,extern_oled_scroll_string_delay:()=>lv,extern_oled_shape_rect:()=>hv,extern_oled_shift:()=>Iv,extern_oled_show_frame_string:()=>av,extern_oled_show_frame_string_delay:()=>uv,extern_oled_show_image:()=>sv,extern_oled_show_image_or_string_delay:()=>pv,extern_oled_show_image_xy:()=>_v,extern_oled_show_string:()=>ov,image_shift:()=>vP,lcd_backlight:()=>ev,lcd_clear:()=>iv,lcd_print_string:()=>tv,lcd_show_image_or_string_delay:()=>ZP,matrix_extern_image_arithmetic:()=>SP,matrix_extern_image_invert:()=>AP,tft_fill:()=>QP,tft_line_arbitrarily:()=>jP,tft_scroll_string_delay:()=>zP,tft_show_frame_string_delay:()=>qP,tft_show_image_or_string_delay:()=>JP,tft_show_image_xy:()=>WP,tft_use_spi_init:()=>HP});var it={};t.r(it),t.d(it,{bitbot_display_bitmap_create:()=>rY,bitbot_display_image_create:()=>uY,display_available:()=>Pv,display_bitmap_create:()=>fv,display_bright_point:()=>xv,display_bright_screen:()=>Vv,display_clear:()=>Fv,display_get_pixel:()=>yv,display_get_screen_pixel:()=>bv,display_image_builtins:()=>Lv,display_image_builtins_all:()=>Nv,display_image_create:()=>Dv,display_scroll_string:()=>Cv,display_scroll_string_delay:()=>Sv,display_shift:()=>Xv,display_show_frame_string:()=>cv,display_show_frame_string_delay:()=>gv,display_show_image:()=>Ov,display_show_image_or_string_delay:()=>Rv,draw_pointer:()=>NY,image_arithmetic:()=>vv,image_invert:()=>Yv,mixbot_display_bitmap_create:()=>sY,mixbot_display_bright_screen:()=>pY,mixbot_display_get_ambientbright:()=>oY,mixbot_display_get_screen_pixel:()=>_Y,mixbot_display_image_create:()=>nY,mixbot_display_rotate:()=>aY,mixgo_display_bitmap_create:()=>Wv,mixgo_display_image_create_new:()=>Hv,mixgome_display_bitmap_create:()=>Gv,mixgome_display_font:()=>kv,mixgome_display_image_create:()=>Bv,mixgomini_display_bitmap_create:()=>wv,mixgomini_display_image_create:()=>Uv,mpython_display_hvline:()=>eY,mpython_display_line:()=>iY,mpython_display_shape_rect:()=>tY,mpython_pbm_image:()=>Kv,nova_draw_pointer:()=>DY,onboard_oled_bright_point:()=>Zv,onboard_oled_scroll_string_delay:()=>$v,onboard_oled_show_frame_string_delay:()=>jv,onboard_oled_show_image:()=>Jv,onboard_oled_show_image_or_string_delay:()=>Qv,onboard_oled_show_image_xy:()=>qv,onboard_oled_show_string:()=>zv,onboard_tft_bright_point:()=>OY,onboard_tft_bright_screen:()=>XY,onboard_tft_clear:()=>yY,onboard_tft_clock_clear:()=>AY,onboard_tft_clock_draw:()=>SY,onboard_tft_clock_get_rtctime:()=>gY,onboard_tft_clock_init:()=>cY,onboard_tft_clock_set_time:()=>CY,onboard_tft_display_hvline:()=>hY,onboard_tft_display_line:()=>mY,onboard_tft_display_shape_circle:()=>LY,onboard_tft_display_shape_rect:()=>MY,onboard_tft_fill:()=>RY,onboard_tft_get_pixel:()=>EY,onboard_tft_get_screen_pixel:()=>YY,onboard_tft_scroll_string_delay:()=>Av,onboard_tft_shift:()=>vY,onboard_tft_show_frame_string:()=>PY,onboard_tft_show_frame_string_delay:()=>TY,onboard_tft_show_image:()=>FY,onboard_tft_show_image_or_string_delay:()=>IY,onboard_tft_show_image_xy:()=>lY,onboard_tft_show_image_xy_direct:()=>dY,onboard_tft_show_texts:()=>fY});var nt={};t.r(nt),t.d(nt,{factory_block:()=>kY,factory_block_return:()=>HY,factory_block_return_with_textarea:()=>KY,factory_block_with_textarea:()=>WY,factory_callMethod_noreturn:()=>UY,factory_callMethod_return:()=>wY,factory_declare:()=>GY,factory_from_import:()=>xY,factory_function_noreturn:()=>VY,factory_function_return:()=>BY,factory_import:()=>bY,folding_block:()=>JY});var st={};t.r(st),t.d(st,{inout_analog_atten:()=>aX,inout_analog_read:()=>eX,inout_analog_read_init:()=>pX,inout_analog_write:()=>$Y,inout_analog_write_init:()=>oX,inout_analog_write_set:()=>ZY,inout_digital_init:()=>sX,inout_digital_read:()=>QY,inout_digital_write:()=>zY,inout_highlow:()=>qY,inout_pin_attachInterrupt:()=>nX,inout_pin_pressed:()=>iX,inout_pin_pressed_init:()=>uX,inout_pwm_analog_write:()=>jY,inout_pwm_analog_write_init:()=>_X,inout_pwm_analog_write_set_freq:()=>tX});var _t={};t.r(_t),t.d(_t,{IOT_CONNECT_OLLAMA:()=>bX,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>DX,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>LX,IOT_EMQX_PING:()=>fX,IOT_FORMATTING:()=>SX,IOT_FORMAT_STRING:()=>AX,IOT_MIXIO_NTP:()=>FX,IOT_MIXIO_PUBLISH:()=>mX,IOT_MIXIO_SUBSCRIBE:()=>EX,iot_client_onboard:()=>PX,iot_connect_ollama:()=>xX,iot_connect_openai:()=>VX,iot_http_client:()=>vX,iot_http_data:()=>YX,iot_mixio_check:()=>cX,iot_mixio_connect:()=>hX,iot_mixio_connect_only:()=>RX,iot_mixio_disconnect:()=>OX,iot_mixio_format_msg:()=>CX,iot_mixio_format_topic:()=>gX,iot_mixly_key:()=>NX,iot_mqtt_client:()=>XX,iot_mqtt_data:()=>yX,iot_onenet_check:()=>TX,iot_onenet_connect:()=>lX,iot_onenet_disconnect:()=>dX,iot_onenet_publish:()=>MX,iot_onenet_publish_dict:()=>IX,iot_wifi_connect:()=>rX,ollama_empty_history:()=>UX,use_ollama_llm_to_chat:()=>BX,use_ollama_llm_to_chat_return:()=>GX});var ot={};t.r(ot),t.d(ot,{educore_mqtt_connect:()=>Ey,educore_mqtt_connect_success:()=>gy,educore_mqtt_subscribe_message:()=>Oy,educore_mqtt_topic_publish:()=>cy,educore_mqtt_topic_subscribe:()=>Ry,educore_wifi_connect:()=>my,network_ap_connect:()=>QX,network_connect:()=>kX,network_get_connect:()=>WX,network_get_wifi:()=>zX,network_init:()=>wX,network_is_active:()=>qX,network_open:()=>JX,network_scan:()=>jX,network_server:()=>$X,network_socket_accept:()=>ny,network_socket_bind:()=>ty,network_socket_close:()=>ay,network_socket_connect:()=>ey,network_socket_init:()=>ZX,network_socket_listen:()=>iy,network_socket_receive:()=>sy,network_socket_receive_from:()=>oy,network_socket_send:()=>_y,network_socket_send_to:()=>py,network_stop:()=>KX,network_wifi_connect:()=>HX,ntptime_address:()=>Iy,ntptime_time:()=>dy,requests_attribute:()=>ry,requests_attribute2:()=>My,requests_get:()=>uy,requests_get2:()=>Ty,requests_method:()=>ly,requests_post:()=>hy});var pt={};t.r(pt),t.d(pt,{pe_g1_battery_left:()=>Sy,pe_g1_dc_motor:()=>Ay,pe_g1_dc_motor_speed:()=>Ly,pe_g1_servo_get_angle:()=>fy,pe_g1_servo_get_speed:()=>Fy,pe_g1_servo_set_angle:()=>Ny,pe_g1_servo_set_speed:()=>Dy,pe_g1_use_i2c_init:()=>Cy});var at={};t.r(at),t.d(at,{CI130X_BROADCAST:()=>Zy,CI130X_GET_THE_RECOGNIZED_CMD:()=>$y,CI130X_GET_WHETHER_IDENTIFY:()=>jy,CI130X_IDENTIFY_AND_SAVE:()=>Qy,CI130X_SET_SYSTEM_CMD:()=>tx,HCSR04:()=>vx,PS2_Button:()=>yx,PS2_Buttons:()=>xx,PS2_Buttons_new:()=>Hx,PS2_State:()=>bx,PS2_init:()=>Yx,PS2_init_new:()=>wx,PS2_stk:()=>Vx,PS2_stk_new:()=>Wx,PS2_vibration:()=>Xx,PS2_vibration_new:()=>kx,RTC_get_time:()=>Gx,RTC_set_date:()=>Vy,RTC_set_datetime:()=>Bx,RTC_set_time:()=>by,camera_sensor_init:()=>gb,camera_sensor_result:()=>Cb,column_tube_foot:()=>Nb,define_keyboards:()=>Db,educore_body_sensor:()=>db,educore_button_sensor_extern:()=>hb,educore_camera_sensor:()=>cb,educore_infrared_sensor:()=>Mb,educore_soilhum_sensor:()=>Ib,educore_temp_sensor:()=>Rb,educore_temphum_sensor:()=>Tb,educore_ultrasonic_sensor:()=>Eb,esp32_s2_weather_init:()=>Dx,esp32_s2_weather_rain:()=>Fx,esp32_s2_weather_wd:()=>fx,esp32_s2_weather_ws:()=>Px,extern_rfid_read:()=>hx,extern_rfid_readcontent:()=>Ex,extern_rfid_readid:()=>mx,extern_rfid_status:()=>cx,extern_rfid_write:()=>Ox,extern_rfid_write_return:()=>Rx,get_keboards_value:()=>Fb,gnss_get_data:()=>qx,gnss_have_data:()=>zx,init_matrix_keyboard:()=>fb,interaction_whether_to_interaction:()=>qy,interaction_whether_to_interaction_SANT:()=>zy,line_tube_foot:()=>Lb,mixbot_sensor_extern_get_addr:()=>_b,mixbot_sensor_extern_set_addr:()=>ob,pm25_get_data:()=>Jx,radar_set_DETECTION_THRESHOLD:()=>Ky,radar_set_DETECTION_THRESHOLD_SANT:()=>Jy,robot_button_extern_get_value:()=>jx,robot_color_extern_get_value:()=>ib,robot_infrared_extern_get_value:()=>Zx,robot_infrared_extern_grey_get_value:()=>tb,robot_potentiometer_extern_get_value:()=>eb,robot_sonar_extern_get_value:()=>nb,robot_sonar_extern_led:()=>sb,robot_touch_extern_get_value:()=>$x,sensor_APDS9960_extern:()=>ix,sensor_DS18X20:()=>lb,sensor_LTR308_extern:()=>nx,sensor_LTR390UV_extern:()=>rx,sensor_MAX30102_extern:()=>ex,sensor_QMC5883L_extern:()=>lx,sensor_VL530LX_extern:()=>Tx,sensor_aht11_extern:()=>Ix,sensor_bmp:()=>ky,sensor_dht11:()=>Ux,sensor_distance_hrsc04:()=>xy,sensor_hp203_extern:()=>sx,sensor_ltr381_extern:()=>ax,sensor_mixgo_extern_button_attachInterrupt:()=>Xy,sensor_mixgo_extern_button_get_presses:()=>Yy,sensor_mixgo_extern_button_is_pressed:()=>Py,sensor_mixgo_extern_button_was_pressed:()=>vy,sensor_mixgo_extern_light:()=>By,sensor_mixgo_extern_pin_near:()=>Uy,sensor_mixgo_extern_sound:()=>Gy,sensor_mixgoce_hot_wheel_degrees:()=>Nx,sensor_mixgoce_hot_wheel_is_touched:()=>Lx,sensor_mpu9250_attachGestureInterrupt:()=>yy,sensor_ms5611_extern:()=>ox,sensor_ms5611_extern_altitude:()=>px,sensor_read_humiture:()=>mb,sensor_rtc_init:()=>wy,sensor_sht:()=>Hy,sensor_shtc3_extern:()=>dx,sensor_spl06_001_extern:()=>_x,sensor_ucs12071_extern:()=>ux,sensor_use_i2c_init:()=>Wy,sensor_use_spi_init:()=>Mx,sensor_use_uart_init:()=>Kx,sensor_weather_solo_init:()=>pb,sensor_weather_solo_rain:()=>rb,sensor_weather_solo_wd:()=>ab,sensor_weather_solo_ws:()=>ub,sensor_weigh_init:()=>Sb,tvoc_get_data:()=>Qx,ultrasonic_sensor_read_distance:()=>Ob,weather_data:()=>gx,weather_have_data:()=>Cx,weather_set_label:()=>Ax,weather_uart_mixio:()=>Sx,weigh_sensor_get_weight:()=>Ab});var ut={};t.r(ut),t.d(ut,{HCSR04:()=>Bb,bitbot_als_num:()=>pB,dht11:()=>MB,educore_button_sensor:()=>gB,educore_button_was_pressed:()=>CB,educore_gyroscope_sensor:()=>OB,educore_gyroscope_sensor_read:()=>RB,educore_gyroscope_sensor_shake:()=>cB,educore_light_sensor:()=>EB,educore_rfid_sensor:()=>SB,educore_rfid_sensor_scan:()=>AB,educore_rfid_sensor_scan_data:()=>LB,educore_voice_sensor:()=>hB,number1:()=>Gb,number2:()=>Ub,number3:()=>wb,number4:()=>kb,number5:()=>Hb,number6:()=>Wb,number7:()=>Kb,onboard_RTC_get_time:()=>bV,onboard_RTC_get_time_str:()=>GV,onboard_RTC_get_timestamp:()=>VV,onboard_RTC_get_timetuple_to_str:()=>UV,onboard_RTC_set_datetime:()=>yV,onboard_RTC_settime_string:()=>xV,onboard_RTC_timestamp_totuple:()=>BV,rfid_readcontent:()=>aV,rfid_readid:()=>pV,rfid_status:()=>lV,rfid_write:()=>uV,rfid_write_return:()=>rV,sensor_LTR308:()=>iV,sensor_adxl345_get_acceleration:()=>RV,sensor_aht11:()=>_V,sensor_bitbot_ALS:()=>oB,sensor_button_get_presses:()=>rB,sensor_button_is_pressed:()=>aB,sensor_button_was_pressed:()=>uB,sensor_compass_reset:()=>LV,sensor_ds18x20:()=>tV,sensor_eulerangles:()=>IV,sensor_get_acceleration:()=>dV,sensor_get_temperature:()=>oV,sensor_get_the_coprocessor_version:()=>NB,sensor_hp203:()=>sV,sensor_light:()=>TB,sensor_lm35:()=>eV,sensor_mixbot_get_gyro:()=>_B,sensor_mixbot_patrol_calibrate:()=>iB,sensor_mixbot_patrol_value:()=>nB,sensor_mixbot_temperature:()=>sB,sensor_mixgo_LTR308:()=>jb,sensor_mixgo_button_attachInterrupt:()=>Xb,sensor_mixgo_button_get_presses:()=>Yb,sensor_mixgo_button_is_pressed:()=>Pb,sensor_mixgo_button_was_pressed:()=>vb,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>HV,sensor_mixgo_cc_mmc5603_get_angle:()=>kV,sensor_mixgo_cc_mmc5603_get_magnetic:()=>wV,sensor_mixgo_light:()=>IB,sensor_mixgo_nova_LTR308:()=>Zb,sensor_mixgo_nova_pin_near:()=>Qb,sensor_mixgo_pin_near:()=>zb,sensor_mixgo_pin_near_double:()=>qb,sensor_mixgo_pin_near_single:()=>Jb,sensor_mixgo_pin_pressed:()=>EV,sensor_mixgo_sant_color:()=>$b,sensor_mixgo_touch_slide:()=>mV,sensor_mixgocar42_button_attachInterrupt:()=>Vb,sensor_mixgocar42_button_get_presses:()=>bb,sensor_mixgocar42_button_is_pressed:()=>yb,sensor_mixgocar42_button_was_pressed:()=>xb,sensor_mixgocar_battery_left:()=>eB,sensor_mixgocar_pin_near:()=>ZV,sensor_mixgocar_pin_near_line:()=>$V,sensor_mixgocar_pin_near_state_change:()=>tB,sensor_mixgoce_pin_pressed:()=>hV,sensor_mixgoce_temperature:()=>KV,sensor_mixgome_temperature:()=>WV,sensor_mpu9250_calibrate_compass:()=>CV,sensor_mpu9250_field_strength:()=>AV,sensor_mpu9250_gesture:()=>TV,sensor_mpu9250_get_acceleration:()=>MV,sensor_mpu9250_get_gyro:()=>gV,sensor_mpu9250_get_magnetic:()=>cV,sensor_mpu9250_temperature:()=>SV,sensor_mpython_pin_pressed:()=>OV,sensor_mpython_qmi8658_get_gyro:()=>JV,sensor_mpython_qmi8658_temperature:()=>qV,sensor_onboard_compass_reset:()=>XV,sensor_onboard_mpu9250_calibrate_compass:()=>PV,sensor_onboard_mpu9250_field_strength:()=>YV,sensor_onboard_mpu9250_gesture:()=>NV,sensor_onboard_mpu9250_get_acceleration:()=>DV,sensor_onboard_mpu9250_get_gyro:()=>FV,sensor_onboard_mpu9250_get_magnetic:()=>fV,sensor_onboard_mpu9250_temperature:()=>vV,sensor_pin_near:()=>dB,sensor_pin_pressed:()=>lB,sensor_read:()=>mB,sensor_rm_acc:()=>jV,sensor_rm_battery_left:()=>QV,sensor_rm_pin_near_double:()=>zV,sensor_sound:()=>nV});var rt={};t.r(rt),t.d(rt,{serial_any:()=>vB,serial_print:()=>DB,serial_print_byte:()=>fB,serial_print_hex:()=>PB,serial_println:()=>FB,serial_read_from_ai:()=>kB,serial_readline:()=>XB,serial_readstr:()=>YB,serial_send_to_ai:()=>wB,serial_softserial:()=>yB,serial_softserial_new:()=>xB,system_input:()=>bB,system_print:()=>VB,system_print_end:()=>GB,system_print_inline:()=>BB,system_print_many:()=>UB});var lt={};t.r(lt),t.d(lt,{Panic_with_status_code:()=>eG,Timer_init:()=>hG,base_delay:()=>OG,controls_delay:()=>oG,controls_delay_new:()=>pG,controls_end_program:()=>nG,controls_millis:()=>iG,controls_uname:()=>_G,reset:()=>sG,system_bitbot_shutdown:()=>MG,system_device_name:()=>ZB,system_device_serial_number:()=>tG,system_event_bus_source:()=>jB,system_event_bus_value:()=>$B,system_machine_reset:()=>TG,system_on_event:()=>qB,system_raise_event:()=>JB,system_reset:()=>WB,system_run_in_background:()=>HB,system_ticks_diff:()=>rG,system_timer:()=>uG,system_timer_init:()=>lG,system_timestamp:()=>zB,system_value:()=>QB,system_wait:()=>KB,system_wdt_feed:()=>IG,system_wdt_init:()=>dG,time_ticks_diff:()=>EG,timer:()=>aG,timer2:()=>mG});var dt={};t.r(dt),t.d(dt,{Air_daily_content:()=>vG,Air_now_content:()=>AG,Geo_moon_content:()=>XG,Geo_sun_content:()=>YG,Life_suggestion_content:()=>NG,Location_search_content:()=>fG,Tide_daily_content:()=>DG,WEATHER_DAILY:()=>cG,WEATHER_HOUR:()=>gG,WEATHER_NOW:()=>RG,Weather_alarm_content:()=>LG,Weather_daily:()=>FG,Weather_daily_content:()=>PG,Weather_now:()=>CG,Weather_now_content:()=>SG});var It={};t.r(It),t.d(It,{controls_pin_attachInterrupt:()=>tU,inout_analog_atten:()=>HG,inout_analog_write:()=>wG,inout_analog_write_init:()=>qG,inout_analog_write_set:()=>kG,inout_analog_write_set_freq:()=>QG,inout_digital_init:()=>JG,inout_digital_read:()=>UG,inout_digital_write:()=>GG,inout_highlow:()=>BG,inout_pinMode:()=>jG,inout_pin_attachInterrupt:()=>KG,inout_pin_pressed:()=>WG,inout_pin_pressed_init:()=>zG,pin_pressed:()=>ZG,pin_pressed_init:()=>$G});var Tt={};t.r(Tt),t.d(Tt,{analog_input:()=>uU,analog_output:()=>lU,espnow_channel:()=>oU,haskylens_model:()=>pU,i2c_A_pin:()=>dU,i2c_B_pin:()=>IU,pins_analog:()=>EU,pins_analog_pin:()=>OU,pins_axis:()=>xU,pins_brightness:()=>bU,pins_builtinimg:()=>fU,pins_builtinimg_extern:()=>FU,pins_button:()=>gU,pins_buttonB:()=>CU,pins_dac:()=>RU,pins_dac_pin:()=>cU,pins_digital:()=>iU,pins_digital_dot:()=>WU,pins_digital_pin:()=>nU,pins_exlcdh:()=>XU,pins_exlcdv:()=>yU,pins_imglist:()=>PU,pins_input_pin:()=>sU,pins_one_more:()=>HU,pins_output_pin:()=>_U,pins_playlist:()=>vU,pins_playlist_extern:()=>YU,pins_pwm:()=>SU,pins_pwm_pin:()=>AU,pins_radio_datarate:()=>kU,pins_radio_power:()=>wU,pins_serial:()=>DU,pins_tone_notes:()=>UU,pins_touch:()=>NU,pins_touch_pin:()=>LU,pins_tts_bgmusic:()=>GU,pins_tts_builtin_music:()=>BU,pins_tts_voice:()=>VU,pwm_input:()=>aU,pwm_output:()=>rU,spi_A_pin:()=>TU,spi_B_pin:()=>MU,spi_C_pin:()=>hU,spi_D_pin:()=>mU});var Mt={};t.r(Mt),t.d(Mt,{inout_analog_atten:()=>ew,inout_analog_write:()=>zU,inout_analog_write_init:()=>tw,inout_analog_write_set:()=>QU,inout_digital_init:()=>ZU,inout_digital_read:()=>qU,inout_digital_write:()=>JU,inout_highlow:()=>KU,inout_pin_attachInterrupt:()=>$U,inout_pin_pressed:()=>jU,inout_pin_pressed_init:()=>iw});var ht={};t.r(ht),t.d(ht,{analog_input:()=>dw,analog_output:()=>Tw,espnow_channel:()=>rw,haskylens_model:()=>lw,i2c_A_pin:()=>Mw,i2c_B_pin:()=>hw,pins_analog:()=>gw,pins_analog_pin:()=>cw,pins_axis:()=>xw,pins_brightness:()=>Bw,pins_builtinimg:()=>Pw,pins_builtinimg_extern:()=>vw,pins_button:()=>sw,pins_buttonB:()=>_w,pins_dac:()=>Lw,pins_dac_pin:()=>Aw,pins_digital:()=>nw,pins_digital_dot:()=>Jw,pins_digital_pin:()=>ow,pins_exlcdh:()=>bw,pins_exlcdv:()=>Vw,pins_imglist:()=>Yw,pins_input_pin:()=>pw,pins_interrupt:()=>fw,pins_one_more:()=>Kw,pins_output_pin:()=>aw,pins_playlist:()=>Xw,pins_playlist_extern:()=>yw,pins_pwm:()=>Sw,pins_pwm_input:()=>uw,pins_pwm_pin:()=>Cw,pins_radio_datarate:()=>Ww,pins_radio_power:()=>Hw,pins_serial:()=>Fw,pins_tone_notes:()=>kw,pins_touch:()=>Dw,pins_touch_pin:()=>Nw,pins_tts_bgmusic:()=>ww,pins_tts_builtin_music:()=>Uw,pins_tts_voice:()=>Gw,pwm_output:()=>Iw,spi_A_pin:()=>mw,spi_B_pin:()=>Ew,spi_C_pin:()=>Ow,spi_D_pin:()=>Rw});const mt=Blockly,Et=Mixly,Ot={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(o+=n)):i=o}else i="i";return i}},Rt=Ot; -/** - * @license - * Visual Blocks Editor - * - * Copyright 2012 Google Inc. - * https://developers.google.com/blockly/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class ct{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(mt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(mt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_if_else");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(mt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(mt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Gt={init:function(){this.setColour(Xt),this.appendValueInput("FROM").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.PYTHON_RANGE).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Ut={init:function(){this.setColour(Xt),this.appendValueInput("LIST").setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(mt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return mt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},wt={init:function(){this.setColour(Xt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new mt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(mt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:mt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:mt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},kt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new mt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(mt.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=t.newBlock("controls_finally");_.initSvg(),i.connect(_.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(mt.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Ht={init:function(){this.setColour(Xt);var t=new mt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:mt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:mt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Wt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new mt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return mt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Kt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new mt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return mt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};wt.OPERATORS=[[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Ht.OPERATORS=[[mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[mt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Jt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},qt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},zt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(mt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Qt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},jt={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(mt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},$t={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(mt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Zt={init:function(){this.jsonInit({message0:mt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:Xt,tooltip:mt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:mt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},te={init:function(){this.setColour(Xt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_STAT),this.setOutput(!0)}},ee={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},ie={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},ne={init:function(){this.appendDummyInput().appendField(mt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+mt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(mt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new mt.FieldDropdown([[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[mt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Xt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},se={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_e={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},oe={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},pe={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_GET_UNIQUE_IDEN)}},ae={init:function(){this.setColour(Xt),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(mt.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},ue={init:function(){this.setColour(Xt),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},re=230;mt.FieldTextInput.math_number_validator=function(t){return String(t)},mt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const le={init:function(){this.setColour(re),this.appendDummyInput().appendField(new mt.FieldTextInput("0",mt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MATH_NUMBER_TOOLTIP)}},de={init:function(){this.setColour(re);this.appendDummyInput("").appendField(mt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new mt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Ie={init:function(){this.setColour(re);this.appendDummyInput("").appendField(mt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new mt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:mt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Te={init:function(){this.setColour(re),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:mt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:mt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:mt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Me={init:function(){this.setColour(re),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:mt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:mt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:mt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:mt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:mt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},he={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new mt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},me={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new mt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:mt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:mt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:mt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:mt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:mt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:mt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:mt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Ee={init:function(){var t=[[mt.Msg.MATH_BIN,"bin"],[mt.Msg.MATH_OCT,"oct"],[mt.Msg.MATH_HEX,"hex"]];this.setColour(re),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new mt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:mt.Msg.MATH_DEC_TOOLTIP_BIN,oct:mt.Msg.MATH_DEC_TOOLTIP_OCT,hex:mt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Oe={init:function(){var t=[[mt.Msg.LANG_MATH_TO_ROUND,"round"],[mt.Msg.LANG_MATH_TO_CEIL,"ceil"],[mt.Msg.LANG_MATH_TO_FLOOR,"floor"],[mt.Msg.MATH_ABS,"fabs"],[mt.Msg.MATH_SQRT,"sqrt"]];this.setColour(re),this.appendValueInput("A").setCheck(Number).appendField(new mt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:mt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:mt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:mt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:mt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:mt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:mt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Re={init:function(){var t=[[mt.Msg.MIXLY_MAX,"max"],[mt.Msg.MIXLY_MIN,"min"]];this.setColour(re),this.appendValueInput("A").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(mt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:mt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:mt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},ce={init:function(){var t=[[mt.Msg.MATH_TWO,"two"],[mt.Msg.MATH_EIGHT,"eight"],[mt.Msg.MATH_TEN,"ten"],[mt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(re),this.appendDummyInput("").appendField(mt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new mt.FieldDropdown(t),"OP").appendField(mt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MATH_ZHW).appendField(new mt.FieldDropdown(t),"OP2").appendField(mt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:mt.Msg.MATH_Before_two,eight:mt.Msg.MATH_Before_eight,ten:mt.Msg.MATH_Before_ten,sixteen:mt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:mt.Msg.MATH_Behind_two,eight:mt.Msg.MATH_Behind_eight,ten:mt.Msg.MATH_Behind_ten,sixteen:mt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},ge={init:function(){var t=[[mt.Msg.LANG_MATH_INT,"int"],[mt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(re),this.setOutput(!0,Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new mt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(mt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:mt.Msg.LANG_MATH_INT,float:mt.Msg.LANG_MATH_FLOAT_RANDOM};return mt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Ce={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(mt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(mt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(mt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(mt.Msg.MATH_CONSTRAIN_TOOLTIP)}},Se={init:function(){this.setColour(re),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(mt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(mt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Ae={init:function(){this.setColour(re),this.appendDummyInput().appendField(new mt.FieldTextInput("0",mt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(mt.Msg.MATH_NUMBER_TOOLTIP)}},Le={init:function(){this.setColour(re),this.appendValueInput("NUM").setCheck(Number).appendField(mt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},Ne={init:function(){this.setColour(re),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MATH_ROUND).appendField(mt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(mt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(mt.Msg.MATH_ROUND_NEW_TOOLTIP)}},De={init:function(){var t=[[mt.Msg.MIXLY_TO_INT,"int"],[mt.Msg.MIXLY_TO_FLOAT,"float"],[mt.Msg.MIXLY_TO_BITES,"b"],[mt.Msg.LANG_MATH_BYTE+mt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(re),this.appendValueInput("VAR").appendField(new mt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:mt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:mt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:mt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},fe={init:function(){var t=[[mt.Msg.MIXLY_TO_INT,"int"],[mt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(re),this.appendValueInput("VAR").appendField(new mt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:mt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:mt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},Fe=Se,Pe={init:function(){this.setColour(re),this.appendValueInput("VAR").appendField(mt.Msg.LANG_MATH_BYTE+mt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},ve={init:function(){this.setColour(re),this.itemCount_=1,this.setMutator(new mt.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(mt.Msg.MIXLY_PRODUCT+mt.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(mt.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(mt.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(mt.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const Ve={init:function(){this.setColour(ye),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new mt.FieldTextInput("",mt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(mt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new mt.FieldImage(e,7,12,'"')}},Be={init:function(){this.setColour(ye),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(mt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},Ge={init:function(){this.setColour(ye),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Ue={init:function(){this.setColour(ye),this.appendValueInput("VAR").setCheck(String).appendField(mt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},we={init:function(){this.setColour(ye),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},ke={init:function(){this.setColour(ye),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},He={init:function(){this.WHERE_OPTIONS=[[mt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[mt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[mt.Msg.TEXT_GET_INDEX_RANDOM+1+mt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ye),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(mt.Msg.LISTS_GET_INDEX_GET,"MODE"),mt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(mt.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=mt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+mt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",mt.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:mt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:mt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:mt.Msg.TEXT_GET_INDEX_RANDOM};return mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+mt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==mt.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),mt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(mt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new mt.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),mt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},We={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ye),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(mt.Msg.LISTS_GET_INDEX_GET+" "+mt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(mt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_MICROBIT_TYPE_STRING+mt.Msg.LISTS_GET_INDEX_FROM_START+"n"+mt.Msg.TEXT_CHARAT2)}},Ke={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ye),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(mt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(mt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Je={init:function(){this.WHERE_OPTIONS_1=[[mt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[mt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[mt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[mt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[mt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[mt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ye),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(mt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==mt.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==mt.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),mt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(mt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new mt.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},qe={init:function(){this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ye),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(mt.Msg.LISTS_GET_INDEX_GET+" "+mt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(mt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(mt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(mt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},ze={init:function(){var t=[[mt.Msg.MIXLY_EQUALS,"==="],[mt.Msg.MIXLY_STARTSWITH,"startswith"],[mt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(ye),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new mt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Qe={init:function(){this.setColour(ye),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(mt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_COMPARETO_HELP)}},je={init:function(){var t=[[mt.Msg.TEXT_UPPER,"upper"],[mt.Msg.TEXT_TITLE,"title"],[mt.Msg.TEXT_CAPITALIZE,"capitalize"],[mt.Msg.TEXT_SWAPCASE,"swapcase"],[mt.Msg.TEXT_LOWER,"lower"]];this.setColour(ye),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new mt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:mt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:mt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:mt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:mt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:mt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},$e={init:function(){var t=[[mt.Msg.TEXT_LJUST,"ljust"],[mt.Msg.TEXT_CENTER,"center"],[mt.Msg.TEXT_RJUST,"rjust"]];this.setColour(ye),this.appendValueInput("VAR").appendField(new mt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(mt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(mt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Ze={init:function(){this.setColour(ye),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(mt.Msg.MIXLY_MID+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(mt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ti={init:function(){this.setColour(ye),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},ei={init:function(){this.setColour(ye),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(mt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(mt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},ii={init:function(){this.setColour(ye),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(mt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(mt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},ni={init:function(){var t=[[mt.Msg.TEXT_TRIM_BOTH,"strip"],[mt.Msg.TEXT_TRIM_LEFT,"lstrip"],[mt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(ye),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(mt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new mt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(mt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:mt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:mt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:mt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},si={init:function(){this.setColour(ye),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new mt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new mt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},tn={init:function(){this.setColour($i),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},en={init:function(){this.setColour($i),this.appendDummyInput().appendField(mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},nn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_KEYS),this.setTooltip(mt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},sn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(mt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(mt.Msg.DICTS_GET_TOOLTIP)}},_n={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(mt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(mt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(mt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},on={init:function(){this.setColour($i),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(mt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},pn={init:function(){this.setColour($i),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(mt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_DELETE_TOOLTIP)}},an={init:function(){this.setColour($i),this.appendValueInput("DICT2").setCheck("Dict").appendField(mt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(mt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MID),this.setTooltip(mt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},un={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_CLEAR),this.setTooltip(mt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},rn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_ITEMS),this.setTooltip(mt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},ln={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_VALUES),this.setTooltip(mt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},dn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_LENGTH),this.setTooltip(mt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},In={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.DICT_DELDICT),this.setTooltip(mt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tn={init:function(){this.MODE=[[mt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[mt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(mt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(mt.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=mt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=mt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==mt.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new mt.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},Mn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(mt.Msg.DICTS_ADD_VALUE),this.setTooltip(mt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},hn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(mt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(mt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},mn={init:function(){this.setColour($i),this.appendDummyInput("").appendField(new mt.FieldLabel(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new mt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},En={init:function(){this.setColour($i),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},On={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TO_JSON),this.setTooltip(mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Rn={init:function(){this.setColour($i),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},cn={init:function(){this.setColour($i),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},gn={init:function(){this.setColour($i),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TO_JSON),this.setTooltip(mt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Cn=210,Sn={init:function(){var t=mt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:mt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:mt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:mt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:mt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:mt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:mt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},An={init:function(){var t=mt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=mt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new mt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Ln={init:function(){var t=[[mt.Msg.LOGIC_OPERATION_AND,"AND"],[mt.Msg.LOGIC_OPERATION_OR,"OR"],[mt.Msg.LOGIC_OPERATION_NOR,"NOR"],[mt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new mt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:mt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:mt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:mt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:mt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},Nn={init:function(){this.setColour(Cn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(mt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(mt.Msg.LOGIC_NEGATE_TOOLTIP)}},Dn={init:function(){var t=[[mt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[mt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Cn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new mt.FieldDropdown(t),"BOOL"),this.setTooltip(mt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},fn={init:function(){this.setColour(Cn),this.setOutput(!0),this.appendDummyInput().appendField(mt.Msg.LOGIC_NULL),this.setTooltip(mt.Msg.LOGIC_NULL_TOOLTIP)}},Fn={init:function(){this.setColour(Cn),this.appendValueInput("A"),this.appendValueInput("B").appendField(mt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(mt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},Pn={init:function(){var t=[[mt.Msg.TEXT_APPEND_TO,"in"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Cn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new mt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(mt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.IN)}},vn={init:function(){var t=[[mt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[mt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Cn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new mt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},Yn={init:function(){this.setColour(Cn),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Xn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(mt.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},yn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_USE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=mt.Msg.MIXLY_BELONG;return i+{r:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},xn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_USE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=mt.Msg.MIXLY_BELONG,o=mt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},bn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(mt.Msg.MIXPY_TEXT_ENCODE).appendField(new mt.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_USE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=mt.Msg.MIXLY_BELONG,o=mt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+_+n+s+o}))}},Vn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+mt.Msg.MIXLY_MICROBIT_TYPE_STRING+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Gn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(mt.Msg.MICROBIT_PYTHON_TYPE)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.HTML_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Wn={init:function(){this.setColour(0),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Kn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Jn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},Qn={init:function(){this.setColour(0),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},jn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return mt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+mt.Msg.MIXLY_ESP32_SET+{mkdir:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},$n={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(mt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},ts={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.HTML_FILE,"isfile"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},es={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(mt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},is={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(mt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},ns={init:function(){var t=mt.Procedures.findLegalName("",this),e=new mt.FieldTextInput(t,mt.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new mt.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&mt.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(mt.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(mt.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(mt.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(mt.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=mt.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),mt.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{mt.Events.enable()}},mutationToDom:function(t){var e=mt.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(mt.Msg.MIXLY_AIP_ATTR).setAlign(mt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},js={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(mt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},$s={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(mt.Msg.HTML_FORM_CONTENT).appendField(new mt.FieldDropdown([[mt.Msg.HTML_TEXT,"text"],[mt.Msg.HTML_EMAIL,"email"],[mt.Msg.HTML_NUMBER,"number"],[mt.Msg.HTML_PASSWORD,"password"],[mt.Msg.HTML_CHECKBOX,"checkbox"],[mt.Msg.HTML_RADIOBUTTON,"radiobutton"],[mt.Msg.HTML_BUTTON,"button"],[mt.Msg.HTML_COLOUR,"colour"],[mt.Msg.HTML_DATE,"date"],[mt.Msg.HTML_LOCALTIME,"local time"],[mt.Msg.HTML_FILE,"file"],[mt.Msg.HTML_HIDDEN,"hidden"],[mt.Msg.HTML_IMAGE,"image"],[mt.Msg.HTML_MONTH,"month"],[mt.Msg.HTML_RANGE,"range"],[mt.Msg.HTML_RESET,"reset"],[mt.Msg.HTML_SEARCH,"search"],[mt.Msg.HTML_SUBMIT,"submit"],[mt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[mt.Msg.HTML_TIME,"time"],[mt.Msg.HTML_URL,"url"],[mt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(mt.Msg.HTML_NAME).appendField(new mt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(mt.Msg.HTML_VALUE).appendField(new mt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(mt.Msg.MIXLY_AIP_ATTR).setAlign(mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zs={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},t_={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(new mt.FieldTextInput("property"),"KEY").appendField(":").appendField(new mt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},e_={init:function(){this.setColour(Ws),this.appendDummyInput().appendField(mt.Msg.HTML_TEXT).appendField(new mt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},i_=160,n_={init:function(){this.setColour(i_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new mt.FieldTable(""),"TEXT")}},s_={init:function(){this.setColour(i_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT")}},__={init:function(){this.setColour(i_),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new mt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},o_={init:function(){this.setColour(i_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},p_={init:function(){this.setColour(i_),this.appendDummyInput().appendTitle("Comment:").appendTitle(new mt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},a_={init:function(){this.setColour(i_),this.appendValueInput("VALUE").appendField(mt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},u_={init:function(){this.setColour(i_),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new mt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(mt.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=mt.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+t+", "+e+", "+i+")"},mt.isNumber(n)&&mt.isNumber(s)&&mt.isNumber(_))n=parseFloat(n),s=parseFloat(s),_=Math.abs(parseFloat(_)),0==n%1&&0==s%1&&0==_%1?(n<=s?(s++,t=0==n&&1==_?s:n+", "+s,1!=_&&(t+=", "+_)):t=n+", "+--s+", -"+_,t="range("+t+")"):(t=n",GTE:">="};const sa=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",_=e.valueToCode(this,"B",n)||"False";if("AND"==i)var o=s+" and "+_;else if("OR"==i)o=s+" or "+_;else if("NOR"==i)o="not("+s+"^"+_+")";else o=s+"^"+_;return[o,n]},_a=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},oa=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},pa=function(t,e){return["None",e.ORDER_ATOMIC]},aa=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},ua=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},ra=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},la=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},da=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Ia=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Ta=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Ma=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ha=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},ma=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Ea=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Oa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ra=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},ca=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},ga=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Ca=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Sa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Aa=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},La=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Na=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},Da=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},fa=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Fa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Pa=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},va=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},Ya=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Xa=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},ya=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),mt.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var _=[],o=0;o\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},hu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},mu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},Eu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Ou=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Ru=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},cu=function(t,e){return'"},gu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Cu=function(){return this.getFieldValue("TEXT")+"\n"},Su=function(t){return t.getFieldValue("TEXT")+"\n"},Au=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Lu=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Nu=function(){return""},Du=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},fu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),_=0;_0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n")},Yu.scrubNakedValue=function(t){return t+"\n"},Yu.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},Yu.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Yu.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=mt.utils.string.wrap(_,Yu.COMMENT_WRAP-3),n+=Yu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const Xu="#74A55B",yu={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_RGB_PIN_COUNT)}},xu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},bu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Vu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Bu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(mt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(mt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Gu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Uu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_RESET)}},wu={init:function(){this.setColour(Xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ku={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Hu={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Wu={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Ku={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Ju={init:function(){this.setColour(Xu),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},qu={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_MOVE)}},zu={init:function(){this.setColour(Xu),this.appendValueInput("VAR").appendField("360°"+mt.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SETTING+mt.Msg.blockpy_turtle_rotate+mt.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},Qu={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("180°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_MOVE)}},ju={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("360°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},$u={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("180°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Zu={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).appendField("360°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},tr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new mt.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(mt.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},er={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[mt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[mt.Msg.MOTOR_N,"ms32006.MOT_N"],[mt.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},ir={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new mt.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[mt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},nr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_RGB_PIN_COUNT)}},sr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},_r={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},or={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_WRI)}},pr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ar={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.PYTHON_RANGE_STEP).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ur={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new mt.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new mt.FieldDropdown([["SYN6288"+mt.Msg.MIXLY_AipSpeech_synthesis,"SYN6288"],["NS9300"+mt.Msg.MIXLY_MUSIC_PLAYER,"NS9300"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},rr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_WHETHER).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_STOPPED,"0"],[mt.Msg.MIXLY_PLAYING,"1"],[mt.Msg.MIXLY_PAUSED,"2"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},lr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_STAT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MP3_PLAY,"1"],[mt.Msg.MIXLY_MP3_PAUSE,"2"],[mt.Msg.MIXLY_STOP,"3"],[mt.Msg.MIXLY_MP3_PREV,"4"],[mt.Msg.MIXLY_MP3_NEXT,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendValueInput("volume").appendField(mt.Msg.MIXLY_MP3_VOL+mt.Msg.MIXLY_STAT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_PLAYER_SET_VOLUME_TOOLTIP)}},Ir={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MODE+mt.Msg.MIXLY_STAT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MP3_LOOP_ALL,"0"],[mt.Msg.MIXLY_MP3_LOOP_ONE,"1"],[mt.Msg.MIXLY_PLAYER_DIRECTORY_LOOP,"2"],[mt.Msg.MIXLY_MP3_LOOP_RAM,"3"],[mt.Msg.MIXLY_PLAYER_SINGLE_STOP,"4"],[mt.Msg.MIXLY_PLAYER_SEQUENTIAL_PLAY,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_START_MELODY,"play"],[mt.Msg.MIXLY_PLAYER_INSERT_MUSIC,"insert"]]),"key"),this.appendValueInput("song"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_PLAYER_PLAY_MUSIC_TOOTIP)}},Mr={},hr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(mt.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},mr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Er={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(mt.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(mt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},Or={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(mt.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(mt.Msg.MIXLY_PROGRAM_BLOCK).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},Rr={init:function(){this.setColour(Xu),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},cr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},gr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Cr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_TRAFFIC_LIGHT).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.LISTS_SET_INDEX_SET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[mt.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Sr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_WHITE,"W"],[mt.Msg.COLOUR_RGB_RED,"R"],[mt.Msg.COLOUR_RGB_YELLOW,"Y"],[mt.Msg.COLOUR_RGB_GREEN,"G"],[mt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ar={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_WHITE,"W"],[mt.Msg.COLOUR_RGB_RED,"R"],[mt.Msg.COLOUR_RGB_YELLOW,"Y"],[mt.Msg.COLOUR_RGB_GREEN,"G"],[mt.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Lr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[mt.Msg.MIXLY_SPEED,"[1]"],[mt.Msg.MATH_SINGLE_OP_ABSOLUTE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[mt.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[mt.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[mt.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Nr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[mt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[mt.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MATH_SINGLE_OP_ABSOLUTE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MODE).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPEED+mt.Msg.MIXLY_MODE,"0"],[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+mt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"0"],[mt.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[mt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},Fr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Pr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField("("+mt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MODE).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPEED+mt.Msg.MIXLY_MODE,"0"],[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+mt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},vr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.ME_GO_MOTOR_EXTERN+mt.Msg.MIXLY_SERVO_MOTOR).appendField(mt.Msg.MIXLY_RELATIVE+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+mt.Msg.MSG.run).appendField("("+mt.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LEFT,"0"],[mt.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MODE).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPEED+mt.Msg.MIXLY_MODE,"0"],[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER+mt.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(mt.inputs.Align.RIGHT).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"0"],[mt.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Yr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MOTOR,"ext_motor"],[mt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[mt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[mt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[mt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[mt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[mt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[mt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},Xr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(mt.Msg.ME_GO_MOTOR_EXTERN).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MOTOR,"ext_motor"],[mt.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[mt.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[mt.Msg.COLOUR_RGB_RED+"LED","R_LED"],[mt.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[mt.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[mt.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[mt.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},yr={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_AT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},xr={init:function(){this.setColour(Xu),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("pin").appendField("LED"),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},br={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SERVO+mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_AT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Vr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_SERVO),this.appendValueInput("angle").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE),this.appendDummyInput().appendField(mt.Msg.DRAW_POINTER_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Br={init:function(){this.setColour(Xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_MOTOR+mt.Msg.MIXLY_SETUP+mt.Msg.MIXLY_AT).appendField(mt.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Gr={init:function(){this.setColour(Xu),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MOTOR),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+mt.Msg.MIXLY_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ur="#6C9858",wr={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},kr={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_ON,"1"],[mt.Msg.MIXLY_ESP32_OFF,"0"],[mt.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Hr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Wr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(mt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Kr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Jr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SETTING+mt.Msg.MIXLY_BUILDIN_LED+mt.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},qr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(mt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(mt.Msg.MIXLY_LCD_SETCOLOR).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_LIGHT_RED,"1"],[mt.Msg.MIXLY_LIGHT_GREEN,"2"],[mt.Msg.MIXLY_LIGHT_BLUE,"3"],[mt.Msg.MIXLY_LIGHT_YELLOW,"4"],[mt.Msg.MIXLY_LIGHT_CYAN,"5"],[mt.Msg.MIXLY_LIGHT_PURPLE,"6"],[mt.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},zr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Qr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(mt.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},jr={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(mt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},$r={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETTING).appendField(mt.Msg.MIXLY_BUILDIN_LED).appendField(new mt.FieldDropdown([[mt.Msg.COLOUR_RGB_RED,"r"],[mt.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SETTING+mt.Msg.MIXLY_BUILDIN_LED+mt.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},Zr={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(new mt.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},tl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Et.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},el={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},il={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},nl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.PYTHON_RANGE_STEP).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},sl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_WRI)}},_l={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Et.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(mt.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},ol={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},pl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(mt.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.PYTHON_RANGE_STEP).appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},al={init:function(){this.setColour(Ur),this.appendValueInput("TICKS").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(mt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(mt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},ul={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},rl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_RESET)}},ll={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},dl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Il={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tl={init:function(){this.setColour(Ur),this.appendValueInput("LIST").appendField(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Ml={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MOTOR_DC).appendField(new mt.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"CW"],[mt.Msg.ANTI_CLOCKWISE,"CCW"],[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},hl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField("MixGo Car").appendField(new mt.FieldDropdown([[mt.Msg.blockpy_forward,"F"],[mt.Msg.blockpy_backward,"B"],[mt.Msg.blockpy_left,"L"],[mt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ml={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField("MixGo Car").appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},El={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MOTOR_DC).appendField(new mt.FieldDropdown([[mt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[mt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"CW"],[mt.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ol={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MOTOR_DC).appendField(new mt.FieldDropdown([[mt.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[mt.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_STOP).appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Rl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},cl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(new mt.FieldDropdown([[mt.Msg.blockpy_forward,"F"],[mt.Msg.blockpy_backward,"B"],[mt.Msg.blockpy_left,"L"],[mt.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[mt.Msg.MIXLY_SPEED,"SPEED"],[mt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},gl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Cl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXBOT).appendField(mt.Msg.MIXLY_MOTOR).appendField(new mt.FieldDropdown([[mt.Msg.TEXT_TRIM_LEFT,"1"],[mt.Msg.TEXT_TRIM_RIGHT,"2"],[mt.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[mt.Msg.MIXLY_SPEED,"SPEED"],[mt.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Sl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[mt.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Al={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.BITBOT).appendField(new mt.FieldDropdown([[mt.Msg.blockpy_forward,"F"],[mt.Msg.blockpy_backward,"B"],[mt.Msg.blockpy_left,"L"],[mt.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ll={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.BITBOT).appendField(new mt.FieldDropdown([[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Nl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.BITBOT).appendField(mt.Msg.MIXLY_MOTOR).appendField(new mt.FieldDropdown([[mt.Msg.TEXT_TRIM_LEFT,"0"],[mt.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"CW"],[mt.Msg.ANTI_CLOCKWISE,"CCW"],[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dl={init:function(){this.setColour(Ur),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},fl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Fl={init:function(){this.setColour(Ur),this.appendValueInput("bright").appendField(mt.Msg.MIXLY_SETTING+mt.Msg.MIXLY_MIXBOT_BUZZER+mt.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_SETONOFF)}},Pl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_MIXBOT_BUZZER+mt.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_LED_GETONOFF)}},vl={init:function(){this.setColour(Ur),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_RECORD_AUDIO).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(mt.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Yl={init:function(){this.setColour(Ur),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_PLAY_AUDIO).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Xl={init:function(){this.setColour(Ur),this.appendValueInput("PATH").appendField(mt.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},yl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(mt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},xl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.ME_GO_MOTOR_EXTERN).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([["1","1"],["2","2"],["3","3"],["4","4"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.blynk_IOT_IR_POWER+mt.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Vl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.ME_GO_MOTOR_EXTERN).appendField(mt.Msg.PIN_NUMBERING).appendField(new mt.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.blynk_IOT_IR_POWER+mt.Msg.MIXLY_PINMODEOUT+mt.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Bl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.ME_GO_MOTOR_EXTERN).appendField(mt.Msg.MIXLY_ALL+mt.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(mt.ALIGN_RIGHT).appendField(mt.Msg.blynk_IOT_IR_POWER+mt.Msg.MIXLY_PINMODEOUT+mt.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Gl={init:function(){this.setColour(Ur),this.appendDummyInput().appendField(mt.Msg.ANALOG+mt.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(mt.Msg.MIXLY_RELEASE).appendField(new mt.FieldDropdown([[mt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[mt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.ANALOG+mt.Msg.MIXLY_KEYBOARD_INPUT)}},Ul={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SPECIAL_KEY).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[mt.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[mt.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[mt.Msg.MIXLY_SPECIAL_KEY4,"0x04"],[mt.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[mt.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[mt.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[mt.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[mt.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},wl={init:function(){this.setColour(Ur),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GENERAL_KEY).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_SPECIAL_KEY0,"0x00"],["A","0x04"],["B","0x05"],["C","0x06"],["D","0x07"],["E","0x08"],["F","0x09"],["G","0x0A"],["H","0x0B"],["I","0x0C"],["J","0x0D"],["K","0x0E"],["L","0x0F"],["M","0x10"],["N","0x11"],["O","0x12"],["P","0x13"],["Q","0x14"],["R","0x15"],["S","0x16"],["T","0x17"],["U","0x18"],["V","0x19"],["W","0x1A"],["X","0x1B"],["Y","0x1C"],["Z","0x1D"],["1 !","0x1E"],["2 @","0x1F"],["3 #","0x20"],["4 $","0x21"],["5 %","0x22"],["6 ^","0x23"],["7 &","0x24"],["8 *","0x25"],["9 (","0x26"],["0 )","0x27"],["ENTER","0x28"],["ESC","0x29"],["BACKSPACE","0x2A"],["TAB","0x2B"],["SPACE","0x2C"],["- _","0x2D"],["= +","0x2E"],["[ {","0x2F"],["] }","0x30"],["\\ |","0x31"],["; :","0x33"],["' \"","0x34"],["` ~","0x35"],[", <","0x36"],[". >","0x37"],["/ ?","0x38"],["CAPS_LOCK","0x39"],["F1","0x3A"],["F2","0x3B"],["F3","0x3C"],["F4","0x3D"],["F5","0x3E"],["F6","0x3F"],["F7","0x40"],["F8","0x41"],["F9","0x42"],["F10","0x43"],["F11","0x44"],["F12","0x45"],["PRINTSCREEN","0x46"],["SCROLL_LOCK","0x47"],["PAUSE","0x48"],["INSERT","0x49"],["HOME","0x4A"],["PAGE_UP","0x4B"],["DELETE","0x4C"],["END","0x4D"],["PAGE_DOWN","0x4E"],["RIGHT","0x4F"],["LEFT","0x50"],["DOWN","0x51"],["UP","0x52"],["NUM_LOCK","0x53"],["/","0x54"],["*","0x55"],["-","0x56"],["+","0x57"],["ENTER","0x58"],["1","0x59"],["2","0x5A"],["3","0x5B"],["4","0x5C"],["5","0x5D"],["6","0x5E"],["7","0x5F"],["8","0x60"],["9","0x61"],["0","0x62"],[".","0x63"]]),"op"),this.setOutput(!0)}},kl={init:function(){this.setColour(Ur),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new mt.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(mt.Msg.GENERALKEY_TUPLE_CREATE_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("generalkey_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;nnew Array(32).fill(0)))},im={init:function(){this.jsonInit({colour:Kh,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:mt.Msg.MIXLY_MICROBIT_Built_in_image1,message0:mt.Msg.MIXLY_MICROBIT_Built_in_image})}},nm={init:function(){this.setColour(Kh),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg),"image"),this.setOutput(!0,["esp32_image","List"])}},sm={init:function(){this.setColour(Kh),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(mt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new mt.FieldDropdown(sm.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":mt.Msg.MIXLY_MICROBIT_image_add,"-":mt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[mt.Msg.MICROBIT_DISPLAY_UNION,"add"],[mt.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},_m={init:function(){this.setColour(Kh),this.appendValueInput("A").setCheck("esp32_image").appendField(mt.Msg.MIXLY_MICROBIT_Invert_image1),this.setInputsInline(!0),this.setOutput(!0,"esp32_image")}},om={init:function(){this.setColour(Kh),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_LET2).appendField(new mt.FieldDropdown(om.OPERATORS),"OP"),this.appendValueInput("val").appendField(mt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_UNIT);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=mt.Msg.DISPLAY_IMAGE_LET,n=mt.Msg.DISPLAY_IMAGE_LET2,s=mt.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:mt.Msg.MIXLY_UP,shift_down:mt.Msg.MIXLY_DOWN,shift_left:mt.Msg.MIXLY_LEFT,shift_right:mt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[mt.Msg.MIXLY_UP,"shift_up"],[mt.Msg.MIXLY_DOWN,"shift_down"],[mt.Msg.MIXLY_LEFT,"shift_left"],[mt.Msg.MIXLY_RIGHT,"shift_right"]]},pm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},am={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},um={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},rm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},lm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Clear_display);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Clear_display)}},dm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_SHOW+mt.Msg.MIXLY_DISPLAY_MATRIX_WRITE_NOW),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Im={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<8;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Tm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(Tm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},Mm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},hm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(hm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},mm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<16;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,"esp32_image"),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Em={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(Em.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},Om={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.OLED_SET_FONT).appendField(new mt.FieldDropdown(Om.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+mt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+mt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+mt.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Rm={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING)}},cm={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING)}},gm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(mt.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING)}},Cm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(mt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(mt.Msg.TEXT_CENTER).appendField(new mt.FieldDropdown([[mt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[mt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},Sm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(mt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},Am={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Lm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Nm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"state",options:[[mt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[mt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"shape",options:[[mt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[mt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:mt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Dm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"state",options:[[mt.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[mt.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"dir_h_v",options:[[mt.Msg.mpython_vertical,"0"],[mt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:mt.Msg.MPYTHON_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},fm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"state",options:[[mt.Msg.mpython_display_hline_1,"1"],[mt.Msg.mpython_display_hline_0,"0"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.mpython_display_line_TOOLTIP,message0:mt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},Fm={init:function(){this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new mt.FieldDropdown(Fm.IMAGES),"path"),this.setColour(Kh),this.setOutput(!0)},IMAGES:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]]},Pm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<5;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},vm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(vm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},Ym={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Xm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_AMBIENTBRIGHT),this.setInputsInline(!0),this.setOutput(!0,Number)}},ym={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},xm={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new mt.FieldDropdown(xm.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[mt.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[mt.Msg.CLOCKWISE+"90"+mt.Msg.blockpy_setheading_degree,"1"],[mt.Msg.CLOCKWISE+"180"+mt.Msg.blockpy_setheading_degree,"2"],[mt.Msg.CLOCKWISE+"270"+mt.Msg.blockpy_setheading_degree,"3"]]},bm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<12;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new mt.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Vm={init:function(){this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(mt.inputs.Align.CENTRE).appendField(new mt.FieldBitmap(Vm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(Kh),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},Bm={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Gm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.OLED_BITMAP).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("direct").setCheck(String).appendField(mt.Msg.MIXLY_AipImageClassify_Image+mt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Um={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(mt.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(mt.Msg.TEXT_CENTER).appendField(new mt.FieldDropdown([[mt.Msg.MICROPYTHON_DISPLAY_YES,"True"],[mt.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},wm={init:function(){this.setColour(Kh),this.appendValueInput("data").setCheck(String).appendField(mt.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},km={init:function(){this.jsonInit({colour:Kh,args0:[{name:"shape",options:[[mt.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[mt.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:mt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Hm={init:function(){this.jsonInit({colour:Kh,args0:[{name:"dir_h_v",options:[[mt.Msg.mpython_vertical,"0"],[mt.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:mt.Msg.ONBOARD_TFT_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},Wm={init:function(){this.jsonInit({colour:Kh,args0:[{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,tooltip:mt.Msg.mpython_display_line_TOOLTIP,message0:mt.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},Km={init:function(){this.setColour(Kh),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(mt.Msg.HTML_COLOUR),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},Jm={init:function(){this.setColour(Kh),this.appendValueInput("x").setCheck(Number).appendField(mt.Msg.MIXLY_LCD_SETCOLOR).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},qm={init:function(){this.setColour(Kh),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_SCREEN_FILL);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},zm={init:function(){this.setColour(Kh),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_INIT_CLOCK),this.appendDummyInput().appendField(mt.Msg.MIXLY_CENTER_POS),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.OLED_CIRCLE_RADIUS),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Qm={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.GET_RTCTIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},jm={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.SET_TIME),this.appendValueInput("h").setCheck(Number).appendField(mt.Msg.MIXLY_HOUR),this.appendValueInput("m").setCheck(Number).appendField(mt.Msg.MIXLY_MINUTE),this.appendValueInput("s").setCheck(Number).appendField(mt.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},$m={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.DRAW_CLOCK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Zm={init:function(){this.setColour(Kh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(mt.Msg.CLEAR_CLOCK),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_STM32_TFT_BACKGROUND_COLOR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},tE={init:function(){this.jsonInit({colour:Kh,args0:[{name:"shape",options:[[mt.Msg.MPYTHON_DISPLAY_HOLLOW,"False"],[mt.Msg.MPYTHON_DISPLAY_SOLID,"True"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"r",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:mt.Msg.mpython_HELPURL,message0:mt.Msg.ONBOARD_TFT_DISPLAY_SHAPE_CIRCLE_MESSAGE0,nextStatement:null,previousStatement:null})}},eE={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.DRAW_POINTER).appendField(mt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(mt.Msg.MIXLY_DRAW_POINTER_DU),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.DRAW_POINTER_TOOLTIP)}},iE={init:function(){this.setColour(Kh),this.appendDummyInput().appendField(mt.Msg.DRAW_POINTER).appendField(mt.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(mt.Msg.MIXLY_DRAW_POINTER_DU),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.DRAW_POINTER_TOOLTIP)}},nE={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.MIXLY_Display_long_text),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(mt.Msg.HTML_COLOUR);Et.Boards.getSelectedBoardKey();"Python ESP32-S3"===Et.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(mt.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},sE={init:function(){this.setColour(Kh),this.appendValueInput("data").appendField(mt.Msg.OLED_BITMAP),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.OLED_BITMAP_OR_STRING),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},_E={init:function(){zh.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},oE={init:function(){$h.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},pE={init:function(){om.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},aE={init:function(){um.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},uE={init:function(){rm.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},rE={init:function(){lm.init.call(this),this.appendDummyInput().appendField(`(${mt.Msg.MIXLY_DEPRECATED})`),this.setWarningText(mt.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},lE=180,dE={init:function(){this.setColour(lE),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(mt.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_LET2).appendField(new mt.FieldDropdown(dE.OPERATORS),"OP"),this.appendValueInput("val").appendField(mt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=mt.Msg.DISPLAY_IMAGE_LET,n=mt.Msg.DISPLAY_IMAGE_LET2,s=mt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:mt.Msg.MIXLY_UP,down:mt.Msg.MIXLY_DOWN,left:mt.Msg.MIXLY_LEFT,right:mt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[mt.Msg.MIXLY_UP,"up"],[mt.Msg.MIXLY_DOWN,"down"],[mt.Msg.MIXLY_LEFT,"left"],[mt.Msg.MIXLY_RIGHT,"right"]]},IE={init:function(){this.setColour(lE),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(mt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new mt.FieldDropdown(IE.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":mt.Msg.MIXLY_MICROBIT_image_add,"-":mt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[mt.Msg.MICROBIT_DISPLAY_UNION,"+"],[mt.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},TE={init:function(){this.setColour(lE),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+mt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new mt.FieldDropdown(TE.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+mt.Msg.MIXLY_MICROBIT_IMAGE+{height:mt.Msg.MIXLY_HEIGHT,width:mt.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[mt.Msg.MIXLY_HEIGHT,"height"],[mt.Msg.MIXLY_WIDTH,"width"]]},ME={init:function(){this.setColour(lE),this.appendValueInput("VAR").appendField(mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RECT).appendField(new mt.FieldDropdown(ME.STATUS),"OP"),this.jsonInit({message0:mt.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_OLED_RECT)},STATUS:[[mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},hE={init:function(){this.setColour(lE),this.appendValueInput("VAR").appendField(mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new mt.FieldDropdown(hE.STATUS),"OP"),this.jsonInit({message0:mt.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},mE={init:function(){this.setColour(lE),this.appendValueInput("VAR").appendField(mt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_DISPLAY_DRAW+mt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new mt.FieldDropdown(mE.STATUS),"OP"),this.jsonInit({message0:mt.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(mt.Msg.MIXLY_DISPLAY_DRAW+mt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[mt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[mt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},EE="#777777",OE={init:function(){this.setColour(EE),this.appendDummyInput("").appendField("from ").appendField(new mt.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new mt.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},RE={init:function(){this.setColour(EE),this.appendDummyInput("").appendField("import ").appendField(new mt.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cE={init:function(){this.setColour(EE),this.appendDummyInput("").appendField(new mt.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new mt.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},aO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},uO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},rO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},lO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(mt.Msg.MIXLY_WIFI_USERNAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(mt.Msg.MIXLY_IOT_PASSWORD).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_PROJECT).setAlign(mt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(mt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},IO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_SUBSCRIBE+mt.Msg.MIXLY_MICROBIT_MSG).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(mt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},TO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},MO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},EO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},OO={init:function(){this.setColour(eO),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},RO={init:function(){this.setColour(eO),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},cO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(mt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},gO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO").appendField(mt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(mt.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},CO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+mt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},SO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(mt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},AO={init:function(){this.VISITOR_ID=Et.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(eO),this.appendDummyInput("").appendField(new mt.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},LO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MixIO").appendField(mt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},NO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("HTTP"+mt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(mt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(mt.Msg.MIXLY_REQUESTS_GET).appendField(mt.Msg.MIXLY_GET_CURRENT_TIME).appendField(mt.Msg.MIXLY_OPEN_DEBUG).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},DO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("HTTP"+mt.Msg.MIXLY_Client).appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[mt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[mt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},fO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MQTT"+mt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(mt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(mt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(mt.Msg.MQTT_Topic).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(mt.Msg.MIXLY_OPEN_DEBUG).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[mt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},FO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("MQTT"+mt.Msg.MIXLY_Client).appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[mt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[mt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},PO=iO,vO=nO,YO=sO,XO=_O,yO=pO,xO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(mt.Msg.MODEL_NAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(mt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bO=xO,VO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(mt.Msg.MIXLY_API_PRIVATE_KEY).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(mt.Msg.MODEL_NAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(mt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},BO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(mt.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},GO={init:function(){this.setColour(eO),this.appendDummyInput().appendField(mt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(mt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},UO={init:function(){this.setColour(eO),this.appendDummyInput().appendField("Ollama "+mt.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wO=225,kO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(mt.Msg.MIXLY_NETWORK_MODE).appendField(new mt.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},HO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[mt.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=mt.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:mt.Msg.MIXLY_NETWORK_WIFI_OPEN,False:mt.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},WO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},KO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return mt.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:mt.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},JO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(mt.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(mt.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},qO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_NETWORK_WIFI_CONNECT+mt.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},zO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[mt.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[mt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:mt.Msg.MIXLY_ESP32_NETWORK_IP,1:mt.Msg.MIXLY_ESP32_NETWORK_MASK,2:mt.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},QO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},jO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[mt.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},$O={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(mt.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(mt.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},ZO={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},tR={init:function(){this.setColour(wO),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new mt.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},eR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},iR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},nR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},sR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},_R={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},oR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},pR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},aR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},uR={init:function(){this.setColour(wO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},rR={init:function(){this.setColour(wO),this.appendValueInput("DOMAIN").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(mt.Msg.blockpy_REQUESTS_GET).appendField(new mt.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},lR={init:function(){this.appendValueInput("VAL"),this.setColour(wO),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(lR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:mt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:mt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:mt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[mt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},dR={init:function(){this.appendValueInput("VAR").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(wO),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown(dR.METHOD),"DIR"),this.appendDummyInput("").appendField(mt.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:mt.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:mt.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},IR={init:function(){this.setColour(wO),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(mt.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},TR={init:function(){this.setColour(wO),this.appendDummyInput("").appendField(new mt.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},MR="#3288dd",hR={init:function(){this.setColour(MR),this.appendValueInput("URL").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(mt.Msg.blockpy_REQUESTS).appendField(mt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},mR={init:function(){this.setColour(MR),this.appendValueInput("URL").appendField(mt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(mt.Msg.blockpy_CONDUCT).appendField(new mt.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(mt.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(mt.Msg.blockpy_REQUESTS+mt.Msg.OLED_STRING),this.appendDummyInput("").appendField(mt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},ER={init:function(){this.appendValueInput("VAL"),this.setColour(MR),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown(ER.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[mt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[mt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[mt.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},OR={init:function(){this.setColour(MR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(mt.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(mt.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(mt.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(mt.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},RR={init:function(){this.setColour(MR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_SERVER).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(mt.Msg.MIXLY_EMQX_PORT).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(mt.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(mt.Msg.MIXLY_WIFI_USERNAME).setAlign(mt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(mt.Msg.MIXLY_IOT_PASSWORD).setAlign(mt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cR={init:function(){this.setColour(MR),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_SUBSCRIBE+mt.Msg.MIXLY_MICROBIT_MSG).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(mt.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},gR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_SUBSCRIBE+mt.Msg.MIXLY_MICROBIT_MSG).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(mt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},CR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(mt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(mt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(mt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},SR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("mqtt"+mt.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},AR=100,LR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("I2CSUB").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(e),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},NR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0,Number),this.setInputsInline(!0)}},DR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField(mt.Msg.MOTOR_DC).appendField(mt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Direction).appendField(new mt.FieldDropdown([[mt.Msg.CLOCKWISE,"CW"],[mt.Msg.ANTI_CLOCKWISE,"CCW"],[mt.Msg.MOTOR_P,"P"],[mt.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField(mt.Msg.MOTOR_DC).appendField(mt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(mt.Msg.MIXLY_STEPPER_GET_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},FR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_MOVE)}},PR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(mt.inputs.Align.RIGHT).appendField(mt.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},vR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+mt.Msg.MIXLY_SERVO),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},YR={init:function(){var t=Et.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==t)var e="CE G6";else if("mixgo_pe"==t)e="PE G1";this.setColour(AR),this.appendValueInput("SUB").appendField(e).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+mt.Msg.MIXLY_SERVO).appendField(mt.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET+mt.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},XR="#A58C5B",yR={init:function(){this.setColour(XR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(mt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SENOR_IS_PRESSED)}},xR={init:function(){this.setColour(XR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(mt.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_SENOR_WAS_PRESSED)}},bR={init:function(){this.setColour(XR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(mt.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.PROCEDURES_DEFRETURN_RETURN+mt.Msg.MIXLY_BUTTON+mt.Msg.MIXLY_GET_PRESSES)}},VR={init:function(){this.setColour(XR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_BUTTON).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[mt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[mt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},BR={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_shake,"shake"],[mt.Msg.MIXLY_UP,"up"],[mt.Msg.MIXLY_DOWN,"down"],[mt.Msg.MIXLY_LEFT,"left"],[mt.Msg.MIXLY_RIGHT,"right"],[mt.Msg.MIXLY_MICROBIT_face_up,"face up"],[mt.Msg.MIXLY_MICROBIT_face_down,"face down"],[mt.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=mt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=mt.Msg.MSG.catSensor,s=mt.Msg.MIXLY_MICROBIT_JS_STATE,_=mt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:mt.Msg.MIXLY_MICROBIT_shake,up:mt.Msg.MIXLY_UP,down:mt.Msg.MIXLY_DOWN,left:mt.Msg.MIXLY_LEFT,right:mt.Msg.MIXLY_RIGHT,"face up":mt.Msg.MIXLY_MICROBIT_face_up,"face down":mt.Msg.MIXLY_MICROBIT_face_down,freefall:mt.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+_}))}},GR={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},UR={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},wR={init:function(){this.setColour(XR),this.appendValueInput("PIN",Number).appendField(new mt.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new mt.FieldDropdown(wR.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:mt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]},kR={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},HR={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},WR={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new mt.FieldDropdown([[mt.Msg.TEXT_TRIM_LEFT,"left"],[mt.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(mt.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=mt.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=mt.Msg.MIXLY_ESP32_NEAR;return i+{left:mt.Msg.TEXT_TRIM_LEFT,right:mt.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},KR={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_ALTITUDE_SENSOR+" BMP280").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[mt.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":mt.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":mt.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},JR={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+" SHT20").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[mt.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},qR={init:function(){this.setColour(XR),this.appendValueInput("PIN",Number).appendField("DS18X20 "+mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},zR={init:function(){this.setColour(XR),this.appendDummyInput("").appendField("LM35"+mt.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(mt.Msg.MIXLY_TOOLTIP_LM35)}},QR={init:function(){this.setColour(XR),this.appendValueInput("I2CSUB").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_EXTERN_LIGHT+"(LTR308ALS)","LTR308"],[mt.Msg.MIXLY_COLOR_SENSOR+"(LTR381RGB)","LTR381RGB"],[mt.Msg.MIXLY_COLOR_SENSOR+"(UCS12071)","UCS12071"],[mt.Msg.MIXLY_EXTERN_LIGHTUV+"(LTR390UV)","LTR390UV"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(HP203X)","HP203X"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(SPL06_001)","SPL06_001"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(MS5611)","MS5611"],[mt.Msg.MIXLY_ALTITUDE_SENSOR+"(BMP280)","BMP280"],[mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHTC3)","SHTC3"],[mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(AHT21)","AHT21"],[mt.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHT20)","SHT20"],[mt.Msg.MIXLY_LASER_RANGE_SENSOR+"(VL53L0X)","VL53L0X"],[mt.Msg.MIXLY_GEOMAGNETIC_SENSOR+"(QMC5883L)","QMC5883L"],[mt.Msg.MIXLY_ESP32_MAX30102+"(MAX30102)","MAX30102"],[mt.Msg.HTML_COLOUR+"、"+mt.Msg.MIXLY_ENVIRONMENT_LIGHT+"、"+mt.Msg.MIXLY_NEXT+"、"+mt.Msg.MIXLY_ESP32_APDS9960+"(APDS9960)","APDS9960"],[mt.Msg.MIXLY_NINE_AXIS_SENSOR+"(MPU9250)","MPU9250"],[mt.Msg.MixGo_MPU9250+"(ADXL345)","ADXL345"],["RFID","RFID"],[mt.Msg.MIXLY_RADAR_SENSOR+"(CBR817)","CBR817"],[mt.Msg.MIXLY_AipSpeech_asr+"(CI130X)","CI130X"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},jR={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(mt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+mt.Msg.MIXLY_DELAY_TIME_RANGE)}},$R={init:function(){this.setColour(XR),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RADAR).appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(mt.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+mt.Msg.MIXLY_DELAY_TIME_RANGE)}},ZR={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},tc={init:function(){this.setColour(XR),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RADAR).appendField(mt.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},ec={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_IDENTIFY_ONCE_AND_SAVE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ic={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_HELLO_XIAOZHI,"1"],[mt.Msg.MIXLY_XIAOZHIXIAOZHI,"2"],[mt.Msg.MIXLY_THE_FIRST,"3"],[mt.Msg.MIXLY_THE_SECOND,"4"],[mt.Msg.MIXLY_THE_THIRD,"5"],[mt.Msg.MIXLY_THE_FOURTH,"6"],[mt.Msg.MIXLY_THE_FIFTH,"7"],[mt.Msg.MIXLY_THE_SIXTH,"8"],[mt.Msg.MIXLY_THE_SEVENTH,"9"],[mt.Msg.MIXLY_THE_EIGHTH,"10"],[mt.Msg.MIXLY_THE_NINTH,"11"],[mt.Msg.MIXLY_THE_TENTH,"12"],[mt.Msg.MIXLY_THE_ELEVENTH,"13"],[mt.Msg.MIXLY_THE_TWELFTH,"14"],[mt.Msg.MIXLY_THE_13TH,"15"],[mt.Msg.MIXLY_THE_14TH,"16"],[mt.Msg.MIXLY_THE_15TH,"17"],[mt.Msg.MIXLY_THE_16TH,"18"],[mt.Msg.MIXLY_THE_17TH,"19"],[mt.Msg.MIXLY_THE_18TH,"20"],[mt.Msg.MIXLY_THE_19TH,"21"],[mt.Msg.MIXLY_THE_20TH,"22"],[mt.Msg.MIXLY_Turn_on_the_lights,"23"],[mt.Msg.MIXLY_Turn_off_the_lights,"24"],[mt.Msg.MIXLY_Turn_up_the_brightness,"25"],[mt.Msg.MIXLY_Turn_down_the_brightness,"26"],[mt.Msg.MIXLY_Set_it_to_red,"27"],[mt.Msg.MIXLY_Set_it_to_orange,"28"],[mt.Msg.MIXLY_Set_it_to_yellow,"29"],[mt.Msg.MIXLY_Set_it_to_green,"30"],[mt.Msg.MIXLY_Set_it_to_cyan,"31"],[mt.Msg.MIXLY_Set_it_to_blue,"32"],[mt.Msg.MIXLY_Set_it_to_purple,"33"],[mt.Msg.MIXLY_Set_it_to_white,"34"],[mt.Msg.MIXLY_Turn_on_the_fan,"35"],[mt.Msg.MIXLY_Turn_off_the_fan,"36"],[mt.Msg.MIXLY_First_gear,"37"],[mt.Msg.MIXLY_Wind_speed_second,"38"],[mt.Msg.MIXLY_Third_gear,"39"],[mt.Msg.MIXLY_Previous,"40"],[mt.Msg.MIXLY_Next_page,"41"],[mt.Msg.MIXLY_Show_smiley_face,"42"],[mt.Msg.MIXLY_Show_crying_face,"43"],[mt.Msg.MIXLY_Show_love,"44"],[mt.Msg.MIXLY_Close_display,"45"],[mt.Msg.MIXLY_Start_execution,"46"],[mt.Msg.MIXLY_FORWARD,"47"],[mt.Msg.MIXLY_BACKWARD,"48"],[mt.Msg.MIXLY_TURNLEFT,"49"],[mt.Msg.MIXLY_TURNRIGHT,"50"],[mt.Msg.MIXLY_STOP,"51"],[mt.Msg.MIXLY_Accelerate,"52"],[mt.Msg.MIXLY_retard,"53"],[mt.Msg.ROTATION_FORWARD,"54"],[mt.Msg.ROTATION_BACKWARD,"55"],[mt.Msg.MIXLY_Query_temperature,"56"],[mt.Msg.MIXLY_Query_humidity,"57"],[mt.Msg.MIXLY_Query_brightness,"58"],[mt.Msg.MIXLY_Query_sound,"59"],[mt.Msg.MIXLY_Query_time,"60"],[mt.Msg.MIXLY_Query_distance,"61"],[mt.Msg.MIXLY_Query_pressure,"62"],[mt.Msg.MIXLY_Query_key,"63"],[mt.Msg.MIXLY_Query_touch,"64"],[mt.Msg.MIXLY_Query_color,"65"]]),"cmd").appendField(mt.Msg.MIXLY_WHETHER+mt.Msg.MIXLY_BE_IDENTIFIED),this.setOutput(!0),this.setInputsInline(!0)}},nc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RECOGNIZED_STATE,"status1"],[mt.Msg.MIXLY_WHETHER_BROADCAST,"status2"],[mt.Msg.MIXLY_THE_RECOGNIZED_CMD,"result"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_CI130X_GET_THE_RECOGNIZED_STATE_TOOLTIP)}},sc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MP3_PLAY).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[mt.Msg.MIXLY_WIND_SPEED,"154"],[mt.Msg.MIXLY_HYETAL,"155"],[mt.Msg.MIXLY_TEMPERATURE,"156"],[mt.Msg.MIXLY_Humidity,"157"],[mt.Msg.MIXLY_Altitude,"158"],[mt.Msg.MIXLY_SOUND,"159"],[mt.Msg.MIXLY_BRIGHTNESS,"160"],[mt.Msg.ME_GO_HALL_SENSOR_DISTANCE,"161"],[mt.Msg.MIXLY_SERVO,"162"],[mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"163"],[mt.Msg.MIXLY_BUTTON2,"164"],[mt.Msg.MIXLY_ESP32_TOUCH,"165"],[mt.Msg.MIXLY_PAY,"166"],[mt.Msg.MIXLY_CARSH_CHANGE,"167"],[mt.Msg.MIXLY_COUNTDOWN,"168"],[mt.Msg.MIXLY_TIMING,"169"],[mt.Msg.MIXLY_AT_THE_MOMENT,"170"],[mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE,"171"],[mt.Msg.MIXLY_FORWARD,"172"],[mt.Msg.MIXLY_BACKWARD,"173"],[mt.Msg.MIXLY_TURNLEFT,"174"],[mt.Msg.MIXLY_TURNRIGHT,"175"],[mt.Msg.MIXLY_STOP,"176"],[mt.Msg.MIXLY_Accelerate,"177"],[mt.Msg.MIXLY_retard,"178"],[mt.Msg.ROTATION_FORWARD,"179"],[mt.Msg.ROTATION_BACKWARD,"180"],[mt.Msg.TUPLE_JOIN,"181"],[mt.Msg.MIXLY_SHOW,"182"],[mt.Msg.MIXLY_LAMPLIGHT,"183"],[mt.Msg.MIXLY_ACCELERATION,"184"]]),"star"),this.appendValueInput("NUM").appendField(mt.Msg.MIXLY_NUMBER),this.appendDummyInput("").appendField(mt.Msg.MIXLY_UNIT).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[mt.Msg.MIXLY_YEAR,"117"],[mt.Msg.MIXLY_MONTH,"118"],[mt.Msg.MIXLY_DAY,"119"],[mt.Msg.MIXLY_HOUR,"120"],[mt.Msg.MIXLY_MINUTE,"121"],[mt.Msg.MIXLY_SECOND,"122"],[mt.Msg.MIXLY_WEEK2,"123"],[mt.Msg.MIXLY_RMB_UNIT,"124"],[mt.Msg.blockpy_setheading_degree,"125"],[mt.Msg.MIXLY_GEAR,"126"],[mt.Msg.MIXLY_LAYER,"127"],[mt.Msg.MIXLY_GRAM,"128"],[mt.Msg.MIXLY_METER,"129"],[mt.Msg.MIXLY_CENTIMETER,"130"],[mt.Msg.MIXLY_MILLIMETER,"131"],[mt.Msg.MIXLY_LUMEN,"132"],[mt.Msg.MIXLY_DECIBEL,"133"],[mt.Msg.MIXLY_hectopascal,"134"],[mt.Msg.MIXLY_PERCENT,"135"],[mt.Msg.MIXLY_CELSIUS,"136"],[mt.Msg.MIXLY_METER_PER_SEC,"137"],[mt.Msg.MIXLY_MICROBIT_Turn_on_display,"138"],[mt.Msg.MIXLY_MICROBIT_Turn_off_display,"139"],[mt.Msg.MIXLY_SUCCESS,"140"],[mt.Msg.MIXLY_FAILED,"141"],[mt.Msg.MIXLY_WRONG,"142"],[mt.Msg.MIXLY_GOOD,"143"],[mt.Msg.MIXLY_blockpy_set_add,"144"],[mt.Msg.MIXLY_DECREASE,"145"],[mt.Msg.COLOUR_RGB_RED,"146"],[mt.Msg.COLOUR_RGB_ORANGE,"147"],[mt.Msg.COLOUR_YELLOW,"148"],[mt.Msg.COLOUR_RGB_GREEN,"149"],[mt.Msg.COLOUR_CYAN,"150"],[mt.Msg.COLOUR_RGB_BLUE,"151"],[mt.Msg.COLOUR_RGB_PURPLE,"152"],[mt.Msg.COLOUR_RGB_WHITE,"153"]]),"end"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},_c={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.LISTS_SET_INDEX_SET+mt.Msg.MIXLY_SYSTEM+mt.Msg.MIXLY_CMD).appendField(new mt.FieldDropdown([[mt.Msg.MILXY_ENTER_WAKE_UP,"1"],[mt.Msg.MIXLY_INCREASE_VOLUME,"202"],[mt.Msg.MIXLY_REDUCE_VOLUME,"203"],[mt.Msg.MIXLY_MAX_VOLUME,"204"],[mt.Msg.MIXLY_MINIMUM,"205"],[mt.Msg.MIXLY_OPEN_RESPONSE,"206"],[mt.Msg.MIXLY_CLOSE_RESPONSE,"207"],[mt.Msg.MIXLY_QUIT_WAKE_UP,"208"]]),"cmd"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},oc={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[mt.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[mt.Msg.MIXLY_ESP32_MAX30102_IR+","+mt.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},pc={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[mt.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[mt.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ac={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308ALS"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},uc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.HTML_COLOUR+mt.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET+mt.Msg.HTML_COLOUR,"[2]"],[mt.Msg.MIXLY_GET+mt.Msg.MIXLY_IR_STRENGTH,"[1]"],[mt.Msg.MIXLY_GET+mt.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},rc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.HTML_COLOUR+mt.Msg.MSG.catSensor+" UCS12071").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET+"RGB"+mt.Msg.HTML_COLOUR,"0"],[mt.Msg.MIXLY_GET+mt.Msg.MIXLY_RGB_RAW,"1"],[mt.Msg.MIXLY_GET_ENV_LIGHT+mt.Msg.MIXLY_BRIGHTNESS,"2"],[mt.Msg.GET_IR_STRENGTH+mt.Msg.MIXLY_BRIGHTNESS,"3"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},lc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GET_ENV_LIGHT,"E"],[mt.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},dc={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ic={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},Tc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[mt.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:mt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},Mc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETPRESSURE,"pressure()"],[mt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[mt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},hc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" SPL06_001").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETPRESSURE,"pressure()"],[mt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[mt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},mc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_GETPRESSURE,"pressure()"],[mt.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[mt.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ec={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_Altitude+mt.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendValueInput("VAR").appendField(mt.Msg.MIXLY_REF_TO_PRESSURE),this.appendDummyInput().appendField(mt.Msg.MIXLY_CAL_TO_ALTITUDE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Oc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MIXGOPE_FIELD+mt.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[mt.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Rc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_shake,"shake"],[mt.Msg.MIXLY_UP,"up"],[mt.Msg.MIXLY_DOWN,"down"],[mt.Msg.MIXLY_LEFT,"left"],[mt.Msg.MIXLY_RIGHT,"right"],[mt.Msg.MIXLY_MICROBIT_face_up,"face up"],[mt.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=mt.Msg.MIXLY_MICROBIT_JS_CURRENT,n=mt.Msg.MSG.catSensor,s=mt.Msg.MIXLY_MICROBIT_JS_STATE,_=mt.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:mt.Msg.MIXLY_MICROBIT_shake,up:mt.Msg.MIXLY_UP,down:mt.Msg.MIXLY_DOWN,left:mt.Msg.MIXLY_LEFT,right:mt.Msg.MIXLY_RIGHT,"face up":mt.Msg.MIXLY_MICROBIT_face_up,"face down":mt.Msg.MIXLY_MICROBIT_face_down}[e]+_}))}},cc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},gc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_GET+mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Cc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+mt.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new mt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=mt.Msg.MIXLY_MICROBIT_Direction,s=mt.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":mt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Sc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},Ac={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_GETTEMPERATUE)}},Lc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return mt.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:mt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:mt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},Nc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},Dc={init:function(){this.setColour(XR),this.appendValueInput("SPISUB").appendField(mt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(mt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP+mt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new mt.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},fc={init:function(){this.setColour(XR),this.appendDummyInput().appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[mt.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Fc={init:function(){this.setColour(XR),this.appendDummyInput().appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},Pc={init:function(){this.setColour(XR),this.appendDummyInput().appendField("RFID"+mt.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},vc={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(mt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Yc={init:function(){this.setColour(XR),this.appendDummyInput().appendField(mt.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(mt.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(mt.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(mt.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},Xc={init:function(){this.setColour(XR),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RFID_SCAN_OK,"0"],[mt.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[mt.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},yc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new mt.FieldDropdown([["全部(元组)","data()[0]"],["全部(json)","data()[1]"],["全部(json,附带位置信息)","data()[2]"],["编号","data()[0][0]"],["电量","data()[0][1]"],["风速","data()[0][2]"],["阵风","data()[0][3]"],["风向","data()[0][4]"],["雨量","data()[0][5]"],["温度","data()[0][6]"],["湿度","data()[0][7]"],["光照","data()[0][8]"],["紫外线","data()[0][9]"],["大气压","data()[0][10]"],["信号强度","data()[0][11]"],["信噪比","data()[0][12]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip("返回气象数据元组 data= (设备id,电池状态,风速m/s,阵风m/s,风向°,雨量mm,温度℃,湿度%,光照Lux,UVI,大气压Pa,信号强度dB,信噪比dB)")}},xc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},bc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendValueInput("BASE").appendField("以主题"),this.appendDummyInput("").appendField("串口发送至MixIO"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Vc={init:function(){this.setColour(XR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new mt.icons.MutatorIcon(["weather_set_label_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("weather_set_label_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n>6),i.push(128|63&_)):(2048<=_&&_<=55295||57344<=_&&_<=65535)&&(n+=3,i.push(224|15&_>>12),i.push(128|63&_>>6),i.push(128|63&_))}for(s=0;s>8,255&n].concat(i)}(t,!0),i="",n=0;n=0?"0x700000":["mixgo_sant"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==o?(e.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+_+", font_address="+p+")\n"):"16x8 Matrix"==o&&(e.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+_+")\n"),i},lP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},dP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},IP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},TP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},MP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},hP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},mP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},EP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},OP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},RP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},cP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},gP=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},CP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},SP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_"+t.getFieldValue("OP")+"("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"B",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},AP=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},LP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},NP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},DP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},fP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"width",e.ORDER_ATOMIC),o=e.valueToCode(this,"height",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP");switch(p){case"True":return i+".show_fill_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n";case"False":return i+".show_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n"}},FP=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+_+", 1)\n"},PP=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},vP=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},YP=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},XP=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},yP=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),_=e.valueToCode(this,"r",e.ORDER_ATOMIC),o="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(o){case"True":return i+".show_fill_circle("+n+", "+s+", "+_+", "+p+")\n";case"False":return i+".show_circle("+n+", "+s+", "+_+", "+p+")\n"}},xP=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),_=e.valueToCode(this,"x1",e.ORDER_ATOMIC),o=e.valueToCode(this,"y1",e.ORDER_ATOMIC),p=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",r=this.getFieldValue("OP");switch(u){case"True":return i+".show_fill_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n"}},bP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+","+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+","+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},VP=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},BP=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),_=this.getFieldValue("key");return"TM1650"==_?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+_+"("+s+")\n"):"TM1637"==_&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+_+"("+s+")\n"),i},GP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},UP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},wP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".showDP("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},kP=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},HP=function(t,e){e.definitions_.import_st7789="import st7789";var i=Et.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_sant"].indexOf(i)>=0?"0xE00000":"0x3A0000";var s=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),_=e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC),o=e.valueToCode(this,"PINCS",e.ORDER_ATOMIC),p=e.valueToCode(this,"PINDC",e.ORDER_ATOMIC);return s+" = st7789.ST7789("+_+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+", dc_pin="+p+", cs_pin="+o+", rotation="+this.getFieldValue("rotate")+", font_address="+n+")\n"},WP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".image("+n+", x="+s+", y="+_+", size="+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".image("+n+", x= "+s+",y="+_+", size="+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},KP=function(t,e){var i="0x"+this.getFieldValue("COLOR").slice(1);return["0x"+((16252928&i)>>8|(64512&i)>>5|(255&i)>>3).toString(16),e.ORDER_ATOMIC]},JP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==a.slice(0,2))var r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color="+a+")\n";else{const t=a.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},qP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p=i+".frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},zP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},QP=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},jP=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"x1",e.ORDER_ATOMIC),s=e.valueToCode(this,"y1",e.ORDER_ATOMIC),_=e.valueToCode(this,"x2",e.ORDER_ATOMIC),o=e.valueToCode(this,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".line("+n+", "+s+", "+_+", "+o+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".line("+n+", "+s+", "+_+", "+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},$P=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=this.getFieldValue("key"),_=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return e.definitions_.import_i2clcd="import i2clcd",i+" = i2clcd.LCD("+n+", lcd_width="+s+", i2c_addr="+_+")\n"},ZP=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+",center = "+this.getFieldValue("center")+")\n"},tv=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".print("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},ev=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},iv=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},nv=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC),_=this.getFieldValue("driver"),o=Et.Boards.getSelectedBoardKey().split(":")[2],p="";return p=["mpython","mixgo_pe","mixgo_nova"].indexOf(o)>=0?"0x700000":["mixgo_sant"].indexOf(o)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+", address="+s+", font_address="+p+", types="+_+")\n"},sv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},_v=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+")\n"},ov=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},pv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},av=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},uv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},rv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},lv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},dv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},Iv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},Tv=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},Mv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},hv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=t.getFieldValue("state");return i+"."+t.getFieldValue("shape")+"("+n+", "+s+", "+_+", "+o+", "+p+")\n"+i+".show()\n"},mv=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=t.getFieldValue("state");return i+"."+("0"==t.getFieldValue("dir_h_v")?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\n"+i+".show()\n"},Ev=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".line("+e.valueToCode(t,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y2",e.ORDER_ATOMIC)+", "+t.getFieldValue("state")+")\n"+i+".show()\n"},Ov=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var s="onboard_tft.image("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff,sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n"}else if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled";s="oled.print("+n+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.shows("+n+")\n"}return s},Rv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),_=this.getFieldValue("center");if("mixgo_sant"==i||"mixgo_nova"==i)return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+", space="+s+", center="+_+",sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n";if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled"}return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+", space="+s+", center="+_+")\n"},cv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var s="onboard_oled.frame("+n+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";s="onboard_tft.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.frame("+n+")\n"}return s},gv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var _="onboard_oled.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", delay="+s+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";_="onboard_tft.frame("+n+", size=5 , delay="+s+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";_="onboard_matrix.frame("+n+", delay="+s+")\n"}return _},Cv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";n="onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},Sv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var o="onboard_oled.scroll("+n+", speed="+s+", space="+_+")\n"}else if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";o="onboard_tft.scroll("+n+", y=0, size=5, speed="+s+", space="+_+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";o="onboard_matrix.scroll("+n+", speed="+s+", space="+_+")\n"}return o},Av=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},Lv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},Nv=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){const i=t.getFieldValue("image").split(".");if(2!==i.length)throw Error("pin value error");e.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`;var n=i[1]}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix."+t.getFieldValue("image")}return[n,e.ORDER_ATOMIC]},Dv=function(t,e){var i={"#000000":"0","#ff0000":"1"};function n(t){let e="";if(t.length%2==1&&(t="0"+t),t.length<8){let e=8-t.length;for(let i=1;i<=e;i++)t="0"+t}for(let i=1;i<=t.length;i++)i%2==0&&i!==t.length?e=e+t[i-1]+",0x":e+=t[i-1];return"0x"+e}let s=[];for(let e=0;e<12;e++){let _="",o=0,p=0;for(let n=0;n<32;n++)n<8?p=7-n:n<16?p=23-n:n<24?p=39-n:n<32&&(p=55-n),o+=Number(i[t.getFieldValue(e+"-"+n)])*Math.pow(2,31-p);_+=n(o.toString(16)),s.unshift(_)}let _=[];for(let t=0;t>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},dY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.picture("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"direct",e.ORDER_ASSIGNMENT)+")\n"},IY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=this.getFieldValue("center"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True",r=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==r.slice(0,2))var l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color="+r+",sync="+u+")\n";else{const t=r.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color=0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+",sync="+u+")\n"}return l},TY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},MY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"w",e.ORDER_ATOMIC),o=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=t.getFieldValue("shape"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+",sync="+u+")\n";else{const t=p.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+",sync="+u+")\n"}return r},hY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"length",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("dir_h_v"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},mY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x1",e.ORDER_ATOMIC),s=e.valueToCode(t,"y1",e.ORDER_ATOMIC),_=e.valueToCode(t,"x2",e.ORDER_ATOMIC),o=e.valueToCode(t,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},EY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},OY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),o=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var p="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+",sync="+o+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+",sync="+o+")\n"}return p},RY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==n.slice(0,2))var _="onboard_tft.fill("+n+",sync="+s+")\n";else{const t=n.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_="onboard_tft.fill(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+",sync="+s+")\n"}return _},cY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=o+"=Clock("+n+", "+s+", "+_+", "+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=o+"=Clock("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},gY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},CY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_time("+e.valueToCode(this,"h",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"m",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"s",e.ORDER_ASSIGNMENT)+")\n"},SY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},AY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2))var _=n+".clear("+s+")\n";else{const t=s.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");_=n+".clear(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+")\n"}return _},LY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),_=e.valueToCode(t,"r",e.ORDER_ATOMIC),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("shape"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const t=o.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+", "+p+",sync="+a+")\n"}return u},NY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Et.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n="onboard_tft.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}return n},DY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2));else{const t=s.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)}return"onboard_tft.pointern(angle="+n+")\n"},fY=function(t,e){var i=Et.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color="+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},FY=Ov,PY=bv,vY=Xv,YY=bv,XY=Vv,yY=Fv,xY=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},bY=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},VY=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},WB=function(){return"control.reset()\n"},KB=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Et.Profile.default.serial)+")\n"},JB=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Et.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Et.Profile.default.serial)+")\n"},qB=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Et.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Et.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},zB=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},QB=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},jB=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},$B=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},ZB=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},tG=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},eG=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},iG=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},nG=function(){return"while True:\n pass\n"},sG=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},_G=function(t,e){return e.definitions_.import_os="import os","os.uname()"},oG=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},pG=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},aG=function(t,e){return e.definitions_.import_mixgo="import mixgo",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period="+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=Timer."+(e.valueToCode(this,"mode",e.ORDER_NONE)||"None")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},uG=function(t,e){return e.definitions_.import_machine="import machine",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period = "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=machine.Timer."+this.getFieldValue("mode")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},rG=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},lG=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},dG=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},IG=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},TG=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},MG=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},hG=lG,mG=uG,EG=rG,OG=oG,RG=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},cG=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},gG=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api.weather_hourly("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"hour",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},CG=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")\n"},SG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_now.analysis()";else n='Weather_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},AG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Air_now.analysis()";else n='Air_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},LG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_alarm.analysis()";else n='Weather_alarm.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},NG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Life_suggestion.analysis()";else n='Life_suggestion.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},DG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Tide_daily.analysis()";else n='Tide_daily.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},fG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Location_search.analysis()";else n='Location_search.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},FG=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")\n"},PG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Weather_daily.analysis("+n+")";else s="Weather_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},vG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Air_daily.analysis("+n+")";else s="Air_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},YG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_sun.analysis("+n+")";else s="Geo_sun.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},XG=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_moon.analysis("+n+")";else s="Geo_moon.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},yG=new mt.Generator("Python");yG.INDENT=" ",yG.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),yG.ORDER_ATOMIC=0,yG.ORDER_COLLECTION=1,yG.ORDER_STRING_CONVERSION=1,yG.ORDER_UNARY_POSTFIX=1,yG.ORDER_UNARY_PREFIX=2,yG.ORDER_MEMBER=2.1,yG.ORDER_FUNCTION_CALL=2.2,yG.ORDER_EXPONENTIATION=3,yG.ORDER_UNARY_SIGN=4,yG.ORDER_BITWISE_NOT=4,yG.ORDER_MULTIPLICATIVE=5,yG.ORDER_ADDITIVE=6,yG.ORDER_BITWISE_SHIFT=7,yG.ORDER_BITWISE_AND=8,yG.ORDER_BITWISE_XOR=9,yG.ORDER_BITWISE_OR=10,yG.ORDER_RELATIONAL=11,yG.ORDER_EQUALITY=11,yG.ORDER_LOGICAL_NOT=12,yG.ORDER_LOGICAL_AND=13,yG.ORDER_LOGICAL_OR=14,yG.ORDER_ASSIGNMENT=14,yG.ORDER_CONDITIONAL=15,yG.ORDER_LAMBDA=16,yG.ORDER_NONE=99,yG.ORDER_OVERRIDES=[[yG.ORDER_FUNCTION_CALL,yG.ORDER_MEMBER],[yG.ORDER_FUNCTION_CALL,yG.ORDER_FUNCTION_CALL],[yG.ORDER_MEMBER,yG.ORDER_MEMBER],[yG.ORDER_MEMBER,yG.ORDER_FUNCTION_CALL]],yG.init=function(){yG.PASS=this.INDENT+"pass\n",yG.definitions_=Object.create(null),yG.functionNames_=Object.create(null),yG.setups_=Object.create(null),yG.loops_=Object.create(null),yG.codeEnd_=Object.create(null),yG.variableDB_?yG.variableDB_.reset():yG.variableDB_=new gt(yG.RESERVED_WORDS_)},yG.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var _=this.definitions_[s];0===s.indexOf("import")?e.push(_):0===s.indexOf("var_declare")?i.push(_):n.push(_)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var o=[];for(var s in yG.functions_)o.push(yG.functions_[s]);o.length&&o.push("\n");var p=[];for(var s in yG.setups_)p.push(yG.setups_[s]);p.length&&p.push("\n");var a=[];for(var s in yG.loops_)a.push(yG.loops_[s]);var u=[];for(var s in yG.codeEnd_)u.push(yG.codeEnd_[s]);0!==u.length&&u.push("\n");let r="";return r=a.length>0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+t+u.join("\n"),r},yG.scrubNakedValue=function(t){return t+"\n"},yG.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},yG.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},yG.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(_=t.getCommentText())&&(_=mt.utils.string.wrap(_,yG.COMMENT_WRAP-3),n+=yG.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const xG={};xG["MixGo CE"]={description:"MicroPython[ESP32C3 MixGo CE]",digital_pin:Et.Profile.generate(["0-18","21-46"]),input_pin:Et.Profile.generate(["0-18","21-46"]),output_pin:Et.Profile.generate(["0-18","21-45"]),pwm_input:Et.Profile.generate(["0-18","21-46"],"pwm","pwm"),analog_input:Et.Profile.generate(["0-18","21-46"],"adc","adc"),pwm_output:Et.Profile.generate(["0-18","21-45"],"pwm","pwm"),analog_output:Et.Profile.generate(["0-18","21-45"],"adc","adc"),espnow_channel:Et.Profile.generate(["1-13"]),haskylens_model:Et.Profile.generate(["0-4"]),digital:Et.Profile.generate(["0-18","21-45"],"pin","pin"),pwm_pin:Et.Profile.generate(["0-18","21-45"]),pwm:Et.Profile.generate(["0-18","21-45"],"pwm","pwm"),analog_pin:Et.Profile.generate(["1-18"]),analog:Et.Profile.generate(["1-18"],"adc","adc"),dac_pin:Et.Profile.generate(["17-18"]),dac:Et.Profile.generate(["17-18"],"dac","dac"),touch:Et.Profile.generate(["1-14"],"tc","tc"),touch_pin:Et.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Et.Profile.generate(["0-4"]),exlcdh:Et.Profile.generate(["0-15"]),exlcdv:Et.Profile.generate(["0-7"]),brightness:Et.Profile.generate(["0-9"]),tts_voice:Et.Profile.generate(["0-16"]),tts_builtin_music:Et.Profile.generate(["0-47"]),tts_bgmusic:Et.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["MUSIC_QUAVERS","onboard_matrix.MUSIC_QUAVERS"],["MUSIC_QUAVER","onboard_matrix.MUSIC_QUAVER"],["MUSIC_CROTCHET","onboard_matrix.MUSIC_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},xG["ESP32S2 Generic"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:Et.Profile.generate(["0-42","45"]),input_pin:Et.Profile.generate(["0-42","45-46"]),output_pin:Et.Profile.generate(["0-42","45"]),pwm_input:Et.Profile.generate(["0-42","45-46"],"pwm","pwm"),analog_input:Et.Profile.generate(["0-18","21-46"],"adc","adc"),pwm_output:Et.Profile.generate(["0-42","45"],"pwm","pwm"),analog_output:Et.Profile.generate(["0-42","45"],"adc","adc"),espnow_channel:Et.Profile.generate(["1-13"]),haskylens_model:Et.Profile.generate(["0-4"]),digital:Et.Profile.generate(["0-42","45"],"pin","pin"),pwm_pin:Et.Profile.generate(["0-42","45"]),pwm:Et.Profile.generate(["0-42","45"],"pwm","pwm"),analog_pin:Et.Profile.generate(["1-20"]),analog:Et.Profile.generate(["1-20"],"adc","adc"),dac_pin:Et.Profile.generate(["17-18"]),dac:Et.Profile.generate(["17-18"],"dac","dac"),touch:Et.Profile.generate(["1-14"],"tc","tc"),touch_pin:Et.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Et.Profile.generate(["0-4"]),exlcdh:Et.Profile.generate(["0-15"]),exlcdv:Et.Profile.generate(["0-7"]),brightness:Et.Profile.generate(["0-9"]),tts_voice:Et.Profile.generate(["0-16"]),tts_builtin_music:Et.Profile.generate(["0-47"]),tts_bgmusic:Et.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["MUSIC_QUAVERS","onboard_matrix.MUSIC_QUAVERS"],["MUSIC_QUAVER","onboard_matrix.MUSIC_QUAVER"],["MUSIC_CROTCHET","onboard_matrix.MUSIC_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]};const bG=xG,VG=20,BG={init:function(){this.setColour(VG),this.appendDummyInput("").appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_HIGH,"HIGH"],[mt.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},GG={init:function(){this.setColour(VG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(mt.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},UG={init:function(){this.setColour(VG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},wG={init:function(){this.setColour(VG),this.appendValueInput("PIN",Number).appendField("DAC"+mt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_TOOLTIP)}},kG={init:function(){this.setColour(VG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendDummyInput().appendField(mt.Msg.MIXLY_MICROBIT_JS_PERIOD_MIL).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_mSecond,"period"],[mt.Msg.MIXLY_uSecond,"period_microseconds"]]),"key"),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_SET_TOOLTIP)}},HG={init:function(){this.setColour(VG),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_REF_VOLTAGE+mt.Msg.MIXLY_STAT).appendField(new mt.FieldDropdown([["3.3V","machine.ADC.ATTN_11DB"],["2.2V","machine.ADC.ATTN_6DB"],["1.5V","machine.ADC.ATTN_2_5DB"],["1.2V","machine.ADC.ATTN_0DB"]]),"atten"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_ATTEN_TOOLTIP)}},WG={init:function(){this.setColour(VG),this.appendValueInput("pin").appendField(mt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(mt.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(mt.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_TOOLTIP)}},KG={init:function(){this.setColour(20),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_ATTACHINTERRUPT_PIN).setCheck(Number),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MODE).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[mt.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[mt.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(mt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},JG={init:function(){this.setColour(20),this.appendDummyInput().appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("pin#"),"PIN_OBJ"),this.appendDummyInput("").appendField(mt.Msg.MIXLY_MICROPYTHON_AS).appendField(new mt.FieldDropdown([[mt.Msg.MIXLY_Digital_PINMODEOUT,"machine.Pin.OUT"],[mt.Msg.MIXLY_Digital_PINMODEIN,"machine.Pin.IN"],[mt.Msg.MIXLY_PINMODEPULLUP,"machine.Pin.IN, machine.Pin.PULL_UP"],[mt.Msg.MIXLY_PINMODEPULLDOWN,"machine.Pin.IN, machine.Pin.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)},getVars:function(){return["pin#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},qG={init:function(){this.setColour(VG),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("dac#"),"PIN_OBJ").appendField(mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("DAC"+mt.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_INIT_TOOLTIP)},getVars:function(){return["dac#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},zG={init:function(){this.setColour(VG),this.appendDummyInput("").appendField(mt.Msg.MIXLY_SETUP).appendField(new mt.FieldTextInput("tc#"),"PIN_OBJ").appendField(mt.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(mt.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendValueInput("PIN",Number).appendField(mt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_INIT_TOOLTIP)},getVars:function(){return["tc#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(t,e){mt.Names.equals(t,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(e,"PIN_OBJ")}},QG={init:function(){this.setColour(VG),this.appendValueInput("PIN",Number).appendField("PWM"+mt.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(mt.Msg.MIXLY_FREQUENCY+mt.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(mt.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_SET_FREQ_TOOLTIP)}},jG=JG,$G=zG,ZG=WG,tU=KG,eU=230,iU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital),"PIN"),this.setOutput(!0)}},nU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},sU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},_U={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},oU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},pU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},aU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},uU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},rU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},lU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},dU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},IU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},TU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},MU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},hU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},mU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},EU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog),"PIN"),this.setOutput(!0)}},OU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},RU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.dac),"PIN"),this.setOutput(!0)}},cU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},gU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},CU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},SU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm),"PIN"),this.setOutput(!0)}},AU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},LU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},NU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.touch),"PIN"),this.setOutput(!0)}},DU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},fU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},FU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},PU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.imglist),"PIN"),this.setOutput(!0)}},vU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.playlist),"PIN"),this.setOutput(!0)}},YU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},XU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},yU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},xU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},bU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},VU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},BU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},GU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},UU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},wU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},kU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},HU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.one_more),"PIN"),this.setOutput(!0)}},WU={init:function(){this.setColour(eU),this.appendDummyInput("").appendField(new mt.FieldDropdown(Et.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},KU=function(t,e){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",e.ORDER_ATOMIC]},JU=function(t,e){e.definitions_.import_machine="import machine";var i="";return i+=e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value("+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},qU=function(t,e){e.definitions_.import_machine="import machine";return[e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".value()",e.ORDER_ATOMIC]},zU=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".write("+e.valueToCode(this,"NUM",e.ORDER_ATOMIC)+")\n"},QU=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=e.valueToCode(this,"NUM",e.ORDER_ATOMIC);return i+".set_analog_"+this.getFieldValue("key")+"("+n+")\n"},jU=function(t,e){return e.definitions_.import_machine="import machine",[e.valueToCode(this,"pin",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},$U=function(t,e){e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),n=this.getFieldValue("mode");return"machine.Pin("+i+").irq(handler = "+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+", trigger = "+n+")\n"},ZU=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"pin#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),s=this.getFieldValue("MODE");return("pin#"==i?"pin"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.Pin("+n+", "+s+")\n"},tw=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"dac#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("dac#"==i?"dac"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.DAC(machine.Pin("+n+"))\n"},ew=function(t,e){return e.definitions_.import_machine="import machine",e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},iw=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"tc#",n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC);return("tc#"==i?"tc"+n:e.variableDB_.getName(i,mt.Variables.NAME_TYPE))+" = machine.TouchPad(machine.Pin("+n+"))\n"},nw=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},sw=nw,_w=nw,ow=nw,pw=nw,aw=nw,uw=nw,rw=nw,lw=nw,dw=nw,Iw=nw,Tw=nw,Mw=nw,hw=nw,mw=nw,Ew=nw,Ow=nw,Rw=nw,cw=nw,gw=nw,Cw=nw,Sw=nw,Aw=nw,Lw=nw,Nw=nw,Dw=nw,fw=nw,Fw=nw,Pw=nw,vw=nw,Yw=nw,Xw=nw,yw=nw,xw=nw,bw=nw,Vw=nw,Bw=nw,Gw=nw,Uw=nw,ww=nw,kw=nw,Hw=nw,Ww=nw,Kw=nw,Jw=nw;Object.assign(mt.Variables,Rt),Object.assign(mt.Procedures,vu),mt.Python=Yu,mt.generator=Yu,Et.Profile.default={},Object.assign(Et.Profile,bG),Object.assign(Et.Profile.default,bG["MixGo CE"]),Object.assign(mt.Blocks,e,i,n,s,_,o,p,a,u,r,l,d,I,V,W,H,X,B,K,f,k,w,U,G,F,D,N,x,y,b,P,v,Y,It,Tt),Object.assign(mt.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,st,lt,rt,tt,_t,dt,z,ut,at,pt,ot,Q,q,J,it,et,nt,j,$,Z,Mt,ht)})(); \ No newline at end of file diff --git a/boards/default/micropython_esp32s3/build/Mixgo_Sant_lib-v1.13.0.bin b/boards/default/micropython_esp32s3/build/Mixgo_Sant_lib-v1.13.0.bin index 08df61a4..699443af 100644 Binary files a/boards/default/micropython_esp32s3/build/Mixgo_Sant_lib-v1.13.0.bin and b/boards/default/micropython_esp32s3/build/Mixgo_Sant_lib-v1.13.0.bin differ diff --git a/boards/default/micropython_esp32s3/index.xml b/boards/default/micropython_esp32s3/index.xml index e017eb35..6f3e876b 100644 --- a/boards/default/micropython_esp32s3/index.xml +++ b/boards/default/micropython_esp32s3/index.xml @@ -1 +1 @@ -02000attachInterrupt_funcattachInterrupt_func10,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!ms10timtim1000tim_callbacktim_callback5000200090x151100a10.998124.82997110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyMixly,HelloMixlyprompt02MixlyMixly0XFF00FFcodebMixlyMixly1attachInterrupt_funcattachInterrupt_func00Mixly0Mixly2022711420452023,1,1,12,0,0180292023,1,1,12,0,01001001004401000/sd/1.wav5/sd/1.wavhttps://gitee.com/dahanzimin/test/raw/master/wav/8.wav44044010000412000000000001000100010020000Hello, Mixly!10001#ffffff255,255,0Mixly0Mixly0010#ffffff255,255,0Mixly001#ffffff255,255,00012.jpgMixlyMixly0550#ffffff255,255,0MixlyMixly5500#ffffff255,255,00020#ffffff255,255,0005050#ffffff255,255,020202015#ffffff255,255,0606040#ffffff255,255,010000#ffffff255,255,00.5#ffffff255,255,0new_clock16012040#ffffff255,255,0new_clock806440#ffffff255,255,0new_clocknew_clock8200new_clocknew_clock0x0000000,0,00#ffffff255,255,012.jpgaiaiaiai1aiai1aiai1ai1aiai1ai1aiai0ai00Mixly0Mixly5000500wifinamewifipasswordmixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012http://mixio.mixly.cn/time.phpmixio.mixly.cn12.jpgwifinamewifipasswordcsub_cb31444082183.230.40.3914109261n63JySRowo13ZLDBKw6y896E0=MixlyRobotsub_cbEQmsg1ciot_dict"tc"tc0ciot_dictccwifinamewifipasswordclientEnter Your API_KEYEnter Your SECRET_KEYclient1clientS72099北京今天天气如何?wifinamewifipasswordSVa3S0UKHIy9dDArs北京SVa3S0UKHIy9dDArs北京11111ble_cble_pMixlyble_cble_cMixlyble_cble_xble_xble_xMixlyble_xble_xble_methodble_methodEQdataMixlyhandlehandle_methodhandle_methodkey1key2key3keyxble_keyboard_mouse10Hello, Mixly!10i2c2221100000i2c00i2c00i2ci2ci2cspi200000045spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345buf1Mixlyow12owowow12345ow12345owmy_now0my_nowmy_nowmy_nowFFFFFFFFFFFFmixlymy_nowmy_nowcbcbEQmsg1spi10000004512spi8my_lora433.925716my_loramy_loramy_loraMixlyi2c_extend45100000xsensori2c_extendxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor1013.25xsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor5000500xsensorxsensorxsensorxsensorxsensorxsensorspi10000004512spi8ysensorysensorysensor0ysensor0ysensor0Mixlyysensor0Mixlyysensorysensor39,119.96,31.67ysensorysensorstation45ps2_handle24512ps2_handle50ps2_handleps2_handlews_wr123ws_wrws_wrws_wr360010zsensorzsensorzsensorzsensorzsensorweight12500weightKEYPAD_4_4123A456B789C*0#DKEYPAD_4_4midi0midi440midi4401000midimidimidi4120midimidirgb04rgb0000rgb000rgb0001000rgb1000rgb100100i2c_extend45400000Motori2c_extendMotor100Motor1024102402actuatoractuatoractuatoractuatoractuator你好米思齐actuatoractuatoractuator20actuatoractuatormixly*.mp3100100i2c_extend45400000matrixi2c_extendmatrixmatrixmatrixMixly0matrixMixlymatrixMixly500matrixMixlymatrixMixly500matrixmatrixmatrixmatrix1matrixmatrixmatrix0.5matrixmatrixi2c_extend45100000dispi2c_extenddisp2333dispdisp1i2c_extend45100000lcdi2c_extend0x27lcdMixly00lcdMixly005lcdlcdi2c_extend45100000oledi2c_extend0x3coledoled001oledMixlyoledMixly0010oledMixlyoledMixly0550oledMixlyoledMixly5500oled0020oled005050oled20202015oled1oled00oled00oledspi10000001246spi45tft_st7789135240tft_st7789001#ffffff255,255,0tft_st7789Mixly0050#ffffff255,255,0tft_st7789Mixly0550#ffffff255,255,0tft_st7789Mixly5500#ffffff255,255,0tft_st7789004040#ffffff255,255,0tft_st778912ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor'ni-hao','hong-se','lv-se','lan-se','bai-se','hei-se'0.1ai_sensor1.wav5ai_sensor1.wav100ai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsai_sensor'猫','狗','笔记本','笔'mixgo5自模型训练infoai_sensor'猫','狗','笔记本','笔'mixgo自模型识别objectsinfoai_sensor0.1606, 0.3562, 0.4712, 0.9568, 0.9877, 1.9108, 1.8761, 3.5310, 3.4423, 5.6823/sd/masks.kmodel外部模型加载objects12ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor1.wav5ai_sensor1.wav100infoai_sensorlicensePlateinfoai_sensorfaceinfoai_sensor20objectsai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsspi46sdsd/sdfilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0wifinamewifipasswordwlanwlanwlanwlanwlan127.16.0.801234567wlanwlanwlanwlanwlan127.16.0.81connect_wifiwlanAPwlanTruewlanwlanSmallCabbage1WHILETRUEEQ0wlan0.0.0.0ms1000TRUEss0.0.0.080s192.168.0.180s5ss1024sbMixlyresponses1024sbMixlyresponse127.0.0.180sntp.aliyun.comresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponsehttp://192.168.1.1:11434qwen2.5-coder:0.5b5https://api.deepseek.comAPI Keydeepseek-chat5请介绍一下米思齐?content_callbackcontent_callbackcontent请介绍一下米思齐? \ No newline at end of file +02000attachInterrupt_funcattachInterrupt_func10,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!ms10timtim1000tim_callbacktim_callback5000200090x151100a10.998124.82997110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyMixly,HelloMixlyprompt02MixlyMixly0XFF00FFcodebMixlyMixly1attachInterrupt_funcattachInterrupt_func00Mixly0Mixly2022711420452023,1,1,12,0,0180292023,1,1,12,0,01001001004401000/sd/1.wav5/sd/1.wavhttps://gitee.com/dahanzimin/test/raw/master/wav/8.wav44044010000412000000000001000100010020000Hello, Mixly!10001#ffffff255,255,0Mixly0Mixly0010#ffffff255,255,0Mixly001#ffffff255,255,00012.jpgMixlyMixly0550#ffffff255,255,0MixlyMixly5500#ffffff255,255,00020#ffffff255,255,0005050#ffffff255,255,020202015#ffffff255,255,0606040#ffffff255,255,010000#ffffff255,255,00.5#ffffff255,255,0new_clock16012040#ffffff255,255,0new_clock806440#ffffff255,255,0new_clocknew_clock8200new_clocknew_clock0x0000000,0,00#ffffff255,255,012.jpgaiaiaiai1aiai1aiai1ai1aiai1ai1aiai0ai00Mixly0Mixly5000500wifinamewifipasswordmixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012http://mixio.mixly.cn/time.phpmixio.mixly.cn12.jpgwifinamewifipasswordcsub_cb31444082183.230.40.3914109261n63JySRowo13ZLDBKw6y896E0=MixlyRobotsub_cbEQmsg1ciot_dict"tc"tc0ciot_dictccwifinamewifipasswordclientEnter Your API_KEYEnter Your SECRET_KEYclient1clientS72099北京今天天气如何?wifinamewifipasswordSVa3S0UKHIy9dDArs北京SVa3S0UKHIy9dDArs北京11111ble_cble_pMixlyble_cble_cMixlyble_cble_xble_xble_xMixlyble_xble_xble_methodble_methodEQdataMixlyhandlehandle_methodhandle_methodkey1key2key3keyxble_keyboard_mouse10Hello, Mixly!10i2c2221100000i2c00i2c00i2ci2ci2cspi200000045spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345buf1Mixlyow12owowow12345ow12345owmy_now0my_nowmy_nowmy_nowFFFFFFFFFFFFmixlymy_nowmy_nowcbcbEQmsg1spi10000004512spi8my_lora433.925716my_loramy_loramy_loraMixlyi2c_extend45100000xsensori2c_extendxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor1013.25xsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensorxsensor5000500xsensorxsensorxsensorxsensorxsensorxsensorspi10000004512spi8ysensorysensorysensor0ysensor0ysensor0Mixlyysensor0Mixlyysensorysensor39,119.96,31.67ysensorysensorstation45ps2_handle24512ps2_handle50ps2_handleps2_handlews_wr123ws_wrws_wrws_wr360010zsensorzsensorzsensorzsensorzsensorweight12500weightKEYPAD_4_4123A456B789C*0#DKEYPAD_4_4midi0midi440midi4401000midimidimidi4120midimidirgb04rgb0000rgb000rgb0001000rgb1000rgb100100i2c_extend45400000Motori2c_extendMotor100Motor1024102402actuatoractuatoractuatoractuatoractuator你好米思齐actuatoractuatoractuator20actuatoractuatormixly*.mp3100100i2c_extend45400000matrixi2c_extendmatrixmatrixmatrixMixly0matrixMixlymatrixMixly500matrixMixlymatrixMixly500matrixmatrixmatrixmatrix1matrixmatrixmatrix0.5matrixmatrixi2c_extend45100000dispi2c_extenddisp2333dispdisp1i2c_extend45100000lcdi2c_extend0x27lcdMixly00lcdMixly005lcdlcdi2c_extend45100000oledi2c_extend0x3coledoled001oledMixlyoledMixly0010oledMixlyoledMixly0550oledMixlyoledMixly5500oled0020oled005050oled20202015oled1oled00oled00oledspi10000001246spi45tft_st7789135240tft_st7789001#ffffff255,255,0tft_st7789Mixly0050#ffffff255,255,0tft_st7789Mixly0550#ffffff255,255,0tft_st7789Mixly5500#ffffff255,255,0tft_st7789004040#ffffff255,255,0tft_st778912ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor'ni-hao','hong-se','lv-se','lan-se','bai-se','hei-se'0.1ai_sensor1.wav5ai_sensor1.wav100ai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsai_sensor'猫','狗','笔记本','笔'mixgo5自模型训练infoai_sensor'猫','狗','笔记本','笔'mixgo自模型识别objectsinfoai_sensor0.1606, 0.3562, 0.4712, 0.9568, 0.9877, 1.9108, 1.8761, 3.5310, 3.4423, 5.6823/sd/masks.kmodel外部模型加载objects12ai_sensorai_sensor98ai_sensor255,255,00,0,255ai_sensor1.wav5ai_sensor1.wav100infoai_sensorlicensePlateinfoai_sensorfaceinfoai_sensor20objectsai_sensorinfoai_sensorqrcodeinfoai_sensorbarcodeinfoai_sensortaginfoai_sensor25002525lineinfoai_sensor35002100circleinfoai_sensor10000rectinfoai_sensorinfoinfoai_sensorcolor_lab101colorsspi46sdsd/sdfilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0wifinamewifipasswordwlanwlanwlanwlanwlan127.16.0.801234567wlanwlanwlanwlanwlan127.16.0.81connect_wifiwlanAPwlanTruewlanwlanSmallCabbage1WHILETRUEEQ0wlan0.0.0.0ms1000TRUEss0.0.0.080s192.168.0.180s5ss1024sbMixlyresponses1024sbMixlyresponse127.0.0.180sntp.aliyun.comresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponsehttp://192.168.1.1:11434qwen2.5-coder:0.5b5https://api.deepseek.comAPI Keydeepseek-chat5请介绍一下米思齐?content_callbackcontent_callbackcontent请介绍一下米思齐? \ No newline at end of file diff --git a/boards/default/micropython_esp32s3/main.bundle.411dbbdb.js b/boards/default/micropython_esp32s3/main.bundle.411dbbdb.js deleted file mode 100644 index a53e694e..00000000 --- a/boards/default/micropython_esp32s3/main.bundle.411dbbdb.js +++ /dev/null @@ -1,21 +0,0 @@ -(()=>{"use strict";var e={d:(t,i)=>{for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{controls_type:()=>Fe,controls_typeLists:()=>Pe,lists_zip:()=>Ye,lists_zip_container:()=>ve,lists_zip_item:()=>Xe,unpack_iterable_object:()=>ye,variables_change:()=>De,variables_get:()=>Le,variables_global:()=>fe,variables_set:()=>Ne});var i={};e.r(i),e.d(i,{base_setup:()=>Ve,controls_delay:()=>Be,controls_end_program:()=>Ge,controls_except:()=>Ze,controls_finally:()=>et,controls_flow_statements:()=>Ke,controls_for:()=>Je,controls_forEach:()=>ke,controls_for_range:()=>Qe,controls_if:()=>Ue,controls_if_else:()=>je,controls_if_elseif:()=>ze,controls_if_if:()=>qe,controls_lambda:()=>it,controls_main:()=>be,controls_pass:()=>nt,controls_range:()=>we,controls_repeat_ext:()=>tt,controls_thread:()=>st,controls_try:()=>$e,controls_try_finally:()=>We,controls_whileUntil:()=>He,datetime_fromtimestamp:()=>rt,do_while:()=>_t,garbage_collection:()=>ot,gene_unique_identifier:()=>lt,get_mem_alloc:()=>pt,get_mem_free:()=>at,get_unique_identifier:()=>ut});var n={};e.r(n),e.d(n,{base_map:()=>Yt,generate_cartesian_product:()=>Xt,math_arithmetic:()=>ht,math_bit:()=>Et,math_constant:()=>Tt,math_constant_mp:()=>Mt,math_constrain:()=>At,math_dec:()=>Rt,math_degree_to_radian:()=>xt,math_indexer_number:()=>Nt,math_map:()=>Lt,math_max_min:()=>gt,math_number:()=>It,math_number_base_conversion:()=>Ct,math_radian_to_degree:()=>yt,math_random:()=>St,math_random_seed:()=>Dt,math_round:()=>ft,math_selfcalcu:()=>mt,math_to_int:()=>ct,math_trig:()=>Ot,text_to_number:()=>Ft,text_to_number_skulpt:()=>Pt,turn_to_int:()=>vt});var s={};e.r(s),e.d(s,{ascii_to_char:()=>wt,char_to_ascii:()=>kt,number_to_text:()=>Ht,os_system:()=>Mi,text:()=>Vt,text_capital:()=>Zt,text_center:()=>ei,text_char:()=>Gt,text_char_at:()=>Jt,text_char_at2:()=>Kt,text_char_at3:()=>li,text_compareTo:()=>ri,text_compare_to:()=>$t,text_create_with_container:()=>pi,text_create_with_item:()=>ai,text_encode:()=>Ii,text_equals_starts_ends:()=>jt,text_eval:()=>Ti,text_find:()=>ti,text_format:()=>oi,text_format_noreturn:()=>di,text_join:()=>Ut,text_join_seq:()=>ii,text_length:()=>Wt,text_random_char:()=>Qt,text_replace:()=>ni,text_split:()=>si,text_strip:()=>_i,text_substring:()=>zt,text_substring2:()=>qt,text_substring3:()=>ui,text_textarea:()=>Bt});var _={};e.r(_),e.d(_,{ENUMERATE:()=>ji,content_in_lists:()=>Zi,enumerate:()=>$i,list_many_input:()=>Vi,list_tolist:()=>wi,list_tolist2:()=>zi,list_trig:()=>yi,lists_2d_get_col_row_data:()=>Ri,lists_2d_get_data_with_col_row:()=>Oi,lists_append_extend:()=>Li,lists_change_to:()=>bi,lists_change_to_general:()=>Gi,lists_clear:()=>Pi,lists_create_with:()=>ci,lists_create_with2:()=>ki,lists_create_with_container:()=>Ci,lists_create_with_item:()=>Si,lists_create_with_noreturn:()=>Bi,lists_create_with_text:()=>gi,lists_create_with_text2:()=>Hi,lists_del_general:()=>Ui,lists_find:()=>Xi,lists_getIndex3:()=>Wi,lists_getSublist3:()=>Ki,lists_get_index:()=>mi,lists_get_random_item:()=>Ni,lists_get_random_sublist:()=>Di,lists_get_sublist:()=>Ei,lists_insert_value:()=>fi,lists_insert_value2:()=>Qi,lists_pop:()=>vi,lists_remove_at:()=>Yi,lists_remove_at2:()=>qi,lists_reverse:()=>Fi,lists_setIndex3:()=>Ji,lists_set_index:()=>Ai,lists_sort:()=>xi});var o={};e.r(o),e.d(o,{dicts_add_change_del:()=>hn,dicts_add_or_change:()=>an,dicts_clear:()=>ln,dicts_create_with:()=>tn,dicts_create_with_container:()=>nn,dicts_create_with_item:()=>sn,dicts_create_with_noreturn:()=>On,dicts_deldict:()=>Mn,dicts_delete:()=>un,dicts_get:()=>on,dicts_get_default:()=>pn,dicts_items:()=>dn,dicts_keys:()=>_n,dicts_length:()=>Tn,dicts_pop:()=>mn,dicts_setdefault:()=>En,dicts_to_json:()=>cn,dicts_to_json2:()=>Sn,dicts_to_to:()=>Cn,dicts_todict:()=>Rn,dicts_update:()=>rn,dicts_values:()=>In,json_to_dicts:()=>gn});var p={};e.r(p),e.d(p,{logic_boolean:()=>Fn,logic_compare:()=>Ln,logic_compare_continous:()=>Nn,logic_is:()=>Xn,logic_is_in:()=>vn,logic_negate:()=>fn,logic_null:()=>Pn,logic_operation:()=>Dn,logic_tobool:()=>yn,logic_true_or_false:()=>Yn});var a={};e.r(a),e.d(a,{sdcard_mount:()=>ss,sdcard_use_spi_init:()=>ns,storage_can_write_ornot:()=>Hn,storage_change_dir:()=>ts,storage_close_file:()=>Kn,storage_delete_file:()=>Qn,storage_file_seek:()=>jn,storage_file_tell:()=>zn,storage_file_write:()=>Gn,storage_fileopen:()=>bn,storage_fileopen_new:()=>Vn,storage_fileopen_new_encoding:()=>Bn,storage_get_a_line:()=>kn,storage_get_contents:()=>wn,storage_get_contents_without_para:()=>Un,storage_get_current_dir:()=>$n,storage_get_file_size:()=>qn,storage_get_filename:()=>Wn,storage_is_file:()=>is,storage_list_all_files:()=>Jn,storage_make_dir:()=>Zn,storage_open_file_with_os:()=>xn,storage_rename:()=>es});var u={};e.r(u),e.d(u,{procedures_callnoreturn:()=>us,procedures_callreturn:()=>rs,procedures_defnoreturn:()=>_s,procedures_defreturn:()=>os,procedures_ifreturn:()=>ls,procedures_mutatorarg:()=>as,procedures_mutatorcontainer:()=>ps,procedures_return:()=>ds});var r={};e.r(r),e.d(r,{tuple_change_to:()=>Ss,tuple_create_with:()=>Ts,tuple_create_with_container:()=>Ms,tuple_create_with_item:()=>hs,tuple_create_with_noreturn:()=>Ds,tuple_create_with_text2:()=>ms,tuple_create_with_text_return:()=>Es,tuple_del:()=>cs,tuple_find:()=>As,tuple_getIndex:()=>Os,tuple_getSublist:()=>Ns,tuple_get_random_item:()=>Fs,tuple_get_sublist:()=>fs,tuple_input:()=>Ys,tuple_join:()=>gs,tuple_length:()=>Rs,tuple_max:()=>Cs,tuple_totuple:()=>Ps,tuple_trig:()=>Ls});var l={};e.r(l),e.d(l,{set_add_discard:()=>ws,set_clear:()=>Bs,set_create_with:()=>Xs,set_create_with_container:()=>ys,set_create_with_item:()=>xs,set_create_with_text_return:()=>Ws,set_length:()=>bs,set_operate:()=>Gs,set_operate_update:()=>Us,set_pop:()=>Vs,set_sub:()=>ks,set_toset:()=>Ks,set_update:()=>Hs});var d={};e.r(d),e.d(d,{html_content:()=>js,html_content_more:()=>$s,html_document:()=>Qs,html_form:()=>e_,html_head_body:()=>zs,html_style:()=>Zs,html_style_color:()=>i_,html_style_content:()=>t_,html_text:()=>n_,html_title:()=>qs});var I={};e.r(I),e.d(I,{attribute_access:()=>m_,function_call:()=>T_,function_call_container:()=>M_,function_call_item:()=>h_,raw_block:()=>o_,raw_empty:()=>a_,raw_expression:()=>p_,raw_table:()=>__,text_comment:()=>u_,text_print_multiple:()=>l_,text_print_multiple_container:()=>d_,text_print_multiple_item:()=>I_,type_check:()=>r_});var T={};e.r(T),e.d(T,{controls_type:()=>g_,controls_typeLists:()=>C_,lists_zip:()=>S_,unpack_iterable_object:()=>A_,variables_change:()=>R_,variables_get:()=>E_,variables_global:()=>c_,variables_set:()=>O_});var M={};e.r(M),e.d(M,{Panic_with_status_code:()=>y_,base_setup:()=>N_,controls_delay:()=>X_,controls_flow_statements:()=>v_,controls_for:()=>F_,controls_forEach:()=>G_,controls_for_range:()=>P_,controls_if:()=>D_,controls_interrupts:()=>V_,controls_lambda:()=>w_,controls_main:()=>L_,controls_millis:()=>x_,controls_nointerrupts:()=>B_,controls_pass:()=>H_,controls_range:()=>U_,controls_repeat:()=>$_,controls_repeat_ext:()=>J_,controls_thread:()=>W_,controls_try_finally:()=>f_,controls_whileUntil:()=>Y_,datetime_fromtimestamp:()=>Z_,do_while:()=>K_,garbage_collection:()=>Q_,gene_unique_identifier:()=>eo,get_mem_alloc:()=>q_,get_mem_free:()=>z_,get_unique_identifier:()=>j_,reset:()=>b_,time_sleep:()=>k_});var h={};e.r(h),e.d(h,{base_map:()=>go,generate_cartesian_product:()=>So,math_arithmetic:()=>_o,math_bit:()=>so,math_constant:()=>io,math_constant_mp:()=>no,math_constrain:()=>Mo,math_dec:()=>uo,math_degree_to_radian:()=>Lo,math_indexer_number:()=>Eo,math_map:()=>To,math_max_min:()=>lo,math_number:()=>to,math_number_base_conversion:()=>ho,math_radian_to_degree:()=>Ao,math_random:()=>Io,math_random_seed:()=>mo,math_round:()=>Oo,math_selfcalcu:()=>oo,math_single:()=>po,math_to_int:()=>ro,math_trig:()=>ao,text_to_number:()=>Ro,text_to_number_skulpt:()=>co,turn_to_int:()=>Co});var m={};e.r(m),e.d(m,{ascii_to_char:()=>Po,char_to_ascii:()=>Yo,number_to_text:()=>vo,os_system:()=>ip,text:()=>No,text_capital:()=>wo,text_center:()=>ko,text_char:()=>fo,text_char_at:()=>xo,text_char_at2:()=>yo,text_char_at3:()=>Zo,text_compareTo:()=>$o,text_compare_to:()=>Bo,text_encode:()=>ep,text_equals_starts_ends:()=>Vo,text_eval:()=>tp,text_find:()=>Ho,text_format:()=>qo,text_format_noreturn:()=>zo,text_join:()=>Fo,text_join_seq:()=>Wo,text_length:()=>Xo,text_random_char:()=>bo,text_replace:()=>Ko,text_split:()=>Jo,text_strip:()=>Qo,text_substring:()=>Uo,text_substring2:()=>Go,text_substring3:()=>jo,text_textarea:()=>Do});var E={};e.r(E),e.d(E,{content_in_lists:()=>xp,enumerate:()=>yp,list_many_input:()=>gp,list_tolist:()=>vp,list_tolist2:()=>Xp,list_trig:()=>Op,lists_2d_get_col_row_data:()=>_p,lists_2d_get_data_with_col_row:()=>sp,lists_append_extend:()=>rp,lists_change_to:()=>cp,lists_change_to_general:()=>Sp,lists_clear:()=>Mp,lists_create_with:()=>op,lists_create_with2:()=>Lp,lists_create_with_noreturn:()=>Cp,lists_create_with_text:()=>pp,lists_create_with_text2:()=>Np,lists_del_general:()=>Ap,lists_find:()=>hp,lists_getIndex3:()=>Dp,lists_getSublist3:()=>fp,lists_get_index:()=>ap,lists_get_random_item:()=>lp,lists_get_random_sublist:()=>dp,lists_get_sublist:()=>np,lists_insert_value:()=>Ip,lists_insert_value2:()=>Pp,lists_pop:()=>Ep,lists_remove_at:()=>mp,lists_remove_at2:()=>Yp,lists_reverse:()=>Tp,lists_setIndex3:()=>Fp,lists_set_index:()=>up,lists_sort:()=>Rp});var O={};e.r(O),e.d(O,{dicts_add_change_del:()=>qp,dicts_add_or_change:()=>Up,dicts_clear:()=>Hp,dicts_create_with:()=>bp,dicts_create_with_noreturn:()=>$p,dicts_deldict:()=>Qp,dicts_delete:()=>wp,dicts_get:()=>Bp,dicts_get_default:()=>Gp,dicts_items:()=>Wp,dicts_keys:()=>Vp,dicts_length:()=>Jp,dicts_pop:()=>zp,dicts_setdefault:()=>jp,dicts_to_json:()=>ea,dicts_to_json2:()=>na,dicts_to_to:()=>ia,dicts_todict:()=>Zp,dicts_update:()=>kp,dicts_values:()=>Kp,json_to_dicts:()=>ta});var R={};e.r(R),e.d(R,{logic_boolean:()=>aa,logic_compare:()=>sa,logic_compare_continous:()=>_a,logic_is:()=>da,logic_is_in:()=>la,logic_negate:()=>pa,logic_null:()=>ua,logic_operation:()=>oa,logic_tobool:()=>Ia,logic_true_or_false:()=>ra});var c={};e.r(c),e.d(c,{sdcard_mount:()=>xa,sdcard_use_spi_init:()=>ya,storage_can_write_ornot:()=>ga,storage_change_dir:()=>Fa,storage_close_file:()=>Sa,storage_delete_file:()=>La,storage_file_seek:()=>fa,storage_file_tell:()=>Da,storage_file_write:()=>Ea,storage_fileopen:()=>Ma,storage_fileopen_new:()=>ha,storage_fileopen_new_encoding:()=>ma,storage_get_a_line:()=>ca,storage_get_contents:()=>Ra,storage_get_contents_without_para:()=>Oa,storage_get_current_dir:()=>Pa,storage_get_file_size:()=>Na,storage_get_filename:()=>Ca,storage_is_file:()=>Xa,storage_list_all_files:()=>Aa,storage_make_dir:()=>Ya,storage_open_file_with_os:()=>Ta,storage_rename:()=>va});var g={};e.r(g),e.d(g,{procedures_callnoreturn:()=>Ga,procedures_callreturn:()=>Ba,procedures_defnoreturn:()=>Va,procedures_defreturn:()=>ba,procedures_ifreturn:()=>Ua,procedures_return:()=>wa});var C={};e.r(C),e.d(C,{tuple_change_to:()=>ja,tuple_create_with:()=>ka,tuple_create_with_noreturn:()=>tu,tuple_create_with_text2:()=>Ha,tuple_create_with_text_return:()=>Wa,tuple_del:()=>Qa,tuple_find:()=>$a,tuple_getIndex:()=>Ka,tuple_getSublist:()=>eu,tuple_get_random_item:()=>nu,tuple_get_sublist:()=>iu,tuple_input:()=>_u,tuple_join:()=>qa,tuple_length:()=>Ja,tuple_max:()=>za,tuple_totuple:()=>su,tuple_trig:()=>Za});var S={};e.r(S),e.d(S,{set_add_discard:()=>du,set_clear:()=>uu,set_create_with:()=>ou,set_create_with_text_return:()=>Mu,set_length:()=>pu,set_operate:()=>ru,set_operate_update:()=>lu,set_pop:()=>au,set_sub:()=>Iu,set_toset:()=>hu,set_update:()=>Tu});var A={};e.r(A),e.d(A,{html_content:()=>Ru,html_content_more:()=>cu,html_document:()=>mu,html_form:()=>Cu,html_head_body:()=>Ou,html_style:()=>gu,html_style_content:()=>Su,html_text:()=>Au,html_title:()=>Eu});var L={};e.r(L),e.d(L,{attribute_access:()=>Yu,function_call:()=>Pu,raw_block:()=>Lu,raw_empty:()=>Du,raw_expression:()=>Nu,raw_table:()=>fu,type_check:()=>Fu});var N={};e.r(N),e.d(N,{PIN_init:()=>br,actuator_extern_get_led_bright:()=>Ku,actuator_extern_get_led_state:()=>Ju,actuator_extern_led_bright:()=>Wu,actuator_extern_led_brightness:()=>Qu,actuator_ms32006_dcmotor:()=>nr,actuator_ms32006_init:()=>ir,actuator_ms32006_stepper:()=>sr,actuator_neopixel_init:()=>_r,actuator_neopixel_rgb:()=>or,actuator_neopixel_rgb_all:()=>pr,actuator_neopixel_rgb_show_all_chase:()=>rr,actuator_neopixel_rgb_show_all_rainbow:()=>ur,actuator_neopixel_write:()=>ar,actuator_use_uart_init:()=>lr,esp32_music_get_tempo_extern:()=>wu,esp32_music_pitch:()=>Vu,esp32_music_pitch_init:()=>bu,esp32_music_pitch_with_time:()=>Bu,esp32_music_play_list:()=>Gu,esp32_music_reset_extern:()=>ku,esp32_music_set_tempo_extern:()=>Uu,esp32_music_stop:()=>Hu,mixbot_actuator_extern_get_addr:()=>yr,mixbot_actuator_extern_set_addr:()=>xr,mixbot_addr_extern:()=>gr,parrot_PIN_init:()=>Ur,parrot_move_speed:()=>wr,pin_led_bright:()=>Vr,player_insert_music:()=>mr,player_play_music:()=>hr,player_set_mode:()=>Mr,player_set_play:()=>Ir,player_set_volume:()=>Tr,player_whether_stop:()=>dr,robot_led_extern:()=>Lr,robot_led_extern_get_value:()=>Nr,robot_motor_extern:()=>Cr,robot_motor_extern_get_speed:()=>Sr,robot_servo_extern_absolute_run:()=>Pr,robot_servo_extern_get_status:()=>Dr,robot_servo_extern_relative_continue:()=>Xr,robot_servo_extern_relative_origin:()=>Yr,robot_servo_extern_relative_run:()=>vr,robot_servo_extern_stop:()=>Fr,robot_servo_extern_stop_mode:()=>fr,robot_traffic_light_extern:()=>Ar,servo_PIN_init:()=>Br,servo_get_angle:()=>er,servo_get_speed:()=>tr,servo_init:()=>qu,servo_move:()=>zu,servo_move_angle:()=>Gr,servo_set_angle:()=>$u,servo_set_speed:()=>Zu,servo_speed_360:()=>ju,syn6288_builtin_voice:()=>Rr,syn6288_get_voice:()=>Or,syn6288_set_voice:()=>Er,syn6288_tts_play:()=>cr});var D={};e.r(D),e.d(D,{actuator_dc_motor:()=>Rl,actuator_dc_motor_stop:()=>cl,actuator_get_led_bright:()=>Jr,actuator_get_led_state:()=>Qr,actuator_led_bright:()=>Kr,actuator_led_brightness:()=>qr,actuator_mixbot_buzzer_on_off:()=>Ll,actuator_mixgo_nova_mic_get:()=>Pl,actuator_mixgo_nova_mic_set:()=>Fl,actuator_mixgo_nova_onboard_music_pitch:()=>bl,actuator_mixgo_nova_onboard_music_stop:()=>Vl,actuator_mixgo_nova_play_audio:()=>yl,actuator_mixgo_nova_play_online_audio:()=>xl,actuator_mixgo_nova_record_audio:()=>Xl,actuator_mixgo_nova_voice_get:()=>vl,actuator_mixgo_nova_voice_set:()=>Yl,actuator_mixgo_zero_led_color:()=>zr,actuator_onboard_neopixel_rgb:()=>il,actuator_onboard_neopixel_rgb_all:()=>nl,actuator_onboard_neopixel_rgb_show_all_chase:()=>_l,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>sl,actuator_onboard_neopixel_write:()=>ol,actuator_rm_onboard_neopixel_rgb:()=>pl,actuator_rm_onboard_neopixel_rgb_all:()=>al,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>ul,actuator_stepper_keep:()=>El,actuator_stepper_stop:()=>Ol,analog_ble_keyboard_init:()=>jl,analog_ble_keyboard_input:()=>ed,analog_ble_keyboard_mouse_init:()=>ad,analog_ble_keyboard_mouse_input:()=>dd,analog_ble_keyboard_mouse_send_battery:()=>ld,analog_ble_keyboard_mouse_str:()=>Id,analog_ble_keyboard_send_battery:()=>id,analog_ble_keyboard_str:()=>td,analog_ble_mouse_init:()=>nd,analog_ble_mouse_input:()=>od,analog_ble_mouse_keyboard_input:()=>Td,analog_ble_mouse_send_battery:()=>pd,analog_keyboard_input:()=>wl,analog_keyboard_str:()=>zl,analog_mouse_input:()=>Ql,bitbot_motor:()=>fl,bitbot_move:()=>Nl,bitbot_stop:()=>Dl,ble_keyboard_connect:()=>Zl,ble_keyboard_get_mac:()=>$l,ble_keyboard_mouse_connect:()=>rd,ble_keyboard_mouse_get_mac:()=>ud,ble_mouse_connect:()=>_d,ble_mouse_get_mac:()=>sd,cc_number:()=>tl,educore_ble_keyboard_input:()=>Sd,educore_ble_sensor_connected:()=>Cd,educore_ble_sensor_init:()=>gd,educore_buzzer:()=>Md,educore_buzzer_play_tone:()=>hd,educore_buzzer_play_tone_time:()=>md,educore_buzzer_stop:()=>Ed,educore_neopixel_clear:()=>cd,educore_neopixel_rgb:()=>Rd,educore_rgb_light:()=>Od,esp32_music_get_tempo:()=>ll,esp32_music_reset:()=>dl,esp32_music_set_tempo:()=>rl,esp32_onboard_music_pitch:()=>Il,esp32_onboard_music_pitch_with_time:()=>Tl,esp32_onboard_music_play_list:()=>hl,esp32_onboard_music_stop:()=>Ml,general_key:()=>Hl,general_key_tuple:()=>Wl,generalkey_container:()=>Kl,generalkey_create_with_item:()=>Jl,get_keyboard_light:()=>Ad,get_power_output:()=>Gl,ledswitch:()=>Wr,mixbot_motor:()=>Al,mixbot_motor_status:()=>gl,mixbot_move:()=>Cl,mixbot_stop:()=>Sl,mouse_key:()=>ql,number:()=>Hr,rm_actuator_get_led_bright:()=>$r,rm_actuator_get_led_state:()=>Zr,rm_actuator_led_bright:()=>jr,rm_actuator_led_brightness:()=>el,rm_motor:()=>ml,set_all_power_output:()=>Ul,set_power_output:()=>Bl,special_key:()=>kl});var f={};e.r(f),e.d(f,{ai_sensor_20object:()=>_I,ai_sensor_ailocal_class:()=>Qd,ai_sensor_ailocal_class_result:()=>qd,ai_sensor_ailocal_train:()=>Jd,ai_sensor_asr_recognize:()=>eI,ai_sensor_audio_play:()=>jd,ai_sensor_audio_record:()=>zd,ai_sensor_barcode:()=>vd,ai_sensor_circle:()=>Bd,ai_sensor_classifier_faces:()=>sI,ai_sensor_color:()=>kd,ai_sensor_color_chases:()=>Kd,ai_sensor_color_chases_result:()=>Wd,ai_sensor_config:()=>Pd,ai_sensor_face:()=>nI,ai_sensor_find_20objects:()=>oI,ai_sensor_find_barcodes:()=>Xd,ai_sensor_find_circles:()=>Gd,ai_sensor_find_colors:()=>Hd,ai_sensor_find_licenseplates:()=>iI,ai_sensor_find_lines:()=>Vd,ai_sensor_find_qrcodes:()=>Fd,ai_sensor_find_rects:()=>wd,ai_sensor_find_tags:()=>xd,ai_sensor_licenseplate:()=>tI,ai_sensor_line:()=>bd,ai_sensor_qrcode:()=>Dd,ai_sensor_qrcode_lite:()=>fd,ai_sensor_rect:()=>Ud,ai_sensor_rgb:()=>Yd,ai_sensor_tag:()=>yd,ai_sensor_use_uart_init:()=>Nd,ai_sensor_yolo_recognize:()=>$d,ai_sensor_yolo_recognize_result:()=>Zd});var F={};e.r(F),e.d(F,{MICROPYTHON_AI_Speech_asr:()=>uI,MICROPYTHON_AI_Speech_unit:()=>aI,MICROPYTHON_AI_client:()=>pI});var P={};e.r(P),e.d(P,{AI_CAMERA_INIT:()=>CI,AI_STOP_ACQUISITION:()=>bI,CI130X_BROADCAST_SANT:()=>hI,CI130X_BROADCAST_SYSTEM_TIME:()=>EI,CI130X_GET_THE_RECOGNIZED_CMD_SANT:()=>MI,CI130X_GET_WHETHER_IDENTIFY_SANT:()=>TI,CI130X_IDENTIFY_AND_SAVE_SANT:()=>II,CI130X_SET_SYSTEM_CMD_SANT:()=>mI,CREATE_CAMERA:()=>OI,DELETE_PEOPLE_FACE_ID:()=>xI,GET_CAT_FACE_DETECTION_LOCATION:()=>DI,GET_CAT_FACE_DETECTION_NUM:()=>NI,GET_COLOR_DETECTION_LOCATION:()=>LI,GET_COLOR_DETECTION_NUM:()=>AI,GET_FACE_DETECTION_KEYPOINT_LOCATION:()=>PI,GET_FACE_DETECTION_LOCATION:()=>FI,GET_FACE_DETECTION_NUM:()=>fI,GET_FACE_RECOGNITION_ID:()=>YI,GET_FACE_RECOGNITION_ID_KEYPOINT_LOCATION:()=>XI,GET_FACE_RECOGNITION_ID_LOCATION:()=>vI,GET_PICTURE_DATA_EXACT:()=>cI,GET_QR_CODE_RECOGNITION_DATA:()=>SI,MIXIO_REPORT_IMAGE_DATA:()=>VI,PEOPLE_FACE_ENROLL:()=>yI,SCREEN_SHOW_CAM_GRAPH_SHOOT:()=>gI,SHOOT_AND_SAVE_PICTURE:()=>RI,VOICE_RECOGNITION_CONTROL:()=>dI});var Y={};e.r(Y),e.d(Y,{mpython_blynk_app_data:()=>ZI,mpython_blynk_app_notify:()=>KI,mpython_blynk_email:()=>qI,mpython_blynk_get_timers:()=>zI,mpython_blynk_on_connected:()=>kI,mpython_blynk_on_disconnected:()=>wI,mpython_blynk_run:()=>WI,mpython_blynk_sensor_data_to_app:()=>$I,mpython_blynk_set_property:()=>QI,mpython_blynk_setup:()=>eT,mpython_blynk_stop_timers:()=>JI,mpython_blynk_sync_virtual:()=>UI,mpython_blynk_terminal_widget_vpin:()=>GI,mpython_blynktimer:()=>jI,mpython_blynktimer_run:()=>HI});var v={};e.r(v),e.d(v,{communicate_bluetooth_central_init:()=>xT,communicate_bluetooth_connect:()=>GT,communicate_bluetooth_disconnect:()=>UT,communicate_bluetooth_handle:()=>KT,communicate_bluetooth_is_connected:()=>kT,communicate_bluetooth_mac:()=>BT,communicate_bluetooth_peripheral_init:()=>bT,communicate_bluetooth_recv:()=>HT,communicate_bluetooth_recv_only:()=>WT,communicate_bluetooth_scan:()=>VT,communicate_bluetooth_send:()=>wT,communicate_espnow_init:()=>JT,communicate_espnow_init_new:()=>QT,communicate_i2c_available:()=>ET,communicate_i2c_init:()=>sT,communicate_i2c_master_read:()=>mT,communicate_i2c_onboard:()=>iT,communicate_i2c_read:()=>_T,communicate_i2c_scan:()=>pT,communicate_i2c_write:()=>oT,communicate_ir_recv_init:()=>LT,communicate_ir_send_init:()=>PT,communicate_ow_init:()=>RT,communicate_ow_read:()=>gT,communicate_ow_reset:()=>AT,communicate_ow_scan:()=>cT,communicate_ow_select:()=>ST,communicate_ow_write:()=>CT,communicate_spi_buffer:()=>rT,communicate_spi_init:()=>aT,communicate_spi_onboard:()=>nT,communicate_spi_read:()=>lT,communicate_spi_read_output:()=>dT,communicate_spi_readinto:()=>IT,communicate_spi_readinto_output:()=>TT,communicate_spi_set:()=>uT,communicate_spi_write:()=>MT,communicate_spi_write_readinto:()=>hT,espnow_radio_channel:()=>eM,espnow_radio_channel_new:()=>iM,espnow_radio_on_off:()=>nM,espnow_radio_rec:()=>_M,espnow_radio_recv:()=>pM,espnow_radio_recv_certain_msg:()=>aM,espnow_radio_recv_certain_msg_new:()=>rM,espnow_radio_recv_msg:()=>oM,espnow_radio_recv_new:()=>uM,espnow_radio_send:()=>sM,espnow_radio_txpower:()=>tM,i2c_available:()=>YM,i2c_init:()=>EM,i2c_master_reader2:()=>PM,i2c_read:()=>OM,i2c_scan:()=>cM,i2c_slave_onreceive:()=>OT,i2c_write:()=>RM,internal_variable:()=>NT,ir_recv_timeout:()=>FT,ir_transmit_busy:()=>yT,ir_transmit_conventional_data:()=>YT,ir_transmit_raw_code:()=>XT,ir_transmit_study_code:()=>vT,ir_whether_recv:()=>fT,lora_init:()=>lM,lora_packet:()=>dM,lora_recv:()=>TM,lora_send:()=>IM,network_espnow_info:()=>zT,network_espnow_mac:()=>qT,network_espnow_recv:()=>jT,network_espnow_recv_handle:()=>ZT,network_espnow_send:()=>$T,recv_fun:()=>DT,spi_buffer:()=>SM,spi_init:()=>gM,spi_read:()=>AM,spi_read_output:()=>LM,spi_readinto:()=>NM,spi_readinto_output:()=>DM,spi_set:()=>CM,spi_write:()=>fM,spi_write_readinto:()=>FM,urequests_attribute:()=>hM,urequests_get:()=>MM,urequests_method:()=>mM});var X={};e.r(X),e.d(X,{display_animate:()=>rh,display_blink_rate:()=>oh,display_circle:()=>lh,display_color_seclet:()=>Ch,display_draw_4strings:()=>eh,display_fill:()=>uh,display_get_screen_image:()=>_h,display_help:()=>Ih,display_image_size:()=>th,display_lcd_use_i2c_init:()=>fh,display_line:()=>nh,display_line_arbitrarily:()=>sh,display_matrix_extern_bright_point:()=>KM,display_matrix_extern_bright_screen:()=>QM,display_matrix_extern_clear:()=>qM,display_matrix_extern_get_pixel:()=>WM,display_matrix_extern_get_screen_pixel:()=>JM,display_matrix_extern_image_builtins:()=>zM,display_matrix_extern_scroll_string:()=>GM,display_matrix_extern_scroll_string_delay:()=>UM,display_matrix_extern_shift:()=>HM,display_matrix_extern_show_frame_string:()=>wM,display_matrix_extern_show_frame_string_delay:()=>kM,display_matrix_extern_show_image:()=>VM,display_matrix_extern_show_image_or_string_delay:()=>BM,display_matrix_use_i2c_init:()=>bM,display_oled_drawPixel:()=>Mh,display_oled_showBitmap:()=>Th,display_oled_use_i2c_init:()=>Xh,display_onoff:()=>ah,display_rect:()=>ih,display_rgb_color:()=>ph,display_tm1650_power:()=>mh,display_tm1650_set_brightness:()=>Rh,display_tm1650_show_dot:()=>Oh,display_tm1650_show_num:()=>Eh,display_tm_use_i2c_init:()=>hh,display_triangle:()=>dh,display_use_i2c_init:()=>ZM,extern_oled_bright_point:()=>Wh,extern_oled_clear:()=>Kh,extern_oled_get_pixel:()=>Hh,extern_oled_hvline:()=>Qh,extern_oled_line:()=>qh,extern_oled_scroll_string:()=>Bh,extern_oled_scroll_string_delay:()=>Gh,extern_oled_shape_rect:()=>Jh,extern_oled_shift:()=>kh,extern_oled_show_frame_string:()=>Uh,extern_oled_show_frame_string_delay:()=>wh,extern_oled_show_image:()=>yh,extern_oled_show_image_or_string_delay:()=>Vh,extern_oled_show_image_xy:()=>xh,extern_oled_show_string:()=>bh,lcd_backlight:()=>Yh,lcd_clear:()=>vh,lcd_print_string:()=>Ph,lcd_show_image_or_string_delay:()=>Fh,matrix_extern_image_arithmetic:()=>jM,matrix_extern_image_invert:()=>$M,tft_fill:()=>Nh,tft_line_arbitrarily:()=>Dh,tft_scroll_string_delay:()=>Ah,tft_show_frame_string_delay:()=>Lh,tft_show_image_or_string_delay:()=>Sh,tft_show_image_xy:()=>gh,tft_use_spi_init:()=>ch});var y={};e.r(y),e.d(y,{bitbot_display_bitmap_create:()=>wm,bitbot_display_image_create:()=>Um,display_available:()=>hm,display_bitmap_create:()=>_m,display_bright_point:()=>dm,display_bright_screen:()=>Tm,display_clear:()=>Mm,display_get_pixel:()=>lm,display_get_screen_pixel:()=>Im,display_image_builtins:()=>om,display_image_builtins_all:()=>pm,display_image_create:()=>sm,display_scroll_string:()=>Zh,display_scroll_string_delay:()=>em,display_shift:()=>rm,display_show_frame_string:()=>im,display_show_frame_string_delay:()=>nm,display_show_image:()=>jh,display_show_image_or_string_delay:()=>$h,draw_pointer:()=>_E,image_arithmetic:()=>am,image_invert:()=>um,mixbot_display_bitmap_create:()=>xm,mixbot_display_bright_screen:()=>Bm,mixbot_display_get_ambientbright:()=>Vm,mixbot_display_get_screen_pixel:()=>bm,mixbot_display_image_create:()=>ym,mixbot_display_rotate:()=>Gm,mixgo_display_bitmap_create:()=>gm,mixgo_display_image_create_new:()=>cm,mixgome_display_bitmap_create:()=>Em,mixgome_display_font:()=>Cm,mixgome_display_image_create:()=>mm,mixgomini_display_bitmap_create:()=>Rm,mixgomini_display_image_create:()=>Om,mpython_display_hvline:()=>Ym,mpython_display_line:()=>vm,mpython_display_shape_rect:()=>Pm,mpython_pbm_image:()=>Xm,nova_draw_pointer:()=>oE,onboard_oled_bright_point:()=>Fm,onboard_oled_scroll_string_delay:()=>Dm,onboard_oled_show_frame_string_delay:()=>fm,onboard_oled_show_image:()=>Sm,onboard_oled_show_image_or_string_delay:()=>Nm,onboard_oled_show_image_xy:()=>Am,onboard_oled_show_string:()=>Lm,onboard_tft_bright_point:()=>jm,onboard_tft_bright_screen:()=>IE,onboard_tft_clear:()=>TE,onboard_tft_clock_clear:()=>nE,onboard_tft_clock_draw:()=>iE,onboard_tft_clock_get_rtctime:()=>eE,onboard_tft_clock_init:()=>Zm,onboard_tft_clock_set_time:()=>tE,onboard_tft_display_hvline:()=>Qm,onboard_tft_display_line:()=>qm,onboard_tft_display_shape_circle:()=>sE,onboard_tft_display_shape_rect:()=>Jm,onboard_tft_fill:()=>$m,onboard_tft_get_pixel:()=>zm,onboard_tft_get_screen_pixel:()=>dE,onboard_tft_scroll_string:()=>uE,onboard_tft_scroll_string_delay:()=>tm,onboard_tft_shift:()=>lE,onboard_tft_show_frame_string:()=>rE,onboard_tft_show_frame_string_delay:()=>Km,onboard_tft_show_image:()=>aE,onboard_tft_show_image_or_string_delay:()=>Wm,onboard_tft_show_image_xy:()=>km,onboard_tft_show_image_xy_direct:()=>Hm,onboard_tft_show_texts:()=>pE});var x={};e.r(x),e.d(x,{factory_block:()=>YE,factory_block_return:()=>vE,factory_block_return_with_textarea:()=>yE,factory_block_with_textarea:()=>XE,factory_callMethod_noreturn:()=>FE,factory_callMethod_return:()=>PE,factory_create_with_container:()=>LE,factory_create_with_item:()=>NE,factory_declare:()=>fE,factory_from_import:()=>CE,factory_function_noreturn:()=>AE,factory_function_return:()=>DE,factory_import:()=>SE,folding_block:()=>xE});var b={};e.r(b),e.d(b,{controls_pin_attachInterrupt:()=>sO,inout_analog_atten:()=>KE,inout_analog_read:()=>WE,inout_analog_read_init:()=>$E,inout_analog_write:()=>wE,inout_analog_write_init:()=>jE,inout_analog_write_set:()=>kE,inout_analog_write_set_freq:()=>tO,inout_digital_init:()=>qE,inout_digital_read:()=>GE,inout_digital_write:()=>BE,inout_highlow:()=>VE,inout_pinMode:()=>eO,inout_pin_attachInterrupt:()=>QE,inout_pin_pressed:()=>JE,inout_pin_pressed_init:()=>ZE,inout_pwm_analog_write:()=>UE,inout_pwm_analog_write_init:()=>zE,inout_pwm_analog_write_set_freq:()=>HE,pin_pressed:()=>nO,pin_pressed_init:()=>iO});var V={};e.r(V),e.d(V,{IOT_CONNECT_OLLAMA:()=>UO,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>DO,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>NO,IOT_EMQX_PING:()=>AO,IOT_FORMATTING:()=>CO,IOT_FORMAT_STRING:()=>SO,IOT_MIXIO_NTP:()=>LO,IOT_MIXIO_PUBLISH:()=>hO,IOT_MIXIO_SUBSCRIBE:()=>mO,iot_checkonenet:()=>VO,iot_client_onboard:()=>FO,iot_connect_ollama:()=>GO,iot_connect_openai:()=>wO,iot_create_with_item:()=>TO,iot_http_client:()=>PO,iot_http_data:()=>YO,iot_mixio_check:()=>RO,iot_mixio_connect:()=>MO,iot_mixio_connect_only:()=>OO,iot_mixio_disconnect:()=>EO,iot_mixio_format_msg:()=>gO,iot_mixio_format_topic:()=>cO,iot_mixly_key:()=>fO,iot_mqtt_client:()=>vO,iot_mqtt_data:()=>XO,iot_onenet_check:()=>uO,iot_onenet_connect:()=>pO,iot_onenet_disconnect:()=>aO,iot_onenet_publish:()=>lO,iot_onenet_publish_dict:()=>rO,iot_onenetconnect:()=>xO,iot_onenetdisconnect:()=>bO,iot_publish:()=>BO,iot_publish_container:()=>dO,iot_publish_item:()=>IO,iot_wifi_connect:()=>oO,iot_wificonnect:()=>yO,ollama_empty_history:()=>WO,use_ollama_llm_to_chat:()=>kO,use_ollama_llm_to_chat_return:()=>HO});var B={};e.r(B),e.d(B,{educore_mqtt_connect:()=>SR,educore_mqtt_connect_success:()=>DR,educore_mqtt_subscribe_message:()=>AR,educore_mqtt_topic_publish:()=>NR,educore_mqtt_topic_subscribe:()=>LR,educore_wifi_connect:()=>CR,network_ap_connect:()=>iR,network_connect:()=>jO,network_get_connect:()=>ZO,network_get_wifi:()=>tR,network_init:()=>JO,network_is_active:()=>qO,network_open:()=>QO,network_scan:()=>zO,network_server:()=>nR,network_socket_accept:()=>aR,network_socket_bind:()=>_R,network_socket_close:()=>IR,network_socket_connect:()=>oR,network_socket_init:()=>sR,network_socket_listen:()=>pR,network_socket_receive:()=>uR,network_socket_receive_from:()=>lR,network_socket_send:()=>rR,network_socket_send_to:()=>dR,network_stop:()=>eR,network_wifi_connect:()=>$O,ntptime_address:()=>ER,ntptime_time:()=>mR,requests_attribute:()=>MR,requests_attribute2:()=>gR,requests_get:()=>TR,requests_get2:()=>RR,requests_method:()=>hR,requests_post:()=>cR});var G={};e.r(G),e.d(G,{get_potential_num:()=>FR,nova_g1_motor:()=>PR,nova_g1_spk_en:()=>vR,nova_g1_usb:()=>YR});var U={};e.r(U),e.d(U,{pe_g1_battery_left:()=>xR,pe_g1_dc_motor:()=>bR,pe_g1_dc_motor_speed:()=>VR,pe_g1_servo_get_angle:()=>UR,pe_g1_servo_get_speed:()=>wR,pe_g1_servo_set_angle:()=>BR,pe_g1_servo_set_speed:()=>GR,pe_g1_use_i2c_init:()=>yR});var w={};e.r(w),e.d(w,{CI130X_BROADCAST:()=>Ic,CI130X_GET_THE_RECOGNIZED_CMD:()=>dc,CI130X_GET_WHETHER_IDENTIFY:()=>lc,CI130X_IDENTIFY_AND_SAVE:()=>rc,CI130X_SET_SYSTEM_CMD:()=>Tc,HCSR04:()=>ig,PS2_Button:()=>og,PS2_Buttons:()=>ag,PS2_Buttons_new:()=>dg,PS2_State:()=>pg,PS2_init:()=>ng,PS2_init_new:()=>rg,PS2_stk:()=>ug,PS2_stk_new:()=>Ig,PS2_vibration:()=>_g,PS2_vibration_new:()=>lg,camera_sensor_init:()=>kg,camera_sensor_result:()=>Hg,column_tube_foot:()=>qg,define_keyboards:()=>zg,educore_body_sensor:()=>vg,educore_button_sensor_extern:()=>bg,educore_camera_sensor:()=>wg,educore_infrared_sensor:()=>xg,educore_soilhum_sensor:()=>Xg,educore_temp_sensor:()=>Ug,educore_temphum_sensor:()=>yg,educore_ultrasonic_sensor:()=>Bg,esp32_s2_weather_init:()=>$c,esp32_s2_weather_rain:()=>eg,esp32_s2_weather_wd:()=>Zc,esp32_s2_weather_ws:()=>tg,extern_rfid_read:()=>Vc,extern_rfid_readcontent:()=>Gc,extern_rfid_readid:()=>Bc,extern_rfid_status:()=>kc,extern_rfid_write:()=>Uc,extern_rfid_write_return:()=>wc,get_keboards_value:()=>jg,gnss_get_data:()=>mg,gnss_have_data:()=>hg,init_matrix_keyboard:()=>Jg,interaction_whether_to_interaction:()=>ac,interaction_whether_to_interaction_SANT:()=>uc,line_tube_foot:()=>Qg,mixbot_sensor_extern_get_addr:()=>Ag,mixbot_sensor_extern_set_addr:()=>Lg,pm25_get_data:()=>Mg,radar_set_DETECTION_THRESHOLD:()=>oc,radar_set_DETECTION_THRESHOLD_SANT:()=>pc,robot_button_extern_get_value:()=>Og,robot_color_extern_get_value:()=>Sg,robot_infrared_extern_get_value:()=>cg,robot_infrared_extern_grey_get_value:()=>gg,robot_potentiometer_extern_get_value:()=>Cg,robot_sonar_extern_get_value:()=>Ng,robot_sonar_extern_led:()=>Dg,robot_touch_extern_get_value:()=>Rg,sensor_APDS9960_extern:()=>hc,sensor_DS18X20:()=>nc,sensor_LTR308_extern:()=>mc,sensor_LTR390UV_extern:()=>Rc,sensor_MAX30102_extern:()=>Mc,sensor_QMC5883L_extern:()=>Dc,sensor_VL530LX_extern:()=>cc,sensor_adxl345_get_acceleration:()=>qR,sensor_aht11_extern:()=>Cc,sensor_bmp:()=>tc,sensor_compass_reset:()=>xc,sensor_dht11:()=>jR,sensor_hp203_extern:()=>Sc,sensor_light_level:()=>zR,sensor_lm35:()=>sc,sensor_ltr381_extern:()=>Ec,sensor_mixgo_extern_button_attachInterrupt:()=>JR,sensor_mixgo_extern_button_get_presses:()=>KR,sensor_mixgo_extern_button_is_pressed:()=>HR,sensor_mixgo_extern_button_was_pressed:()=>WR,sensor_mixgo_extern_light:()=>$R,sensor_mixgo_extern_pin_near:()=>ec,sensor_mixgo_extern_sound:()=>ZR,sensor_mixgoce_hot_wheel_degrees:()=>jc,sensor_mixgoce_hot_wheel_is_touched:()=>zc,sensor_mpu9250_attachGestureInterrupt:()=>QR,sensor_mpu9250_calibrate_compass:()=>vc,sensor_mpu9250_field_strength:()=>yc,sensor_mpu9250_gesture:()=>fc,sensor_mpu9250_get_acceleration:()=>Fc,sensor_mpu9250_get_gyro:()=>Yc,sensor_mpu9250_get_magnetic:()=>Pc,sensor_mpu9250_temperature:()=>Xc,sensor_ms5611_extern:()=>Lc,sensor_ms5611_extern_altitude:()=>Nc,sensor_read_humiture:()=>Vg,sensor_sht:()=>ic,sensor_shtc3_extern:()=>gc,sensor_spl06_001_extern:()=>Ac,sensor_ucs12071_extern:()=>Oc,sensor_use_i2c_init:()=>_c,sensor_use_spi_init:()=>bc,sensor_use_uart_init:()=>Tg,sensor_weather_solo_init:()=>fg,sensor_weather_solo_rain:()=>Yg,sensor_weather_solo_wd:()=>Fg,sensor_weather_solo_ws:()=>Pg,sensor_weigh_init:()=>Wg,tvoc_get_data:()=>Eg,ultrasonic_sensor_read_distance:()=>Gg,weather_data:()=>Hc,weather_have_data:()=>Wc,weather_set_label:()=>Jc,weather_set_label_container:()=>Qc,weather_set_label_item:()=>qc,weather_uart_mixio:()=>Kc,weigh_sensor_get_weight:()=>Kg});var k={};e.r(k),e.d(k,{HCSR04:()=>TC,RTC_set_date:()=>IC,RTC_set_time:()=>dC,bitbot_als_num:()=>CS,dht11:()=>FS,educore_button_sensor:()=>BS,educore_button_was_pressed:()=>GS,educore_gyroscope_sensor:()=>xS,educore_gyroscope_sensor_read:()=>bS,educore_gyroscope_sensor_shake:()=>VS,educore_light_sensor:()=>yS,educore_rfid_sensor:()=>US,educore_rfid_sensor_scan:()=>wS,educore_rfid_sensor_scan_data:()=>kS,educore_voice_sensor:()=>vS,number1:()=>hC,number2:()=>mC,number3:()=>EC,number4:()=>OC,number5:()=>RC,number6:()=>cC,number7:()=>gC,onboard_RTC_get_time:()=>FC,onboard_RTC_get_time_str:()=>xC,onboard_RTC_get_timestamp:()=>PC,onboard_RTC_get_timetuple_to_str:()=>bC,onboard_RTC_set_datetime:()=>XC,onboard_RTC_settime_string:()=>vC,onboard_RTC_timestamp_totuple:()=>YC,rfid_readcontent:()=>HC,rfid_readid:()=>kC,rfid_status:()=>JC,rfid_write:()=>WC,rfid_write_return:()=>KC,sensor_LTR308:()=>VC,sensor_aht11:()=>GC,sensor_bitbot_ALS:()=>gS,sensor_button_get_presses:()=>LS,sensor_button_is_pressed:()=>SS,sensor_button_was_pressed:()=>AS,sensor_distance_hrsc04:()=>lC,sensor_eulerangles:()=>qC,sensor_field_strength:()=>PS,sensor_get_acceleration:()=>QC,sensor_get_temperature:()=>UC,sensor_get_the_coprocessor_version:()=>HS,sensor_hp203:()=>wC,sensor_light:()=>fS,sensor_mixbot_get_gyro:()=>cS,sensor_mixbot_patrol_calibrate:()=>ES,sensor_mixbot_patrol_value:()=>OS,sensor_mixbot_temperature:()=>RS,sensor_mixgo_LTR308:()=>DC,sensor_mixgo_button_attachInterrupt:()=>iC,sensor_mixgo_button_get_presses:()=>tC,sensor_mixgo_button_is_pressed:()=>Zg,sensor_mixgo_button_was_pressed:()=>eC,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>oS,sensor_mixgo_cc_mmc5603_get_angle:()=>_S,sensor_mixgo_cc_mmc5603_get_magnetic:()=>sS,sensor_mixgo_light:()=>MC,sensor_mixgo_nova_LTR308:()=>NC,sensor_mixgo_nova_pin_near:()=>LC,sensor_mixgo_pin_near:()=>AC,sensor_mixgo_pin_near_double:()=>SC,sensor_mixgo_pin_near_single:()=>CC,sensor_mixgo_pin_pressed:()=>pC,sensor_mixgo_sant_color:()=>fC,sensor_mixgo_touch_slide:()=>rC,sensor_mixgocar42_button_attachInterrupt:()=>oC,sensor_mixgocar42_button_get_presses:()=>_C,sensor_mixgocar42_button_is_pressed:()=>nC,sensor_mixgocar42_button_was_pressed:()=>sC,sensor_mixgocar_battery_left:()=>mS,sensor_mixgocar_pin_near:()=>MS,sensor_mixgocar_pin_near_line:()=>TS,sensor_mixgocar_pin_near_state_change:()=>hS,sensor_mixgoce_pin_pressed:()=>aC,sensor_mixgoce_temperature:()=>aS,sensor_mixgome_temperature:()=>pS,sensor_mpython_pin_pressed:()=>uC,sensor_mpython_qmi8658_get_gyro:()=>uS,sensor_mpython_qmi8658_temperature:()=>rS,sensor_onboard_compass_reset:()=>nS,sensor_onboard_mpu9250_calibrate_compass:()=>eS,sensor_onboard_mpu9250_field_strength:()=>iS,sensor_onboard_mpu9250_gesture:()=>zC,sensor_onboard_mpu9250_get_acceleration:()=>jC,sensor_onboard_mpu9250_get_gyro:()=>ZC,sensor_onboard_mpu9250_get_magnetic:()=>$C,sensor_onboard_mpu9250_temperature:()=>tS,sensor_pin_near:()=>DS,sensor_pin_pressed:()=>NS,sensor_read:()=>XS,sensor_rm_acc:()=>IS,sensor_rm_battery_left:()=>dS,sensor_rm_pin_near_double:()=>lS,sensor_rtc_init:()=>yC,sensor_sound:()=>BC,sensor_temperature:()=>YS});var H={};e.r(H),e.d(H,{serial_any:()=>eA,serial_begin:()=>_A,serial_print:()=>qS,serial_print_byte:()=>QS,serial_print_hex:()=>jS,serial_println:()=>zS,serial_read_from_ai:()=>TA,serial_readline:()=>tA,serial_readstr:()=>ZS,serial_readstr_until:()=>iA,serial_receive_data_event:()=>$S,serial_send_to_ai:()=>IA,serial_softserial:()=>sA,serial_softserial_new:()=>nA,system_input:()=>oA,system_print:()=>pA,system_print_container:()=>lA,system_print_end:()=>uA,system_print_inline:()=>aA,system_print_item:()=>dA,system_print_many:()=>rA});var W={};e.r(W),e.d(W,{Panic_with_status_code:()=>EA,Timer_init:()=>PA,base_delay:()=>XA,controls_delay:()=>mA,controls_delay_new:()=>hA,controls_millis:()=>RA,controls_uname:()=>gA,raw_block:()=>cA,reset:()=>OA,system_bitbot_shutdown:()=>FA,system_machine_reset:()=>fA,system_ticks_diff:()=>AA,system_timer:()=>SA,system_timer_init:()=>LA,system_wdt_feed:()=>DA,system_wdt_init:()=>NA,time_ticks_diff:()=>vA,timer:()=>CA,timer2:()=>YA});var K={};e.r(K),e.d(K,{Air_daily_content:()=>QA,Air_now_content:()=>UA,Geo_moon_content:()=>zA,Geo_sun_content:()=>qA,Life_suggestion_content:()=>kA,Location_search_content:()=>WA,Tide_daily_content:()=>HA,WEATHER_DAILY:()=>bA,WEATHER_HOUR:()=>VA,WEATHER_NOW:()=>xA,Weather_alarm_content:()=>wA,Weather_daily:()=>KA,Weather_daily_content:()=>JA,Weather_now:()=>BA,Weather_now_content:()=>GA});var J={};e.r(J),e.d(J,{PIN_init:()=>zL,actuator_extern_get_led_bright:()=>hL,actuator_extern_get_led_state:()=>mL,actuator_extern_led_bright:()=>ML,actuator_extern_led_brightness:()=>EL,actuator_ms32006_dcmotor:()=>sL,actuator_ms32006_init:()=>nL,actuator_ms32006_stepper:()=>_L,actuator_neopixel_init:()=>OL,actuator_neopixel_rgb:()=>gL,actuator_neopixel_rgb_all:()=>RL,actuator_neopixel_rgb_show_all_chase:()=>CL,actuator_neopixel_rgb_show_all_rainbow:()=>SL,actuator_neopixel_write:()=>cL,actuator_use_uart_init:()=>AL,esp32_music_get_tempo_extern:()=>lL,esp32_music_pitch:()=>pL,esp32_music_pitch_init:()=>oL,esp32_music_pitch_with_time:()=>aL,esp32_music_play_list:()=>dL,esp32_music_reset_extern:()=>IL,esp32_music_set_tempo_extern:()=>rL,esp32_music_stop:()=>uL,mixbot_actuator_extern_get_addr:()=>QL,mixbot_actuator_extern_set_addr:()=>qL,mixbot_addr_extern:()=>yL,parrot_PIN_init:()=>eN,parrot_move_speed:()=>tN,pin_led_bright:()=>jL,player_play_music:()=>FL,player_set_mode:()=>fL,player_set_play:()=>NL,player_set_volume:()=>DL,player_whether_stop:()=>LL,robot_led_extern:()=>BL,robot_led_extern_get_value:()=>GL,robot_motor_extern:()=>xL,robot_motor_extern_get_speed:()=>bL,robot_servo_extern_absolute_run:()=>HL,robot_servo_extern_get_status:()=>UL,robot_servo_extern_relative_continue:()=>JL,robot_servo_extern_relative_origin:()=>WL,robot_servo_extern_relative_run:()=>KL,robot_servo_extern_stop:()=>kL,robot_servo_extern_stop_mode:()=>wL,robot_traffic_light_extern:()=>VL,servo_PIN_init:()=>$L,servo_get_angle:()=>tL,servo_get_speed:()=>iL,servo_init:()=>jA,servo_move:()=>TL,servo_move_angle:()=>ZL,servo_set_angle:()=>ZA,servo_set_speed:()=>eL,servo_speed_360:()=>$A,syn6288_builtin_voice:()=>vL,syn6288_get_voice:()=>YL,syn6288_set_voice:()=>PL,syn6288_tts_play:()=>XL});var Q={};e.r(Q),e.d(Q,{actuator_dc_motor:()=>fN,actuator_dc_motor_stop:()=>FN,actuator_get_led_bright:()=>dN,actuator_get_led_state:()=>IN,actuator_led_bright:()=>lN,actuator_led_brightness:()=>TN,actuator_mixbot_buzzer_on_off:()=>yN,actuator_mixgo_nova_mic_get:()=>GN,actuator_mixgo_nova_mic_set:()=>BN,actuator_mixgo_nova_onboard_music_pitch:()=>KN,actuator_mixgo_nova_onboard_music_stop:()=>JN,actuator_mixgo_nova_play_audio:()=>HN,actuator_mixgo_nova_play_online_audio:()=>WN,actuator_mixgo_nova_record_audio:()=>kN,actuator_mixgo_nova_voice_get:()=>wN,actuator_mixgo_nova_voice_set:()=>UN,actuator_mixgo_zero_led_color:()=>MN,actuator_onboard_neopixel_rgb:()=>gN,actuator_onboard_neopixel_rgb_all:()=>CN,actuator_onboard_neopixel_rgb_show_all_chase:()=>SN,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>AN,actuator_onboard_neopixel_write:()=>cN,actuator_stepper_keep:()=>NN,actuator_stepper_stop:()=>DN,analog_ble_keyboard_init:()=>sD,analog_ble_keyboard_input:()=>pD,analog_ble_keyboard_mouse_init:()=>MD,analog_ble_keyboard_mouse_input:()=>OD,analog_ble_keyboard_mouse_send_battery:()=>ED,analog_ble_keyboard_mouse_str:()=>RD,analog_ble_keyboard_send_battery:()=>uD,analog_ble_keyboard_str:()=>aD,analog_ble_mouse_init:()=>rD,analog_ble_mouse_input:()=>ID,analog_ble_mouse_keyboard_input:()=>cD,analog_ble_mouse_send_battery:()=>TD,analog_keyboard_input:()=>jN,analog_keyboard_str:()=>iD,analog_mouse_input:()=>eD,bitbot_motor:()=>VN,bitbot_move:()=>xN,bitbot_stop:()=>bN,ble_keyboard_connect:()=>oD,ble_keyboard_get_mac:()=>_D,ble_keyboard_mouse_connect:()=>mD,ble_keyboard_mouse_get_mac:()=>hD,ble_mouse_connect:()=>dD,ble_mouse_get_mac:()=>lD,cc_number:()=>hN,educore_ble_keyboard_input:()=>PD,educore_ble_sensor_connected:()=>FD,educore_ble_sensor_init:()=>fD,educore_buzzer:()=>gD,educore_buzzer_play_tone:()=>CD,educore_buzzer_play_tone_time:()=>SD,educore_buzzer_stop:()=>AD,educore_neopixel_clear:()=>DD,educore_neopixel_rgb:()=>ND,educore_rgb_light:()=>LD,esp32_music_get_tempo:()=>nN,esp32_music_reset:()=>aN,esp32_music_set_tempo:()=>iN,esp32_onboard_music_pitch:()=>sN,esp32_onboard_music_pitch_with_time:()=>_N,esp32_onboard_music_play_list:()=>pN,esp32_onboard_music_stop:()=>oN,general_key:()=>ZN,general_key_tuple:()=>nD,get_keyboard_light:()=>YD,get_power_output:()=>qN,ledswitch:()=>rN,mixbot_motor:()=>XN,mixbot_motor_status:()=>PN,mixbot_move:()=>YN,mixbot_stop:()=>vN,mouse_key:()=>tD,number:()=>uN,rm_actuator_get_led_bright:()=>EN,rm_actuator_get_led_state:()=>ON,rm_actuator_led_bright:()=>mN,rm_actuator_led_brightness:()=>RN,rm_motor:()=>LN,set_all_power_output:()=>zN,set_power_output:()=>QN,special_key:()=>$N});var q={};e.r(q),e.d(q,{ai_sensor_20object:()=>df,ai_sensor_ailocal_class:()=>ef,ai_sensor_ailocal_class_result:()=>tf,ai_sensor_ailocal_train:()=>ZD,ai_sensor_asr_recognize:()=>pf,ai_sensor_audio_play:()=>sf,ai_sensor_audio_record:()=>nf,ai_sensor_barcode:()=>BD,ai_sensor_circle:()=>WD,ai_sensor_classifier_faces:()=>lf,ai_sensor_color:()=>qD,ai_sensor_color_chases:()=>$D,ai_sensor_color_chases_result:()=>jD,ai_sensor_config:()=>yD,ai_sensor_face:()=>rf,ai_sensor_find_20objects:()=>If,ai_sensor_find_barcodes:()=>GD,ai_sensor_find_circles:()=>KD,ai_sensor_find_colors:()=>zD,ai_sensor_find_licenseplates:()=>uf,ai_sensor_find_lines:()=>HD,ai_sensor_find_qrcodes:()=>VD,ai_sensor_find_rects:()=>QD,ai_sensor_find_tags:()=>wD,ai_sensor_licenseplate:()=>af,ai_sensor_line:()=>kD,ai_sensor_qrcode:()=>bD,ai_sensor_qrcode_lite:()=>XD,ai_sensor_rect:()=>JD,ai_sensor_rgb:()=>xD,ai_sensor_tag:()=>UD,ai_sensor_use_uart_init:()=>vD,ai_sensor_yolo_recognize:()=>_f,ai_sensor_yolo_recognize_result:()=>of});var z={};e.r(z),e.d(z,{AI_CAMERA_INIT:()=>Af,AI_STOP_ACQUISITION:()=>Bf,CI130X_BROADCAST_SANT:()=>Ef,CI130X_BROADCAST_SYSTEM_TIME:()=>Rf,CI130X_GET_THE_RECOGNIZED_CMD_SANT:()=>mf,CI130X_GET_WHETHER_IDENTIFY_SANT:()=>hf,CI130X_IDENTIFY_AND_SAVE_SANT:()=>Mf,CI130X_SET_SYSTEM_CMD_SANT:()=>Of,CREATE_CAMERA:()=>cf,DELETE_PEOPLE_FACE_ID:()=>Vf,GET_CAT_FACE_DETECTION_LOCATION:()=>Ff,GET_CAT_FACE_DETECTION_NUM:()=>ff,GET_COLOR_DETECTION_LOCATION:()=>Df,GET_COLOR_DETECTION_NUM:()=>Nf,GET_FACE_DETECTION_KEYPOINT_LOCATION:()=>vf,GET_FACE_DETECTION_LOCATION:()=>Yf,GET_FACE_DETECTION_NUM:()=>Pf,GET_FACE_RECOGNITION_ID:()=>Xf,GET_FACE_RECOGNITION_ID_KEYPOINT_LOCATION:()=>xf,GET_FACE_RECOGNITION_ID_LOCATION:()=>yf,GET_PICTURE_DATA_EXACT:()=>Cf,GET_QR_CODE_RECOGNITION_DATA:()=>Lf,MIXIO_REPORT_IMAGE_DATA:()=>Gf,PEOPLE_FACE_ENROLL:()=>bf,SCREEN_SHOW_CAM_GRAPH_SHOOT:()=>Sf,SHOOT_AND_SAVE_PICTURE:()=>gf,VOICE_RECOGNITION_CONTROL:()=>Tf});var j={};e.r(j),e.d(j,{MICROPYTHON_AI_Speech_asr:()=>kf,MICROPYTHON_AI_Speech_unit:()=>wf,MICROPYTHON_AI_client:()=>Uf});var $={};e.r($),e.d($,{mpython_blynk_app_data:()=>tF,mpython_blynk_app_notify:()=>zf,mpython_blynk_email:()=>iF,mpython_blynk_get_timers:()=>$f,mpython_blynk_on_connected:()=>Jf,mpython_blynk_on_disconnected:()=>Kf,mpython_blynk_run:()=>qf,mpython_blynk_sensor_data_to_app:()=>eF,mpython_blynk_set_property:()=>nF,mpython_blynk_setup:()=>sF,mpython_blynk_stop_timers:()=>jf,mpython_blynk_sync_virtual:()=>Wf,mpython_blynk_terminal_widget_vpin:()=>Hf,mpython_blynktimer:()=>Zf,mpython_blynktimer_run:()=>Qf});var Z={};e.r(Z),e.d(Z,{communicate_bluetooth_central_init:()=>BF,communicate_bluetooth_connect:()=>wF,communicate_bluetooth_disconnect:()=>kF,communicate_bluetooth_handle:()=>qF,communicate_bluetooth_is_connected:()=>WF,communicate_bluetooth_mac:()=>HF,communicate_bluetooth_peripheral_init:()=>GF,communicate_bluetooth_recv:()=>QF,communicate_bluetooth_recv_only:()=>JF,communicate_bluetooth_scan:()=>UF,communicate_bluetooth_send:()=>KF,communicate_espnow_init:()=>zF,communicate_espnow_init_new:()=>jF,communicate_i2c_available:()=>dF,communicate_i2c_init:()=>pF,communicate_i2c_master_read:()=>lF,communicate_i2c_onboard:()=>_F,communicate_i2c_read:()=>aF,communicate_i2c_scan:()=>rF,communicate_i2c_write:()=>uF,communicate_ir_recv_init:()=>fF,communicate_ir_send_init:()=>XF,communicate_ow_init:()=>CF,communicate_ow_read:()=>LF,communicate_ow_reset:()=>AF,communicate_ow_scan:()=>SF,communicate_ow_select:()=>DF,communicate_ow_write:()=>NF,communicate_spi_buffer:()=>hF,communicate_spi_init:()=>TF,communicate_spi_onboard:()=>oF,communicate_spi_read:()=>mF,communicate_spi_read_output:()=>EF,communicate_spi_readinto:()=>OF,communicate_spi_readinto_output:()=>RF,communicate_spi_set:()=>MF,communicate_spi_write:()=>cF,communicate_spi_write_readinto:()=>gF,espnow_radio_channel:()=>nP,espnow_radio_channel_new:()=>_P,espnow_radio_on_off:()=>oP,espnow_radio_rec:()=>aP,espnow_radio_recv:()=>rP,espnow_radio_recv_certain_msg:()=>lP,espnow_radio_recv_certain_msg_new:()=>IP,espnow_radio_recv_msg:()=>uP,espnow_radio_recv_new:()=>dP,espnow_radio_send:()=>pP,espnow_radio_txpower:()=>sP,i2c_slave_onreceive:()=>IF,internal_variable:()=>FF,ir_recv_timeout:()=>vF,ir_transmit_busy:()=>VF,ir_transmit_conventional_data:()=>yF,ir_transmit_raw_code:()=>bF,ir_transmit_study_code:()=>xF,ir_whether_recv:()=>YF,lora_init:()=>TP,lora_packet:()=>MP,lora_recv:()=>mP,lora_send:()=>hP,network_espnow_info:()=>ZF,network_espnow_mac:()=>$F,network_espnow_recv:()=>eP,network_espnow_recv_handle:()=>iP,network_espnow_send:()=>tP,recv_fun:()=>PF,urequests_attribute:()=>OP,urequests_get:()=>EP,urequests_method:()=>RP});var ee={};e.r(ee),e.d(ee,{display_animate:()=>WP,display_circle:()=>KP,display_color_seclet:()=>nY,display_draw_4strings:()=>VP,display_fill:()=>HP,display_lcd_use_i2c_init:()=>uY,display_line:()=>UP,display_line_arbitrarily:()=>BP,display_matrix_extern_bright_point:()=>PP,display_matrix_extern_bright_screen:()=>vP,display_matrix_extern_clear:()=>DP,display_matrix_extern_get_pixel:()=>FP,display_matrix_extern_get_screen_pixel:()=>YP,display_matrix_extern_image_builtins:()=>XP,display_matrix_extern_scroll_string:()=>LP,display_matrix_extern_scroll_string_delay:()=>NP,display_matrix_extern_shift:()=>fP,display_matrix_extern_show_frame_string:()=>SP,display_matrix_extern_show_frame_string_delay:()=>AP,display_matrix_extern_show_image:()=>gP,display_matrix_extern_show_image_or_string_delay:()=>CP,display_matrix_use_i2c_init:()=>cP,display_oled_drawPixel:()=>qP,display_oled_showBitmap:()=>QP,display_oled_use_i2c_init:()=>TY,display_onoff:()=>wP,display_rect:()=>GP,display_tm1650_power:()=>jP,display_tm1650_set_brightness:()=>eY,display_tm1650_show_dot:()=>ZP,display_tm1650_show_num:()=>$P,display_tm_use_i2c_init:()=>zP,display_triangle:()=>JP,display_use_i2c_init:()=>bP,extern_oled_bright_point:()=>LY,extern_oled_clear:()=>CY,extern_oled_get_pixel:()=>AY,extern_oled_hvline:()=>DY,extern_oled_line:()=>fY,extern_oled_scroll_string:()=>cY,extern_oled_scroll_string_delay:()=>gY,extern_oled_shape_rect:()=>NY,extern_oled_shift:()=>SY,extern_oled_show_frame_string:()=>OY,extern_oled_show_frame_string_delay:()=>RY,extern_oled_show_image:()=>MY,extern_oled_show_image_or_string_delay:()=>EY,extern_oled_show_image_xy:()=>hY,extern_oled_show_string:()=>mY,image_shift:()=>kP,lcd_backlight:()=>dY,lcd_clear:()=>IY,lcd_print_string:()=>lY,lcd_show_image_or_string_delay:()=>rY,matrix_extern_image_arithmetic:()=>yP,matrix_extern_image_invert:()=>xP,tft_fill:()=>pY,tft_line_arbitrarily:()=>aY,tft_scroll_string_delay:()=>oY,tft_show_frame_string_delay:()=>_Y,tft_show_image_or_string_delay:()=>sY,tft_show_image_xy:()=>iY,tft_use_spi_init:()=>tY});var te={};e.r(te),e.d(te,{bitbot_display_bitmap_create:()=>cv,bitbot_display_image_create:()=>Rv,display_available:()=>wY,display_bitmap_create:()=>GY,display_bright_point:()=>JY,display_bright_screen:()=>qY,display_clear:()=>UY,display_get_pixel:()=>KY,display_get_screen_pixel:()=>QY,display_image_builtins:()=>bY,display_image_builtins_all:()=>VY,display_image_create:()=>BY,display_scroll_string:()=>XY,display_scroll_string_delay:()=>yY,display_shift:()=>WY,display_show_frame_string:()=>YY,display_show_frame_string_delay:()=>vY,display_show_image:()=>FY,display_show_image_or_string_delay:()=>PY,draw_pointer:()=>Vv,image_arithmetic:()=>kY,image_invert:()=>HY,mixbot_display_bitmap_create:()=>Mv,mixbot_display_bright_screen:()=>Ev,mixbot_display_get_ambientbright:()=>mv,mixbot_display_get_screen_pixel:()=>hv,mixbot_display_image_create:()=>Tv,mixbot_display_rotate:()=>Ov,mixgo_display_bitmap_create:()=>iv,mixgo_display_image_create_new:()=>tv,mixgome_display_bitmap_create:()=>jY,mixgome_display_font:()=>ev,mixgome_display_image_create:()=>zY,mixgomini_display_bitmap_create:()=>ZY,mixgomini_display_image_create:()=>$Y,mpython_display_hvline:()=>dv,mpython_display_line:()=>Iv,mpython_display_shape_rect:()=>lv,mpython_pbm_image:()=>nv,nova_draw_pointer:()=>Bv,onboard_oled_bright_point:()=>rv,onboard_oled_scroll_string_delay:()=>uv,onboard_oled_show_frame_string_delay:()=>av,onboard_oled_show_image:()=>sv,onboard_oled_show_image_or_string_delay:()=>pv,onboard_oled_show_image_xy:()=>_v,onboard_oled_show_string:()=>ov,onboard_tft_bright_point:()=>Fv,onboard_tft_bright_screen:()=>Wv,onboard_tft_clear:()=>Kv,onboard_tft_clock_clear:()=>xv,onboard_tft_clock_draw:()=>yv,onboard_tft_clock_get_rtctime:()=>vv,onboard_tft_clock_init:()=>Yv,onboard_tft_clock_set_time:()=>Xv,onboard_tft_display_hvline:()=>Nv,onboard_tft_display_line:()=>Dv,onboard_tft_display_shape_circle:()=>bv,onboard_tft_display_shape_rect:()=>Lv,onboard_tft_fill:()=>Pv,onboard_tft_get_pixel:()=>fv,onboard_tft_get_screen_pixel:()=>Hv,onboard_tft_scroll_string_delay:()=>xY,onboard_tft_shift:()=>kv,onboard_tft_show_frame_string:()=>wv,onboard_tft_show_frame_string_delay:()=>Av,onboard_tft_show_image:()=>Uv,onboard_tft_show_image_or_string_delay:()=>Sv,onboard_tft_show_image_xy:()=>gv,onboard_tft_show_image_xy_direct:()=>Cv,onboard_tft_show_texts:()=>Gv});var ie={};e.r(ie),e.d(ie,{factory_block:()=>eX,factory_block_return:()=>tX,factory_block_return_with_textarea:()=>nX,factory_block_with_textarea:()=>iX,factory_callMethod_noreturn:()=>$v,factory_callMethod_return:()=>Zv,factory_declare:()=>jv,factory_from_import:()=>Jv,factory_function_noreturn:()=>qv,factory_function_return:()=>zv,factory_import:()=>Qv,folding_block:()=>sX});var ne={};e.r(ne),e.d(ne,{inout_analog_atten:()=>OX,inout_analog_read:()=>dX,inout_analog_read_init:()=>EX,inout_analog_write:()=>uX,inout_analog_write_init:()=>mX,inout_analog_write_set:()=>rX,inout_digital_init:()=>MX,inout_digital_read:()=>pX,inout_digital_write:()=>oX,inout_highlow:()=>_X,inout_pin_attachInterrupt:()=>TX,inout_pin_pressed:()=>IX,inout_pin_pressed_init:()=>RX,inout_pwm_analog_write:()=>aX,inout_pwm_analog_write_init:()=>hX,inout_pwm_analog_write_set_freq:()=>lX});var se={};e.r(se),e.d(se,{IOT_CONNECT_OLLAMA:()=>QX,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>BX,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>bX,IOT_EMQX_PING:()=>GX,IOT_FORMATTING:()=>yX,IOT_FORMAT_STRING:()=>xX,IOT_MIXIO_NTP:()=>UX,IOT_MIXIO_PUBLISH:()=>DX,IOT_MIXIO_SUBSCRIBE:()=>fX,iot_client_onboard:()=>wX,iot_connect_ollama:()=>JX,iot_connect_openai:()=>qX,iot_http_client:()=>kX,iot_http_data:()=>HX,iot_mixio_check:()=>YX,iot_mixio_connect:()=>NX,iot_mixio_connect_only:()=>PX,iot_mixio_disconnect:()=>FX,iot_mixio_format_msg:()=>XX,iot_mixio_format_topic:()=>vX,iot_mixly_key:()=>VX,iot_mqtt_client:()=>WX,iot_mqtt_data:()=>KX,iot_onenet_check:()=>AX,iot_onenet_connect:()=>gX,iot_onenet_disconnect:()=>CX,iot_onenet_publish:()=>LX,iot_onenet_publish_dict:()=>SX,iot_wifi_connect:()=>cX,ollama_empty_history:()=>$X,use_ollama_llm_to_chat:()=>zX,use_ollama_llm_to_chat_return:()=>jX});var _e={};e.r(_e),e.d(_e,{educore_mqtt_connect:()=>fy,educore_mqtt_connect_success:()=>vy,educore_mqtt_subscribe_message:()=>Fy,educore_mqtt_topic_publish:()=>Yy,educore_mqtt_topic_subscribe:()=>Py,educore_wifi_connect:()=>Dy,network_ap_connect:()=>py,network_connect:()=>ey,network_get_connect:()=>iy,network_get_wifi:()=>oy,network_init:()=>ZX,network_is_active:()=>_y,network_open:()=>sy,network_scan:()=>ay,network_server:()=>uy,network_socket_accept:()=>Ty,network_socket_bind:()=>ly,network_socket_close:()=>Oy,network_socket_connect:()=>dy,network_socket_init:()=>ry,network_socket_listen:()=>Iy,network_socket_receive:()=>My,network_socket_receive_from:()=>my,network_socket_send:()=>hy,network_socket_send_to:()=>Ey,network_stop:()=>ny,network_wifi_connect:()=>ty,ntptime_address:()=>Sy,ntptime_time:()=>Cy,requests_attribute:()=>cy,requests_attribute2:()=>Ly,requests_get:()=>Ry,requests_get2:()=>Ay,requests_method:()=>gy,requests_post:()=>Ny});var oe={};e.r(oe),e.d(oe,{get_potential_num:()=>Xy,nova_g1_motor:()=>yy,nova_g1_spk_en:()=>by,nova_g1_usb:()=>xy});var pe={};e.r(pe),e.d(pe,{pe_g1_battery_left:()=>By,pe_g1_dc_motor:()=>Gy,pe_g1_dc_motor_speed:()=>Uy,pe_g1_servo_get_angle:()=>Hy,pe_g1_servo_get_speed:()=>Wy,pe_g1_servo_set_angle:()=>wy,pe_g1_servo_set_speed:()=>ky,pe_g1_use_i2c_init:()=>Vy});var ae={};e.r(ae),e.d(ae,{CI130X_BROADCAST:()=>Tx,CI130X_GET_THE_RECOGNIZED_CMD:()=>Ix,CI130X_GET_WHETHER_IDENTIFY:()=>dx,CI130X_IDENTIFY_AND_SAVE:()=>lx,CI130X_SET_SYSTEM_CMD:()=>Mx,HCSR04:()=>Jx,PS2_Button:()=>zx,PS2_Buttons:()=>jx,PS2_Buttons_new:()=>_b,PS2_State:()=>$x,PS2_init:()=>Qx,PS2_init_new:()=>nb,PS2_stk:()=>Zx,PS2_stk_new:()=>ob,PS2_vibration:()=>qx,PS2_vibration_new:()=>sb,RTC_get_time:()=>tb,RTC_set_date:()=>Zy,RTC_set_datetime:()=>eb,RTC_set_time:()=>$y,camera_sensor_init:()=>bb,camera_sensor_result:()=>Vb,column_tube_foot:()=>wb,define_keyboards:()=>kb,educore_body_sensor:()=>Nb,educore_button_sensor_extern:()=>Pb,educore_camera_sensor:()=>xb,educore_infrared_sensor:()=>Fb,educore_soilhum_sensor:()=>Db,educore_temp_sensor:()=>yb,educore_temphum_sensor:()=>fb,educore_ultrasonic_sensor:()=>vb,esp32_s2_weather_init:()=>kx,esp32_s2_weather_rain:()=>Wx,esp32_s2_weather_wd:()=>Hx,esp32_s2_weather_ws:()=>Kx,extern_rfid_read:()=>Px,extern_rfid_readcontent:()=>vx,extern_rfid_readid:()=>Yx,extern_rfid_status:()=>xx,extern_rfid_write:()=>Xx,extern_rfid_write_return:()=>yx,get_keboards_value:()=>Wb,gnss_get_data:()=>ub,gnss_have_data:()=>rb,init_matrix_keyboard:()=>Hb,interaction_whether_to_interaction:()=>ux,interaction_whether_to_interaction_SANT:()=>rx,line_tube_foot:()=>Ub,mixbot_sensor_extern_get_addr:()=>Rb,mixbot_sensor_extern_set_addr:()=>cb,pm25_get_data:()=>ab,radar_set_DETECTION_THRESHOLD:()=>px,radar_set_DETECTION_THRESHOLD_SANT:()=>ax,robot_button_extern_get_value:()=>db,robot_color_extern_get_value:()=>mb,robot_infrared_extern_get_value:()=>Tb,robot_infrared_extern_grey_get_value:()=>Mb,robot_potentiometer_extern_get_value:()=>hb,robot_sonar_extern_get_value:()=>Eb,robot_sonar_extern_led:()=>Ob,robot_touch_extern_get_value:()=>Ib,sensor_APDS9960_extern:()=>mx,sensor_DS18X20:()=>Lb,sensor_LTR308_extern:()=>Ex,sensor_LTR390UV_extern:()=>Ax,sensor_MAX30102_extern:()=>hx,sensor_QMC5883L_extern:()=>Lx,sensor_VL530LX_extern:()=>fx,sensor_aht11_extern:()=>Dx,sensor_bmp:()=>sx,sensor_dht11:()=>ib,sensor_distance_hrsc04:()=>jy,sensor_hp203_extern:()=>Ox,sensor_ltr381_extern:()=>Cx,sensor_mixgo_extern_button_attachInterrupt:()=>qy,sensor_mixgo_extern_button_get_presses:()=>Qy,sensor_mixgo_extern_button_is_pressed:()=>Ky,sensor_mixgo_extern_button_was_pressed:()=>Jy,sensor_mixgo_extern_light:()=>ex,sensor_mixgo_extern_pin_near:()=>ix,sensor_mixgo_extern_sound:()=>tx,sensor_mixgoce_hot_wheel_degrees:()=>wx,sensor_mixgoce_hot_wheel_is_touched:()=>Ux,sensor_mpu9250_attachGestureInterrupt:()=>zy,sensor_ms5611_extern:()=>cx,sensor_ms5611_extern_altitude:()=>gx,sensor_read_humiture:()=>Yb,sensor_rtc_init:()=>nx,sensor_sht:()=>_x,sensor_shtc3_extern:()=>Nx,sensor_spl06_001_extern:()=>Rx,sensor_ucs12071_extern:()=>Sx,sensor_use_i2c_init:()=>ox,sensor_use_spi_init:()=>Fx,sensor_use_uart_init:()=>pb,sensor_weather_solo_init:()=>gb,sensor_weather_solo_rain:()=>Ab,sensor_weather_solo_wd:()=>Cb,sensor_weather_solo_ws:()=>Sb,sensor_weigh_init:()=>Bb,tvoc_get_data:()=>lb,ultrasonic_sensor_read_distance:()=>Xb,weather_data:()=>bx,weather_have_data:()=>Vx,weather_set_label:()=>Gx,weather_uart_mixio:()=>Bx,weigh_sensor_get_weight:()=>Gb});var ue={};e.r(ue),e.d(ue,{HCSR04:()=>eV,bitbot_als_num:()=>gB,dht11:()=>FB,educore_button_sensor:()=>bB,educore_button_was_pressed:()=>VB,educore_gyroscope_sensor:()=>XB,educore_gyroscope_sensor_read:()=>yB,educore_gyroscope_sensor_shake:()=>xB,educore_light_sensor:()=>vB,educore_rfid_sensor:()=>BB,educore_rfid_sensor_scan:()=>GB,educore_rfid_sensor_scan_data:()=>UB,educore_voice_sensor:()=>PB,number1:()=>tV,number2:()=>iV,number3:()=>nV,number4:()=>sV,number5:()=>_V,number6:()=>oV,number7:()=>pV,onboard_RTC_get_time:()=>$V,onboard_RTC_get_time_str:()=>tB,onboard_RTC_get_timestamp:()=>ZV,onboard_RTC_get_timetuple_to_str:()=>iB,onboard_RTC_set_datetime:()=>zV,onboard_RTC_settime_string:()=>jV,onboard_RTC_timestamp_totuple:()=>eB,rfid_readcontent:()=>CV,rfid_readid:()=>gV,rfid_status:()=>LV,rfid_write:()=>SV,rfid_write_return:()=>AV,sensor_LTR308:()=>mV,sensor_adxl345_get_acceleration:()=>yV,sensor_aht11:()=>RV,sensor_bitbot_ALS:()=>cB,sensor_button_get_presses:()=>AB,sensor_button_is_pressed:()=>CB,sensor_button_was_pressed:()=>SB,sensor_compass_reset:()=>UV,sensor_ds18x20:()=>MV,sensor_eulerangles:()=>DV,sensor_get_acceleration:()=>NV,sensor_get_temperature:()=>cV,sensor_get_the_coprocessor_version:()=>wB,sensor_hp203:()=>OV,sensor_light:()=>fB,sensor_lm35:()=>hV,sensor_mixbot_get_gyro:()=>RB,sensor_mixbot_patrol_calibrate:()=>mB,sensor_mixbot_patrol_value:()=>EB,sensor_mixbot_temperature:()=>OB,sensor_mixgo_LTR308:()=>dV,sensor_mixgo_button_attachInterrupt:()=>qb,sensor_mixgo_button_get_presses:()=>Qb,sensor_mixgo_button_is_pressed:()=>Kb,sensor_mixgo_button_was_pressed:()=>Jb,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>_B,sensor_mixgo_cc_mmc5603_get_angle:()=>sB,sensor_mixgo_cc_mmc5603_get_magnetic:()=>nB,sensor_mixgo_light:()=>DB,sensor_mixgo_nova_LTR308:()=>TV,sensor_mixgo_nova_pin_near:()=>lV,sensor_mixgo_pin_near:()=>rV,sensor_mixgo_pin_near_double:()=>uV,sensor_mixgo_pin_near_single:()=>aV,sensor_mixgo_pin_pressed:()=>vV,sensor_mixgo_sant_color:()=>IV,sensor_mixgo_touch_slide:()=>YV,sensor_mixgocar42_button_attachInterrupt:()=>Zb,sensor_mixgocar42_button_get_presses:()=>$b,sensor_mixgocar42_button_is_pressed:()=>zb,sensor_mixgocar42_button_was_pressed:()=>jb,sensor_mixgocar_battery_left:()=>hB,sensor_mixgocar_pin_near:()=>TB,sensor_mixgocar_pin_near_line:()=>IB,sensor_mixgocar_pin_near_state_change:()=>MB,sensor_mixgoce_pin_pressed:()=>PV,sensor_mixgoce_temperature:()=>pB,sensor_mixgome_temperature:()=>oB,sensor_mpu9250_calibrate_compass:()=>VV,sensor_mpu9250_field_strength:()=>GV,sensor_mpu9250_gesture:()=>fV,sensor_mpu9250_get_acceleration:()=>FV,sensor_mpu9250_get_gyro:()=>bV,sensor_mpu9250_get_magnetic:()=>xV,sensor_mpu9250_temperature:()=>BV,sensor_mpython_pin_pressed:()=>XV,sensor_mpython_qmi8658_get_gyro:()=>aB,sensor_mpython_qmi8658_temperature:()=>uB,sensor_onboard_compass_reset:()=>qV,sensor_onboard_mpu9250_calibrate_compass:()=>KV,sensor_onboard_mpu9250_field_strength:()=>QV,sensor_onboard_mpu9250_gesture:()=>wV,sensor_onboard_mpu9250_get_acceleration:()=>kV,sensor_onboard_mpu9250_get_gyro:()=>WV,sensor_onboard_mpu9250_get_magnetic:()=>HV,sensor_onboard_mpu9250_temperature:()=>JV,sensor_pin_near:()=>NB,sensor_pin_pressed:()=>LB,sensor_read:()=>YB,sensor_rm_acc:()=>dB,sensor_rm_battery_left:()=>lB,sensor_rm_pin_near_double:()=>rB,sensor_sound:()=>EV});var re={};e.r(re),e.d(re,{serial_any:()=>JB,serial_print:()=>kB,serial_print_byte:()=>HB,serial_print_hex:()=>KB,serial_println:()=>WB,serial_read_from_ai:()=>sG,serial_readline:()=>qB,serial_readstr:()=>QB,serial_send_to_ai:()=>nG,serial_softserial:()=>zB,serial_softserial_new:()=>jB,system_input:()=>$B,system_print:()=>ZB,system_print_end:()=>tG,system_print_inline:()=>eG,system_print_many:()=>iG});var le={};e.r(le),e.d(le,{Panic_with_status_code:()=>hG,Timer_init:()=>PG,base_delay:()=>XG,controls_delay:()=>cG,controls_delay_new:()=>gG,controls_end_program:()=>EG,controls_millis:()=>mG,controls_uname:()=>RG,reset:()=>OG,system_bitbot_shutdown:()=>FG,system_device_name:()=>TG,system_device_serial_number:()=>MG,system_event_bus_source:()=>dG,system_event_bus_value:()=>IG,system_machine_reset:()=>fG,system_on_event:()=>uG,system_raise_event:()=>aG,system_reset:()=>oG,system_run_in_background:()=>_G,system_ticks_diff:()=>AG,system_timer:()=>SG,system_timer_init:()=>LG,system_timestamp:()=>rG,system_value:()=>lG,system_wait:()=>pG,system_wdt_feed:()=>DG,system_wdt_init:()=>NG,time_ticks_diff:()=>vG,timer:()=>CG,timer2:()=>YG});var de={};e.r(de),e.d(de,{Air_daily_content:()=>JG,Air_now_content:()=>GG,Geo_moon_content:()=>qG,Geo_sun_content:()=>QG,Life_suggestion_content:()=>wG,Location_search_content:()=>HG,Tide_daily_content:()=>kG,WEATHER_DAILY:()=>xG,WEATHER_HOUR:()=>bG,WEATHER_NOW:()=>yG,Weather_alarm_content:()=>UG,Weather_daily:()=>WG,Weather_daily_content:()=>KG,Weather_now:()=>VG,Weather_now_content:()=>BG});var Ie={};e.r(Ie),e.d(Ie,{controls_pin_attachInterrupt:()=>MU,inout_analog_atten:()=>_U,inout_analog_write:()=>nU,inout_analog_write_init:()=>uU,inout_analog_write_set:()=>sU,inout_analog_write_set_freq:()=>lU,inout_digital_init:()=>aU,inout_digital_read:()=>iU,inout_digital_write:()=>tU,inout_highlow:()=>eU,inout_pinMode:()=>dU,inout_pin_attachInterrupt:()=>pU,inout_pin_pressed:()=>oU,inout_pin_pressed_init:()=>rU,pin_pressed:()=>TU,pin_pressed_init:()=>IU});var Te={};e.r(Te),e.d(Te,{analog_input:()=>SU,analog_output:()=>LU,espnow_channel:()=>cU,haskylens_model:()=>gU,i2c_A_pin:()=>NU,i2c_B_pin:()=>DU,pins_analog:()=>vU,pins_analog_pin:()=>XU,pins_axis:()=>jU,pins_brightness:()=>$U,pins_builtinimg:()=>HU,pins_builtinimg_extern:()=>WU,pins_button:()=>bU,pins_buttonB:()=>VU,pins_dac:()=>yU,pins_dac_pin:()=>xU,pins_digital:()=>mU,pins_digital_dot:()=>ow,pins_digital_pin:()=>EU,pins_exlcdh:()=>qU,pins_exlcdv:()=>zU,pins_imglist:()=>KU,pins_input_pin:()=>OU,pins_one_more:()=>_w,pins_output_pin:()=>RU,pins_playlist:()=>JU,pins_playlist_extern:()=>QU,pins_pwm:()=>BU,pins_pwm_pin:()=>GU,pins_radio_datarate:()=>sw,pins_radio_power:()=>nw,pins_serial:()=>kU,pins_tone_notes:()=>iw,pins_touch:()=>wU,pins_touch_pin:()=>UU,pins_tts_bgmusic:()=>tw,pins_tts_builtin_music:()=>ew,pins_tts_voice:()=>ZU,pwm_input:()=>CU,pwm_output:()=>AU,spi_A_pin:()=>fU,spi_B_pin:()=>FU,spi_C_pin:()=>PU,spi_D_pin:()=>YU});var Me={};e.r(Me),e.d(Me,{mini_g2_rfid_readcontent:()=>aw,mini_g2_rfid_readid:()=>pw,mini_g2_rfid_status:()=>lw,mini_g2_rfid_write:()=>uw,mini_g2_rfid_write_outcome:()=>rw});var he={};e.r(he),e.d(he,{inout_analog_atten:()=>cw,inout_analog_write:()=>Mw,inout_analog_write_init:()=>Rw,inout_analog_write_set:()=>hw,inout_digital_init:()=>Ow,inout_digital_read:()=>Tw,inout_digital_write:()=>Iw,inout_highlow:()=>dw,inout_pin_attachInterrupt:()=>Ew,inout_pin_pressed:()=>mw,inout_pin_pressed_init:()=>gw});var me={};e.r(me),e.d(me,{analog_input:()=>Yw,analog_output:()=>Xw,espnow_channel:()=>Fw,haskylens_model:()=>Pw,i2c_A_pin:()=>yw,i2c_B_pin:()=>xw,pins_analog:()=>ww,pins_analog_pin:()=>Uw,pins_axis:()=>tk,pins_brightness:()=>sk,pins_builtinimg:()=>Ik,pins_builtinimg_extern:()=>jw,pins_button:()=>Sw,pins_buttonB:()=>Aw,pins_dac:()=>Kw,pins_dac_pin:()=>Ww,pins_digital:()=>Cw,pins_digital_dot:()=>dk,pins_digital_pin:()=>Lw,pins_exlcdh:()=>ik,pins_exlcdv:()=>nk,pins_imglist:()=>$w,pins_input_pin:()=>Nw,pins_interrupt:()=>qw,pins_one_more:()=>lk,pins_output_pin:()=>Dw,pins_playlist:()=>Zw,pins_playlist_extern:()=>ek,pins_pwm:()=>Hw,pins_pwm_input:()=>fw,pins_pwm_pin:()=>kw,pins_radio_datarate:()=>rk,pins_radio_power:()=>uk,pins_serial:()=>zw,pins_tone_notes:()=>ak,pins_touch:()=>Qw,pins_touch_pin:()=>Jw,pins_tts_bgmusic:()=>pk,pins_tts_builtin_music:()=>ok,pins_tts_voice:()=>_k,pwm_output:()=>vw,spi_A_pin:()=>bw,spi_B_pin:()=>Vw,spi_C_pin:()=>Bw,spi_D_pin:()=>Gw});var Ee={};e.r(Ee),e.d(Ee,{mini_g2_rfid_readcontent:()=>Mk,mini_g2_rfid_readid:()=>Tk,mini_g2_rfid_status:()=>Ek,mini_g2_rfid_write:()=>hk,mini_g2_rfid_write_outcome:()=>mk});const Oe=Blockly,Re=Mixly,ce={NAME_TYPE:"VARIABLE",allVariables:function(e){var t;if(e.getDescendants)t=e.getDescendants();else{if(!e.getAllBlocks)throw"Not Block or Workspace: "+e;t=e.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(o+=n)):i=o}else i="i";return i}},ge=ce; -/** - * @license - * Visual Blocks Editor - * - * Copyright 2012 Google Inc. - * https://developers.google.com/blockly/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class Ce{constructor(e,t){if(this.variablePrefix_=t||"",this.reservedDict_=Object.create(null),e)for(var i=e.split(","),n=0;n0;s--)t.getInputTargetBlock("IF"+s)&&t.getInputTargetBlock("IF"+s).previousConnection?i[s]=t.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),t.getInputTargetBlock("DO"+s)&&t.getInputTargetBlock("DO"+s).previousConnection?n[s]=t.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(e.getAttribute("elseif"),10),this.elseCount_=parseInt(e.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Oe.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Oe.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Oe.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(e){var t=e.newBlock("controls_if_if");t.initSvg();for(var i=t.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=e.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=e.newBlock("controls_if_else");_.initSvg(),i.connect(_.previousConnection)}return t},compose:function(e){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var t=this.elseifCount_;t>0;t--)this.removeInput("IF"+t),this.removeInput("DO"+t);this.elseifCount_=0;for(var i=e.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(e){for(var t=e.getInputTargetBlock("STACK"),i=1;t;){switch(t.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);t.valueConnection_=n&&n.connection.targetConnection,t.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");t.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}t=t.nextConnection&&t.nextConnection.targetBlock()}},rebuildShape_:function(){var e=[null],t=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),e.push(s.connection.targetConnection),t.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(e,t,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var e=1;this.getInput("IF"+e);)this.removeInput("IF"+e),this.removeInput("DO"+e),e++;for(e=1;e<=this.elseifCount_;e++)this.appendValueInput("IF"+e).setCheck([Number,Boolean]).appendField(Oe.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+e).appendField(Oe.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Oe.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(e,t,i){for(var n=1;n<=this.elseifCount_;n++)e[n]&&e[n].reconnect(this,"IF"+n),t[n]&&t[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},we={init:function(){this.setColour(xe),this.appendValueInput("FROM").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.PYTHON_RANGE).appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Oe.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},ke={init:function(){this.setColour(xe),this.appendValueInput("LIST").setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Oe.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Oe.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Oe.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},He={init:function(){this.setColour(xe),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Oe.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Oe.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Oe.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Oe.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return{WHILE:Oe.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Oe.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[t]}))}},We={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Oe.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Oe.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Oe.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var e=document.createElement("mutation");return this.elseifCount_&&e.setAttribute("elseif",this.elseifCount_),this.elseCount_&&e.setAttribute("else",1),e},domToMutation:function(e){var t=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)t.getInputTargetBlock("IF"+s)&&t.getInputTargetBlock("IF"+s).previousConnection?i[s]=t.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),t.getInputTargetBlock("DO"+s)&&t.getInputTargetBlock("DO"+s).previousConnection?n[s]=t.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(e.getAttribute("elseif"),10),this.elseCount_=parseInt(e.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Oe.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Oe.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(e){var t=e.newBlock("controls_try");t.initSvg();for(var i=t.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=e.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=e.newBlock("controls_finally");_.initSvg(),i.connect(_.previousConnection)}return t},compose:function(e){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var t=this.elseifCount_;t>0;t--)this.removeInput("IF"+t),this.removeInput("DO"+t);this.elseifCount_=0;for(var i=e.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(e){for(var t=e.getInputTargetBlock("STACK"),i=1;t;){switch(t.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);t.valueConnection_=n&&n.connection.targetConnection,t.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");t.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}t=t.nextConnection&&t.nextConnection.targetBlock()}},rebuildShape_:function(){var e=[null],t=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),e.push(s.connection.targetConnection),t.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(e,t,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var e=1;this.getInput("IF"+e);)this.removeInput("IF"+e),this.removeInput("DO"+e),e++;for(e=1;e<=this.elseifCount_;e++)this.appendValueInput("IF"+e).setCheck([Number,Boolean]).appendField(Oe.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+e).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Oe.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(e,t,i){for(var n=1;n<=this.elseifCount_;n++)e[n]&&e[n].reconnect(this,"IF"+n),t[n]&&t[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Ke={init:function(){this.setColour(xe);var e=new Oe.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(e,"FLOW").appendField(Oe.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Oe.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var t=this;this.setTooltip((function(){var e=t.getFieldValue("FLOW");return{BREAK:Oe.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Oe.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[e]}))},onchange:function(){if(this.workspace){var e=!1,t=this;do{if("controls_repeat"==t.type||"controls_for"==t.type||"controls_forEach"==t.type||"controls_repeat_ext"==t.type||"controls_whileUntil"==t.type||"do_while"==t.type){e=!0;break}t=t.getSurroundParent()}while(t);e?this.setWarningText(null):this.setWarningText(Oe.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Je={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Oe.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Oe.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){return Oe.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",e.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},Qe={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Oe.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Oe.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){return Oe.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",e.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}};He.OPERATORS=[[Oe.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Oe.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Ke.OPERATORS=[[Oe.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Oe.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const qe={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Oe.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},ze={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},je={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Oe.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},$e={init:function(){this.setColour(xe),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},Ze={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Oe.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},et={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Oe.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},tt={init:function(){this.jsonInit({message0:Oe.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:xe,tooltip:Oe.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Oe.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},it={init:function(){this.setColour(xe),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Oe.Msg.MIXLY_STAT),this.setOutput(!0)}},nt={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},st={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Oe.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},_t={init:function(){this.appendDummyInput().appendField(Oe.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Oe.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Oe.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Oe.FieldDropdown([[Oe.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Oe.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(xe),this.setTooltip("do-while loop"),this.setHelpUrl("")}},ot={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pt={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},at={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},ut={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Oe.Msg.PROCEDURES_DEFRETURN_RETURN+Oe.Msg.MIXLY_GET_UNIQUE_IDEN)}},rt={init:function(){this.setColour(xe),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Oe.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},lt={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},dt=230;Oe.FieldTextInput.math_number_validator=function(e){return String(e)},Oe.FieldTextInput.math_number_validator_include_blank=function(e){if(""===e)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(e)?String(e):null};const It={init:function(){this.setColour(dt),this.appendDummyInput().appendField(new Oe.FieldTextInput("0",Oe.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MATH_NUMBER_TOOLTIP)}},Tt={init:function(){this.setColour(dt);this.appendDummyInput("").appendField(Oe.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Oe.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CONSTANT");return{pi:Oe.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Oe.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[t]}))}},Mt={init:function(){this.setColour(dt);this.appendDummyInput("").appendField(Oe.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Oe.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CONSTANT");return{pi:Oe.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Oe.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[t]}))}},ht={init:function(){this.setColour(dt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Oe.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{ADD:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Oe.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[t]}))}},mt={init:function(){this.setColour(dt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Oe.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{ADD:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Oe.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[t]}))}},Et={init:function(){this.setColour(dt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Oe.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Ot={init:function(){this.setColour(dt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Oe.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{SIN:Oe.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Oe.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Oe.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Oe.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Oe.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Oe.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Oe.Msg.MATH_SINGLE_TOOLTIP_LN}[t]}))}},Rt={init:function(){var e=[[Oe.Msg.MATH_BIN,"bin"],[Oe.Msg.MATH_OCT,"oct"],[Oe.Msg.MATH_HEX,"hex"]];this.setColour(dt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Oe.FieldDropdown(e),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{bin:Oe.Msg.MATH_DEC_TOOLTIP_BIN,oct:Oe.Msg.MATH_DEC_TOOLTIP_OCT,hex:Oe.Msg.MATH_DEC_TOOLTIP_HEX}[e]}))}},ct={init:function(){var e=[[Oe.Msg.LANG_MATH_TO_ROUND,"round"],[Oe.Msg.LANG_MATH_TO_CEIL,"ceil"],[Oe.Msg.LANG_MATH_TO_FLOOR,"floor"],[Oe.Msg.MATH_ABS,"fabs"],[Oe.Msg.MATH_SQRT,"sqrt"]];this.setColour(dt),this.appendValueInput("A").setCheck(Number).appendField(new Oe.FieldDropdown(e),"OP"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{sqrt:Oe.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Oe.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Oe.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Oe.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Oe.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Oe.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[e]}))}},gt={init:function(){var e=[[Oe.Msg.MIXLY_MAX,"max"],[Oe.Msg.MIXLY_MIN,"min"]];this.setColour(dt),this.appendValueInput("A").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(new Oe.FieldDropdown(e),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Oe.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{max:Oe.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Oe.Msg.MIXLY_TOOLTIP_MATH_MIN}[e]}))}},Ct={init:function(){var e=[[Oe.Msg.MATH_TWO,"two"],[Oe.Msg.MATH_EIGHT,"eight"],[Oe.Msg.MATH_TEN,"ten"],[Oe.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(dt),this.appendDummyInput("").appendField(Oe.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Oe.FieldDropdown(e),"OP").appendField(Oe.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.MATH_ZHW).appendField(new Oe.FieldDropdown(e),"OP2").appendField(Oe.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i={two:Oe.Msg.MATH_Before_two,eight:Oe.Msg.MATH_Before_eight,ten:Oe.Msg.MATH_Before_ten,sixteen:Oe.Msg.MATH_Before_sixteen},n=t.getFieldValue("OP2"),s={two:Oe.Msg.MATH_Behind_two,eight:Oe.Msg.MATH_Behind_eight,ten:Oe.Msg.MATH_Behind_ten,sixteen:Oe.Msg.MATH_Behind_sixteen};return i[e]+s[n]}))}},St={init:function(){var e=[[Oe.Msg.LANG_MATH_INT,"int"],[Oe.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(dt),this.setOutput(!0,Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Oe.FieldDropdown(e),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TYPE"),i={int:Oe.Msg.LANG_MATH_INT,float:Oe.Msg.LANG_MATH_FLOAT_RANDOM};return Oe.Msg.MATH_RANDOM_INT_TOOLTIP+i[e]}))}},At={init:function(){this.setColour(dt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Oe.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Oe.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Oe.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MATH_CONSTRAIN_TOOLTIP)}},Lt={init:function(){this.setColour(dt),this.appendValueInput("NUM",Number).appendField(Oe.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Oe.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Oe.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Nt={init:function(){this.setColour(dt),this.appendDummyInput().appendField(new Oe.FieldTextInput("0",Oe.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Oe.Msg.MATH_NUMBER_TOOLTIP)}},Dt={init:function(){this.setColour(dt),this.appendValueInput("NUM").setCheck(Number).appendField(Oe.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},ft={init:function(){this.setColour(dt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Oe.Msg.MATH_ROUND).appendField(Oe.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Oe.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MATH_ROUND_NEW_TOOLTIP)}},Ft={init:function(){var e=[[Oe.Msg.MIXLY_TO_INT,"int"],[Oe.Msg.MIXLY_TO_FLOAT,"float"],[Oe.Msg.MIXLY_TO_BITES,"b"],[Oe.Msg.LANG_MATH_BYTE+Oe.Msg.MIXLY_TO_INT,"bti"]];this.setColour(dt),this.appendValueInput("VAR").appendField(new Oe.FieldDropdown(e),"TOWHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{int:Oe.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Oe.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Oe.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[e]}))}},Pt={init:function(){var e=[[Oe.Msg.MIXLY_TO_INT,"int"],[Oe.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(dt),this.appendValueInput("VAR").appendField(new Oe.FieldDropdown(e),"TOWHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{int:Oe.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Oe.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[e]}))}},Yt=Lt,vt={init:function(){this.setColour(dt),this.appendValueInput("VAR").appendField(Oe.Msg.LANG_MATH_BYTE+Oe.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},Xt={init:function(){this.setColour(dt),this.itemCount_=1,this.setMutator(new Oe.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(Oe.Msg.MIXLY_PRODUCT+Oe.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(Oe.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(Oe.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(Oe.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("lists_create_with_container");t.initSvg();for(var i=t.getInput("STACK").connection,n=0;n1&&"\\"===e.charAt(0)){var t=e.charAt(1);if("0"===t||"b"===t||"f"===t||"n"===t||"r"===t||"t"===t||"\\"===t||"'"===t)return String(e).substring(0,2);if("x"===t&&"0"===e.charAt(2)&&"B"===e.charAt(3))return String(e).substring(0,4)}return String(e).substring(0,1)};const Gt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Oe.FieldTextInput("",Oe.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(e){if(1==e)var t="../../media/quote2.png";else t="../../media/quote3.png";return new Oe.FieldImage(t,7,12,'"')}},Ut={init:function(){this.setColour(bt),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Oe.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},wt={init:function(){this.setColour(bt),this.appendValueInput("VAR").setCheck(Number).appendField(Oe.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},kt={init:function(){this.setColour(bt),this.appendValueInput("VAR").setCheck(String).appendField(Oe.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Ht={init:function(){this.setColour(bt),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Wt={init:function(){this.setColour(bt),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Kt={init:function(){this.WHERE_OPTIONS=[[Oe.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Oe.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Oe.Msg.TEXT_GET_INDEX_RANDOM+1+Oe.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Oe.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(bt),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.LISTS_GET_INDEX_GET,"MODE"),Oe.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Oe.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),i=e.getFieldValue("WHERE"),n="";switch(t+" "+i){case"GET FROM_START":case"GET FROM_END":n=Oe.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=Oe.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=Oe.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=Oe.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+Oe.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Oe.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHERE"),i={FROM_START:Oe.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Oe.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Oe.Msg.TEXT_GET_INDEX_RANDOM};return Oe.Msg.PROCEDURES_DEFRETURN_RETURN+Oe.Msg.MIXLY_MICROBIT_TYPE_STRING+i[e]+"n"+Oe.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var e=document.createElement("mutation");e.setAttribute("statement",!this.outputConnection);var t=this.getInput("AT").type==Oe.INPUT_VALUE;return e.setAttribute("at",t),e},domToMutation:function(e){var t="true"==e.getAttribute("statement");this.updateStatement_(t),e="false"!=e.getAttribute("at"),this.updateAt_(e)},updateStatement_:function(e){e!=!this.outputConnection&&(this.unplug(!0,!0),e?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(e){this.removeInput("AT"),this.removeInput("ORDINAL",!0),e?(this.appendValueInput("AT").setCheck(Number),Oe.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Oe.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var t=new Oe.FieldDropdown(this.WHERE_OPTIONS,(function(t){var i="FROM_START"==t||"FROM_END"==t;if(i!=e){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(t,"WHERE"),null}}));this.getInput("AT").appendField(t,"WHERE"),Oe.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Jt={init:function(){this.setHelpUrl(Oe.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(bt),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Oe.Msg.LISTS_GET_INDEX_GET+" "+Oe.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Oe.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Oe.Msg.PROCEDURES_DEFRETURN_RETURN+Oe.Msg.MIXLY_MICROBIT_TYPE_STRING+Oe.Msg.LISTS_GET_INDEX_FROM_START+"n"+Oe.Msg.TEXT_CHARAT2)}},Qt={init:function(){this.setHelpUrl(Oe.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(bt),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Oe.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Oe.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},qt={init:function(){this.WHERE_OPTIONS_1=[[Oe.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Oe.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Oe.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Oe.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Oe.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Oe.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Oe.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(bt),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(Oe.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT1").type==Oe.INPUT_VALUE;e.setAttribute("at1",t);var i=this.getInput("AT2").type==Oe.INPUT_VALUE;return e.setAttribute("at2",i),e},domToMutation:function(e){var t="true"==e.getAttribute("at1"),i="true"==e.getAttribute("at2");this.updateAt_(1,t),this.updateAt_(2,i)},updateAt_:function(e,t){this.removeInput("AT"+e),this.removeInput("ORDINAL"+e,!0),t?(this.appendValueInput("AT"+e).setCheck(Number),Oe.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+e).appendField(Oe.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+e);var i=new Oe.FieldDropdown(this["WHERE_OPTIONS_"+e],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=t){var s=this.sourceBlock_;return s.updateAt_(e,n),s.setFieldValue(i,"WHERE"+e),null}}));this.getInput("AT"+e).appendField(i,"WHERE"+e),1==e&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},zt={init:function(){this.setHelpUrl(Oe.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(bt),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Oe.Msg.LISTS_GET_INDEX_GET+" "+Oe.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Oe.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Oe.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Oe.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},jt={init:function(){var e=[[Oe.Msg.MIXLY_EQUALS,"==="],[Oe.Msg.MIXLY_STARTSWITH,"startswith"],[Oe.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(bt),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Oe.FieldDropdown(e),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},$t={init:function(){this.setColour(bt),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Oe.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_COMPARETO_HELP)}},Zt={init:function(){var e=[[Oe.Msg.TEXT_UPPER,"upper"],[Oe.Msg.TEXT_TITLE,"title"],[Oe.Msg.TEXT_CAPITALIZE,"capitalize"],[Oe.Msg.TEXT_SWAPCASE,"swapcase"],[Oe.Msg.TEXT_LOWER,"lower"]];this.setColour(bt),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Oe.FieldDropdown(e),"CAPITAL").setCheck(String),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CAPITAL");return{upper:Oe.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Oe.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Oe.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Oe.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Oe.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[e]}))}},ei={init:function(){var e=[[Oe.Msg.TEXT_LJUST,"ljust"],[Oe.Msg.TEXT_CENTER,"center"],[Oe.Msg.TEXT_RJUST,"rjust"]];this.setColour(bt),this.appendValueInput("VAR").appendField(new Oe.FieldDropdown(e),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Oe.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Oe.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},ti={init:function(){this.setColour(bt),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Oe.Msg.MIXLY_MID+Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Oe.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ii={init:function(){this.setColour(bt),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Oe.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},ni={init:function(){this.setColour(bt),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Oe.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Oe.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},si={init:function(){this.setColour(bt),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Oe.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Oe.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Oe.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},_i={init:function(){var e=[[Oe.Msg.TEXT_TRIM_BOTH,"strip"],[Oe.Msg.TEXT_TRIM_LEFT,"lstrip"],[Oe.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(bt),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Oe.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Oe.FieldDropdown(e),"TOWHAT"),this.appendDummyInput("").appendField(Oe.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{strip:Oe.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Oe.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Oe.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[e]}))}},oi={init:function(){this.setColour(bt),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Oe.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Oe.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Oe.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("text_create_with_container");t.initSvg();for(var i=t.getInput("STACK").connection,n=0;nt?e[t]:0==t?'"key"':'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},nn={init:function(){this.setColour(en),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Oe.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},sn={init:function(){this.setColour(en),this.appendDummyInput().appendField(Oe.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},_n={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.DICT_KEYS),this.setTooltip(Oe.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},on={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Oe.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Oe.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Oe.Msg.DICTS_GET_TOOLTIP)}},pn={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Oe.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Oe.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Oe.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Oe.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},an={init:function(){this.setColour(en),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Oe.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Oe.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},un={init:function(){this.setColour(en),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Oe.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Oe.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.DICTS_DELETE_TOOLTIP)}},rn={init:function(){this.setColour(en),this.appendValueInput("DICT2").setCheck("Dict").appendField(Oe.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Oe.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MID),this.setTooltip(Oe.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ln={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.DICT_CLEAR),this.setTooltip(Oe.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dn={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.DICT_ITEMS),this.setTooltip(Oe.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},In={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.DICT_VALUES),this.setTooltip(Oe.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Tn={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_LENGTH),this.setTooltip(Oe.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Mn={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.DICT_DELDICT),this.setTooltip(Oe.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hn={init:function(){this.MODE=[[Oe.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Oe.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Oe.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Oe.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t="";switch(e.getFieldValue("WHERE")){case"INSERT":t=Oe.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":t=Oe.Msg.DICTS_DELETE_TOOLTIP}return t}))},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT2").type==Oe.INPUT_VALUE;return e.setAttribute("at2",t),e},domToMutation:function(e){var t="true"==e.getAttribute("at2");this.updateAt_(t)},updateAt_:function(e){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),e?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var t=new Oe.FieldDropdown(this.MODE,(function(t){var i="INSERT"==t;if(i!=e){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(t,"WHERE"),null}}));this.getInput("AT2").appendField(t,"WHERE")}},mn={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Oe.Msg.DICTS_ADD_VALUE),this.setTooltip(Oe.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},En={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Oe.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Oe.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.DICTS_SETDEFAULT_TOOLTIP)}},On={init:function(){this.setColour(en),this.appendDummyInput("").appendField(new Oe.FieldLabel(Oe.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new Oe.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Oe.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("dicts_create_with_container");t.initSvg();for(var i=t.getInput("STACK").connection,n=0;nt?e[t]:0==t?'"key"':'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},Rn={init:function(){this.setColour(en),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Oe.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},cn={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_TO_JSON),this.setTooltip(Oe.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},gn={init:function(){this.setColour(en),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Oe.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Cn={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Sn={init:function(){this.setColour(en),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_TO_JSON),this.setTooltip(Oe.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},An=210,Ln={init:function(){var e=Oe.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Oe.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{EQ:Oe.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Oe.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Oe.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Oe.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Oe.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Oe.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[e]})),this.prevBlocks_=[null,null]}},Nn={init:function(){var e=Oe.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],t=Oe.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Oe.FieldDropdown(e),"OP1"),this.appendValueInput("C").appendField(new Oe.FieldDropdown(t),"OP2"),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Dn={init:function(){var e=[[Oe.Msg.LOGIC_OPERATION_AND,"AND"],[Oe.Msg.LOGIC_OPERATION_OR,"OR"],[Oe.Msg.LOGIC_OPERATION_NOR,"NOR"],[Oe.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Oe.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{AND:Oe.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Oe.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Oe.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Oe.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[e]}))}},fn={init:function(){this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Oe.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Oe.Msg.LOGIC_NEGATE_TOOLTIP)}},Fn={init:function(){var e=[[Oe.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Oe.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Oe.FieldDropdown(e),"BOOL"),this.setTooltip(Oe.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Pn={init:function(){this.setColour(An),this.setOutput(!0),this.appendDummyInput().appendField(Oe.Msg.LOGIC_NULL),this.setTooltip(Oe.Msg.LOGIC_NULL_TOOLTIP)}},Yn={init:function(){this.setColour(An),this.appendValueInput("A"),this.appendValueInput("B").appendField(Oe.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Oe.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},vn={init:function(){var e=[[Oe.Msg.TEXT_APPEND_TO,"in"],[Oe.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(An),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Oe.FieldDropdown(e),"BOOL"),this.appendDummyInput("").appendField(Oe.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Oe.Msg.IN)}},Xn={init:function(){var e=[[Oe.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Oe.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(An),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Oe.FieldDropdown(e),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},yn={init:function(){this.setColour(An),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Oe.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},xn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Oe.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},bn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),i=Oe.Msg.MIXLY_USE,n=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Oe.Msg.MIXLY_BELONG;return i+{r:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},Vn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),i=Oe.Msg.MIXLY_USE,n=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Oe.Msg.MIXLY_BELONG,o=Oe.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+_+n+s+o}))}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Oe.Msg.MIXPY_TEXT_ENCODE).appendField(new Oe.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),i=Oe.Msg.MIXLY_USE,n=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Oe.Msg.MIXLY_BELONG,o=Oe.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+_+n+s+o}))}},Gn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Oe.Msg.MIXLY_MICROBIT_TYPE_STRING+Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),i=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[t]+"x"+n}))}},kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MICROBIT_PYTHON_TYPE)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Oe.Msg.HTML_FILE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Jn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Qn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},jn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),i=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[t]+s+"x"+n}))}},$n={init:function(){this.setColour(0),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Zn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Oe.Msg.MIXLY_ESP32_SET+{mkdir:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[t]}))}},es={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Oe.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},ts={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},is={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.HTML_FILE,"isfile"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[t]}))}},ns={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Oe.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SETUP+Oe.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Oe.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ss={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Oe.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},_s={init:function(){var e=Oe.Procedures.findLegalName("",this),t=new Oe.FieldTextInput(e,Oe.Procedures.rename);t.setSpellcheck(!1),this.appendDummyInput().appendField(t,"NAME").appendField("","PARAMS"),this.setMutator(new Oe.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Oe.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Oe.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(Oe.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(Oe.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(e){this.hasStatements_!==e&&(e?(this.appendStatementInput("STACK").appendField(Oe.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=e)},updateParams_:function(){var e="";this.arguments_.length&&(e=Oe.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),Oe.Events.disable();try{this.setFieldValue(e,"PARAMS")}finally{Oe.Events.enable()}},mutationToDom:function(e){var t=Oe.utils.xml.createElement("mutation");e&&t.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(Oe.Msg.MIXLY_AIP_ATTR).setAlign(Oe.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zs={init:function(){this.setColour(Js),this.appendDummyInput().appendField(Oe.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},e_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(Oe.Msg.HTML_FORM_CONTENT).appendField(new Oe.FieldDropdown([[Oe.Msg.HTML_TEXT,"text"],[Oe.Msg.HTML_EMAIL,"email"],[Oe.Msg.HTML_NUMBER,"number"],[Oe.Msg.HTML_PASSWORD,"password"],[Oe.Msg.HTML_CHECKBOX,"checkbox"],[Oe.Msg.HTML_RADIOBUTTON,"radiobutton"],[Oe.Msg.HTML_BUTTON,"button"],[Oe.Msg.HTML_COLOUR,"colour"],[Oe.Msg.HTML_DATE,"date"],[Oe.Msg.HTML_LOCALTIME,"local time"],[Oe.Msg.HTML_FILE,"file"],[Oe.Msg.HTML_HIDDEN,"hidden"],[Oe.Msg.HTML_IMAGE,"image"],[Oe.Msg.HTML_MONTH,"month"],[Oe.Msg.HTML_RANGE,"range"],[Oe.Msg.HTML_RESET,"reset"],[Oe.Msg.HTML_SEARCH,"search"],[Oe.Msg.HTML_SUBMIT,"submit"],[Oe.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Oe.Msg.HTML_TIME,"time"],[Oe.Msg.HTML_URL,"url"],[Oe.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Oe.Msg.HTML_NAME).appendField(new Oe.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Oe.Msg.HTML_VALUE).appendField(new Oe.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Oe.Msg.MIXLY_AIP_ATTR).setAlign(Oe.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},t_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(new Oe.FieldTextInput("property"),"KEY").appendField(":").appendField(new Oe.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},i_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(new Oe.FieldTextInput("property"),"KEY").appendField(":").appendField(new Oe.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},n_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(Oe.Msg.HTML_TEXT).appendField(new Oe.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},s_=160,__={init:function(){this.setColour(s_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Oe.FieldTable(""),"TEXT")}},o_={init:function(){this.setColour(s_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Oe.FieldMultilineInput(""),"TEXT")}},p_={init:function(){this.setColour(s_),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Oe.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},a_={init:function(){this.setColour(s_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},u_={init:function(){this.setColour(s_),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Oe.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},r_={init:function(){this.setColour(s_),this.appendValueInput("VALUE").appendField(Oe.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},l_={init:function(){this.setColour(s_),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Oe.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Oe.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=Oe.Block.obtain(e,"text_print_multiple_container");t.initSvg();for(var i=t.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(e=function(e,t,i){return"("+e+" <= "+t+") and "+a()+"("+e+", "+t+", "+i+") or "+u()+"("+e+", "+t+", "+i+")"},Oe.isNumber(n)&&Oe.isNumber(s)&&Oe.isNumber(_))n=parseFloat(n),s=parseFloat(s),_=Math.abs(parseFloat(_)),0==n%1&&0==s%1&&0==_%1?(n<=s?(s++,e=0==n&&1==_?s:n+", "+s,1!=_&&(e+=", "+_)):e=n+", "+--s+", -"+_,e="range("+e+")"):(e=n",GTE:">="};const oa=function(e,t){var i=this.getFieldValue("OP"),n="&&"==i?t.ORDER_LOGICAL_AND:t.ORDER_LOGICAL_OR,s=t.valueToCode(this,"A",n)||"False",_=t.valueToCode(this,"B",n)||"False";if("AND"==i)var o=s+" and "+_;else if("OR"==i)o=s+" or "+_;else if("NOR"==i)o="not("+s+"^"+_+")";else o=s+"^"+_;return[o,n]},pa=function(e,t){var i=t.ORDER_UNARY_PREFIX;return["not "+(t.valueToCode(this,"BOOL",i)||"False"),i]},aa=function(e,t){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",t.ORDER_ATOMIC]},ua=function(e,t){return["None",t.ORDER_ATOMIC]},ra=function(e,t){var i=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"False";return["("+(t.valueToCode(this,"B",t.ORDER_ATOMIC)||"False")+" if "+i+" else "+(t.valueToCode(this,"C",t.ORDER_ATOMIC)||"False")+")",t.ORDER_ATOMIC]},la=function(e,t){var i=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"''",n=t.valueToCode(this,"B",t.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,t.ORDER_ATOMIC]},da=function(e,t){var i=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"''",n=t.valueToCode(this,"B",t.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,t.ORDER_ATOMIC]},Ia=function(e,t){return["bool("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"0")+")",t.ORDER_ATOMIC]},Ta=function(e,t){return t.definitions_.import_os="import os","os.startfile("+t.valueToCode(this,"fn",t.ORDER_ATOMIC)+")\n"},Ma=function(e,t){return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+" = open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},ha=function(e,t){return["open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",t.ORDER_ATOMIC]},ma=function(e,t){return["open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',t.ORDER_ATOMIC]},Ea=function(e,t){var i=t.valueToCode(this,"data",t.ORDER_ATOMIC);return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".write("+i+")\n"},Oa=function(e,t){var i=this.getFieldValue("MODE");return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+"."+i+"()",t.ORDER_ATOMIC]},Ra=function(e,t){var i=this.getFieldValue("MODE");return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+"."+i+"("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},ca=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".readline("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},ga=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".writable()",t.ORDER_ATOMIC]},Ca=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".name()",t.ORDER_ATOMIC]},Sa=function(e,t){return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".close()\n"},Aa=function(e,t){t.definitions_.import_os="import os";return["os.listdir()",t.ORDER_ATOMIC]},La=function(e,t){return t.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},Na=function(e,t){return t.definitions_.import_os="import os",["os.path.getsize("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},Da=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".tell()",t.ORDER_ATOMIC]},fa=function(e,t){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".seek("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+","+n+")\n"},Fa=function(e,t){return t.definitions_.import_os="import os","os.chdir("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},Pa=function(e,t){t.definitions_.import_os="import os";return["os.getcwd()",t.ORDER_ATOMIC]},Ya=function(e,t){return t.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+t.valueToCode(this,"PATH",t.ORDER_ATOMIC)+")\n"},va=function(e,t){return t.definitions_.import_os="import os","os.rename("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+","+t.valueToCode(this,"NEWFILE",t.ORDER_ATOMIC)+")\n"},Xa=function(e,t){t.definitions_.import_os="import os";var i=t.valueToCode(this,"FILE",t.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",t.ORDER_ATOMIC]},ya=function(e,t){return t.definitions_.import_os="import os",t.definitions_.import_sdcard="import sdcard",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+" = sdcard.SDCard("+t.valueToCode(this,"SPISUB",t.ORDER_ATOMIC)+","+t.valueToCode(this,"PINSUB",t.ORDER_ATOMIC)+")\n"},xa=function(e,t){return t.definitions_.import_os="import os",t.definitions_.import_sdcard="import sdcard","os.mount("+t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+","+t.valueToCode(this,"DIR",t.ORDER_ATOMIC)+")\n"},ba=function(e,t){var i=t.variableDB_.getName(this.getFieldValue("NAME"),Oe.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&t.statementToCode(this,"STACK"))??" pass\n";t.INFINITE_LOOP_TRAP&&(n=t.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=t.valueToCode(this,"RETURN",t.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var _=[],o=0;o\n\n\n\t\n"+t.statementToCode(this,"HEAD")+"\n\n"+t.statementToCode(this,"BODY")+"\n\n'''",t.ORDER_ATOMIC]},Eu=function(e,t){var i=t.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Ou=function(e,t){var i=t.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},Ru=function(e,t){var i=t.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},cu=function(e,t){var i=t.statementToCode(this,"DO"),n=t.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},gu=function(e,t){return['style="'+t.statementToCode(this,"STYLE")+'"',t.ORDER_ATOMIC]},Cu=function(e,t){return'"},Su=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Au=function(){return this.getFieldValue("TEXT")+"\n"},Lu=function(e){return e.getFieldValue("TEXT")+"\n"},Nu=function(e,t){return[e.getFieldValue("TEXT"),t.ORDER_ATOMIC]},Du=function(e,t){return(t.valueToCode(e,"VALUE",t.ORDER_ATOMIC)||"")+"\n"},fu=function(){return""},Fu=function(e,t){return["type("+(t.valueToCode(e,"VALUE",t.ORDER_MEMBER)||"___")+")",t.ORDER_ATOMIC]},Pu=function(e,t){for(var i=e.getFieldValue("NAME"),n=e.hasReturn_,s=new Array(e.itemCount_),_=0;_0?t.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+e+"while True:\n"+a.join("")+u.join("\n"):t.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+e+u.join("\n")},yu.scrubNakedValue=function(e){return e+"\n"},yu.quote_=function(e){var t="'";return-1!==(e=e.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===e.indexOf('"')?t='"':e=e.replace(/'/g,"\\'")),t+e+t},yu.multiline_quote_=function(e){return"'''"+(e=e.replace(/'''/g,"\\'\\'\\'"))+"'''"},yu.scrub_=function(e,t,i){var n="";if(!e.outputConnection||!e.outputConnection.targetConnection){(_=e.getCommentText())&&(_=Oe.utils.string.wrap(_,yu.COMMENT_WRAP-3),n+=yu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const xu="#74A55B",bu={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_RGB_PIN_COUNT)}},Vu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Oe.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Bu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Oe.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Gu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(Oe.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Uu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Oe.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Oe.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},wu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},ku={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_RESET)}},Hu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Wu={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING).appendField(Oe.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Ku={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Oe.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Ju={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Oe.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Qu={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING).appendField(Oe.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},qu={init:function(){this.setColour(xu),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_SETUP+Oe.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},zu={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SERVO_MOVE)}},ju={init:function(){this.setColour(xu),this.appendValueInput("VAR").appendField("360°"+Oe.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SETTING+Oe.Msg.blockpy_turtle_rotate+Oe.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},$u={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("180°"+Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SERVO_MOVE)}},Zu={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("360°"+Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},er={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("180°"+Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},tr={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("360°"+Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},ir={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new Oe.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(Oe.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},nr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Direction).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Oe.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[Oe.Msg.MOTOR_N,"ms32006.MOT_N"],[Oe.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},sr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new Oe.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Direction).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Oe.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},_r={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_RGB_PIN_COUNT)}},or={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},pr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},ar={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_WRI)}},ur={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.MIXLY_DURATION).appendField(Oe.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},rr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.PYTHON_RANGE_STEP).appendField(Oe.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},lr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new Oe.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SETUP+Oe.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Oe.FieldDropdown([["SYN6288"+Oe.Msg.MIXLY_AipSpeech_synthesis,"SYN6288"],["NS9300"+Oe.Msg.MIXLY_MUSIC_PLAYER,"NS9300"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},dr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_WHETHER).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_STOPPED,"0"],[Oe.Msg.MIXLY_PLAYING,"1"],[Oe.Msg.MIXLY_PAUSED,"2"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},Ir={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_STAT).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MP3_PLAY,"1"],[Oe.Msg.MIXLY_MP3_PAUSE,"2"],[Oe.Msg.MIXLY_STOP,"3"],[Oe.Msg.MIXLY_MP3_PREV,"4"],[Oe.Msg.MIXLY_MP3_NEXT,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendValueInput("volume").appendField(Oe.Msg.MIXLY_MP3_VOL+Oe.Msg.MIXLY_STAT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_PLAYER_SET_VOLUME_TOOLTIP)}},Mr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MODE+Oe.Msg.MIXLY_STAT).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MP3_LOOP_ALL,"0"],[Oe.Msg.MIXLY_MP3_LOOP_ONE,"1"],[Oe.Msg.MIXLY_PLAYER_DIRECTORY_LOOP,"2"],[Oe.Msg.MIXLY_MP3_LOOP_RAM,"3"],[Oe.Msg.MIXLY_PLAYER_SINGLE_STOP,"4"],[Oe.Msg.MIXLY_PLAYER_SEQUENTIAL_PLAY,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_START_MELODY,"play"],[Oe.Msg.MIXLY_PLAYER_INSERT_MUSIC,"insert"]]),"key"),this.appendValueInput("song"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_PLAYER_PLAY_MUSIC_TOOTIP)}},mr={},Er={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(Oe.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Or={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Rr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(Oe.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PROGRAM_BLOCK).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},cr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(Oe.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(Oe.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PROGRAM_BLOCK).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},gr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Cr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_MOTOR).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Sr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_MOTOR).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ar={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_TRAFFIC_LIGHT).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.LISTS_SET_INDEX_SET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Lr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN).appendField(new Oe.FieldDropdown([[Oe.Msg.COLOUR_RGB_WHITE,"W"],[Oe.Msg.COLOUR_RGB_RED,"R"],[Oe.Msg.COLOUR_RGB_YELLOW,"Y"],[Oe.Msg.COLOUR_RGB_GREEN,"G"],[Oe.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Nr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN).appendField(new Oe.FieldDropdown([[Oe.Msg.COLOUR_RGB_WHITE,"W"],[Oe.Msg.COLOUR_RGB_RED,"R"],[Oe.Msg.COLOUR_RGB_YELLOW,"Y"],[Oe.Msg.COLOUR_RGB_GREEN,"G"],[Oe.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Dr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_SERVO_MOTOR).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[Oe.Msg.MIXLY_SPEED,"[1]"],[Oe.Msg.MATH_SINGLE_OP_ABSOLUTE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[Oe.Msg.MIXLY_RELATIVE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[Oe.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[Oe.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[Oe.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},fr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_SERVO_MOTOR).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[Oe.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[Oe.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Fr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_SERVO_MOTOR).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Pr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_SERVO_MOTOR).appendField(Oe.Msg.MATH_SINGLE_OP_ABSOLUTE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Oe.Msg.MSG.run).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MODE).setAlign(Oe.inputs.Align.RIGHT).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_SPEED+Oe.Msg.MIXLY_MODE,"0"],[Oe.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Oe.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Oe.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(Oe.inputs.Align.RIGHT).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"0"],[Oe.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[Oe.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},Yr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_SERVO_MOTOR).appendField(Oe.Msg.MIXLY_RELATIVE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Oe.Msg.MSG.run).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_SERVO_MOTOR).appendField(Oe.Msg.MIXLY_RELATIVE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Oe.Msg.MSG.run).appendField("("+Oe.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MODE).setAlign(Oe.inputs.Align.RIGHT).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_SPEED+Oe.Msg.MIXLY_MODE,"0"],[Oe.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Oe.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Oe.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},Xr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_SERVO_MOTOR).appendField(Oe.Msg.MIXLY_RELATIVE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Oe.Msg.MSG.run).appendField("("+Oe.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MODE).setAlign(Oe.inputs.Align.RIGHT).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_SPEED+Oe.Msg.MIXLY_MODE,"0"],[Oe.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Oe.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Oe.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(Oe.inputs.Align.RIGHT).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"0"],[Oe.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},yr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.MIXBOT).appendField(Oe.Msg.ME_GO_MOTOR_EXTERN).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MOTOR,"ext_motor"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[Oe.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[Oe.Msg.COLOUR_RGB_RED+"LED","R_LED"],[Oe.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[Oe.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[Oe.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[Oe.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},xr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.MIXBOT).appendField(Oe.Msg.ME_GO_MOTOR_EXTERN).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MOTOR,"ext_motor"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[Oe.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[Oe.Msg.COLOUR_RGB_RED+"LED","R_LED"],[Oe.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[Oe.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[Oe.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[Oe.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},br={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SETUP+Oe.Msg.MIXLY_AT).appendField(Oe.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Vr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING),this.appendValueInput("pin").appendField("LED"),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Br={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SERVO+Oe.Msg.MIXLY_SETUP+Oe.Msg.MIXLY_AT).appendField(Oe.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Gr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_SERVO),this.appendValueInput("angle").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_DISPLAY_MATRIX_ROTATE),this.appendDummyInput().appendField(Oe.Msg.DRAW_POINTER_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ur={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_MOTOR+Oe.Msg.MIXLY_SETUP+Oe.Msg.MIXLY_AT).appendField(Oe.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},wr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MOTOR),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Oe.Msg.MIXLY_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},kr="#6C9858",Hr={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(new Oe.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},Wr={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_ESP32_ON,"1"],[Oe.Msg.MIXLY_ESP32_OFF,"0"],[Oe.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Kr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Oe.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_SETONOFF)}},Jr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Oe.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Oe.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_GETONOFF)}},Qr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Oe.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_GETONOFF)}},qr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Oe.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_SETTING+Oe.Msg.MIXLY_BUILDIN_LED+Oe.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},zr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Oe.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_LCD_SETCOLOR).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LIGHT_RED,"1"],[Oe.Msg.MIXLY_LIGHT_GREEN,"2"],[Oe.Msg.MIXLY_LIGHT_BLUE,"3"],[Oe.Msg.MIXLY_LIGHT_YELLOW,"4"],[Oe.Msg.MIXLY_LIGHT_CYAN,"5"],[Oe.Msg.MIXLY_LIGHT_PURPLE,"6"],[Oe.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},jr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING).appendField(Oe.Msg.MIXLY_BUILDIN_LED).appendField(new Oe.FieldDropdown([[Oe.Msg.COLOUR_RGB_RED,"r"],[Oe.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_SETONOFF)}},$r={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Oe.Msg.MIXLY_BUILDIN_LED).appendField(new Oe.FieldDropdown([[Oe.Msg.COLOUR_RGB_RED,"r"],[Oe.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_GETONOFF)}},Zr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Oe.Msg.MIXLY_BUILDIN_LED).appendField(new Oe.FieldDropdown([[Oe.Msg.COLOUR_RGB_RED,"r"],[Oe.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_GETONOFF)}},el={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING).appendField(Oe.Msg.MIXLY_BUILDIN_LED).appendField(new Oe.FieldDropdown([[Oe.Msg.COLOUR_RGB_RED,"r"],[Oe.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_SETTING+Oe.Msg.MIXLY_BUILDIN_LED+Oe.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},tl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(new Oe.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},il={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Re.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(Oe.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(Oe.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(Oe.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},nl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},sl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.MIXLY_DURATION).appendField(Oe.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},_l={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.PYTHON_RANGE_STEP).appendField(Oe.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ol={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_WRI)}},pl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Re.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(Oe.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(Oe.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(Oe.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},al={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},ul={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.PYTHON_RANGE_STEP).appendField(Oe.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},rl={init:function(){this.setColour(kr),this.appendValueInput("TICKS").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Oe.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Oe.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},ll={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},dl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_RESET)}},Il={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Oe.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Tl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Oe.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Ml={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hl={init:function(){this.setColour(kr),this.appendValueInput("LIST").appendField(Oe.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},ml={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MOTOR_DC).appendField(new Oe.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Direction).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"CW"],[Oe.Msg.ANTI_CLOCKWISE,"CCW"],[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},El={init:function(){this.setColour(kr),this.appendDummyInput().appendField("MixGo Car").appendField(new Oe.FieldDropdown([[Oe.Msg.blockpy_forward,"F"],[Oe.Msg.blockpy_backward,"B"],[Oe.Msg.blockpy_left,"L"],[Oe.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ol={init:function(){this.setColour(kr),this.appendDummyInput("").appendField("MixGo Car").appendField(new Oe.FieldDropdown([[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Rl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MOTOR_DC).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[Oe.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Direction).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"CW"],[Oe.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MOTOR_DC).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[Oe.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_STOP).appendField(new Oe.FieldDropdown([[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},gl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Cl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXBOT).appendField(new Oe.FieldDropdown([[Oe.Msg.blockpy_forward,"F"],[Oe.Msg.blockpy_backward,"B"],[Oe.Msg.blockpy_left,"L"],[Oe.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[Oe.Msg.MIXLY_SPEED,"SPEED"],[Oe.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Sl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXBOT).appendField(new Oe.FieldDropdown([[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Al={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXBOT).appendField(Oe.Msg.MIXLY_MOTOR).appendField(new Oe.FieldDropdown([[Oe.Msg.TEXT_TRIM_LEFT,"1"],[Oe.Msg.TEXT_TRIM_RIGHT,"2"],[Oe.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[Oe.Msg.MIXLY_SPEED,"SPEED"],[Oe.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Ll={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[Oe.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Nl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.BITBOT).appendField(new Oe.FieldDropdown([[Oe.Msg.blockpy_forward,"F"],[Oe.Msg.blockpy_backward,"B"],[Oe.Msg.blockpy_left,"L"],[Oe.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.BITBOT).appendField(new Oe.FieldDropdown([[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.BITBOT).appendField(Oe.Msg.MIXLY_MOTOR).appendField(new Oe.FieldDropdown([[Oe.Msg.TEXT_TRIM_LEFT,"0"],[Oe.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Direction).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"CW"],[Oe.Msg.ANTI_CLOCKWISE,"CCW"],[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Fl={init:function(){this.setColour(kr),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_SETONOFF)}},Pl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_GETONOFF)}},Yl={init:function(){this.setColour(kr),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_SETTING+Oe.Msg.MIXLY_MIXBOT_BUZZER+Oe.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_SETONOFF)}},vl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_MIXBOT_BUZZER+Oe.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_GETONOFF)}},Xl={init:function(){this.setColour(kr),this.appendValueInput("PATH").appendField(Oe.Msg.MIXLY_RECORD_AUDIO).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(Oe.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},yl={init:function(){this.setColour(kr),this.appendValueInput("PATH").appendField(Oe.Msg.MIXLY_PLAY_AUDIO).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},xl={init:function(){this.setColour(kr),this.appendValueInput("PATH").appendField(Oe.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},bl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Oe.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Vl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.LISTS_SET_INDEX_SET+Oe.Msg.ME_GO_MOTOR_EXTERN).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([["1","1"],["2","2"],["3","3"],["4","4"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.blynk_IOT_IR_POWER+Oe.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Gl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.ME_GO_MOTOR_EXTERN).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.blynk_IOT_IR_POWER+Oe.Msg.MIXLY_PINMODEOUT+Oe.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ul={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.LISTS_SET_INDEX_SET+Oe.Msg.ME_GO_MOTOR_EXTERN).appendField(Oe.Msg.MIXLY_ALL+Oe.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(Oe.ALIGN_RIGHT).appendField(Oe.Msg.blynk_IOT_IR_POWER+Oe.Msg.MIXLY_PINMODEOUT+Oe.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},wl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.ANALOG+Oe.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_RELEASE).appendField(new Oe.FieldDropdown([[Oe.Msg.MICROPYTHON_DISPLAY_YES,"True"],[Oe.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.ANALOG+Oe.Msg.MIXLY_KEYBOARD_INPUT)}},kl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SPECIAL_KEY).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[Oe.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[Oe.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[Oe.Msg.MIXLY_SPECIAL_KEY4,"0x04"],[Oe.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[Oe.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[Oe.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[Oe.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[Oe.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},Hl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_GENERAL_KEY).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_SPECIAL_KEY0,"0x00"],["A","0x04"],["B","0x05"],["C","0x06"],["D","0x07"],["E","0x08"],["F","0x09"],["G","0x0A"],["H","0x0B"],["I","0x0C"],["J","0x0D"],["K","0x0E"],["L","0x0F"],["M","0x10"],["N","0x11"],["O","0x12"],["P","0x13"],["Q","0x14"],["R","0x15"],["S","0x16"],["T","0x17"],["U","0x18"],["V","0x19"],["W","0x1A"],["X","0x1B"],["Y","0x1C"],["Z","0x1D"],["1 !","0x1E"],["2 @","0x1F"],["3 #","0x20"],["4 $","0x21"],["5 %","0x22"],["6 ^","0x23"],["7 &","0x24"],["8 *","0x25"],["9 (","0x26"],["0 )","0x27"],["ENTER","0x28"],["ESC","0x29"],["BACKSPACE","0x2A"],["TAB","0x2B"],["SPACE","0x2C"],["- _","0x2D"],["= +","0x2E"],["[ {","0x2F"],["] }","0x30"],["\\ |","0x31"],["; :","0x33"],["' \"","0x34"],["` ~","0x35"],[", <","0x36"],[". >","0x37"],["/ ?","0x38"],["CAPS_LOCK","0x39"],["F1","0x3A"],["F2","0x3B"],["F3","0x3C"],["F4","0x3D"],["F5","0x3E"],["F6","0x3F"],["F7","0x40"],["F8","0x41"],["F9","0x42"],["F10","0x43"],["F11","0x44"],["F12","0x45"],["PRINTSCREEN","0x46"],["SCROLL_LOCK","0x47"],["PAUSE","0x48"],["INSERT","0x49"],["HOME","0x4A"],["PAGE_UP","0x4B"],["DELETE","0x4C"],["END","0x4D"],["PAGE_DOWN","0x4E"],["RIGHT","0x4F"],["LEFT","0x50"],["DOWN","0x51"],["UP","0x52"],["NUM_LOCK","0x53"],["/","0x54"],["*","0x55"],["-","0x56"],["+","0x57"],["ENTER","0x58"],["1","0x59"],["2","0x5A"],["3","0x5B"],["4","0x5C"],["5","0x5D"],["6","0x5E"],["7","0x5F"],["8","0x60"],["9","0x61"],["0","0x62"],[".","0x63"]]),"op"),this.setOutput(!0)}},Wl={init:function(){this.setColour(kr),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new Oe.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(Oe.Msg.GENERALKEY_TUPLE_CREATE_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("generalkey_container");t.initSvg();for(var i=t.getInput("STACK").connection,n=0;nnew Array(32).fill(0)))},om={init:function(){this.jsonInit({colour:zh,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:Oe.Msg.MIXLY_MICROBIT_Built_in_image1,message0:Oe.Msg.MIXLY_MICROBIT_Built_in_image})}},pm={init:function(){this.setColour(zh),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new Oe.FieldDropdown(Re.Profile.default.builtinimg),"image"),this.setOutput(!0,["esp32_image","List"])}},am={init:function(){this.setColour(zh),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Oe.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Oe.FieldDropdown(am.OPERATORS),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{"+":Oe.Msg.MIXLY_MICROBIT_image_add,"-":Oe.Msg.MIXLY_MICROBIT_image_reduce}[t]}))},OPERATORS:[[Oe.Msg.MICROBIT_DISPLAY_UNION,"add"],[Oe.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},um={init:function(){this.setColour(zh),this.appendValueInput("A").setCheck("esp32_image").appendField(Oe.Msg.MIXLY_MICROBIT_Invert_image1),this.setInputsInline(!0),this.setOutput(!0,"esp32_image")}},rm={init:function(){this.setColour(zh),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Oe.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Oe.Msg.DISPLAY_IMAGE_LET2).appendField(new Oe.FieldDropdown(rm.OPERATORS),"OP"),this.appendValueInput("val").appendField(Oe.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.DISPLAY_IMAGE_UNIT);Re.Boards.getSelectedBoardKey();"Python ESP32-S3"===Re.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Oe.Msg.MIXLY_synchronize+":");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i=Oe.Msg.DISPLAY_IMAGE_LET,n=Oe.Msg.DISPLAY_IMAGE_LET2,s=Oe.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:Oe.Msg.MIXLY_UP,shift_down:Oe.Msg.MIXLY_DOWN,shift_left:Oe.Msg.MIXLY_LEFT,shift_right:Oe.Msg.MIXLY_RIGHT}[t]+s}))},OPERATORS:[[Oe.Msg.MIXLY_UP,"shift_up"],[Oe.Msg.MIXLY_DOWN,"shift_down"],[Oe.Msg.MIXLY_LEFT,"shift_left"],[Oe.Msg.MIXLY_RIGHT,"shift_right"]]},lm={init:function(){this.setColour(zh),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},dm={init:function(){this.setColour(zh),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Im={init:function(){this.setColour(zh),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Tm={init:function(){this.setColour(zh),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},Mm={init:function(){this.setColour(zh),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Clear_display);Re.Boards.getSelectedBoardKey();"Python ESP32-S3"===Re.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Oe.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Clear_display)}},hm={init:function(){this.setColour(zh),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SHOW+Oe.Msg.MIXLY_DISPLAY_MATRIX_WRITE_NOW),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},mm={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let e=0;e<5;e++){let t=this.appendDummyInput();for(let i=0;i<8;i++)t.appendField(new Oe.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),e+"-"+i)}this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(zh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Em={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Oe.inputs.Align.CENTRE).appendField(new Oe.FieldBitmap(Em.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(zh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},Om={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let e=0;e<8;e++){let t=this.appendDummyInput();for(let i=0;i<12;i++)t.appendField(new Oe.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),e+"-"+i)}this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(zh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Rm={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Oe.inputs.Align.CENTRE).appendField(new Oe.FieldBitmap(Rm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(zh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},cm={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let e=0;e<8;e++){let t=this.appendDummyInput();for(let i=0;i<16;i++)t.appendField(new Oe.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),e+"-"+i)}this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,"esp32_image"),this.setColour(zh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},gm={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Oe.inputs.Align.CENTRE).appendField(new Oe.FieldBitmap(gm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(zh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},Cm={init:function(){this.setColour(zh),this.appendDummyInput().appendField(Oe.Msg.OLED_SET_FONT).appendField(new Oe.FieldDropdown(Cm.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+Oe.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+Oe.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+Oe.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Sm={init:function(){this.setColour(zh),this.appendValueInput("data").appendField(Oe.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.OLED_BITMAP_OR_STRING)}},Am={init:function(){this.setColour(zh),this.appendValueInput("data").appendField(Oe.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.OLED_BITMAP_OR_STRING)}},Lm={init:function(){this.setColour(zh),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(Oe.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.OLED_BITMAP_OR_STRING)}},Nm={init:function(){this.setColour(zh),this.appendValueInput("data").setCheck(String).appendField(Oe.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(Oe.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(Oe.Msg.TEXT_CENTER).appendField(new Oe.FieldDropdown([[Oe.Msg.MICROPYTHON_DISPLAY_YES,"True"],[Oe.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},Dm={init:function(){this.setColour(zh),this.appendValueInput("data").setCheck(String).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(Oe.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},fm={init:function(){this.setColour(zh),this.appendValueInput("data").setCheck(String).appendField(Oe.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Fm={init:function(){this.setColour(zh),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Pm={init:function(){this.jsonInit({colour:zh,args0:[{name:"state",options:[[Oe.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[Oe.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"shape",options:[[Oe.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[Oe.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"}],inputsInline:!0,helpUrl:Oe.Msg.mpython_HELPURL,tooltip:Oe.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:Oe.Msg.MPYTHON_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Ym={init:function(){this.jsonInit({colour:zh,args0:[{name:"state",options:[[Oe.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[Oe.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"dir_h_v",options:[[Oe.Msg.mpython_vertical,"0"],[Oe.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"}],inputsInline:!0,helpUrl:Oe.Msg.mpython_HELPURL,tooltip:Oe.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:Oe.Msg.MPYTHON_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},vm={init:function(){this.jsonInit({colour:zh,args0:[{name:"state",options:[[Oe.Msg.mpython_display_hline_1,"1"],[Oe.Msg.mpython_display_hline_0,"0"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"}],inputsInline:!0,helpUrl:Oe.Msg.mpython_HELPURL,tooltip:Oe.Msg.mpython_display_line_TOOLTIP,message0:Oe.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},Xm={init:function(){this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new Oe.FieldDropdown(Xm.IMAGES),"path"),this.setColour(zh),this.setOutput(!0)},IMAGES:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]]},ym={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let e=0;e<5;e++){let t=this.appendDummyInput();for(let i=0;i<5;i++)t.appendField(new Oe.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),e+"-"+i)}this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(zh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},xm={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Oe.inputs.Align.CENTRE).appendField(new Oe.FieldBitmap(xm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(zh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},bm={init:function(){this.setColour(zh),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Vm={init:function(){this.setColour(zh),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_AMBIENTBRIGHT),this.setInputsInline(!0),this.setOutput(!0,Number)}},Bm={init:function(){this.setColour(zh),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},Gm={init:function(){this.setColour(zh),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new Oe.FieldDropdown(Gm.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[Oe.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[Oe.Msg.CLOCKWISE+"90"+Oe.Msg.blockpy_setheading_degree,"1"],[Oe.Msg.CLOCKWISE+"180"+Oe.Msg.blockpy_setheading_degree,"2"],[Oe.Msg.CLOCKWISE+"270"+Oe.Msg.blockpy_setheading_degree,"3"]]},Um={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let e=0;e<12;e++){let t=this.appendDummyInput();for(let i=0;i<12;i++)t.appendField(new Oe.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),e+"-"+i)}this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(zh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},wm={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Oe.inputs.Align.CENTRE).appendField(new Oe.FieldBitmap(wm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(zh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},km={init:function(){this.setColour(zh),this.appendValueInput("data").appendField(Oe.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(Oe.Msg.HTML_COLOUR);Re.Boards.getSelectedBoardKey();"Python ESP32-S3"===Re.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Oe.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Hm={init:function(){this.setColour(zh),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.OLED_BITMAP).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("direct").setCheck(String).appendField(Oe.Msg.MIXLY_AipImageClassify_Image+Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Wm={init:function(){this.setColour(zh),this.appendValueInput("data").setCheck(String).appendField(Oe.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(Oe.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(Oe.Msg.TEXT_CENTER).appendField(new Oe.FieldDropdown([[Oe.Msg.MICROPYTHON_DISPLAY_YES,"True"],[Oe.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.appendValueInput("VAR").appendField(Oe.Msg.HTML_COLOUR);Re.Boards.getSelectedBoardKey();"Python ESP32-S3"===Re.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Oe.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},Km={init:function(){this.setColour(zh),this.appendValueInput("data").setCheck(String).appendField(Oe.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.appendValueInput("VAR").appendField(Oe.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Jm={init:function(){this.jsonInit({colour:zh,args0:[{name:"shape",options:[[Oe.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[Oe.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Oe.Msg.mpython_HELPURL,tooltip:Oe.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:Oe.Msg.ONBOARD_TFT_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Qm={init:function(){this.jsonInit({colour:zh,args0:[{name:"dir_h_v",options:[[Oe.Msg.mpython_vertical,"0"],[Oe.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Oe.Msg.mpython_HELPURL,tooltip:Oe.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:Oe.Msg.ONBOARD_TFT_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},qm={init:function(){this.jsonInit({colour:zh,args0:[{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Oe.Msg.mpython_HELPURL,tooltip:Oe.Msg.mpython_display_line_TOOLTIP,message0:Oe.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},zm={init:function(){this.setColour(zh),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(Oe.Msg.HTML_COLOUR),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},jm={init:function(){this.setColour(zh),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.MIXLY_LCD_SETCOLOR).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("VAR").appendField(Oe.Msg.HTML_COLOUR);Re.Boards.getSelectedBoardKey();"Python ESP32-S3"===Re.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Oe.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},$m={init:function(){this.setColour(zh),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_SCREEN_FILL);Re.Boards.getSelectedBoardKey();"Python ESP32-S3"===Re.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Oe.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Zm={init:function(){this.setColour(zh),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_INIT_CLOCK),this.appendDummyInput().appendField(Oe.Msg.MIXLY_CENTER_POS),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.OLED_CIRCLE_RADIUS),this.appendValueInput("VAR").appendField(Oe.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},eE={init:function(){this.setColour(zh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Oe.Msg.GET_RTCTIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},tE={init:function(){this.setColour(zh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Oe.Msg.SET_TIME),this.appendValueInput("h").setCheck(Number).appendField(Oe.Msg.MIXLY_HOUR),this.appendValueInput("m").setCheck(Number).appendField(Oe.Msg.MIXLY_MINUTE),this.appendValueInput("s").setCheck(Number).appendField(Oe.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},iE={init:function(){this.setColour(zh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Oe.Msg.DRAW_CLOCK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},nE={init:function(){this.setColour(zh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Oe.Msg.CLEAR_CLOCK),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_STM32_TFT_BACKGROUND_COLOR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},sE={init:function(){this.jsonInit({colour:zh,args0:[{name:"shape",options:[[Oe.Msg.MPYTHON_DISPLAY_HOLLOW,"False"],[Oe.Msg.MPYTHON_DISPLAY_SOLID,"True"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"r",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Oe.Msg.mpython_HELPURL,message0:Oe.Msg.ONBOARD_TFT_DISPLAY_SHAPE_CIRCLE_MESSAGE0,nextStatement:null,previousStatement:null})}},_E={init:function(){this.setColour(zh),this.appendDummyInput().appendField(Oe.Msg.DRAW_POINTER).appendField(Oe.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_DRAW_POINTER_DU),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.DRAW_POINTER_TOOLTIP)}},oE={init:function(){this.setColour(zh),this.appendDummyInput().appendField(Oe.Msg.DRAW_POINTER).appendField(Oe.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_DRAW_POINTER_DU),this.appendValueInput("VAR").appendField(Oe.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.DRAW_POINTER_TOOLTIP)}},pE={init:function(){this.setColour(zh),this.appendValueInput("data").appendField(Oe.Msg.MIXLY_Display_long_text),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(Oe.Msg.HTML_COLOUR);Re.Boards.getSelectedBoardKey();"Python ESP32-S3"===Re.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Oe.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},aE={init:function(){this.setColour(zh),this.appendValueInput("data").appendField(Oe.Msg.OLED_BITMAP),this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.OLED_BITMAP_OR_STRING),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},uE={init:function(){Zh.init.call(this),this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},rE={init:function(){im.init.call(this),this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},lE={init:function(){rm.init.call(this),this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},dE={init:function(){Im.init.call(this),this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},IE={init:function(){Tm.init.call(this),this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},TE={init:function(){Mm.init.call(this),this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},ME=180,hE={init:function(){this.setColour(ME),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(Oe.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(Oe.Msg.DISPLAY_IMAGE_LET2).appendField(new Oe.FieldDropdown(hE.OPERATORS),"OP"),this.appendValueInput("val").appendField(Oe.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.DISPLAY_IMAGE_UNIT);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i=Oe.Msg.DISPLAY_IMAGE_LET,n=Oe.Msg.DISPLAY_IMAGE_LET2,s=Oe.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Oe.Msg.MIXLY_UP,down:Oe.Msg.MIXLY_DOWN,left:Oe.Msg.MIXLY_LEFT,right:Oe.Msg.MIXLY_RIGHT}[t]+s}))},OPERATORS:[[Oe.Msg.MIXLY_UP,"up"],[Oe.Msg.MIXLY_DOWN,"down"],[Oe.Msg.MIXLY_LEFT,"left"],[Oe.Msg.MIXLY_RIGHT,"right"]]},mE={init:function(){this.setColour(ME),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Oe.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Oe.FieldDropdown(mE.OPERATORS),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{"+":Oe.Msg.MIXLY_MICROBIT_image_add,"-":Oe.Msg.MIXLY_MICROBIT_image_reduce}[t]}))},OPERATORS:[[Oe.Msg.MICROBIT_DISPLAY_UNION,"+"],[Oe.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},EE={init:function(){this.setColour(ME),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Oe.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Oe.FieldDropdown(EE.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Oe.Msg.MIXLY_MICROBIT_IMAGE+{height:Oe.Msg.MIXLY_HEIGHT,width:Oe.Msg.MIXLY_WIDTH}[t]}))},OPERATORS:[[Oe.Msg.MIXLY_HEIGHT,"height"],[Oe.Msg.MIXLY_WIDTH,"width"]]},OE={init:function(){this.setColour(ME),this.appendValueInput("VAR").appendField(Oe.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RECT).appendField(new Oe.FieldDropdown(OE.STATUS),"OP"),this.jsonInit({message0:Oe.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_OLED_RECT)},STATUS:[[Oe.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Oe.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},RE={init:function(){this.setColour(ME),this.appendValueInput("VAR").appendField(Oe.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Oe.FieldDropdown(RE.STATUS),"OP"),this.jsonInit({message0:Oe.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Oe.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Oe.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},cE={init:function(){this.setColour(ME),this.appendValueInput("VAR").appendField(Oe.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_DISPLAY_DRAW+Oe.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new Oe.FieldDropdown(cE.STATUS),"OP"),this.jsonInit({message0:Oe.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_DISPLAY_DRAW+Oe.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[Oe.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Oe.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},gE="#777777",CE={init:function(){this.setColour(gE),this.appendDummyInput("").appendField("from ").appendField(new Oe.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new Oe.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},SE={init:function(){this.setColour(gE),this.appendDummyInput("").appendField("import ").appendField(new Oe.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},AE={init:function(){this.setColour(gE),this.appendDummyInput("").appendField(new Oe.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Oe.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var e=document.createElement("mutation");e.setAttribute("items",this.itemCount_);for(var t=0;tt?e[t]:'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},dO={init:function(){this.setColour(_O),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Oe.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},IO={init:function(){this.setColour(_O),this.appendDummyInput().appendField(Oe.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},TO={init:function(){this.setColour(_O),this.appendDummyInput().appendField(Oe.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},MO={init:function(){this.setColour(_O),this.appendDummyInput().appendField(Oe.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(Oe.Msg.MIXLY_EMQX_SERVER).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Oe.Msg.MIXLY_WIFI_USERNAME).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Oe.Msg.MIXLY_IOT_PASSWORD).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(Oe.Msg.MIXLY_EMQX_PROJECT).setAlign(Oe.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hO={init:function(){this.setColour(_O),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Oe.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},mO={init:function(){this.setColour(_O),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Oe.Msg.MIXLY_EMQX_SUBSCRIBE+Oe.Msg.MIXLY_MICROBIT_MSG).appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Oe.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},EO={init:function(){this.setColour(_O),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},OO={init:function(){this.setColour(_O),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},RO={init:function(){this.setColour(_O),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cO={init:function(){this.setColour(_O),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Oe.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},gO={init:function(){this.setColour(_O),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},CO={init:function(){this.setColour(_O),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},SO={init:function(){this.setColour(_O),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},AO={init:function(){this.setColour(_O),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},LO={init:function(){this.setColour(_O),this.appendDummyInput().appendField("MixIO").appendField(Oe.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(Oe.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},NO={init:function(){this.setColour(_O),this.appendDummyInput().appendField(Oe.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Oe.Msg.MIXLY_EMQX_SERVER).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Oe.Msg.CONTROLS_FOR_INPUT_WITH+Oe.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(Oe.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},DO={init:function(){this.setColour(_O),this.appendDummyInput().appendField(Oe.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Oe.Msg.MIXLY_EMQX_SERVER).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Oe.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(Oe.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},fO={init:function(){this.VISITOR_ID=Re.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(_O),this.appendDummyInput("").appendField(new Oe.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const e=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==e&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},FO={init:function(){this.setColour(_O),this.appendDummyInput().appendField("MixIO").appendField(Oe.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},PO={init:function(){this.setColour(_O),this.appendDummyInput().appendField("HTTP"+Oe.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Oe.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(Oe.Msg.MIXLY_REQUESTS_GET).appendField(Oe.Msg.MIXLY_GET_CURRENT_TIME).appendField(Oe.Msg.MIXLY_OPEN_DEBUG).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},YO={init:function(){this.setColour(_O),this.appendDummyInput().appendField("HTTP"+Oe.Msg.MIXLY_Client).appendField(Oe.Msg.MIXLY_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Oe.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Oe.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},vO={init:function(){this.setColour(_O),this.appendDummyInput().appendField("MQTT"+Oe.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Oe.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(Oe.Msg.MIXLY_INIT_SUBSCRIBE).appendField(Oe.Msg.MQTT_Topic).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(Oe.Msg.MIXLY_OPEN_DEBUG).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},XO={init:function(){this.setColour(_O),this.appendDummyInput().appendField("MQTT"+Oe.Msg.MIXLY_Client).appendField(Oe.Msg.MIXLY_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Oe.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Oe.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},yO=oO,xO=pO,bO=aO,VO=uO,BO=lO,GO={init:function(){this.setColour(_O),this.appendDummyInput().appendField(Oe.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(Oe.Msg.MIXLY_EMQX_SERVER).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(Oe.Msg.MODEL_NAME).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(Oe.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},UO=GO,wO={init:function(){this.setColour(_O),this.appendDummyInput().appendField(Oe.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(Oe.Msg.MIXLY_EMQX_SERVER).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Oe.Msg.MIXLY_API_PRIVATE_KEY).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(Oe.Msg.MODEL_NAME).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(Oe.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},kO={init:function(){this.setColour(_O),this.appendDummyInput().appendField(Oe.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(Oe.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(Oe.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},HO={init:function(){this.setColour(_O),this.appendDummyInput().appendField(Oe.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(Oe.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(Oe.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},WO={init:function(){this.setColour(_O),this.appendDummyInput().appendField("Ollama "+Oe.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},KO=225,JO={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(Oe.Msg.MIXLY_NETWORK_MODE).appendField(new Oe.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},QO={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[Oe.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("op"),i=Oe.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:Oe.Msg.MIXLY_NETWORK_WIFI_OPEN,False:Oe.Msg.MIXLY_NETWORK_WIFI_CLOSE}[t]+i}))}},qO={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},zO={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return Oe.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:Oe.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},jO={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(Oe.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(Oe.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},$O={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_NETWORK_WIFI_CONNECT+Oe.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},ZO={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[Oe.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[Oe.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("mode");return Oe.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:Oe.Msg.MIXLY_ESP32_NETWORK_IP,1:Oe.Msg.MIXLY_ESP32_NETWORK_MASK,2:Oe.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[t]}))}},eR={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},tR={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[Oe.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},iR={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(Oe.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(Oe.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},nR={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},sR={init:function(){this.setColour(KO),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new Oe.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("mode");return Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[t]}))}},_R={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},oR={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},pR={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},aR={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},uR={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},rR={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},lR={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},dR={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},IR={init:function(){this.setColour(KO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},TR={init:function(){this.setColour(KO),this.appendValueInput("DOMAIN").appendField(Oe.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Oe.Msg.blockpy_REQUESTS_GET).appendField(new Oe.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},MR={init:function(){this.appendValueInput("VAL"),this.setColour(KO),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Oe.FieldDropdown(MR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:Oe.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Oe.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Oe.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))},ATTR:[[Oe.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Oe.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Oe.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[Oe.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},hR={init:function(){this.appendValueInput("VAR").appendField(Oe.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(KO),this.appendDummyInput("").appendField(Oe.Msg.blockpy_CONDUCT).appendField(new Oe.FieldDropdown(hR.METHOD),"DIR"),this.appendDummyInput("").appendField(Oe.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{forward:Oe.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:Oe.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[t]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},mR={init:function(){this.setColour(KO),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(Oe.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},ER={init:function(){this.setColour(KO),this.appendDummyInput("").appendField(new Oe.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},OR="#3288dd",RR={init:function(){this.setColour(OR),this.appendValueInput("URL").appendField(Oe.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Oe.Msg.blockpy_CONDUCT).appendField(new Oe.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(Oe.Msg.blockpy_REQUESTS).appendField(Oe.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},cR={init:function(){this.setColour(OR),this.appendValueInput("URL").appendField(Oe.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Oe.Msg.blockpy_CONDUCT).appendField(new Oe.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(Oe.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(Oe.Msg.blockpy_REQUESTS+Oe.Msg.OLED_STRING),this.appendDummyInput("").appendField(Oe.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},gR={init:function(){this.appendValueInput("VAL"),this.setColour(OR),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Oe.FieldDropdown(gR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[Oe.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Oe.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[Oe.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Oe.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[Oe.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},CR={init:function(){this.setColour(OR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(Oe.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Oe.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(Oe.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},SR={init:function(){this.setColour(OR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(Oe.Msg.MIXLY_EMQX_SERVER).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(Oe.Msg.MIXLY_EMQX_PORT).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(Oe.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Oe.Msg.MIXLY_WIFI_USERNAME).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Oe.Msg.MIXLY_IOT_PASSWORD).setAlign(Oe.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},AR={init:function(){this.setColour(OR),this.appendValueInput("TOPIC").appendField(Oe.Msg.MIXLY_EMQX_SUBSCRIBE+Oe.Msg.MIXLY_MICROBIT_MSG).appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(Oe.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},LR={init:function(){this.setColour(OR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Oe.Msg.MIXLY_EMQX_SUBSCRIBE+Oe.Msg.MIXLY_MICROBIT_MSG).appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Oe.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},NR={init:function(){this.setColour(OR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Oe.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},DR={init:function(){this.setColour(OR),this.appendDummyInput().appendField("mqtt"+Oe.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},fR=100,FR={init:function(){if("mixgo_nova"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="Nova G1";this.setColour(fR),this.appendDummyInput().appendField(e).appendField(Oe.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM),this.setOutput(!0,Number),this.setInputsInline(!0)}},PR={init:function(){if("mixgo_nova"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="Nova G1";this.setColour(fR),this.appendValueInput("PIN").appendField(e).appendField(Oe.Msg.MOTOR_DC).appendField(Oe.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Direction).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"CW"],[Oe.Msg.ANTI_CLOCKWISE,"CCW"],[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},YR={init:function(){if("mixgo_nova"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="Nova G1";this.setColour(fR),this.appendValueInput("PIN").appendField(e).appendField(Oe.Msg.SET_USB),this.appendValueInput("percent").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_POWER_SUPPLY),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vR={init:function(){if("mixgo_nova"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="Nova G1";this.setColour(fR),this.appendDummyInput().appendField(e).appendField(Oe.Msg.MIXLY_SPK_STATE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_ON,"True"],[Oe.Msg.MIXLY_OFF,"False"]]),"state"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},XR=100,yR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(XR),this.appendValueInput("I2CSUB").appendField(Oe.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SETUP+Oe.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(t),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},xR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(XR),this.appendValueInput("SUB").appendField(t).setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0,Number),this.setInputsInline(!0)}},bR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(XR),this.appendValueInput("SUB").appendField(t).setCheck("var"),this.appendValueInput("PIN").appendField(Oe.Msg.MOTOR_DC).appendField(Oe.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Direction).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"CW"],[Oe.Msg.ANTI_CLOCKWISE,"CCW"],[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},VR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(XR),this.appendValueInput("SUB").appendField(t).setCheck("var"),this.appendValueInput("PIN").appendField(Oe.Msg.MOTOR_DC).appendField(Oe.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(Oe.Msg.MIXLY_STEPPER_GET_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},BR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(XR),this.appendValueInput("SUB").appendField(t).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SERVO_MOVE)}},GR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(XR),this.appendValueInput("SUB").appendField(t).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},UR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(XR),this.appendValueInput("SUB").appendField(t).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+Oe.Msg.MIXLY_SERVO),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},wR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(XR),this.appendValueInput("SUB").appendField(t).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},kR="#A58C5B",HR={init:function(){this.setColour(kR),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_BUTTON).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(Oe.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_SENOR_IS_PRESSED)}},WR={init:function(){this.setColour(kR),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_BUTTON).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(Oe.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_SENOR_WAS_PRESSED)}},KR={init:function(){this.setColour(kR),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_BUTTON).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(Oe.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.PROCEDURES_DEFRETURN_RETURN+Oe.Msg.MIXLY_BUTTON+Oe.Msg.MIXLY_GET_PRESSES)}},JR={init:function(){this.setColour(kR),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_BUTTON).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Oe.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Oe.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Oe.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},QR={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_shake,"shake"],[Oe.Msg.MIXLY_UP,"up"],[Oe.Msg.MIXLY_DOWN,"down"],[Oe.Msg.MIXLY_LEFT,"left"],[Oe.Msg.MIXLY_RIGHT,"right"],[Oe.Msg.MIXLY_MICROBIT_face_up,"face up"],[Oe.Msg.MIXLY_MICROBIT_face_down,"face down"],[Oe.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(Oe.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("gesture"),i=Oe.Msg.MIXLY_MICROBIT_JS_CURRENT,n=Oe.Msg.MSG.catSensor,s=Oe.Msg.MIXLY_MICROBIT_JS_STATE,_=Oe.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:Oe.Msg.MIXLY_MICROBIT_shake,up:Oe.Msg.MIXLY_UP,down:Oe.Msg.MIXLY_DOWN,left:Oe.Msg.MIXLY_LEFT,right:Oe.Msg.MIXLY_RIGHT,"face up":Oe.Msg.MIXLY_MICROBIT_face_up,"face down":Oe.Msg.MIXLY_MICROBIT_face_down,freefall:Oe.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[t]+_}))}},qR={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Oe.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key"),i=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Oe.Msg.MIXLY_MICROBIT_Direction,s=Oe.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Oe.Msg.MIXLY_MICROBIT_Shiliang_Direction}[t]+n+s}))}},zR={init:function(){this.setColour(kR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},jR={init:function(){this.setColour(kR),this.appendValueInput("PIN",Number).appendField(new Oe.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Oe.FieldDropdown(jR.METHOD),"WHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHAT");return{temperature:Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[t]}))},METHOD:[[Oe.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Oe.Msg.MIXLY_GETHUMIDITY,"humidity"]]},$R={init:function(){this.setColour(kR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},ZR={init:function(){this.setColour(kR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},ec={init:function(){this.setColour(kR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.TEXT_TRIM_LEFT,"left"],[Oe.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(Oe.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("direction"),i=Oe.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=Oe.Msg.MIXLY_ESP32_NEAR;return i+{left:Oe.Msg.TEXT_TRIM_LEFT,right:Oe.Msg.TEXT_TRIM_RIGHT}[t]+n}))}},tc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_ALTITUDE_SENSOR+" BMP280").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[Oe.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key");return{"get_BMP_temperature()":Oe.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":Oe.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[t]}))}},ic={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+" SHT20").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[Oe.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key");return{"get_SHT_temperature()":Oe.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":Oe.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[t]}))}},nc={init:function(){this.setColour(kR),this.appendValueInput("PIN",Number).appendField("DS18X20 "+Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},sc={init:function(){this.setColour(kR),this.appendDummyInput("").appendField("LM35"+Oe.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_LM35)}},_c={init:function(){this.setColour(kR),this.appendValueInput("I2CSUB").appendField(Oe.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SETUP+Oe.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_ESP32_EXTERN_LIGHT+"(LTR308ALS)","LTR308"],[Oe.Msg.MIXLY_COLOR_SENSOR+"(LTR381RGB)","LTR381RGB"],[Oe.Msg.MIXLY_COLOR_SENSOR+"(UCS12071)","UCS12071"],[Oe.Msg.MIXLY_EXTERN_LIGHTUV+"(LTR390UV)","LTR390UV"],[Oe.Msg.MIXLY_ALTITUDE_SENSOR+"(HP203X)","HP203X"],[Oe.Msg.MIXLY_ALTITUDE_SENSOR+"(SPL06_001)","SPL06_001"],[Oe.Msg.MIXLY_ALTITUDE_SENSOR+"(MS5611)","MS5611"],[Oe.Msg.MIXLY_ALTITUDE_SENSOR+"(BMP280)","BMP280"],[Oe.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHTC3)","SHTC3"],[Oe.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(AHT21)","AHT21"],[Oe.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHT20)","SHT20"],[Oe.Msg.MIXLY_LASER_RANGE_SENSOR+"(VL53L0X)","VL53L0X"],[Oe.Msg.MIXLY_GEOMAGNETIC_SENSOR+"(QMC5883L)","QMC5883L"],[Oe.Msg.MIXLY_ESP32_MAX30102+"(MAX30102)","MAX30102"],[Oe.Msg.HTML_COLOUR+"、"+Oe.Msg.MIXLY_ENVIRONMENT_LIGHT+"、"+Oe.Msg.MIXLY_NEXT+"、"+Oe.Msg.MIXLY_ESP32_APDS9960+"(APDS9960)","APDS9960"],[Oe.Msg.MIXLY_NINE_AXIS_SENSOR+"(MPU9250)","MPU9250"],[Oe.Msg.MixGo_MPU9250+"(ADXL345)","ADXL345"],["RFID","RFID"],[Oe.Msg.MIXLY_RADAR_SENSOR+"(CBR817)","CBR817"],[Oe.Msg.MIXLY_AipSpeech_asr+"(CI130X)","CI130X"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},oc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.LISTS_SET_INDEX_SET+Oe.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(Oe.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+Oe.Msg.MIXLY_DELAY_TIME_RANGE)}},pc={init:function(){this.setColour(kR),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RADAR).appendField(Oe.Msg.LISTS_SET_INDEX_SET+Oe.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(Oe.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+Oe.Msg.MIXLY_DELAY_TIME_RANGE)}},ac={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},uc={init:function(){this.setColour(kR),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RADAR).appendField(Oe.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},rc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_IDENTIFY_ONCE_AND_SAVE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},lc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_HELLO_XIAOZHI,"1"],[Oe.Msg.MIXLY_XIAOZHIXIAOZHI,"2"],[Oe.Msg.MIXLY_THE_FIRST,"3"],[Oe.Msg.MIXLY_THE_SECOND,"4"],[Oe.Msg.MIXLY_THE_THIRD,"5"],[Oe.Msg.MIXLY_THE_FOURTH,"6"],[Oe.Msg.MIXLY_THE_FIFTH,"7"],[Oe.Msg.MIXLY_THE_SIXTH,"8"],[Oe.Msg.MIXLY_THE_SEVENTH,"9"],[Oe.Msg.MIXLY_THE_EIGHTH,"10"],[Oe.Msg.MIXLY_THE_NINTH,"11"],[Oe.Msg.MIXLY_THE_TENTH,"12"],[Oe.Msg.MIXLY_THE_ELEVENTH,"13"],[Oe.Msg.MIXLY_THE_TWELFTH,"14"],[Oe.Msg.MIXLY_THE_13TH,"15"],[Oe.Msg.MIXLY_THE_14TH,"16"],[Oe.Msg.MIXLY_THE_15TH,"17"],[Oe.Msg.MIXLY_THE_16TH,"18"],[Oe.Msg.MIXLY_THE_17TH,"19"],[Oe.Msg.MIXLY_THE_18TH,"20"],[Oe.Msg.MIXLY_THE_19TH,"21"],[Oe.Msg.MIXLY_THE_20TH,"22"],[Oe.Msg.MIXLY_Turn_on_the_lights,"23"],[Oe.Msg.MIXLY_Turn_off_the_lights,"24"],[Oe.Msg.MIXLY_Turn_up_the_brightness,"25"],[Oe.Msg.MIXLY_Turn_down_the_brightness,"26"],[Oe.Msg.MIXLY_Set_it_to_red,"27"],[Oe.Msg.MIXLY_Set_it_to_orange,"28"],[Oe.Msg.MIXLY_Set_it_to_yellow,"29"],[Oe.Msg.MIXLY_Set_it_to_green,"30"],[Oe.Msg.MIXLY_Set_it_to_cyan,"31"],[Oe.Msg.MIXLY_Set_it_to_blue,"32"],[Oe.Msg.MIXLY_Set_it_to_purple,"33"],[Oe.Msg.MIXLY_Set_it_to_white,"34"],[Oe.Msg.MIXLY_Turn_on_the_fan,"35"],[Oe.Msg.MIXLY_Turn_off_the_fan,"36"],[Oe.Msg.MIXLY_First_gear,"37"],[Oe.Msg.MIXLY_Wind_speed_second,"38"],[Oe.Msg.MIXLY_Third_gear,"39"],[Oe.Msg.MIXLY_Previous,"40"],[Oe.Msg.MIXLY_Next_page,"41"],[Oe.Msg.MIXLY_Show_smiley_face,"42"],[Oe.Msg.MIXLY_Show_crying_face,"43"],[Oe.Msg.MIXLY_Show_love,"44"],[Oe.Msg.MIXLY_Close_display,"45"],[Oe.Msg.MIXLY_Start_execution,"46"],[Oe.Msg.MIXLY_FORWARD,"47"],[Oe.Msg.MIXLY_BACKWARD,"48"],[Oe.Msg.MIXLY_TURNLEFT,"49"],[Oe.Msg.MIXLY_TURNRIGHT,"50"],[Oe.Msg.MIXLY_STOP,"51"],[Oe.Msg.MIXLY_Accelerate,"52"],[Oe.Msg.MIXLY_retard,"53"],[Oe.Msg.ROTATION_FORWARD,"54"],[Oe.Msg.ROTATION_BACKWARD,"55"],[Oe.Msg.MIXLY_Query_temperature,"56"],[Oe.Msg.MIXLY_Query_humidity,"57"],[Oe.Msg.MIXLY_Query_brightness,"58"],[Oe.Msg.MIXLY_Query_sound,"59"],[Oe.Msg.MIXLY_Query_time,"60"],[Oe.Msg.MIXLY_Query_distance,"61"],[Oe.Msg.MIXLY_Query_pressure,"62"],[Oe.Msg.MIXLY_Query_key,"63"],[Oe.Msg.MIXLY_Query_touch,"64"],[Oe.Msg.MIXLY_Query_color,"65"]]),"cmd").appendField(Oe.Msg.MIXLY_WHETHER+Oe.Msg.MIXLY_BE_IDENTIFIED),this.setOutput(!0),this.setInputsInline(!0)}},dc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_RECOGNIZED_STATE,"status1"],[Oe.Msg.MIXLY_WHETHER_BROADCAST,"status2"],[Oe.Msg.MIXLY_THE_RECOGNIZED_CMD,"result"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_CI130X_GET_THE_RECOGNIZED_STATE_TOOLTIP)}},Ic={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MP3_PLAY).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[Oe.Msg.MIXLY_WIND_SPEED,"154"],[Oe.Msg.MIXLY_HYETAL,"155"],[Oe.Msg.MIXLY_TEMPERATURE,"156"],[Oe.Msg.MIXLY_Humidity,"157"],[Oe.Msg.MIXLY_Altitude,"158"],[Oe.Msg.MIXLY_SOUND,"159"],[Oe.Msg.MIXLY_BRIGHTNESS,"160"],[Oe.Msg.ME_GO_HALL_SENSOR_DISTANCE,"161"],[Oe.Msg.MIXLY_SERVO,"162"],[Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"163"],[Oe.Msg.MIXLY_BUTTON2,"164"],[Oe.Msg.MIXLY_ESP32_TOUCH,"165"],[Oe.Msg.MIXLY_PAY,"166"],[Oe.Msg.MIXLY_CARSH_CHANGE,"167"],[Oe.Msg.MIXLY_COUNTDOWN,"168"],[Oe.Msg.MIXLY_TIMING,"169"],[Oe.Msg.MIXLY_AT_THE_MOMENT,"170"],[Oe.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE,"171"],[Oe.Msg.MIXLY_FORWARD,"172"],[Oe.Msg.MIXLY_BACKWARD,"173"],[Oe.Msg.MIXLY_TURNLEFT,"174"],[Oe.Msg.MIXLY_TURNRIGHT,"175"],[Oe.Msg.MIXLY_STOP,"176"],[Oe.Msg.MIXLY_Accelerate,"177"],[Oe.Msg.MIXLY_retard,"178"],[Oe.Msg.ROTATION_FORWARD,"179"],[Oe.Msg.ROTATION_BACKWARD,"180"],[Oe.Msg.TUPLE_JOIN,"181"],[Oe.Msg.MIXLY_SHOW,"182"],[Oe.Msg.MIXLY_LAMPLIGHT,"183"],[Oe.Msg.MIXLY_ACCELERATION,"184"]]),"star"),this.appendValueInput("NUM").appendField(Oe.Msg.MIXLY_NUMBER),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_UNIT).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[Oe.Msg.MIXLY_YEAR,"117"],[Oe.Msg.MIXLY_MONTH,"118"],[Oe.Msg.MIXLY_DAY,"119"],[Oe.Msg.MIXLY_HOUR,"120"],[Oe.Msg.MIXLY_MINUTE,"121"],[Oe.Msg.MIXLY_SECOND,"122"],[Oe.Msg.MIXLY_WEEK2,"123"],[Oe.Msg.MIXLY_RMB_UNIT,"124"],[Oe.Msg.blockpy_setheading_degree,"125"],[Oe.Msg.MIXLY_GEAR,"126"],[Oe.Msg.MIXLY_LAYER,"127"],[Oe.Msg.MIXLY_GRAM,"128"],[Oe.Msg.MIXLY_METER,"129"],[Oe.Msg.MIXLY_CENTIMETER,"130"],[Oe.Msg.MIXLY_MILLIMETER,"131"],[Oe.Msg.MIXLY_LUMEN,"132"],[Oe.Msg.MIXLY_DECIBEL,"133"],[Oe.Msg.MIXLY_hectopascal,"134"],[Oe.Msg.MIXLY_PERCENT,"135"],[Oe.Msg.MIXLY_CELSIUS,"136"],[Oe.Msg.MIXLY_METER_PER_SEC,"137"],[Oe.Msg.MIXLY_MICROBIT_Turn_on_display,"138"],[Oe.Msg.MIXLY_MICROBIT_Turn_off_display,"139"],[Oe.Msg.MIXLY_SUCCESS,"140"],[Oe.Msg.MIXLY_FAILED,"141"],[Oe.Msg.MIXLY_WRONG,"142"],[Oe.Msg.MIXLY_GOOD,"143"],[Oe.Msg.MIXLY_blockpy_set_add,"144"],[Oe.Msg.MIXLY_DECREASE,"145"],[Oe.Msg.COLOUR_RGB_RED,"146"],[Oe.Msg.COLOUR_RGB_ORANGE,"147"],[Oe.Msg.COLOUR_YELLOW,"148"],[Oe.Msg.COLOUR_RGB_GREEN,"149"],[Oe.Msg.COLOUR_CYAN,"150"],[Oe.Msg.COLOUR_RGB_BLUE,"151"],[Oe.Msg.COLOUR_RGB_PURPLE,"152"],[Oe.Msg.COLOUR_RGB_WHITE,"153"]]),"end"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Tc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.LISTS_SET_INDEX_SET+Oe.Msg.MIXLY_SYSTEM+Oe.Msg.MIXLY_CMD).appendField(new Oe.FieldDropdown([[Oe.Msg.MILXY_ENTER_WAKE_UP,"1"],[Oe.Msg.MIXLY_INCREASE_VOLUME,"202"],[Oe.Msg.MIXLY_REDUCE_VOLUME,"203"],[Oe.Msg.MIXLY_MAX_VOLUME,"204"],[Oe.Msg.MIXLY_MINIMUM,"205"],[Oe.Msg.MIXLY_OPEN_RESPONSE,"206"],[Oe.Msg.MIXLY_CLOSE_RESPONSE,"207"],[Oe.Msg.MIXLY_QUIT_WAKE_UP,"208"]]),"cmd"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Mc={init:function(){this.setColour(kR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[Oe.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[Oe.Msg.MIXLY_ESP32_MAX30102_IR+","+Oe.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},hc={init:function(){this.setColour(kR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[Oe.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[Oe.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},mc={init:function(){this.setColour(kR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308ALS"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ec={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.HTML_COLOUR+Oe.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GET+Oe.Msg.HTML_COLOUR,"[2]"],[Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_IR_STRENGTH,"[1]"],[Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Oc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.HTML_COLOUR+Oe.Msg.MSG.catSensor+" UCS12071").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GET+"RGB"+Oe.Msg.HTML_COLOUR,"0"],[Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_RGB_RAW,"1"],[Oe.Msg.MIXLY_GET_ENV_LIGHT+Oe.Msg.MIXLY_BRIGHTNESS,"2"],[Oe.Msg.GET_IR_STRENGTH+Oe.Msg.MIXLY_BRIGHTNESS,"3"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Rc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GET_ENV_LIGHT,"E"],[Oe.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},cc={init:function(){this.setColour(kR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},gc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Oe.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key");return{temperature:Oe.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:Oe.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[t]}))}},Cc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Oe.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key");return{temperature:Oe.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:Oe.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[t]}))}},Sc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_Altitude+Oe.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GETPRESSURE,"pressure()"],[Oe.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Oe.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ac={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_Altitude+Oe.Msg.MSG.catSensor+" SPL06_001").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GETPRESSURE,"pressure()"],[Oe.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Oe.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Lc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_Altitude+Oe.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GETPRESSURE,"pressure()"],[Oe.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Oe.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Nc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_Altitude+Oe.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_REF_TO_PRESSURE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_CAL_TO_ALTITUDE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Dc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MIXGOPE_FIELD+Oe.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[Oe.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},fc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_shake,"shake"],[Oe.Msg.MIXLY_UP,"up"],[Oe.Msg.MIXLY_DOWN,"down"],[Oe.Msg.MIXLY_LEFT,"left"],[Oe.Msg.MIXLY_RIGHT,"right"],[Oe.Msg.MIXLY_MICROBIT_face_up,"face up"],[Oe.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("gesture"),i=Oe.Msg.MIXLY_MICROBIT_JS_CURRENT,n=Oe.Msg.MSG.catSensor,s=Oe.Msg.MIXLY_MICROBIT_JS_STATE,_=Oe.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:Oe.Msg.MIXLY_MICROBIT_shake,up:Oe.Msg.MIXLY_UP,down:Oe.Msg.MIXLY_DOWN,left:Oe.Msg.MIXLY_LEFT,right:Oe.Msg.MIXLY_RIGHT,"face up":Oe.Msg.MIXLY_MICROBIT_face_up,"face down":Oe.Msg.MIXLY_MICROBIT_face_down}[t]+_}))}},Fc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Oe.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key"),i=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Oe.Msg.MIXLY_MICROBIT_Direction,s=Oe.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Oe.Msg.MIXLY_MICROBIT_Shiliang_Direction}[t]+n+s}))}},Pc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_JS_GET+Oe.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new Oe.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key"),i=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Oe.Msg.MIXLY_MICROBIT_Direction,s=Oe.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":Oe.Msg.MIXLY_MICROBIT_Shiliang_Direction}[t]+n+s}))}},Yc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Oe.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Oe.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key"),i=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Oe.Msg.MIXLY_MICROBIT_Direction,s=Oe.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":Oe.Msg.MIXLY_MICROBIT_Shiliang_Direction}[t]+n+s}))}},vc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},Xc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_GETTEMPERATUE)}},yc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("compass");return Oe.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:Oe.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[t]}))}},xc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},bc={init:function(){this.setColour(kR),this.appendValueInput("SPISUB").appendField(Oe.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SETUP+Oe.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Oe.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},Vc={init:function(){this.setColour(kR),this.appendDummyInput().appendField("RFID"+Oe.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Oe.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[Oe.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Bc={init:function(){this.setColour(kR),this.appendDummyInput().appendField("RFID"+Oe.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},Gc={init:function(){this.setColour(kR),this.appendDummyInput().appendField("RFID"+Oe.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Oe.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},Uc={init:function(){this.setColour(kR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Oe.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Oe.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},wc={init:function(){this.setColour(kR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Oe.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Oe.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(Oe.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},kc={init:function(){this.setColour(kR),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_RFID_SCAN_OK,"0"],[Oe.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[Oe.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Hc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Oe.FieldDropdown([["全部(元组)","data()[0]"],["全部(json)","data()[1]"],["全部(json,附带位置信息)","data()[2]"],["编号","data()[0][0]"],["电量","data()[0][1]"],["风速","data()[0][2]"],["阵风","data()[0][3]"],["风向","data()[0][4]"],["雨量","data()[0][5]"],["温度","data()[0][6]"],["湿度","data()[0][7]"],["光照","data()[0][8]"],["紫外线","data()[0][9]"],["大气压","data()[0][10]"],["信号强度","data()[0][11]"],["信噪比","data()[0][12]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip("返回气象数据元组 data= (设备id,电池状态,风速m/s,阵风m/s,风向°,雨量mm,温度℃,湿度%,光照Lux,UVI,大气压Pa,信号强度dB,信噪比dB)")}},Wc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Kc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendValueInput("BASE").appendField("以主题"),this.appendDummyInput("").appendField("串口发送至MixIO"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Jc={init:function(){this.setColour(kR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Oe.icons.MutatorIcon(["weather_set_label_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip()},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("weather_set_label_container");t.initSvg();for(var i=t.getInput("STACK").connection,n=0;n>6),i.push(128|63&_)):(2048<=_&&_<=55295||57344<=_&&_<=65535)&&(n+=3,i.push(224|15&_>>12),i.push(128|63&_>>6),i.push(128|63&_))}for(s=0;s>8,255&n].concat(i)}(e,!0),i="",n=0;n=0?"0x700000":["mixgo_sant"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==o?(t.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+_+", font_address="+p+")\n"):"16x8 Matrix"==o&&(t.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+_+")\n"),i},gP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".shows("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"},CP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".shows("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", space="+t.valueToCode(this,"space",t.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},SP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".frame("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"},AP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".frame("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", delay="+t.valueToCode(this,"time",t.ORDER_ASSIGNMENT)+")\n"},LP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".scroll("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"},NP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".scroll("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", speed="+t.valueToCode(this,"time",t.ORDER_ASSIGNMENT)+", space="+t.valueToCode(this,"space",t.ORDER_ASSIGNMENT)+")\n"},DP=function(e,t){var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},fP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+"."+e.getFieldValue("OP")+"("+t.valueToCode(e,"val",t.ORDER_ATOMIC)+")\n"},FP=function(e,t){return[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".pixel(int("+t.valueToCode(e,"x",t.ORDER_ATOMIC)+"), int("+t.valueToCode(e,"y",t.ORDER_ATOMIC)+"))",t.ORDER_ATOMIC]},PP=function(e,t){var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC);return i+".pixel(int("+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+"), int("+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+"), "+t.valueToCode(this,"STAT",t.ORDER_ATOMIC)+")\n"+i+".show()\n"},YP=function(e,t){return[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".get_brightness()",t.ORDER_ATOMIC]},vP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".set_brightness("+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+")\n"},XP=function(e,t){return[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+"."+e.getFieldValue("image"),t.ORDER_ATOMIC]},yP=function(e,t){return[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".map_"+e.getFieldValue("OP")+"("+t.valueToCode(e,"A",t.ORDER_ATOMIC)+", "+t.valueToCode(e,"B",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},xP=function(e,t){return[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".map_invert("+t.valueToCode(e,"A",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},bP=function(e,t){t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306";var i=t.valueToCode(this,"I2CSUB",t.ORDER_ATOMIC);return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+t.valueToCode(this,"row",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"column",t.ORDER_ATOMIC)+", "+i+")\n"},VP=function(e,t){return t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306",t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".show_str("+(t.valueToCode(this,"Text_line1",t.ORDER_ASSIGNMENT)||"''")+", "+(t.valueToCode(this,"Text_line2",t.ORDER_ASSIGNMENT)||"''")+", "+(t.valueToCode(this,"Text_line3",t.ORDER_ASSIGNMENT)||"''")+", "+(t.valueToCode(this,"Text_line4",t.ORDER_ASSIGNMENT)||"''")+")\n"},BP=function(e,t){return t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306",t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".show_line("+t.valueToCode(this,"x1",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"y1",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"x2",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"y2",t.ORDER_ATOMIC)+", 1)\n"},GP=function(e,t){t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306";var i=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),n=t.valueToCode(this,"x",t.ORDER_ATOMIC),s=t.valueToCode(this,"y",t.ORDER_ATOMIC),_=t.valueToCode(this,"width",t.ORDER_ATOMIC),o=t.valueToCode(this,"height",t.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP");switch(p){case"True":return i+".show_fill_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n";case"False":return i+".show_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n"}},UP=function(e,t){t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306";var i=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),n=t.valueToCode(this,"x",t.ORDER_ATOMIC),s=t.valueToCode(this,"y",t.ORDER_ATOMIC),_=t.valueToCode(this,"length",t.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+_+", 1)\n"},wP=function(e,t){return["ON"==this.getFieldValue("ONOFF")?"1":"0",t.ORDER_ATOMIC]},kP=function(e,t){t.definitions_.import_matrix="import matrix";var i=e.getFieldValue("OP");return[t.valueToCode(e,"img",t.ORDER_ATOMIC)+".shift_"+i+"("+t.valueToCode(e,"val",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},HP=function(e,t){var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC);return t.definitions_.import_ssd1306="import ssd1306",t.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},WP=function(e,t){return["matrix.Image."+this.getFieldValue("ANIMATION"),t.ORDER_ATOMIC]},KP=function(e,t){var i=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306";var n=t.valueToCode(this,"x",t.ORDER_ATOMIC),s=t.valueToCode(this,"y",t.ORDER_ATOMIC),_=t.valueToCode(this,"r",t.ORDER_ATOMIC),o="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(o){case"True":return i+".show_fill_circle("+n+", "+s+", "+_+", "+p+")\n";case"False":return i+".show_circle("+n+", "+s+", "+_+", "+p+")\n"}},JP=function(e,t){var i=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306";var n=t.valueToCode(this,"x0",t.ORDER_ATOMIC),s=t.valueToCode(this,"y0",t.ORDER_ATOMIC),_=t.valueToCode(this,"x1",t.ORDER_ATOMIC),o=t.valueToCode(this,"y1",t.ORDER_ATOMIC),p=t.valueToCode(this,"x2",t.ORDER_ATOMIC),a=t.valueToCode(this,"y2",t.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",r=this.getFieldValue("OP");switch(u){case"True":return i+".show_fill_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n"}},QP=function(e,t){return t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306",t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".show_bitmap("+t.valueToCode(this,"START_X",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"START_Y",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"bitmap_name",t.ORDER_ATOMIC)+","+t.valueToCode(this,"WIDTH",t.ORDER_ATOMIC)+","+t.valueToCode(this,"HEIGHT",t.ORDER_ATOMIC)+")\n"},qP=function(e,t){return t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306",t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".show_pixel("+t.valueToCode(this,"POS_X",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"POS_Y",t.ORDER_ATOMIC)+")\n"},zP=function(e,t){var i,n=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),s=t.valueToCode(this,"I2CSUB",t.ORDER_ATOMIC),_=this.getFieldValue("key");return"TM1650"==_?(t.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+_+"("+s+")\n"):"TM1637"==_&&(t.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+_+"("+s+")\n"),i},jP=function(e,t){return t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},$P=function(e,t){return t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".shownum("+t.valueToCode(this,"VALUE",t.ORDER_ATOMIC)+")\n"},ZP=function(e,t){return t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".showDP("+t.valueToCode(this,"NO",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"STAT",t.ORDER_ATOMIC)+")\n"},eY=function(e,t){return t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".intensity("+t.valueToCode(this,"VALUE",t.ORDER_ATOMIC)+")\n"},tY=function(e,t){t.definitions_.import_st7789="import st7789";var i=Re.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_sant"].indexOf(i)>=0?"0xE00000":"0x3A0000";var s=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),_=t.valueToCode(this,"SPISUB",t.ORDER_ATOMIC),o=t.valueToCode(this,"PINCS",t.ORDER_ATOMIC),p=t.valueToCode(this,"PINDC",t.ORDER_ATOMIC);return s+" = st7789.ST7789("+_+", "+t.valueToCode(this,"WIDTH",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"HEIGHT",t.ORDER_ATOMIC)+", dc_pin="+p+", cs_pin="+o+", rotation="+this.getFieldValue("rotate")+", font_address="+n+")\n"},iY=function(e,t){t.definitions_.import_st7789="import st7789";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"x",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),p=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".image("+n+", x="+s+", y="+_+", size="+o+", color="+p+")\n";else{const e=p.match(/\d+/g);var u="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");a=i+".image("+n+", x= "+s+",y="+_+", size="+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},nY=function(e,t){var i="0x"+this.getFieldValue("COLOR").slice(1);return["0x"+((16252928&i)>>8|(64512&i)>>5|(255&i)>>3).toString(16),t.ORDER_ATOMIC]},sY=function(e,t){t.definitions_.import_st7789="import st7789";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"x",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),p=t.valueToCode(this,"space",t.ORDER_ASSIGNMENT),a=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==a.slice(0,2))var r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color="+a+")\n";else{const e=a.match(/\d+/g);var l="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},_Y=function(e,t){t.definitions_.import_st7789="import st7789";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"time",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p=i+".frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const e=o.match(/\d+/g);var a="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");p=i+".frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},oY=function(e,t){t.definitions_.import_st7789="import st7789";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"time",t.ORDER_ASSIGNMENT),p=t.valueToCode(this,"space",t.ORDER_ASSIGNMENT),a=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const e=a.match(/\d+/g);var r="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},pY=function(e,t){return t.definitions_.import_st7789="import st7789",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},aY=function(e,t){t.definitions_.import_st7789="import st7789";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(this,"x1",t.ORDER_ATOMIC),s=t.valueToCode(this,"y1",t.ORDER_ATOMIC),_=t.valueToCode(this,"x2",t.ORDER_ATOMIC),o=t.valueToCode(this,"y2",t.ORDER_ATOMIC),p=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".line("+n+", "+s+", "+_+", "+o+", color="+p+")\n";else{const e=p.match(/\d+/g);var u="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");a=i+".line("+n+", "+s+", "+_+", "+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},uY=function(e,t){var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(this,"I2CSUB",t.ORDER_ATOMIC),s=this.getFieldValue("key"),_=t.valueToCode(this,"ADDR",t.ORDER_ATOMIC);return t.definitions_.import_i2clcd="import i2clcd",i+" = i2clcd.LCD("+n+", lcd_width="+s+", i2c_addr="+_+")\n"},rY=function(e,t){return t.definitions_.import_i2clcd="import i2clcd",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".shows("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", column="+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+", line="+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+",center = "+this.getFieldValue("center")+")\n"},lY=function(e,t){return t.definitions_.import_i2clcd="import i2clcd",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".print("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", column="+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+", line="+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+", delay="+t.valueToCode(this,"time",t.ORDER_ASSIGNMENT)+")\n"},dY=function(e,t){return t.definitions_.import_i2clcd="import i2clcd",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},IY=function(e,t){return t.definitions_.import_i2clcd="import i2clcd",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".clear()\n"},TY=function(e,t){var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(this,"I2CSUB",t.ORDER_ATOMIC),s=t.valueToCode(this,"ADDR",t.ORDER_ATOMIC),_=this.getFieldValue("driver"),o=Re.Boards.getSelectedBoardKey().split(":")[2],p="";return p=["mpython","mixgo_pe","mixgo_nova"].indexOf(o)>=0?"0x700000":["mixgo_sant"].indexOf(o)>=0?"0xE00000":"0x3A0000",t.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+", address="+s+", font_address="+p+", types="+_+")\n"},MY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".image("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"},hY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".image("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", x="+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+", y="+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+", size="+t.valueToCode(this,"size",t.ORDER_ASSIGNMENT)+")\n"},mY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".shows("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"},EY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".shows("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", x="+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+", y="+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+", size="+t.valueToCode(this,"size",t.ORDER_ASSIGNMENT)+", space="+t.valueToCode(this,"space",t.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},OY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".frame("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"},RY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".frame("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", size="+t.valueToCode(this,"size",t.ORDER_ASSIGNMENT)+", delay="+t.valueToCode(this,"time",t.ORDER_ASSIGNMENT)+")\n"},cY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".scroll("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"},gY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".scroll("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", y="+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+", size="+t.valueToCode(this,"size",t.ORDER_ASSIGNMENT)+", speed="+t.valueToCode(this,"time",t.ORDER_ASSIGNMENT)+", space="+t.valueToCode(this,"space",t.ORDER_ASSIGNMENT)+")\n"},CY=function(e,t){t.definitions_.import_oled128x64="import oled128x64";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},SY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+"."+e.getFieldValue("OP")+"("+t.valueToCode(e,"val",t.ORDER_ATOMIC)+")\n"},AY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".pixel(int("+t.valueToCode(e,"x",t.ORDER_ATOMIC)+"), int("+t.valueToCode(e,"y",t.ORDER_ATOMIC)+"))",t.ORDER_ATOMIC]},LY=function(e,t){t.definitions_.import_oled128x64="import oled128x64";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC);return i+".pixel(int("+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+"), int("+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+"), "+t.valueToCode(this,"STAT",t.ORDER_ATOMIC)+")\n"+i+".show()\n"},NY=function(e,t){t.definitions_.import_oled128x64="import oled128x64";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(e,"x",t.ORDER_ATOMIC),s=t.valueToCode(e,"y",t.ORDER_ATOMIC),_=t.valueToCode(e,"w",t.ORDER_ATOMIC),o=t.valueToCode(e,"h",t.ORDER_ATOMIC),p=e.getFieldValue("state");return i+"."+e.getFieldValue("shape")+"("+n+", "+s+", "+_+", "+o+", "+p+")\n"+i+".show()\n"},DY=function(e,t){t.definitions_.import_oled128x64="import oled128x64";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(e,"x",t.ORDER_ATOMIC),s=t.valueToCode(e,"y",t.ORDER_ATOMIC),_=t.valueToCode(e,"length",t.ORDER_ATOMIC),o=e.getFieldValue("state");return i+"."+("0"==e.getFieldValue("dir_h_v")?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\n"+i+".show()\n"},fY=function(e,t){t.definitions_.import_oled128x64="import oled128x64";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC);return i+".line("+t.valueToCode(e,"x1",t.ORDER_ATOMIC)+", "+t.valueToCode(e,"y1",t.ORDER_ATOMIC)+", "+t.valueToCode(e,"x2",t.ORDER_ATOMIC)+", "+t.valueToCode(e,"y2",t.ORDER_ATOMIC)+", "+e.getFieldValue("state")+")\n"+i+".show()\n"},FY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT);if("Python ESP32-S3"===Re.JSFuncs.getPlatform()){t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var s="onboard_tft.image("+(n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT))+", color=0xffff,sync="+(t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True")+")\n"}else if("educore"==i){t.definitions_["import_"+i+"_oled"]="from "+i+" import oled";s="oled.print("+n+")\n"}else{t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.shows("+n+")\n"}return s},PY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"space",t.ORDER_ASSIGNMENT),_=this.getFieldValue("center");if("mixgo_sant"==i||"mixgo_nova"==i)return t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+", space="+s+", center="+_+",sync="+(t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True")+")\n";if("educore"==i){t.definitions_["import_"+i+"_oled"]="from "+i+" import oled"}return t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+", space="+s+", center="+_+")\n"},YY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){t.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var s="onboard_oled.frame("+n+")\n"}else if("Python ESP32-S3"===Re.JSFuncs.getPlatform()){t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";s="onboard_tft.frame("+(n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT))+", color=0xffff)\n"}else{t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.frame("+n+")\n"}return s},vY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"time",t.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){t.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var _="onboard_oled.frame("+(n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT))+", delay="+s+")\n"}else if("Python ESP32-S3"===Re.JSFuncs.getPlatform()){t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";_="onboard_tft.frame("+n+", size=5 , delay="+s+", color=0xffff)\n"}else{t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";_="onboard_matrix.frame("+n+", delay="+s+")\n"}return _},XY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i||"educore"==i){t.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.scroll("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"}else if("Python ESP32-S3"===Re.JSFuncs.getPlatform()){t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";n="onboard_tft.scroll("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", color=0xffff)\n"}else{t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.scroll("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"}return n},yY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"time",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"space",t.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){t.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var o="onboard_oled.scroll("+n+", speed="+s+", space="+_+")\n"}else if("Python ESP32-S3"===Re.JSFuncs.getPlatform()){t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";o="onboard_tft.scroll("+n+", y=0, size=5, speed="+s+", space="+_+", color=0xffff)\n"}else{t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";o="onboard_matrix.scroll("+n+", speed="+s+", space="+_+")\n"}return o},xY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"time",t.ORDER_ASSIGNMENT),p=t.valueToCode(this,"space",t.ORDER_ASSIGNMENT),a=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const e=a.match(/\d+/g);var r="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},bY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];return t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+e.getFieldValue("image"),t.ORDER_ATOMIC]},VY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Re.JSFuncs.getPlatform()){const i=e.getFieldValue("image").split(".");if(2!==i.length)throw Error("pin value error");t.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`;var n=i[1]}else{t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix."+e.getFieldValue("image")}return[n,t.ORDER_ATOMIC]},BY=function(e,t){var i={"#000000":"0","#ff0000":"1"};function n(e){let t="";if(e.length%2==1&&(e="0"+e),e.length<8){let t=8-e.length;for(let i=1;i<=t;i++)e="0"+e}for(let i=1;i<=e.length;i++)i%2==0&&i!==e.length?t=t+e[i-1]+",0x":t+=e[i-1];return"0x"+t}let s=[];for(let t=0;t<12;t++){let _="",o=0,p=0;for(let n=0;n<32;n++)n<8?p=7-n:n<16?p=23-n:n<24?p=39-n:n<32&&(p=55-n),o+=Number(i[e.getFieldValue(t+"-"+n)])*Math.pow(2,31-p);_+=n(o.toString(16)),s.unshift(_)}let _=[];for(let e=0;e>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},Cv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];return t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.picture("+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+","+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+","+t.valueToCode(this,"direct",t.ORDER_ASSIGNMENT)+")\n"},Sv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"x",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),p=t.valueToCode(this,"space",t.ORDER_ASSIGNMENT),a=this.getFieldValue("center"),u=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True",r=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==r.slice(0,2))var l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color="+r+",sync="+u+")\n";else{const e=r.match(/\d+/g);var d="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color=0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+",sync="+u+")\n"}return l},Av=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"time",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const e=o.match(/\d+/g);var a="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},Lv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(e,"x",t.ORDER_ATOMIC),s=t.valueToCode(e,"y",t.ORDER_ATOMIC),_=t.valueToCode(e,"w",t.ORDER_ATOMIC),o=t.valueToCode(e,"h",t.ORDER_ATOMIC),p=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),a=e.getFieldValue("shape"),u=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+",sync="+u+")\n";else{const e=p.match(/\d+/g);var l="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+",sync="+u+")\n"}return r},Nv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(e,"x",t.ORDER_ATOMIC),s=t.valueToCode(e,"y",t.ORDER_ATOMIC),_=t.valueToCode(e,"length",t.ORDER_ATOMIC),o=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),p=e.getFieldValue("dir_h_v"),a=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+",sync="+a+")\n";else{const e=o.match(/\d+/g);var r="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},Dv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(e,"x1",t.ORDER_ATOMIC),s=t.valueToCode(e,"y1",t.ORDER_ATOMIC),_=t.valueToCode(e,"x2",t.ORDER_ATOMIC),o=t.valueToCode(e,"y2",t.ORDER_ATOMIC),p=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),a=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const e=p.match(/\d+/g);var r="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},fv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];return t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["onboard_tft.pixel(int("+t.valueToCode(e,"x",t.ORDER_ATOMIC)+"), int("+t.valueToCode(e,"y",t.ORDER_ATOMIC)+"))",t.ORDER_ATOMIC]},Fv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(this,"x",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),o=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var p="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+",sync="+o+")\n";else{const e=_.match(/\d+/g);var a="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");p="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+",sync="+o+")\n"}return p},Pv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(this,"VAR",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True";if("0x"==n.slice(0,2))var _="onboard_tft.fill("+n+",sync="+s+")\n";else{const e=n.match(/\d+/g);var o="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");_="onboard_tft.fill(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+",sync="+s+")\n"}return _},Yv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=t.valueToCode(this,"x",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"SUB",t.ORDER_ASSIGNMENT),p=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=o+"=Clock("+n+", "+s+", "+_+", "+p+")\n";else{const e=p.match(/\d+/g);var u="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");a=o+"=Clock("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},vv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];return t.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",t.valueToCode(this,"SUB",t.ORDER_ASSIGNMENT)+".set_rtctime()\n"},Xv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];return t.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",t.valueToCode(this,"SUB",t.ORDER_ASSIGNMENT)+".set_time("+t.valueToCode(this,"h",t.ORDER_ASSIGNMENT)+", "+t.valueToCode(this,"m",t.ORDER_ASSIGNMENT)+", "+t.valueToCode(this,"s",t.ORDER_ASSIGNMENT)+")\n"},yv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];return t.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",t.valueToCode(this,"SUB",t.ORDER_ASSIGNMENT)+".draw_clock()\n"},xv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=t.valueToCode(this,"SUB",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==s.slice(0,2))var _=n+".clear("+s+")\n";else{const e=s.match(/\d+/g);var o="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");_=n+".clear(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+")\n"}return _},bv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(e,"x",t.ORDER_ATOMIC),s=t.valueToCode(e,"y",t.ORDER_ATOMIC),_=t.valueToCode(e,"r",t.ORDER_ATOMIC),o=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),p=e.getFieldValue("shape"),a=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const e=o.match(/\d+/g);var r="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+", "+p+",sync="+a+")\n"}return u},Vv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Re.JSFuncs.getPlatform()){t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n="onboard_tft.pointern(angle="+t.valueToCode(this,"angle",t.ORDER_ASSIGNMENT)+")\n"}else{t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.pointern(angle="+t.valueToCode(this,"angle",t.ORDER_ASSIGNMENT)+")\n"}return n},Bv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(this,"angle",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==s.slice(0,2));else{const e=s.match(/\d+/g);var _="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)}return"onboard_tft.pointern(angle="+n+")\n"},Gv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"x",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),p=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),a=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color="+p+",sync="+a+")\n";else{const e=p.match(/\d+/g);var r="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},Uv=FY,wv=QY,kv=WY,Hv=QY,Wv=qY,Kv=UY,Jv=function(e,t){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return t.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},Qv=function(e,t){var i=this.getFieldValue("module");return t.definitions_["import_"+i]="import "+i,""},qv=function(e,t){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+t.statementToCode(this,"do")+"})\n"},oG=function(){return"control.reset()\n"},pG=function(e,t){return"control.waitMicros("+(t.valueToCode(this,"data",t.ORDER_ATOMIC)||Re.Profile.default.serial)+")\n"},aG=function(e,t){return"control.raiseEvent("+(t.valueToCode(this,"system_event_bus_source",t.ORDER_ATOMIC)||Re.Profile.default.serial)+", "+(t.valueToCode(this,"system_event_bus_value",t.ORDER_ATOMIC)||Re.Profile.default.serial)+")\n"},uG=function(e,t){return"control.onEvent("+(t.valueToCode(this,"system_event_bus_source",t.ORDER_ATOMIC)||Re.Profile.default.serial)+", "+(t.valueToCode(this,"system_event_bus_value",t.ORDER_ATOMIC)||Re.Profile.default.serial)+", () => {\n"+t.statementToCode(this,"do")+")\n"},rG=function(e,t){return["control.eventTimestamp()",t.ORDER_ATOMIC]},lG=function(e,t){return["control.eventValue()",t.ORDER_ATOMIC]},dG=function(e,t){return[this.getFieldValue("key"),t.ORDER_ATOMIC]},IG=function(e,t){return[this.getFieldValue("key"),t.ORDER_ATOMIC]},TG=function(e,t){return["control.deviceName()",t.ORDER_ATOMIC]},MG=function(e,t){return["control.deviceSerialNumber()",t.ORDER_ATOMIC]},hG=function(e,t){return"panic("+(t.valueToCode(this,"STATUS_CODE",t.ORDER_ATOMIC)||"1000")+")\n"},mG=function(e,t){switch(t.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",t.ORDER_ATOMIC];case"us":return["time.ticks_us()",t.ORDER_ATOMIC]}},EG=function(){return"while True:\n pass\n"},OG=function(e,t){return t.definitions_.import_mixgo="import mixgo","reset()\n"},RG=function(e,t){return t.definitions_.import_os="import os","os.uname()"},cG=function(e,t){t.definitions_.import_time="import time";var i=t.valueToCode(this,"DELAY_TIME",t.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},gG=function(e,t){t.definitions_.import_time="import time";var i=t.valueToCode(this,"DELAY_TIME",t.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},CG=function(e,t){return t.definitions_.import_mixgo="import mixgo",(t.valueToCode(this,"VAR",t.ORDER_NONE)||"None")+".init(period="+(t.valueToCode(this,"period",t.ORDER_NONE)||"0")+", mode=Timer."+(t.valueToCode(this,"mode",t.ORDER_NONE)||"None")+", callback="+(t.valueToCode(this,"callback",t.ORDER_NONE)||"None")+")\n"},SG=function(e,t){return t.definitions_.import_machine="import machine",(t.valueToCode(this,"VAR",t.ORDER_NONE)||"None")+".init(period = "+(t.valueToCode(this,"period",t.ORDER_NONE)||"0")+", mode=machine.Timer."+this.getFieldValue("mode")+", callback="+(t.valueToCode(this,"callback",t.ORDER_NONE)||"None")+")\n"},AG=function(e,t){return t.definitions_.import_time="import time",["time.ticks_diff("+(t.valueToCode(this,"END",t.ORDER_NONE)||"0")+", "+(t.valueToCode(this,"START",t.ORDER_NONE)||"0")+")",t.ORDER_ATOMIC]},LG=function(e,t){var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC);return t.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},NG=function(e,t){return t.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(t.valueToCode(this,"period",t.ORDER_NONE)||"0")+")\n"},DG=function(e,t){t.definitions_.import_machine="import machine";return"wdt.feed()\n"},fG=function(e,t){t.definitions_.import_machine="import machine";return"machine.reset()\n"},FG=function(e,t){t.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},PG=LG,YG=SG,vG=AG,XG=cG,yG=function(e,t){return t.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+t.valueToCode(this,"key",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"addr",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},xG=function(e,t){return t.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+t.valueToCode(this,"key",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"addr",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"day",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},bG=function(e,t){return t.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api.weather_hourly("+t.valueToCode(this,"key",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"addr",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"hour",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},VG=function(e,t){return t.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+t.valueToCode(this,"key",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"addr",t.ORDER_ATOMIC)+")\n"},BG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_now.analysis()";else n='Weather_now.analysis("'+i+'")';return[n,t.ORDER_ATOMIC]},GG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Air_now.analysis()";else n='Air_now.analysis("'+i+'")';return[n,t.ORDER_ATOMIC]},UG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_alarm.analysis()";else n='Weather_alarm.analysis("'+i+'")';return[n,t.ORDER_ATOMIC]},wG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Life_suggestion.analysis()";else n='Life_suggestion.analysis("'+i+'")';return[n,t.ORDER_ATOMIC]},kG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Tide_daily.analysis()";else n='Tide_daily.analysis("'+i+'")';return[n,t.ORDER_ATOMIC]},HG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Location_search.analysis()";else n='Location_search.analysis("'+i+'")';return[n,t.ORDER_ATOMIC]},WG=function(e,t){return t.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+t.valueToCode(this,"key",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"addr",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"day",t.ORDER_ATOMIC)+")\n"},KG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=t.valueToCode(this,"day",t.ORDER_ATOMIC);if("none"==i)var s="Weather_daily.analysis("+n+")";else s="Weather_daily.analysis("+n+', "'+i+'")';return[s,t.ORDER_ATOMIC]},JG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=t.valueToCode(this,"day",t.ORDER_ATOMIC);if("none"==i)var s="Air_daily.analysis("+n+")";else s="Air_daily.analysis("+n+', "'+i+'")';return[s,t.ORDER_ATOMIC]},QG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=t.valueToCode(this,"day",t.ORDER_ATOMIC);if("none"==i)var s="Geo_sun.analysis("+n+")";else s="Geo_sun.analysis("+n+', "'+i+'")';return[s,t.ORDER_ATOMIC]},qG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=t.valueToCode(this,"day",t.ORDER_ATOMIC);if("none"==i)var s="Geo_moon.analysis("+n+")";else s="Geo_moon.analysis("+n+', "'+i+'")';return[s,t.ORDER_ATOMIC]},zG=new Oe.Generator("Python");zG.INDENT=" ",zG.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),zG.ORDER_ATOMIC=0,zG.ORDER_COLLECTION=1,zG.ORDER_STRING_CONVERSION=1,zG.ORDER_UNARY_POSTFIX=1,zG.ORDER_UNARY_PREFIX=2,zG.ORDER_MEMBER=2.1,zG.ORDER_FUNCTION_CALL=2.2,zG.ORDER_EXPONENTIATION=3,zG.ORDER_UNARY_SIGN=4,zG.ORDER_BITWISE_NOT=4,zG.ORDER_MULTIPLICATIVE=5,zG.ORDER_ADDITIVE=6,zG.ORDER_BITWISE_SHIFT=7,zG.ORDER_BITWISE_AND=8,zG.ORDER_BITWISE_XOR=9,zG.ORDER_BITWISE_OR=10,zG.ORDER_RELATIONAL=11,zG.ORDER_EQUALITY=11,zG.ORDER_LOGICAL_NOT=12,zG.ORDER_LOGICAL_AND=13,zG.ORDER_LOGICAL_OR=14,zG.ORDER_ASSIGNMENT=14,zG.ORDER_CONDITIONAL=15,zG.ORDER_LAMBDA=16,zG.ORDER_NONE=99,zG.ORDER_OVERRIDES=[[zG.ORDER_FUNCTION_CALL,zG.ORDER_MEMBER],[zG.ORDER_FUNCTION_CALL,zG.ORDER_FUNCTION_CALL],[zG.ORDER_MEMBER,zG.ORDER_MEMBER],[zG.ORDER_MEMBER,zG.ORDER_FUNCTION_CALL]],zG.init=function(){zG.PASS=this.INDENT+"pass\n",zG.definitions_=Object.create(null),zG.functionNames_=Object.create(null),zG.setups_=Object.create(null),zG.loops_=Object.create(null),zG.codeEnd_=Object.create(null),zG.variableDB_?zG.variableDB_.reset():zG.variableDB_=new Se(zG.RESERVED_WORDS_)},zG.finish=function(e){""!==e&&(e=(e=e.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var t=[],i=[],n=[];for(var s in this.definitions_){var _=this.definitions_[s];0===s.indexOf("import")?t.push(_):0===s.indexOf("var_declare")?i.push(_):n.push(_)}t.length&&t.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var o=[];for(var s in zG.functions_)o.push(zG.functions_[s]);o.length&&o.push("\n");var p=[];for(var s in zG.setups_)p.push(zG.setups_[s]);p.length&&p.push("\n");var a=[];for(var s in zG.loops_)a.push(zG.loops_[s]);var u=[];for(var s in zG.codeEnd_)u.push(zG.codeEnd_[s]);0!==u.length&&u.push("\n");let r="";return r=a.length>0?t.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+e+"while True:\n"+a.join("")+u.join("\n"):t.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+e+u.join("\n"),r},zG.scrubNakedValue=function(e){return e+"\n"},zG.quote_=function(e){var t="'";return-1!==(e=e.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===e.indexOf('"')?t='"':e=e.replace(/'/g,"\\'")),t+e+t},zG.multiline_quote_=function(e){return"'''"+(e=e.replace(/'''/g,"\\'\\'\\'"))+"'''"},zG.scrub_=function(e,t,i){var n="";if(!e.outputConnection||!e.outputConnection.targetConnection){(_=e.getCommentText())&&(_=Oe.utils.string.wrap(_,zG.COMMENT_WRAP-3),n+=zG.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const jG={};jG["元控青春"]={description:"MicroPython[ESP32C3 MixGo CE]",digital_pin:Re.Profile.generate(["0-18","21","33-48"]),input_pin:Re.Profile.generate(["0-18","21","33-48"]),output_pin:Re.Profile.generate(["0-18","21","33-48"]),pwm_input:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_input:Re.Profile.generate(["1-18"],"adc","adc"),pwm_output:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_output:Re.Profile.generate(["1-18"],"adc","adc"),espnow_channel:Re.Profile.generate(["1-13"]),haskylens_model:Re.Profile.generate(["0-4"]),digital:Re.Profile.generate(["0-18","21","33-48"],"pin","pin"),pwm_pin:Re.Profile.generate(["0-18","21","33-48"]),pwm:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_pin:Re.Profile.generate(["1-18"]),analog:Re.Profile.generate(["1-18"],"adc","adc"),touch:Re.Profile.generate(["1-14"],"tc","tc"),touch_pin:Re.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Re.Profile.generate(["0-4"]),exlcdh:Re.Profile.generate(["0-15"]),exlcdv:Re.Profile.generate(["0-7"]),brightness:Re.Profile.generate(["0-9"]),tts_voice:Re.Profile.generate(["0-16"]),tts_builtin_music:Re.Profile.generate(["0-47"]),tts_bgmusic:Re.Profile.generate(["0-15"]),builtinimg:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["DOOR_CLOSE","object_picture.DOOR_CLOSE"],["DOOR_OPEN","object_picture.DOOR_OPEN"],["DOOR_OPENING","object_picture.DOOR_OPENING"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","spk_midi.DADADADUM"],["ENTERTAINER","spk_midi.ENTERTAINER"],["PRELUDE","spk_midi.PRELUDE"],["ODE","spk_midi.ODE"],["NYAN","spk_midi.NYAN"],["RINGTONE","spk_midi.RINGTONE"],["FUNK","spk_midi.FUNK"],["BLUES","spk_midi.BLUES"],["BIRTHDAY","spk_midi.BIRTHDAY"],["WEDDING","spk_midi.WEDDING"],["FUNERAL","spk_midi.FUNERAL"],["PUNCHLINE","spk_midi.PUNCHLINE"],["PYTHON","spk_midi.PYTHON"],["BADDY","spk_midi.BADDY"],["CHASE","spk_midi.CHASE"],["BA_DING","spk_midi.BA_DING"],["WAWAWAWAA","spk_midi.WAWAWAWAA"],["JUMP_UP","spk_midi.JUMP_UP"],["JUMP_DOWN","spk_midi.JUMP_DOWN"],["POWER_UP","spk_midi.POWER_UP"],["POWER_DOWN","spk_midi.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},jG["元控自强"]={description:"MicroPython[ESP32C3 MixGo CE]",digital_pin:Re.Profile.generate(["0-18","21","33-48"]),input_pin:Re.Profile.generate(["0-18","21","33-48"]),output_pin:Re.Profile.generate(["0-18","21","33-48"]),pwm_input:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_input:Re.Profile.generate(["1-18"],"adc","adc"),pwm_output:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_output:Re.Profile.generate(["1-18"],"adc","adc"),espnow_channel:Re.Profile.generate(["1-13"]),haskylens_model:Re.Profile.generate(["0-4"]),digital:Re.Profile.generate(["0-18","21","33-48"],"pin","pin"),pwm_pin:Re.Profile.generate(["0-18","21","33-48"]),pwm:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_pin:Re.Profile.generate(["1-18"]),analog:Re.Profile.generate(["1-18"],"adc","adc"),touch:Re.Profile.generate(["1-14"],"tc","tc"),touch_pin:Re.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Re.Profile.generate(["0-4"]),exlcdh:Re.Profile.generate(["0-15"]),exlcdv:Re.Profile.generate(["0-7"]),brightness:Re.Profile.generate(["0-9"]),tts_voice:Re.Profile.generate(["0-16"]),tts_builtin_music:Re.Profile.generate(["0-47"]),tts_bgmusic:Re.Profile.generate(["0-15"]),builtinimg:jG["元控青春"].builtinimg,builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},jG["ESP32S2 Generic"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:Re.Profile.generate(["0-18","21","33-48"]),input_pin:Re.Profile.generate(["0-18","21","33-48"]),output_pin:Re.Profile.generate(["0-18","21","33-48"]),pwm_input:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_input:Re.Profile.generate(["1-18"],"adc","adc"),pwm_output:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_output:Re.Profile.generate(["1-18"],"adc","adc"),espnow_channel:Re.Profile.generate(["1-13"]),haskylens_model:Re.Profile.generate(["0-4"]),digital:Re.Profile.generate(["0-18","21","33-48"],"pin","pin"),pwm_pin:Re.Profile.generate(["0-18","21","33-48"]),pwm:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_pin:Re.Profile.generate(["1-18"]),analog:Re.Profile.generate(["1-18"],"adc","adc"),touch:Re.Profile.generate(["1-14"],"tc","tc"),touch_pin:Re.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Re.Profile.generate(["0-4"]),exlcdh:Re.Profile.generate(["0-15"]),exlcdv:Re.Profile.generate(["0-7"]),brightness:Re.Profile.generate(["0-9"]),tts_voice:Re.Profile.generate(["0-16"]),tts_builtin_music:Re.Profile.generate(["0-47"]),tts_bgmusic:Re.Profile.generate(["0-15"]),builtinimg:jG["元控青春"].builtinimg,builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM",".DADADADUM"],["ENTERTAINER",".ENTERTAINER"],["PRELUDE",".PRELUDE"],["ODE",".ODE"],["NYAN",".NYAN"],["RINGTONE",".RINGTONE"],["FUNK",".FUNK"],["BLUES",".BLUES"],["BIRTHDAY",".BIRTHDAY"],["WEDDING",".WEDDING"],["FUNERAL",".FUNERAL"],["PUNCHLINE",".PUNCHLINE"],["PYTHON",".PYTHON"],["BADDY",".BADDY"],["CHASE",".CHASE"],["BA_DING",".BA_DING"],["WAWAWAWAA",".WAWAWAWAA"],["JUMP_UP",".JUMP_UP"],["JUMP_DOWN",".JUMP_DOWN"],["POWER_UP",".POWER_UP"],["POWER_DOWN",".POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]};const $G=jG,ZG=20,eU={init:function(){this.setColour(ZG),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_HIGH,"HIGH"],[Oe.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},tU={init:function(){this.setColour(ZG),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(Oe.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},iU={init:function(){this.setColour(ZG),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Oe.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},nU={init:function(){this.setColour(ZG),this.appendValueInput("PIN",Number).appendField("DAC"+Oe.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Oe.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_TOOLTIP)}},sU={init:function(){this.setColour(ZG),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_JS_PERIOD_MIL).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_mSecond,"period"],[Oe.Msg.MIXLY_uSecond,"period_microseconds"]]),"key"),this.appendValueInput("NUM",Number).appendField(Oe.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_SET_TOOLTIP)}},_U={init:function(){this.setColour(ZG),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_REF_VOLTAGE+Oe.Msg.MIXLY_STAT).appendField(new Oe.FieldDropdown([["3.3V","machine.ADC.ATTN_11DB"],["2.2V","machine.ADC.ATTN_6DB"],["1.5V","machine.ADC.ATTN_2_5DB"],["1.2V","machine.ADC.ATTN_0DB"]]),"atten"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_ANALOG_ATTEN_TOOLTIP)}},oU={init:function(){this.setColour(ZG),this.appendValueInput("pin").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Oe.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_TOOLTIP)}},pU={init:function(){this.setColour(20),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_ATTACHINTERRUPT_PIN).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Oe.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Oe.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Oe.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},aU={init:function(){this.setColour(20),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETUP).appendField(new Oe.FieldTextInput("pin#"),"PIN_OBJ"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROPYTHON_AS).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_Digital_PINMODEOUT,"machine.Pin.OUT"],[Oe.Msg.MIXLY_Digital_PINMODEIN,"machine.Pin.IN"],[Oe.Msg.MIXLY_PINMODEPULLUP,"machine.Pin.IN, machine.Pin.PULL_UP"],[Oe.Msg.MIXLY_PINMODEPULLDOWN,"machine.Pin.IN, machine.Pin.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)},getVars:function(){return["pin#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(t,"PIN_OBJ")}},uU={init:function(){this.setColour(ZG),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SETUP).appendField(new Oe.FieldTextInput("dac#"),"PIN_OBJ").appendField(Oe.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("DAC"+Oe.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_INIT_TOOLTIP)},getVars:function(){return["dac#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(t,"PIN_OBJ")}},rU={init:function(){this.setColour(ZG),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SETUP).appendField(new Oe.FieldTextInput("tc#"),"PIN_OBJ").appendField(Oe.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_INIT_TOOLTIP)},getVars:function(){return["tc#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(t,"PIN_OBJ")}},lU={init:function(){this.setColour(ZG),this.appendValueInput("PIN",Number).appendField("PWM"+Oe.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Oe.Msg.MIXLY_FREQUENCY+Oe.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_SET_FREQ_TOOLTIP)}},dU=aU,IU=rU,TU=oU,MU=pU,hU=230,mU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.digital),"PIN"),this.setOutput(!0)}},EU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},OU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},RU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},cU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},gU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},CU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},SU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},AU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},LU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},NU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},DU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},fU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},FU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},PU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},YU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},vU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.analog),"PIN"),this.setOutput(!0)}},XU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},yU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.dac),"PIN"),this.setOutput(!0)}},xU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},bU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},VU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},BU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.pwm),"PIN"),this.setOutput(!0)}},GU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},UU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},wU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.touch),"PIN"),this.setOutput(!0)}},kU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},HU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},WU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},KU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.imglist),"PIN"),this.setOutput(!0)}},JU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.playlist),"PIN"),this.setOutput(!0)}},QU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},qU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},zU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},jU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},$U={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},ZU={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},ew={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},tw={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},iw={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},nw={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},sw={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},_w={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.one_more),"PIN"),this.setOutput(!0)}},ow={init:function(){this.setColour(hU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},pw={init:function(){if("mixgo_me"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="ME G1";this.setColour(40),this.appendDummyInput().appendField(e).appendField("RFID"+Oe.Msg.MIXLY_RFID_READ_CARD),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},aw={init:function(){if("mixgo_me"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="ME G1";this.setColour(40),this.appendDummyInput().appendField(e).appendField("RFID"+Oe.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SECTOR").appendField(Oe.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,Number),this.setInputsInline(!0)}},uw={init:function(){if("mixgo_me"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="ME G1";this.setColour(40),this.appendDummyInput().appendField(e).appendField(Oe.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Oe.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Oe.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},rw={init:function(){if("mixgo_me"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="ME G1";this.setColour(40),this.appendDummyInput().appendField(e).appendField(Oe.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Oe.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Oe.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(Oe.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0)}},lw={init:function(){if("mixgo_me"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="ME G1";this.setColour(40),this.appendDummyInput().appendField(e).appendField("RFID"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_RFID_SCAN_OK,"True"],[Oe.Msg.MIXLY_RFID_SCAN_NOTAGERR,"None"],[Oe.Msg.MIXLY_RFID_SCAN_ERROR,"False"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},dw=function(e,t){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",t.ORDER_ATOMIC]},Iw=function(e,t){t.definitions_.import_machine="import machine";var i="";return i+=t.valueToCode(this,"PIN",t.ORDER_ATOMIC)+".value("+t.valueToCode(this,"STAT",t.ORDER_ATOMIC)+")\n"},Tw=function(e,t){t.definitions_.import_machine="import machine";return[t.valueToCode(this,"PIN",t.ORDER_ATOMIC)+".value()",t.ORDER_ATOMIC]},Mw=function(e,t){return t.definitions_.import_machine="import machine",t.valueToCode(this,"PIN",t.ORDER_ATOMIC)+".write("+t.valueToCode(this,"NUM",t.ORDER_ATOMIC)+")\n"},hw=function(e,t){t.definitions_.import_machine="import machine";var i=t.valueToCode(this,"PIN",t.ORDER_ATOMIC),n=t.valueToCode(this,"NUM",t.ORDER_ATOMIC);return i+".set_analog_"+this.getFieldValue("key")+"("+n+")\n"},mw=function(e,t){return t.definitions_.import_machine="import machine",[t.valueToCode(this,"pin",t.ORDER_ATOMIC)+".read()",t.ORDER_ATOMIC]},Ew=function(e,t){t.definitions_.import_machine="import machine";var i=t.valueToCode(this,"PIN",t.ORDER_ATOMIC),n=this.getFieldValue("mode");return"machine.Pin("+i+").irq(handler = "+t.valueToCode(this,"DO",t.ORDER_ATOMIC)+", trigger = "+n+")\n"},Ow=function(e,t){t.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"pin#",n=t.valueToCode(this,"PIN",t.ORDER_ATOMIC),s=this.getFieldValue("MODE");return("pin#"==i?"pin"+n:t.variableDB_.getName(i,Oe.Variables.NAME_TYPE))+" = machine.Pin("+n+", "+s+")\n"},Rw=function(e,t){t.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"dac#",n=t.valueToCode(this,"PIN",t.ORDER_ATOMIC);return("dac#"==i?"dac"+n:t.variableDB_.getName(i,Oe.Variables.NAME_TYPE))+" = machine.DAC(machine.Pin("+n+"))\n"},cw=function(e,t){return t.definitions_.import_machine="import machine",t.valueToCode(this,"PIN",t.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},gw=function(e,t){t.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"tc#",n=t.valueToCode(this,"PIN",t.ORDER_ATOMIC);return("tc#"==i?"tc"+n:t.variableDB_.getName(i,Oe.Variables.NAME_TYPE))+" = machine.TouchPad(machine.Pin("+n+"))\n"},Cw=function(e,t){return[this.getFieldValue("PIN"),t.ORDER_ATOMIC]},Sw=Cw,Aw=Cw,Lw=Cw,Nw=Cw,Dw=Cw,fw=Cw,Fw=Cw,Pw=Cw,Yw=Cw,vw=Cw,Xw=Cw,yw=Cw,xw=Cw,bw=Cw,Vw=Cw,Bw=Cw,Gw=Cw,Uw=Cw,ww=Cw,kw=Cw,Hw=Cw,Ww=Cw,Kw=Cw,Jw=Cw,Qw=Cw,qw=Cw,zw=Cw,jw=Cw,$w=Cw,Zw=Cw,ek=Cw,tk=Cw,ik=Cw,nk=Cw,sk=Cw,_k=Cw,ok=Cw,pk=Cw,ak=Cw,uk=Cw,rk=Cw,lk=Cw,dk=Cw,Ik=function(e,t){const i=this.getFieldValue("PIN").split(".");if(2!==i.length)throw Error("pin value error");return t.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`,[i[1],t.ORDER_ATOMIC]},Tk=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_mini"==i){t.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var n='ext_rfid.read_card(0, x="id")'}else if("mixgo_sant"==i){t.definitions_.import_sant_gx_ext_rfid="from sant_gx import ext_rfid";n='ext_rfid.read_card(0, x="id")'}else{t.definitions_.import_mini_g2="import mini_g2";n='mini_g2.ext_rc522.read_card(0, x="id")'}return[n,t.ORDER_ATOMIC]},Mk=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"SECTOR",t.ORDER_ATOMIC);if("mixgo_mini"==i){t.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var s="ext_rfid.read_card("+n+")"}else if("mixgo_sant"==i){t.definitions_.import_sant_gx_ext_rfid="from sant_gx import ext_rfid";s="ext_rfid.read_card("+n+")"}else{t.definitions_.import_mini_g2="import mini_g2";s="mini_g2.ext_rc522.read_card("+n+")"}return[s,t.ORDER_ATOMIC]},hk=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"SECTOR",t.ORDER_ATOMIC),s=t.valueToCode(this,"CONTENT",t.ORDER_ATOMIC);if("mixgo_mini"==i){t.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var _="ext_rfid.write_card("+s+","+n+")\n"}else if("mixgo_sant"==i){t.definitions_.import_sant_gx_ext_rfid="from sant_gx import ext_rfid";_="ext_rfid.write_card("+s+","+n+")\n"}else{t.definitions_.import_mini_g2="import mini_g2";_="mini_g2.ext_rc522.write_card("+s+","+n+")\n"}return _},mk=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"SECTOR",t.ORDER_ATOMIC),s=t.valueToCode(this,"CONTENT",t.ORDER_ATOMIC);if("mixgo_mini"==i){t.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var _="ext_rfid.write_card("+s+","+n+")"}else if("mixgo_sant"==i){t.definitions_.import_sant_gx_ext_rfid="from sant_gx import ext_rfid";_="ext_rfid.write_card("+s+","+n+")"}else{t.definitions_.import_mini_g2="import mini_g2";_="mini_g2.ext_rc522.write_card("+s+","+n+")"}return[_,t.ORDER_ATOMIC]},Ek=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("key");if("mixgo_mini"==i){t.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var s="ext_rfid.scan_card()=="+n}else if("mixgo_sant"==i){t.definitions_.import_sant_gx_ext_rfid="from sant_gx import ext_rfid";s="ext_rfid.scan_card()=="+n}else{t.definitions_.import_mini_g2="import mini_g2";s="mini_g2.ext_rc522.scan_card()=="+n}return[s,t.ORDER_ATOMIC]};Object.assign(Oe.Variables,ge),Object.assign(Oe.Procedures,Xu),Oe.Python=zG,Oe.generator=zG,Re.Profile.default={},Object.assign(Re.Profile,$G),Object.assign(Re.Profile.default,$G["元控青春"]),Object.assign(Oe.Blocks,t,i,n,s,_,o,p,a,u,r,l,d,I,b,W,H,v,V,K,f,P,k,w,U,B,F,D,N,y,X,x,Y,G,Ie,Te,Me),Object.assign(Oe.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,ne,le,re,Z,se,de,q,z,ue,ae,pe,_e,j,Q,J,te,ee,ie,$,oe,he,me,Ee)})(); \ No newline at end of file diff --git a/boards/default/micropython_esp32s3/main.bundle.fb7b4a31.js b/boards/default/micropython_esp32s3/main.bundle.fb7b4a31.js new file mode 100644 index 00000000..3630119c --- /dev/null +++ b/boards/default/micropython_esp32s3/main.bundle.fb7b4a31.js @@ -0,0 +1,21 @@ +(()=>{"use strict";var e={d:(t,i)=>{for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{controls_type:()=>Fe,controls_typeLists:()=>Pe,lists_zip:()=>Ye,lists_zip_container:()=>ve,lists_zip_item:()=>Xe,unpack_iterable_object:()=>ye,variables_change:()=>De,variables_get:()=>Le,variables_global:()=>fe,variables_set:()=>Ne});var i={};e.r(i),e.d(i,{base_setup:()=>Ve,controls_delay:()=>Be,controls_end_program:()=>Ge,controls_except:()=>Ze,controls_finally:()=>et,controls_flow_statements:()=>Ke,controls_for:()=>Je,controls_forEach:()=>ke,controls_for_range:()=>Qe,controls_if:()=>Ue,controls_if_else:()=>je,controls_if_elseif:()=>ze,controls_if_if:()=>qe,controls_lambda:()=>it,controls_main:()=>be,controls_pass:()=>nt,controls_range:()=>we,controls_repeat_ext:()=>tt,controls_thread:()=>st,controls_try:()=>$e,controls_try_finally:()=>We,controls_whileUntil:()=>He,datetime_fromtimestamp:()=>rt,do_while:()=>_t,garbage_collection:()=>ot,gene_unique_identifier:()=>lt,get_mem_alloc:()=>pt,get_mem_free:()=>at,get_unique_identifier:()=>ut});var n={};e.r(n),e.d(n,{base_map:()=>Yt,generate_cartesian_product:()=>Xt,math_arithmetic:()=>ht,math_bit:()=>Et,math_constant:()=>Tt,math_constant_mp:()=>Mt,math_constrain:()=>At,math_dec:()=>Rt,math_degree_to_radian:()=>xt,math_indexer_number:()=>Nt,math_map:()=>Lt,math_max_min:()=>gt,math_number:()=>It,math_number_base_conversion:()=>Ct,math_radian_to_degree:()=>yt,math_random:()=>St,math_random_seed:()=>Dt,math_round:()=>ft,math_selfcalcu:()=>mt,math_to_int:()=>ct,math_trig:()=>Ot,text_to_number:()=>Ft,text_to_number_skulpt:()=>Pt,turn_to_int:()=>vt});var s={};e.r(s),e.d(s,{ascii_to_char:()=>wt,char_to_ascii:()=>kt,number_to_text:()=>Ht,os_system:()=>Mi,text:()=>Vt,text_capital:()=>Zt,text_center:()=>ei,text_char:()=>Gt,text_char_at:()=>Jt,text_char_at2:()=>Kt,text_char_at3:()=>li,text_compareTo:()=>ri,text_compare_to:()=>$t,text_create_with_container:()=>pi,text_create_with_item:()=>ai,text_encode:()=>Ii,text_equals_starts_ends:()=>jt,text_eval:()=>Ti,text_find:()=>ti,text_format:()=>oi,text_format_noreturn:()=>di,text_join:()=>Ut,text_join_seq:()=>ii,text_length:()=>Wt,text_random_char:()=>Qt,text_replace:()=>ni,text_split:()=>si,text_strip:()=>_i,text_substring:()=>zt,text_substring2:()=>qt,text_substring3:()=>ui,text_textarea:()=>Bt});var _={};e.r(_),e.d(_,{ENUMERATE:()=>ji,content_in_lists:()=>Zi,enumerate:()=>$i,list_many_input:()=>Vi,list_tolist:()=>wi,list_tolist2:()=>zi,list_trig:()=>yi,lists_2d_get_col_row_data:()=>Ri,lists_2d_get_data_with_col_row:()=>Oi,lists_append_extend:()=>Li,lists_change_to:()=>bi,lists_change_to_general:()=>Gi,lists_clear:()=>Pi,lists_create_with:()=>ci,lists_create_with2:()=>ki,lists_create_with_container:()=>Ci,lists_create_with_item:()=>Si,lists_create_with_noreturn:()=>Bi,lists_create_with_text:()=>gi,lists_create_with_text2:()=>Hi,lists_del_general:()=>Ui,lists_find:()=>Xi,lists_getIndex3:()=>Wi,lists_getSublist3:()=>Ki,lists_get_index:()=>mi,lists_get_random_item:()=>Ni,lists_get_random_sublist:()=>Di,lists_get_sublist:()=>Ei,lists_insert_value:()=>fi,lists_insert_value2:()=>Qi,lists_pop:()=>vi,lists_remove_at:()=>Yi,lists_remove_at2:()=>qi,lists_reverse:()=>Fi,lists_setIndex3:()=>Ji,lists_set_index:()=>Ai,lists_sort:()=>xi});var o={};e.r(o),e.d(o,{dicts_add_change_del:()=>hn,dicts_add_or_change:()=>an,dicts_clear:()=>ln,dicts_create_with:()=>tn,dicts_create_with_container:()=>nn,dicts_create_with_item:()=>sn,dicts_create_with_noreturn:()=>On,dicts_deldict:()=>Mn,dicts_delete:()=>un,dicts_get:()=>on,dicts_get_default:()=>pn,dicts_items:()=>dn,dicts_keys:()=>_n,dicts_length:()=>Tn,dicts_pop:()=>mn,dicts_setdefault:()=>En,dicts_to_json:()=>cn,dicts_to_json2:()=>Sn,dicts_to_to:()=>Cn,dicts_todict:()=>Rn,dicts_update:()=>rn,dicts_values:()=>In,json_to_dicts:()=>gn});var p={};e.r(p),e.d(p,{logic_boolean:()=>Fn,logic_compare:()=>Ln,logic_compare_continous:()=>Nn,logic_is:()=>Xn,logic_is_in:()=>vn,logic_negate:()=>fn,logic_null:()=>Pn,logic_operation:()=>Dn,logic_tobool:()=>yn,logic_true_or_false:()=>Yn});var a={};e.r(a),e.d(a,{sdcard_mount:()=>ss,sdcard_use_spi_init:()=>ns,storage_can_write_ornot:()=>Hn,storage_change_dir:()=>ts,storage_close_file:()=>Kn,storage_delete_file:()=>Qn,storage_file_seek:()=>jn,storage_file_tell:()=>zn,storage_file_write:()=>Gn,storage_fileopen:()=>bn,storage_fileopen_new:()=>Vn,storage_fileopen_new_encoding:()=>Bn,storage_get_a_line:()=>kn,storage_get_contents:()=>wn,storage_get_contents_without_para:()=>Un,storage_get_current_dir:()=>$n,storage_get_file_size:()=>qn,storage_get_filename:()=>Wn,storage_is_file:()=>is,storage_list_all_files:()=>Jn,storage_make_dir:()=>Zn,storage_open_file_with_os:()=>xn,storage_rename:()=>es});var u={};e.r(u),e.d(u,{procedures_callnoreturn:()=>us,procedures_callreturn:()=>rs,procedures_defnoreturn:()=>_s,procedures_defreturn:()=>os,procedures_ifreturn:()=>ls,procedures_mutatorarg:()=>as,procedures_mutatorcontainer:()=>ps,procedures_return:()=>ds});var r={};e.r(r),e.d(r,{tuple_change_to:()=>Ss,tuple_create_with:()=>Ts,tuple_create_with_container:()=>Ms,tuple_create_with_item:()=>hs,tuple_create_with_noreturn:()=>Ds,tuple_create_with_text2:()=>ms,tuple_create_with_text_return:()=>Es,tuple_del:()=>cs,tuple_find:()=>As,tuple_getIndex:()=>Os,tuple_getSublist:()=>Ns,tuple_get_random_item:()=>Fs,tuple_get_sublist:()=>fs,tuple_input:()=>Ys,tuple_join:()=>gs,tuple_length:()=>Rs,tuple_max:()=>Cs,tuple_totuple:()=>Ps,tuple_trig:()=>Ls});var l={};e.r(l),e.d(l,{set_add_discard:()=>ws,set_clear:()=>Bs,set_create_with:()=>Xs,set_create_with_container:()=>ys,set_create_with_item:()=>xs,set_create_with_text_return:()=>Ws,set_length:()=>bs,set_operate:()=>Gs,set_operate_update:()=>Us,set_pop:()=>Vs,set_sub:()=>ks,set_toset:()=>Ks,set_update:()=>Hs});var d={};e.r(d),e.d(d,{html_content:()=>js,html_content_more:()=>$s,html_document:()=>Qs,html_form:()=>e_,html_head_body:()=>zs,html_style:()=>Zs,html_style_color:()=>i_,html_style_content:()=>t_,html_text:()=>n_,html_title:()=>qs});var I={};e.r(I),e.d(I,{attribute_access:()=>m_,function_call:()=>T_,function_call_container:()=>M_,function_call_item:()=>h_,raw_block:()=>o_,raw_empty:()=>a_,raw_expression:()=>p_,raw_table:()=>__,text_comment:()=>u_,text_print_multiple:()=>l_,text_print_multiple_container:()=>d_,text_print_multiple_item:()=>I_,type_check:()=>r_});var T={};e.r(T),e.d(T,{controls_type:()=>g_,controls_typeLists:()=>C_,lists_zip:()=>S_,unpack_iterable_object:()=>A_,variables_change:()=>R_,variables_get:()=>E_,variables_global:()=>c_,variables_set:()=>O_});var M={};e.r(M),e.d(M,{Panic_with_status_code:()=>y_,base_setup:()=>N_,controls_delay:()=>X_,controls_flow_statements:()=>v_,controls_for:()=>F_,controls_forEach:()=>G_,controls_for_range:()=>P_,controls_if:()=>D_,controls_interrupts:()=>V_,controls_lambda:()=>w_,controls_main:()=>L_,controls_millis:()=>x_,controls_nointerrupts:()=>B_,controls_pass:()=>H_,controls_range:()=>U_,controls_repeat:()=>$_,controls_repeat_ext:()=>J_,controls_thread:()=>W_,controls_try_finally:()=>f_,controls_whileUntil:()=>Y_,datetime_fromtimestamp:()=>Z_,do_while:()=>K_,garbage_collection:()=>Q_,gene_unique_identifier:()=>eo,get_mem_alloc:()=>q_,get_mem_free:()=>z_,get_unique_identifier:()=>j_,reset:()=>b_,time_sleep:()=>k_});var h={};e.r(h),e.d(h,{base_map:()=>go,generate_cartesian_product:()=>So,math_arithmetic:()=>_o,math_bit:()=>so,math_constant:()=>io,math_constant_mp:()=>no,math_constrain:()=>Mo,math_dec:()=>uo,math_degree_to_radian:()=>Lo,math_indexer_number:()=>Eo,math_map:()=>To,math_max_min:()=>lo,math_number:()=>to,math_number_base_conversion:()=>ho,math_radian_to_degree:()=>Ao,math_random:()=>Io,math_random_seed:()=>mo,math_round:()=>Oo,math_selfcalcu:()=>oo,math_single:()=>po,math_to_int:()=>ro,math_trig:()=>ao,text_to_number:()=>Ro,text_to_number_skulpt:()=>co,turn_to_int:()=>Co});var m={};e.r(m),e.d(m,{ascii_to_char:()=>Po,char_to_ascii:()=>Yo,number_to_text:()=>vo,os_system:()=>ip,text:()=>No,text_capital:()=>wo,text_center:()=>ko,text_char:()=>fo,text_char_at:()=>xo,text_char_at2:()=>yo,text_char_at3:()=>Zo,text_compareTo:()=>$o,text_compare_to:()=>Bo,text_encode:()=>ep,text_equals_starts_ends:()=>Vo,text_eval:()=>tp,text_find:()=>Ho,text_format:()=>qo,text_format_noreturn:()=>zo,text_join:()=>Fo,text_join_seq:()=>Wo,text_length:()=>Xo,text_random_char:()=>bo,text_replace:()=>Ko,text_split:()=>Jo,text_strip:()=>Qo,text_substring:()=>Uo,text_substring2:()=>Go,text_substring3:()=>jo,text_textarea:()=>Do});var E={};e.r(E),e.d(E,{content_in_lists:()=>xp,enumerate:()=>yp,list_many_input:()=>gp,list_tolist:()=>vp,list_tolist2:()=>Xp,list_trig:()=>Op,lists_2d_get_col_row_data:()=>_p,lists_2d_get_data_with_col_row:()=>sp,lists_append_extend:()=>rp,lists_change_to:()=>cp,lists_change_to_general:()=>Sp,lists_clear:()=>Mp,lists_create_with:()=>op,lists_create_with2:()=>Lp,lists_create_with_noreturn:()=>Cp,lists_create_with_text:()=>pp,lists_create_with_text2:()=>Np,lists_del_general:()=>Ap,lists_find:()=>hp,lists_getIndex3:()=>Dp,lists_getSublist3:()=>fp,lists_get_index:()=>ap,lists_get_random_item:()=>lp,lists_get_random_sublist:()=>dp,lists_get_sublist:()=>np,lists_insert_value:()=>Ip,lists_insert_value2:()=>Pp,lists_pop:()=>Ep,lists_remove_at:()=>mp,lists_remove_at2:()=>Yp,lists_reverse:()=>Tp,lists_setIndex3:()=>Fp,lists_set_index:()=>up,lists_sort:()=>Rp});var O={};e.r(O),e.d(O,{dicts_add_change_del:()=>qp,dicts_add_or_change:()=>Up,dicts_clear:()=>Hp,dicts_create_with:()=>bp,dicts_create_with_noreturn:()=>$p,dicts_deldict:()=>Qp,dicts_delete:()=>wp,dicts_get:()=>Bp,dicts_get_default:()=>Gp,dicts_items:()=>Wp,dicts_keys:()=>Vp,dicts_length:()=>Jp,dicts_pop:()=>zp,dicts_setdefault:()=>jp,dicts_to_json:()=>ea,dicts_to_json2:()=>na,dicts_to_to:()=>ia,dicts_todict:()=>Zp,dicts_update:()=>kp,dicts_values:()=>Kp,json_to_dicts:()=>ta});var R={};e.r(R),e.d(R,{logic_boolean:()=>aa,logic_compare:()=>sa,logic_compare_continous:()=>_a,logic_is:()=>da,logic_is_in:()=>la,logic_negate:()=>pa,logic_null:()=>ua,logic_operation:()=>oa,logic_tobool:()=>Ia,logic_true_or_false:()=>ra});var c={};e.r(c),e.d(c,{sdcard_mount:()=>xa,sdcard_use_spi_init:()=>ya,storage_can_write_ornot:()=>ga,storage_change_dir:()=>Fa,storage_close_file:()=>Sa,storage_delete_file:()=>La,storage_file_seek:()=>fa,storage_file_tell:()=>Da,storage_file_write:()=>Ea,storage_fileopen:()=>Ma,storage_fileopen_new:()=>ha,storage_fileopen_new_encoding:()=>ma,storage_get_a_line:()=>ca,storage_get_contents:()=>Ra,storage_get_contents_without_para:()=>Oa,storage_get_current_dir:()=>Pa,storage_get_file_size:()=>Na,storage_get_filename:()=>Ca,storage_is_file:()=>Xa,storage_list_all_files:()=>Aa,storage_make_dir:()=>Ya,storage_open_file_with_os:()=>Ta,storage_rename:()=>va});var g={};e.r(g),e.d(g,{procedures_callnoreturn:()=>Ga,procedures_callreturn:()=>Ba,procedures_defnoreturn:()=>Va,procedures_defreturn:()=>ba,procedures_ifreturn:()=>Ua,procedures_return:()=>wa});var C={};e.r(C),e.d(C,{tuple_change_to:()=>ja,tuple_create_with:()=>ka,tuple_create_with_noreturn:()=>tu,tuple_create_with_text2:()=>Ha,tuple_create_with_text_return:()=>Wa,tuple_del:()=>Qa,tuple_find:()=>$a,tuple_getIndex:()=>Ka,tuple_getSublist:()=>eu,tuple_get_random_item:()=>nu,tuple_get_sublist:()=>iu,tuple_input:()=>_u,tuple_join:()=>qa,tuple_length:()=>Ja,tuple_max:()=>za,tuple_totuple:()=>su,tuple_trig:()=>Za});var S={};e.r(S),e.d(S,{set_add_discard:()=>du,set_clear:()=>uu,set_create_with:()=>ou,set_create_with_text_return:()=>Mu,set_length:()=>pu,set_operate:()=>ru,set_operate_update:()=>lu,set_pop:()=>au,set_sub:()=>Iu,set_toset:()=>hu,set_update:()=>Tu});var A={};e.r(A),e.d(A,{html_content:()=>Ru,html_content_more:()=>cu,html_document:()=>mu,html_form:()=>Cu,html_head_body:()=>Ou,html_style:()=>gu,html_style_content:()=>Su,html_text:()=>Au,html_title:()=>Eu});var L={};e.r(L),e.d(L,{attribute_access:()=>Yu,function_call:()=>Pu,raw_block:()=>Lu,raw_empty:()=>Du,raw_expression:()=>Nu,raw_table:()=>fu,type_check:()=>Fu});var N={};e.r(N),e.d(N,{PIN_init:()=>br,actuator_extern_get_led_bright:()=>Ku,actuator_extern_get_led_state:()=>Ju,actuator_extern_led_bright:()=>Wu,actuator_extern_led_brightness:()=>Qu,actuator_ms32006_dcmotor:()=>nr,actuator_ms32006_init:()=>ir,actuator_ms32006_stepper:()=>sr,actuator_neopixel_init:()=>_r,actuator_neopixel_rgb:()=>or,actuator_neopixel_rgb_all:()=>pr,actuator_neopixel_rgb_show_all_chase:()=>rr,actuator_neopixel_rgb_show_all_rainbow:()=>ur,actuator_neopixel_write:()=>ar,actuator_use_uart_init:()=>lr,esp32_music_get_tempo_extern:()=>wu,esp32_music_pitch:()=>Vu,esp32_music_pitch_init:()=>bu,esp32_music_pitch_with_time:()=>Bu,esp32_music_play_list:()=>Gu,esp32_music_reset_extern:()=>ku,esp32_music_set_tempo_extern:()=>Uu,esp32_music_stop:()=>Hu,mixbot_actuator_extern_get_addr:()=>yr,mixbot_actuator_extern_set_addr:()=>xr,mixbot_addr_extern:()=>gr,parrot_PIN_init:()=>Ur,parrot_move_speed:()=>wr,pin_led_bright:()=>Vr,player_insert_music:()=>mr,player_play_music:()=>hr,player_set_mode:()=>Mr,player_set_play:()=>Ir,player_set_volume:()=>Tr,player_whether_stop:()=>dr,robot_led_extern:()=>Lr,robot_led_extern_get_value:()=>Nr,robot_motor_extern:()=>Cr,robot_motor_extern_get_speed:()=>Sr,robot_servo_extern_absolute_run:()=>Pr,robot_servo_extern_get_status:()=>Dr,robot_servo_extern_relative_continue:()=>Xr,robot_servo_extern_relative_origin:()=>Yr,robot_servo_extern_relative_run:()=>vr,robot_servo_extern_stop:()=>Fr,robot_servo_extern_stop_mode:()=>fr,robot_traffic_light_extern:()=>Ar,servo_PIN_init:()=>Br,servo_get_angle:()=>er,servo_get_speed:()=>tr,servo_init:()=>qu,servo_move:()=>zu,servo_move_angle:()=>Gr,servo_set_angle:()=>$u,servo_set_speed:()=>Zu,servo_speed_360:()=>ju,syn6288_builtin_voice:()=>Rr,syn6288_get_voice:()=>Or,syn6288_set_voice:()=>Er,syn6288_tts_play:()=>cr});var D={};e.r(D),e.d(D,{actuator_dc_motor:()=>Rl,actuator_dc_motor_stop:()=>cl,actuator_get_led_bright:()=>Jr,actuator_get_led_state:()=>Qr,actuator_led_bright:()=>Kr,actuator_led_brightness:()=>qr,actuator_mixbot_buzzer_on_off:()=>Ll,actuator_mixgo_nova_mic_get:()=>Pl,actuator_mixgo_nova_mic_set:()=>Fl,actuator_mixgo_nova_onboard_music_pitch:()=>bl,actuator_mixgo_nova_onboard_music_stop:()=>Vl,actuator_mixgo_nova_play_audio:()=>yl,actuator_mixgo_nova_play_online_audio:()=>xl,actuator_mixgo_nova_record_audio:()=>Xl,actuator_mixgo_nova_voice_get:()=>vl,actuator_mixgo_nova_voice_set:()=>Yl,actuator_mixgo_zero_led_color:()=>zr,actuator_onboard_neopixel_rgb:()=>il,actuator_onboard_neopixel_rgb_all:()=>nl,actuator_onboard_neopixel_rgb_show_all_chase:()=>_l,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>sl,actuator_onboard_neopixel_write:()=>ol,actuator_rm_onboard_neopixel_rgb:()=>pl,actuator_rm_onboard_neopixel_rgb_all:()=>al,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>ul,actuator_stepper_keep:()=>El,actuator_stepper_stop:()=>Ol,analog_ble_keyboard_init:()=>jl,analog_ble_keyboard_input:()=>ed,analog_ble_keyboard_mouse_init:()=>ad,analog_ble_keyboard_mouse_input:()=>dd,analog_ble_keyboard_mouse_send_battery:()=>ld,analog_ble_keyboard_mouse_str:()=>Id,analog_ble_keyboard_send_battery:()=>id,analog_ble_keyboard_str:()=>td,analog_ble_mouse_init:()=>nd,analog_ble_mouse_input:()=>od,analog_ble_mouse_keyboard_input:()=>Td,analog_ble_mouse_send_battery:()=>pd,analog_keyboard_input:()=>wl,analog_keyboard_str:()=>zl,analog_mouse_input:()=>Ql,bitbot_motor:()=>fl,bitbot_move:()=>Nl,bitbot_stop:()=>Dl,ble_keyboard_connect:()=>Zl,ble_keyboard_get_mac:()=>$l,ble_keyboard_mouse_connect:()=>rd,ble_keyboard_mouse_get_mac:()=>ud,ble_mouse_connect:()=>_d,ble_mouse_get_mac:()=>sd,cc_number:()=>tl,educore_ble_keyboard_input:()=>Sd,educore_ble_sensor_connected:()=>Cd,educore_ble_sensor_init:()=>gd,educore_buzzer:()=>Md,educore_buzzer_play_tone:()=>hd,educore_buzzer_play_tone_time:()=>md,educore_buzzer_stop:()=>Ed,educore_neopixel_clear:()=>cd,educore_neopixel_rgb:()=>Rd,educore_rgb_light:()=>Od,esp32_music_get_tempo:()=>ll,esp32_music_reset:()=>dl,esp32_music_set_tempo:()=>rl,esp32_onboard_music_pitch:()=>Il,esp32_onboard_music_pitch_with_time:()=>Tl,esp32_onboard_music_play_list:()=>hl,esp32_onboard_music_stop:()=>Ml,general_key:()=>Hl,general_key_tuple:()=>Wl,generalkey_container:()=>Kl,generalkey_create_with_item:()=>Jl,get_keyboard_light:()=>Ad,get_power_output:()=>Gl,ledswitch:()=>Wr,mixbot_motor:()=>Al,mixbot_motor_status:()=>gl,mixbot_move:()=>Cl,mixbot_stop:()=>Sl,mouse_key:()=>ql,number:()=>Hr,rm_actuator_get_led_bright:()=>$r,rm_actuator_get_led_state:()=>Zr,rm_actuator_led_bright:()=>jr,rm_actuator_led_brightness:()=>el,rm_motor:()=>ml,set_all_power_output:()=>Ul,set_power_output:()=>Bl,special_key:()=>kl});var f={};e.r(f),e.d(f,{ai_sensor_20object:()=>_I,ai_sensor_ailocal_class:()=>Qd,ai_sensor_ailocal_class_result:()=>qd,ai_sensor_ailocal_train:()=>Jd,ai_sensor_asr_recognize:()=>eI,ai_sensor_audio_play:()=>jd,ai_sensor_audio_record:()=>zd,ai_sensor_barcode:()=>vd,ai_sensor_circle:()=>Bd,ai_sensor_classifier_faces:()=>sI,ai_sensor_color:()=>kd,ai_sensor_color_chases:()=>Kd,ai_sensor_color_chases_result:()=>Wd,ai_sensor_config:()=>Pd,ai_sensor_face:()=>nI,ai_sensor_find_20objects:()=>oI,ai_sensor_find_barcodes:()=>Xd,ai_sensor_find_circles:()=>Gd,ai_sensor_find_colors:()=>Hd,ai_sensor_find_licenseplates:()=>iI,ai_sensor_find_lines:()=>Vd,ai_sensor_find_qrcodes:()=>Fd,ai_sensor_find_rects:()=>wd,ai_sensor_find_tags:()=>xd,ai_sensor_licenseplate:()=>tI,ai_sensor_line:()=>bd,ai_sensor_qrcode:()=>Dd,ai_sensor_qrcode_lite:()=>fd,ai_sensor_rect:()=>Ud,ai_sensor_rgb:()=>Yd,ai_sensor_tag:()=>yd,ai_sensor_use_uart_init:()=>Nd,ai_sensor_yolo_recognize:()=>$d,ai_sensor_yolo_recognize_result:()=>Zd});var F={};e.r(F),e.d(F,{MICROPYTHON_AI_Speech_asr:()=>uI,MICROPYTHON_AI_Speech_unit:()=>aI,MICROPYTHON_AI_client:()=>pI});var P={};e.r(P),e.d(P,{AI_CAMERA_INIT:()=>SI,AI_STOP_ACQUISITION:()=>VI,CI130X_BROADCAST_SANT:()=>mI,CI130X_BROADCAST_SYSTEM_TIME:()=>OI,CI130X_GET_THE_RECOGNIZED_CMD_SANT:()=>hI,CI130X_GET_WHETHER_IDENTIFY_SANT:()=>MI,CI130X_IDENTIFY_AND_SAVE_SANT:()=>TI,CI130X_OPEN_AND_CLOSE:()=>II,CI130X_SET_SYSTEM_CMD_SANT:()=>EI,CREATE_CAMERA:()=>RI,DELETE_PEOPLE_FACE_ID:()=>bI,GET_CAT_FACE_DETECTION_LOCATION:()=>fI,GET_CAT_FACE_DETECTION_NUM:()=>DI,GET_COLOR_DETECTION_LOCATION:()=>NI,GET_COLOR_DETECTION_NUM:()=>LI,GET_FACE_DETECTION_KEYPOINT_LOCATION:()=>YI,GET_FACE_DETECTION_LOCATION:()=>PI,GET_FACE_DETECTION_NUM:()=>FI,GET_FACE_RECOGNITION_ID:()=>vI,GET_FACE_RECOGNITION_ID_KEYPOINT_LOCATION:()=>yI,GET_FACE_RECOGNITION_ID_LOCATION:()=>XI,GET_PICTURE_DATA_EXACT:()=>gI,GET_QR_CODE_RECOGNITION_DATA:()=>AI,MIXIO_REPORT_IMAGE_DATA:()=>BI,PEOPLE_FACE_ENROLL:()=>xI,SCREEN_SHOW_CAM_GRAPH_SHOOT:()=>CI,SHOOT_AND_SAVE_PICTURE:()=>cI,VOICE_RECOGNITION_CONTROL:()=>dI});var Y={};e.r(Y),e.d(Y,{mpython_blynk_app_data:()=>eT,mpython_blynk_app_notify:()=>JI,mpython_blynk_email:()=>zI,mpython_blynk_get_timers:()=>jI,mpython_blynk_on_connected:()=>HI,mpython_blynk_on_disconnected:()=>kI,mpython_blynk_run:()=>KI,mpython_blynk_sensor_data_to_app:()=>ZI,mpython_blynk_set_property:()=>qI,mpython_blynk_setup:()=>tT,mpython_blynk_stop_timers:()=>QI,mpython_blynk_sync_virtual:()=>wI,mpython_blynk_terminal_widget_vpin:()=>UI,mpython_blynktimer:()=>$I,mpython_blynktimer_run:()=>WI});var v={};e.r(v),e.d(v,{communicate_bluetooth_central_init:()=>bT,communicate_bluetooth_connect:()=>UT,communicate_bluetooth_disconnect:()=>wT,communicate_bluetooth_handle:()=>JT,communicate_bluetooth_is_connected:()=>HT,communicate_bluetooth_mac:()=>GT,communicate_bluetooth_peripheral_init:()=>VT,communicate_bluetooth_recv:()=>WT,communicate_bluetooth_recv_only:()=>KT,communicate_bluetooth_scan:()=>BT,communicate_bluetooth_send:()=>kT,communicate_espnow_init:()=>QT,communicate_espnow_init_new:()=>qT,communicate_i2c_available:()=>OT,communicate_i2c_init:()=>_T,communicate_i2c_master_read:()=>ET,communicate_i2c_onboard:()=>nT,communicate_i2c_read:()=>oT,communicate_i2c_scan:()=>aT,communicate_i2c_write:()=>pT,communicate_ir_recv_init:()=>NT,communicate_ir_send_init:()=>YT,communicate_ow_init:()=>cT,communicate_ow_read:()=>CT,communicate_ow_reset:()=>LT,communicate_ow_scan:()=>gT,communicate_ow_select:()=>AT,communicate_ow_write:()=>ST,communicate_spi_buffer:()=>lT,communicate_spi_init:()=>uT,communicate_spi_onboard:()=>sT,communicate_spi_read:()=>dT,communicate_spi_read_output:()=>IT,communicate_spi_readinto:()=>TT,communicate_spi_readinto_output:()=>MT,communicate_spi_set:()=>rT,communicate_spi_write:()=>hT,communicate_spi_write_readinto:()=>mT,espnow_radio_channel:()=>tM,espnow_radio_channel_new:()=>nM,espnow_radio_on_off:()=>sM,espnow_radio_rec:()=>oM,espnow_radio_recv:()=>aM,espnow_radio_recv_certain_msg:()=>uM,espnow_radio_recv_certain_msg_new:()=>lM,espnow_radio_recv_msg:()=>pM,espnow_radio_recv_new:()=>rM,espnow_radio_send:()=>_M,espnow_radio_txpower:()=>iM,i2c_available:()=>vM,i2c_init:()=>OM,i2c_master_reader2:()=>YM,i2c_read:()=>RM,i2c_scan:()=>gM,i2c_slave_onreceive:()=>RT,i2c_write:()=>cM,internal_variable:()=>DT,ir_recv_timeout:()=>PT,ir_transmit_busy:()=>xT,ir_transmit_conventional_data:()=>vT,ir_transmit_raw_code:()=>yT,ir_transmit_study_code:()=>XT,ir_whether_recv:()=>FT,lora_init:()=>dM,lora_packet:()=>IM,lora_recv:()=>MM,lora_send:()=>TM,network_espnow_info:()=>jT,network_espnow_mac:()=>zT,network_espnow_recv:()=>$T,network_espnow_recv_handle:()=>eM,network_espnow_send:()=>ZT,recv_fun:()=>fT,spi_buffer:()=>AM,spi_init:()=>CM,spi_read:()=>LM,spi_read_output:()=>NM,spi_readinto:()=>DM,spi_readinto_output:()=>fM,spi_set:()=>SM,spi_write:()=>FM,spi_write_readinto:()=>PM,urequests_attribute:()=>mM,urequests_get:()=>hM,urequests_method:()=>EM});var X={};e.r(X),e.d(X,{display_animate:()=>lh,display_blink_rate:()=>ph,display_circle:()=>dh,display_color_seclet:()=>Sh,display_draw_4strings:()=>th,display_fill:()=>rh,display_get_screen_image:()=>oh,display_help:()=>Th,display_image_size:()=>ih,display_lcd_use_i2c_init:()=>Fh,display_line:()=>sh,display_line_arbitrarily:()=>_h,display_matrix_extern_bright_point:()=>JM,display_matrix_extern_bright_screen:()=>qM,display_matrix_extern_clear:()=>zM,display_matrix_extern_get_pixel:()=>KM,display_matrix_extern_get_screen_pixel:()=>QM,display_matrix_extern_image_builtins:()=>jM,display_matrix_extern_scroll_string:()=>UM,display_matrix_extern_scroll_string_delay:()=>wM,display_matrix_extern_shift:()=>WM,display_matrix_extern_show_frame_string:()=>kM,display_matrix_extern_show_frame_string_delay:()=>HM,display_matrix_extern_show_image:()=>BM,display_matrix_extern_show_image_or_string_delay:()=>GM,display_matrix_use_i2c_init:()=>VM,display_oled_drawPixel:()=>hh,display_oled_showBitmap:()=>Mh,display_oled_use_i2c_init:()=>yh,display_onoff:()=>uh,display_rect:()=>nh,display_rgb_color:()=>ah,display_tm1650_power:()=>Eh,display_tm1650_set_brightness:()=>ch,display_tm1650_show_dot:()=>Rh,display_tm1650_show_num:()=>Oh,display_tm_use_i2c_init:()=>mh,display_triangle:()=>Ih,display_use_i2c_init:()=>eh,extern_oled_bright_point:()=>Kh,extern_oled_clear:()=>Jh,extern_oled_get_pixel:()=>Wh,extern_oled_hvline:()=>qh,extern_oled_line:()=>zh,extern_oled_scroll_string:()=>Gh,extern_oled_scroll_string_delay:()=>Uh,extern_oled_shape_rect:()=>Qh,extern_oled_shift:()=>Hh,extern_oled_show_frame_string:()=>wh,extern_oled_show_frame_string_delay:()=>kh,extern_oled_show_image:()=>xh,extern_oled_show_image_or_string_delay:()=>Bh,extern_oled_show_image_xy:()=>bh,extern_oled_show_string:()=>Vh,lcd_backlight:()=>vh,lcd_clear:()=>Xh,lcd_print_string:()=>Yh,lcd_show_image_or_string_delay:()=>Ph,matrix_extern_image_arithmetic:()=>$M,matrix_extern_image_invert:()=>ZM,tft_fill:()=>Dh,tft_line_arbitrarily:()=>fh,tft_scroll_string_delay:()=>Lh,tft_show_frame_string_delay:()=>Nh,tft_show_image_or_string_delay:()=>Ah,tft_show_image_xy:()=>Ch,tft_use_spi_init:()=>gh});var y={};e.r(y),e.d(y,{bitbot_display_bitmap_create:()=>km,bitbot_display_image_create:()=>wm,display_available:()=>mm,display_bitmap_create:()=>om,display_bright_point:()=>Im,display_bright_screen:()=>Mm,display_clear:()=>hm,display_get_pixel:()=>dm,display_get_screen_pixel:()=>Tm,display_image_builtins:()=>pm,display_image_builtins_all:()=>am,display_image_create:()=>_m,display_scroll_string:()=>em,display_scroll_string_delay:()=>tm,display_shift:()=>lm,display_show_frame_string:()=>nm,display_show_frame_string_delay:()=>sm,display_show_image:()=>$h,display_show_image_or_string_delay:()=>Zh,draw_pointer:()=>oE,image_arithmetic:()=>um,image_invert:()=>rm,mixbot_display_bitmap_create:()=>bm,mixbot_display_bright_screen:()=>Gm,mixbot_display_get_ambientbright:()=>Bm,mixbot_display_get_screen_pixel:()=>Vm,mixbot_display_image_create:()=>xm,mixbot_display_rotate:()=>Um,mixgo_display_bitmap_create:()=>Cm,mixgo_display_image_create_new:()=>gm,mixgome_display_bitmap_create:()=>Om,mixgome_display_font:()=>Sm,mixgome_display_image_create:()=>Em,mixgomini_display_bitmap_create:()=>cm,mixgomini_display_image_create:()=>Rm,mpython_display_hvline:()=>vm,mpython_display_line:()=>Xm,mpython_display_shape_rect:()=>Ym,mpython_pbm_image:()=>ym,nova_draw_pointer:()=>pE,onboard_oled_bright_point:()=>Pm,onboard_oled_scroll_string_delay:()=>fm,onboard_oled_show_frame_string_delay:()=>Fm,onboard_oled_show_image:()=>Am,onboard_oled_show_image_or_string_delay:()=>Dm,onboard_oled_show_image_xy:()=>Lm,onboard_oled_show_string:()=>Nm,onboard_tft_bright_point:()=>$m,onboard_tft_bright_screen:()=>TE,onboard_tft_clear:()=>ME,onboard_tft_clock_clear:()=>sE,onboard_tft_clock_draw:()=>nE,onboard_tft_clock_get_rtctime:()=>tE,onboard_tft_clock_init:()=>eE,onboard_tft_clock_set_time:()=>iE,onboard_tft_display_hvline:()=>qm,onboard_tft_display_line:()=>zm,onboard_tft_display_shape_circle:()=>_E,onboard_tft_display_shape_rect:()=>Qm,onboard_tft_fill:()=>Zm,onboard_tft_get_pixel:()=>jm,onboard_tft_get_screen_pixel:()=>IE,onboard_tft_scroll_string:()=>rE,onboard_tft_scroll_string_delay:()=>im,onboard_tft_shift:()=>dE,onboard_tft_show_frame_string:()=>lE,onboard_tft_show_frame_string_delay:()=>Jm,onboard_tft_show_image:()=>uE,onboard_tft_show_image_or_string_delay:()=>Km,onboard_tft_show_image_xy:()=>Hm,onboard_tft_show_image_xy_direct:()=>Wm,onboard_tft_show_texts:()=>aE});var x={};e.r(x),e.d(x,{factory_block:()=>vE,factory_block_return:()=>XE,factory_block_return_with_textarea:()=>xE,factory_block_with_textarea:()=>yE,factory_callMethod_noreturn:()=>PE,factory_callMethod_return:()=>YE,factory_create_with_container:()=>NE,factory_create_with_item:()=>DE,factory_declare:()=>FE,factory_from_import:()=>SE,factory_function_noreturn:()=>LE,factory_function_return:()=>fE,factory_import:()=>AE,folding_block:()=>bE});var b={};e.r(b),e.d(b,{controls_pin_attachInterrupt:()=>_O,inout_analog_atten:()=>JE,inout_analog_read:()=>KE,inout_analog_read_init:()=>ZE,inout_analog_write:()=>kE,inout_analog_write_init:()=>$E,inout_analog_write_set:()=>HE,inout_analog_write_set_freq:()=>iO,inout_digital_init:()=>zE,inout_digital_read:()=>UE,inout_digital_write:()=>GE,inout_highlow:()=>BE,inout_pinMode:()=>tO,inout_pin_attachInterrupt:()=>qE,inout_pin_pressed:()=>QE,inout_pin_pressed_init:()=>eO,inout_pwm_analog_write:()=>wE,inout_pwm_analog_write_init:()=>jE,inout_pwm_analog_write_set_freq:()=>WE,pin_pressed:()=>sO,pin_pressed_init:()=>nO});var V={};e.r(V),e.d(V,{IOT_CONNECT_OLLAMA:()=>wO,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>fO,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>DO,IOT_EMQX_PING:()=>LO,IOT_FORMATTING:()=>SO,IOT_FORMAT_STRING:()=>AO,IOT_MIXIO_NTP:()=>NO,IOT_MIXIO_PUBLISH:()=>mO,IOT_MIXIO_SUBSCRIBE:()=>EO,iot_checkonenet:()=>BO,iot_client_onboard:()=>PO,iot_connect_ollama:()=>UO,iot_connect_openai:()=>kO,iot_create_with_item:()=>MO,iot_http_client:()=>YO,iot_http_data:()=>vO,iot_mixio_check:()=>cO,iot_mixio_connect:()=>hO,iot_mixio_connect_only:()=>RO,iot_mixio_disconnect:()=>OO,iot_mixio_format_msg:()=>CO,iot_mixio_format_topic:()=>gO,iot_mixly_key:()=>FO,iot_mqtt_client:()=>XO,iot_mqtt_data:()=>yO,iot_onenet_check:()=>rO,iot_onenet_connect:()=>aO,iot_onenet_disconnect:()=>uO,iot_onenet_publish:()=>dO,iot_onenet_publish_dict:()=>lO,iot_onenetconnect:()=>bO,iot_onenetdisconnect:()=>VO,iot_publish:()=>GO,iot_publish_container:()=>IO,iot_publish_item:()=>TO,iot_wifi_connect:()=>pO,iot_wificonnect:()=>xO,ollama_empty_history:()=>KO,use_ollama_llm_to_chat:()=>HO,use_ollama_llm_to_chat_return:()=>WO});var B={};e.r(B),e.d(B,{educore_mqtt_connect:()=>AR,educore_mqtt_connect_success:()=>fR,educore_mqtt_subscribe_message:()=>LR,educore_mqtt_topic_publish:()=>DR,educore_mqtt_topic_subscribe:()=>NR,educore_wifi_connect:()=>SR,network_ap_connect:()=>nR,network_connect:()=>$O,network_get_connect:()=>eR,network_get_wifi:()=>iR,network_init:()=>QO,network_is_active:()=>zO,network_open:()=>qO,network_scan:()=>jO,network_server:()=>sR,network_socket_accept:()=>uR,network_socket_bind:()=>oR,network_socket_close:()=>TR,network_socket_connect:()=>pR,network_socket_init:()=>_R,network_socket_listen:()=>aR,network_socket_receive:()=>rR,network_socket_receive_from:()=>dR,network_socket_send:()=>lR,network_socket_send_to:()=>IR,network_stop:()=>tR,network_wifi_connect:()=>ZO,ntptime_address:()=>OR,ntptime_time:()=>ER,requests_attribute:()=>hR,requests_attribute2:()=>CR,requests_get:()=>MR,requests_get2:()=>cR,requests_method:()=>mR,requests_post:()=>gR});var G={};e.r(G),e.d(G,{get_potential_num:()=>PR,nova_g1_motor:()=>YR,nova_g1_spk_en:()=>XR,nova_g1_usb:()=>vR});var U={};e.r(U),e.d(U,{pe_g1_battery_left:()=>bR,pe_g1_dc_motor:()=>VR,pe_g1_dc_motor_speed:()=>BR,pe_g1_servo_get_angle:()=>wR,pe_g1_servo_get_speed:()=>kR,pe_g1_servo_set_angle:()=>GR,pe_g1_servo_set_speed:()=>UR,pe_g1_use_i2c_init:()=>xR});var w={};e.r(w),e.d(w,{CI130X_BROADCAST:()=>Tc,CI130X_GET_THE_RECOGNIZED_CMD:()=>Ic,CI130X_GET_WHETHER_IDENTIFY:()=>dc,CI130X_IDENTIFY_AND_SAVE:()=>lc,CI130X_SET_SYSTEM_CMD:()=>Mc,HCSR04:()=>ng,PS2_Button:()=>pg,PS2_Buttons:()=>ug,PS2_Buttons_new:()=>Ig,PS2_State:()=>ag,PS2_init:()=>sg,PS2_init_new:()=>lg,PS2_stk:()=>rg,PS2_stk_new:()=>Tg,PS2_vibration:()=>og,PS2_vibration_new:()=>dg,camera_sensor_init:()=>Hg,camera_sensor_result:()=>Wg,column_tube_foot:()=>zg,define_keyboards:()=>jg,educore_body_sensor:()=>Xg,educore_button_sensor_extern:()=>Vg,educore_camera_sensor:()=>kg,educore_infrared_sensor:()=>bg,educore_soilhum_sensor:()=>yg,educore_temp_sensor:()=>wg,educore_temphum_sensor:()=>xg,educore_ultrasonic_sensor:()=>Gg,esp32_s2_weather_init:()=>Zc,esp32_s2_weather_rain:()=>tg,esp32_s2_weather_wd:()=>eg,esp32_s2_weather_ws:()=>ig,extern_rfid_read:()=>Bc,extern_rfid_readcontent:()=>Uc,extern_rfid_readid:()=>Gc,extern_rfid_status:()=>Hc,extern_rfid_write:()=>wc,extern_rfid_write_return:()=>kc,get_keboards_value:()=>$g,gnss_get_data:()=>Eg,gnss_have_data:()=>mg,init_matrix_keyboard:()=>Qg,interaction_whether_to_interaction:()=>uc,interaction_whether_to_interaction_SANT:()=>rc,line_tube_foot:()=>qg,mixbot_sensor_extern_get_addr:()=>Lg,mixbot_sensor_extern_set_addr:()=>Ng,pm25_get_data:()=>hg,radar_set_DETECTION_THRESHOLD:()=>pc,radar_set_DETECTION_THRESHOLD_SANT:()=>ac,robot_button_extern_get_value:()=>Rg,robot_color_extern_get_value:()=>Ag,robot_infrared_extern_get_value:()=>gg,robot_infrared_extern_grey_get_value:()=>Cg,robot_potentiometer_extern_get_value:()=>Sg,robot_sonar_extern_get_value:()=>Dg,robot_sonar_extern_led:()=>fg,robot_touch_extern_get_value:()=>cg,sensor_APDS9960_extern:()=>mc,sensor_DS18X20:()=>sc,sensor_LTR308_extern:()=>Ec,sensor_LTR390UV_extern:()=>cc,sensor_MAX30102_extern:()=>hc,sensor_QMC5883L_extern:()=>fc,sensor_VL530LX_extern:()=>gc,sensor_adxl345_get_acceleration:()=>zR,sensor_aht11_extern:()=>Sc,sensor_bmp:()=>ic,sensor_compass_reset:()=>bc,sensor_dht11:()=>$R,sensor_hp203_extern:()=>Ac,sensor_light_level:()=>jR,sensor_lm35:()=>_c,sensor_ltr381_extern:()=>Oc,sensor_mixgo_extern_button_attachInterrupt:()=>QR,sensor_mixgo_extern_button_get_presses:()=>JR,sensor_mixgo_extern_button_is_pressed:()=>WR,sensor_mixgo_extern_button_was_pressed:()=>KR,sensor_mixgo_extern_light:()=>ZR,sensor_mixgo_extern_pin_near:()=>tc,sensor_mixgo_extern_sound:()=>ec,sensor_mixgoce_hot_wheel_degrees:()=>$c,sensor_mixgoce_hot_wheel_is_touched:()=>jc,sensor_mpu9250_attachGestureInterrupt:()=>qR,sensor_mpu9250_calibrate_compass:()=>Xc,sensor_mpu9250_field_strength:()=>xc,sensor_mpu9250_gesture:()=>Fc,sensor_mpu9250_get_acceleration:()=>Pc,sensor_mpu9250_get_gyro:()=>vc,sensor_mpu9250_get_magnetic:()=>Yc,sensor_mpu9250_temperature:()=>yc,sensor_ms5611_extern:()=>Nc,sensor_ms5611_extern_altitude:()=>Dc,sensor_read_humiture:()=>Bg,sensor_sht:()=>nc,sensor_shtc3_extern:()=>Cc,sensor_spl06_001_extern:()=>Lc,sensor_ucs12071_extern:()=>Rc,sensor_use_i2c_init:()=>oc,sensor_use_spi_init:()=>Vc,sensor_use_uart_init:()=>Mg,sensor_weather_solo_init:()=>Fg,sensor_weather_solo_rain:()=>vg,sensor_weather_solo_wd:()=>Pg,sensor_weather_solo_ws:()=>Yg,sensor_weigh_init:()=>Kg,tvoc_get_data:()=>Og,ultrasonic_sensor_read_distance:()=>Ug,weather_data:()=>Wc,weather_have_data:()=>Kc,weather_set_label:()=>Qc,weather_set_label_container:()=>qc,weather_set_label_item:()=>zc,weather_uart_mixio:()=>Jc,weigh_sensor_get_weight:()=>Jg});var k={};e.r(k),e.d(k,{HCSR04:()=>MC,RTC_set_date:()=>TC,RTC_set_time:()=>IC,bitbot_als_num:()=>SS,dht11:()=>PS,educore_button_sensor:()=>GS,educore_button_was_pressed:()=>US,educore_gyroscope_sensor:()=>bS,educore_gyroscope_sensor_read:()=>VS,educore_gyroscope_sensor_shake:()=>BS,educore_light_sensor:()=>xS,educore_rfid_sensor:()=>wS,educore_rfid_sensor_scan:()=>kS,educore_rfid_sensor_scan_data:()=>HS,educore_voice_sensor:()=>XS,number1:()=>mC,number2:()=>EC,number3:()=>OC,number4:()=>RC,number5:()=>cC,number6:()=>gC,number7:()=>CC,onboard_RTC_get_time:()=>PC,onboard_RTC_get_time_str:()=>bC,onboard_RTC_get_timestamp:()=>YC,onboard_RTC_get_timetuple_to_str:()=>VC,onboard_RTC_set_datetime:()=>yC,onboard_RTC_settime_string:()=>XC,onboard_RTC_timestamp_totuple:()=>vC,rfid_readcontent:()=>WC,rfid_readid:()=>HC,rfid_status:()=>QC,rfid_write:()=>KC,rfid_write_return:()=>JC,sensor_LTR308:()=>BC,sensor_aht11:()=>UC,sensor_bitbot_ALS:()=>CS,sensor_button_get_presses:()=>NS,sensor_button_is_pressed:()=>AS,sensor_button_was_pressed:()=>LS,sensor_distance_hrsc04:()=>dC,sensor_eulerangles:()=>zC,sensor_field_strength:()=>YS,sensor_get_acceleration:()=>qC,sensor_get_temperature:()=>wC,sensor_get_the_coprocessor_version:()=>WS,sensor_hp203:()=>kC,sensor_light:()=>FS,sensor_mixbot_get_gyro:()=>gS,sensor_mixbot_patrol_calibrate:()=>OS,sensor_mixbot_patrol_value:()=>RS,sensor_mixbot_temperature:()=>cS,sensor_mixgo_LTR308:()=>fC,sensor_mixgo_button_attachInterrupt:()=>nC,sensor_mixgo_button_get_presses:()=>iC,sensor_mixgo_button_is_pressed:()=>eC,sensor_mixgo_button_was_pressed:()=>tC,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>pS,sensor_mixgo_cc_mmc5603_get_angle:()=>oS,sensor_mixgo_cc_mmc5603_get_magnetic:()=>_S,sensor_mixgo_light:()=>hC,sensor_mixgo_nova_LTR308:()=>DC,sensor_mixgo_nova_pin_near:()=>NC,sensor_mixgo_pin_near:()=>LC,sensor_mixgo_pin_near_double:()=>AC,sensor_mixgo_pin_near_single:()=>SC,sensor_mixgo_pin_pressed:()=>aC,sensor_mixgo_sant_color:()=>FC,sensor_mixgo_touch_slide:()=>lC,sensor_mixgocar42_button_attachInterrupt:()=>pC,sensor_mixgocar42_button_get_presses:()=>oC,sensor_mixgocar42_button_is_pressed:()=>sC,sensor_mixgocar42_button_was_pressed:()=>_C,sensor_mixgocar_battery_left:()=>ES,sensor_mixgocar_pin_near:()=>hS,sensor_mixgocar_pin_near_line:()=>MS,sensor_mixgocar_pin_near_state_change:()=>mS,sensor_mixgoce_pin_pressed:()=>uC,sensor_mixgoce_temperature:()=>uS,sensor_mixgome_temperature:()=>aS,sensor_mpython_pin_pressed:()=>rC,sensor_mpython_qmi8658_get_gyro:()=>rS,sensor_mpython_qmi8658_temperature:()=>lS,sensor_onboard_compass_reset:()=>sS,sensor_onboard_mpu9250_calibrate_compass:()=>tS,sensor_onboard_mpu9250_field_strength:()=>nS,sensor_onboard_mpu9250_gesture:()=>jC,sensor_onboard_mpu9250_get_acceleration:()=>$C,sensor_onboard_mpu9250_get_gyro:()=>eS,sensor_onboard_mpu9250_get_magnetic:()=>ZC,sensor_onboard_mpu9250_temperature:()=>iS,sensor_pin_near:()=>fS,sensor_pin_pressed:()=>DS,sensor_read:()=>yS,sensor_rm_acc:()=>TS,sensor_rm_battery_left:()=>IS,sensor_rm_pin_near_double:()=>dS,sensor_rtc_init:()=>xC,sensor_sound:()=>GC,sensor_temperature:()=>vS});var H={};e.r(H),e.d(H,{serial_any:()=>tA,serial_begin:()=>oA,serial_print:()=>zS,serial_print_byte:()=>qS,serial_print_hex:()=>$S,serial_println:()=>jS,serial_read_from_ai:()=>MA,serial_readline:()=>iA,serial_readstr:()=>eA,serial_readstr_until:()=>nA,serial_receive_data_event:()=>ZS,serial_send_to_ai:()=>TA,serial_softserial:()=>_A,serial_softserial_new:()=>sA,system_input:()=>pA,system_print:()=>aA,system_print_container:()=>dA,system_print_end:()=>rA,system_print_inline:()=>uA,system_print_item:()=>IA,system_print_many:()=>lA});var W={};e.r(W),e.d(W,{Panic_with_status_code:()=>OA,Timer_init:()=>YA,base_delay:()=>yA,controls_delay:()=>EA,controls_delay_new:()=>mA,controls_millis:()=>cA,controls_uname:()=>CA,raw_block:()=>gA,reset:()=>RA,system_bitbot_shutdown:()=>PA,system_machine_reset:()=>FA,system_ticks_diff:()=>LA,system_timer:()=>AA,system_timer_init:()=>NA,system_wdt_feed:()=>fA,system_wdt_init:()=>DA,time_ticks_diff:()=>XA,timer:()=>SA,timer2:()=>vA});var K={};e.r(K),e.d(K,{Air_daily_content:()=>qA,Air_now_content:()=>wA,Geo_moon_content:()=>jA,Geo_sun_content:()=>zA,Life_suggestion_content:()=>HA,Location_search_content:()=>KA,Tide_daily_content:()=>WA,WEATHER_DAILY:()=>VA,WEATHER_HOUR:()=>BA,WEATHER_NOW:()=>bA,Weather_alarm_content:()=>kA,Weather_daily:()=>JA,Weather_daily_content:()=>QA,Weather_now:()=>GA,Weather_now_content:()=>UA});var J={};e.r(J),e.d(J,{PIN_init:()=>jL,actuator_extern_get_led_bright:()=>mL,actuator_extern_get_led_state:()=>EL,actuator_extern_led_bright:()=>hL,actuator_extern_led_brightness:()=>OL,actuator_ms32006_dcmotor:()=>_L,actuator_ms32006_init:()=>sL,actuator_ms32006_stepper:()=>oL,actuator_neopixel_init:()=>RL,actuator_neopixel_rgb:()=>CL,actuator_neopixel_rgb_all:()=>cL,actuator_neopixel_rgb_show_all_chase:()=>SL,actuator_neopixel_rgb_show_all_rainbow:()=>AL,actuator_neopixel_write:()=>gL,actuator_use_uart_init:()=>LL,esp32_music_get_tempo_extern:()=>dL,esp32_music_pitch:()=>aL,esp32_music_pitch_init:()=>pL,esp32_music_pitch_with_time:()=>uL,esp32_music_play_list:()=>IL,esp32_music_reset_extern:()=>TL,esp32_music_set_tempo_extern:()=>lL,esp32_music_stop:()=>rL,mixbot_actuator_extern_get_addr:()=>qL,mixbot_actuator_extern_set_addr:()=>zL,mixbot_addr_extern:()=>xL,parrot_PIN_init:()=>tN,parrot_move_speed:()=>iN,pin_led_bright:()=>$L,player_play_music:()=>PL,player_set_mode:()=>FL,player_set_play:()=>DL,player_set_volume:()=>fL,player_whether_stop:()=>NL,robot_led_extern:()=>GL,robot_led_extern_get_value:()=>UL,robot_motor_extern:()=>bL,robot_motor_extern_get_speed:()=>VL,robot_servo_extern_absolute_run:()=>WL,robot_servo_extern_get_status:()=>wL,robot_servo_extern_relative_continue:()=>QL,robot_servo_extern_relative_origin:()=>KL,robot_servo_extern_relative_run:()=>JL,robot_servo_extern_stop:()=>HL,robot_servo_extern_stop_mode:()=>kL,robot_traffic_light_extern:()=>BL,servo_PIN_init:()=>ZL,servo_get_angle:()=>iL,servo_get_speed:()=>nL,servo_init:()=>$A,servo_move:()=>ML,servo_move_angle:()=>eN,servo_set_angle:()=>eL,servo_set_speed:()=>tL,servo_speed_360:()=>ZA,syn6288_builtin_voice:()=>XL,syn6288_get_voice:()=>vL,syn6288_set_voice:()=>YL,syn6288_tts_play:()=>yL});var Q={};e.r(Q),e.d(Q,{actuator_dc_motor:()=>FN,actuator_dc_motor_stop:()=>PN,actuator_get_led_bright:()=>IN,actuator_get_led_state:()=>TN,actuator_led_bright:()=>dN,actuator_led_brightness:()=>MN,actuator_mixbot_buzzer_on_off:()=>xN,actuator_mixgo_nova_mic_get:()=>UN,actuator_mixgo_nova_mic_set:()=>GN,actuator_mixgo_nova_onboard_music_pitch:()=>JN,actuator_mixgo_nova_onboard_music_stop:()=>QN,actuator_mixgo_nova_play_audio:()=>WN,actuator_mixgo_nova_play_online_audio:()=>KN,actuator_mixgo_nova_record_audio:()=>HN,actuator_mixgo_nova_voice_get:()=>kN,actuator_mixgo_nova_voice_set:()=>wN,actuator_mixgo_zero_led_color:()=>hN,actuator_onboard_neopixel_rgb:()=>CN,actuator_onboard_neopixel_rgb_all:()=>SN,actuator_onboard_neopixel_rgb_show_all_chase:()=>AN,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>LN,actuator_onboard_neopixel_write:()=>gN,actuator_stepper_keep:()=>DN,actuator_stepper_stop:()=>fN,analog_ble_keyboard_init:()=>_D,analog_ble_keyboard_input:()=>aD,analog_ble_keyboard_mouse_init:()=>hD,analog_ble_keyboard_mouse_input:()=>RD,analog_ble_keyboard_mouse_send_battery:()=>OD,analog_ble_keyboard_mouse_str:()=>cD,analog_ble_keyboard_send_battery:()=>rD,analog_ble_keyboard_str:()=>uD,analog_ble_mouse_init:()=>lD,analog_ble_mouse_input:()=>TD,analog_ble_mouse_keyboard_input:()=>gD,analog_ble_mouse_send_battery:()=>MD,analog_keyboard_input:()=>$N,analog_keyboard_str:()=>nD,analog_mouse_input:()=>tD,bitbot_motor:()=>BN,bitbot_move:()=>bN,bitbot_stop:()=>VN,ble_keyboard_connect:()=>pD,ble_keyboard_get_mac:()=>oD,ble_keyboard_mouse_connect:()=>ED,ble_keyboard_mouse_get_mac:()=>mD,ble_mouse_connect:()=>ID,ble_mouse_get_mac:()=>dD,cc_number:()=>mN,educore_ble_keyboard_input:()=>YD,educore_ble_sensor_connected:()=>PD,educore_ble_sensor_init:()=>FD,educore_buzzer:()=>CD,educore_buzzer_play_tone:()=>SD,educore_buzzer_play_tone_time:()=>AD,educore_buzzer_stop:()=>LD,educore_neopixel_clear:()=>fD,educore_neopixel_rgb:()=>DD,educore_rgb_light:()=>ND,esp32_music_get_tempo:()=>sN,esp32_music_reset:()=>uN,esp32_music_set_tempo:()=>nN,esp32_onboard_music_pitch:()=>_N,esp32_onboard_music_pitch_with_time:()=>oN,esp32_onboard_music_play_list:()=>aN,esp32_onboard_music_stop:()=>pN,general_key:()=>eD,general_key_tuple:()=>sD,get_keyboard_light:()=>vD,get_power_output:()=>zN,ledswitch:()=>lN,mixbot_motor:()=>yN,mixbot_motor_status:()=>YN,mixbot_move:()=>vN,mixbot_stop:()=>XN,mouse_key:()=>iD,number:()=>rN,rm_actuator_get_led_bright:()=>ON,rm_actuator_get_led_state:()=>RN,rm_actuator_led_bright:()=>EN,rm_actuator_led_brightness:()=>cN,rm_motor:()=>NN,set_all_power_output:()=>jN,set_power_output:()=>qN,special_key:()=>ZN});var q={};e.r(q),e.d(q,{ai_sensor_20object:()=>If,ai_sensor_ailocal_class:()=>tf,ai_sensor_ailocal_class_result:()=>nf,ai_sensor_ailocal_train:()=>ef,ai_sensor_asr_recognize:()=>af,ai_sensor_audio_play:()=>_f,ai_sensor_audio_record:()=>sf,ai_sensor_barcode:()=>GD,ai_sensor_circle:()=>KD,ai_sensor_classifier_faces:()=>df,ai_sensor_color:()=>zD,ai_sensor_color_chases:()=>ZD,ai_sensor_color_chases_result:()=>$D,ai_sensor_config:()=>xD,ai_sensor_face:()=>lf,ai_sensor_find_20objects:()=>Tf,ai_sensor_find_barcodes:()=>UD,ai_sensor_find_circles:()=>JD,ai_sensor_find_colors:()=>jD,ai_sensor_find_licenseplates:()=>rf,ai_sensor_find_lines:()=>WD,ai_sensor_find_qrcodes:()=>BD,ai_sensor_find_rects:()=>qD,ai_sensor_find_tags:()=>kD,ai_sensor_licenseplate:()=>uf,ai_sensor_line:()=>HD,ai_sensor_qrcode:()=>VD,ai_sensor_qrcode_lite:()=>yD,ai_sensor_rect:()=>QD,ai_sensor_rgb:()=>bD,ai_sensor_tag:()=>wD,ai_sensor_use_uart_init:()=>XD,ai_sensor_yolo_recognize:()=>of,ai_sensor_yolo_recognize_result:()=>pf});var z={};e.r(z),e.d(z,{AI_CAMERA_INIT:()=>Nf,AI_STOP_ACQUISITION:()=>Uf,CI130X_BROADCAST_SANT:()=>Rf,CI130X_BROADCAST_SYSTEM_TIME:()=>gf,CI130X_GET_THE_RECOGNIZED_CMD_SANT:()=>Of,CI130X_GET_WHETHER_IDENTIFY_SANT:()=>Ef,CI130X_IDENTIFY_AND_SAVE_SANT:()=>mf,CI130X_OPEN_AND_CLOSE:()=>hf,CI130X_SET_SYSTEM_CMD_SANT:()=>cf,CREATE_CAMERA:()=>Cf,DELETE_PEOPLE_FACE_ID:()=>Gf,GET_CAT_FACE_DETECTION_LOCATION:()=>Yf,GET_CAT_FACE_DETECTION_NUM:()=>Pf,GET_COLOR_DETECTION_LOCATION:()=>Ff,GET_COLOR_DETECTION_NUM:()=>ff,GET_FACE_DETECTION_KEYPOINT_LOCATION:()=>yf,GET_FACE_DETECTION_LOCATION:()=>Xf,GET_FACE_DETECTION_NUM:()=>vf,GET_FACE_RECOGNITION_ID:()=>xf,GET_FACE_RECOGNITION_ID_KEYPOINT_LOCATION:()=>Vf,GET_FACE_RECOGNITION_ID_LOCATION:()=>bf,GET_PICTURE_DATA_EXACT:()=>Af,GET_QR_CODE_RECOGNITION_DATA:()=>Df,MIXIO_REPORT_IMAGE_DATA:()=>wf,PEOPLE_FACE_ENROLL:()=>Bf,SCREEN_SHOW_CAM_GRAPH_SHOOT:()=>Lf,SHOOT_AND_SAVE_PICTURE:()=>Sf,VOICE_RECOGNITION_CONTROL:()=>Mf});var j={};e.r(j),e.d(j,{MICROPYTHON_AI_Speech_asr:()=>Wf,MICROPYTHON_AI_Speech_unit:()=>Hf,MICROPYTHON_AI_client:()=>kf});var $={};e.r($),e.d($,{mpython_blynk_app_data:()=>nF,mpython_blynk_app_notify:()=>$f,mpython_blynk_email:()=>sF,mpython_blynk_get_timers:()=>eF,mpython_blynk_on_connected:()=>qf,mpython_blynk_on_disconnected:()=>Qf,mpython_blynk_run:()=>jf,mpython_blynk_sensor_data_to_app:()=>iF,mpython_blynk_set_property:()=>_F,mpython_blynk_setup:()=>oF,mpython_blynk_stop_timers:()=>Zf,mpython_blynk_sync_virtual:()=>Jf,mpython_blynk_terminal_widget_vpin:()=>Kf,mpython_blynktimer:()=>tF,mpython_blynktimer_run:()=>zf});var Z={};e.r(Z),e.d(Z,{communicate_bluetooth_central_init:()=>UF,communicate_bluetooth_connect:()=>HF,communicate_bluetooth_disconnect:()=>WF,communicate_bluetooth_handle:()=>jF,communicate_bluetooth_is_connected:()=>JF,communicate_bluetooth_mac:()=>KF,communicate_bluetooth_peripheral_init:()=>wF,communicate_bluetooth_recv:()=>zF,communicate_bluetooth_recv_only:()=>qF,communicate_bluetooth_scan:()=>kF,communicate_bluetooth_send:()=>QF,communicate_espnow_init:()=>$F,communicate_espnow_init_new:()=>ZF,communicate_i2c_available:()=>TF,communicate_i2c_init:()=>uF,communicate_i2c_master_read:()=>IF,communicate_i2c_onboard:()=>pF,communicate_i2c_read:()=>rF,communicate_i2c_scan:()=>dF,communicate_i2c_write:()=>lF,communicate_ir_recv_init:()=>PF,communicate_ir_send_init:()=>xF,communicate_ow_init:()=>AF,communicate_ow_read:()=>DF,communicate_ow_reset:()=>NF,communicate_ow_scan:()=>LF,communicate_ow_select:()=>FF,communicate_ow_write:()=>fF,communicate_spi_buffer:()=>EF,communicate_spi_init:()=>hF,communicate_spi_onboard:()=>aF,communicate_spi_read:()=>OF,communicate_spi_read_output:()=>RF,communicate_spi_readinto:()=>cF,communicate_spi_readinto_output:()=>gF,communicate_spi_set:()=>mF,communicate_spi_write:()=>CF,communicate_spi_write_readinto:()=>SF,espnow_radio_channel:()=>_P,espnow_radio_channel_new:()=>pP,espnow_radio_on_off:()=>aP,espnow_radio_rec:()=>rP,espnow_radio_recv:()=>dP,espnow_radio_recv_certain_msg:()=>IP,espnow_radio_recv_certain_msg_new:()=>MP,espnow_radio_recv_msg:()=>lP,espnow_radio_recv_new:()=>TP,espnow_radio_send:()=>uP,espnow_radio_txpower:()=>oP,i2c_slave_onreceive:()=>MF,internal_variable:()=>YF,ir_recv_timeout:()=>yF,ir_transmit_busy:()=>GF,ir_transmit_conventional_data:()=>bF,ir_transmit_raw_code:()=>BF,ir_transmit_study_code:()=>VF,ir_whether_recv:()=>XF,lora_init:()=>hP,lora_packet:()=>mP,lora_recv:()=>OP,lora_send:()=>EP,network_espnow_info:()=>tP,network_espnow_mac:()=>eP,network_espnow_recv:()=>iP,network_espnow_recv_handle:()=>sP,network_espnow_send:()=>nP,recv_fun:()=>vF,urequests_attribute:()=>cP,urequests_get:()=>RP,urequests_method:()=>gP});var ee={};e.r(ee),e.d(ee,{display_animate:()=>JP,display_circle:()=>QP,display_color_seclet:()=>_Y,display_draw_4strings:()=>GP,display_fill:()=>KP,display_lcd_use_i2c_init:()=>lY,display_line:()=>kP,display_line_arbitrarily:()=>UP,display_matrix_extern_bright_point:()=>vP,display_matrix_extern_bright_screen:()=>yP,display_matrix_extern_clear:()=>FP,display_matrix_extern_get_pixel:()=>YP,display_matrix_extern_get_screen_pixel:()=>XP,display_matrix_extern_image_builtins:()=>xP,display_matrix_extern_scroll_string:()=>DP,display_matrix_extern_scroll_string_delay:()=>fP,display_matrix_extern_shift:()=>PP,display_matrix_extern_show_frame_string:()=>LP,display_matrix_extern_show_frame_string_delay:()=>NP,display_matrix_extern_show_image:()=>SP,display_matrix_extern_show_image_or_string_delay:()=>AP,display_matrix_use_i2c_init:()=>CP,display_oled_drawPixel:()=>jP,display_oled_showBitmap:()=>zP,display_oled_use_i2c_init:()=>hY,display_onoff:()=>HP,display_rect:()=>wP,display_tm1650_power:()=>ZP,display_tm1650_set_brightness:()=>iY,display_tm1650_show_dot:()=>tY,display_tm1650_show_num:()=>eY,display_tm_use_i2c_init:()=>$P,display_triangle:()=>qP,display_use_i2c_init:()=>BP,extern_oled_bright_point:()=>DY,extern_oled_clear:()=>AY,extern_oled_get_pixel:()=>NY,extern_oled_hvline:()=>FY,extern_oled_line:()=>PY,extern_oled_scroll_string:()=>CY,extern_oled_scroll_string_delay:()=>SY,extern_oled_shape_rect:()=>fY,extern_oled_shift:()=>LY,extern_oled_show_frame_string:()=>cY,extern_oled_show_frame_string_delay:()=>gY,extern_oled_show_image:()=>mY,extern_oled_show_image_or_string_delay:()=>RY,extern_oled_show_image_xy:()=>EY,extern_oled_show_string:()=>OY,image_shift:()=>WP,lcd_backlight:()=>TY,lcd_clear:()=>MY,lcd_print_string:()=>IY,lcd_show_image_or_string_delay:()=>dY,matrix_extern_image_arithmetic:()=>bP,matrix_extern_image_invert:()=>VP,tft_fill:()=>uY,tft_line_arbitrarily:()=>rY,tft_scroll_string_delay:()=>aY,tft_show_frame_string_delay:()=>pY,tft_show_image_or_string_delay:()=>oY,tft_show_image_xy:()=>sY,tft_use_spi_init:()=>nY});var te={};e.r(te),e.d(te,{bitbot_display_bitmap_create:()=>Cv,bitbot_display_image_create:()=>gv,display_available:()=>HY,display_bitmap_create:()=>wY,display_bright_point:()=>qY,display_bright_screen:()=>jY,display_clear:()=>kY,display_get_pixel:()=>QY,display_get_screen_pixel:()=>zY,display_image_builtins:()=>BY,display_image_builtins_all:()=>GY,display_image_create:()=>UY,display_scroll_string:()=>xY,display_scroll_string_delay:()=>bY,display_shift:()=>JY,display_show_frame_string:()=>XY,display_show_frame_string_delay:()=>yY,display_show_image:()=>YY,display_show_image_or_string_delay:()=>vY,draw_pointer:()=>Gv,image_arithmetic:()=>WY,image_invert:()=>KY,mixbot_display_bitmap_create:()=>mv,mixbot_display_bright_screen:()=>Rv,mixbot_display_get_ambientbright:()=>Ov,mixbot_display_get_screen_pixel:()=>Ev,mixbot_display_image_create:()=>hv,mixbot_display_rotate:()=>cv,mixgo_display_bitmap_create:()=>sv,mixgo_display_image_create_new:()=>nv,mixgome_display_bitmap_create:()=>ZY,mixgome_display_font:()=>iv,mixgome_display_image_create:()=>$Y,mixgomini_display_bitmap_create:()=>tv,mixgomini_display_image_create:()=>ev,mpython_display_hvline:()=>Tv,mpython_display_line:()=>Mv,mpython_display_shape_rect:()=>Iv,mpython_pbm_image:()=>_v,nova_draw_pointer:()=>Uv,onboard_oled_bright_point:()=>dv,onboard_oled_scroll_string_delay:()=>lv,onboard_oled_show_frame_string_delay:()=>rv,onboard_oled_show_image:()=>ov,onboard_oled_show_image_or_string_delay:()=>uv,onboard_oled_show_image_xy:()=>pv,onboard_oled_show_string:()=>av,onboard_tft_bright_point:()=>Yv,onboard_tft_bright_screen:()=>Jv,onboard_tft_clear:()=>Qv,onboard_tft_clock_clear:()=>Vv,onboard_tft_clock_draw:()=>bv,onboard_tft_clock_get_rtctime:()=>yv,onboard_tft_clock_init:()=>Xv,onboard_tft_clock_set_time:()=>xv,onboard_tft_display_hvline:()=>fv,onboard_tft_display_line:()=>Fv,onboard_tft_display_shape_circle:()=>Bv,onboard_tft_display_shape_rect:()=>Dv,onboard_tft_fill:()=>vv,onboard_tft_get_pixel:()=>Pv,onboard_tft_get_screen_pixel:()=>Kv,onboard_tft_scroll_string_delay:()=>VY,onboard_tft_shift:()=>Wv,onboard_tft_show_frame_string:()=>Hv,onboard_tft_show_frame_string_delay:()=>Nv,onboard_tft_show_image:()=>kv,onboard_tft_show_image_or_string_delay:()=>Lv,onboard_tft_show_image_xy:()=>Sv,onboard_tft_show_image_xy_direct:()=>Av,onboard_tft_show_texts:()=>wv});var ie={};e.r(ie),e.d(ie,{factory_block:()=>iX,factory_block_return:()=>nX,factory_block_return_with_textarea:()=>_X,factory_block_with_textarea:()=>sX,factory_callMethod_noreturn:()=>eX,factory_callMethod_return:()=>tX,factory_declare:()=>Zv,factory_from_import:()=>qv,factory_function_noreturn:()=>jv,factory_function_return:()=>$v,factory_import:()=>zv,folding_block:()=>oX});var ne={};e.r(ne),e.d(ne,{inout_analog_atten:()=>cX,inout_analog_read:()=>TX,inout_analog_read_init:()=>RX,inout_analog_write:()=>lX,inout_analog_write_init:()=>OX,inout_analog_write_set:()=>dX,inout_digital_init:()=>mX,inout_digital_read:()=>uX,inout_digital_write:()=>aX,inout_highlow:()=>pX,inout_pin_attachInterrupt:()=>hX,inout_pin_pressed:()=>MX,inout_pin_pressed_init:()=>gX,inout_pwm_analog_write:()=>rX,inout_pwm_analog_write_init:()=>EX,inout_pwm_analog_write_set_freq:()=>IX});var se={};e.r(se),e.d(se,{IOT_CONNECT_OLLAMA:()=>zX,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>UX,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>BX,IOT_EMQX_PING:()=>wX,IOT_FORMATTING:()=>bX,IOT_FORMAT_STRING:()=>VX,IOT_MIXIO_NTP:()=>kX,IOT_MIXIO_PUBLISH:()=>FX,IOT_MIXIO_SUBSCRIBE:()=>PX,iot_client_onboard:()=>HX,iot_connect_ollama:()=>qX,iot_connect_openai:()=>jX,iot_http_client:()=>WX,iot_http_data:()=>KX,iot_mixio_check:()=>XX,iot_mixio_connect:()=>fX,iot_mixio_connect_only:()=>vX,iot_mixio_disconnect:()=>YX,iot_mixio_format_msg:()=>xX,iot_mixio_format_topic:()=>yX,iot_mixly_key:()=>GX,iot_mqtt_client:()=>JX,iot_mqtt_data:()=>QX,iot_onenet_check:()=>NX,iot_onenet_connect:()=>SX,iot_onenet_disconnect:()=>AX,iot_onenet_publish:()=>DX,iot_onenet_publish_dict:()=>LX,iot_wifi_connect:()=>CX,ollama_empty_history:()=>ey,use_ollama_llm_to_chat:()=>$X,use_ollama_llm_to_chat_return:()=>ZX});var _e={};e.r(_e),e.d(_e,{educore_mqtt_connect:()=>Py,educore_mqtt_connect_success:()=>yy,educore_mqtt_subscribe_message:()=>Yy,educore_mqtt_topic_publish:()=>Xy,educore_mqtt_topic_subscribe:()=>vy,educore_wifi_connect:()=>Fy,network_ap_connect:()=>uy,network_connect:()=>iy,network_get_connect:()=>sy,network_get_wifi:()=>ay,network_init:()=>ty,network_is_active:()=>py,network_open:()=>oy,network_scan:()=>ry,network_server:()=>ly,network_socket_accept:()=>hy,network_socket_bind:()=>Iy,network_socket_close:()=>cy,network_socket_connect:()=>Ty,network_socket_init:()=>dy,network_socket_listen:()=>My,network_socket_receive:()=>my,network_socket_receive_from:()=>Oy,network_socket_send:()=>Ey,network_socket_send_to:()=>Ry,network_stop:()=>_y,network_wifi_connect:()=>ny,ntptime_address:()=>Ly,ntptime_time:()=>Ay,requests_attribute:()=>Cy,requests_attribute2:()=>Dy,requests_get:()=>gy,requests_get2:()=>Ny,requests_method:()=>Sy,requests_post:()=>fy});var oe={};e.r(oe),e.d(oe,{get_potential_num:()=>xy,nova_g1_motor:()=>by,nova_g1_spk_en:()=>By,nova_g1_usb:()=>Vy});var pe={};e.r(pe),e.d(pe,{pe_g1_battery_left:()=>Uy,pe_g1_dc_motor:()=>wy,pe_g1_dc_motor_speed:()=>ky,pe_g1_servo_get_angle:()=>Ky,pe_g1_servo_get_speed:()=>Jy,pe_g1_servo_set_angle:()=>Hy,pe_g1_servo_set_speed:()=>Wy,pe_g1_use_i2c_init:()=>Gy});var ae={};e.r(ae),e.d(ae,{CI130X_BROADCAST:()=>hx,CI130X_GET_THE_RECOGNIZED_CMD:()=>Mx,CI130X_GET_WHETHER_IDENTIFY:()=>Tx,CI130X_IDENTIFY_AND_SAVE:()=>Ix,CI130X_SET_SYSTEM_CMD:()=>mx,HCSR04:()=>qx,PS2_Button:()=>$x,PS2_Buttons:()=>Zx,PS2_Buttons_new:()=>pb,PS2_State:()=>eb,PS2_init:()=>zx,PS2_init_new:()=>_b,PS2_stk:()=>tb,PS2_stk_new:()=>ab,PS2_vibration:()=>jx,PS2_vibration_new:()=>ob,RTC_get_time:()=>nb,RTC_set_date:()=>tx,RTC_set_datetime:()=>ib,RTC_set_time:()=>ex,camera_sensor_init:()=>Bb,camera_sensor_result:()=>Gb,column_tube_foot:()=>Hb,define_keyboards:()=>Wb,educore_body_sensor:()=>fb,educore_button_sensor_extern:()=>vb,educore_camera_sensor:()=>Vb,educore_infrared_sensor:()=>Yb,educore_soilhum_sensor:()=>Fb,educore_temp_sensor:()=>bb,educore_temphum_sensor:()=>Pb,educore_ultrasonic_sensor:()=>yb,esp32_s2_weather_init:()=>Wx,esp32_s2_weather_rain:()=>Jx,esp32_s2_weather_wd:()=>Kx,esp32_s2_weather_ws:()=>Qx,extern_rfid_read:()=>vx,extern_rfid_readcontent:()=>yx,extern_rfid_readid:()=>Xx,extern_rfid_status:()=>Vx,extern_rfid_write:()=>xx,extern_rfid_write_return:()=>bx,get_keboards_value:()=>Jb,gnss_get_data:()=>lb,gnss_have_data:()=>db,init_matrix_keyboard:()=>Kb,interaction_whether_to_interaction:()=>lx,interaction_whether_to_interaction_SANT:()=>dx,line_tube_foot:()=>kb,mixbot_sensor_extern_get_addr:()=>gb,mixbot_sensor_extern_set_addr:()=>Cb,pm25_get_data:()=>rb,radar_set_DETECTION_THRESHOLD:()=>ux,radar_set_DETECTION_THRESHOLD_SANT:()=>rx,robot_button_extern_get_value:()=>Tb,robot_color_extern_get_value:()=>Ob,robot_infrared_extern_get_value:()=>hb,robot_infrared_extern_grey_get_value:()=>mb,robot_potentiometer_extern_get_value:()=>Eb,robot_sonar_extern_get_value:()=>Rb,robot_sonar_extern_led:()=>cb,robot_touch_extern_get_value:()=>Mb,sensor_APDS9960_extern:()=>Ox,sensor_DS18X20:()=>Db,sensor_LTR308_extern:()=>Rx,sensor_LTR390UV_extern:()=>Nx,sensor_MAX30102_extern:()=>Ex,sensor_QMC5883L_extern:()=>Dx,sensor_VL530LX_extern:()=>Px,sensor_aht11_extern:()=>Fx,sensor_bmp:()=>ox,sensor_dht11:()=>sb,sensor_distance_hrsc04:()=>Zy,sensor_hp203_extern:()=>cx,sensor_ltr381_extern:()=>Ax,sensor_mixgo_extern_button_attachInterrupt:()=>jy,sensor_mixgo_extern_button_get_presses:()=>zy,sensor_mixgo_extern_button_is_pressed:()=>Qy,sensor_mixgo_extern_button_was_pressed:()=>qy,sensor_mixgo_extern_light:()=>ix,sensor_mixgo_extern_pin_near:()=>sx,sensor_mixgo_extern_sound:()=>nx,sensor_mixgoce_hot_wheel_degrees:()=>Hx,sensor_mixgoce_hot_wheel_is_touched:()=>kx,sensor_mpu9250_attachGestureInterrupt:()=>$y,sensor_ms5611_extern:()=>Cx,sensor_ms5611_extern_altitude:()=>Sx,sensor_read_humiture:()=>Xb,sensor_rtc_init:()=>_x,sensor_sht:()=>px,sensor_shtc3_extern:()=>fx,sensor_spl06_001_extern:()=>gx,sensor_ucs12071_extern:()=>Lx,sensor_use_i2c_init:()=>ax,sensor_use_spi_init:()=>Yx,sensor_use_uart_init:()=>ub,sensor_weather_solo_init:()=>Sb,sensor_weather_solo_rain:()=>Nb,sensor_weather_solo_wd:()=>Ab,sensor_weather_solo_ws:()=>Lb,sensor_weigh_init:()=>Ub,tvoc_get_data:()=>Ib,ultrasonic_sensor_read_distance:()=>xb,weather_data:()=>Bx,weather_have_data:()=>Gx,weather_set_label:()=>wx,weather_uart_mixio:()=>Ux,weigh_sensor_get_weight:()=>wb});var ue={};e.r(ue),e.d(ue,{HCSR04:()=>iV,bitbot_als_num:()=>SB,dht11:()=>YB,educore_button_sensor:()=>BB,educore_button_was_pressed:()=>GB,educore_gyroscope_sensor:()=>xB,educore_gyroscope_sensor_read:()=>bB,educore_gyroscope_sensor_shake:()=>VB,educore_light_sensor:()=>yB,educore_rfid_sensor:()=>UB,educore_rfid_sensor_scan:()=>wB,educore_rfid_sensor_scan_data:()=>kB,educore_voice_sensor:()=>vB,number1:()=>nV,number2:()=>sV,number3:()=>_V,number4:()=>oV,number5:()=>pV,number6:()=>aV,number7:()=>uV,onboard_RTC_get_time:()=>eB,onboard_RTC_get_time_str:()=>nB,onboard_RTC_get_timestamp:()=>tB,onboard_RTC_get_timetuple_to_str:()=>sB,onboard_RTC_set_datetime:()=>$V,onboard_RTC_settime_string:()=>ZV,onboard_RTC_timestamp_totuple:()=>iB,rfid_readcontent:()=>AV,rfid_readid:()=>SV,rfid_status:()=>DV,rfid_write:()=>LV,rfid_write_return:()=>NV,sensor_LTR308:()=>OV,sensor_adxl345_get_acceleration:()=>bV,sensor_aht11:()=>gV,sensor_bitbot_ALS:()=>CB,sensor_button_get_presses:()=>NB,sensor_button_is_pressed:()=>AB,sensor_button_was_pressed:()=>LB,sensor_compass_reset:()=>kV,sensor_ds18x20:()=>mV,sensor_eulerangles:()=>FV,sensor_get_acceleration:()=>fV,sensor_get_temperature:()=>CV,sensor_get_the_coprocessor_version:()=>HB,sensor_hp203:()=>cV,sensor_light:()=>PB,sensor_lm35:()=>EV,sensor_mixbot_get_gyro:()=>gB,sensor_mixbot_patrol_calibrate:()=>OB,sensor_mixbot_patrol_value:()=>RB,sensor_mixbot_temperature:()=>cB,sensor_mixgo_LTR308:()=>TV,sensor_mixgo_button_attachInterrupt:()=>jb,sensor_mixgo_button_get_presses:()=>zb,sensor_mixgo_button_is_pressed:()=>Qb,sensor_mixgo_button_was_pressed:()=>qb,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>pB,sensor_mixgo_cc_mmc5603_get_angle:()=>oB,sensor_mixgo_cc_mmc5603_get_magnetic:()=>_B,sensor_mixgo_light:()=>FB,sensor_mixgo_nova_LTR308:()=>hV,sensor_mixgo_nova_pin_near:()=>IV,sensor_mixgo_pin_near:()=>dV,sensor_mixgo_pin_near_double:()=>lV,sensor_mixgo_pin_near_single:()=>rV,sensor_mixgo_pin_pressed:()=>yV,sensor_mixgo_sant_color:()=>MV,sensor_mixgo_touch_slide:()=>XV,sensor_mixgocar42_button_attachInterrupt:()=>tV,sensor_mixgocar42_button_get_presses:()=>eV,sensor_mixgocar42_button_is_pressed:()=>$b,sensor_mixgocar42_button_was_pressed:()=>Zb,sensor_mixgocar_battery_left:()=>EB,sensor_mixgocar_pin_near:()=>hB,sensor_mixgocar_pin_near_line:()=>MB,sensor_mixgocar_pin_near_state_change:()=>mB,sensor_mixgoce_pin_pressed:()=>vV,sensor_mixgoce_temperature:()=>uB,sensor_mixgome_temperature:()=>aB,sensor_mpu9250_calibrate_compass:()=>GV,sensor_mpu9250_field_strength:()=>wV,sensor_mpu9250_gesture:()=>PV,sensor_mpu9250_get_acceleration:()=>YV,sensor_mpu9250_get_gyro:()=>BV,sensor_mpu9250_get_magnetic:()=>VV,sensor_mpu9250_temperature:()=>UV,sensor_mpython_pin_pressed:()=>xV,sensor_mpython_qmi8658_get_gyro:()=>rB,sensor_mpython_qmi8658_temperature:()=>lB,sensor_onboard_compass_reset:()=>jV,sensor_onboard_mpu9250_calibrate_compass:()=>QV,sensor_onboard_mpu9250_field_strength:()=>zV,sensor_onboard_mpu9250_gesture:()=>HV,sensor_onboard_mpu9250_get_acceleration:()=>WV,sensor_onboard_mpu9250_get_gyro:()=>JV,sensor_onboard_mpu9250_get_magnetic:()=>KV,sensor_onboard_mpu9250_temperature:()=>qV,sensor_pin_near:()=>fB,sensor_pin_pressed:()=>DB,sensor_read:()=>XB,sensor_rm_acc:()=>TB,sensor_rm_battery_left:()=>IB,sensor_rm_pin_near_double:()=>dB,sensor_sound:()=>RV});var re={};e.r(re),e.d(re,{serial_any:()=>qB,serial_print:()=>WB,serial_print_byte:()=>KB,serial_print_hex:()=>QB,serial_println:()=>JB,serial_read_from_ai:()=>oG,serial_readline:()=>jB,serial_readstr:()=>zB,serial_send_to_ai:()=>_G,serial_softserial:()=>$B,serial_softserial_new:()=>ZB,system_input:()=>eG,system_print:()=>tG,system_print_end:()=>nG,system_print_inline:()=>iG,system_print_many:()=>sG});var le={};e.r(le),e.d(le,{Panic_with_status_code:()=>EG,Timer_init:()=>vG,base_delay:()=>xG,controls_delay:()=>CG,controls_delay_new:()=>SG,controls_end_program:()=>RG,controls_millis:()=>OG,controls_uname:()=>gG,reset:()=>cG,system_bitbot_shutdown:()=>YG,system_device_name:()=>hG,system_device_serial_number:()=>mG,system_event_bus_source:()=>TG,system_event_bus_value:()=>MG,system_machine_reset:()=>PG,system_on_event:()=>lG,system_raise_event:()=>rG,system_reset:()=>aG,system_run_in_background:()=>pG,system_ticks_diff:()=>NG,system_timer:()=>LG,system_timer_init:()=>DG,system_timestamp:()=>dG,system_value:()=>IG,system_wait:()=>uG,system_wdt_feed:()=>FG,system_wdt_init:()=>fG,time_ticks_diff:()=>yG,timer:()=>AG,timer2:()=>XG});var de={};e.r(de),e.d(de,{Air_daily_content:()=>qG,Air_now_content:()=>wG,Geo_moon_content:()=>jG,Geo_sun_content:()=>zG,Life_suggestion_content:()=>HG,Location_search_content:()=>KG,Tide_daily_content:()=>WG,WEATHER_DAILY:()=>VG,WEATHER_HOUR:()=>BG,WEATHER_NOW:()=>bG,Weather_alarm_content:()=>kG,Weather_daily:()=>JG,Weather_daily_content:()=>QG,Weather_now:()=>GG,Weather_now_content:()=>UG});var Ie={};e.r(Ie),e.d(Ie,{controls_pin_attachInterrupt:()=>mU,inout_analog_atten:()=>pU,inout_analog_write:()=>_U,inout_analog_write_init:()=>lU,inout_analog_write_set:()=>oU,inout_analog_write_set_freq:()=>IU,inout_digital_init:()=>rU,inout_digital_read:()=>sU,inout_digital_write:()=>nU,inout_highlow:()=>iU,inout_pinMode:()=>TU,inout_pin_attachInterrupt:()=>uU,inout_pin_pressed:()=>aU,inout_pin_pressed_init:()=>dU,pin_pressed:()=>hU,pin_pressed_init:()=>MU});var Te={};e.r(Te),e.d(Te,{analog_input:()=>LU,analog_output:()=>DU,espnow_channel:()=>CU,haskylens_model:()=>SU,i2c_A_pin:()=>fU,i2c_B_pin:()=>FU,pins_analog:()=>yU,pins_analog_pin:()=>xU,pins_axis:()=>ZU,pins_brightness:()=>ew,pins_builtinimg:()=>KU,pins_builtinimg_extern:()=>JU,pins_button:()=>BU,pins_buttonB:()=>GU,pins_dac:()=>bU,pins_dac_pin:()=>VU,pins_digital:()=>OU,pins_digital_dot:()=>aw,pins_digital_pin:()=>RU,pins_exlcdh:()=>jU,pins_exlcdv:()=>$U,pins_imglist:()=>QU,pins_input_pin:()=>cU,pins_one_more:()=>pw,pins_output_pin:()=>gU,pins_playlist:()=>qU,pins_playlist_extern:()=>zU,pins_pwm:()=>UU,pins_pwm_pin:()=>wU,pins_radio_datarate:()=>ow,pins_radio_power:()=>_w,pins_serial:()=>WU,pins_tone_notes:()=>sw,pins_touch:()=>HU,pins_touch_pin:()=>kU,pins_tts_bgmusic:()=>nw,pins_tts_builtin_music:()=>iw,pins_tts_voice:()=>tw,pwm_input:()=>AU,pwm_output:()=>NU,spi_A_pin:()=>PU,spi_B_pin:()=>YU,spi_C_pin:()=>vU,spi_D_pin:()=>XU});var Me={};e.r(Me),e.d(Me,{mini_g2_rfid_readcontent:()=>rw,mini_g2_rfid_readid:()=>uw,mini_g2_rfid_status:()=>Iw,mini_g2_rfid_write:()=>lw,mini_g2_rfid_write_outcome:()=>dw});var he={};e.r(he),e.d(he,{inout_analog_atten:()=>Cw,inout_analog_write:()=>mw,inout_analog_write_init:()=>gw,inout_analog_write_set:()=>Ew,inout_digital_init:()=>cw,inout_digital_read:()=>hw,inout_digital_write:()=>Mw,inout_highlow:()=>Tw,inout_pin_attachInterrupt:()=>Rw,inout_pin_pressed:()=>Ow,inout_pin_pressed_init:()=>Sw});var me={};e.r(me),e.d(me,{analog_input:()=>Xw,analog_output:()=>xw,espnow_channel:()=>Yw,haskylens_model:()=>vw,i2c_A_pin:()=>bw,i2c_B_pin:()=>Vw,pins_analog:()=>Hw,pins_analog_pin:()=>kw,pins_axis:()=>nk,pins_brightness:()=>ok,pins_builtinimg:()=>Mk,pins_builtinimg_extern:()=>Zw,pins_button:()=>Lw,pins_buttonB:()=>Nw,pins_dac:()=>Qw,pins_dac_pin:()=>Jw,pins_digital:()=>Aw,pins_digital_dot:()=>Tk,pins_digital_pin:()=>Dw,pins_exlcdh:()=>sk,pins_exlcdv:()=>_k,pins_imglist:()=>ek,pins_input_pin:()=>fw,pins_interrupt:()=>jw,pins_one_more:()=>Ik,pins_output_pin:()=>Fw,pins_playlist:()=>tk,pins_playlist_extern:()=>ik,pins_pwm:()=>Kw,pins_pwm_input:()=>Pw,pins_pwm_pin:()=>Ww,pins_radio_datarate:()=>dk,pins_radio_power:()=>lk,pins_serial:()=>$w,pins_tone_notes:()=>rk,pins_touch:()=>zw,pins_touch_pin:()=>qw,pins_tts_bgmusic:()=>uk,pins_tts_builtin_music:()=>ak,pins_tts_voice:()=>pk,pwm_output:()=>yw,spi_A_pin:()=>Bw,spi_B_pin:()=>Gw,spi_C_pin:()=>Uw,spi_D_pin:()=>ww});var Ee={};e.r(Ee),e.d(Ee,{mini_g2_rfid_readcontent:()=>mk,mini_g2_rfid_readid:()=>hk,mini_g2_rfid_status:()=>Rk,mini_g2_rfid_write:()=>Ek,mini_g2_rfid_write_outcome:()=>Ok});const Oe=Blockly,Re=Mixly,ce={NAME_TYPE:"VARIABLE",allVariables:function(e){var t;if(e.getDescendants)t=e.getDescendants();else{if(!e.getAllBlocks)throw"Not Block or Workspace: "+e;t=e.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(o+=n)):i=o}else i="i";return i}},ge=ce; +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class Ce{constructor(e,t){if(this.variablePrefix_=t||"",this.reservedDict_=Object.create(null),e)for(var i=e.split(","),n=0;n0;s--)t.getInputTargetBlock("IF"+s)&&t.getInputTargetBlock("IF"+s).previousConnection?i[s]=t.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),t.getInputTargetBlock("DO"+s)&&t.getInputTargetBlock("DO"+s).previousConnection?n[s]=t.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(e.getAttribute("elseif"),10),this.elseCount_=parseInt(e.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Oe.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Oe.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Oe.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(e){var t=e.newBlock("controls_if_if");t.initSvg();for(var i=t.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=e.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=e.newBlock("controls_if_else");_.initSvg(),i.connect(_.previousConnection)}return t},compose:function(e){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var t=this.elseifCount_;t>0;t--)this.removeInput("IF"+t),this.removeInput("DO"+t);this.elseifCount_=0;for(var i=e.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(e){for(var t=e.getInputTargetBlock("STACK"),i=1;t;){switch(t.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);t.valueConnection_=n&&n.connection.targetConnection,t.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");t.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}t=t.nextConnection&&t.nextConnection.targetBlock()}},rebuildShape_:function(){var e=[null],t=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),e.push(s.connection.targetConnection),t.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(e,t,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var e=1;this.getInput("IF"+e);)this.removeInput("IF"+e),this.removeInput("DO"+e),e++;for(e=1;e<=this.elseifCount_;e++)this.appendValueInput("IF"+e).setCheck([Number,Boolean]).appendField(Oe.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+e).appendField(Oe.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Oe.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(e,t,i){for(var n=1;n<=this.elseifCount_;n++)e[n]&&e[n].reconnect(this,"IF"+n),t[n]&&t[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},we={init:function(){this.setColour(xe),this.appendValueInput("FROM").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.PYTHON_RANGE).appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Oe.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},ke={init:function(){this.setColour(xe),this.appendValueInput("LIST").setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Oe.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Oe.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Oe.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},He={init:function(){this.setColour(xe),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Oe.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Oe.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Oe.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Oe.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return{WHILE:Oe.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Oe.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[t]}))}},We={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Oe.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Oe.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Oe.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var e=document.createElement("mutation");return this.elseifCount_&&e.setAttribute("elseif",this.elseifCount_),this.elseCount_&&e.setAttribute("else",1),e},domToMutation:function(e){var t=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)t.getInputTargetBlock("IF"+s)&&t.getInputTargetBlock("IF"+s).previousConnection?i[s]=t.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),t.getInputTargetBlock("DO"+s)&&t.getInputTargetBlock("DO"+s).previousConnection?n[s]=t.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(e.getAttribute("elseif"),10),this.elseCount_=parseInt(e.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Oe.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Oe.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(e){var t=e.newBlock("controls_try");t.initSvg();for(var i=t.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=e.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var _=e.newBlock("controls_finally");_.initSvg(),i.connect(_.previousConnection)}return t},compose:function(e){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var t=this.elseifCount_;t>0;t--)this.removeInput("IF"+t),this.removeInput("DO"+t);this.elseifCount_=0;for(var i=e.getInputTargetBlock("STACK"),n=[null],s=[null],_=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,_=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,_)},saveConnections:function(e){for(var t=e.getInputTargetBlock("STACK"),i=1;t;){switch(t.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);t.valueConnection_=n&&n.connection.targetConnection,t.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");t.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}t=t.nextConnection&&t.nextConnection.targetBlock()}},rebuildShape_:function(){var e=[null],t=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),_=this.getInput("DO"+n);console.log(s.connection.targetConnection),e.push(s.connection.targetConnection),t.push(_.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(e,t,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var e=1;this.getInput("IF"+e);)this.removeInput("IF"+e),this.removeInput("DO"+e),e++;for(e=1;e<=this.elseifCount_;e++)this.appendValueInput("IF"+e).setCheck([Number,Boolean]).appendField(Oe.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+e).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Oe.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(e,t,i){for(var n=1;n<=this.elseifCount_;n++)e[n]&&e[n].reconnect(this,"IF"+n),t[n]&&t[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Ke={init:function(){this.setColour(xe);var e=new Oe.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(e,"FLOW").appendField(Oe.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Oe.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var t=this;this.setTooltip((function(){var e=t.getFieldValue("FLOW");return{BREAK:Oe.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Oe.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[e]}))},onchange:function(){if(this.workspace){var e=!1,t=this;do{if("controls_repeat"==t.type||"controls_for"==t.type||"controls_forEach"==t.type||"controls_repeat_ext"==t.type||"controls_whileUntil"==t.type||"do_while"==t.type){e=!0;break}t=t.getSurroundParent()}while(t);e?this.setWarningText(null):this.setWarningText(Oe.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Je={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Oe.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Oe.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){return Oe.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",e.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},Qe={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Oe.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Oe.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){return Oe.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",e.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}};He.OPERATORS=[[Oe.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Oe.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Ke.OPERATORS=[[Oe.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Oe.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const qe={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Oe.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},ze={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},je={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Oe.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},$e={init:function(){this.setColour(xe),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},Ze={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Oe.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},et={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Oe.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},tt={init:function(){this.jsonInit({message0:Oe.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:xe,tooltip:Oe.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Oe.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},it={init:function(){this.setColour(xe),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Oe.Msg.MIXLY_STAT),this.setOutput(!0)}},nt={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},st={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Oe.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},_t={init:function(){this.appendDummyInput().appendField(Oe.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Oe.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Oe.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Oe.FieldDropdown([[Oe.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Oe.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(xe),this.setTooltip("do-while loop"),this.setHelpUrl("")}},ot={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pt={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},at={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},ut={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Oe.Msg.PROCEDURES_DEFRETURN_RETURN+Oe.Msg.MIXLY_GET_UNIQUE_IDEN)}},rt={init:function(){this.setColour(xe),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Oe.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},lt={init:function(){this.setColour(xe),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},dt=230;Oe.FieldTextInput.math_number_validator=function(e){return String(e)},Oe.FieldTextInput.math_number_validator_include_blank=function(e){if(""===e)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(e)?String(e):null};const It={init:function(){this.setColour(dt),this.appendDummyInput().appendField(new Oe.FieldTextInput("0",Oe.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MATH_NUMBER_TOOLTIP)}},Tt={init:function(){this.setColour(dt);this.appendDummyInput("").appendField(Oe.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Oe.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CONSTANT");return{pi:Oe.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Oe.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[t]}))}},Mt={init:function(){this.setColour(dt);this.appendDummyInput("").appendField(Oe.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Oe.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CONSTANT");return{pi:Oe.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Oe.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[t]}))}},ht={init:function(){this.setColour(dt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Oe.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{ADD:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Oe.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[t]}))}},mt={init:function(){this.setColour(dt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Oe.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{ADD:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Oe.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Oe.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[t]}))}},Et={init:function(){this.setColour(dt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Oe.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Ot={init:function(){this.setColour(dt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Oe.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{SIN:Oe.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Oe.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Oe.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Oe.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Oe.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Oe.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Oe.Msg.MATH_SINGLE_TOOLTIP_LN}[t]}))}},Rt={init:function(){var e=[[Oe.Msg.MATH_BIN,"bin"],[Oe.Msg.MATH_OCT,"oct"],[Oe.Msg.MATH_HEX,"hex"]];this.setColour(dt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Oe.FieldDropdown(e),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{bin:Oe.Msg.MATH_DEC_TOOLTIP_BIN,oct:Oe.Msg.MATH_DEC_TOOLTIP_OCT,hex:Oe.Msg.MATH_DEC_TOOLTIP_HEX}[e]}))}},ct={init:function(){var e=[[Oe.Msg.LANG_MATH_TO_ROUND,"round"],[Oe.Msg.LANG_MATH_TO_CEIL,"ceil"],[Oe.Msg.LANG_MATH_TO_FLOOR,"floor"],[Oe.Msg.MATH_ABS,"fabs"],[Oe.Msg.MATH_SQRT,"sqrt"]];this.setColour(dt),this.appendValueInput("A").setCheck(Number).appendField(new Oe.FieldDropdown(e),"OP"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{sqrt:Oe.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Oe.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Oe.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Oe.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Oe.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Oe.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[e]}))}},gt={init:function(){var e=[[Oe.Msg.MIXLY_MAX,"max"],[Oe.Msg.MIXLY_MIN,"min"]];this.setColour(dt),this.appendValueInput("A").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(new Oe.FieldDropdown(e),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Oe.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{max:Oe.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Oe.Msg.MIXLY_TOOLTIP_MATH_MIN}[e]}))}},Ct={init:function(){var e=[[Oe.Msg.MATH_TWO,"two"],[Oe.Msg.MATH_EIGHT,"eight"],[Oe.Msg.MATH_TEN,"ten"],[Oe.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(dt),this.appendDummyInput("").appendField(Oe.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Oe.FieldDropdown(e),"OP").appendField(Oe.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.MATH_ZHW).appendField(new Oe.FieldDropdown(e),"OP2").appendField(Oe.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i={two:Oe.Msg.MATH_Before_two,eight:Oe.Msg.MATH_Before_eight,ten:Oe.Msg.MATH_Before_ten,sixteen:Oe.Msg.MATH_Before_sixteen},n=t.getFieldValue("OP2"),s={two:Oe.Msg.MATH_Behind_two,eight:Oe.Msg.MATH_Behind_eight,ten:Oe.Msg.MATH_Behind_ten,sixteen:Oe.Msg.MATH_Behind_sixteen};return i[e]+s[n]}))}},St={init:function(){var e=[[Oe.Msg.LANG_MATH_INT,"int"],[Oe.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(dt),this.setOutput(!0,Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Oe.FieldDropdown(e),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Oe.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TYPE"),i={int:Oe.Msg.LANG_MATH_INT,float:Oe.Msg.LANG_MATH_FLOAT_RANDOM};return Oe.Msg.MATH_RANDOM_INT_TOOLTIP+i[e]}))}},At={init:function(){this.setColour(dt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Oe.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Oe.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Oe.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MATH_CONSTRAIN_TOOLTIP)}},Lt={init:function(){this.setColour(dt),this.appendValueInput("NUM",Number).appendField(Oe.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Oe.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Oe.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Nt={init:function(){this.setColour(dt),this.appendDummyInput().appendField(new Oe.FieldTextInput("0",Oe.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Oe.Msg.MATH_NUMBER_TOOLTIP)}},Dt={init:function(){this.setColour(dt),this.appendValueInput("NUM").setCheck(Number).appendField(Oe.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},ft={init:function(){this.setColour(dt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Oe.Msg.MATH_ROUND).appendField(Oe.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Oe.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MATH_ROUND_NEW_TOOLTIP)}},Ft={init:function(){var e=[[Oe.Msg.MIXLY_TO_INT,"int"],[Oe.Msg.MIXLY_TO_FLOAT,"float"],[Oe.Msg.MIXLY_TO_BITES,"b"],[Oe.Msg.LANG_MATH_BYTE+Oe.Msg.MIXLY_TO_INT,"bti"]];this.setColour(dt),this.appendValueInput("VAR").appendField(new Oe.FieldDropdown(e),"TOWHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{int:Oe.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Oe.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Oe.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[e]}))}},Pt={init:function(){var e=[[Oe.Msg.MIXLY_TO_INT,"int"],[Oe.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(dt),this.appendValueInput("VAR").appendField(new Oe.FieldDropdown(e),"TOWHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{int:Oe.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Oe.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[e]}))}},Yt=Lt,vt={init:function(){this.setColour(dt),this.appendValueInput("VAR").appendField(Oe.Msg.LANG_MATH_BYTE+Oe.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},Xt={init:function(){this.setColour(dt),this.itemCount_=1,this.setMutator(new Oe.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(Oe.Msg.MIXLY_PRODUCT+Oe.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(Oe.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(Oe.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(Oe.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("lists_create_with_container");t.initSvg();for(var i=t.getInput("STACK").connection,n=0;n1&&"\\"===e.charAt(0)){var t=e.charAt(1);if("0"===t||"b"===t||"f"===t||"n"===t||"r"===t||"t"===t||"\\"===t||"'"===t)return String(e).substring(0,2);if("x"===t&&"0"===e.charAt(2)&&"B"===e.charAt(3))return String(e).substring(0,4)}return String(e).substring(0,1)};const Gt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Oe.FieldTextInput("",Oe.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(e){if(1==e)var t="../../media/quote2.png";else t="../../media/quote3.png";return new Oe.FieldImage(t,7,12,'"')}},Ut={init:function(){this.setColour(bt),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Oe.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},wt={init:function(){this.setColour(bt),this.appendValueInput("VAR").setCheck(Number).appendField(Oe.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},kt={init:function(){this.setColour(bt),this.appendValueInput("VAR").setCheck(String).appendField(Oe.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Ht={init:function(){this.setColour(bt),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Wt={init:function(){this.setColour(bt),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Kt={init:function(){this.WHERE_OPTIONS=[[Oe.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Oe.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Oe.Msg.TEXT_GET_INDEX_RANDOM+1+Oe.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Oe.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(bt),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.LISTS_GET_INDEX_GET,"MODE"),Oe.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Oe.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),i=e.getFieldValue("WHERE"),n="";switch(t+" "+i){case"GET FROM_START":case"GET FROM_END":n=Oe.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=Oe.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=Oe.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=Oe.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+Oe.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Oe.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHERE"),i={FROM_START:Oe.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Oe.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Oe.Msg.TEXT_GET_INDEX_RANDOM};return Oe.Msg.PROCEDURES_DEFRETURN_RETURN+Oe.Msg.MIXLY_MICROBIT_TYPE_STRING+i[e]+"n"+Oe.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var e=document.createElement("mutation");e.setAttribute("statement",!this.outputConnection);var t=this.getInput("AT").type==Oe.INPUT_VALUE;return e.setAttribute("at",t),e},domToMutation:function(e){var t="true"==e.getAttribute("statement");this.updateStatement_(t),e="false"!=e.getAttribute("at"),this.updateAt_(e)},updateStatement_:function(e){e!=!this.outputConnection&&(this.unplug(!0,!0),e?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(e){this.removeInput("AT"),this.removeInput("ORDINAL",!0),e?(this.appendValueInput("AT").setCheck(Number),Oe.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Oe.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var t=new Oe.FieldDropdown(this.WHERE_OPTIONS,(function(t){var i="FROM_START"==t||"FROM_END"==t;if(i!=e){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(t,"WHERE"),null}}));this.getInput("AT").appendField(t,"WHERE"),Oe.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Jt={init:function(){this.setHelpUrl(Oe.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(bt),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Oe.Msg.LISTS_GET_INDEX_GET+" "+Oe.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Oe.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Oe.Msg.PROCEDURES_DEFRETURN_RETURN+Oe.Msg.MIXLY_MICROBIT_TYPE_STRING+Oe.Msg.LISTS_GET_INDEX_FROM_START+"n"+Oe.Msg.TEXT_CHARAT2)}},Qt={init:function(){this.setHelpUrl(Oe.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(bt),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Oe.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Oe.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},qt={init:function(){this.WHERE_OPTIONS_1=[[Oe.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Oe.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Oe.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Oe.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Oe.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Oe.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Oe.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(bt),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(Oe.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT1").type==Oe.INPUT_VALUE;e.setAttribute("at1",t);var i=this.getInput("AT2").type==Oe.INPUT_VALUE;return e.setAttribute("at2",i),e},domToMutation:function(e){var t="true"==e.getAttribute("at1"),i="true"==e.getAttribute("at2");this.updateAt_(1,t),this.updateAt_(2,i)},updateAt_:function(e,t){this.removeInput("AT"+e),this.removeInput("ORDINAL"+e,!0),t?(this.appendValueInput("AT"+e).setCheck(Number),Oe.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+e).appendField(Oe.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+e);var i=new Oe.FieldDropdown(this["WHERE_OPTIONS_"+e],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=t){var s=this.sourceBlock_;return s.updateAt_(e,n),s.setFieldValue(i,"WHERE"+e),null}}));this.getInput("AT"+e).appendField(i,"WHERE"+e),1==e&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},zt={init:function(){this.setHelpUrl(Oe.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(bt),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Oe.Msg.LISTS_GET_INDEX_GET+" "+Oe.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Oe.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Oe.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Oe.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},jt={init:function(){var e=[[Oe.Msg.MIXLY_EQUALS,"==="],[Oe.Msg.MIXLY_STARTSWITH,"startswith"],[Oe.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(bt),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Oe.FieldDropdown(e),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},$t={init:function(){this.setColour(bt),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Oe.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_COMPARETO_HELP)}},Zt={init:function(){var e=[[Oe.Msg.TEXT_UPPER,"upper"],[Oe.Msg.TEXT_TITLE,"title"],[Oe.Msg.TEXT_CAPITALIZE,"capitalize"],[Oe.Msg.TEXT_SWAPCASE,"swapcase"],[Oe.Msg.TEXT_LOWER,"lower"]];this.setColour(bt),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Oe.FieldDropdown(e),"CAPITAL").setCheck(String),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CAPITAL");return{upper:Oe.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Oe.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Oe.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Oe.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Oe.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[e]}))}},ei={init:function(){var e=[[Oe.Msg.TEXT_LJUST,"ljust"],[Oe.Msg.TEXT_CENTER,"center"],[Oe.Msg.TEXT_RJUST,"rjust"]];this.setColour(bt),this.appendValueInput("VAR").appendField(new Oe.FieldDropdown(e),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Oe.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Oe.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},ti={init:function(){this.setColour(bt),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Oe.Msg.MIXLY_MID+Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Oe.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ii={init:function(){this.setColour(bt),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Oe.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},ni={init:function(){this.setColour(bt),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Oe.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Oe.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},si={init:function(){this.setColour(bt),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Oe.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Oe.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Oe.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},_i={init:function(){var e=[[Oe.Msg.TEXT_TRIM_BOTH,"strip"],[Oe.Msg.TEXT_TRIM_LEFT,"lstrip"],[Oe.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(bt),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Oe.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Oe.FieldDropdown(e),"TOWHAT"),this.appendDummyInput("").appendField(Oe.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{strip:Oe.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Oe.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Oe.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[e]}))}},oi={init:function(){this.setColour(bt),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Oe.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Oe.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Oe.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("text_create_with_container");t.initSvg();for(var i=t.getInput("STACK").connection,n=0;nt?e[t]:0==t?'"key"':'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},nn={init:function(){this.setColour(en),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Oe.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},sn={init:function(){this.setColour(en),this.appendDummyInput().appendField(Oe.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},_n={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.DICT_KEYS),this.setTooltip(Oe.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},on={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Oe.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Oe.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Oe.Msg.DICTS_GET_TOOLTIP)}},pn={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Oe.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Oe.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Oe.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Oe.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},an={init:function(){this.setColour(en),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Oe.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Oe.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},un={init:function(){this.setColour(en),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Oe.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Oe.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.DICTS_DELETE_TOOLTIP)}},rn={init:function(){this.setColour(en),this.appendValueInput("DICT2").setCheck("Dict").appendField(Oe.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Oe.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MID),this.setTooltip(Oe.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ln={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.DICT_CLEAR),this.setTooltip(Oe.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dn={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.DICT_ITEMS),this.setTooltip(Oe.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},In={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.DICT_VALUES),this.setTooltip(Oe.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Tn={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_LENGTH),this.setTooltip(Oe.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Mn={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.DICT_DELDICT),this.setTooltip(Oe.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hn={init:function(){this.MODE=[[Oe.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Oe.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Oe.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Oe.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t="";switch(e.getFieldValue("WHERE")){case"INSERT":t=Oe.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":t=Oe.Msg.DICTS_DELETE_TOOLTIP}return t}))},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT2").type==Oe.INPUT_VALUE;return e.setAttribute("at2",t),e},domToMutation:function(e){var t="true"==e.getAttribute("at2");this.updateAt_(t)},updateAt_:function(e){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),e?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var t=new Oe.FieldDropdown(this.MODE,(function(t){var i="INSERT"==t;if(i!=e){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(t,"WHERE"),null}}));this.getInput("AT2").appendField(t,"WHERE")}},mn={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Oe.Msg.DICTS_ADD_VALUE),this.setTooltip(Oe.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},En={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Oe.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Oe.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.DICTS_SETDEFAULT_TOOLTIP)}},On={init:function(){this.setColour(en),this.appendDummyInput("").appendField(new Oe.FieldLabel(Oe.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new Oe.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Oe.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("dicts_create_with_container");t.initSvg();for(var i=t.getInput("STACK").connection,n=0;nt?e[t]:0==t?'"key"':'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},Rn={init:function(){this.setColour(en),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Oe.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},cn={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_TO_JSON),this.setTooltip(Oe.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},gn={init:function(){this.setColour(en),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Oe.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Cn={init:function(){this.setColour(en),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Sn={init:function(){this.setColour(en),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_TO_JSON),this.setTooltip(Oe.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},An=210,Ln={init:function(){var e=Oe.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Oe.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{EQ:Oe.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Oe.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Oe.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Oe.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Oe.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Oe.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[e]})),this.prevBlocks_=[null,null]}},Nn={init:function(){var e=Oe.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],t=Oe.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Oe.FieldDropdown(e),"OP1"),this.appendValueInput("C").appendField(new Oe.FieldDropdown(t),"OP2"),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Dn={init:function(){var e=[[Oe.Msg.LOGIC_OPERATION_AND,"AND"],[Oe.Msg.LOGIC_OPERATION_OR,"OR"],[Oe.Msg.LOGIC_OPERATION_NOR,"NOR"],[Oe.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Oe.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{AND:Oe.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Oe.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Oe.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Oe.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[e]}))}},fn={init:function(){this.setColour(An),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Oe.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Oe.Msg.LOGIC_NEGATE_TOOLTIP)}},Fn={init:function(){var e=[[Oe.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Oe.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(An),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Oe.FieldDropdown(e),"BOOL"),this.setTooltip(Oe.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Pn={init:function(){this.setColour(An),this.setOutput(!0),this.appendDummyInput().appendField(Oe.Msg.LOGIC_NULL),this.setTooltip(Oe.Msg.LOGIC_NULL_TOOLTIP)}},Yn={init:function(){this.setColour(An),this.appendValueInput("A"),this.appendValueInput("B").appendField(Oe.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Oe.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},vn={init:function(){var e=[[Oe.Msg.TEXT_APPEND_TO,"in"],[Oe.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(An),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Oe.FieldDropdown(e),"BOOL"),this.appendDummyInput("").appendField(Oe.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Oe.Msg.IN)}},Xn={init:function(){var e=[[Oe.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Oe.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(An),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Oe.FieldDropdown(e),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},yn={init:function(){this.setColour(An),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Oe.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},xn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Oe.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},bn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),i=Oe.Msg.MIXLY_USE,n=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Oe.Msg.MIXLY_BELONG;return i+{r:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+_+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},Vn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),i=Oe.Msg.MIXLY_USE,n=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Oe.Msg.MIXLY_BELONG,o=Oe.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+_+n+s+o}))}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Oe.Msg.MIXPY_TEXT_ENCODE).appendField(new Oe.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),i=Oe.Msg.MIXLY_USE,n=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,_=Oe.Msg.MIXLY_BELONG,o=Oe.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+_+n+s+o}))}},Gn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Oe.Msg.MIXLY_MICROBIT_TYPE_STRING+Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),i=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[t]+"x"+n}))}},kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MICROBIT_PYTHON_TYPE)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Oe.Msg.HTML_FILE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Jn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Qn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},jn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),i=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[t]+s+"x"+n}))}},$n={init:function(){this.setColour(0),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Zn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Oe.Msg.MIXLY_ESP32_SET+{mkdir:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[t]}))}},es={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Oe.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},ts={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},is={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.HTML_FILE,"isfile"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[t]}))}},ns={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Oe.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SETUP+Oe.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Oe.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ss={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Oe.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},_s={init:function(){var e=Oe.Procedures.findLegalName("",this),t=new Oe.FieldTextInput(e,Oe.Procedures.rename);t.setSpellcheck(!1),this.appendDummyInput().appendField(t,"NAME").appendField("","PARAMS"),this.setMutator(new Oe.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Oe.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Oe.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(Oe.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(Oe.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(e){this.hasStatements_!==e&&(e?(this.appendStatementInput("STACK").appendField(Oe.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=e)},updateParams_:function(){var e="";this.arguments_.length&&(e=Oe.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),Oe.Events.disable();try{this.setFieldValue(e,"PARAMS")}finally{Oe.Events.enable()}},mutationToDom:function(e){var t=Oe.utils.xml.createElement("mutation");e&&t.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(Oe.Msg.MIXLY_AIP_ATTR).setAlign(Oe.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zs={init:function(){this.setColour(Js),this.appendDummyInput().appendField(Oe.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},e_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(Oe.Msg.HTML_FORM_CONTENT).appendField(new Oe.FieldDropdown([[Oe.Msg.HTML_TEXT,"text"],[Oe.Msg.HTML_EMAIL,"email"],[Oe.Msg.HTML_NUMBER,"number"],[Oe.Msg.HTML_PASSWORD,"password"],[Oe.Msg.HTML_CHECKBOX,"checkbox"],[Oe.Msg.HTML_RADIOBUTTON,"radiobutton"],[Oe.Msg.HTML_BUTTON,"button"],[Oe.Msg.HTML_COLOUR,"colour"],[Oe.Msg.HTML_DATE,"date"],[Oe.Msg.HTML_LOCALTIME,"local time"],[Oe.Msg.HTML_FILE,"file"],[Oe.Msg.HTML_HIDDEN,"hidden"],[Oe.Msg.HTML_IMAGE,"image"],[Oe.Msg.HTML_MONTH,"month"],[Oe.Msg.HTML_RANGE,"range"],[Oe.Msg.HTML_RESET,"reset"],[Oe.Msg.HTML_SEARCH,"search"],[Oe.Msg.HTML_SUBMIT,"submit"],[Oe.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Oe.Msg.HTML_TIME,"time"],[Oe.Msg.HTML_URL,"url"],[Oe.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Oe.Msg.HTML_NAME).appendField(new Oe.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Oe.Msg.HTML_VALUE).appendField(new Oe.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Oe.Msg.MIXLY_AIP_ATTR).setAlign(Oe.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},t_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(new Oe.FieldTextInput("property"),"KEY").appendField(":").appendField(new Oe.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},i_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(new Oe.FieldTextInput("property"),"KEY").appendField(":").appendField(new Oe.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},n_={init:function(){this.setColour(Js),this.appendDummyInput().appendField(Oe.Msg.HTML_TEXT).appendField(new Oe.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},s_=160,__={init:function(){this.setColour(s_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Oe.FieldTable(""),"TEXT")}},o_={init:function(){this.setColour(s_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Oe.FieldMultilineInput(""),"TEXT")}},p_={init:function(){this.setColour(s_),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Oe.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},a_={init:function(){this.setColour(s_),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},u_={init:function(){this.setColour(s_),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Oe.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},r_={init:function(){this.setColour(s_),this.appendValueInput("VALUE").appendField(Oe.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},l_={init:function(){this.setColour(s_),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Oe.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Oe.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=Oe.Block.obtain(e,"text_print_multiple_container");t.initSvg();for(var i=t.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(e=function(e,t,i){return"("+e+" <= "+t+") and "+a()+"("+e+", "+t+", "+i+") or "+u()+"("+e+", "+t+", "+i+")"},Oe.isNumber(n)&&Oe.isNumber(s)&&Oe.isNumber(_))n=parseFloat(n),s=parseFloat(s),_=Math.abs(parseFloat(_)),0==n%1&&0==s%1&&0==_%1?(n<=s?(s++,e=0==n&&1==_?s:n+", "+s,1!=_&&(e+=", "+_)):e=n+", "+--s+", -"+_,e="range("+e+")"):(e=n",GTE:">="};const oa=function(e,t){var i=this.getFieldValue("OP"),n="&&"==i?t.ORDER_LOGICAL_AND:t.ORDER_LOGICAL_OR,s=t.valueToCode(this,"A",n)||"False",_=t.valueToCode(this,"B",n)||"False";if("AND"==i)var o=s+" and "+_;else if("OR"==i)o=s+" or "+_;else if("NOR"==i)o="not("+s+"^"+_+")";else o=s+"^"+_;return[o,n]},pa=function(e,t){var i=t.ORDER_UNARY_PREFIX;return["not "+(t.valueToCode(this,"BOOL",i)||"False"),i]},aa=function(e,t){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",t.ORDER_ATOMIC]},ua=function(e,t){return["None",t.ORDER_ATOMIC]},ra=function(e,t){var i=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"False";return["("+(t.valueToCode(this,"B",t.ORDER_ATOMIC)||"False")+" if "+i+" else "+(t.valueToCode(this,"C",t.ORDER_ATOMIC)||"False")+")",t.ORDER_ATOMIC]},la=function(e,t){var i=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"''",n=t.valueToCode(this,"B",t.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,t.ORDER_ATOMIC]},da=function(e,t){var i=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"''",n=t.valueToCode(this,"B",t.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,t.ORDER_ATOMIC]},Ia=function(e,t){return["bool("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"0")+")",t.ORDER_ATOMIC]},Ta=function(e,t){return t.definitions_.import_os="import os","os.startfile("+t.valueToCode(this,"fn",t.ORDER_ATOMIC)+")\n"},Ma=function(e,t){return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+" = open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},ha=function(e,t){return["open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",t.ORDER_ATOMIC]},ma=function(e,t){return["open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',t.ORDER_ATOMIC]},Ea=function(e,t){var i=t.valueToCode(this,"data",t.ORDER_ATOMIC);return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".write("+i+")\n"},Oa=function(e,t){var i=this.getFieldValue("MODE");return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+"."+i+"()",t.ORDER_ATOMIC]},Ra=function(e,t){var i=this.getFieldValue("MODE");return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+"."+i+"("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},ca=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".readline("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},ga=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".writable()",t.ORDER_ATOMIC]},Ca=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".name()",t.ORDER_ATOMIC]},Sa=function(e,t){return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".close()\n"},Aa=function(e,t){t.definitions_.import_os="import os";return["os.listdir()",t.ORDER_ATOMIC]},La=function(e,t){return t.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},Na=function(e,t){return t.definitions_.import_os="import os",["os.path.getsize("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},Da=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".tell()",t.ORDER_ATOMIC]},fa=function(e,t){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".seek("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+","+n+")\n"},Fa=function(e,t){return t.definitions_.import_os="import os","os.chdir("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},Pa=function(e,t){t.definitions_.import_os="import os";return["os.getcwd()",t.ORDER_ATOMIC]},Ya=function(e,t){return t.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+t.valueToCode(this,"PATH",t.ORDER_ATOMIC)+")\n"},va=function(e,t){return t.definitions_.import_os="import os","os.rename("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+","+t.valueToCode(this,"NEWFILE",t.ORDER_ATOMIC)+")\n"},Xa=function(e,t){t.definitions_.import_os="import os";var i=t.valueToCode(this,"FILE",t.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",t.ORDER_ATOMIC]},ya=function(e,t){return t.definitions_.import_os="import os",t.definitions_.import_sdcard="import sdcard",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+" = sdcard.SDCard("+t.valueToCode(this,"SPISUB",t.ORDER_ATOMIC)+","+t.valueToCode(this,"PINSUB",t.ORDER_ATOMIC)+")\n"},xa=function(e,t){return t.definitions_.import_os="import os",t.definitions_.import_sdcard="import sdcard","os.mount("+t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+","+t.valueToCode(this,"DIR",t.ORDER_ATOMIC)+")\n"},ba=function(e,t){var i=t.variableDB_.getName(this.getFieldValue("NAME"),Oe.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&t.statementToCode(this,"STACK"))??" pass\n";t.INFINITE_LOOP_TRAP&&(n=t.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=t.valueToCode(this,"RETURN",t.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var _=[],o=0;o\n\n\n\t\n"+t.statementToCode(this,"HEAD")+"\n\n"+t.statementToCode(this,"BODY")+"\n\n'''",t.ORDER_ATOMIC]},Eu=function(e,t){var i=t.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Ou=function(e,t){var i=t.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},Ru=function(e,t){var i=t.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},cu=function(e,t){var i=t.statementToCode(this,"DO"),n=t.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},gu=function(e,t){return['style="'+t.statementToCode(this,"STYLE")+'"',t.ORDER_ATOMIC]},Cu=function(e,t){return'"},Su=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Au=function(){return this.getFieldValue("TEXT")+"\n"},Lu=function(e){return e.getFieldValue("TEXT")+"\n"},Nu=function(e,t){return[e.getFieldValue("TEXT"),t.ORDER_ATOMIC]},Du=function(e,t){return(t.valueToCode(e,"VALUE",t.ORDER_ATOMIC)||"")+"\n"},fu=function(){return""},Fu=function(e,t){return["type("+(t.valueToCode(e,"VALUE",t.ORDER_MEMBER)||"___")+")",t.ORDER_ATOMIC]},Pu=function(e,t){for(var i=e.getFieldValue("NAME"),n=e.hasReturn_,s=new Array(e.itemCount_),_=0;_0?t.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+e+"while True:\n"+a.join("")+u.join("\n"):t.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+e+u.join("\n")},yu.scrubNakedValue=function(e){return e+"\n"},yu.quote_=function(e){var t="'";return-1!==e.indexOf("'")&&(-1===e.indexOf('"')?t='"':e=e.replace(/'/g,"\\'")),t+e+t},yu.multiline_quote_=function(e){return"'''"+(e=e.replace(/'''/g,"\\'\\'\\'"))+"'''"},yu.scrub_=function(e,t,i){var n="";if(!e.outputConnection||!e.outputConnection.targetConnection){(_=e.getCommentText())&&(_=Oe.utils.string.wrap(_,yu.COMMENT_WRAP-3),n+=yu.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const xu="#74A55B",bu={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_RGB_PIN_COUNT)}},Vu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Oe.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Bu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Oe.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Gu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(Oe.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Uu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Oe.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Oe.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},wu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},ku={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_RESET)}},Hu={init:function(){this.setColour(xu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Wu={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING).appendField(Oe.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Ku={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Oe.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Ju={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Oe.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Qu={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING).appendField(Oe.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},qu={init:function(){this.setColour(xu),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_SETUP+Oe.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},zu={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SERVO_MOVE)}},ju={init:function(){this.setColour(xu),this.appendValueInput("VAR").appendField("360°"+Oe.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SETTING+Oe.Msg.blockpy_turtle_rotate+Oe.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},$u={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("180°"+Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SERVO_MOVE)}},Zu={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("360°"+Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},er={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("180°"+Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},tr={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).appendField("360°"+Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},ir={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new Oe.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(Oe.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},nr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Direction).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Oe.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[Oe.Msg.MOTOR_N,"ms32006.MOT_N"],[Oe.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},sr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new Oe.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Direction).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Oe.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},_r={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_RGB_PIN_COUNT)}},or={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},pr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},ar={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_WRI)}},ur={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.MIXLY_DURATION).appendField(Oe.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},rr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.PYTHON_RANGE_STEP).appendField(Oe.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},lr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(Oe.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new Oe.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SETUP+Oe.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Oe.FieldDropdown([["SYN6288"+Oe.Msg.MIXLY_AipSpeech_synthesis,"SYN6288"],["NS9300"+Oe.Msg.MIXLY_MUSIC_PLAYER,"NS9300"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},dr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_WHETHER).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_STOPPED,"0"],[Oe.Msg.MIXLY_PLAYING,"1"],[Oe.Msg.MIXLY_PAUSED,"2"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},Ir={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_STAT).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MP3_PLAY,"1"],[Oe.Msg.MIXLY_MP3_PAUSE,"2"],[Oe.Msg.MIXLY_STOP,"3"],[Oe.Msg.MIXLY_MP3_PREV,"4"],[Oe.Msg.MIXLY_MP3_NEXT,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendValueInput("volume").appendField(Oe.Msg.MIXLY_MP3_VOL+Oe.Msg.MIXLY_STAT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_PLAYER_SET_VOLUME_TOOLTIP)}},Mr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MODE+Oe.Msg.MIXLY_STAT).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MP3_LOOP_ALL,"0"],[Oe.Msg.MIXLY_MP3_LOOP_ONE,"1"],[Oe.Msg.MIXLY_PLAYER_DIRECTORY_LOOP,"2"],[Oe.Msg.MIXLY_MP3_LOOP_RAM,"3"],[Oe.Msg.MIXLY_PLAYER_SINGLE_STOP,"4"],[Oe.Msg.MIXLY_PLAYER_SEQUENTIAL_PLAY,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_START_MELODY,"play"],[Oe.Msg.MIXLY_PLAYER_INSERT_MUSIC,"insert"]]),"key"),this.appendValueInput("song"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_PLAYER_PLAY_MUSIC_TOOTIP)}},mr={},Er={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(Oe.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Or={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},Rr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(Oe.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PROGRAM_BLOCK).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},cr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(Oe.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(Oe.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PROGRAM_BLOCK).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},gr={init:function(){this.setColour(xu),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Cr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_MOTOR).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Sr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_MOTOR).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ar={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_TRAFFIC_LIGHT).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.LISTS_SET_INDEX_SET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Lr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN).appendField(new Oe.FieldDropdown([[Oe.Msg.COLOUR_RGB_WHITE,"W"],[Oe.Msg.COLOUR_RGB_RED,"R"],[Oe.Msg.COLOUR_RGB_YELLOW,"Y"],[Oe.Msg.COLOUR_RGB_GREEN,"G"],[Oe.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Nr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN).appendField(new Oe.FieldDropdown([[Oe.Msg.COLOUR_RGB_WHITE,"W"],[Oe.Msg.COLOUR_RGB_RED,"R"],[Oe.Msg.COLOUR_RGB_YELLOW,"Y"],[Oe.Msg.COLOUR_RGB_GREEN,"G"],[Oe.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Dr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_SERVO_MOTOR).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[Oe.Msg.MIXLY_SPEED,"[1]"],[Oe.Msg.MATH_SINGLE_OP_ABSOLUTE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[Oe.Msg.MIXLY_RELATIVE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[Oe.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[Oe.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[Oe.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},fr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_SERVO_MOTOR).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[Oe.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[Oe.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Fr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_SERVO_MOTOR).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Pr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_SERVO_MOTOR).appendField(Oe.Msg.MATH_SINGLE_OP_ABSOLUTE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Oe.Msg.MSG.run).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MODE).setAlign(Oe.inputs.Align.RIGHT).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_SPEED+Oe.Msg.MIXLY_MODE,"0"],[Oe.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Oe.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Oe.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(Oe.inputs.Align.RIGHT).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"0"],[Oe.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[Oe.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},Yr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_SERVO_MOTOR).appendField(Oe.Msg.MIXLY_RELATIVE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Oe.Msg.MSG.run).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_SERVO_MOTOR).appendField(Oe.Msg.MIXLY_RELATIVE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Oe.Msg.MSG.run).appendField("("+Oe.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MODE).setAlign(Oe.inputs.Align.RIGHT).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_SPEED+Oe.Msg.MIXLY_MODE,"0"],[Oe.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Oe.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Oe.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},Xr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.ME_GO_MOTOR_EXTERN+Oe.Msg.MIXLY_SERVO_MOTOR).appendField(Oe.Msg.MIXLY_RELATIVE+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+Oe.Msg.MSG.run).appendField("("+Oe.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LEFT,"0"],[Oe.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MODE).setAlign(Oe.inputs.Align.RIGHT).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_SPEED+Oe.Msg.MIXLY_MODE,"0"],[Oe.Msg.MIXLY_MICROBIT_JS_BLE_POWER+Oe.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(Oe.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(Oe.inputs.Align.RIGHT).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"0"],[Oe.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},yr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.MIXBOT).appendField(Oe.Msg.ME_GO_MOTOR_EXTERN).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MOTOR,"ext_motor"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[Oe.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[Oe.Msg.COLOUR_RGB_RED+"LED","R_LED"],[Oe.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[Oe.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[Oe.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[Oe.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},xr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.MIXBOT).appendField(Oe.Msg.ME_GO_MOTOR_EXTERN).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MOTOR,"ext_motor"],[Oe.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[Oe.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[Oe.Msg.COLOUR_RGB_RED+"LED","R_LED"],[Oe.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[Oe.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[Oe.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[Oe.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},br={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SETUP+Oe.Msg.MIXLY_AT).appendField(Oe.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Vr={init:function(){this.setColour(xu),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING),this.appendValueInput("pin").appendField("LED"),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Br={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SERVO+Oe.Msg.MIXLY_SETUP+Oe.Msg.MIXLY_AT).appendField(Oe.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Gr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_SERVO),this.appendValueInput("angle").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_DISPLAY_MATRIX_ROTATE),this.appendDummyInput().appendField(Oe.Msg.DRAW_POINTER_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ur={init:function(){this.setColour(xu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_MOTOR+Oe.Msg.MIXLY_SETUP+Oe.Msg.MIXLY_AT).appendField(Oe.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},wr={init:function(){this.setColour(xu),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MOTOR),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+Oe.Msg.MIXLY_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},kr="#6C9858",Hr={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(new Oe.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},Wr={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_ESP32_ON,"1"],[Oe.Msg.MIXLY_ESP32_OFF,"0"],[Oe.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Kr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Oe.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_SETONOFF)}},Jr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Oe.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Oe.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_GETONOFF)}},Qr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Oe.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_GETONOFF)}},qr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Oe.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_SETTING+Oe.Msg.MIXLY_BUILDIN_LED+Oe.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},zr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Oe.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_LCD_SETCOLOR).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_LIGHT_RED,"1"],[Oe.Msg.MIXLY_LIGHT_GREEN,"2"],[Oe.Msg.MIXLY_LIGHT_BLUE,"3"],[Oe.Msg.MIXLY_LIGHT_YELLOW,"4"],[Oe.Msg.MIXLY_LIGHT_CYAN,"5"],[Oe.Msg.MIXLY_LIGHT_PURPLE,"6"],[Oe.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},jr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING).appendField(Oe.Msg.MIXLY_BUILDIN_LED).appendField(new Oe.FieldDropdown([[Oe.Msg.COLOUR_RGB_RED,"r"],[Oe.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_SETONOFF)}},$r={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Oe.Msg.MIXLY_BUILDIN_LED).appendField(new Oe.FieldDropdown([[Oe.Msg.COLOUR_RGB_RED,"r"],[Oe.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_GETONOFF)}},Zr={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Oe.Msg.MIXLY_BUILDIN_LED).appendField(new Oe.FieldDropdown([[Oe.Msg.COLOUR_RGB_RED,"r"],[Oe.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_GETONOFF)}},el={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETTING).appendField(Oe.Msg.MIXLY_BUILDIN_LED).appendField(new Oe.FieldDropdown([[Oe.Msg.COLOUR_RGB_RED,"r"],[Oe.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_SETTING+Oe.Msg.MIXLY_BUILDIN_LED+Oe.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},tl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(new Oe.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},il={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Re.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(Oe.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(Oe.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(Oe.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},nl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},sl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.MIXLY_DURATION).appendField(Oe.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},_l={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.PYTHON_RANGE_STEP).appendField(Oe.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},ol={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_WRI)}},pl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(Re.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(Oe.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(Oe.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(Oe.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},al={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},ul={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.PYTHON_RANGE_STEP).appendField(Oe.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},rl={init:function(){this.setColour(kr),this.appendValueInput("TICKS").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Oe.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Oe.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},ll={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},dl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_RESET)}},Il={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Oe.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Tl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Oe.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Ml={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hl={init:function(){this.setColour(kr),this.appendValueInput("LIST").appendField(Oe.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},ml={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MOTOR_DC).appendField(new Oe.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Direction).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"CW"],[Oe.Msg.ANTI_CLOCKWISE,"CCW"],[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},El={init:function(){this.setColour(kr),this.appendDummyInput().appendField("MixGo Car").appendField(new Oe.FieldDropdown([[Oe.Msg.blockpy_forward,"F"],[Oe.Msg.blockpy_backward,"B"],[Oe.Msg.blockpy_left,"L"],[Oe.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ol={init:function(){this.setColour(kr),this.appendDummyInput("").appendField("MixGo Car").appendField(new Oe.FieldDropdown([[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Rl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MOTOR_DC).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[Oe.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Direction).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"CW"],[Oe.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MOTOR_DC).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[Oe.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_STOP).appendField(new Oe.FieldDropdown([[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},gl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Cl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXBOT).appendField(new Oe.FieldDropdown([[Oe.Msg.blockpy_forward,"F"],[Oe.Msg.blockpy_backward,"B"],[Oe.Msg.blockpy_left,"L"],[Oe.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[Oe.Msg.MIXLY_SPEED,"SPEED"],[Oe.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Sl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXBOT).appendField(new Oe.FieldDropdown([[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Al={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXBOT).appendField(Oe.Msg.MIXLY_MOTOR).appendField(new Oe.FieldDropdown([[Oe.Msg.TEXT_TRIM_LEFT,"1"],[Oe.Msg.TEXT_TRIM_RIGHT,"2"],[Oe.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[Oe.Msg.MIXLY_SPEED,"SPEED"],[Oe.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Ll={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[Oe.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Nl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.BITBOT).appendField(new Oe.FieldDropdown([[Oe.Msg.blockpy_forward,"F"],[Oe.Msg.blockpy_backward,"B"],[Oe.Msg.blockpy_left,"L"],[Oe.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Dl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.BITBOT).appendField(new Oe.FieldDropdown([[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.BITBOT).appendField(Oe.Msg.MIXLY_MOTOR).appendField(new Oe.FieldDropdown([[Oe.Msg.TEXT_TRIM_LEFT,"0"],[Oe.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Direction).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"CW"],[Oe.Msg.ANTI_CLOCKWISE,"CCW"],[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Fl={init:function(){this.setColour(kr),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_SETONOFF)}},Pl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_GETONOFF)}},Yl={init:function(){this.setColour(kr),this.appendValueInput("bright").appendField(Oe.Msg.MIXLY_SETTING+Oe.Msg.MIXLY_MIXBOT_BUZZER+Oe.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_SETONOFF)}},vl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_MIXBOT_BUZZER+Oe.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_LED_GETONOFF)}},Xl={init:function(){this.setColour(kr),this.appendValueInput("PATH").appendField(Oe.Msg.MIXLY_RECORD_AUDIO).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(Oe.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},yl={init:function(){this.setColour(kr),this.appendValueInput("PATH").appendField(Oe.Msg.MIXLY_PLAY_AUDIO).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},xl={init:function(){this.setColour(kr),this.appendValueInput("PATH").appendField(Oe.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},bl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Oe.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Vl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.LISTS_SET_INDEX_SET+Oe.Msg.ME_GO_MOTOR_EXTERN).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([["1","1"],["2","2"],["3","3"],["4","4"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.blynk_IOT_IR_POWER+Oe.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Gl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.ME_GO_MOTOR_EXTERN).appendField(Oe.Msg.PIN_NUMBERING).appendField(new Oe.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.blynk_IOT_IR_POWER+Oe.Msg.MIXLY_PINMODEOUT+Oe.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ul={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.LISTS_SET_INDEX_SET+Oe.Msg.ME_GO_MOTOR_EXTERN).appendField(Oe.Msg.MIXLY_ALL+Oe.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(Oe.ALIGN_RIGHT).appendField(Oe.Msg.blynk_IOT_IR_POWER+Oe.Msg.MIXLY_PINMODEOUT+Oe.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},wl={init:function(){this.setColour(kr),this.appendDummyInput().appendField(Oe.Msg.ANALOG+Oe.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_RELEASE).appendField(new Oe.FieldDropdown([[Oe.Msg.MICROPYTHON_DISPLAY_YES,"True"],[Oe.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.ANALOG+Oe.Msg.MIXLY_KEYBOARD_INPUT)}},kl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SPECIAL_KEY).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[Oe.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[Oe.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[Oe.Msg.MIXLY_SPECIAL_KEY4,"0x04"],[Oe.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[Oe.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[Oe.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[Oe.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[Oe.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},Hl={init:function(){this.setColour(kr),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_GENERAL_KEY).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_SPECIAL_KEY0,"0x00"],["A","0x04"],["B","0x05"],["C","0x06"],["D","0x07"],["E","0x08"],["F","0x09"],["G","0x0A"],["H","0x0B"],["I","0x0C"],["J","0x0D"],["K","0x0E"],["L","0x0F"],["M","0x10"],["N","0x11"],["O","0x12"],["P","0x13"],["Q","0x14"],["R","0x15"],["S","0x16"],["T","0x17"],["U","0x18"],["V","0x19"],["W","0x1A"],["X","0x1B"],["Y","0x1C"],["Z","0x1D"],["1 !","0x1E"],["2 @","0x1F"],["3 #","0x20"],["4 $","0x21"],["5 %","0x22"],["6 ^","0x23"],["7 &","0x24"],["8 *","0x25"],["9 (","0x26"],["0 )","0x27"],["ENTER","0x28"],["ESC","0x29"],["BACKSPACE","0x2A"],["TAB","0x2B"],["SPACE","0x2C"],["- _","0x2D"],["= +","0x2E"],["[ {","0x2F"],["] }","0x30"],["\\ |","0x31"],["; :","0x33"],["' \"","0x34"],["` ~","0x35"],[", <","0x36"],[". >","0x37"],["/ ?","0x38"],["CAPS_LOCK","0x39"],["F1","0x3A"],["F2","0x3B"],["F3","0x3C"],["F4","0x3D"],["F5","0x3E"],["F6","0x3F"],["F7","0x40"],["F8","0x41"],["F9","0x42"],["F10","0x43"],["F11","0x44"],["F12","0x45"],["PRINTSCREEN","0x46"],["SCROLL_LOCK","0x47"],["PAUSE","0x48"],["INSERT","0x49"],["HOME","0x4A"],["PAGE_UP","0x4B"],["DELETE","0x4C"],["END","0x4D"],["PAGE_DOWN","0x4E"],["RIGHT","0x4F"],["LEFT","0x50"],["DOWN","0x51"],["UP","0x52"],["NUM_LOCK","0x53"],["/","0x54"],["*","0x55"],["-","0x56"],["+","0x57"],["ENTER","0x58"],["1","0x59"],["2","0x5A"],["3","0x5B"],["4","0x5C"],["5","0x5D"],["6","0x5E"],["7","0x5F"],["8","0x60"],["9","0x61"],["0","0x62"],[".","0x63"]]),"op"),this.setOutput(!0)}},Wl={init:function(){this.setColour(kr),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new Oe.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(Oe.Msg.GENERALKEY_TUPLE_CREATE_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("generalkey_container");t.initSvg();for(var i=t.getInput("STACK").connection,n=0;nnew Array(32).fill(0)))},pm={init:function(){this.jsonInit({colour:jh,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:Oe.Msg.MIXLY_MICROBIT_Built_in_image1,message0:Oe.Msg.MIXLY_MICROBIT_Built_in_image})}},am={init:function(){this.setColour(jh),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new Oe.FieldDropdown(Re.Profile.default.builtinimg),"image"),this.setOutput(!0,["esp32_image","List"])}},um={init:function(){this.setColour(jh),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Oe.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Oe.FieldDropdown(um.OPERATORS),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{"+":Oe.Msg.MIXLY_MICROBIT_image_add,"-":Oe.Msg.MIXLY_MICROBIT_image_reduce}[t]}))},OPERATORS:[[Oe.Msg.MICROBIT_DISPLAY_UNION,"add"],[Oe.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},rm={init:function(){this.setColour(jh),this.appendValueInput("A").setCheck("esp32_image").appendField(Oe.Msg.MIXLY_MICROBIT_Invert_image1),this.setInputsInline(!0),this.setOutput(!0,"esp32_image")}},lm={init:function(){this.setColour(jh),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Oe.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Oe.Msg.DISPLAY_IMAGE_LET2).appendField(new Oe.FieldDropdown(lm.OPERATORS),"OP"),this.appendValueInput("val").appendField(Oe.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.DISPLAY_IMAGE_UNIT);Re.Boards.getSelectedBoardKey();"Python ESP32-S3"===Re.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Oe.Msg.MIXLY_synchronize+":");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i=Oe.Msg.DISPLAY_IMAGE_LET,n=Oe.Msg.DISPLAY_IMAGE_LET2,s=Oe.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:Oe.Msg.MIXLY_UP,shift_down:Oe.Msg.MIXLY_DOWN,shift_left:Oe.Msg.MIXLY_LEFT,shift_right:Oe.Msg.MIXLY_RIGHT}[t]+s}))},OPERATORS:[[Oe.Msg.MIXLY_UP,"shift_up"],[Oe.Msg.MIXLY_DOWN,"shift_down"],[Oe.Msg.MIXLY_LEFT,"shift_left"],[Oe.Msg.MIXLY_RIGHT,"shift_right"]]},dm={init:function(){this.setColour(jh),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},Im={init:function(){this.setColour(jh),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Tm={init:function(){this.setColour(jh),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Mm={init:function(){this.setColour(jh),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},hm={init:function(){this.setColour(jh),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Clear_display);Re.Boards.getSelectedBoardKey();"Python ESP32-S3"===Re.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Oe.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Clear_display)}},mm={init:function(){this.setColour(jh),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SHOW+Oe.Msg.MIXLY_DISPLAY_MATRIX_WRITE_NOW),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Em={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let e=0;e<5;e++){let t=this.appendDummyInput();for(let i=0;i<8;i++)t.appendField(new Oe.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),e+"-"+i)}this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(jh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Om={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Oe.inputs.Align.CENTRE).appendField(new Oe.FieldBitmap(Om.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(jh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},Rm={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let e=0;e<8;e++){let t=this.appendDummyInput();for(let i=0;i<12;i++)t.appendField(new Oe.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),e+"-"+i)}this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(jh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},cm={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Oe.inputs.Align.CENTRE).appendField(new Oe.FieldBitmap(cm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(jh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},gm={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let e=0;e<8;e++){let t=this.appendDummyInput();for(let i=0;i<16;i++)t.appendField(new Oe.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),e+"-"+i)}this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,"esp32_image"),this.setColour(jh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Cm={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Oe.inputs.Align.CENTRE).appendField(new Oe.FieldBitmap(Cm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(jh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},Sm={init:function(){this.setColour(jh),this.appendDummyInput().appendField(Oe.Msg.OLED_SET_FONT).appendField(new Oe.FieldDropdown(Sm.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+Oe.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+Oe.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+Oe.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Am={init:function(){this.setColour(jh),this.appendValueInput("data").appendField(Oe.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.OLED_BITMAP_OR_STRING)}},Lm={init:function(){this.setColour(jh),this.appendValueInput("data").appendField(Oe.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.OLED_BITMAP_OR_STRING)}},Nm={init:function(){this.setColour(jh),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(Oe.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.OLED_BITMAP_OR_STRING)}},Dm={init:function(){this.setColour(jh),this.appendValueInput("data").setCheck(String).appendField(Oe.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(Oe.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(Oe.Msg.TEXT_CENTER).appendField(new Oe.FieldDropdown([[Oe.Msg.MICROPYTHON_DISPLAY_YES,"True"],[Oe.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},fm={init:function(){this.setColour(jh),this.appendValueInput("data").setCheck(String).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(Oe.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},Fm={init:function(){this.setColour(jh),this.appendValueInput("data").setCheck(String).appendField(Oe.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Pm={init:function(){this.setColour(jh),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Ym={init:function(){this.jsonInit({colour:jh,args0:[{name:"state",options:[[Oe.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[Oe.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"shape",options:[[Oe.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[Oe.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"}],inputsInline:!0,helpUrl:Oe.Msg.mpython_HELPURL,tooltip:Oe.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:Oe.Msg.MPYTHON_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},vm={init:function(){this.jsonInit({colour:jh,args0:[{name:"state",options:[[Oe.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[Oe.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"dir_h_v",options:[[Oe.Msg.mpython_vertical,"0"],[Oe.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"}],inputsInline:!0,helpUrl:Oe.Msg.mpython_HELPURL,tooltip:Oe.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:Oe.Msg.MPYTHON_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},Xm={init:function(){this.jsonInit({colour:jh,args0:[{name:"state",options:[[Oe.Msg.mpython_display_hline_1,"1"],[Oe.Msg.mpython_display_hline_0,"0"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"}],inputsInline:!0,helpUrl:Oe.Msg.mpython_HELPURL,tooltip:Oe.Msg.mpython_display_line_TOOLTIP,message0:Oe.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},ym={init:function(){this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new Oe.FieldDropdown(ym.IMAGES),"path"),this.setColour(jh),this.setOutput(!0)},IMAGES:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]]},xm={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let e=0;e<5;e++){let t=this.appendDummyInput();for(let i=0;i<5;i++)t.appendField(new Oe.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),e+"-"+i)}this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(jh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},bm={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Oe.inputs.Align.CENTRE).appendField(new Oe.FieldBitmap(bm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(jh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},Vm={init:function(){this.setColour(jh),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Bm={init:function(){this.setColour(jh),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_AMBIENTBRIGHT),this.setInputsInline(!0),this.setOutput(!0,Number)}},Gm={init:function(){this.setColour(jh),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},Um={init:function(){this.setColour(jh),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new Oe.FieldDropdown(Um.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[Oe.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[Oe.Msg.CLOCKWISE+"90"+Oe.Msg.blockpy_setheading_degree,"1"],[Oe.Msg.CLOCKWISE+"180"+Oe.Msg.blockpy_setheading_degree,"2"],[Oe.Msg.CLOCKWISE+"270"+Oe.Msg.blockpy_setheading_degree,"3"]]},wm={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let e=0;e<12;e++){let t=this.appendDummyInput();for(let i=0;i<12;i++)t.appendField(new Oe.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),e+"-"+i)}this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(jh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},km={init:function(){this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Oe.inputs.Align.CENTRE).appendField(new Oe.FieldBitmap(km.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(jh),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},Hm={init:function(){this.setColour(jh),this.appendValueInput("data").appendField(Oe.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(Oe.Msg.HTML_COLOUR);Re.Boards.getSelectedBoardKey();"Python ESP32-S3"===Re.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Oe.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Wm={init:function(){this.setColour(jh),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.OLED_BITMAP).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("direct").setCheck(String).appendField(Oe.Msg.MIXLY_AipImageClassify_Image+Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Km={init:function(){this.setColour(jh),this.appendValueInput("data").setCheck(String).appendField(Oe.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(Oe.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(Oe.Msg.TEXT_CENTER).appendField(new Oe.FieldDropdown([[Oe.Msg.MICROPYTHON_DISPLAY_YES,"True"],[Oe.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.appendValueInput("VAR").appendField(Oe.Msg.HTML_COLOUR);Re.Boards.getSelectedBoardKey();"Python ESP32-S3"===Re.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Oe.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},Jm={init:function(){this.setColour(jh),this.appendValueInput("data").setCheck(String).appendField(Oe.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.appendValueInput("VAR").appendField(Oe.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Qm={init:function(){this.jsonInit({colour:jh,args0:[{name:"shape",options:[[Oe.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[Oe.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Oe.Msg.mpython_HELPURL,tooltip:Oe.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:Oe.Msg.ONBOARD_TFT_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},qm={init:function(){this.jsonInit({colour:jh,args0:[{name:"dir_h_v",options:[[Oe.Msg.mpython_vertical,"0"],[Oe.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Oe.Msg.mpython_HELPURL,tooltip:Oe.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:Oe.Msg.ONBOARD_TFT_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},zm={init:function(){this.jsonInit({colour:jh,args0:[{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Oe.Msg.mpython_HELPURL,tooltip:Oe.Msg.mpython_display_line_TOOLTIP,message0:Oe.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},jm={init:function(){this.setColour(jh),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(Oe.Msg.HTML_COLOUR),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},$m={init:function(){this.setColour(jh),this.appendValueInput("x").setCheck(Number).appendField(Oe.Msg.MIXLY_LCD_SETCOLOR).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("VAR").appendField(Oe.Msg.HTML_COLOUR);Re.Boards.getSelectedBoardKey();"Python ESP32-S3"===Re.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Oe.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Zm={init:function(){this.setColour(jh),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_SCREEN_FILL);Re.Boards.getSelectedBoardKey();"Python ESP32-S3"===Re.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Oe.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},eE={init:function(){this.setColour(jh),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_INIT_CLOCK),this.appendDummyInput().appendField(Oe.Msg.MIXLY_CENTER_POS),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.OLED_CIRCLE_RADIUS),this.appendValueInput("VAR").appendField(Oe.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},tE={init:function(){this.setColour(jh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Oe.Msg.GET_RTCTIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},iE={init:function(){this.setColour(jh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Oe.Msg.SET_TIME),this.appendValueInput("h").setCheck(Number).appendField(Oe.Msg.MIXLY_HOUR),this.appendValueInput("m").setCheck(Number).appendField(Oe.Msg.MIXLY_MINUTE),this.appendValueInput("s").setCheck(Number).appendField(Oe.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},nE={init:function(){this.setColour(jh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Oe.Msg.DRAW_CLOCK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},sE={init:function(){this.setColour(jh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(Oe.Msg.CLEAR_CLOCK),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_STM32_TFT_BACKGROUND_COLOR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},_E={init:function(){this.jsonInit({colour:jh,args0:[{name:"shape",options:[[Oe.Msg.MPYTHON_DISPLAY_HOLLOW,"False"],[Oe.Msg.MPYTHON_DISPLAY_SOLID,"True"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"r",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:Oe.Msg.mpython_HELPURL,message0:Oe.Msg.ONBOARD_TFT_DISPLAY_SHAPE_CIRCLE_MESSAGE0,nextStatement:null,previousStatement:null})}},oE={init:function(){this.setColour(jh),this.appendDummyInput().appendField(Oe.Msg.DRAW_POINTER).appendField(Oe.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_DRAW_POINTER_DU),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.DRAW_POINTER_TOOLTIP)}},pE={init:function(){this.setColour(jh),this.appendDummyInput().appendField(Oe.Msg.DRAW_POINTER).appendField(Oe.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_DRAW_POINTER_DU),this.appendValueInput("VAR").appendField(Oe.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.DRAW_POINTER_TOOLTIP)}},aE={init:function(){this.setColour(jh),this.appendValueInput("data").appendField(Oe.Msg.MIXLY_Display_long_text),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(Oe.Msg.HTML_COLOUR);Re.Boards.getSelectedBoardKey();"Python ESP32-S3"===Re.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Oe.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},uE={init:function(){this.setColour(jh),this.appendValueInput("data").appendField(Oe.Msg.OLED_BITMAP),this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.OLED_BITMAP_OR_STRING),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},rE={init:function(){em.init.call(this),this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},lE={init:function(){nm.init.call(this),this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},dE={init:function(){lm.init.call(this),this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},IE={init:function(){Tm.init.call(this),this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},TE={init:function(){Mm.init.call(this),this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},ME={init:function(){hm.init.call(this),this.appendDummyInput().appendField(`(${Oe.Msg.MIXLY_DEPRECATED})`),this.setWarningText(Oe.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},hE=180,mE={init:function(){this.setColour(hE),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(Oe.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(Oe.Msg.DISPLAY_IMAGE_LET2).appendField(new Oe.FieldDropdown(mE.OPERATORS),"OP"),this.appendValueInput("val").appendField(Oe.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.DISPLAY_IMAGE_UNIT);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i=Oe.Msg.DISPLAY_IMAGE_LET,n=Oe.Msg.DISPLAY_IMAGE_LET2,s=Oe.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Oe.Msg.MIXLY_UP,down:Oe.Msg.MIXLY_DOWN,left:Oe.Msg.MIXLY_LEFT,right:Oe.Msg.MIXLY_RIGHT}[t]+s}))},OPERATORS:[[Oe.Msg.MIXLY_UP,"up"],[Oe.Msg.MIXLY_DOWN,"down"],[Oe.Msg.MIXLY_LEFT,"left"],[Oe.Msg.MIXLY_RIGHT,"right"]]},EE={init:function(){this.setColour(hE),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Oe.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Oe.FieldDropdown(EE.OPERATORS),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{"+":Oe.Msg.MIXLY_MICROBIT_image_add,"-":Oe.Msg.MIXLY_MICROBIT_image_reduce}[t]}))},OPERATORS:[[Oe.Msg.MICROBIT_DISPLAY_UNION,"+"],[Oe.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},OE={init:function(){this.setColour(hE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Oe.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Oe.FieldDropdown(OE.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Oe.Msg.MIXLY_MICROBIT_IMAGE+{height:Oe.Msg.MIXLY_HEIGHT,width:Oe.Msg.MIXLY_WIDTH}[t]}))},OPERATORS:[[Oe.Msg.MIXLY_HEIGHT,"height"],[Oe.Msg.MIXLY_WIDTH,"width"]]},RE={init:function(){this.setColour(hE),this.appendValueInput("VAR").appendField(Oe.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RECT).appendField(new Oe.FieldDropdown(RE.STATUS),"OP"),this.jsonInit({message0:Oe.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_OLED_RECT)},STATUS:[[Oe.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Oe.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},cE={init:function(){this.setColour(hE),this.appendValueInput("VAR").appendField(Oe.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Oe.FieldDropdown(cE.STATUS),"OP"),this.jsonInit({message0:Oe.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Oe.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Oe.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},gE={init:function(){this.setColour(hE),this.appendValueInput("VAR").appendField(Oe.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_DISPLAY_DRAW+Oe.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new Oe.FieldDropdown(gE.STATUS),"OP"),this.jsonInit({message0:Oe.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Oe.Msg.MIXLY_DISPLAY_DRAW+Oe.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[Oe.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Oe.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},CE="#777777",SE={init:function(){this.setColour(CE),this.appendDummyInput("").appendField("from ").appendField(new Oe.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new Oe.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},AE={init:function(){this.setColour(CE),this.appendDummyInput("").appendField("import ").appendField(new Oe.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},LE={init:function(){this.setColour(CE),this.appendDummyInput("").appendField(new Oe.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Oe.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var e=document.createElement("mutation");e.setAttribute("items",this.itemCount_);for(var t=0;tt?e[t]:'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},IO={init:function(){this.setColour(oO),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Oe.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},TO={init:function(){this.setColour(oO),this.appendDummyInput().appendField(Oe.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},MO={init:function(){this.setColour(oO),this.appendDummyInput().appendField(Oe.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},hO={init:function(){this.setColour(oO),this.appendDummyInput().appendField(Oe.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(Oe.Msg.MIXLY_EMQX_SERVER).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Oe.Msg.MIXLY_WIFI_USERNAME).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Oe.Msg.MIXLY_IOT_PASSWORD).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(Oe.Msg.MIXLY_EMQX_PROJECT).setAlign(Oe.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mO={init:function(){this.setColour(oO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Oe.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},EO={init:function(){this.setColour(oO),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Oe.Msg.MIXLY_EMQX_SUBSCRIBE+Oe.Msg.MIXLY_MICROBIT_MSG).appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Oe.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},OO={init:function(){this.setColour(oO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},RO={init:function(){this.setColour(oO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cO={init:function(){this.setColour(oO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gO={init:function(){this.setColour(oO),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Oe.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},CO={init:function(){this.setColour(oO),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},SO={init:function(){this.setColour(oO),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},AO={init:function(){this.setColour(oO),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},LO={init:function(){this.setColour(oO),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},NO={init:function(){this.setColour(oO),this.appendDummyInput().appendField("MixIO").appendField(Oe.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(Oe.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},DO={init:function(){this.setColour(oO),this.appendDummyInput().appendField(Oe.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Oe.Msg.MIXLY_EMQX_SERVER).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Oe.Msg.CONTROLS_FOR_INPUT_WITH+Oe.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(Oe.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},fO={init:function(){this.setColour(oO),this.appendDummyInput().appendField(Oe.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Oe.Msg.MIXLY_EMQX_SERVER).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Oe.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(Oe.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},FO={init:function(){this.VISITOR_ID=Re.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(oO),this.appendDummyInput("").appendField(new Oe.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const e=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==e&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},PO={init:function(){this.setColour(oO),this.appendDummyInput().appendField("MixIO").appendField(Oe.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},YO={init:function(){this.setColour(oO),this.appendDummyInput().appendField("HTTP"+Oe.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Oe.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(Oe.Msg.MIXLY_REQUESTS_GET).appendField(Oe.Msg.MIXLY_GET_CURRENT_TIME).appendField(Oe.Msg.MIXLY_OPEN_DEBUG).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vO={init:function(){this.setColour(oO),this.appendDummyInput().appendField("HTTP"+Oe.Msg.MIXLY_Client).appendField(Oe.Msg.MIXLY_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Oe.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Oe.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},XO={init:function(){this.setColour(oO),this.appendDummyInput().appendField("MQTT"+Oe.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Oe.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(Oe.Msg.MIXLY_INIT_SUBSCRIBE).appendField(Oe.Msg.MQTT_Topic).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(Oe.Msg.MIXLY_OPEN_DEBUG).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Oe.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yO={init:function(){this.setColour(oO),this.appendDummyInput().appendField("MQTT"+Oe.Msg.MIXLY_Client).appendField(Oe.Msg.MIXLY_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Oe.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Oe.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},xO=pO,bO=aO,VO=uO,BO=rO,GO=dO,UO={init:function(){this.setColour(oO),this.appendDummyInput().appendField(Oe.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(Oe.Msg.MIXLY_EMQX_SERVER).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(Oe.Msg.MODEL_NAME).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(Oe.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wO=UO,kO={init:function(){this.setColour(oO),this.appendDummyInput().appendField(Oe.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(Oe.Msg.MIXLY_EMQX_SERVER).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Oe.Msg.MIXLY_API_PRIVATE_KEY).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(Oe.Msg.MODEL_NAME).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(Oe.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},HO={init:function(){this.setColour(oO),this.appendDummyInput().appendField(Oe.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(Oe.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(Oe.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},WO={init:function(){this.setColour(oO),this.appendDummyInput().appendField(Oe.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(Oe.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(Oe.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},KO={init:function(){this.setColour(oO),this.appendDummyInput().appendField("Ollama "+Oe.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},JO=225,QO={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(Oe.Msg.MIXLY_NETWORK_MODE).appendField(new Oe.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},qO={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[Oe.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("op"),i=Oe.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:Oe.Msg.MIXLY_NETWORK_WIFI_OPEN,False:Oe.Msg.MIXLY_NETWORK_WIFI_CLOSE}[t]+i}))}},zO={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},jO={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return Oe.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:Oe.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},$O={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(Oe.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(Oe.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},ZO={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_NETWORK_WIFI_CONNECT+Oe.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},eR={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[Oe.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[Oe.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("mode");return Oe.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:Oe.Msg.MIXLY_ESP32_NETWORK_IP,1:Oe.Msg.MIXLY_ESP32_NETWORK_MASK,2:Oe.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[t]}))}},tR={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},iR={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[Oe.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},nR={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(Oe.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(Oe.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},sR={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},_R={init:function(){this.setColour(JO),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new Oe.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("mode");return Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[t]}))}},oR={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},pR={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},aR={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},uR={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},rR={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},lR={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},dR={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},IR={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},TR={init:function(){this.setColour(JO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},MR={init:function(){this.setColour(JO),this.appendValueInput("DOMAIN").appendField(Oe.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Oe.Msg.blockpy_REQUESTS_GET).appendField(new Oe.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},hR={init:function(){this.appendValueInput("VAL"),this.setColour(JO),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Oe.FieldDropdown(hR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:Oe.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Oe.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Oe.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))},ATTR:[[Oe.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Oe.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Oe.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[Oe.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},mR={init:function(){this.appendValueInput("VAR").appendField(Oe.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(JO),this.appendDummyInput("").appendField(Oe.Msg.blockpy_CONDUCT).appendField(new Oe.FieldDropdown(mR.METHOD),"DIR"),this.appendDummyInput("").appendField(Oe.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{forward:Oe.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:Oe.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[t]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},ER={init:function(){this.setColour(JO),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(Oe.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},OR={init:function(){this.setColour(JO),this.appendDummyInput("").appendField(new Oe.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},RR="#3288dd",cR={init:function(){this.setColour(RR),this.appendValueInput("URL").appendField(Oe.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Oe.Msg.blockpy_CONDUCT).appendField(new Oe.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(Oe.Msg.blockpy_REQUESTS).appendField(Oe.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},gR={init:function(){this.setColour(RR),this.appendValueInput("URL").appendField(Oe.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Oe.Msg.blockpy_CONDUCT).appendField(new Oe.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(Oe.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(Oe.Msg.blockpy_REQUESTS+Oe.Msg.OLED_STRING),this.appendDummyInput("").appendField(Oe.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},CR={init:function(){this.appendValueInput("VAL"),this.setColour(RR),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Oe.FieldDropdown(CR.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[Oe.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Oe.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[Oe.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Oe.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[Oe.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},SR={init:function(){this.setColour(RR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(Oe.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Oe.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(Oe.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},AR={init:function(){this.setColour(RR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(Oe.Msg.MIXLY_EMQX_SERVER).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(Oe.Msg.MIXLY_EMQX_PORT).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(Oe.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Oe.Msg.MIXLY_WIFI_USERNAME).setAlign(Oe.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Oe.Msg.MIXLY_IOT_PASSWORD).setAlign(Oe.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},LR={init:function(){this.setColour(RR),this.appendValueInput("TOPIC").appendField(Oe.Msg.MIXLY_EMQX_SUBSCRIBE+Oe.Msg.MIXLY_MICROBIT_MSG).appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(Oe.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},NR={init:function(){this.setColour(RR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Oe.Msg.MIXLY_EMQX_SUBSCRIBE+Oe.Msg.MIXLY_MICROBIT_MSG).appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Oe.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},DR={init:function(){this.setColour(RR),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Oe.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Oe.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},fR={init:function(){this.setColour(RR),this.appendDummyInput().appendField("mqtt"+Oe.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},FR=100,PR={init:function(){if("mixgo_nova"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="Nova G1";this.setColour(FR),this.appendDummyInput().appendField(e).appendField(Oe.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM),this.setOutput(!0,Number),this.setInputsInline(!0)}},YR={init:function(){if("mixgo_nova"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="Nova G1";this.setColour(FR),this.appendValueInput("PIN").appendField(e).appendField(Oe.Msg.MOTOR_DC).appendField(Oe.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Direction).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"CW"],[Oe.Msg.ANTI_CLOCKWISE,"CCW"],[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vR={init:function(){if("mixgo_nova"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="Nova G1";this.setColour(FR),this.appendValueInput("PIN").appendField(e).appendField(Oe.Msg.SET_USB),this.appendValueInput("percent").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_POWER_SUPPLY),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},XR={init:function(){if("mixgo_nova"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="Nova G1";this.setColour(FR),this.appendDummyInput().appendField(e).appendField(Oe.Msg.MIXLY_SPK_STATE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_ON,"True"],[Oe.Msg.MIXLY_OFF,"False"]]),"state"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},yR=100,xR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(yR),this.appendValueInput("I2CSUB").appendField(Oe.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SETUP+Oe.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(t),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},bR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(yR),this.appendValueInput("SUB").appendField(t).setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0,Number),this.setInputsInline(!0)}},VR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(yR),this.appendValueInput("SUB").appendField(t).setCheck("var"),this.appendValueInput("PIN").appendField(Oe.Msg.MOTOR_DC).appendField(Oe.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Direction).appendField(new Oe.FieldDropdown([[Oe.Msg.CLOCKWISE,"CW"],[Oe.Msg.ANTI_CLOCKWISE,"CCW"],[Oe.Msg.MOTOR_P,"P"],[Oe.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},BR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(yR),this.appendValueInput("SUB").appendField(t).setCheck("var"),this.appendValueInput("PIN").appendField(Oe.Msg.MOTOR_DC).appendField(Oe.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(Oe.Msg.MIXLY_STEPPER_GET_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},GR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(yR),this.appendValueInput("SUB").appendField(t).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SERVO_MOVE)}},UR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(yR),this.appendValueInput("SUB").appendField(t).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.LCD_NUMBERING),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(Oe.inputs.Align.RIGHT).appendField(Oe.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},wR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(yR),this.appendValueInput("SUB").appendField(t).setCheck("var"),this.appendValueInput("PIN").appendField("180°"+Oe.Msg.MIXLY_SERVO),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},kR={init:function(){var e=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_ce"==e)var t="CE G6";else if("mixgo_pe"==e)t="PE G1";this.setColour(yR),this.appendValueInput("SUB").appendField(t).setCheck("var"),this.appendValueInput("PIN").appendField("360°"+Oe.Msg.MIXLY_SERVO).appendField(Oe.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},HR="#A58C5B",WR={init:function(){this.setColour(HR),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_BUTTON).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(Oe.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_SENOR_IS_PRESSED)}},KR={init:function(){this.setColour(HR),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_BUTTON).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(Oe.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_SENOR_WAS_PRESSED)}},JR={init:function(){this.setColour(HR),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_BUTTON).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(Oe.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.PROCEDURES_DEFRETURN_RETURN+Oe.Msg.MIXLY_BUTTON+Oe.Msg.MIXLY_GET_PRESSES)}},QR={init:function(){this.setColour(HR),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_BUTTON).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Oe.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Oe.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Oe.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},qR={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_shake,"shake"],[Oe.Msg.MIXLY_UP,"up"],[Oe.Msg.MIXLY_DOWN,"down"],[Oe.Msg.MIXLY_LEFT,"left"],[Oe.Msg.MIXLY_RIGHT,"right"],[Oe.Msg.MIXLY_MICROBIT_face_up,"face up"],[Oe.Msg.MIXLY_MICROBIT_face_down,"face down"],[Oe.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(Oe.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("gesture"),i=Oe.Msg.MIXLY_MICROBIT_JS_CURRENT,n=Oe.Msg.MSG.catSensor,s=Oe.Msg.MIXLY_MICROBIT_JS_STATE,_=Oe.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:Oe.Msg.MIXLY_MICROBIT_shake,up:Oe.Msg.MIXLY_UP,down:Oe.Msg.MIXLY_DOWN,left:Oe.Msg.MIXLY_LEFT,right:Oe.Msg.MIXLY_RIGHT,"face up":Oe.Msg.MIXLY_MICROBIT_face_up,"face down":Oe.Msg.MIXLY_MICROBIT_face_down,freefall:Oe.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[t]+_}))}},zR={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Oe.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key"),i=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Oe.Msg.MIXLY_MICROBIT_Direction,s=Oe.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Oe.Msg.MIXLY_MICROBIT_Shiliang_Direction}[t]+n+s}))}},jR={init:function(){this.setColour(HR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},$R={init:function(){this.setColour(HR),this.appendValueInput("PIN",Number).appendField(new Oe.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Oe.FieldDropdown($R.METHOD),"WHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHAT");return{temperature:Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Oe.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[t]}))},METHOD:[[Oe.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Oe.Msg.MIXLY_GETHUMIDITY,"humidity"]]},ZR={init:function(){this.setColour(HR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},ec={init:function(){this.setColour(HR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},tc={init:function(){this.setColour(HR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.TEXT_TRIM_LEFT,"left"],[Oe.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(Oe.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("direction"),i=Oe.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=Oe.Msg.MIXLY_ESP32_NEAR;return i+{left:Oe.Msg.TEXT_TRIM_LEFT,right:Oe.Msg.TEXT_TRIM_RIGHT}[t]+n}))}},ic={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_ALTITUDE_SENSOR+" BMP280").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[Oe.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key");return{"get_BMP_temperature()":Oe.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":Oe.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[t]}))}},nc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+" SHT20").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[Oe.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key");return{"get_SHT_temperature()":Oe.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":Oe.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[t]}))}},sc={init:function(){this.setColour(HR),this.appendValueInput("PIN",Number).appendField("DS18X20 "+Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},_c={init:function(){this.setColour(HR),this.appendDummyInput("").appendField("LM35"+Oe.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Oe.Msg.MIXLY_TOOLTIP_LM35)}},oc={init:function(){this.setColour(HR),this.appendValueInput("I2CSUB").appendField(Oe.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SETUP+Oe.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_ESP32_EXTERN_LIGHT+"(LTR308ALS)","LTR308"],[Oe.Msg.MIXLY_COLOR_SENSOR+"(LTR381RGB)","LTR381RGB"],[Oe.Msg.MIXLY_COLOR_SENSOR+"(UCS12071)","UCS12071"],[Oe.Msg.MIXLY_EXTERN_LIGHTUV+"(LTR390UV)","LTR390UV"],[Oe.Msg.MIXLY_ALTITUDE_SENSOR+"(HP203X)","HP203X"],[Oe.Msg.MIXLY_ALTITUDE_SENSOR+"(SPL06_001)","SPL06_001"],[Oe.Msg.MIXLY_ALTITUDE_SENSOR+"(MS5611)","MS5611"],[Oe.Msg.MIXLY_ALTITUDE_SENSOR+"(BMP280)","BMP280"],[Oe.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHTC3)","SHTC3"],[Oe.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(AHT21)","AHT21"],[Oe.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHT20)","SHT20"],[Oe.Msg.MIXLY_LASER_RANGE_SENSOR+"(VL53L0X)","VL53L0X"],[Oe.Msg.MIXLY_GEOMAGNETIC_SENSOR+"(QMC5883L)","QMC5883L"],[Oe.Msg.MIXLY_ESP32_MAX30102+"(MAX30102)","MAX30102"],[Oe.Msg.HTML_COLOUR+"、"+Oe.Msg.MIXLY_ENVIRONMENT_LIGHT+"、"+Oe.Msg.MIXLY_NEXT+"、"+Oe.Msg.MIXLY_ESP32_APDS9960+"(APDS9960)","APDS9960"],[Oe.Msg.MIXLY_NINE_AXIS_SENSOR+"(MPU9250)","MPU9250"],[Oe.Msg.MixGo_MPU9250+"(ADXL345)","ADXL345"],["RFID","RFID"],[Oe.Msg.MIXLY_RADAR_SENSOR+"(CBR817)","CBR817"],[Oe.Msg.MIXLY_AipSpeech_asr+"(CI130X)","CI130X"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},pc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.LISTS_SET_INDEX_SET+Oe.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(Oe.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+Oe.Msg.MIXLY_DELAY_TIME_RANGE)}},ac={init:function(){this.setColour(HR),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RADAR).appendField(Oe.Msg.LISTS_SET_INDEX_SET+Oe.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(Oe.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+Oe.Msg.MIXLY_DELAY_TIME_RANGE)}},uc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},rc={init:function(){this.setColour(HR),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RADAR).appendField(Oe.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},lc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_IDENTIFY_ONCE_AND_SAVE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},dc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_HELLO_XIAOZHI,"1"],[Oe.Msg.MIXLY_XIAOZHIXIAOZHI,"2"],[Oe.Msg.MIXLY_THE_FIRST,"3"],[Oe.Msg.MIXLY_THE_SECOND,"4"],[Oe.Msg.MIXLY_THE_THIRD,"5"],[Oe.Msg.MIXLY_THE_FOURTH,"6"],[Oe.Msg.MIXLY_THE_FIFTH,"7"],[Oe.Msg.MIXLY_THE_SIXTH,"8"],[Oe.Msg.MIXLY_THE_SEVENTH,"9"],[Oe.Msg.MIXLY_THE_EIGHTH,"10"],[Oe.Msg.MIXLY_THE_NINTH,"11"],[Oe.Msg.MIXLY_THE_TENTH,"12"],[Oe.Msg.MIXLY_THE_ELEVENTH,"13"],[Oe.Msg.MIXLY_THE_TWELFTH,"14"],[Oe.Msg.MIXLY_THE_13TH,"15"],[Oe.Msg.MIXLY_THE_14TH,"16"],[Oe.Msg.MIXLY_THE_15TH,"17"],[Oe.Msg.MIXLY_THE_16TH,"18"],[Oe.Msg.MIXLY_THE_17TH,"19"],[Oe.Msg.MIXLY_THE_18TH,"20"],[Oe.Msg.MIXLY_THE_19TH,"21"],[Oe.Msg.MIXLY_THE_20TH,"22"],[Oe.Msg.MIXLY_Turn_on_the_lights,"23"],[Oe.Msg.MIXLY_Turn_off_the_lights,"24"],[Oe.Msg.MIXLY_Turn_up_the_brightness,"25"],[Oe.Msg.MIXLY_Turn_down_the_brightness,"26"],[Oe.Msg.MIXLY_Set_it_to_red,"27"],[Oe.Msg.MIXLY_Set_it_to_orange,"28"],[Oe.Msg.MIXLY_Set_it_to_yellow,"29"],[Oe.Msg.MIXLY_Set_it_to_green,"30"],[Oe.Msg.MIXLY_Set_it_to_cyan,"31"],[Oe.Msg.MIXLY_Set_it_to_blue,"32"],[Oe.Msg.MIXLY_Set_it_to_purple,"33"],[Oe.Msg.MIXLY_Set_it_to_white,"34"],[Oe.Msg.MIXLY_Turn_on_the_fan,"35"],[Oe.Msg.MIXLY_Turn_off_the_fan,"36"],[Oe.Msg.MIXLY_First_gear,"37"],[Oe.Msg.MIXLY_Wind_speed_second,"38"],[Oe.Msg.MIXLY_Third_gear,"39"],[Oe.Msg.MIXLY_Previous,"40"],[Oe.Msg.MIXLY_Next_page,"41"],[Oe.Msg.MIXLY_Show_smiley_face,"42"],[Oe.Msg.MIXLY_Show_crying_face,"43"],[Oe.Msg.MIXLY_Show_love,"44"],[Oe.Msg.MIXLY_Close_display,"45"],[Oe.Msg.MIXLY_Start_execution,"46"],[Oe.Msg.MIXLY_FORWARD,"47"],[Oe.Msg.MIXLY_BACKWARD,"48"],[Oe.Msg.MIXLY_TURNLEFT,"49"],[Oe.Msg.MIXLY_TURNRIGHT,"50"],[Oe.Msg.MIXLY_STOP,"51"],[Oe.Msg.MIXLY_Accelerate,"52"],[Oe.Msg.MIXLY_retard,"53"],[Oe.Msg.ROTATION_FORWARD,"54"],[Oe.Msg.ROTATION_BACKWARD,"55"],[Oe.Msg.MIXLY_Query_temperature,"56"],[Oe.Msg.MIXLY_Query_humidity,"57"],[Oe.Msg.MIXLY_Query_brightness,"58"],[Oe.Msg.MIXLY_Query_sound,"59"],[Oe.Msg.MIXLY_Query_time,"60"],[Oe.Msg.MIXLY_Query_distance,"61"],[Oe.Msg.MIXLY_Query_pressure,"62"],[Oe.Msg.MIXLY_Query_key,"63"],[Oe.Msg.MIXLY_Query_touch,"64"],[Oe.Msg.MIXLY_Query_color,"65"]]),"cmd").appendField(Oe.Msg.MIXLY_WHETHER+Oe.Msg.MIXLY_BE_IDENTIFIED),this.setOutput(!0),this.setInputsInline(!0)}},Ic={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_RECOGNIZED_STATE,"status1"],[Oe.Msg.MIXLY_WHETHER_BROADCAST,"status2"],[Oe.Msg.MIXLY_THE_RECOGNIZED_CMD,"result"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_CI130X_GET_THE_RECOGNIZED_STATE_TOOLTIP)}},Tc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MP3_PLAY).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[Oe.Msg.MIXLY_WIND_SPEED,"154"],[Oe.Msg.MIXLY_HYETAL,"155"],[Oe.Msg.MIXLY_TEMPERATURE,"156"],[Oe.Msg.MIXLY_Humidity,"157"],[Oe.Msg.MIXLY_Altitude,"158"],[Oe.Msg.MIXLY_SOUND,"159"],[Oe.Msg.MIXLY_BRIGHTNESS,"160"],[Oe.Msg.ME_GO_HALL_SENSOR_DISTANCE,"161"],[Oe.Msg.MIXLY_SERVO,"162"],[Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"163"],[Oe.Msg.MIXLY_BUTTON2,"164"],[Oe.Msg.MIXLY_ESP32_TOUCH,"165"],[Oe.Msg.MIXLY_PAY,"166"],[Oe.Msg.MIXLY_CARSH_CHANGE,"167"],[Oe.Msg.MIXLY_COUNTDOWN,"168"],[Oe.Msg.MIXLY_TIMING,"169"],[Oe.Msg.MIXLY_AT_THE_MOMENT,"170"],[Oe.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE,"171"],[Oe.Msg.MIXLY_FORWARD,"172"],[Oe.Msg.MIXLY_BACKWARD,"173"],[Oe.Msg.MIXLY_TURNLEFT,"174"],[Oe.Msg.MIXLY_TURNRIGHT,"175"],[Oe.Msg.MIXLY_STOP,"176"],[Oe.Msg.MIXLY_Accelerate,"177"],[Oe.Msg.MIXLY_retard,"178"],[Oe.Msg.ROTATION_FORWARD,"179"],[Oe.Msg.ROTATION_BACKWARD,"180"],[Oe.Msg.TUPLE_JOIN,"181"],[Oe.Msg.MIXLY_SHOW,"182"],[Oe.Msg.MIXLY_LAMPLIGHT,"183"],[Oe.Msg.MIXLY_ACCELERATION,"184"]]),"star"),this.appendValueInput("NUM").appendField(Oe.Msg.MIXLY_NUMBER),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_UNIT).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[Oe.Msg.MIXLY_YEAR,"117"],[Oe.Msg.MIXLY_MONTH,"118"],[Oe.Msg.MIXLY_DAY,"119"],[Oe.Msg.MIXLY_HOUR,"120"],[Oe.Msg.MIXLY_MINUTE,"121"],[Oe.Msg.MIXLY_SECOND,"122"],[Oe.Msg.MIXLY_WEEK2,"123"],[Oe.Msg.MIXLY_RMB_UNIT,"124"],[Oe.Msg.blockpy_setheading_degree,"125"],[Oe.Msg.MIXLY_GEAR,"126"],[Oe.Msg.MIXLY_LAYER,"127"],[Oe.Msg.MIXLY_GRAM,"128"],[Oe.Msg.MIXLY_METER,"129"],[Oe.Msg.MIXLY_CENTIMETER,"130"],[Oe.Msg.MIXLY_MILLIMETER,"131"],[Oe.Msg.MIXLY_LUMEN,"132"],[Oe.Msg.MIXLY_DECIBEL,"133"],[Oe.Msg.MIXLY_hectopascal,"134"],[Oe.Msg.MIXLY_PERCENT,"135"],[Oe.Msg.MIXLY_CELSIUS,"136"],[Oe.Msg.MIXLY_METER_PER_SEC,"137"],[Oe.Msg.MIXLY_MICROBIT_Turn_on_display,"138"],[Oe.Msg.MIXLY_MICROBIT_Turn_off_display,"139"],[Oe.Msg.MIXLY_SUCCESS,"140"],[Oe.Msg.MIXLY_FAILED,"141"],[Oe.Msg.MIXLY_WRONG,"142"],[Oe.Msg.MIXLY_GOOD,"143"],[Oe.Msg.MIXLY_blockpy_set_add,"144"],[Oe.Msg.MIXLY_DECREASE,"145"],[Oe.Msg.COLOUR_RGB_RED,"146"],[Oe.Msg.COLOUR_RGB_ORANGE,"147"],[Oe.Msg.COLOUR_YELLOW,"148"],[Oe.Msg.COLOUR_RGB_GREEN,"149"],[Oe.Msg.COLOUR_CYAN,"150"],[Oe.Msg.COLOUR_RGB_BLUE,"151"],[Oe.Msg.COLOUR_RGB_PURPLE,"152"],[Oe.Msg.COLOUR_RGB_WHITE,"153"]]),"end"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Mc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.LISTS_SET_INDEX_SET+Oe.Msg.MIXLY_SYSTEM+Oe.Msg.MIXLY_CMD).appendField(new Oe.FieldDropdown([[Oe.Msg.MILXY_ENTER_WAKE_UP,"1"],[Oe.Msg.MIXLY_INCREASE_VOLUME,"202"],[Oe.Msg.MIXLY_REDUCE_VOLUME,"203"],[Oe.Msg.MIXLY_MAX_VOLUME,"204"],[Oe.Msg.MIXLY_MINIMUM,"205"],[Oe.Msg.MIXLY_OPEN_RESPONSE,"206"],[Oe.Msg.MIXLY_CLOSE_RESPONSE,"207"],[Oe.Msg.MIXLY_QUIT_WAKE_UP,"208"]]),"cmd"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},hc={init:function(){this.setColour(HR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[Oe.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[Oe.Msg.MIXLY_ESP32_MAX30102_IR+","+Oe.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},mc={init:function(){this.setColour(HR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[Oe.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[Oe.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ec={init:function(){this.setColour(HR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308ALS"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},Oc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.HTML_COLOUR+Oe.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GET+Oe.Msg.HTML_COLOUR,"[2]"],[Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_IR_STRENGTH,"[1]"],[Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Rc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.HTML_COLOUR+Oe.Msg.MSG.catSensor+" UCS12071").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GET+"RGB"+Oe.Msg.HTML_COLOUR,"0"],[Oe.Msg.MIXLY_GET+Oe.Msg.MIXLY_RGB_RAW,"1"],[Oe.Msg.MIXLY_GET_ENV_LIGHT+Oe.Msg.MIXLY_BRIGHTNESS,"2"],[Oe.Msg.GET_IR_STRENGTH+Oe.Msg.MIXLY_BRIGHTNESS,"3"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},cc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GET_ENV_LIGHT,"E"],[Oe.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},gc={init:function(){this.setColour(HR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Cc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Oe.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key");return{temperature:Oe.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:Oe.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[t]}))}},Sc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Oe.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key");return{temperature:Oe.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:Oe.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[t]}))}},Ac={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_Altitude+Oe.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GETPRESSURE,"pressure()"],[Oe.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Oe.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Lc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_Altitude+Oe.Msg.MSG.catSensor+" SPL06_001").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GETPRESSURE,"pressure()"],[Oe.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Oe.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Nc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_Altitude+Oe.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_GETPRESSURE,"pressure()"],[Oe.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Oe.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Dc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_Altitude+Oe.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendValueInput("VAR").appendField(Oe.Msg.MIXLY_REF_TO_PRESSURE),this.appendDummyInput().appendField(Oe.Msg.MIXLY_CAL_TO_ALTITUDE),this.setOutput(!0,Number),this.setInputsInline(!0)}},fc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MIXGOPE_FIELD+Oe.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[Oe.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Fc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_shake,"shake"],[Oe.Msg.MIXLY_UP,"up"],[Oe.Msg.MIXLY_DOWN,"down"],[Oe.Msg.MIXLY_LEFT,"left"],[Oe.Msg.MIXLY_RIGHT,"right"],[Oe.Msg.MIXLY_MICROBIT_face_up,"face up"],[Oe.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("gesture"),i=Oe.Msg.MIXLY_MICROBIT_JS_CURRENT,n=Oe.Msg.MSG.catSensor,s=Oe.Msg.MIXLY_MICROBIT_JS_STATE,_=Oe.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:Oe.Msg.MIXLY_MICROBIT_shake,up:Oe.Msg.MIXLY_UP,down:Oe.Msg.MIXLY_DOWN,left:Oe.Msg.MIXLY_LEFT,right:Oe.Msg.MIXLY_RIGHT,"face up":Oe.Msg.MIXLY_MICROBIT_face_up,"face down":Oe.Msg.MIXLY_MICROBIT_face_down}[t]+_}))}},Pc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Oe.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key"),i=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Oe.Msg.MIXLY_MICROBIT_Direction,s=Oe.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Oe.Msg.MIXLY_MICROBIT_Shiliang_Direction}[t]+n+s}))}},Yc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_JS_GET+Oe.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new Oe.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key"),i=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Oe.Msg.MIXLY_MICROBIT_Direction,s=Oe.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":Oe.Msg.MIXLY_MICROBIT_Shiliang_Direction}[t]+n+s}))}},vc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Oe.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Oe.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("key"),i=Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Oe.Msg.MIXLY_MICROBIT_Direction,s=Oe.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":Oe.Msg.MIXLY_MICROBIT_Shiliang_Direction}[t]+n+s}))}},Xc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},yc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_GETTEMPERATUE)}},xc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("compass");return Oe.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:Oe.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:Oe.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[t]}))}},bc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},Vc={init:function(){this.setColour(HR),this.appendValueInput("SPISUB").appendField(Oe.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Oe.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SETUP+Oe.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Oe.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},Bc={init:function(){this.setColour(HR),this.appendDummyInput().appendField("RFID"+Oe.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Oe.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[Oe.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Gc={init:function(){this.setColour(HR),this.appendDummyInput().appendField("RFID"+Oe.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},Uc={init:function(){this.setColour(HR),this.appendDummyInput().appendField("RFID"+Oe.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Oe.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},wc={init:function(){this.setColour(HR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Oe.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Oe.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},kc={init:function(){this.setColour(HR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(Oe.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Oe.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(Oe.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},Hc={init:function(){this.setColour(HR),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_RFID_SCAN_OK,"0"],[Oe.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[Oe.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Wc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Oe.FieldDropdown([["全部(元组)","data()[0]"],["全部(json)","data()[1]"],["全部(json,附带位置信息)","data()[2]"],["编号","data()[0][0]"],["电量","data()[0][1]"],["风速","data()[0][2]"],["阵风","data()[0][3]"],["风向","data()[0][4]"],["雨量","data()[0][5]"],["温度","data()[0][6]"],["湿度","data()[0][7]"],["光照","data()[0][8]"],["紫外线","data()[0][9]"],["大气压","data()[0][10]"],["信号强度","data()[0][11]"],["信噪比","data()[0][12]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip("返回气象数据元组 data= (设备id,电池状态,风速m/s,阵风m/s,风向°,雨量mm,温度℃,湿度%,光照Lux,UVI,大气压Pa,信号强度dB,信噪比dB)")}},Kc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Jc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendValueInput("BASE").appendField("以主题"),this.appendDummyInput("").appendField("串口发送至MixIO"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Qc={init:function(){this.setColour(HR),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Oe.icons.MutatorIcon(["weather_set_label_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip()},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("weather_set_label_container");t.initSvg();for(var i=t.getInput("STACK").connection,n=0;n>6),i.push(128|63&_)):(2048<=_&&_<=55295||57344<=_&&_<=65535)&&(n+=3,i.push(224|15&_>>12),i.push(128|63&_>>6),i.push(128|63&_))}for(s=0;s>8,255&n].concat(i)}(e,!0),i="",n=0;n=0?"0x700000":["mixgo_sant"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==o?(t.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+_+", font_address="+p+")\n"):"16x8 Matrix"==o&&(t.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+_+")\n"),i},SP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".shows("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"},AP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".shows("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", space="+t.valueToCode(this,"space",t.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},LP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".frame("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"},NP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".frame("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", delay="+t.valueToCode(this,"time",t.ORDER_ASSIGNMENT)+")\n"},DP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".scroll("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"},fP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".scroll("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", speed="+t.valueToCode(this,"time",t.ORDER_ASSIGNMENT)+", space="+t.valueToCode(this,"space",t.ORDER_ASSIGNMENT)+")\n"},FP=function(e,t){var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},PP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+"."+e.getFieldValue("OP")+"("+t.valueToCode(e,"val",t.ORDER_ATOMIC)+")\n"},YP=function(e,t){return[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".pixel(int("+t.valueToCode(e,"x",t.ORDER_ATOMIC)+"), int("+t.valueToCode(e,"y",t.ORDER_ATOMIC)+"))",t.ORDER_ATOMIC]},vP=function(e,t){var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC);return i+".pixel(int("+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+"), int("+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+"), "+t.valueToCode(this,"STAT",t.ORDER_ATOMIC)+")\n"+i+".show()\n"},XP=function(e,t){return[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".get_brightness()",t.ORDER_ATOMIC]},yP=function(e,t){return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".set_brightness("+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+")\n"},xP=function(e,t){return[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+"."+e.getFieldValue("image"),t.ORDER_ATOMIC]},bP=function(e,t){return[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".map_"+e.getFieldValue("OP")+"("+t.valueToCode(e,"A",t.ORDER_ATOMIC)+", "+t.valueToCode(e,"B",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},VP=function(e,t){return[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".map_invert("+t.valueToCode(e,"A",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},BP=function(e,t){t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306";var i=t.valueToCode(this,"I2CSUB",t.ORDER_ATOMIC);return t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+t.valueToCode(this,"row",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"column",t.ORDER_ATOMIC)+", "+i+")\n"},GP=function(e,t){return t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306",t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".show_str("+(t.valueToCode(this,"Text_line1",t.ORDER_ASSIGNMENT)||"''")+", "+(t.valueToCode(this,"Text_line2",t.ORDER_ASSIGNMENT)||"''")+", "+(t.valueToCode(this,"Text_line3",t.ORDER_ASSIGNMENT)||"''")+", "+(t.valueToCode(this,"Text_line4",t.ORDER_ASSIGNMENT)||"''")+")\n"},UP=function(e,t){return t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306",t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".show_line("+t.valueToCode(this,"x1",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"y1",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"x2",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"y2",t.ORDER_ATOMIC)+", 1)\n"},wP=function(e,t){t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306";var i=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),n=t.valueToCode(this,"x",t.ORDER_ATOMIC),s=t.valueToCode(this,"y",t.ORDER_ATOMIC),_=t.valueToCode(this,"width",t.ORDER_ATOMIC),o=t.valueToCode(this,"height",t.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP");switch(p){case"True":return i+".show_fill_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n";case"False":return i+".show_rect("+n+", "+s+", "+_+", "+o+", "+a+")\n"}},kP=function(e,t){t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306";var i=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),n=t.valueToCode(this,"x",t.ORDER_ATOMIC),s=t.valueToCode(this,"y",t.ORDER_ATOMIC),_=t.valueToCode(this,"length",t.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+_+", 1)\n"},HP=function(e,t){return["ON"==this.getFieldValue("ONOFF")?"1":"0",t.ORDER_ATOMIC]},WP=function(e,t){t.definitions_.import_matrix="import matrix";var i=e.getFieldValue("OP");return[t.valueToCode(e,"img",t.ORDER_ATOMIC)+".shift_"+i+"("+t.valueToCode(e,"val",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},KP=function(e,t){var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC);return t.definitions_.import_ssd1306="import ssd1306",t.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},JP=function(e,t){return["matrix.Image."+this.getFieldValue("ANIMATION"),t.ORDER_ATOMIC]},QP=function(e,t){var i=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306";var n=t.valueToCode(this,"x",t.ORDER_ATOMIC),s=t.valueToCode(this,"y",t.ORDER_ATOMIC),_=t.valueToCode(this,"r",t.ORDER_ATOMIC),o="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(o){case"True":return i+".show_fill_circle("+n+", "+s+", "+_+", "+p+")\n";case"False":return i+".show_circle("+n+", "+s+", "+_+", "+p+")\n"}},qP=function(e,t){var i=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306";var n=t.valueToCode(this,"x0",t.ORDER_ATOMIC),s=t.valueToCode(this,"y0",t.ORDER_ATOMIC),_=t.valueToCode(this,"x1",t.ORDER_ATOMIC),o=t.valueToCode(this,"y1",t.ORDER_ATOMIC),p=t.valueToCode(this,"x2",t.ORDER_ATOMIC),a=t.valueToCode(this,"y2",t.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",r=this.getFieldValue("OP");switch(u){case"True":return i+".show_fill_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+_+", "+o+", "+p+", "+a+", "+r+")\n"}},zP=function(e,t){return t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306",t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".show_bitmap("+t.valueToCode(this,"START_X",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"START_Y",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"bitmap_name",t.ORDER_ATOMIC)+","+t.valueToCode(this,"WIDTH",t.ORDER_ATOMIC)+","+t.valueToCode(this,"HEIGHT",t.ORDER_ATOMIC)+")\n"},jP=function(e,t){return t.definitions_.import_machine="import machine",t.definitions_.import_ssd1306="import ssd1306",t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".show_pixel("+t.valueToCode(this,"POS_X",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"POS_Y",t.ORDER_ATOMIC)+")\n"},$P=function(e,t){var i,n=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),s=t.valueToCode(this,"I2CSUB",t.ORDER_ATOMIC),_=this.getFieldValue("key");return"TM1650"==_?(t.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+_+"("+s+")\n"):"TM1637"==_&&(t.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+_+"("+s+")\n"),i},ZP=function(e,t){return t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},eY=function(e,t){return t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".shownum("+t.valueToCode(this,"VALUE",t.ORDER_ATOMIC)+")\n"},tY=function(e,t){return t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".showDP("+t.valueToCode(this,"NO",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"STAT",t.ORDER_ATOMIC)+")\n"},iY=function(e,t){return t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+".intensity("+t.valueToCode(this,"VALUE",t.ORDER_ATOMIC)+")\n"},nY=function(e,t){t.definitions_.import_st7789="import st7789";var i=Re.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_sant"].indexOf(i)>=0?"0xE00000":"0x3A0000";var s=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),_=t.valueToCode(this,"SPISUB",t.ORDER_ATOMIC),o=t.valueToCode(this,"PINCS",t.ORDER_ATOMIC),p=t.valueToCode(this,"PINDC",t.ORDER_ATOMIC);return s+" = st7789.ST7789("+_+", "+t.valueToCode(this,"WIDTH",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"HEIGHT",t.ORDER_ATOMIC)+", dc_pin="+p+", cs_pin="+o+", rotation="+this.getFieldValue("rotate")+", font_address="+n+")\n"},sY=function(e,t){t.definitions_.import_st7789="import st7789";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"x",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),p=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".image("+n+", x="+s+", y="+_+", size="+o+", color="+p+")\n";else{const e=p.match(/\d+/g);var u="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");a=i+".image("+n+", x= "+s+",y="+_+", size="+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},_Y=function(e,t){var i="0x"+this.getFieldValue("COLOR").slice(1);return["0x"+((16252928&i)>>8|(64512&i)>>5|(255&i)>>3).toString(16),t.ORDER_ATOMIC]},oY=function(e,t){t.definitions_.import_st7789="import st7789";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"x",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),p=t.valueToCode(this,"space",t.ORDER_ASSIGNMENT),a=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==a.slice(0,2))var r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color="+a+")\n";else{const e=a.match(/\d+/g);var l="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");r=i+".shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+u+", color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+")\n"}return r},pY=function(e,t){t.definitions_.import_st7789="import st7789";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"time",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p=i+".frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const e=o.match(/\d+/g);var a="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");p=i+".frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},aY=function(e,t){t.definitions_.import_st7789="import st7789";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"time",t.ORDER_ASSIGNMENT),p=t.valueToCode(this,"space",t.ORDER_ASSIGNMENT),a=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const e=a.match(/\d+/g);var r="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");u=i+".scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},uY=function(e,t){return t.definitions_.import_st7789="import st7789",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},rY=function(e,t){t.definitions_.import_st7789="import st7789";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(this,"x1",t.ORDER_ATOMIC),s=t.valueToCode(this,"y1",t.ORDER_ATOMIC),_=t.valueToCode(this,"x2",t.ORDER_ATOMIC),o=t.valueToCode(this,"y2",t.ORDER_ATOMIC),p=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".line("+n+", "+s+", "+_+", "+o+", color="+p+")\n";else{const e=p.match(/\d+/g);var u="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");a=i+".line("+n+", "+s+", "+_+", "+o+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},lY=function(e,t){var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(this,"I2CSUB",t.ORDER_ATOMIC),s=this.getFieldValue("key"),_=t.valueToCode(this,"ADDR",t.ORDER_ATOMIC);return t.definitions_.import_i2clcd="import i2clcd",i+" = i2clcd.LCD("+n+", lcd_width="+s+", i2c_addr="+_+")\n"},dY=function(e,t){return t.definitions_.import_i2clcd="import i2clcd",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".shows("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", column="+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+", line="+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+",center = "+this.getFieldValue("center")+")\n"},IY=function(e,t){return t.definitions_.import_i2clcd="import i2clcd",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".print("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", column="+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+", line="+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+", delay="+t.valueToCode(this,"time",t.ORDER_ASSIGNMENT)+")\n"},TY=function(e,t){return t.definitions_.import_i2clcd="import i2clcd",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},MY=function(e,t){return t.definitions_.import_i2clcd="import i2clcd",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".clear()\n"},hY=function(e,t){var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(this,"I2CSUB",t.ORDER_ATOMIC),s=t.valueToCode(this,"ADDR",t.ORDER_ATOMIC),_=this.getFieldValue("driver"),o=Re.Boards.getSelectedBoardKey().split(":")[2],p="";return p=["mpython","mixgo_pe","mixgo_nova"].indexOf(o)>=0?"0x700000":["mixgo_sant"].indexOf(o)>=0?"0xE00000":"0x3A0000",t.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+", address="+s+", font_address="+p+", types="+_+")\n"},mY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".image("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"},EY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".image("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", x="+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+", y="+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+", size="+t.valueToCode(this,"size",t.ORDER_ASSIGNMENT)+")\n"},OY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".shows("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"},RY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".shows("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", x="+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+", y="+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+", size="+t.valueToCode(this,"size",t.ORDER_ASSIGNMENT)+", space="+t.valueToCode(this,"space",t.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},cY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".frame("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"},gY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".frame("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", size="+t.valueToCode(this,"size",t.ORDER_ASSIGNMENT)+", delay="+t.valueToCode(this,"time",t.ORDER_ASSIGNMENT)+")\n"},CY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".scroll("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"},SY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".scroll("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", y="+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+", size="+t.valueToCode(this,"size",t.ORDER_ASSIGNMENT)+", speed="+t.valueToCode(this,"time",t.ORDER_ASSIGNMENT)+", space="+t.valueToCode(this,"space",t.ORDER_ASSIGNMENT)+")\n"},AY=function(e,t){t.definitions_.import_oled128x64="import oled128x64";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},LY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+"."+e.getFieldValue("OP")+"("+t.valueToCode(e,"val",t.ORDER_ATOMIC)+")\n"},NY=function(e,t){return t.definitions_.import_oled128x64="import oled128x64",[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".pixel(int("+t.valueToCode(e,"x",t.ORDER_ATOMIC)+"), int("+t.valueToCode(e,"y",t.ORDER_ATOMIC)+"))",t.ORDER_ATOMIC]},DY=function(e,t){t.definitions_.import_oled128x64="import oled128x64";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC);return i+".pixel(int("+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+"), int("+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+"), "+t.valueToCode(this,"STAT",t.ORDER_ATOMIC)+")\n"+i+".show()\n"},fY=function(e,t){t.definitions_.import_oled128x64="import oled128x64";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(e,"x",t.ORDER_ATOMIC),s=t.valueToCode(e,"y",t.ORDER_ATOMIC),_=t.valueToCode(e,"w",t.ORDER_ATOMIC),o=t.valueToCode(e,"h",t.ORDER_ATOMIC),p=e.getFieldValue("state");return i+"."+e.getFieldValue("shape")+"("+n+", "+s+", "+_+", "+o+", "+p+")\n"+i+".show()\n"},FY=function(e,t){t.definitions_.import_oled128x64="import oled128x64";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),n=t.valueToCode(e,"x",t.ORDER_ATOMIC),s=t.valueToCode(e,"y",t.ORDER_ATOMIC),_=t.valueToCode(e,"length",t.ORDER_ATOMIC),o=e.getFieldValue("state");return i+"."+("0"==e.getFieldValue("dir_h_v")?"v":"h")+"line("+n+", "+s+", "+_+", "+o+")\n"+i+".show()\n"},PY=function(e,t){t.definitions_.import_oled128x64="import oled128x64";var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC);return i+".line("+t.valueToCode(e,"x1",t.ORDER_ATOMIC)+", "+t.valueToCode(e,"y1",t.ORDER_ATOMIC)+", "+t.valueToCode(e,"x2",t.ORDER_ATOMIC)+", "+t.valueToCode(e,"y2",t.ORDER_ATOMIC)+", "+e.getFieldValue("state")+")\n"+i+".show()\n"},YY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT);if("Python ESP32-S3"===Re.JSFuncs.getPlatform()){t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var s="onboard_tft.image("+(n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT))+", color=0xffff,sync="+(t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True")+")\n"}else if("educore"==i){t.definitions_["import_"+i+"_oled"]="from "+i+" import oled";s="oled.print("+n+")\n"}else{t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.shows("+n+")\n"}return s},vY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"space",t.ORDER_ASSIGNMENT),_=this.getFieldValue("center");if("mixgo_sant"==i||"mixgo_nova"==i)return t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+", space="+s+", center="+_+",sync="+(t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True")+")\n";if("educore"==i){t.definitions_["import_"+i+"_oled"]="from "+i+" import oled"}return t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+", space="+s+", center="+_+")\n"},XY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){t.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var s="onboard_oled.frame("+n+")\n"}else if("Python ESP32-S3"===Re.JSFuncs.getPlatform()){t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";s="onboard_tft.frame("+(n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT))+", color=0xffff)\n"}else{t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.frame("+n+")\n"}return s},yY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"time",t.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){t.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var _="onboard_oled.frame("+(n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT))+", delay="+s+")\n"}else if("Python ESP32-S3"===Re.JSFuncs.getPlatform()){t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";_="onboard_tft.frame("+n+", size=5 , delay="+s+", color=0xffff)\n"}else{t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";_="onboard_matrix.frame("+n+", delay="+s+")\n"}return _},xY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i||"educore"==i){t.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.scroll("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"}else if("Python ESP32-S3"===Re.JSFuncs.getPlatform()){t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";n="onboard_tft.scroll("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+", color=0xffff)\n"}else{t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.scroll("+t.valueToCode(this,"data",t.ORDER_ASSIGNMENT)+")\n"}return n},bY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"time",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"space",t.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){t.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var o="onboard_oled.scroll("+n+", speed="+s+", space="+_+")\n"}else if("Python ESP32-S3"===Re.JSFuncs.getPlatform()){t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";o="onboard_tft.scroll("+n+", y=0, size=5, speed="+s+", space="+_+", color=0xffff)\n"}else{t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";o="onboard_matrix.scroll("+n+", speed="+s+", space="+_+")\n"}return o},VY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"time",t.ORDER_ASSIGNMENT),p=t.valueToCode(this,"space",t.ORDER_ASSIGNMENT),a=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color="+a+")\n";else{const e=a.match(/\d+/g);var r="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");u="onboard_tft.scroll("+n+", y="+s+", size="+_+", speed="+o+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},BY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];return t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+e.getFieldValue("image"),t.ORDER_ATOMIC]},GY=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Re.JSFuncs.getPlatform()){const i=e.getFieldValue("image").split(".");if(2!==i.length)throw Error("pin value error");t.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`;var n=i[1]}else{t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix."+e.getFieldValue("image")}return[n,t.ORDER_ATOMIC]},UY=function(e,t){var i={"#000000":"0","#ff0000":"1"};function n(e){let t="";if(e.length%2==1&&(e="0"+e),e.length<8){let t=8-e.length;for(let i=1;i<=t;i++)e="0"+e}for(let i=1;i<=e.length;i++)i%2==0&&i!==e.length?t=t+e[i-1]+",0x":t+=e[i-1];return"0x"+t}let s=[];for(let t=0;t<12;t++){let _="",o=0,p=0;for(let n=0;n<32;n++)n<8?p=7-n:n<16?p=23-n:n<24?p=39-n:n<32&&(p=55-n),o+=Number(i[e.getFieldValue(t+"-"+n)])*Math.pow(2,31-p);_+=n(o.toString(16)),s.unshift(_)}let _=[];for(let e=0;e>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},Av=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];return t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.picture("+t.valueToCode(this,"x",t.ORDER_ASSIGNMENT)+","+t.valueToCode(this,"y",t.ORDER_ASSIGNMENT)+","+t.valueToCode(this,"direct",t.ORDER_ASSIGNMENT)+")\n"},Lv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"x",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),p=t.valueToCode(this,"space",t.ORDER_ASSIGNMENT),a=this.getFieldValue("center"),u=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True",r=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==r.slice(0,2))var l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color="+r+",sync="+u+")\n";else{const e=r.match(/\d+/g);var d="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");l="onboard_tft.shows("+n+", x="+s+", y="+_+", size="+o+", space="+p+", center="+a+", color=0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+",sync="+u+")\n"}return l},Nv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"time",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==o.slice(0,2))var p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color="+o+")\n";else{const e=o.match(/\d+/g);var a="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");p="onboard_tft.frame("+n+", size="+s+", delay="+_+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},Dv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(e,"x",t.ORDER_ATOMIC),s=t.valueToCode(e,"y",t.ORDER_ATOMIC),_=t.valueToCode(e,"w",t.ORDER_ATOMIC),o=t.valueToCode(e,"h",t.ORDER_ATOMIC),p=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),a=e.getFieldValue("shape"),u=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", "+p+",sync="+u+")\n";else{const e=p.match(/\d+/g);var l="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");r="onboard_tft."+a+"("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+",sync="+u+")\n"}return r},fv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(e,"x",t.ORDER_ATOMIC),s=t.valueToCode(e,"y",t.ORDER_ATOMIC),_=t.valueToCode(e,"length",t.ORDER_ATOMIC),o=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),p=e.getFieldValue("dir_h_v"),a=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", "+o+",sync="+a+")\n";else{const e=o.match(/\d+/g);var r="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},Fv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(e,"x1",t.ORDER_ATOMIC),s=t.valueToCode(e,"y1",t.ORDER_ATOMIC),_=t.valueToCode(e,"x2",t.ORDER_ATOMIC),o=t.valueToCode(e,"y2",t.ORDER_ATOMIC),p=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),a=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const e=p.match(/\d+/g);var r="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");u="onboard_tft.line("+n+", "+s+", "+_+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},Pv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];return t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["onboard_tft.pixel(int("+t.valueToCode(e,"x",t.ORDER_ATOMIC)+"), int("+t.valueToCode(e,"y",t.ORDER_ATOMIC)+"))",t.ORDER_ATOMIC]},Yv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(this,"x",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),o=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var p="onboard_tft.pixel(int("+n+"), int("+s+"), "+_+",sync="+o+")\n";else{const e=_.match(/\d+/g);var a="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");p="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+",sync="+o+")\n"}return p},vv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(this,"VAR",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True";if("0x"==n.slice(0,2))var _="onboard_tft.fill("+n+",sync="+s+")\n";else{const e=n.match(/\d+/g);var o="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");_="onboard_tft.fill(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+",sync="+s+")\n"}return _},Xv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=t.valueToCode(this,"x",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"SUB",t.ORDER_ASSIGNMENT),p=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=o+"=Clock("+n+", "+s+", "+_+", "+p+")\n";else{const e=p.match(/\d+/g);var u="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");a=o+"=Clock("+n+", "+s+", "+_+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},yv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];return t.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",t.valueToCode(this,"SUB",t.ORDER_ASSIGNMENT)+".set_rtctime()\n"},xv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];return t.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",t.valueToCode(this,"SUB",t.ORDER_ASSIGNMENT)+".set_time("+t.valueToCode(this,"h",t.ORDER_ASSIGNMENT)+", "+t.valueToCode(this,"m",t.ORDER_ASSIGNMENT)+", "+t.valueToCode(this,"s",t.ORDER_ASSIGNMENT)+")\n"},bv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];return t.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",t.valueToCode(this,"SUB",t.ORDER_ASSIGNMENT)+".draw_clock()\n"},Vv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=t.valueToCode(this,"SUB",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==s.slice(0,2))var _=n+".clear("+s+")\n";else{const e=s.match(/\d+/g);var o="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");_=n+".clear(0x"+((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)+")\n"}return _},Bv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(e,"x",t.ORDER_ATOMIC),s=t.valueToCode(e,"y",t.ORDER_ATOMIC),_=t.valueToCode(e,"r",t.ORDER_ATOMIC),o=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),p=e.getFieldValue("shape"),a=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", "+o+", "+p+",sync="+a+")\n";else{const e=o.match(/\d+/g);var r="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");u="onboard_tft.ellipse("+n+", "+s+", "+_+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+", "+p+",sync="+a+")\n"}return u},Gv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===Re.JSFuncs.getPlatform()){t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n="onboard_tft.pointern(angle="+t.valueToCode(this,"angle",t.ORDER_ASSIGNMENT)+")\n"}else{t.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.pointern(angle="+t.valueToCode(this,"angle",t.ORDER_ASSIGNMENT)+")\n"}return n},Uv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(this,"angle",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);if("0x"==s.slice(0,2));else{const e=s.match(/\d+/g);var _="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)}return"onboard_tft.pointern(angle="+n+")\n"},wv=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=t.valueToCode(this,"data",t.ORDER_ASSIGNMENT),s=t.valueToCode(this,"x",t.ORDER_ASSIGNMENT),_=t.valueToCode(this,"y",t.ORDER_ASSIGNMENT),o=t.valueToCode(this,"size",t.ORDER_ASSIGNMENT),p=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),a=t.valueToCode(this,"boolean",t.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color="+p+",sync="+a+")\n";else{const e=p.match(/\d+/g);var r="0x"+((parseInt(e[0])<<16)+(parseInt(e[1])<<8)+parseInt(e[2])).toString(16).padStart(4,"0");u="onboard_tft.texts("+n+", x="+s+", y="+_+", size="+o+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},kv=YY,Hv=zY,Wv=JY,Kv=zY,Jv=jY,Qv=kY,qv=function(e,t){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return t.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},zv=function(e,t){var i=this.getFieldValue("module");return t.definitions_["import_"+i]="import "+i,""},jv=function(e,t){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+t.statementToCode(this,"do")+"})\n"},aG=function(){return"control.reset()\n"},uG=function(e,t){return"control.waitMicros("+(t.valueToCode(this,"data",t.ORDER_ATOMIC)||Re.Profile.default.serial)+")\n"},rG=function(e,t){return"control.raiseEvent("+(t.valueToCode(this,"system_event_bus_source",t.ORDER_ATOMIC)||Re.Profile.default.serial)+", "+(t.valueToCode(this,"system_event_bus_value",t.ORDER_ATOMIC)||Re.Profile.default.serial)+")\n"},lG=function(e,t){return"control.onEvent("+(t.valueToCode(this,"system_event_bus_source",t.ORDER_ATOMIC)||Re.Profile.default.serial)+", "+(t.valueToCode(this,"system_event_bus_value",t.ORDER_ATOMIC)||Re.Profile.default.serial)+", () => {\n"+t.statementToCode(this,"do")+")\n"},dG=function(e,t){return["control.eventTimestamp()",t.ORDER_ATOMIC]},IG=function(e,t){return["control.eventValue()",t.ORDER_ATOMIC]},TG=function(e,t){return[this.getFieldValue("key"),t.ORDER_ATOMIC]},MG=function(e,t){return[this.getFieldValue("key"),t.ORDER_ATOMIC]},hG=function(e,t){return["control.deviceName()",t.ORDER_ATOMIC]},mG=function(e,t){return["control.deviceSerialNumber()",t.ORDER_ATOMIC]},EG=function(e,t){return"panic("+(t.valueToCode(this,"STATUS_CODE",t.ORDER_ATOMIC)||"1000")+")\n"},OG=function(e,t){switch(t.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",t.ORDER_ATOMIC];case"us":return["time.ticks_us()",t.ORDER_ATOMIC]}},RG=function(){return"while True:\n pass\n"},cG=function(e,t){return t.definitions_.import_mixgo="import mixgo","reset()\n"},gG=function(e,t){return t.definitions_.import_os="import os","os.uname()"},CG=function(e,t){t.definitions_.import_time="import time";var i=t.valueToCode(this,"DELAY_TIME",t.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},SG=function(e,t){t.definitions_.import_time="import time";var i=t.valueToCode(this,"DELAY_TIME",t.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},AG=function(e,t){return t.definitions_.import_mixgo="import mixgo",(t.valueToCode(this,"VAR",t.ORDER_NONE)||"None")+".init(period="+(t.valueToCode(this,"period",t.ORDER_NONE)||"0")+", mode=Timer."+(t.valueToCode(this,"mode",t.ORDER_NONE)||"None")+", callback="+(t.valueToCode(this,"callback",t.ORDER_NONE)||"None")+")\n"},LG=function(e,t){return t.definitions_.import_machine="import machine",(t.valueToCode(this,"VAR",t.ORDER_NONE)||"None")+".init(period = "+(t.valueToCode(this,"period",t.ORDER_NONE)||"0")+", mode=machine.Timer."+this.getFieldValue("mode")+", callback="+(t.valueToCode(this,"callback",t.ORDER_NONE)||"None")+")\n"},NG=function(e,t){return t.definitions_.import_time="import time",["time.ticks_diff("+(t.valueToCode(this,"END",t.ORDER_NONE)||"0")+", "+(t.valueToCode(this,"START",t.ORDER_NONE)||"0")+")",t.ORDER_ATOMIC]},DG=function(e,t){var i=t.valueToCode(this,"SUB",t.ORDER_ATOMIC);return t.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},fG=function(e,t){return t.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(t.valueToCode(this,"period",t.ORDER_NONE)||"0")+")\n"},FG=function(e,t){t.definitions_.import_machine="import machine";return"wdt.feed()\n"},PG=function(e,t){t.definitions_.import_machine="import machine";return"machine.reset()\n"},YG=function(e,t){t.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},vG=DG,XG=LG,yG=NG,xG=CG,bG=function(e,t){return t.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+t.valueToCode(this,"key",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"addr",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},VG=function(e,t){return t.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+t.valueToCode(this,"key",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"addr",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"day",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},BG=function(e,t){return t.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api.weather_hourly("+t.valueToCode(this,"key",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"addr",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"hour",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},GG=function(e,t){return t.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+t.valueToCode(this,"key",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"addr",t.ORDER_ATOMIC)+")\n"},UG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_now.analysis()";else n='Weather_now.analysis("'+i+'")';return[n,t.ORDER_ATOMIC]},wG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Air_now.analysis()";else n='Air_now.analysis("'+i+'")';return[n,t.ORDER_ATOMIC]},kG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_alarm.analysis()";else n='Weather_alarm.analysis("'+i+'")';return[n,t.ORDER_ATOMIC]},HG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Life_suggestion.analysis()";else n='Life_suggestion.analysis("'+i+'")';return[n,t.ORDER_ATOMIC]},WG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Tide_daily.analysis()";else n='Tide_daily.analysis("'+i+'")';return[n,t.ORDER_ATOMIC]},KG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Location_search.analysis()";else n='Location_search.analysis("'+i+'")';return[n,t.ORDER_ATOMIC]},JG=function(e,t){return t.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+t.valueToCode(this,"key",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"addr",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"day",t.ORDER_ATOMIC)+")\n"},QG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=t.valueToCode(this,"day",t.ORDER_ATOMIC);if("none"==i)var s="Weather_daily.analysis("+n+")";else s="Weather_daily.analysis("+n+', "'+i+'")';return[s,t.ORDER_ATOMIC]},qG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=t.valueToCode(this,"day",t.ORDER_ATOMIC);if("none"==i)var s="Air_daily.analysis("+n+")";else s="Air_daily.analysis("+n+', "'+i+'")';return[s,t.ORDER_ATOMIC]},zG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=t.valueToCode(this,"day",t.ORDER_ATOMIC);if("none"==i)var s="Geo_sun.analysis("+n+")";else s="Geo_sun.analysis("+n+', "'+i+'")';return[s,t.ORDER_ATOMIC]},jG=function(e,t){t.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=t.valueToCode(this,"day",t.ORDER_ATOMIC);if("none"==i)var s="Geo_moon.analysis("+n+")";else s="Geo_moon.analysis("+n+', "'+i+'")';return[s,t.ORDER_ATOMIC]},$G=new Oe.Generator("Python");$G.INDENT=" ",$G.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),$G.ORDER_ATOMIC=0,$G.ORDER_COLLECTION=1,$G.ORDER_STRING_CONVERSION=1,$G.ORDER_UNARY_POSTFIX=1,$G.ORDER_UNARY_PREFIX=2,$G.ORDER_MEMBER=2.1,$G.ORDER_FUNCTION_CALL=2.2,$G.ORDER_EXPONENTIATION=3,$G.ORDER_UNARY_SIGN=4,$G.ORDER_BITWISE_NOT=4,$G.ORDER_MULTIPLICATIVE=5,$G.ORDER_ADDITIVE=6,$G.ORDER_BITWISE_SHIFT=7,$G.ORDER_BITWISE_AND=8,$G.ORDER_BITWISE_XOR=9,$G.ORDER_BITWISE_OR=10,$G.ORDER_RELATIONAL=11,$G.ORDER_EQUALITY=11,$G.ORDER_LOGICAL_NOT=12,$G.ORDER_LOGICAL_AND=13,$G.ORDER_LOGICAL_OR=14,$G.ORDER_ASSIGNMENT=14,$G.ORDER_CONDITIONAL=15,$G.ORDER_LAMBDA=16,$G.ORDER_NONE=99,$G.ORDER_OVERRIDES=[[$G.ORDER_FUNCTION_CALL,$G.ORDER_MEMBER],[$G.ORDER_FUNCTION_CALL,$G.ORDER_FUNCTION_CALL],[$G.ORDER_MEMBER,$G.ORDER_MEMBER],[$G.ORDER_MEMBER,$G.ORDER_FUNCTION_CALL]],$G.init=function(){$G.PASS=this.INDENT+"pass\n",$G.definitions_=Object.create(null),$G.functionNames_=Object.create(null),$G.setups_=Object.create(null),$G.loops_=Object.create(null),$G.codeEnd_=Object.create(null),$G.variableDB_?$G.variableDB_.reset():$G.variableDB_=new Se($G.RESERVED_WORDS_)},$G.finish=function(e){""!==e&&(e=(e=e.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var t=[],i=[],n=[];for(var s in this.definitions_){var _=this.definitions_[s];0===s.indexOf("import")?t.push(_):0===s.indexOf("var_declare")?i.push(_):n.push(_)}t.length&&t.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var o=[];for(var s in $G.functions_)o.push($G.functions_[s]);o.length&&o.push("\n");var p=[];for(var s in $G.setups_)p.push($G.setups_[s]);p.length&&p.push("\n");var a=[];for(var s in $G.loops_)a.push($G.loops_[s]);var u=[];for(var s in $G.codeEnd_)u.push($G.codeEnd_[s]);0!==u.length&&u.push("\n");let r="";return r=a.length>0?t.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+e+"while True:\n"+a.join("")+u.join("\n"):t.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+p.join("")+e+u.join("\n"),r},$G.scrubNakedValue=function(e){return e+"\n"},$G.quote_=function(e){var t="'";return-1!==(e=e.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===e.indexOf('"')?t='"':e=e.replace(/'/g,"\\'")),t+e+t},$G.multiline_quote_=function(e){return"'''"+(e=e.replace(/'''/g,"\\'\\'\\'"))+"'''"},$G.scrub_=function(e,t,i){var n="";if(!e.outputConnection||!e.outputConnection.targetConnection){(_=e.getCommentText())&&(_=Oe.utils.string.wrap(_,$G.COMMENT_WRAP-3),n+=$G.prefixLines(_+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const ZG={};ZG["元控青春"]={description:"MicroPython[ESP32C3 MixGo CE]",digital_pin:Re.Profile.generate(["0-18","21","33-48"]),input_pin:Re.Profile.generate(["0-18","21","33-48"]),output_pin:Re.Profile.generate(["0-18","21","33-48"]),pwm_input:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_input:Re.Profile.generate(["1-18"],"adc","adc"),pwm_output:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_output:Re.Profile.generate(["1-18"],"adc","adc"),espnow_channel:Re.Profile.generate(["1-13"]),haskylens_model:Re.Profile.generate(["0-4"]),digital:Re.Profile.generate(["0-18","21","33-48"],"pin","pin"),pwm_pin:Re.Profile.generate(["0-18","21","33-48"]),pwm:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_pin:Re.Profile.generate(["1-18"]),analog:Re.Profile.generate(["1-18"],"adc","adc"),touch:Re.Profile.generate(["1-14"],"tc","tc"),touch_pin:Re.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Re.Profile.generate(["0-4"]),exlcdh:Re.Profile.generate(["0-15"]),exlcdv:Re.Profile.generate(["0-7"]),brightness:Re.Profile.generate(["0-9"]),tts_voice:Re.Profile.generate(["0-16"]),tts_builtin_music:Re.Profile.generate(["0-47"]),tts_bgmusic:Re.Profile.generate(["0-15"]),builtinimg:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["DOOR_CLOSE","object_picture.DOOR_CLOSE"],["DOOR_OPEN","object_picture.DOOR_OPEN"],["DOOR_OPENING","object_picture.DOOR_OPENING"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","spk_midi.DADADADUM"],["ENTERTAINER","spk_midi.ENTERTAINER"],["PRELUDE","spk_midi.PRELUDE"],["ODE","spk_midi.ODE"],["NYAN","spk_midi.NYAN"],["RINGTONE","spk_midi.RINGTONE"],["FUNK","spk_midi.FUNK"],["BLUES","spk_midi.BLUES"],["BIRTHDAY","spk_midi.BIRTHDAY"],["WEDDING","spk_midi.WEDDING"],["FUNERAL","spk_midi.FUNERAL"],["PUNCHLINE","spk_midi.PUNCHLINE"],["PYTHON","spk_midi.PYTHON"],["BADDY","spk_midi.BADDY"],["CHASE","spk_midi.CHASE"],["BA_DING","spk_midi.BA_DING"],["WAWAWAWAA","spk_midi.WAWAWAWAA"],["JUMP_UP","spk_midi.JUMP_UP"],["JUMP_DOWN","spk_midi.JUMP_DOWN"],["POWER_UP","spk_midi.POWER_UP"],["POWER_DOWN","spk_midi.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},ZG["元控自强"]={description:"MicroPython[ESP32C3 MixGo CE]",digital_pin:Re.Profile.generate(["0-18","21","33-48"]),input_pin:Re.Profile.generate(["0-18","21","33-48"]),output_pin:Re.Profile.generate(["0-18","21","33-48"]),pwm_input:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_input:Re.Profile.generate(["1-18"],"adc","adc"),pwm_output:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_output:Re.Profile.generate(["1-18"],"adc","adc"),espnow_channel:Re.Profile.generate(["1-13"]),haskylens_model:Re.Profile.generate(["0-4"]),digital:Re.Profile.generate(["0-18","21","33-48"],"pin","pin"),pwm_pin:Re.Profile.generate(["0-18","21","33-48"]),pwm:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_pin:Re.Profile.generate(["1-18"]),analog:Re.Profile.generate(["1-18"],"adc","adc"),touch:Re.Profile.generate(["1-14"],"tc","tc"),touch_pin:Re.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Re.Profile.generate(["0-4"]),exlcdh:Re.Profile.generate(["0-15"]),exlcdv:Re.Profile.generate(["0-7"]),brightness:Re.Profile.generate(["0-9"]),tts_voice:Re.Profile.generate(["0-16"]),tts_builtin_music:Re.Profile.generate(["0-47"]),tts_bgmusic:Re.Profile.generate(["0-15"]),builtinimg:ZG["元控青春"].builtinimg,builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]},ZG["ESP32S2 Generic"]={description:"MicroPython[ESP32C3 MixGo CC]",digital_pin:Re.Profile.generate(["0-18","21","33-48"]),input_pin:Re.Profile.generate(["0-18","21","33-48"]),output_pin:Re.Profile.generate(["0-18","21","33-48"]),pwm_input:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_input:Re.Profile.generate(["1-18"],"adc","adc"),pwm_output:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_output:Re.Profile.generate(["1-18"],"adc","adc"),espnow_channel:Re.Profile.generate(["1-13"]),haskylens_model:Re.Profile.generate(["0-4"]),digital:Re.Profile.generate(["0-18","21","33-48"],"pin","pin"),pwm_pin:Re.Profile.generate(["0-18","21","33-48"]),pwm:Re.Profile.generate(["0-18","21","33-48"],"pwm","pwm"),analog_pin:Re.Profile.generate(["1-18"]),analog:Re.Profile.generate(["1-18"],"adc","adc"),touch:Re.Profile.generate(["1-14"],"tc","tc"),touch_pin:Re.Profile.generate(["1-14"]),button:[["B1","B1key"],["B2","B2key"],["A1","A1key"],["A2","A2key"],["A3","A3key"],["A4","A4key"]],buttonB:[["B1","B1key"],["B2","B2key"]],axis:Re.Profile.generate(["0-4"]),exlcdh:Re.Profile.generate(["0-15"]),exlcdv:Re.Profile.generate(["0-7"]),brightness:Re.Profile.generate(["0-9"]),tts_voice:Re.Profile.generate(["0-16"]),tts_builtin_music:Re.Profile.generate(["0-47"]),tts_bgmusic:Re.Profile.generate(["0-15"]),builtinimg:ZG["元控青春"].builtinimg,builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","matrix.Image.ALL_CLOCKS"],["ALL_ARROWS","matrix.Image.ALL_ARROWS"]],playlist:[["DADADADUM",".DADADADUM"],["ENTERTAINER",".ENTERTAINER"],["PRELUDE",".PRELUDE"],["ODE",".ODE"],["NYAN",".NYAN"],["RINGTONE",".RINGTONE"],["FUNK",".FUNK"],["BLUES",".BLUES"],["BIRTHDAY",".BIRTHDAY"],["WEDDING",".WEDDING"],["FUNERAL",".FUNERAL"],["PUNCHLINE",".PUNCHLINE"],["PYTHON",".PYTHON"],["BADDY",".BADDY"],["CHASE",".CHASE"],["BA_DING",".BA_DING"],["WAWAWAWAA",".WAWAWAWAA"],["JUMP_UP",".JUMP_UP"],["JUMP_DOWN",".JUMP_DOWN"],["POWER_UP",".POWER_UP"],["POWER_DOWN",".POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"]]};const eU=ZG,tU=20,iU={init:function(){this.setColour(tU),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_HIGH,"HIGH"],[Oe.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},nU={init:function(){this.setColour(tU),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(Oe.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},sU={init:function(){this.setColour(tU),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Oe.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},_U={init:function(){this.setColour(tU),this.appendValueInput("PIN",Number).appendField("DAC"+Oe.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Oe.Msg.MIXLY_VALUE2).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_TOOLTIP)}},oU={init:function(){this.setColour(tU),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendDummyInput().appendField(Oe.Msg.MIXLY_MICROBIT_JS_PERIOD_MIL).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_mSecond,"period"],[Oe.Msg.MIXLY_uSecond,"period_microseconds"]]),"key"),this.appendValueInput("NUM",Number).appendField(Oe.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_SET_TOOLTIP)}},pU={init:function(){this.setColour(tU),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_Analog_PINMODEIN).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_REF_VOLTAGE+Oe.Msg.MIXLY_STAT).appendField(new Oe.FieldDropdown([["3.3V","machine.ADC.ATTN_11DB"],["2.2V","machine.ADC.ATTN_6DB"],["1.5V","machine.ADC.ATTN_2_5DB"],["1.2V","machine.ADC.ATTN_0DB"]]),"atten"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_ANALOG_ATTEN_TOOLTIP)}},aU={init:function(){this.setColour(tU),this.appendValueInput("pin").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Oe.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(Oe.Msg.MIXLY_ESP32_MACHINE_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_TOOLTIP)}},uU={init:function(){this.setColour(20),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_ATTACHINTERRUPT_PIN).setCheck(Number),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MODE).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Oe.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Oe.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Oe.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},rU={init:function(){this.setColour(20),this.appendDummyInput().appendField(Oe.Msg.MIXLY_SETUP).appendField(new Oe.FieldTextInput("pin#"),"PIN_OBJ"),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROPYTHON_AS).appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_Digital_PINMODEOUT,"machine.Pin.OUT"],[Oe.Msg.MIXLY_Digital_PINMODEIN,"machine.Pin.IN"],[Oe.Msg.MIXLY_PINMODEPULLUP,"machine.Pin.IN, machine.Pin.PULL_UP"],[Oe.Msg.MIXLY_PINMODEPULLDOWN,"machine.Pin.IN, machine.Pin.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)},getVars:function(){return["pin#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(t,"PIN_OBJ")}},lU={init:function(){this.setColour(tU),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SETUP).appendField(new Oe.FieldTextInput("dac#"),"PIN_OBJ").appendField(Oe.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField("DAC"+Oe.Msg.MIXLY_Analog_PINMODEOUT),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_INIT_TOOLTIP)},getVars:function(){return["dac#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(t,"PIN_OBJ")}},dU={init:function(){this.setColour(tU),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_SETUP).appendField(new Oe.FieldTextInput("tc#"),"PIN_OBJ").appendField(Oe.Msg.MIXLY_MICROPYTHON_AS),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendValueInput("PIN",Number).appendField(Oe.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_INIT_TOOLTIP)},getVars:function(){return["tc#"==this.getFieldValue("PIN_OBJ")?null:this.getFieldValue("PIN_OBJ")]},renameVar:function(e,t){Oe.Names.equals(e,this.getFieldValue("PIN_OBJ"))&&this.setTitleValue(t,"PIN_OBJ")}},IU={init:function(){this.setColour(tU),this.appendValueInput("PIN",Number).appendField("PWM"+Oe.Msg.MIXLY_Analog_PINMODEOUT).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Oe.Msg.MIXLY_FREQUENCY+Oe.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Oe.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_SET_FREQ_TOOLTIP)}},TU=rU,MU=dU,hU=aU,mU=uU,EU=230,OU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.digital),"PIN"),this.setOutput(!0)}},RU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},cU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},gU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},CU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},SU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},AU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},LU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},NU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},DU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},fU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},FU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},PU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},YU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},vU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},XU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},yU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.analog),"PIN"),this.setOutput(!0)}},xU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},bU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.dac),"PIN"),this.setOutput(!0)}},VU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},BU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},GU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.buttonB),"PIN"),this.setOutput(!0,Number)}},UU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.pwm),"PIN"),this.setOutput(!0)}},wU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},kU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},HU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.touch),"PIN"),this.setOutput(!0)}},WU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},KU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},JU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},QU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.imglist),"PIN"),this.setOutput(!0)}},qU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.playlist),"PIN"),this.setOutput(!0)}},zU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},jU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},$U={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},ZU={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},ew={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},tw={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},iw={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},nw={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},sw={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},_w={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},ow={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},pw={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.one_more),"PIN"),this.setOutput(!0)}},aw={init:function(){this.setColour(EU),this.appendDummyInput("").appendField(new Oe.FieldDropdown(Re.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},uw={init:function(){if("mixgo_me"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="ME G1";this.setColour(40),this.appendDummyInput().appendField(e).appendField("RFID"+Oe.Msg.MIXLY_RFID_READ_CARD),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},rw={init:function(){if("mixgo_me"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="ME G1";this.setColour(40),this.appendDummyInput().appendField(e).appendField("RFID"+Oe.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SECTOR").appendField(Oe.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(Oe.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,Number),this.setInputsInline(!0)}},lw={init:function(){if("mixgo_me"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="ME G1";this.setColour(40),this.appendDummyInput().appendField(e).appendField(Oe.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Oe.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Oe.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},dw={init:function(){if("mixgo_me"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="ME G1";this.setColour(40),this.appendDummyInput().appendField(e).appendField(Oe.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Oe.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Oe.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(Oe.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0)}},Iw={init:function(){if("mixgo_me"==Re.Boards.getSelectedBoardKey().split(":")[2])var e="ME G1";this.setColour(40),this.appendDummyInput().appendField(e).appendField("RFID"),this.appendDummyInput("").appendField(new Oe.FieldDropdown([[Oe.Msg.MIXLY_RFID_SCAN_OK,"True"],[Oe.Msg.MIXLY_RFID_SCAN_NOTAGERR,"None"],[Oe.Msg.MIXLY_RFID_SCAN_ERROR,"False"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Tw=function(e,t){return["HIGH"==this.getFieldValue("BOOL")?"1":"0",t.ORDER_ATOMIC]},Mw=function(e,t){t.definitions_.import_machine="import machine";var i="";return i+=t.valueToCode(this,"PIN",t.ORDER_ATOMIC)+".value("+t.valueToCode(this,"STAT",t.ORDER_ATOMIC)+")\n"},hw=function(e,t){t.definitions_.import_machine="import machine";return[t.valueToCode(this,"PIN",t.ORDER_ATOMIC)+".value()",t.ORDER_ATOMIC]},mw=function(e,t){return t.definitions_.import_machine="import machine",t.valueToCode(this,"PIN",t.ORDER_ATOMIC)+".write("+t.valueToCode(this,"NUM",t.ORDER_ATOMIC)+")\n"},Ew=function(e,t){t.definitions_.import_machine="import machine";var i=t.valueToCode(this,"PIN",t.ORDER_ATOMIC),n=t.valueToCode(this,"NUM",t.ORDER_ATOMIC);return i+".set_analog_"+this.getFieldValue("key")+"("+n+")\n"},Ow=function(e,t){return t.definitions_.import_machine="import machine",[t.valueToCode(this,"pin",t.ORDER_ATOMIC)+".read()",t.ORDER_ATOMIC]},Rw=function(e,t){t.definitions_.import_machine="import machine";var i=t.valueToCode(this,"PIN",t.ORDER_ATOMIC),n=this.getFieldValue("mode");return"machine.Pin("+i+").irq(handler = "+t.valueToCode(this,"DO",t.ORDER_ATOMIC)+", trigger = "+n+")\n"},cw=function(e,t){t.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"pin#",n=t.valueToCode(this,"PIN",t.ORDER_ATOMIC),s=this.getFieldValue("MODE");return("pin#"==i?"pin"+n:t.variableDB_.getName(i,Oe.Variables.NAME_TYPE))+" = machine.Pin("+n+", "+s+")\n"},gw=function(e,t){t.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"dac#",n=t.valueToCode(this,"PIN",t.ORDER_ATOMIC);return("dac#"==i?"dac"+n:t.variableDB_.getName(i,Oe.Variables.NAME_TYPE))+" = machine.DAC(machine.Pin("+n+"))\n"},Cw=function(e,t){return t.definitions_.import_machine="import machine",t.valueToCode(this,"PIN",t.ORDER_ATOMIC)+".atten("+this.getFieldValue("atten")+")\n"},Sw=function(e,t){t.definitions_.import_machine="import machine";var i=this.getFieldValue("PIN_OBJ")||"tc#",n=t.valueToCode(this,"PIN",t.ORDER_ATOMIC);return("tc#"==i?"tc"+n:t.variableDB_.getName(i,Oe.Variables.NAME_TYPE))+" = machine.TouchPad(machine.Pin("+n+"))\n"},Aw=function(e,t){return[this.getFieldValue("PIN"),t.ORDER_ATOMIC]},Lw=Aw,Nw=Aw,Dw=Aw,fw=Aw,Fw=Aw,Pw=Aw,Yw=Aw,vw=Aw,Xw=Aw,yw=Aw,xw=Aw,bw=Aw,Vw=Aw,Bw=Aw,Gw=Aw,Uw=Aw,ww=Aw,kw=Aw,Hw=Aw,Ww=Aw,Kw=Aw,Jw=Aw,Qw=Aw,qw=Aw,zw=Aw,jw=Aw,$w=Aw,Zw=Aw,ek=Aw,tk=Aw,ik=Aw,nk=Aw,sk=Aw,_k=Aw,ok=Aw,pk=Aw,ak=Aw,uk=Aw,rk=Aw,lk=Aw,dk=Aw,Ik=Aw,Tk=Aw,Mk=function(e,t){const i=this.getFieldValue("PIN").split(".");if(2!==i.length)throw Error("pin value error");return t.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`,[i[1],t.ORDER_ATOMIC]},hk=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_mini"==i){t.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var n='ext_rfid.read_card(0, x="id")'}else if("mixgo_sant"==i){t.definitions_.import_sant_gx_ext_rfid="from sant_gx import ext_rfid";n='ext_rfid.read_card(0, x="id")'}else{t.definitions_.import_mini_g2="import mini_g2";n='mini_g2.ext_rc522.read_card(0, x="id")'}return[n,t.ORDER_ATOMIC]},mk=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"SECTOR",t.ORDER_ATOMIC);if("mixgo_mini"==i){t.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var s="ext_rfid.read_card("+n+")"}else if("mixgo_sant"==i){t.definitions_.import_sant_gx_ext_rfid="from sant_gx import ext_rfid";s="ext_rfid.read_card("+n+")"}else{t.definitions_.import_mini_g2="import mini_g2";s="mini_g2.ext_rc522.read_card("+n+")"}return[s,t.ORDER_ATOMIC]},Ek=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"SECTOR",t.ORDER_ATOMIC),s=t.valueToCode(this,"CONTENT",t.ORDER_ATOMIC);if("mixgo_mini"==i){t.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var _="ext_rfid.write_card("+s+","+n+")\n"}else if("mixgo_sant"==i){t.definitions_.import_sant_gx_ext_rfid="from sant_gx import ext_rfid";_="ext_rfid.write_card("+s+","+n+")\n"}else{t.definitions_.import_mini_g2="import mini_g2";_="mini_g2.ext_rc522.write_card("+s+","+n+")\n"}return _},Ok=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=t.valueToCode(this,"SECTOR",t.ORDER_ATOMIC),s=t.valueToCode(this,"CONTENT",t.ORDER_ATOMIC);if("mixgo_mini"==i){t.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var _="ext_rfid.write_card("+s+","+n+")"}else if("mixgo_sant"==i){t.definitions_.import_sant_gx_ext_rfid="from sant_gx import ext_rfid";_="ext_rfid.write_card("+s+","+n+")"}else{t.definitions_.import_mini_g2="import mini_g2";_="mini_g2.ext_rc522.write_card("+s+","+n+")"}return[_,t.ORDER_ATOMIC]},Rk=function(e,t){var i=Re.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("key");if("mixgo_mini"==i){t.definitions_.import_mini_g2_ext_rfid="from mini_g2 import ext_rfid";var s="ext_rfid.scan_card()=="+n}else if("mixgo_sant"==i){t.definitions_.import_sant_gx_ext_rfid="from sant_gx import ext_rfid";s="ext_rfid.scan_card()=="+n}else{t.definitions_.import_mini_g2="import mini_g2";s="mini_g2.ext_rc522.scan_card()=="+n}return[s,t.ORDER_ATOMIC]};Object.assign(Oe.Variables,ge),Object.assign(Oe.Procedures,Xu),Oe.Python=yu,Oe.generator=yu,Re.Profile.default={},Object.assign(Re.Profile,eU),Object.assign(Re.Profile.default,eU["元控青春"]),Object.assign(Oe.Blocks,t,i,n,s,_,o,p,a,u,r,l,d,I,b,W,H,v,V,K,f,P,k,w,U,B,F,D,N,y,X,x,Y,G,Ie,Te,Me),Object.assign(Oe.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,ne,le,re,Z,se,de,q,z,ue,ae,pe,_e,j,Q,J,te,ee,ie,$,oe,he,me,Ee)})(); \ No newline at end of file diff --git a/boards/default/micropython_k210_mixgoai/index.xml b/boards/default/micropython_k210_mixgoai/index.xml index 251320f9..b910573c 100644 --- a/boards/default/micropython_k210_mixgoai/index.xml +++ b/boards/default/micropython_k210_mixgoai/index.xml @@ -1 +1 @@ -666610006506irp_funcirp_func610510,1,2,3051itestThreadtestThreadWHILETRUEHello Mixly from Thread!ms101000tim_callbacktim_callback5000#ff000090151100a10.998124.82110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly12365a0MixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixPYI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xfilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0MixlyMixlyMixly,HelloMixlyprompt67MixlyMixly0XFF00FFcode6i2c67400000i2ci2c00i2c00i2ci2cspi20000010045spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345bufow12owowow12345ow12345ow89MixGo AI12345MixGo AI123455socksockmixly.orgsock192.168.0.180sock5sockdatasock1024sockRGB312RGB0000RGB660Motori2cMotor100Motor10241024PID0.400PID01SPK8910MIC8910/sd/MixGo.wavSPK80/sd/MixGo.wavMIC10/sd/MixGo.aviSPK80/sd/MixGo.aviMIC10sensor.B240X240100224224150000000x0000#000000img0x0000#00000000MixGo AI0XFFFF#FFFFFF0X0000#00000089MixGo AI12345mixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012mixio.xbed.cnKPU/sd/MixGoAI.kmodelKPU0.50.35anchorKPUimgKPUimgyolo2calss5MixGo.aiMixGo.aicalssimgASRni-haoASR0.1ASRASRimgimgMixGo.jpgimgimgMixGo.jpgimg0,00xFFFF#FFFFFFimg0,0img0,0,240,240img20imgimgimg00你好,米思齐0xFFFF#FFFFFF12img00MixGo AI0xFFFF#FFFFFF1img160,1201.01.0img10,20,30,400xFFFF#FFFFFF1img10,20,30,400xFFFF#FFFFFF1img10,200xFFFF#FFFFFF130img40,30,200xFFFF#FFFFFF1img10,20,30,400xFFFF#FFFFFF1img1.01.0img3img15img0.050.05img110img110img160,1200xFFFF#FFFFFF0.050.05imgimgimg71,95,-60,-41,-128,12700img1-1,-1,-1, -1,8,-1, -1,-1,-1linecirclerectimg0,0,240,24010002525img0,0,240,2401015img0,0,240,240200021002101010img0,0,240,24010000img71,95,-60,-41,-128,1270,0,240,2400,0,00,0,00,0,0255blobhistogram0.5img71,95,-60,-41,-128,1270,0,240,24020020010img0,0,240,240barcodeqrcodeapriltagimg0,0,240,240img0,0,240,240img0,0,240,240responsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponse \ No newline at end of file +666610006506irp_funcirp_func610510,1,2,3051itestThreadtestThreadWHILETRUEHello Mixly from Thread!ms101000tim_callbacktim_callback5000#ff000090151100a10.998124.82110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly12365a0MixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixPYI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xfilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0MixlyMixlyMixly,HelloMixlyprompt67MixlyMixly0XFF00FFcode6i2c67400000i2ci2c00i2c00i2ci2cspi20000010045spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345bufow12owowow12345ow12345ow89MixGo AI12345MixGo AI123455socksockmixly.orgsock192.168.0.180sock5sockdatasock1024sockRGB312RGB0000RGB660Motori2cMotor100Motor10241024PID0.400PID01SPK8910MIC8910/sd/MixGo.wavSPK80/sd/MixGo.wavMIC10/sd/MixGo.aviSPK80/sd/MixGo.aviMIC10sensor.B240X240100224224150000000x0000#000000img0x0000#00000000MixGo AI0XFFFF#FFFFFF0X0000#00000089MixGo AI12345mixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012mixio.xbed.cnKPU/sd/MixGoAI.kmodelKPU0.50.35anchorKPUimgKPUimgyolo2calss5MixGo.aiMixGo.aicalssimgASRni-haoASR0.1ASRASRimgimgMixGo.jpgimgimgMixGo.jpgimg0,00xFFFF#FFFFFFimg0,0img0,0,240,240img20imgimgimg00你好,米思齐0xFFFF#FFFFFF12img00MixGo AI0xFFFF#FFFFFF1img160,1201.01.0img10,20,30,400xFFFF#FFFFFF1img10,20,30,400xFFFF#FFFFFF1img10,200xFFFF#FFFFFF130img40,30,200xFFFF#FFFFFF1img10,20,30,400xFFFF#FFFFFF1img1.01.0img3img15img0.050.05img110img110img160,1200xFFFF#FFFFFF0.050.05imgimgimg71,95,-60,-41,-128,12700img1-1,-1,-1, -1,8,-1, -1,-1,-1linecirclerectimg0,0,240,24010002525img0,0,240,2401015img0,0,240,240200021002101010img0,0,240,24010000img71,95,-60,-41,-128,1270,0,240,2400,0,00,0,00,0,0255blobhistogram0.5img71,95,-60,-41,-128,1270,0,240,24020020010img0,0,240,240barcodeqrcodeapriltagimg0,0,240,240img0,0,240,240img0,0,240,240responsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponse \ No newline at end of file diff --git a/boards/default/micropython_k210_mixgoai/main.bundle.95d07ed5.js b/boards/default/micropython_k210_mixgoai/main.bundle.95d07ed5.js new file mode 100644 index 00000000..d95bdadc --- /dev/null +++ b/boards/default/micropython_k210_mixgoai/main.bundle.95d07ed5.js @@ -0,0 +1,21 @@ +(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>Ft,controls_typeLists:()=>vt,lists_zip:()=>Pt,lists_zip_container:()=>Vt,lists_zip_item:()=>yt,unpack_iterable_object:()=>Yt,variables_change:()=>Lt,variables_get:()=>Dt,variables_global:()=>ft,variables_set:()=>Nt});var i={};t.r(i),t.d(i,{base_setup:()=>Xt,controls_delay:()=>Gt,controls_end_program:()=>xt,controls_except:()=>$t,controls_finally:()=>te,controls_flow_statements:()=>Kt,controls_for:()=>jt,controls_forEach:()=>Bt,controls_for_range:()=>Qt,controls_if:()=>Ut,controls_if_else:()=>zt,controls_if_elseif:()=>Jt,controls_if_if:()=>qt,controls_lambda:()=>ie,controls_main:()=>kt,controls_pass:()=>ne,controls_range:()=>Ht,controls_repeat_ext:()=>ee,controls_thread:()=>se,controls_try:()=>Zt,controls_try_finally:()=>Wt,controls_whileUntil:()=>wt,datetime_fromtimestamp:()=>_e,do_while:()=>oe,garbage_collection:()=>pe,gene_unique_identifier:()=>re,get_mem_alloc:()=>ue,get_mem_free:()=>ae,get_unique_identifier:()=>le});var n={};t.r(n),t.d(n,{base_map:()=>Pe,generate_cartesian_product:()=>ye,math_arithmetic:()=>me,math_bit:()=>ce,math_constant:()=>Te,math_constant_mp:()=>he,math_constrain:()=>Se,math_dec:()=>Me,math_degree_to_radian:()=>be,math_indexer_number:()=>Ne,math_map:()=>De,math_max_min:()=>Ce,math_number:()=>Ie,math_number_base_conversion:()=>Ae,math_radian_to_degree:()=>Ye,math_random:()=>ge,math_random_seed:()=>Le,math_round:()=>fe,math_selfcalcu:()=>Oe,math_to_int:()=>Ee,math_trig:()=>Re,text_to_number:()=>Fe,text_to_number_skulpt:()=>ve,turn_to_int:()=>Ve});var s={};t.r(s),t.d(s,{ascii_to_char:()=>He,char_to_ascii:()=>Be,number_to_text:()=>we,os_system:()=>hi,text:()=>Xe,text_capital:()=>$e,text_center:()=>ti,text_char:()=>xe,text_char_at:()=>je,text_char_at2:()=>Ke,text_char_at3:()=>ri,text_compareTo:()=>_i,text_compare_to:()=>Ze,text_create_with_container:()=>ui,text_create_with_item:()=>ai,text_encode:()=>Ii,text_equals_starts_ends:()=>ze,text_eval:()=>Ti,text_find:()=>ei,text_format:()=>pi,text_format_noreturn:()=>di,text_join:()=>Ue,text_join_seq:()=>ii,text_length:()=>We,text_random_char:()=>Qe,text_replace:()=>ni,text_split:()=>si,text_strip:()=>oi,text_substring:()=>Je,text_substring2:()=>qe,text_substring3:()=>li,text_textarea:()=>Ge});var o={};t.r(o),t.d(o,{ENUMERATE:()=>zi,content_in_lists:()=>$i,enumerate:()=>Zi,list_many_input:()=>Xi,list_tolist:()=>Hi,list_tolist2:()=>Ji,list_trig:()=>Yi,lists_2d_get_col_row_data:()=>Mi,lists_2d_get_data_with_col_row:()=>Ri,lists_append_extend:()=>Di,lists_change_to:()=>ki,lists_change_to_general:()=>xi,lists_clear:()=>vi,lists_create_with:()=>Ei,lists_create_with2:()=>Bi,lists_create_with_container:()=>Ai,lists_create_with_item:()=>gi,lists_create_with_noreturn:()=>Gi,lists_create_with_text:()=>Ci,lists_create_with_text2:()=>wi,lists_del_general:()=>Ui,lists_find:()=>yi,lists_getIndex3:()=>Wi,lists_getSublist3:()=>Ki,lists_get_index:()=>Oi,lists_get_random_item:()=>Ni,lists_get_random_sublist:()=>Li,lists_get_sublist:()=>ci,lists_insert_value:()=>fi,lists_insert_value2:()=>Qi,lists_pop:()=>Vi,lists_remove_at:()=>Pi,lists_remove_at2:()=>qi,lists_reverse:()=>Fi,lists_setIndex3:()=>ji,lists_set_index:()=>Si,lists_sort:()=>bi});var p={};t.r(p),t.d(p,{dicts_add_change_del:()=>mn,dicts_add_or_change:()=>an,dicts_clear:()=>rn,dicts_create_with:()=>en,dicts_create_with_container:()=>nn,dicts_create_with_item:()=>sn,dicts_create_with_noreturn:()=>Rn,dicts_deldict:()=>hn,dicts_delete:()=>ln,dicts_get:()=>pn,dicts_get_default:()=>un,dicts_items:()=>dn,dicts_keys:()=>on,dicts_length:()=>Tn,dicts_pop:()=>On,dicts_setdefault:()=>cn,dicts_to_json:()=>En,dicts_to_json2:()=>gn,dicts_to_to:()=>An,dicts_todict:()=>Mn,dicts_update:()=>_n,dicts_values:()=>In,json_to_dicts:()=>Cn});var u={};t.r(u),t.d(u,{logic_boolean:()=>Fn,logic_compare:()=>Dn,logic_compare_continous:()=>Nn,logic_is:()=>yn,logic_is_in:()=>Vn,logic_negate:()=>fn,logic_null:()=>vn,logic_operation:()=>Ln,logic_tobool:()=>Yn,logic_true_or_false:()=>Pn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>ss,sdcard_use_spi_init:()=>ns,storage_can_write_ornot:()=>wn,storage_change_dir:()=>es,storage_close_file:()=>Kn,storage_delete_file:()=>Qn,storage_file_seek:()=>zn,storage_file_tell:()=>Jn,storage_file_write:()=>xn,storage_fileopen:()=>kn,storage_fileopen_new:()=>Xn,storage_fileopen_new_encoding:()=>Gn,storage_get_a_line:()=>Bn,storage_get_contents:()=>Hn,storage_get_contents_without_para:()=>Un,storage_get_current_dir:()=>Zn,storage_get_file_size:()=>qn,storage_get_filename:()=>Wn,storage_is_file:()=>is,storage_list_all_files:()=>jn,storage_make_dir:()=>$n,storage_open_file_with_os:()=>bn,storage_rename:()=>ts});var l={};t.r(l),t.d(l,{procedures_callnoreturn:()=>ls,procedures_callreturn:()=>_s,procedures_defnoreturn:()=>os,procedures_defreturn:()=>ps,procedures_ifreturn:()=>rs,procedures_mutatorarg:()=>as,procedures_mutatorcontainer:()=>us,procedures_return:()=>ds});var _={};t.r(_),t.d(_,{tuple_change_to:()=>gs,tuple_create_with:()=>Ts,tuple_create_with_container:()=>hs,tuple_create_with_item:()=>ms,tuple_create_with_noreturn:()=>Ls,tuple_create_with_text2:()=>Os,tuple_create_with_text_return:()=>cs,tuple_del:()=>Es,tuple_find:()=>Ss,tuple_getIndex:()=>Rs,tuple_getSublist:()=>Ns,tuple_get_random_item:()=>Fs,tuple_get_sublist:()=>fs,tuple_input:()=>Ps,tuple_join:()=>Cs,tuple_length:()=>Ms,tuple_max:()=>As,tuple_totuple:()=>vs,tuple_trig:()=>Ds});var r={};t.r(r),t.d(r,{set_add_discard:()=>Hs,set_clear:()=>Gs,set_create_with:()=>ys,set_create_with_container:()=>Ys,set_create_with_item:()=>bs,set_create_with_text_return:()=>Ws,set_length:()=>ks,set_operate:()=>xs,set_operate_update:()=>Us,set_pop:()=>Xs,set_sub:()=>Bs,set_toset:()=>Ks,set_update:()=>ws});var d={};t.r(d),t.d(d,{html_content:()=>zs,html_content_more:()=>Zs,html_document:()=>Qs,html_form:()=>to,html_head_body:()=>Js,html_style:()=>$s,html_style_color:()=>io,html_style_content:()=>eo,html_text:()=>no,html_title:()=>qs});var I={};t.r(I),t.d(I,{attribute_access:()=>co,function_call:()=>ho,function_call_container:()=>mo,function_call_item:()=>Oo,raw_block:()=>po,raw_empty:()=>ao,raw_expression:()=>uo,raw_table:()=>oo,text_comment:()=>lo,text_print_multiple:()=>ro,text_print_multiple_container:()=>Io,text_print_multiple_item:()=>To,type_check:()=>_o});var T={};t.r(T),t.d(T,{controls_type:()=>Ao,controls_typeLists:()=>go,lists_zip:()=>So,unpack_iterable_object:()=>Do,variables_change:()=>Eo,variables_get:()=>Ro,variables_global:()=>Co,variables_set:()=>Mo});var h={};t.r(h),t.d(h,{Panic_with_status_code:()=>bo,base_setup:()=>Lo,controls_delay:()=>Yo,controls_flow_statements:()=>yo,controls_for:()=>vo,controls_forEach:()=>Uo,controls_for_range:()=>Po,controls_if:()=>fo,controls_interrupts:()=>Go,controls_lambda:()=>Bo,controls_main:()=>No,controls_millis:()=>ko,controls_nointerrupts:()=>xo,controls_pass:()=>Wo,controls_range:()=>Ho,controls_repeat:()=>$o,controls_repeat_ext:()=>Qo,controls_thread:()=>Ko,controls_try_finally:()=>Fo,controls_whileUntil:()=>Vo,datetime_fromtimestamp:()=>tp,do_while:()=>jo,garbage_collection:()=>qo,gene_unique_identifier:()=>ep,get_mem_alloc:()=>Jo,get_mem_free:()=>zo,get_unique_identifier:()=>Zo,reset:()=>Xo,time_sleep:()=>wo});var m={};t.r(m),t.d(m,{base_map:()=>Cp,generate_cartesian_product:()=>gp,math_arithmetic:()=>pp,math_bit:()=>op,math_constant:()=>np,math_constant_mp:()=>sp,math_constrain:()=>hp,math_dec:()=>_p,math_degree_to_radian:()=>Dp,math_indexer_number:()=>cp,math_map:()=>Tp,math_max_min:()=>dp,math_number:()=>ip,math_number_base_conversion:()=>mp,math_radian_to_degree:()=>Sp,math_random:()=>Ip,math_random_seed:()=>Op,math_round:()=>Rp,math_selfcalcu:()=>up,math_single:()=>ap,math_to_int:()=>rp,math_trig:()=>lp,text_to_number:()=>Mp,text_to_number_skulpt:()=>Ep,turn_to_int:()=>Ap});var O={};t.r(O),t.d(O,{ascii_to_char:()=>vp,char_to_ascii:()=>Pp,number_to_text:()=>Vp,os_system:()=>iu,text:()=>Np,text_capital:()=>Hp,text_center:()=>Bp,text_char:()=>fp,text_char_at:()=>bp,text_char_at2:()=>Yp,text_char_at3:()=>$p,text_compareTo:()=>Zp,text_compare_to:()=>Gp,text_encode:()=>tu,text_equals_starts_ends:()=>Xp,text_eval:()=>eu,text_find:()=>wp,text_format:()=>qp,text_format_noreturn:()=>Jp,text_join:()=>Fp,text_join_seq:()=>Wp,text_length:()=>yp,text_random_char:()=>kp,text_replace:()=>Kp,text_split:()=>jp,text_strip:()=>Qp,text_substring:()=>Up,text_substring2:()=>xp,text_substring3:()=>zp,text_textarea:()=>Lp});var c={};t.r(c),t.d(c,{content_in_lists:()=>bu,enumerate:()=>Yu,list_many_input:()=>Cu,list_tolist:()=>Vu,list_tolist2:()=>yu,list_trig:()=>Ru,lists_2d_get_col_row_data:()=>ou,lists_2d_get_data_with_col_row:()=>su,lists_append_extend:()=>_u,lists_change_to:()=>Eu,lists_change_to_general:()=>gu,lists_clear:()=>hu,lists_create_with:()=>pu,lists_create_with2:()=>Du,lists_create_with_noreturn:()=>Au,lists_create_with_text:()=>uu,lists_create_with_text2:()=>Nu,lists_del_general:()=>Su,lists_find:()=>mu,lists_getIndex3:()=>Lu,lists_getSublist3:()=>fu,lists_get_index:()=>au,lists_get_random_item:()=>ru,lists_get_random_sublist:()=>du,lists_get_sublist:()=>nu,lists_insert_value:()=>Iu,lists_insert_value2:()=>vu,lists_pop:()=>cu,lists_remove_at:()=>Ou,lists_remove_at2:()=>Pu,lists_reverse:()=>Tu,lists_setIndex3:()=>Fu,lists_set_index:()=>lu,lists_sort:()=>Mu});var R={};t.r(R),t.d(R,{dicts_add_change_del:()=>qu,dicts_add_or_change:()=>Uu,dicts_clear:()=>wu,dicts_create_with:()=>ku,dicts_create_with_noreturn:()=>Zu,dicts_deldict:()=>Qu,dicts_delete:()=>Hu,dicts_get:()=>Gu,dicts_get_default:()=>xu,dicts_items:()=>Wu,dicts_keys:()=>Xu,dicts_length:()=>ju,dicts_pop:()=>Ju,dicts_setdefault:()=>zu,dicts_to_json:()=>ta,dicts_to_json2:()=>na,dicts_to_to:()=>ia,dicts_todict:()=>$u,dicts_update:()=>Bu,dicts_values:()=>Ku,json_to_dicts:()=>ea});var M={};t.r(M),t.d(M,{logic_boolean:()=>aa,logic_compare:()=>sa,logic_compare_continous:()=>oa,logic_is:()=>da,logic_is_in:()=>ra,logic_negate:()=>ua,logic_null:()=>la,logic_operation:()=>pa,logic_tobool:()=>Ia,logic_true_or_false:()=>_a});var E={};t.r(E),t.d(E,{sdcard_mount:()=>ba,sdcard_use_spi_init:()=>Ya,storage_can_write_ornot:()=>Ca,storage_change_dir:()=>Fa,storage_close_file:()=>ga,storage_delete_file:()=>Da,storage_file_seek:()=>fa,storage_file_tell:()=>La,storage_file_write:()=>ca,storage_fileopen:()=>ha,storage_fileopen_new:()=>ma,storage_fileopen_new_encoding:()=>Oa,storage_get_a_line:()=>Ea,storage_get_contents:()=>Ma,storage_get_contents_without_para:()=>Ra,storage_get_current_dir:()=>va,storage_get_file_size:()=>Na,storage_get_filename:()=>Aa,storage_is_file:()=>ya,storage_list_all_files:()=>Sa,storage_make_dir:()=>Pa,storage_open_file_with_os:()=>Ta,storage_rename:()=>Va});var C={};t.r(C),t.d(C,{procedures_callnoreturn:()=>xa,procedures_callreturn:()=>Ga,procedures_defnoreturn:()=>Xa,procedures_defreturn:()=>ka,procedures_ifreturn:()=>Ua,procedures_return:()=>Ha});var A={};t.r(A),t.d(A,{tuple_change_to:()=>za,tuple_create_with:()=>Ba,tuple_create_with_noreturn:()=>el,tuple_create_with_text2:()=>wa,tuple_create_with_text_return:()=>Wa,tuple_del:()=>Qa,tuple_find:()=>Za,tuple_getIndex:()=>Ka,tuple_getSublist:()=>tl,tuple_get_random_item:()=>nl,tuple_get_sublist:()=>il,tuple_input:()=>ol,tuple_join:()=>qa,tuple_length:()=>ja,tuple_max:()=>Ja,tuple_totuple:()=>sl,tuple_trig:()=>$a});var g={};t.r(g),t.d(g,{set_add_discard:()=>dl,set_clear:()=>ll,set_create_with:()=>pl,set_create_with_text_return:()=>hl,set_length:()=>ul,set_operate:()=>_l,set_operate_update:()=>rl,set_pop:()=>al,set_sub:()=>Il,set_toset:()=>ml,set_update:()=>Tl});var S={};t.r(S),t.d(S,{html_content:()=>Ml,html_content_more:()=>El,html_document:()=>Ol,html_form:()=>Al,html_head_body:()=>Rl,html_style:()=>Cl,html_style_content:()=>gl,html_text:()=>Sl,html_title:()=>cl});var D={};t.r(D),t.d(D,{attribute_access:()=>Pl,function_call:()=>vl,raw_block:()=>Dl,raw_empty:()=>Ll,raw_expression:()=>Nl,raw_table:()=>fl,type_check:()=>Fl});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>Ul,actuator_extern_led_bright:()=>xl,actuator_extern_led_brightness:()=>Hl,actuator_get_led_bright:()=>wl,actuator_led_bright:()=>Bl,actuator_led_brightness:()=>Wl,actuator_neopixel_init:()=>s_,actuator_neopixel_rgb:()=>o_,actuator_neopixel_write:()=>p_,actuator_onboard_neopixel_rgb:()=>u_,actuator_onboard_neopixel_rgb_all:()=>a_,actuator_onboard_neopixel_write:()=>l_,esp32_mixgo_music_play_list_show:()=>n_,esp32_music_get_tempo:()=>Jl,esp32_music_pitch:()=>Kl,esp32_music_pitch_with_time:()=>jl,esp32_music_play_list:()=>i_,esp32_music_reset:()=>zl,esp32_music_set_tempo:()=>ql,esp32_music_stop:()=>Ql,esp32_onboard_music_pitch:()=>Zl,esp32_onboard_music_pitch_with_time:()=>$l,esp32_onboard_music_play_list:()=>e_,esp32_onboard_music_stop:()=>t_,get_led_bright:()=>r_,led_brightness:()=>d_,led_light:()=>__,ledswitch:()=>Gl,number:()=>Xl,servo_move:()=>kl});var L={};t.r(L),t.d(L,{mpython_blynk_app_data:()=>N_,mpython_blynk_app_notify:()=>M_,mpython_blynk_email:()=>A_,mpython_blynk_get_timers:()=>g_,mpython_blynk_on_connected:()=>O_,mpython_blynk_on_disconnected:()=>m_,mpython_blynk_run:()=>R_,mpython_blynk_sensor_data_to_app:()=>D_,mpython_blynk_set_property:()=>C_,mpython_blynk_setup:()=>L_,mpython_blynk_stop_timers:()=>E_,mpython_blynk_sync_virtual:()=>h_,mpython_blynk_terminal_widget_vpin:()=>T_,mpython_blynktimer:()=>S_,mpython_blynktimer_run:()=>c_});var f={};t.r(f),t.d(f,{display_animate:()=>Ur,display_blink_rate:()=>fr,display_bright_point:()=>tr,display_bright_screen:()=>Lr,display_circle:()=>Hr,display_clear:()=>Z_,display_draw_4strings:()=>Er,display_fill:()=>br,display_get_pixel:()=>$_,display_get_screen_image:()=>Nr,display_get_screen_pixel:()=>Dr,display_help:()=>wr,display_image_builtins:()=>rr,display_image_create:()=>dr,display_image_size:()=>Cr,display_line:()=>gr,display_line_arbitrarily:()=>Sr,display_matrix_use_i2c_init:()=>jr,display_oled_drawPixel:()=>Kr,display_oled_showBitmap:()=>Wr,display_onoff:()=>Yr,display_rect:()=>Ar,display_rgb_color:()=>Fr,display_scroll_string:()=>Pr,display_scroll_string_delay:()=>yr,display_scroll_string_extern:()=>qr,display_show_image:()=>Qr,display_show_image_or_string:()=>vr,display_show_image_or_string_delay:()=>Vr,display_show_static:()=>nr,display_tm1650_power:()=>Xr,display_tm1650_show_dot:()=>xr,display_tm1650_show_num:()=>Gr,display_tm_use_i2c_init:()=>kr,display_triangle:()=>Br,display_use_i2c_init:()=>Mr,esp32_display_is_on:()=>_r,esp32_display_off:()=>lr,esp32_display_on:()=>ar,esp32_display_scroll:()=>ur,esp32_display_show_animation:()=>pr,esp32_display_show_default_image:()=>or,esp32_display_show_string:()=>hr,group_lcd_init:()=>Or,group_lcd_power:()=>Rr,group_lcd_print:()=>mr,group_lcd_print2:()=>cr,image_arithmetic:()=>Tr,image_shift:()=>Ir,microbit_display_show_image:()=>sr,monitor_show_scroll_string:()=>ir,monitor_show_string:()=>er});var F={};t.r(F),t.d(F,{IOT_CONNECT_OLLAMA:()=>Pd,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>Rd,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>cd,IOT_EMQX_PING:()=>md,IOT_FORMATTING:()=>Td,IOT_FORMAT_STRING:()=>hd,IOT_MIXIO_NTP:()=>Od,IOT_MIXIO_PUBLISH:()=>ud,IOT_MIXIO_SUBSCRIBE:()=>ad,iot_checkonenet:()=>fd,iot_client_onboard:()=>Ed,iot_connect_ollama:()=>vd,iot_connect_openai:()=>Vd,iot_create_with_item:()=>od,iot_http_client:()=>Cd,iot_http_data:()=>Ad,iot_mixio_check:()=>rd,iot_mixio_connect:()=>pd,iot_mixio_connect_only:()=>_d,iot_mixio_disconnect:()=>ld,iot_mixio_format_msg:()=>Id,iot_mixio_format_topic:()=>dd,iot_mixly_key:()=>Md,iot_mqtt_client:()=>gd,iot_mqtt_data:()=>Sd,iot_onenet_check:()=>td,iot_onenet_connect:()=>Zr,iot_onenet_disconnect:()=>$r,iot_onenet_publish:()=>id,iot_onenet_publish_dict:()=>ed,iot_onenetconnect:()=>Nd,iot_onenetdisconnect:()=>Ld,iot_publish:()=>Fd,iot_publish_container:()=>nd,iot_publish_item:()=>sd,iot_wifi_connect:()=>zr,iot_wificonnect:()=>Dd,ollama_empty_history:()=>bd,use_ollama_llm_to_chat:()=>yd,use_ollama_llm_to_chat_return:()=>Yd});var v={};t.r(v),t.d(v,{actuator_extern_get_led_bright:()=>lI,actuator_extern_led_bright:()=>aI,actuator_extern_led_brightness:()=>_I,actuator_get_led_bright:()=>dI,actuator_led_bright:()=>rI,actuator_led_brightness:()=>II,actuator_neopixel_init:()=>TI,actuator_neopixel_rgb:()=>mI,actuator_neopixel_write:()=>hI,actuator_onboard_neopixel_rgb:()=>cI,actuator_onboard_neopixel_rgb_all:()=>RI,actuator_onboard_neopixel_write:()=>OI,esp32_mixgo_music_play_list_show:()=>nI,esp32_music_get_tempo:()=>zd,esp32_music_pitch:()=>jd,esp32_music_pitch_with_time:()=>Qd,esp32_music_play_list:()=>iI,esp32_music_reset:()=>sI,esp32_music_set_tempo:()=>Jd,esp32_music_stop:()=>qd,esp32_onboard_music_pitch:()=>Zd,esp32_onboard_music_pitch_with_time:()=>$d,esp32_onboard_music_play_list:()=>eI,esp32_onboard_music_stop:()=>tI,get_led_bright:()=>EI,led_brightness:()=>CI,led_light:()=>MI,ledswitch:()=>uI,number:()=>pI,servo_move:()=>oI});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>yI,mpython_blynk_app_notify:()=>fI,mpython_blynk_email:()=>YI,mpython_blynk_get_timers:()=>vI,mpython_blynk_on_connected:()=>DI,mpython_blynk_on_disconnected:()=>SI,mpython_blynk_run:()=>LI,mpython_blynk_sensor_data_to_app:()=>VI,mpython_blynk_set_property:()=>bI,mpython_blynk_setup:()=>kI,mpython_blynk_stop_timers:()=>FI,mpython_blynk_sync_virtual:()=>gI,mpython_blynk_terminal_widget_vpin:()=>AI,mpython_blynktimer:()=>PI,mpython_blynktimer_run:()=>NI});var V={};t.r(V),t.d(V,{display_animate:()=>rT,display_blink_rate:()=>JI,display_bright_point:()=>KI,display_bright_screen:()=>qI,display_circle:()=>dT,display_clear:()=>zI,display_draw_4strings:()=>$I,display_fill:()=>pT,display_get_pixel:()=>WI,display_get_screen_image:()=>QI,display_get_screen_pixel:()=>jI,display_image_builtins:()=>wI,display_image_create:()=>BI,display_line:()=>nT,display_line_arbitrarily:()=>tT,display_matrix_use_i2c_init:()=>mT,display_oled_drawPixel:()=>hT,display_oled_showBitmap:()=>TT,display_onoff:()=>sT,display_rect:()=>eT,display_scroll_string:()=>GI,display_scroll_string_delay:()=>HI,display_scroll_string_extern:()=>cT,display_show_image:()=>OT,display_show_image_or_string:()=>XI,display_show_image_or_string_delay:()=>UI,display_show_static:()=>xI,display_tm1650_power:()=>aT,display_tm1650_show_dot:()=>_T,display_tm1650_show_num:()=>lT,display_tm_use_i2c_init:()=>uT,display_triangle:()=>IT,display_use_i2c_init:()=>ZI,image_arithmetic:()=>iT,image_shift:()=>oT});var y={};t.r(y),t.d(y,{IOT_CONNECT_OLLAMA:()=>KT,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>kT,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>YT,IOT_EMQX_PING:()=>XT,IOT_FORMATTING:()=>VT,IOT_FORMAT_STRING:()=>yT,IOT_MIXIO_NTP:()=>GT,IOT_MIXIO_PUBLISH:()=>DT,IOT_MIXIO_SUBSCRIBE:()=>NT,iot_client_onboard:()=>xT,iot_connect_ollama:()=>WT,iot_connect_openai:()=>jT,iot_http_client:()=>UT,iot_http_data:()=>HT,iot_mixio_check:()=>FT,iot_mixio_connect:()=>ST,iot_mixio_connect_only:()=>fT,iot_mixio_disconnect:()=>LT,iot_mixio_format_msg:()=>PT,iot_mixio_format_topic:()=>vT,iot_mixly_key:()=>bT,iot_mqtt_client:()=>BT,iot_mqtt_data:()=>wT,iot_onenet_check:()=>AT,iot_onenet_connect:()=>MT,iot_onenet_disconnect:()=>ET,iot_onenet_publish:()=>gT,iot_onenet_publish_dict:()=>CT,iot_wifi_connect:()=>RT,ollama_empty_history:()=>JT,use_ollama_llm_to_chat:()=>QT,use_ollama_llm_to_chat_return:()=>qT});var Y={};t.r(Y),t.d(Y,{PID_get_pid:()=>dh,PID_init:()=>rh,actuator_PAC9685_Servo:()=>sh,actuator_PAC9685_init:()=>nh,actuator_Servo:()=>ih,actuator_Servo_init:()=>eh,actuator_ms32006_dcmotor:()=>lh,actuator_ms32006_init:()=>ah,actuator_ms32006_stepper:()=>_h,actuator_rgb_display:()=>uh,actuator_rgb_init:()=>oh,actuator_rgb_set:()=>ph});var b={};t.r(b),t.d(b,{KPU_analysis:()=>Eh,KPU_forward:()=>Mh,KPU_init_yolo2:()=>ch,KPU_load:()=>mh,KPU_load1:()=>Oh,KPU_run_yolo2:()=>Rh,ai_face_info:()=>Fh,ai_face_init:()=>Lh,ai_face_train:()=>fh,ailocal_loading:()=>Dh,ailocal_predict:()=>Nh,ailocal_training:()=>Sh,aionenet_API:()=>gh,aionenet_nic_init:()=>Ch,aionenet_token:()=>Ah,tuple_anchor:()=>Th,tuple_calss:()=>hh});var k={};t.r(k),t.d(k,{audio_play:()=>yh,audio_record:()=>Yh,mic_init:()=>Vh,spk_init:()=>Ph,video_play:()=>bh,video_record:()=>kh});var X={};t.r(X),t.d(X,{camera_getinfo:()=>Zh,camera_init:()=>Uh,camera_reset:()=>Hh,camera_run:()=>Wh,camera_set_colorbar:()=>zh,camera_set_framesize:()=>wh,camera_set_hmirror:()=>qh,camera_set_pixformat:()=>Bh,camera_set_vflip:()=>Jh,camera_set_windowing:()=>tm,camera_setmun:()=>$h,camera_shutdown:()=>Qh,camera_skip_frames:()=>Kh,camera_snapshot:()=>jh,mode:()=>Gh,size:()=>xh});var G={};t.r(G),t.d(G,{communicate_i2c_available:()=>cm,communicate_i2c_init:()=>nm,communicate_i2c_master_read:()=>Om,communicate_i2c_read:()=>om,communicate_i2c_scan:()=>um,communicate_i2c_write:()=>pm,communicate_i2s_init:()=>sm,communicate_ir_recv:()=>im,communicate_ow_init:()=>Mm,communicate_ow_read:()=>Cm,communicate_ow_reset:()=>Sm,communicate_ow_scan:()=>Em,communicate_ow_select:()=>gm,communicate_ow_write:()=>Am,communicate_spi_buffer:()=>_m,communicate_spi_init:()=>am,communicate_spi_read:()=>rm,communicate_spi_read_output:()=>dm,communicate_spi_readinto:()=>Im,communicate_spi_readinto_output:()=>Tm,communicate_spi_set:()=>lm,communicate_spi_write:()=>hm,communicate_spi_write_readinto:()=>mm,i2c_available:()=>xm,i2c_init:()=>Dm,i2c_master_reader2:()=>Gm,i2c_read:()=>Nm,i2c_scan:()=>fm,i2c_slave_onreceive:()=>Rm,i2c_write:()=>Lm,spi_buffer:()=>Pm,spi_init:()=>Fm,spi_read:()=>Vm,spi_read_output:()=>ym,spi_readinto:()=>Ym,spi_readinto_output:()=>bm,spi_set:()=>vm,spi_write:()=>km,spi_write_readinto:()=>Xm});var x={};t.r(x),t.d(x,{angle:()=>Hm,lcd_clear:()=>qm,lcd_color:()=>Bm,lcd_colour:()=>jm,lcd_display:()=>Qm,lcd_draw_string:()=>Zm,lcd_init:()=>Wm,lcd_mirror:()=>zm,lcd_rotation:()=>Jm,lcd_width:()=>Km,on_off:()=>wm,touch_calibrate:()=>tO,touch_info:()=>iO,touch_init:()=>$m,touch_read:()=>eO});var U={};t.r(U),t.d(U,{factory_block:()=>IO,factory_block_notes:()=>OO,factory_block_return:()=>TO,factory_block_return_with_textarea:()=>mO,factory_block_with_textarea:()=>hO,factory_callMethod_noreturn:()=>rO,factory_callMethod_return:()=>dO,factory_create_with_container:()=>uO,factory_create_with_item:()=>aO,factory_declare:()=>_O,factory_from_import:()=>sO,factory_function_noreturn:()=>pO,factory_function_return:()=>lO,factory_import:()=>oO});var H={};t.r(H),t.d(H,{asrloca_config:()=>MO,asrloca_del:()=>CO,asrloca_init:()=>RO,asrloca_recognize:()=>EO});var B={};t.r(B),t.d(B,{image_Histogram:()=>Cc,image_Image:()=>SO,image_Image1:()=>DO,image_RGB:()=>FO,image_apriltag:()=>cc,image_barcode:()=>Oc,image_binary:()=>rc,image_blob:()=>Ec,image_cartoon:()=>sc,image_circle:()=>tc,image_clear:()=>PO,image_compress:()=>vO,image_copy:()=>fO,image_dilate:()=>pc,image_draw_arrow:()=>HO,image_draw_circle:()=>wO,image_draw_cross:()=>BO,image_draw_image:()=>jO,image_draw_keypoints:()=>KO,image_draw_line:()=>UO,image_draw_rectangle:()=>WO,image_draw_string:()=>xO,image_draw_string_UTF:()=>GO,image_draw_string_flash:()=>XO,image_erode:()=>oc,image_find_apriltags:()=>hc,image_find_barcodes:()=>Ic,image_find_blobs:()=>Rc,image_find_circles:()=>JO,image_find_hog:()=>fc,image_find_keypoints:()=>Fc,image_find_line_segments:()=>qO,image_find_lines:()=>QO,image_find_qrcodes:()=>Tc,image_find_rects:()=>zO,image_flood_fill:()=>uc,image_font_free:()=>kO,image_font_load:()=>bO,image_get_histogram:()=>Mc,image_get_pixel:()=>YO,image_get_regression:()=>ZO,image_getinfo:()=>NO,image_grayscale_to_rgb:()=>Lc,image_histeq:()=>ic,image_invert:()=>lc,image_kptmatch:()=>Pc,image_lab_to_rgb:()=>Sc,image_lens_corr:()=>_c,image_line:()=>$O,image_linpolar:()=>ac,image_match_descriptor:()=>vc,image_mean:()=>nc,image_morph:()=>dc,image_percentile:()=>Ac,image_qrcode:()=>mc,image_rect:()=>ec,image_rgb_to_grayscale:()=>Nc,image_rgb_to_lab:()=>Dc,image_save:()=>LO,image_set_pixel:()=>yO,image_threshold:()=>gc,image_tonew:()=>VO,true_false:()=>gO});var w={};t.r(w),t.d(w,{inout_digital_init:()=>Yc,inout_digital_read:()=>kc,inout_digital_write:()=>bc,inout_highlow:()=>yc,inout_pin_attachInterrupt:()=>xc,inout_pin_disirq:()=>Uc,inout_pwm_init:()=>Xc,inout_pwm_write:()=>Gc});var W={};t.r(W),t.d(W,{iot_checkonenet:()=>eR,iot_create_with_item:()=>zc,iot_onenet_check:()=>Kc,iot_onenet_connect:()=>wc,iot_onenet_disconnect:()=>Wc,iot_onenet_publish:()=>Qc,iot_onenet_publish_dict:()=>jc,iot_onenetconnect:()=>$c,iot_onenetdisconnect:()=>tR,iot_publish:()=>iR,iot_publish_container:()=>qc,iot_publish_item:()=>Jc,iot_wifi_connect:()=>Bc,iot_wificonnect:()=>Zc});var K={};t.r(K),t.d(K,{base_map:()=>RR,math_arithmetic:()=>pR,math_bit:()=>aR,math_constant:()=>oR,math_constrain:()=>hR,math_indexer_number:()=>OR,math_map:()=>mR,math_max_min:()=>rR,math_max_min1:()=>dR,math_number:()=>sR,math_number_base_conversion:()=>IR,math_random:()=>TR,math_random_seed:()=>cR,math_selfcalcu:()=>uR,math_to_int:()=>_R,math_trig:()=>lR});var j={};t.r(j),t.d(j,{nes_joystick_init:()=>ER,nes_keyboard_init:()=>CR,nes_run:()=>AR});var Q={};t.r(Q),t.d(Q,{network_connect:()=>NR,network_disable_ap:()=>vR,network_disconnect:()=>fR,network_enable_ap:()=>FR,network_ifconfig:()=>LR,network_init:()=>SR,network_scan:()=>DR,network_socket_close:()=>XR,network_socket_connect:()=>yR,network_socket_getaddrinfo:()=>VR,network_socket_init:()=>PR,network_socket_receive:()=>kR,network_socket_send:()=>bR,network_socket_settimeout:()=>YR});var q={};t.r(q),t.d(q,{pins_analog:()=>HR,pins_analog_pin:()=>BR,pins_axis:()=>nM,pins_brightness:()=>sM,pins_builtinimg:()=>ZR,pins_button:()=>KR,pins_dac:()=>wR,pins_dac_pin:()=>WR,pins_digital:()=>xR,pins_digital_dot:()=>lM,pins_digital_pin:()=>UR,pins_exlcdh:()=>eM,pins_exlcdv:()=>iM,pins_imglist:()=>$R,pins_one_more:()=>aM,pins_playlist:()=>tM,pins_pwm:()=>jR,pins_pwm_pin:()=>QR,pins_radio_datarate:()=>uM,pins_radio_power:()=>pM,pins_serial:()=>zR,pins_tone_notes:()=>oM,pins_touch:()=>JR,pins_touch_pin:()=>qR});var J={};t.r(J),t.d(J,{HCSR04:()=>hM,KEY_SELET:()=>rM,sensor_adxl345_get_acceleration:()=>AM,sensor_bmp:()=>cM,sensor_button_init:()=>dM,sensor_button_read:()=>IM,sensor_dht11:()=>TM,sensor_mpu9250_get_acceleration:()=>mM,sensor_mpu9250_get_gyro:()=>EM,sensor_mpu9250_get_magnetic:()=>MM,sensor_mpu9250_temperature:()=>CM,sensor_sht:()=>RM,sensor_use_i2c_init:()=>OM});var z={};t.r(z),t.d(z,{serial_any:()=>FM,serial_print:()=>SM,serial_print_hex:()=>NM,serial_println:()=>DM,serial_read_from_mixgoce:()=>HM,serial_readline:()=>vM,serial_readstr:()=>fM,serial_readstr_until:()=>PM,serial_receive_data_event:()=>LM,serial_send_to_mixgoce:()=>UM,serial_softserial1:()=>VM,system_input:()=>yM,system_print:()=>YM,system_print_container:()=>GM,system_print_end:()=>kM,system_print_inline:()=>bM,system_print_item:()=>xM,system_print_many:()=>XM});var Z={};t.r(Z),t.d(Z,{Panic_with_status_code:()=>KM,TIM_SELET:()=>wM,Timer_init:()=>eE,base_delay:()=>sE,controls_delay:()=>WM,controls_millis:()=>jM,controls_uname:()=>qM,raw_block:()=>QM,system_gc_collect:()=>ZM,system_reset:()=>zM,system_ticks_diff:()=>$M,system_timer:()=>JM,system_timer_init:()=>tE,time_ticks_diff:()=>nE,timer2:()=>iE});var $={};t.r($),t.d($,{LCD_color_seclet:()=>aE,lists_create_with_text1:()=>pE,tuple_create_with_text3:()=>uE});var tt={};t.r(tt),t.d(tt,{PID_get_pid:()=>ME,PID_init:()=>RE,actuator_PAC9685_Servo:()=>dE,actuator_PAC9685_init:()=>rE,actuator_Servo:()=>_E,actuator_Servo_init:()=>lE,actuator_ms32006_dcmotor:()=>OE,actuator_ms32006_init:()=>mE,actuator_ms32006_stepper:()=>cE,actuator_rgb_display:()=>hE,actuator_rgb_init:()=>IE,actuator_rgb_set:()=>TE});var et={};t.r(et),t.d(et,{KPU_analysis:()=>LE,KPU_forward:()=>NE,KPU_init_yolo2:()=>SE,KPU_load:()=>AE,KPU_load1:()=>gE,KPU_run_yolo2:()=>DE,ai_face_info:()=>kE,ai_face_init:()=>YE,ai_face_train:()=>bE,ailocal_loading:()=>VE,ailocal_predict:()=>yE,ailocal_training:()=>PE,aionenet_API:()=>vE,aionenet_nic_init:()=>fE,aionenet_token:()=>FE,tuple_anchor:()=>EE,tuple_calss:()=>CE});var it={};t.r(it),t.d(it,{audio_play:()=>xE,audio_record:()=>UE,mic_init:()=>GE,spk_init:()=>XE,video_play:()=>HE,video_record:()=>BE});var nt={};t.r(nt),t.d(nt,{camera_getinfo:()=>nC,camera_init:()=>KE,camera_reset:()=>jE,camera_run:()=>JE,camera_set_colorbar:()=>iC,camera_set_framesize:()=>qE,camera_set_hmirror:()=>tC,camera_set_pixformat:()=>QE,camera_set_vflip:()=>eC,camera_set_windowing:()=>oC,camera_setmun:()=>sC,camera_shutdown:()=>$E,camera_skip_frames:()=>zE,camera_snapshot:()=>ZE,mode:()=>wE,size:()=>WE});var st={};t.r(st),t.d(st,{communicate_i2c_available:()=>IC,communicate_i2c_init:()=>uC,communicate_i2c_master_read:()=>dC,communicate_i2c_read:()=>lC,communicate_i2c_scan:()=>rC,communicate_i2c_write:()=>_C,communicate_i2s_init:()=>aC,communicate_ir_recv:()=>pC,communicate_ow_init:()=>gC,communicate_ow_read:()=>NC,communicate_ow_reset:()=>DC,communicate_ow_scan:()=>SC,communicate_ow_select:()=>fC,communicate_ow_write:()=>LC,communicate_spi_buffer:()=>OC,communicate_spi_init:()=>hC,communicate_spi_read:()=>cC,communicate_spi_read_output:()=>RC,communicate_spi_readinto:()=>MC,communicate_spi_readinto_output:()=>EC,communicate_spi_set:()=>mC,communicate_spi_write:()=>CC,communicate_spi_write_readinto:()=>AC,i2c_slave_onreceive:()=>TC});var ot={};t.r(ot),t.d(ot,{angle:()=>FC,lcd_clear:()=>kC,lcd_color:()=>vC,lcd_colour:()=>yC,lcd_display:()=>bC,lcd_draw_string:()=>xC,lcd_init:()=>VC,lcd_mirror:()=>GC,lcd_rotation:()=>XC,lcd_width:()=>YC,on_off:()=>PC,touch_calibrate:()=>HC,touch_info:()=>wC,touch_init:()=>UC,touch_read:()=>BC});var pt={};t.r(pt),t.d(pt,{factory_block:()=>ZC,factory_block_notes:()=>iA,factory_block_return:()=>$C,factory_block_return_with_textarea:()=>eA,factory_block_with_textarea:()=>tA,factory_callMethod_noreturn:()=>JC,factory_callMethod_return:()=>zC,factory_declare:()=>qC,factory_from_import:()=>WC,factory_function_noreturn:()=>jC,factory_function_return:()=>QC,factory_import:()=>KC});var ut={};t.r(ut),t.d(ut,{asrloca_config:()=>sA,asrloca_del:()=>pA,asrloca_init:()=>nA,asrloca_recognize:()=>oA});var at={};t.r(at),t.d(at,{image_Histogram:()=>og,image_Image:()=>lA,image_Image1:()=>_A,image_RGB:()=>aA,image_apriltag:()=>eg,image_barcode:()=>$A,image_binary:()=>QA,image_blob:()=>sg,image_cartoon:()=>UA,image_circle:()=>kA,image_clear:()=>MA,image_compress:()=>RA,image_copy:()=>cA,image_dilate:()=>BA,image_draw_arrow:()=>SA,image_draw_circle:()=>NA,image_draw_cross:()=>DA,image_draw_image:()=>FA,image_draw_keypoints:()=>fA,image_draw_line:()=>gA,image_draw_rectangle:()=>LA,image_draw_string:()=>OA,image_draw_string_UTF:()=>mA,image_draw_string_flash:()=>hA,image_erode:()=>HA,image_find_apriltags:()=>ZA,image_find_barcodes:()=>JA,image_find_blobs:()=>ig,image_find_circles:()=>VA,image_find_hog:()=>dg,image_find_keypoints:()=>Ig,image_find_line_segments:()=>PA,image_find_lines:()=>vA,image_find_qrcodes:()=>zA,image_find_rects:()=>yA,image_flood_fill:()=>wA,image_font_free:()=>IA,image_font_load:()=>TA,image_get_histogram:()=>ng,image_get_pixel:()=>AA,image_get_regression:()=>YA,image_getinfo:()=>rA,image_grayscale_to_rgb:()=>rg,image_histeq:()=>GA,image_invert:()=>KA,image_kptmatch:()=>hg,image_lab_to_rgb:()=>ag,image_lens_corr:()=>jA,image_line:()=>bA,image_linpolar:()=>WA,image_match_descriptor:()=>Tg,image_mean:()=>xA,image_morph:()=>qA,image_percentile:()=>pg,image_qrcode:()=>tg,image_rect:()=>XA,image_rgb_to_grayscale:()=>_g,image_rgb_to_lab:()=>lg,image_save:()=>dA,image_set_pixel:()=>CA,image_threshold:()=>ug,image_tonew:()=>EA,true_false:()=>uA});var lt={};t.r(lt),t.d(lt,{PGA_SELET:()=>mg,inout_adc_Vread:()=>Sg,inout_adc_init:()=>Ag,inout_adc_read:()=>gg,inout_digital_init:()=>cg,inout_digital_read:()=>Mg,inout_digital_write:()=>Rg,inout_highlow:()=>Og,inout_pin_attachInterrupt:()=>Dg,inout_pin_disirq:()=>Ng,inout_pwm_init:()=>Eg,inout_pwm_write:()=>Cg});var _t={};t.r(_t),t.d(_t,{iot_onenet_check:()=>Pg,iot_onenet_connect:()=>fg,iot_onenet_disconnect:()=>Fg,iot_onenet_publish:()=>Vg,iot_onenet_publish_dict:()=>vg,iot_wifi_connect:()=>Lg});var rt={};t.r(rt),t.d(rt,{base_map:()=>Jg,math_arithmetic:()=>kg,math_bit:()=>bg,math_constant:()=>Yg,math_constrain:()=>Kg,math_indexer_number:()=>qg,math_map:()=>Wg,math_max_min:()=>Hg,math_max_min1:()=>Bg,math_number:()=>yg,math_number_base_conversion:()=>jg,math_random:()=>wg,math_random_seed:()=>Qg,math_selfcalcu:()=>Xg,math_single:()=>Gg,math_to_int:()=>Ug,math_trig:()=>xg});var dt={};t.r(dt),t.d(dt,{nes_joystick_init:()=>zg,nes_keyboard_init:()=>Zg,nes_run:()=>$g});var It={};t.r(It),t.d(It,{network_connect:()=>iS,network_disable_ap:()=>pS,network_disconnect:()=>sS,network_enable_ap:()=>oS,network_ifconfig:()=>nS,network_init:()=>tS,network_scan:()=>eS,network_server:()=>uS,network_socket_close:()=>TS,network_socket_connect:()=>_S,network_socket_getaddrinfo:()=>lS,network_socket_init:()=>aS,network_socket_receive:()=>dS,network_socket_send:()=>IS,network_socket_settimeout:()=>rS});var Tt={};t.r(Tt),t.d(Tt,{pins_analog:()=>RS,pins_analog_pin:()=>cS,pins_axis:()=>vS,pins_brightness:()=>yS,pins_builtinimg:()=>LS,pins_button:()=>mS,pins_dac:()=>AS,pins_dac_pin:()=>CS,pins_digital:()=>hS,pins_digital_dot:()=>GS,pins_digital_pin:()=>OS,pins_exlcdh:()=>PS,pins_exlcdv:()=>VS,pins_imglist:()=>fS,pins_interrupt:()=>DS,pins_one_more:()=>XS,pins_playlist:()=>FS,pins_pwm:()=>ES,pins_pwm_pin:()=>MS,pins_radio_datarate:()=>kS,pins_radio_power:()=>bS,pins_serial:()=>NS,pins_tone_notes:()=>YS,pins_touch:()=>SS,pins_touch_pin:()=>gS});var ht={};t.r(ht),t.d(ht,{HCSR04:()=>wS,KEY_SELET:()=>xS,sensor_adxl345_get_acceleration:()=>QS,sensor_bmp:()=>iD,sensor_button_init:()=>US,sensor_button_read:()=>HS,sensor_compass_reset:()=>tD,sensor_dht11:()=>BS,sensor_mpu9250_attachGestureInterrupt:()=>WS,sensor_mpu9250_calibrate_compass:()=>zS,sensor_mpu9250_field_strength:()=>$S,sensor_mpu9250_gesture:()=>KS,sensor_mpu9250_get_acceleration:()=>jS,sensor_mpu9250_get_gyro:()=>JS,sensor_mpu9250_get_magnetic:()=>qS,sensor_mpu9250_temperature:()=>ZS,sensor_sht:()=>nD,sensor_use_i2c_init:()=>eD});var mt={};t.r(mt),t.d(mt,{UART_SELET:()=>sD,serial_any:()=>aD,serial_print:()=>oD,serial_print_hex:()=>uD,serial_println:()=>pD,serial_read_from_mixgoce:()=>cD,serial_readline:()=>_D,serial_readstr:()=>lD,serial_send_to_mixgoce:()=>OD,serial_softserial1:()=>rD,system_input:()=>dD,system_print:()=>ID,system_print_end:()=>hD,system_print_inline:()=>TD,system_print_many:()=>mD});var Ot={};t.r(Ot),t.d(Ot,{Panic_with_status_code:()=>FD,TIM_SELET:()=>RD,Timer_init:()=>UD,base_delay:()=>wD,controls_delay:()=>kD,controls_end_program:()=>PD,controls_millis:()=>vD,controls_uname:()=>bD,reset:()=>VD,system_device_name:()=>LD,system_device_serial_number:()=>fD,system_event_bus_source:()=>DD,system_event_bus_value:()=>ND,system_gc_collect:()=>YD,system_on_event:()=>AD,system_raise_event:()=>CD,system_reset:()=>yD,system_run_in_background:()=>MD,system_ticks_diff:()=>GD,system_timer:()=>XD,system_timer_init:()=>xD,system_timestamp:()=>gD,system_value:()=>SD,system_wait:()=>ED,time_ticks_diff:()=>BD,timer2:()=>HD});var ct={};t.r(ct),t.d(ct,{LCD_color_seclet:()=>QD,LCD_color_seclet1:()=>jD,lists_create_with_text1:()=>WD,tuple_create_with_text3:()=>KD});const Rt=Blockly,Mt=Mixly,Et={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(p+=n)):i=p}else i="i";return i}},Ct=Et; +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class At{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Rt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Rt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Rt.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_if_else");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Rt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(Rt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Rt.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Ht={init:function(){this.setColour(bt),this.appendValueInput("FROM").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.PYTHON_RANGE).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Bt={init:function(){this.setColour(bt),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Rt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Rt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},wt={init:function(){this.setColour(bt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Rt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Rt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Rt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Rt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Rt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Wt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Rt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Rt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Rt.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Rt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Rt.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_finally");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Rt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Rt.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Kt={init:function(){this.setColour(bt);var t=new Rt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Rt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Rt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},jt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Rt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Rt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Qt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Rt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Rt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};wt.OPERATORS=[[Rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Kt.OPERATORS=[[Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const qt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Rt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Jt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},zt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Rt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Zt={init:function(){this.setColour(bt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},$t={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Rt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},te={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Rt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},ee={init:function(){this.jsonInit({message0:Rt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:bt,tooltip:Rt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Rt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},ie={init:function(){this.setColour(bt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_STAT),this.setOutput(!0)}},ne={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},se={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Rt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},oe={init:function(){this.appendDummyInput().appendField(Rt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Rt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Rt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Rt.FieldDropdown([[Rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(bt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},pe={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ue={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},ae={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},le={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_GET+Rt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Rt.Msg.PROCEDURES_DEFRETURN_RETURN+Rt.Msg.MIXLY_GET_UNIQUE_IDEN)}},_e={init:function(){this.setColour(bt),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Rt.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},re={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},de=230;Rt.FieldTextInput.math_number_validator=function(t){return String(t)},Rt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const Ie={init:function(){this.setColour(de),this.appendDummyInput().appendField(new Rt.FieldTextInput("0",Rt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MATH_NUMBER_TOOLTIP)}},Te={init:function(){this.setColour(de);this.appendDummyInput("").appendField(Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Rt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},he={init:function(){this.setColour(de);this.appendDummyInput("").appendField(Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Rt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},me={init:function(){this.setColour(de),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Rt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Rt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Oe={init:function(){this.setColour(de),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Rt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Rt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},ce={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Rt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Re={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Rt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Rt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Rt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Rt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Rt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Rt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Rt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Rt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Me={init:function(){var t=[[Rt.Msg.MATH_BIN,"bin"],[Rt.Msg.MATH_OCT,"oct"],[Rt.Msg.MATH_HEX,"hex"]];this.setColour(de),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Rt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:Rt.Msg.MATH_DEC_TOOLTIP_BIN,oct:Rt.Msg.MATH_DEC_TOOLTIP_OCT,hex:Rt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Ee={init:function(){var t=[[Rt.Msg.LANG_MATH_TO_ROUND,"round"],[Rt.Msg.LANG_MATH_TO_CEIL,"ceil"],[Rt.Msg.LANG_MATH_TO_FLOOR,"floor"],[Rt.Msg.MATH_ABS,"fabs"],[Rt.Msg.MATH_SQRT,"sqrt"]];this.setColour(de),this.appendValueInput("A").setCheck(Number).appendField(new Rt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Rt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Rt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Rt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Rt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Rt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Rt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Ce={init:function(){var t=[[Rt.Msg.MIXLY_MAX,"max"],[Rt.Msg.MIXLY_MIN,"min"]];this.setColour(de),this.appendValueInput("A").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(new Rt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Rt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Rt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Rt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Ae={init:function(){var t=[[Rt.Msg.MATH_TWO,"two"],[Rt.Msg.MATH_EIGHT,"eight"],[Rt.Msg.MATH_TEN,"ten"],[Rt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(de),this.appendDummyInput("").appendField(Rt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Rt.FieldDropdown(t),"OP").appendField(Rt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.MATH_ZHW).appendField(new Rt.FieldDropdown(t),"OP2").appendField(Rt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:Rt.Msg.MATH_Before_two,eight:Rt.Msg.MATH_Before_eight,ten:Rt.Msg.MATH_Before_ten,sixteen:Rt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:Rt.Msg.MATH_Behind_two,eight:Rt.Msg.MATH_Behind_eight,ten:Rt.Msg.MATH_Behind_ten,sixteen:Rt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},ge={init:function(){var t=[[Rt.Msg.LANG_MATH_INT,"int"],[Rt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(de),this.setOutput(!0,Number),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Rt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:Rt.Msg.LANG_MATH_INT,float:Rt.Msg.LANG_MATH_FLOAT_RANDOM};return Rt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Se={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Rt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Rt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Rt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MATH_CONSTRAIN_TOOLTIP)}},De={init:function(){this.setColour(de),this.appendValueInput("NUM",Number).appendField(Rt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Rt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Rt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Ne={init:function(){this.setColour(de),this.appendDummyInput().appendField(new Rt.FieldTextInput("0",Rt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Rt.Msg.MATH_NUMBER_TOOLTIP)}},Le={init:function(){this.setColour(de),this.appendValueInput("NUM").setCheck(Number).appendField(Rt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},fe={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Rt.Msg.MATH_ROUND).appendField(Rt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Rt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MATH_ROUND_NEW_TOOLTIP)}},Fe={init:function(){var t=[[Rt.Msg.MIXLY_TO_INT,"int"],[Rt.Msg.MIXLY_TO_FLOAT,"float"],[Rt.Msg.MIXLY_TO_BITES,"b"],[Rt.Msg.LANG_MATH_BYTE+Rt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(de),this.appendValueInput("VAR").appendField(new Rt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Rt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Rt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Rt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ve={init:function(){var t=[[Rt.Msg.MIXLY_TO_INT,"int"],[Rt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(de),this.appendValueInput("VAR").appendField(new Rt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Rt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Rt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},Pe=De,Ve={init:function(){this.setColour(de),this.appendValueInput("VAR").appendField(Rt.Msg.LANG_MATH_BYTE+Rt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},ye={init:function(){this.setColour(de),this.itemCount_=1,this.setMutator(new Rt.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(Rt.Msg.MIXLY_PRODUCT+Rt.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(Rt.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(Rt.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(Rt.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const xe={init:function(){this.setColour(ke),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Rt.FieldTextInput("",Rt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new Rt.FieldImage(e,7,12,'"')}},Ue={init:function(){this.setColour(ke),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Rt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},He={init:function(){this.setColour(ke),this.appendValueInput("VAR").setCheck(Number).appendField(Rt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Be={init:function(){this.setColour(ke),this.appendValueInput("VAR").setCheck(String).appendField(Rt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},we={init:function(){this.setColour(ke),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},We={init:function(){this.setColour(ke),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Ke={init:function(){this.WHERE_OPTIONS=[[Rt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Rt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Rt.Msg.TEXT_GET_INDEX_RANDOM+1+Rt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Rt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Rt.Msg.LISTS_GET_INDEX_GET,"MODE"),Rt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Rt.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=Rt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=Rt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=Rt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=Rt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+Rt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Rt.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:Rt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Rt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Rt.Msg.TEXT_GET_INDEX_RANDOM};return Rt.Msg.PROCEDURES_DEFRETURN_RETURN+Rt.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+Rt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==Rt.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),Rt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Rt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new Rt.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),Rt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},je={init:function(){this.setHelpUrl(Rt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Rt.Msg.LISTS_GET_INDEX_GET+" "+Rt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Rt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Rt.Msg.PROCEDURES_DEFRETURN_RETURN+Rt.Msg.MIXLY_MICROBIT_TYPE_STRING+Rt.Msg.LISTS_GET_INDEX_FROM_START+"n"+Rt.Msg.TEXT_CHARAT2)}},Qe={init:function(){this.setHelpUrl(Rt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Rt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Rt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},qe={init:function(){this.WHERE_OPTIONS_1=[[Rt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Rt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Rt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Rt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Rt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Rt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Rt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(Rt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==Rt.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==Rt.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),Rt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(Rt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new Rt.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Je={init:function(){this.setHelpUrl(Rt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Rt.Msg.LISTS_GET_INDEX_GET+" "+Rt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Rt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Rt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Rt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},ze={init:function(){var t=[[Rt.Msg.MIXLY_EQUALS,"==="],[Rt.Msg.MIXLY_STARTSWITH,"startswith"],[Rt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(ke),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Rt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Ze={init:function(){this.setColour(ke),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Rt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_COMPARETO_HELP)}},$e={init:function(){var t=[[Rt.Msg.TEXT_UPPER,"upper"],[Rt.Msg.TEXT_TITLE,"title"],[Rt.Msg.TEXT_CAPITALIZE,"capitalize"],[Rt.Msg.TEXT_SWAPCASE,"swapcase"],[Rt.Msg.TEXT_LOWER,"lower"]];this.setColour(ke),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Rt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:Rt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Rt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Rt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Rt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Rt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},ti={init:function(){var t=[[Rt.Msg.TEXT_LJUST,"ljust"],[Rt.Msg.TEXT_CENTER,"center"],[Rt.Msg.TEXT_RJUST,"rjust"]];this.setColour(ke),this.appendValueInput("VAR").appendField(new Rt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Rt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Rt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},ei={init:function(){this.setColour(ke),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Rt.Msg.MIXLY_MID+Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Rt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ii={init:function(){this.setColour(ke),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Rt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},ni={init:function(){this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Rt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Rt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},si={init:function(){this.setColour(ke),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Rt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Rt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Rt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},oi={init:function(){var t=[[Rt.Msg.TEXT_TRIM_BOTH,"strip"],[Rt.Msg.TEXT_TRIM_LEFT,"lstrip"],[Rt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(ke),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Rt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Rt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(Rt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:Rt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Rt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Rt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},pi={init:function(){this.setColour(ke),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Rt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Rt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},nn={init:function(){this.setColour(tn),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},sn={init:function(){this.setColour(tn),this.appendDummyInput().appendField(Rt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},on={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_KEYS),this.setTooltip(Rt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},pn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Rt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Rt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Rt.Msg.DICTS_GET_TOOLTIP)}},un={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Rt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Rt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Rt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Rt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},an={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Rt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Rt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},ln={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Rt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Rt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_DELETE_TOOLTIP)}},_n={init:function(){this.setColour(tn),this.appendValueInput("DICT2").setCheck("Dict").appendField(Rt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Rt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MID),this.setTooltip(Rt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},rn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_CLEAR),this.setTooltip(Rt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_ITEMS),this.setTooltip(Rt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},In={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_VALUES),this.setTooltip(Rt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Tn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_LENGTH),this.setTooltip(Rt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},hn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_DELDICT),this.setTooltip(Rt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mn={init:function(){this.MODE=[[Rt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Rt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Rt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Rt.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=Rt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=Rt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==Rt.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new Rt.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},On={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Rt.Msg.DICTS_ADD_VALUE),this.setTooltip(Rt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},cn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Rt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Rt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Rn={init:function(){this.setColour(tn),this.appendDummyInput("").appendField(new Rt.FieldLabel(Rt.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new Rt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Mn={init:function(){this.setColour(tn),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},En={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_TO_JSON),this.setTooltip(Rt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Cn={init:function(){this.setColour(tn),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Rt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},An={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},gn={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_TO_JSON),this.setTooltip(Rt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Sn=210,Dn={init:function(){var t=Rt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Sn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Rt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:Rt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Rt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Rt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Rt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Rt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Rt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},Nn={init:function(){var t=Rt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=Rt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Sn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Rt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new Rt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Ln={init:function(){var t=[[Rt.Msg.LOGIC_OPERATION_AND,"AND"],[Rt.Msg.LOGIC_OPERATION_OR,"OR"],[Rt.Msg.LOGIC_OPERATION_NOR,"NOR"],[Rt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Sn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Rt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:Rt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Rt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Rt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Rt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},fn={init:function(){this.setColour(Sn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Rt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Rt.Msg.LOGIC_NEGATE_TOOLTIP)}},Fn={init:function(){var t=[[Rt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Rt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Sn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Rt.FieldDropdown(t),"BOOL"),this.setTooltip(Rt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},vn={init:function(){this.setColour(Sn),this.setOutput(!0),this.appendDummyInput().appendField(Rt.Msg.LOGIC_NULL),this.setTooltip(Rt.Msg.LOGIC_NULL_TOOLTIP)}},Pn={init:function(){this.setColour(Sn),this.appendValueInput("A"),this.appendValueInput("B").appendField(Rt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Rt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},Vn={init:function(){var t=[[Rt.Msg.TEXT_APPEND_TO,"in"],[Rt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Sn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Rt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(Rt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Rt.Msg.IN)}},yn={init:function(){var t=[[Rt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Rt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Sn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Rt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},Yn={init:function(){this.setColour(Sn),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},bn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Rt.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},kn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.MIXLY_USE,n=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Rt.Msg.MIXLY_BELONG;return i+{r:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Xn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.MIXLY_USE,n=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Rt.Msg.MIXLY_BELONG,p=Rt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+p}))}},Gn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Rt.Msg.MIXPY_TEXT_ENCODE).appendField(new Rt.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.MIXLY_USE,n=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Rt.Msg.MIXLY_BELONG,p=Rt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+p}))}},xn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Rt.Msg.MIXLY_MICROBIT_TYPE_STRING+Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MICROBIT_PYTHON_TYPE)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Rt.Msg.HTML_FILE),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},jn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Qn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Jn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},Zn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},$n={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Rt.Msg.MIXLY_ESP32_SET+{mkdir:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},ts={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Rt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},es={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},is={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.HTML_FILE,"isfile"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},ns={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Rt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_SETUP+Rt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Rt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ss={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Rt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},os={init:function(){var t=Rt.Procedures.findLegalName("",this),e=new Rt.FieldTextInput(t,Rt.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new Rt.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Rt.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Rt.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(Rt.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(Rt.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(Rt.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=Rt.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),Rt.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{Rt.Events.enable()}},mutationToDom:function(t){var e=Rt.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(Rt.Msg.MIXLY_AIP_ATTR).setAlign(Rt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$s={init:function(){this.setColour(js),this.appendDummyInput().appendField(Rt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},to={init:function(){this.setColour(js),this.appendDummyInput().appendField(Rt.Msg.HTML_FORM_CONTENT).appendField(new Rt.FieldDropdown([[Rt.Msg.HTML_TEXT,"text"],[Rt.Msg.HTML_EMAIL,"email"],[Rt.Msg.HTML_NUMBER,"number"],[Rt.Msg.HTML_PASSWORD,"password"],[Rt.Msg.HTML_CHECKBOX,"checkbox"],[Rt.Msg.HTML_RADIOBUTTON,"radiobutton"],[Rt.Msg.HTML_BUTTON,"button"],[Rt.Msg.HTML_COLOUR,"colour"],[Rt.Msg.HTML_DATE,"date"],[Rt.Msg.HTML_LOCALTIME,"local time"],[Rt.Msg.HTML_FILE,"file"],[Rt.Msg.HTML_HIDDEN,"hidden"],[Rt.Msg.HTML_IMAGE,"image"],[Rt.Msg.HTML_MONTH,"month"],[Rt.Msg.HTML_RANGE,"range"],[Rt.Msg.HTML_RESET,"reset"],[Rt.Msg.HTML_SEARCH,"search"],[Rt.Msg.HTML_SUBMIT,"submit"],[Rt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Rt.Msg.HTML_TIME,"time"],[Rt.Msg.HTML_URL,"url"],[Rt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Rt.Msg.HTML_NAME).appendField(new Rt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Rt.Msg.HTML_VALUE).appendField(new Rt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Rt.Msg.MIXLY_AIP_ATTR).setAlign(Rt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},eo={init:function(){this.setColour(js),this.appendDummyInput().appendField(new Rt.FieldTextInput("property"),"KEY").appendField(":").appendField(new Rt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},io={init:function(){this.setColour(js),this.appendDummyInput().appendField(new Rt.FieldTextInput("property"),"KEY").appendField(":").appendField(new Rt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},no={init:function(){this.setColour(js),this.appendDummyInput().appendField(Rt.Msg.HTML_TEXT).appendField(new Rt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},so=160,oo={init:function(){this.setColour(so),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Rt.FieldTable(""),"TEXT")}},po={init:function(){this.setColour(so),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Rt.FieldMultilineInput(""),"TEXT")}},uo={init:function(){this.setColour(so),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Rt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},ao={init:function(){this.setColour(so),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},lo={init:function(){this.setColour(so),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Rt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},_o={init:function(){this.setColour(so),this.appendValueInput("VALUE").appendField(Rt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},ro={init:function(){this.setColour(so),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Rt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Rt.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=Rt.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+l()+"("+t+", "+e+", "+i+")"},Rt.isNumber(n)&&Rt.isNumber(s)&&Rt.isNumber(o))n=parseFloat(n),s=parseFloat(s),o=Math.abs(parseFloat(o)),0==n%1&&0==s%1&&0==o%1?(n<=s?(s++,t=0==n&&1==o?s:n+", "+s,1!=o&&(t+=", "+o)):t=n+", "+--s+", -"+o,t="range("+t+")"):(t=n",GTE:">="};const pa=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",o=e.valueToCode(this,"B",n)||"False";if("AND"==i)var p=s+" and "+o;else if("OR"==i)p=s+" or "+o;else if("NOR"==i)p="not("+s+"^"+o+")";else p=s+"^"+o;return[p,n]},ua=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},aa=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},la=function(t,e){return["None",e.ORDER_ATOMIC]},_a=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},ra=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},da=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},Ia=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Ta=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},ha=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},ma=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Oa=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ca=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Ra=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Ma=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ea=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ca=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Aa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},ga=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Sa=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Da=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Na=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},La=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},fa=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},Fa=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},va=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Pa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Va=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},ya=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},Ya=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},ba=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},ka=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),Rt.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var o=[],p=0;p\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},cl=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Rl=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},Ml=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},El=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Cl=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Al=function(t,e){return'"},gl=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Sl=function(){return this.getFieldValue("TEXT")+"\n"},Dl=function(t){return t.getFieldValue("TEXT")+"\n"},Nl=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Ll=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},fl=function(){return""},Fl=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},vl=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+i.join("\n")+n.join("\n")+p.join("\n")+u.join("")+t+"while True:\n"+a.join("")+l.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+p.join("\n")+u.join("")+t+l.join("\n")},Yl.scrubNakedValue=function(t){return t+"\n"},Yl.quote_=function(t){var e="'";return-1!==t.indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},Yl.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Yl.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Rt.utils.string.wrap(o,Yl.COMMENT_WRAP-3),n+=Yl.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const bl=100,kl={init:function(){this.setColour(bl),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_SERVO).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SERVO_MOVE)}},Xl={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["1","1"],["2","2"]]),"op"),this.setOutput(!0)}},Gl={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_ESP32_ON,"1"],[Rt.Msg.MIXLY_ESP32_OFF,"0"],[Rt.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},xl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_SETTING).appendField(Rt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Rt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Ul={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Rt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Hl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_SETTING).appendField(Rt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Rt.Msg.MIXLY_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Bl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Rt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Rt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_LED_SETONOFF)}},wl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Rt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Wl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Rt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Rt.Msg.MIXLY_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_LED_SETBRIGHT)}},Kl={init:function(){this.setColour(bl),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_TONE).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(Rt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},jl={init:function(){this.setColour(bl),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_TONE).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(Rt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Rt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Ql={init:function(){this.setColour(bl),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_NOTONE).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ql={init:function(){this.setColour(bl),this.appendValueInput("TICKS").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Rt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Rt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Jl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},zl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_RESET)}},Zl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Rt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},$l={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Rt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Rt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},t_={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},e_={init:function(){this.setColour(bl),this.appendValueInput("LIST").appendField(Rt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},i_={init:function(){this.setColour(bl),this.appendValueInput("LIST").appendField(Rt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.appendValueInput("PIN").setCheck(Number).appendField(Rt.Msg.MIXLY_PIN),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},n_={init:function(){this.setColour(bl),this.appendValueInput("LIST").appendField(Rt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.appendValueInput("PIN").setCheck(Number).appendField(Rt.Msg.MIXLY_PIN),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_MIXGO_MUSIC_PLAY_TONE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_PLAYSHOW)}},s_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(Rt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.MIXLY_RGB_PIN_COUNT)}},o_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_RGB_NUM_R_G_B)}},p_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_WRI)}},u_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_RGB_NUM_R_G_B)}},a_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_RGB_NUM_R_G_B)}},l_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RGB),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_WRI)}},__=Bl,r_=wl,d_=Wl,I_="#2FAD7A",T_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_TERMINAL_WIDGET_VPIN_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_TERMINAL_WIDGET_VPIN_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_TERMINAL_WIDGET_VPIN_MESSAGE0,args0:[{check:Number,type:"input_value",name:"virtual_pin"}]})}},h_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_SYNC_VIRTUAL_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_SYNC_VIRTUAL_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_SYNC_VIRTUAL_MESSAGE0,args0:[{check:Number,type:"input_value",name:"virtual_pin"}]})}},m_={init:function(){this.jsonInit({inputsInline:!0,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_ON_DISCONNECTED_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_ON_DISCONNECTED_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_ON_DISCONNECTED_MESSAGE0}),this.appendStatementInput("DO").appendField(Rt.CONTROLS_REPEAT_INPUT_DO)}},O_={init:function(){this.jsonInit({inputsInline:!0,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_ON_CONNECTED_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_ON_CONNECTED_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_ON_CONNECTED_MESSAGE0}),this.appendStatementInput("DO").appendField(Rt.CONTROLS_REPEAT_INPUT_DO)}},c_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNKTIMER_RUN_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNKTIMER_RUN_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNKTIMER_RUN_MESSAGE0})}},R_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_RUN_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_RUN_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_RUN_MESSAGE0})}},M_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_APP_NOTIFY_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_APP_NOTIFY_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_APP_NOTIFY_MESSAGE0,args0:[{check:String,type:"input_value",name:"notification"}]})}},E_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_STOP_TIMERS_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNKTIMER_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_STOP_TIMERS_MESSAGE0,args0:[{check:Number,type:"input_value",name:"timer_num"}]})}},C_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_SET_PROPERTY_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_SET_PROPERTY_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_SET_PROPERTY_MESSAGE0,args0:[{check:String,type:"input_value",name:"attribute_name"},{type:"input_value",name:"attribute_value"}]})}},A_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_EMAIL_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_EMAIL_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_EMAIL_MESSAGE0,args0:[{check:String,type:"input_value",name:"TargetEmail"},{check:String,type:"input_value",name:"subject"},{check:String,type:"input_value",name:"body"}]})}},g_={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_GET_TIMERS_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_GET_TIMERS_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_GET_TIMERS_MESSAGE0})}},S_={init:function(){this.jsonInit({message0:Rt.Msg.MPYTHON_BLYNKTIMER_MESSAGE0,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNKTIMER_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNKTIMER_TOOLTIP,args0:[{check:Number,type:"input_value",name:"Num"},{options:[[Rt.Msg.MIXLY_PYTHON_PERIODIC,"False"],[Rt.Msg.MIXLY_PYTHON_ONE_SHOT,"True"]],type:"field_dropdown",name:"Timer_mode"},{check:Number,type:"input_value",name:"period"}]}),this.appendStatementInput("DO").appendField(Rt.CONTROLS_REPEAT_INPUT_DO)}},D_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_SENSOR_DATA_TO_APP_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_SENSOR_DATA_TO_APP_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_SENSOR_DATA_TO_APP_MESSAGE0,args0:[{type:"input_value",name:"sensor_data"},{check:Number,type:"input_value",name:"virtual_pin"}]})}},N_={init:function(){this.jsonInit({inputsInline:!0,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_APP_DATA_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_SENSOR_DATA_TO_APP_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_APP_DATA_MESSAGE0,args0:[{check:Number,type:"input_value",name:"virtual_pin"},{type:"input_value",name:"virtual_pin_val"}]}),this.appendStatementInput("DO").appendField(Rt.CONTROLS_REPEAT_INPUT_DO)}},L_={init:function(){this.jsonInit({nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_SETUP_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_SETUP_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_SETUP_MESSAGE0,args0:[{type:"input_dummy"},{check:String,type:"input_value",name:"server"},{check:Number,type:"input_value",name:"port"},{check:String,type:"input_value",name:"auth"}]})}},f_=120,F_={init:function(){this.setColour(f_),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Rt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT).appendField(new Rt.FieldDropdown(F_.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Rt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Rt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))},OPERATORS:[[Rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]]},v_={init:function(){this.setColour(f_);var t=new Rt.FieldDropdown(v_.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Rt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Rt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}},OPERATORS:[[Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]]},P_="5BA5A5",V_={init:function(){this.appendValueInput("SUB").setCheck("var"),this.setColour(P_),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_LET2).appendField(new Rt.FieldDropdown(V_.OPERATORS),"OP"),this.appendValueInput("val").appendField(Rt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Rt.Msg.DISPLAY_IMAGE_LET,n=Rt.Msg.DISPLAY_IMAGE_LET2,s=Rt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Rt.Msg.MIXLY_UP,down:Rt.Msg.MIXLY_DOWN,left:Rt.Msg.MIXLY_LEFT,right:Rt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Rt.Msg.MIXLY_UP,"shift_up"],[Rt.Msg.MIXLY_DOWN,"shift_down"],[Rt.Msg.MIXLY_LEFT,"shift_left"],[Rt.Msg.MIXLY_RIGHT,"shift_right"]]},y_={init:function(){this.appendValueInput("SUB").setCheck("var"),this.setColour(P_),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Rt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Rt.FieldDropdown(y_.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Rt.Msg.MIXLY_MICROBIT_image_add,"-":Rt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Rt.Msg.MICROBIT_DISPLAY_UNION,"add"],[Rt.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Y_={init:function(){this.setColour(P_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Rt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Y_.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Rt.Msg.MIXLY_MICROBIT_IMAGE+{height:Rt.Msg.MIXLY_HEIGHT,width:Rt.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Rt.Msg.MIXLY_HEIGHT,"height"],[Rt.Msg.MIXLY_WIDTH,"width"]]},b_={init:function(){this.setColour(P_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RECT).appendField(new Rt.FieldDropdown(b_.STATUS),"OP"),this.jsonInit({message0:Rt.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_OLED_RECT)},STATUS:[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},k_={init:function(){this.setColour(P_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Rt.FieldDropdown(k_.STATUS),"OP"),this.jsonInit({message0:Rt.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},X_={init:function(){this.setColour(P_),this.appendValueInput("SUB").setCheck("var").appendField(Rt.Msg.MSG.catOLED),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_LET2).appendField(new Rt.FieldDropdown(X_.OPERATORS),"OP"),this.appendValueInput("val").appendField(Rt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Rt.Msg.DISPLAY_IMAGE_LET,n=Rt.Msg.DISPLAY_IMAGE_LET2,s=Rt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Rt.Msg.MIXLY_UP,down:Rt.Msg.MIXLY_DOWN,left:Rt.Msg.MIXLY_LEFT,right:Rt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Rt.Msg.MIXLY_UP,"shift_up"],[Rt.Msg.MIXLY_DOWN,"shift_down"],[Rt.Msg.MIXLY_LEFT,"shift_left"],[Rt.Msg.MIXLY_RIGHT,"shift_right"]]},G_="#569A98",x_={init:function(){this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Rt.inputs.Align.CENTRE).appendField(new Rt.FieldBitmap(x_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(32).fill(0)))},U_={init:function(){this.setColour(G_),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Rt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Rt.FieldDropdown(U_.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Rt.Msg.MIXLY_MICROBIT_image_add,"-":Rt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Rt.Msg.MICROBIT_DISPLAY_UNION,"add"],[Rt.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},H_={init:function(){this.setColour(G_),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_LET2).appendField(new Rt.FieldDropdown(H_.OPERATORS),"OP"),this.appendValueInput("val").appendField(Rt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_UNIT);Mt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Mt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Rt.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Rt.Msg.DISPLAY_IMAGE_LET,n=Rt.Msg.DISPLAY_IMAGE_LET2,s=Rt.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:Rt.Msg.MIXLY_UP,shift_down:Rt.Msg.MIXLY_DOWN,shift_left:Rt.Msg.MIXLY_LEFT,shift_right:Rt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Rt.Msg.MIXLY_UP,"shift_up"],[Rt.Msg.MIXLY_DOWN,"shift_down"],[Rt.Msg.MIXLY_LEFT,"shift_left"],[Rt.Msg.MIXLY_RIGHT,"shift_right"]]},B_={init:function(){this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Rt.inputs.Align.CENTRE).appendField(new Rt.FieldBitmap(B_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},w_={init:function(){this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Rt.inputs.Align.CENTRE).appendField(new Rt.FieldBitmap(w_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},W_={init:function(){this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Rt.inputs.Align.CENTRE).appendField(new Rt.FieldBitmap(W_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},K_={init:function(){this.setColour(G_),this.appendDummyInput().appendField(Rt.Msg.OLED_SET_FONT).appendField(new Rt.FieldDropdown(K_.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+Rt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+Rt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+Rt.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},j_={init:function(){this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Rt.inputs.Align.CENTRE).appendField(new Rt.FieldBitmap(j_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},Q_={init:function(){this.setColour(G_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new Rt.FieldDropdown(Q_.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[Rt.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[Rt.Msg.CLOCKWISE+"90"+Rt.Msg.blockpy_setheading_degree,"1"],[Rt.Msg.CLOCKWISE+"180"+Rt.Msg.blockpy_setheading_degree,"2"],[Rt.Msg.CLOCKWISE+"270"+Rt.Msg.blockpy_setheading_degree,"3"]]},q_={init:function(){this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Rt.inputs.Align.CENTRE).appendField(new Rt.FieldBitmap(q_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},J_=180,z_={colourOptions:["#f00","#000"],columns:2},Z_={init:function(){this.jsonInit({colour:J_,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.clear",message0:Rt.Msg.MIXLY_MICROBIT_Clear_display}),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Clear_display)}},$_={init:function(){this.setColour(J_),this.appendValueInput("x").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},tr={init:function(){this.setColour(J_),this.appendValueInput("x").setCheck(Number).appendField(Rt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},er={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(new Rt.FieldDropdown([[Rt.Msg.OLED_DRAWSTR_ONE_BY_ONE,"show"],[Rt.Msg.MIXLY_ESP32_MONITOR_SCROLL,"scroll"]]),"MODE").appendField(Rt.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.OLED_DRAWSTR;return{show:Rt.Msg.OLED_DRAWSTR_ONE_BY_ONE,scroll:Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING}[e]+i}))}},ir={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(new Rt.FieldDropdown([[Rt.Msg.OLED_DRAWSTR_ONE_BY_ONE,"show"],[Rt.Msg.MIXLY_ESP32_MONITOR_SCROLL,"scroll"]]),"MODE").appendField(Rt.Msg.OLED_DRAWSTR),this.appendValueInput("time").setCheck(Number).appendField(Rt.Msg.MIXLY_DELAY),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.OLED_DRAWSTR;return{show:Rt.Msg.OLED_DRAWSTR_ONE_BY_ONE,scroll:Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING}[e]+i}))}},nr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_MONITOR_SHOW_STATIC),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_SHOW_STATIC)}},sr={init:function(){this.setColour(J_),this.appendValueInput("PIN",String).setCheck("esp32_image").appendField(Rt.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.OLED_BITMAP)}},or={init:function(){this.jsonInit({colour:J_,InputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",tooltip:"Show the referenced image on the display.",message0:Rt.Msg.OLED_BITMAP,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"],["LEFT_ARROW","LEFT_ARROW"],["RIGHT_ARROW","RIGHT_ARROW"],["DRESS","DRESS"],["TRANSFORMERS","TRANSFORMERS"],["SCISSORS","SCISSORS"],["EXIT","EXIT"],["TREE","TREE"],["PACMAN","PACMAN"],["TARGET","TARGET"],["TSHIRT","TSHIRT"],["ROLLERSKATE","ROLLERSKATE"],["DUCK","DUCK"],["HOUSE","HOUSE"],["TORTOISE","TORTOISE"],["BUTTERFLY","BUTTERFLY"],["STICKFIGURE","STICKFIGURE"],["GHOST","GHOST"],["PITCHFORK","PITCHFORK"],["MUSIC_QUAVERS","MUSIC_QUAVERS"],["MUSIC_QUAVER","MUSIC_QUAVER"],["MUSIC_CROTCHET","MUSIC_CROTCHET"],["COW","COW"],["RABBIT","RABBIT"],["SQUARE_SMALL","SQUARE_SMALL"],["SQUARE","SQUARE"],["DIAMOND_SMALL","DIAMOND_SMALL"],["DIAMOND","DIAMOND"],["CHESSBOARD","CHESSBOARD"],["TRIANGLE_LEFT","TRIANGLE_LEFT"],["TRIANGLE","TRIANGLE"],["SNAKE","SNAKE"],["UMBRELLA","UMBRELLA"],["SKULL","SKULL"],["GIRAFFE","GIRAFFE"],["SWORD","SWORD"]],type:"field_dropdown"}]})}},pr={init:function(){this.jsonInit({colour:J_,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",message0:Rt.Msg.MIXLY_MICROBIT_Animate_images,args0:[{check:"List",type:"input_value",name:"images"},{type:"input_value",name:"delay"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"clear"}]}),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_delay+Rt.Msg.MIXLY_MICROBIT_Animate_images1)}},ur={init:function(){this.jsonInit({colour:J_,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.scroll",tooltip:"Scroll the referenced text across the display.",message0:Rt.Msg.MIXLY_MICROBIT_Scroll_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},ar={init:function(){this.setColour(J_),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_Turn_on_display,"on"],[Rt.Msg.MIXLY_MICROBIT_Turn_off_display,"off"]]),"on_off").appendField(Rt.Msg.MIXLY_MICROBIT_monitor),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("on_off"),i=Rt.Msg.MIXLY_MICROBIT_monitor;return{on:Rt.Msg.MIXLY_MICROBIT_Turn_on_display,off:Rt.Msg.MIXLY_MICROBIT_Turn_off_display}[e]+i}))}},lr={init:function(){this.jsonInit({colour:J_,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.off",tooltip:"Turn off the display.",message0:Rt.Msg.MIXLY_MICROBIT_Turn_off_display})}},_r={init:function(){this.jsonInit({colour:J_,output:"Boolean",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.is_on",message0:Rt.Msg.MIXLY_MICROBIT_Display_is_on}),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Display_is_on1)}},rr={init:function(){this.jsonInit({colour:J_,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"],["LEFT_ARROW","LEFT_ARROW"],["RIGHT_ARROW","RIGHT_ARROW"],["DRESS","DRESS"],["TRANSFORMERS","TRANSFORMERS"],["SCISSORS","SCISSORS"],["EXIT","EXIT"],["TREE","TREE"],["PACMAN","PACMAN"],["TARGET","TARGET"],["TSHIRT","TSHIRT"],["ROLLERSKATE","ROLLERSKATE"],["DUCK","DUCK"],["HOUSE","HOUSE"],["TORTOISE","TORTOISE"],["BUTTERFLY","BUTTERFLY"],["STICKFIGURE","STICKFIGURE"],["GHOST","GHOST"],["PITCHFORK","PITCHFORK"],["MUSIC_QUAVERS","MUSIC_QUAVERS"],["MUSIC_QUAVER","MUSIC_QUAVER"],["MUSIC_CROTCHET","MUSIC_CROTCHET"],["COW","COW"],["RABBIT","RABBIT"],["SQUARE_SMALL","SQUARE_SMALL"],["SQUARE","SQUARE"],["DIAMOND_SMALL","DIAMOND_SMALL"],["DIAMOND","DIAMOND"],["CHESSBOARD","CHESSBOARD"],["TRIANGLE_LEFT","TRIANGLE_LEFT"],["TRIANGLE","TRIANGLE"],["SNAKE","SNAKE"],["UMBRELLA","UMBRELLA"],["SKULL","SKULL"],["GIRAFFE","GIRAFFE"],["SWORD","SWORD"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:Rt.Msg.MIXLY_MICROBIT_Built_in_image1,message0:Rt.Msg.MIXLY_MICROBIT_Built_in_image})}},dr={init:function(){this.jsonInit({colour:J_,args0:[{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"00"},{colour:"#000000",type:"field_colour",name:"01"},{colour:"#000000",type:"field_colour",name:"02"},{colour:"#000000",type:"field_colour",name:"03"},{colour:"#000000",type:"field_colour",name:"04"},{colour:"#000000",type:"field_colour",name:"05"},{colour:"#000000",type:"field_colour",name:"06"},{colour:"#000000",type:"field_colour",name:"07"},{colour:"#000000",type:"field_colour",name:"08"},{colour:"#000000",type:"field_colour",name:"09"},{colour:"#000000",type:"field_colour",name:"0a"},{colour:"#000000",type:"field_colour",name:"0b"},{colour:"#000000",type:"field_colour",name:"0c"},{colour:"#000000",type:"field_colour",name:"0d"},{colour:"#000000",type:"field_colour",name:"0e"},{colour:"#000000",type:"field_colour",name:"0f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"10"},{colour:"#000000",type:"field_colour",name:"11"},{colour:"#000000",type:"field_colour",name:"12"},{colour:"#000000",type:"field_colour",name:"13"},{colour:"#000000",type:"field_colour",name:"14"},{colour:"#000000",type:"field_colour",name:"15"},{colour:"#000000",type:"field_colour",name:"16"},{colour:"#000000",type:"field_colour",name:"17"},{colour:"#000000",type:"field_colour",name:"18"},{colour:"#000000",type:"field_colour",name:"19"},{colour:"#000000",type:"field_colour",name:"1a"},{colour:"#000000",type:"field_colour",name:"1b"},{colour:"#000000",type:"field_colour",name:"1c"},{colour:"#000000",type:"field_colour",name:"1d"},{colour:"#000000",type:"field_colour",name:"1e"},{colour:"#000000",type:"field_colour",name:"1f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"20"},{colour:"#000000",type:"field_colour",name:"21"},{colour:"#000000",type:"field_colour",name:"22"},{colour:"#000000",type:"field_colour",name:"23"},{colour:"#000000",type:"field_colour",name:"24"},{colour:"#000000",type:"field_colour",name:"25"},{colour:"#000000",type:"field_colour",name:"26"},{colour:"#000000",type:"field_colour",name:"27"},{colour:"#000000",type:"field_colour",name:"28"},{colour:"#000000",type:"field_colour",name:"29"},{colour:"#000000",type:"field_colour",name:"2a"},{colour:"#000000",type:"field_colour",name:"2b"},{colour:"#000000",type:"field_colour",name:"2c"},{colour:"#000000",type:"field_colour",name:"2d"},{colour:"#000000",type:"field_colour",name:"2e"},{colour:"#000000",type:"field_colour",name:"2f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"30"},{colour:"#000000",type:"field_colour",name:"31"},{colour:"#000000",type:"field_colour",name:"32"},{colour:"#000000",type:"field_colour",name:"33"},{colour:"#000000",type:"field_colour",name:"34"},{colour:"#000000",type:"field_colour",name:"35"},{colour:"#000000",type:"field_colour",name:"36"},{colour:"#000000",type:"field_colour",name:"37"},{colour:"#000000",type:"field_colour",name:"38"},{colour:"#000000",type:"field_colour",name:"39"},{colour:"#000000",type:"field_colour",name:"3a"},{colour:"#000000",type:"field_colour",name:"3b"},{colour:"#000000",type:"field_colour",name:"3c"},{colour:"#000000",type:"field_colour",name:"3d"},{colour:"#000000",type:"field_colour",name:"3e"},{colour:"#000000",type:"field_colour",name:"3f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"40"},{colour:"#000000",type:"field_colour",name:"41"},{colour:"#000000",type:"field_colour",name:"42"},{colour:"#000000",type:"field_colour",name:"43"},{colour:"#000000",type:"field_colour",name:"44"},{colour:"#000000",type:"field_colour",name:"45"},{colour:"#000000",type:"field_colour",name:"46"},{colour:"#000000",type:"field_colour",name:"47"},{colour:"#000000",type:"field_colour",name:"48"},{colour:"#000000",type:"field_colour",name:"49"},{colour:"#000000",type:"field_colour",name:"4a"},{colour:"#000000",type:"field_colour",name:"4b"},{colour:"#000000",type:"field_colour",name:"4c"},{colour:"#000000",type:"field_colour",name:"4d"},{colour:"#000000",type:"field_colour",name:"4e"},{colour:"#000000",type:"field_colour",name:"4f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"50"},{colour:"#000000",type:"field_colour",name:"51"},{colour:"#000000",type:"field_colour",name:"52"},{colour:"#000000",type:"field_colour",name:"53"},{colour:"#000000",type:"field_colour",name:"54"},{colour:"#000000",type:"field_colour",name:"55"},{colour:"#000000",type:"field_colour",name:"56"},{colour:"#000000",type:"field_colour",name:"57"},{colour:"#000000",type:"field_colour",name:"58"},{colour:"#000000",type:"field_colour",name:"59"},{colour:"#000000",type:"field_colour",name:"5a"},{colour:"#000000",type:"field_colour",name:"5b"},{colour:"#000000",type:"field_colour",name:"5c"},{colour:"#000000",type:"field_colour",name:"5d"},{colour:"#000000",type:"field_colour",name:"5e"},{colour:"#000000",type:"field_colour",name:"5f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"60"},{colour:"#000000",type:"field_colour",name:"61"},{colour:"#000000",type:"field_colour",name:"62"},{colour:"#000000",type:"field_colour",name:"63"},{colour:"#000000",type:"field_colour",name:"64"},{colour:"#000000",type:"field_colour",name:"65"},{colour:"#000000",type:"field_colour",name:"66"},{colour:"#000000",type:"field_colour",name:"67"},{colour:"#000000",type:"field_colour",name:"68"},{colour:"#000000",type:"field_colour",name:"69"},{colour:"#000000",type:"field_colour",name:"6a"},{colour:"#000000",type:"field_colour",name:"6b"},{colour:"#000000",type:"field_colour",name:"6c"},{colour:"#000000",type:"field_colour",name:"6d"},{colour:"#000000",type:"field_colour",name:"6e"},{colour:"#000000",type:"field_colour",name:"6f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"70"},{colour:"#000000",type:"field_colour",name:"71"},{colour:"#000000",type:"field_colour",name:"72"},{colour:"#000000",type:"field_colour",name:"73"},{colour:"#000000",type:"field_colour",name:"74"},{colour:"#000000",type:"field_colour",name:"75"},{colour:"#000000",type:"field_colour",name:"76"},{colour:"#000000",type:"field_colour",name:"77"},{colour:"#000000",type:"field_colour",name:"78"},{colour:"#000000",type:"field_colour",name:"79"},{colour:"#000000",type:"field_colour",name:"7a"},{colour:"#000000",type:"field_colour",name:"7b"},{colour:"#000000",type:"field_colour",name:"7c"},{colour:"#000000",type:"field_colour",name:"7d"},{colour:"#000000",type:"field_colour",name:"7e"},{colour:"#000000",type:"field_colour",name:"7f"}],output:"esp32_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image",message0:Rt.Msg.MIXLY_ESP32_Create_image}),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Create_image1)}},Ir={init:function(){this.setColour(J_),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(Rt.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_LET2).appendField(new Rt.FieldDropdown(Ir.OPERATORS),"OP"),this.appendValueInput("val").appendField(Rt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Rt.Msg.DISPLAY_IMAGE_LET,n=Rt.Msg.DISPLAY_IMAGE_LET2,s=Rt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Rt.Msg.MIXLY_UP,down:Rt.Msg.MIXLY_DOWN,left:Rt.Msg.MIXLY_LEFT,right:Rt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Rt.Msg.MIXLY_UP,"up"],[Rt.Msg.MIXLY_DOWN,"down"],[Rt.Msg.MIXLY_LEFT,"left"],[Rt.Msg.MIXLY_RIGHT,"right"]]},Tr={init:function(){this.setColour(J_),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Rt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Rt.FieldDropdown(Tr.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Rt.Msg.MIXLY_MICROBIT_image_add,"-":Rt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Rt.Msg.MICROBIT_DISPLAY_UNION,"+"],[Rt.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},hr={init:function(){this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.OLED_DRAWSTR_ONE_BY_ONE,"show"],[Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING,"scroll"]]),"MODE"),this.jsonInit({colour:J_,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",tooltip:"Display the list of images as an animation with a certain delay between each frame. Indicate if you need to wait before continuing, continuously loop the animation and clear the display when finished.",message0:Rt.Msg.MIXLY_MICROBIT_SHOW_STRING,args0:[{check:String,type:"input_value",name:"images"},{type:"input_value",name:"delay"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"clear"}]}),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.OLED_DRAWSTR;return Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_delay+{show:Rt.Msg.OLED_DRAWSTR_ONE_BY_ONE,scroll:Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING}[e]+i}))}},mr={init:function(){this.setColour(J_),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(Rt.Msg.MIXLY_LCD_PRINT1),this.appendValueInput("TEXT2",String).setCheck([String,Number]).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_LCD_PRINT2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.MIXLY_LCD_PRINT4_TOOLTIP)}},Or={init:function(){this.setColour(J_),this.appendValueInput("device").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_SETUP).appendField(Rt.Msg.MIXLY_DF_LCD).appendField("1602").appendField("mylcd").appendField(Rt.Msg.MIXLY_LCD_ADDRESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_SETUP+Rt.Msg.MIXLY_DF_LCD+Rt.Msg.MIXLY_LCD_ADDRESS)}},cr={init:function(){this.setColour(J_),this.appendValueInput("row",Number).setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(Rt.Msg.MIXLY_LCD_ROW),this.appendValueInput("column",Number).setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_LCD_COLUMN),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_LCD_PRINT),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.MIXLY_LCD_PRINT3_TOOLTIP)}},Rr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_ON,"on()"],[Rt.Msg.MIXLY_OFF,"off()"],[Rt.Msg.MIXLY_LCD_STAT_CLEAR,"clear()"],[Rt.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(off)"],[Rt.Msg.MIXLY_LCD_BACKLIGHT,"backlight(on)"]]),"STAT"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);var t=this;this.setTooltip((function(){var e=t.getFieldValue("STAT");return Rt.Msg.LISTS_SET_INDEX_SET+Rt.Msg.MIXLY_DF_LCD+{"on()":Rt.Msg.MIXLY_ON,"off()":Rt.Msg.MIXLY_OFF,"clear()":Rt.Msg.MIXLY_LCD_STAT_CLEAR,"backlight(off)":Rt.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(on)":Rt.Msg.MIXLY_LCD_BACKLIGHT}[e]}))}},Mr={init:function(){this.setColour(J_),this.appendValueInput("I2CSUB").appendField(Rt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendValueInput("row").appendField(Rt.Msg.MIXLY_SETUP+Rt.Msg.LISTS_SET_INDEX_INPUT_TO+"OLED").setCheck(Number),this.appendValueInput("column").appendField("X").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip()}},Er={init:function(){this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendValueInput("Text_line1","String").setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.OLEDDISPLAY+Rt.Msg.line1),this.appendValueInput("Text_line2","String").setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.line2),this.appendValueInput("Text_line3","String").setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.line3),this.appendValueInput("Text_line4","String").setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.line4),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(J_),this.setTooltip(Rt.Msg.MIXLY_DF_LCD+Rt.Msg.OLEDDISPLAY+Rt.Msg.MIXLY_MICROBIT_TYPE_STRING)}},Cr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Rt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Cr.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Rt.Msg.MIXLY_MICROBIT_IMAGE+{height:Rt.Msg.MIXLY_HEIGHT,width:Rt.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Rt.Msg.MIXLY_HEIGHT,"height"],[Rt.Msg.MIXLY_WIDTH,"width"]]},Ar={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RECT).appendField(new Rt.FieldDropdown(Ar.STATUS),"OP"),this.jsonInit({message0:Rt.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_OLED_RECT)},STATUS:[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},gr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_DISPLAY_DRAW).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_DISPLAY_RLINE,"hline"],[Rt.Msg.MIXLY_DISPLAY_VLINE,"vline"]]),"direction"),this.jsonInit({message0:Rt.Msg.MIXLY_MICROBIT_SHOW_LINE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"length"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.MIXLY_OLED_LINE)}},Sr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.jsonInit({message0:Rt.Msg.MIXLY_MICROBIT_SHOW_LINE_ARBITRARILY,args0:[{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.MIXLY_OLED_LINE_ARBIT)}},Dr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Nr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_MONITOR_GET_SCREEN_IMAGE),this.setInputsInline(!0),this.setOutput(!0,"esp32_image"),this.setTooltip(Rt.Msg.MIXLY_ESP32_MONITOR_GET_SCREEN_IMAGE_TOOLTIP)}},Lr={init:function(){this.setColour(J_),this.appendValueInput("x").setCheck(Number).appendField(Rt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS)}},fr={init:function(){this.setColour(J_),this.appendValueInput("x").setCheck(Number).appendField(Rt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BLINK_RATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BLINK_RATE)}},Fr={init:function(){this.setColour(J_),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_NUM),this.appendDummyInput("").appendField(Rt.Msg.LISTS_SET_INDEX_SET+Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS).appendField(new Rt.FieldColour("#f00",null,z_),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_RGB_NUM_R_G_B)}},vr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(Rt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_OR_ANIMATION),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.OLED_BITMAP_OR_STRING)}},Pr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Vr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(Rt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_OR_ANIMATION),this.appendValueInput("time").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},yr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("time").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},Yr={init:function(){this.setColour(J_),this.appendDummyInput("").appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_ESP32_ON,"ON"],[Rt.Msg.MIXLY_ESP32_OFF,"OFF"]]),"ONOFF"),this.setOutput(!0,Boolean),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},br={init:function(){this.setColour(J_),this.appendValueInput("SUB"),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_LCD_STAT_CLEAR,"0"],[Rt.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL,"1"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i={0:Rt.Msg.MIXLY_LCD_STAT_CLEAR,1:Rt.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL};return Rt.Msg.MIXLY_DF_LCD+i[e]}))}},kr={init:function(){this.setColour(J_),this.appendValueInput("I2CSUB").appendField(Rt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_SETUP+Rt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Rt.FieldDropdown([["TM1650","TM1650"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return Rt.Msg.MIXLY_ESP32_SENSOR_USE_I2C_TOOLTIP+{TM1650:"TM1650"}[e]}))}},Xr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_4DIGITDISPLAY).appendField(new Rt.FieldDropdown([["TM1650","tm1650"]]),"TYPE"),this.appendValueInput("VAR"),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_ON,"_on"],[Rt.Msg.MIXLY_OFF,"_off"],[Rt.Msg.MIXLY_LCD_STAT_CLEAR,"_clear"]]),"STAT"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_4digitdisplay_power)}},Gr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_4DIGITDISPLAY).appendField(new Rt.FieldDropdown([["TM1650","tm1650"]]),"TYPE"),this.appendValueInput("VAR"),this.appendValueInput("VALUE").setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_NUMBER),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},xr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_4DIGITDISPLAY).appendField(new Rt.FieldDropdown([["TM1650","tm1650"]]),"TYPE"),this.appendValueInput("VAR"),this.appendValueInput("NO").appendField(Rt.Msg.MIXLY_4DIGITDISPLAY_NOMBER1),this.appendValueInput("STAT").appendField(Rt.Msg.MIXLY_4DIGITDISPLAY_NOMBER2+Rt.Msg.MIXLY_4DIGITDISPLAY_DOT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_4digitdisplay_showDot)}},Ur={init:function(){this.setColour(J_),this.setOutput(!0,"Tuple"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_DISPLAY_ANIMATE).appendField(new Rt.FieldDropdown(Ur.ANIMATE),"ANIMATION")},ANIMATE:[["ALL_CLOCKS","ALL_CLOCKS"],["ALL_ARROWS","ALL_ARROWS"]]},Hr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Rt.FieldDropdown(Hr.STATUS),"OP"),this.jsonInit({message0:Rt.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Br={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_DISPLAY_DRAW+Rt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new Rt.FieldDropdown(Br.STATUS),"OP"),this.jsonInit({message0:Rt.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_DISPLAY_DRAW+Rt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},wr={init:function(){this.setColour("#555555"),this.appendDummyInput("").appendField(Rt.Msg.MIXGO_ONBOARDDISPLAY_HELP),this.setInputsInline(!0),this.setTooltip("")}},Wr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.OLED_BITMAP),this.appendValueInput("START_X",Number).appendField(Rt.Msg.OLED_START_X).setCheck(Number),this.appendValueInput("START_Y",Number).appendField(Rt.Msg.OLED_START_Y).setCheck(Number),this.appendValueInput("bitmap_name",String).appendField(Rt.Msg.OLED_BITMAP_NAME),this.appendValueInput("WIDTH",Number).appendField(Rt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("HEIGHT",Number).appendField(Rt.Msg.MIXLY_HEIGHT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.OLED_SHOW_BMP_TOOLTIP)}},Kr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED),this.appendDummyInput("").appendField(Rt.Msg.OLED_DRAWPIXEL),this.appendValueInput("POS_X").appendField(Rt.Msg.OLED_POSX),this.appendValueInput("POS_Y").appendField(Rt.Msg.OLED_POSY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.OLED_DRAW_PIXE_TOOLTIP)}},jr={init:function(){this.setColour(J_),this.appendValueInput("I2CSUB").appendField(Rt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_SETUP+Rt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Rt.FieldDropdown([["32x12 Matrix","32x12 Matrix"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Qr={init:function(){this.setColour(J_),this.appendValueInput("SUB"),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(Rt.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.OLED_BITMAP_OR_STRING)}},qr={init:function(){this.setColour(J_),this.appendValueInput("SUB"),this.appendValueInput("data").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Jr="#526FC3",zr={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(Rt.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Rt.Msg.HTML_PASSWORD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},Zr={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"+Rt.Msg.TUPLE_JOIN),this.appendValueInput("CLIENT").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_CLIENT),this.appendValueInput("SERVER").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_SERVER),this.appendValueInput("USERNAME").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_USERNAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_PASSWORD),this.appendValueInput("TOPIC").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_TOPIC),this.appendValueInput("SUB").appendField(Rt.Msg.MIXLY_ESP32_ONENET_SUB),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_CONNECT_TOOLTIP)}},$r={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_DISCONNECT_TOOLTIP)}},td={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_CHECK_TOOLTIP)}},ed={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendValueInput("DICT").appendField(Rt.Msg.MIXLY_ESP32_PUBLISH_ONENET),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_IOT_ONENET_PRINT_DATA).appendField(new Rt.FieldCheckbox("TRUE"),"is_print"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_PUBLISH_DICT_TOOLTIP)}},id={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET").setAlign(Rt.inputs.Align.RIGHT),this.appendDummyInput().appendField(new Rt.FieldLabel(Rt.Msg.MIXLY_ESP32_PUBLISH_ONENET),"TIP").setAlign(Rt.inputs.Align.RIGHT),this.itemCount_=2,this.updateShape_(),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Rt.icons.MutatorIcon(["iot_publish_item"],this)),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_PUBLISH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("iot_publish_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},nd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},sd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},od={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},pd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(Rt.Msg.MIXLY_EMQX_SERVER).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Rt.Msg.MIXLY_WIFI_USERNAME).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Rt.Msg.MIXLY_IOT_PASSWORD).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(Rt.Msg.MIXLY_EMQX_PROJECT).setAlign(Rt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ud={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Rt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Rt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Rt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},ad={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Rt.Msg.MIXLY_EMQX_SUBSCRIBE+Rt.Msg.MIXLY_MICROBIT_MSG).appendField(Rt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Rt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},ld={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_d={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},rd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Rt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},Id={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Rt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},Td={init:function(){this.setColour(Jr),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},hd={init:function(){this.setColour(Jr),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},md={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},Od={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO").appendField(Rt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(Rt.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},cd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Rt.Msg.MIXLY_EMQX_SERVER).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Rt.Msg.CONTROLS_FOR_INPUT_WITH+Rt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(Rt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Rt.Msg.MIXLY_EMQX_SERVER).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Rt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(Rt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Md={init:function(){this.VISITOR_ID=Mt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(Jr),this.appendDummyInput("").appendField(new Rt.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},Ed={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO").appendField(Rt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},Cd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("HTTP"+Rt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Rt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(Rt.Msg.MIXLY_REQUESTS_GET).appendField(Rt.Msg.MIXLY_GET_CURRENT_TIME).appendField(Rt.Msg.MIXLY_OPEN_DEBUG).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Rt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ad={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("HTTP"+Rt.Msg.MIXLY_Client).appendField(Rt.Msg.MIXLY_GET).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Rt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Rt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},gd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MQTT"+Rt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Rt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(Rt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(Rt.Msg.MQTT_Topic).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(Rt.Msg.MIXLY_OPEN_DEBUG).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Rt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Sd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MQTT"+Rt.Msg.MIXLY_Client).appendField(Rt.Msg.MIXLY_GET).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Rt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Rt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},Dd=zr,Nd=Zr,Ld=$r,fd=td,Fd=id,vd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(Rt.Msg.MIXLY_EMQX_SERVER).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(Rt.Msg.MODEL_NAME).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(Rt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pd=vd,Vd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(Rt.Msg.MIXLY_EMQX_SERVER).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Rt.Msg.MIXLY_API_PRIVATE_KEY).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(Rt.Msg.MODEL_NAME).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(Rt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(Rt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(Rt.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(Rt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(Rt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},bd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("Ollama "+Rt.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},kd=225,Xd={init:function(){this.appendValueInput("VAL"),this.setColour(kd),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Rt.FieldDropdown(Xd.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:Rt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Rt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Rt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[Rt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Rt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Rt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[Rt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},Gd="#3288dd",xd={init:function(){this.appendValueInput("VAL"),this.setColour(Gd),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Rt.FieldDropdown(xd.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[Rt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Rt.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[Rt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Rt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[Rt.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},Ud="#A58C5B",Hd={init:function(){this.setColour(Ud),this.appendValueInput("PIN",Number).appendField(new Rt.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Hd.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Rt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Rt.Msg.MIXLY_GETHUMIDITY,"humidity"]]},Bd=(Rt.Msg.PS2_TRIANGLE,Rt.Msg.PS2_CIRCLE,Rt.Msg.PS2_CROSS,Rt.Msg.PS2_SQUARE,Rt.Msg.PS2_L1,Rt.Msg.PS2_L2,Rt.Msg.PS2_R1,Rt.Msg.PS2_R2,Rt.Msg.PS2_UP,Rt.Msg.PS2_RIGHT,Rt.Msg.PS2_DOWN,Rt.Msg.PS2_LEFT,Rt.Msg.PS2_SELECT,Rt.Msg.PS2_START,{init:function(){this.setColour(Ud),this.appendDummyInput("").appendField(Rt.Msg.PS2_stick).appendField(new Rt.FieldDropdown(Bd.PSSTK),"psstk"),this.setOutput(!0,Number),this.setTooltip("")},PSSTK:[[Rt.Msg.PS2_RX,"0"],[Rt.Msg.PS2_RY,"1"],[Rt.Msg.PS2_LX,"2"],[Rt.Msg.PS2_LY,"3"]]}),wd={init:function(){this.setColour(Ud),this.appendValueInput("SUB").appendField(Rt.Msg.PS2),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_JOYSTICK).appendField(new Rt.FieldDropdown(wd.PSSTK),"psstk"),this.setOutput(!0,Number),this.setTooltip("")},PSSTK:[[Rt.Msg.PS2_RX,"RX"],[Rt.Msg.PS2_RY,"RY"],[Rt.Msg.PS2_LX,"LX"],[Rt.Msg.PS2_LY,"LY"]]},Wd=40,Kd={init:function(){this.setColour(Wd),this.appendValueInput("PIN",Number).appendField(new Rt.FieldDropdown([["DHT11","dht11"],["DHT22","dht22"]]),"TYPE").appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Kd.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Rt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Rt.Msg.MIXLY_GETHUMIDITY,"relative_humidity"],[Rt.Msg.MIXLY_DHT11_T_H,"tempandhum"]]},jd=function(t,e){e.definitions_.import_music="import music";var i=e.valueToCode(this,"pitch",e.ORDER_ATOMIC);return"music.pitch("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+", "+i+")\n"},Qd=function(t,e){e.definitions_.import_music="import music";var i=e.valueToCode(this,"pitch",e.ORDER_ATOMIC),n=e.valueToCode(this,"time",e.ORDER_ATOMIC);return"music.pitch_time("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+", "+i+", "+n+")\n"},qd=function(t,e){return e.definitions_.import_music="import music","music.stop("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+")\n"},Jd=function(t,e){e.definitions_.import_music="import music";var i=e.valueToCode(this,"BPM",e.ORDER_ASSIGNMENT);return"music.set_tempo("+e.valueToCode(this,"TICKS",e.ORDER_ASSIGNMENT)+", "+i+")\n"},zd=function(t,e){e.definitions_.import_music="import music";return["music.get_tempo()",e.ORDER_ATOMIC]},Zd=function(t,e){return e.definitions_.import_music="import music","music.pitch("+e.valueToCode(this,"pitch",e.ORDER_ATOMIC)+")\n"},$d=function(t,e){return e.definitions_.import_music="import music","music.pitch_time("+e.valueToCode(this,"pitch",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"time",e.ORDER_ATOMIC)+")\n"},tI=function(t,e){e.definitions_.import_music="import music";return"music.stop()\n"},eI=function(t,e){return e.definitions_.import_music="import music","music.play("+e.valueToCode(this,"LIST",e.ORDER_ASSIGNMENT)+")\n"},iI=function(t,e){return e.definitions_.import_music="import music","music.play("+e.valueToCode(this,"LIST",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"PIN",e.ORDER_ASSIGNMENT)+")\n"},nI=function(t,e){return e.definitions_.import_music="import music",e.definitions_.import_matrix="import matrix","music.play_show("+e.valueToCode(this,"LIST",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"PIN",e.ORDER_ASSIGNMENT)+")\n"},sI=function(t,e){return e.definitions_.import_music="import music","music.reset()\n"},oI=function(t,e){return e.definitions_.import_servo="import servo",e.definitions_.import_machine="import machine","servo.servo_write_angle("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"DEGREE",e.ORDER_ATOMIC)+")\n"},pI=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},uI=function(t,e){return[this.getFieldValue("flag"),e.ORDER_ATOMIC]},aI=function(t,e){e.definitions_.import_mixgo="import mixgo";var i=e.valueToCode(this,"bright",e.ORDER_ATOMIC);return"mixgo.led("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+").setonoff("+i+")\n"},lI=function(t,e){return e.definitions_.import_mixgo="import mixgo",["mixgo.led("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+").getonoff()",e.ORDER_ATOMIC]},_I=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.led("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+").setbrightness("+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},rI=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.led"+e.valueToCode(this,"led",e.ORDER_ATOMIC)+".setonoff("+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},dI=function(t,e){return e.definitions_.import_mixgo="import mixgo",["mixgo.led"+e.valueToCode(this,"led",e.ORDER_ATOMIC)+".getonoff()",e.ORDER_ATOMIC]},II=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.led"+e.valueToCode(this,"led",e.ORDER_ATOMIC)+".setbrightness("+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},TI=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),s=e.valueToCode(this,"LEDCOUNT",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",e.definitions_.import_neopixel="import neopixel",i+" = neopixel.NeoPixel(machine.Pin("+n+"), "+s+", timing=True)\n"},hI=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_neopixel="import neopixel",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".write()\n"},mI=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_neopixel="import neopixel",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"["+e.valueToCode(this,"_LED_",e.ORDER_ATOMIC)+"] = ("+e.valueToCode(this,"RVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"GVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"BVALUE",e.ORDER_ATOMIC)+")\n"},OI=function(t,e){e.definitions_.import_mixgo="import mixgo";return"mixgo.rgb.write()\n"},cI=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.rgb["+e.valueToCode(this,"_LED_",e.ORDER_ATOMIC)+"] = ("+e.valueToCode(this,"RVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"GVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"BVALUE",e.ORDER_ATOMIC)+")\n"},RI=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.rgb.fill(("+e.valueToCode(this,"RVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"GVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"BVALUE",e.ORDER_ATOMIC)+"))\n"},MI=rI,EI=dI,CI=II,AI=function(t,e){var i=e.valueToCode(this,"virtual_pin",e.ORDER_ATOMIC);e.functions_["terminal_widget_vpin_"+i]=`\nALLOWED_COMMANDS_LIST = ['ls', 'lsusb', 'ip a', 'ip abc']\n\n@blynk.handle_event('write V${i}')\ndef write_handler(pin, _values):\n header = ''\n result = ''\n delimiter = '{}\\n'.format('=' * 30)\n if _values and _values[0] in ALLOWED_COMMANDS_LIST:\n cmd_params = _values[0].split(' ')\n try:\n result = subprocess.check_output(cmd_params).decode('utf-8')\n header = '[output]\\n'\n except subprocess.CalledProcessError as exe_err:\n header = '[error]\\n'\n result = 'Return Code: {}\\n'.format(exe_err.returncode)\n except Exception as g_err:\n print("Command caused '{}'".format(g_err))\n elif _values and _values[0] == 'help':\n header = '[help -> allowed commands]\\n'\n result = '{}\\n'.format('\\n'.join(ALLOWED_COMMANDS_LIST))\n\n # communicate with terminal if help or some allowed command\n if result:\n output = '{}{}{}{}'.format(header, delimiter, result, delimiter)\n print(output)\n blynk.virtual_write(pin, output)\n blynk.virtual_write(pin, '\\n')\n`;return""},gI=function(t,e){return"blynk.virtual_sync("+e.valueToCode(this,"virtual_pin",e.ORDER_ATOMIC)+")\n"},SI=function(t,e){var i=e.statementToCode(this,"DO");return i=e.addLoopTrap(i,this.id)||e.PASS,e.definitions_.blynk_on_disconnected="@blynk.handle_event(\"disconnect\")\ndef connect_handler():\n print('Blynk disconnected')\n"+i,""},DI=function(t,e){var i=e.statementToCode(this,"DO");return i=e.addLoopTrap(i,this.id)||e.PASS,e.definitions_.blynk_on_connected="@blynk.handle_event(\"connect\")\ndef connect_handler():\n print('Blynk connected')\n"+i,""},NI=function(){return"blynk_timer.run()\n"},LI=function(){return"blynk.run()\n"},fI=function(t,e){return"blynk.notify("+e.valueToCode(this,"notification",e.ORDER_ATOMIC)+")\n"},FI=function(t,e){e.definitions_.import_blynktimer="import blynktimer",e.definitions_.def_blynktimer="blynk_timer = blynktimer.Timer(no_timers_err=False)";var i=e.valueToCode(this,"timer_num",e.ORDER_ATOMIC);return`blynk_timer.stop('${i}_blynk_timer${i}')\n`},vI=function(t,e){e.definitions_.import_blynktimer="import blynktimer",e.definitions_.def_blynktimer="blynk_timer = blynktimer.Timer(no_timers_err=False)";return["blynk_timer.get_timers()",e.ORDER_ATOMIC]},PI=function(t,e){e.definitions_.import_blynktimer="import blynktimer";var i=e.valueToCode(this,"Num",e.ORDER_ATOMIC),n=e.valueToCode(this,"period",e.ORDER_ATOMIC),s=this.getFieldValue("Timer_mode"),o=e.statementToCode(this,"DO");return o=e.addLoopTrap(o,this.id)||e.PASS,e.definitions_.def_blynktimer="blynk_timer = blynktimer.Timer(no_timers_err=False)",e.definitions_["blynktimer_event"+i]=`\n@blynk_timer.register(interval=${n}, run_once=${s})\ndef blynk_timer${i}():\n`+o,""},VI=function(t,e){var i=e.valueToCode(this,"sensor_data",e.ORDER_ATOMIC);return"blynk.virtual_write("+e.valueToCode(this,"virtual_pin",e.ORDER_ATOMIC)+", "+i+")\n"},yI=function(t,e){var i=e.valueToCode(this,"virtual_pin",e.ORDER_ATOMIC),n=e.statementToCode(this,"DO");return n=e.addLoopTrap(n,this.id)||e.PASS,e.definitions_["blynk_VIRTUAL_WRITE_"+i]="@blynk.handle_event('write V"+i+"')\ndef write_virtual_pin_handler(pin, _value):\n for i in range(0, len(_value)):\n try: _value[i] = eval(_value[i])\n except: pass\n if len(_value) == 1: _value = _value[0]\n"+n,""},YI=function(t,e){var i=e.valueToCode(this,"body",e.ORDER_ATOMIC),n=e.valueToCode(this,"subject",e.ORDER_ATOMIC);return`blynk.email(${e.valueToCode(this,"TargetEmail",e.ORDER_ATOMIC)}, ${n}, ${i})\n`},bI=function(t,e){var i=e.valueToCode(this,"attribute_value",e.ORDER_ATOMIC);return`blynk.set_property(pin, ${e.valueToCode(this,"attribute_name",e.ORDER_ATOMIC)}, ${i})\n`},kI=function(t,e){e.definitions_.import_BlynkLib="import blynklib";var i=e.valueToCode(this,"server",e.ORDER_ATOMIC),n=e.valueToCode(this,"auth",e.ORDER_ATOMIC),s=e.valueToCode(this,"port",e.ORDER_ATOMIC);return e.definitions_.mpython_blynk_setup="blynk = blynklib.Blynk("+n+", server="+i+", port="+s+")",e.definitions_.blynk_on_connected="\n@blynk.handle_event(\"connect\")\ndef connect_handler():\n print('Blynk connected')\n",e.definitions_.blynk_on_disconnected="\n@blynk.handle_event(\"disconnect\")\ndef connect_handler():\n print('Blynk disconnected')\n",""};const XI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.show("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},GI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},xI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.showstatic("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},UI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.show("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},HI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},BI=function(t,e){e.definitions_.import_matrix="import matrix";var i={"#000000":"0","#ff0000":"1"};return['matrix.Image("'+i[t.getFieldValue("00")]+i[t.getFieldValue("01")]+i[t.getFieldValue("02")]+i[t.getFieldValue("03")]+i[t.getFieldValue("04")]+i[t.getFieldValue("05")]+i[t.getFieldValue("06")]+i[t.getFieldValue("07")]+i[t.getFieldValue("08")]+i[t.getFieldValue("09")]+i[t.getFieldValue("0a")]+i[t.getFieldValue("0b")]+i[t.getFieldValue("0c")]+i[t.getFieldValue("0d")]+i[t.getFieldValue("0e")]+i[t.getFieldValue("0f")]+":"+i[t.getFieldValue("10")]+i[t.getFieldValue("11")]+i[t.getFieldValue("12")]+i[t.getFieldValue("13")]+i[t.getFieldValue("14")]+i[t.getFieldValue("15")]+i[t.getFieldValue("16")]+i[t.getFieldValue("17")]+i[t.getFieldValue("18")]+i[t.getFieldValue("19")]+i[t.getFieldValue("1a")]+i[t.getFieldValue("1b")]+i[t.getFieldValue("1c")]+i[t.getFieldValue("1d")]+i[t.getFieldValue("1e")]+i[t.getFieldValue("1f")]+":"+i[t.getFieldValue("20")]+i[t.getFieldValue("21")]+i[t.getFieldValue("22")]+i[t.getFieldValue("23")]+i[t.getFieldValue("24")]+i[t.getFieldValue("25")]+i[t.getFieldValue("26")]+i[t.getFieldValue("27")]+i[t.getFieldValue("28")]+i[t.getFieldValue("29")]+i[t.getFieldValue("2a")]+i[t.getFieldValue("2b")]+i[t.getFieldValue("2c")]+i[t.getFieldValue("2d")]+i[t.getFieldValue("2e")]+i[t.getFieldValue("2f")]+":"+i[t.getFieldValue("30")]+i[t.getFieldValue("31")]+i[t.getFieldValue("32")]+i[t.getFieldValue("33")]+i[t.getFieldValue("34")]+i[t.getFieldValue("35")]+i[t.getFieldValue("36")]+i[t.getFieldValue("37")]+i[t.getFieldValue("38")]+i[t.getFieldValue("39")]+i[t.getFieldValue("3a")]+i[t.getFieldValue("3b")]+i[t.getFieldValue("3c")]+i[t.getFieldValue("3d")]+i[t.getFieldValue("3e")]+i[t.getFieldValue("3f")]+":"+i[t.getFieldValue("40")]+i[t.getFieldValue("41")]+i[t.getFieldValue("42")]+i[t.getFieldValue("43")]+i[t.getFieldValue("44")]+i[t.getFieldValue("45")]+i[t.getFieldValue("46")]+i[t.getFieldValue("47")]+i[t.getFieldValue("48")]+i[t.getFieldValue("49")]+i[t.getFieldValue("4a")]+i[t.getFieldValue("4b")]+i[t.getFieldValue("4c")]+i[t.getFieldValue("4d")]+i[t.getFieldValue("4e")]+i[t.getFieldValue("4f")]+":"+i[t.getFieldValue("50")]+i[t.getFieldValue("51")]+i[t.getFieldValue("52")]+i[t.getFieldValue("53")]+i[t.getFieldValue("54")]+i[t.getFieldValue("55")]+i[t.getFieldValue("56")]+i[t.getFieldValue("57")]+i[t.getFieldValue("58")]+i[t.getFieldValue("59")]+i[t.getFieldValue("5a")]+i[t.getFieldValue("5b")]+i[t.getFieldValue("5c")]+i[t.getFieldValue("5d")]+i[t.getFieldValue("5e")]+i[t.getFieldValue("5f")]+":"+i[t.getFieldValue("60")]+i[t.getFieldValue("61")]+i[t.getFieldValue("62")]+i[t.getFieldValue("63")]+i[t.getFieldValue("64")]+i[t.getFieldValue("65")]+i[t.getFieldValue("66")]+i[t.getFieldValue("67")]+i[t.getFieldValue("68")]+i[t.getFieldValue("69")]+i[t.getFieldValue("6a")]+i[t.getFieldValue("6b")]+i[t.getFieldValue("6c")]+i[t.getFieldValue("6d")]+i[t.getFieldValue("6e")]+i[t.getFieldValue("6f")]+":"+i[t.getFieldValue("70")]+i[t.getFieldValue("71")]+i[t.getFieldValue("72")]+i[t.getFieldValue("73")]+i[t.getFieldValue("74")]+i[t.getFieldValue("75")]+i[t.getFieldValue("76")]+i[t.getFieldValue("77")]+i[t.getFieldValue("78")]+i[t.getFieldValue("79")]+i[t.getFieldValue("7a")]+i[t.getFieldValue("7b")]+i[t.getFieldValue("7c")]+i[t.getFieldValue("7d")]+i[t.getFieldValue("7e")]+i[t.getFieldValue("7f")]+'")',e.ORDER_ATOMIC]},wI=function(t,e){return e.definitions_.import_matrix="import matrix",["matrix.Image."+t.getFieldValue("image"),e.ORDER_ATOMIC]},WI=function(t,e){return e.definitions_.import_matrix="import matrix",["matrix.get_pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},KI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.set_pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},jI=function(t,e){e.definitions_.import_matrix="import matrix";return["matrix.get_brightness()",e.ORDER_ATOMIC]},QI=function(t,e){e.definitions_.import_matrix="import matrix";return["matrix.get_screenimage()",e.ORDER_ATOMIC]},qI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},JI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.blink_rate("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},zI=function(t,e){e.definitions_.import_matrix="import matrix";return"matrix.clear()\n"},ZI=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},$I=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},tT=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},eT=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"width",e.ORDER_ATOMIC),p=e.valueToCode(this,"height",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP"),l="";switch(u){case"True":l=i+".show_fill_rect("+n+", "+s+", "+o+", "+p+", "+a+")\n";break;case"False":l=i+".show_rect("+n+", "+s+", "+o+", "+p+", "+a+")\n"}return l},iT=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP"),n=e.valueToCode(t,"A",e.ORDER_ATOMIC),s=e.valueToCode(t,"B",e.ORDER_ATOMIC);return["INTERSECTION"==i?n+"-("+n+"-"+s+")":n+i+s,e.ORDER_ATOMIC]},nT=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+o+", 1)\n"},sT=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},oT=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},pT=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},uT=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),o=this.getFieldValue("key");return"TM1650"==o?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+o+"("+s+")\n"):"TM1637"==o&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+o+"("+s+")\n"),i},aT=function(t,e){var i=this.getFieldValue("TYPE");return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+i+this.getFieldValue("STAT")+"()\n"},lT=function(t,e){var i=this.getFieldValue("TYPE");return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+i+"_show_num("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},_T=function(t,e){var i=this.getFieldValue("TYPE");return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+i+"_show_dot("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},rT=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},dT=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"r",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",u=this.getFieldValue("OP"),a="";switch(p){case"True":a=i+".show_fill_circle("+n+", "+s+", "+o+", "+u+")\n";break;case"False":a=i+".show_circle("+n+", "+s+", "+o+", "+u+")\n"}return a},IT=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),o=e.valueToCode(this,"x1",e.ORDER_ATOMIC),p=e.valueToCode(this,"y1",e.ORDER_ATOMIC),u=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),l="TRUE"==this.getFieldValue("fill")?"True":"False",_=this.getFieldValue("OP"),r="";switch(l){case"True":r=i+".show_fill_triangle("+n+", "+s+", "+o+", "+p+", "+u+", "+a+", "+_+")\n";break;case"False":r=i+".show_triangle("+n+", "+s+", "+o+", "+p+", "+u+", "+a+", "+_+")\n"}return r},TT=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},hT=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},mT=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),o=this.getFieldValue("key");return"32x12 Matrix"==o?(e.definitions_.import_matrix32x12="import matrix32x12",i=n+" = matrix32x12.Matrix("+s+")\n"):"TM1637"==o&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+o+"("+s+")\n"),i},OT=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_matrix32x12="import matrix32x12",i+".set_buffer("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},cT=function(t,e){return e.definitions_.import_matrix32x12="import matrix32x12",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},RT=function(t,e){return e.definitions_.import_mixiot="import mixiot","mixiot.wlan_connect("+e.valueToCode(this,"WIFINAME",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"PASSWORD",e.ORDER_ATOMIC)+")\n"},MT=function(t,e){return e.definitions_.import_onenet="import onenet",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+" = onenet.init_MQTT_client("+e.valueToCode(this,"CLIENT",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"SERVER",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"USERNAME",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"PASSWORD",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC)+", "+(e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)||"None")+")\n"},ET=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);return e.definitions_.import_onenet="import onenet",i+".do_disconnect()\n"},CT=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"DICT",e.ORDER_ATOMIC),s="TRUE"==this.getFieldValue("is_print")?"True":"False";return e.definitions_.import_onenet="import onenet",i+".publish("+n+", is_print="+s+")\n"},AT=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);return e.definitions_.import_onenet="import onenet",i+".check_msg()\n"},gT=function(t,e){e.definitions_.import_onenet="import onenet";var i=new Array(this.itemCount_),n=new Array(this.itemCount_),s=new Array(this.itemCount_),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);for(let t=0;t0?e.join("\n")+i.join("\n")+n.join("\n")+p.join("\n")+u.join("")+t+"while True:\n"+a.join("")+l.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+p.join("\n")+u.join("")+t+l.join("\n"),_},zT.scrubNakedValue=function(t){return t+"\n"},zT.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},zT.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},zT.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Rt.utils.string.wrap(o,zT.COMMENT_WRAP-3),n+=zT.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const ZT={k210:{description:"MicroPython[K210_MixGo AI]",digital_pin:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P6","6"],["P7","7"],["P8","8"],["P9","9"],["P10","10"],["P11","11"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"],["P17","17"],["P18","18"],["P19","19"],["P20","20"],["P21","21"],["P22","22"],["P23","23"],["P24","24"],["P25","25"]],digital:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P6","6"],["P7","7"],["P8","8"],["P9","9"],["P10","10"],["P11","11"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"],["P17","17"],["P18","18"],["P19","19"],["P20","20"],["P21","21"],["P22","22"],["P23","23"],["P24","24"],["P25","25"],["P30","30"],["P31","31"],["P32","32"],["P33","33"],["P34","34"],["P35","35"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]]}};ZT["MixGo AI"]=ZT.k210;const $T=ZT,th=100,eh={init:function(){this.setColour(th),this.appendDummyInput().appendField("初始化"),this.appendDummyInput().appendField("舵机"),this.appendValueInput("PIN",Number).appendField("管脚").setCheck(Number),this.appendValueInput("time").appendField("定时器").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},ih={init:function(){this.setColour(th),this.appendDummyInput().appendField("设置"),this.appendDummyInput().appendField("舵机"),this.appendValueInput("PIN",Number).appendField("管脚").setCheck(Number),this.appendValueInput("range").appendField("角度").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},nh={init:function(){this.setColour(th),this.appendDummyInput().appendField("初始化"),this.appendDummyInput().appendField("16路舵机"),this.appendValueInput("address").appendField("地址").setCheck(Number),this.appendValueInput("SUB").setCheck("var").setAlign(Rt.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("使用PCA9685驱动16路舵机并备注IIC端口")}},sh={init:function(){this.setColour(th),this.appendDummyInput().appendField("设置"),this.appendDummyInput().appendField("16路舵机"),this.appendValueInput("index").appendField("编号").setCheck(Number),this.appendValueInput("range").appendField("角度").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("使用PCA9685驱动16路舵机,输入编号机角度")}},oh={init:function(){this.setColour(th),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendValueInput("PIN",Number).appendField("管脚").setCheck(Number),this.appendValueInput("num").appendField("灯数").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},ph={init:function(){this.setColour(th),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendValueInput("num").appendField("灯号").setCheck(Number),this.appendValueInput("R").appendField("R值").setCheck(Number),this.appendValueInput("G").appendField("G值").setCheck(Number),this.appendValueInput("B").appendField("B值").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},uh={init:function(){this.setColour(th),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendDummyInput().appendField("生效"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},ah={init:function(){this.setColour(th),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new Rt.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(Rt.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},lh={init:function(){this.setColour(th),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_Direction).appendField(new Rt.FieldDropdown([[Rt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Rt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[Rt.Msg.MOTOR_N,"ms32006.MOT_N"],[Rt.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},_h={init:function(){this.setColour(th),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new Rt.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_Direction).appendField(new Rt.FieldDropdown([[Rt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Rt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},rh={init:function(){this.setColour(th),this.appendValueInput("SUB").setCheck("var").appendField("初始化"),this.appendValueInput("P",Number).appendField("P值").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("I",Number).appendField("I值").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("D",Number).appendField("D值").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("初始化PID算法")}},dh={init:function(){this.setColour(th),this.appendValueInput("SUB").setCheck("var").appendField(""),this.appendDummyInput().appendField("运算"),this.appendValueInput("error").appendField("偏移量").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("scaler").appendField("定标量").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("根据参数返回运算结果")}},Ih="#55839A",Th={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField(new Rt.FieldTextInput("anchor"),"VAR").appendField("锚点参数= (").appendField(new Rt.FieldTextInput("1.889, 2.5245, 2.9465, 3.94056, 3.99987, 5.3658, 5.155437, 6.92275, 6.718375, 9.01025"),"TEXT").appendField(")"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("锚点参数")}},hh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField(new Rt.FieldTextInput("calss"),"VAR").appendField("物品名称= [").appendField(new Rt.FieldTextInput("'name1', 'name2', 'name3', 'name4'"),"TEXT").appendField("]"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("将要识别的物品名称")}},mh={init:function(){this.setColour(Ih),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendValueInput("path").appendField("模型加载").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("从flash系统中加载模型")}},Oh={init:function(){this.setColour(Ih),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendValueInput("path").appendField("模型路径").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("从文件系统中加载模型")}},ch={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("yolo2").appendField("初始化"),this.appendValueInput("SUB").setAlign(Rt.inputs.Align.RIGHT).appendField("网络模型").setCheck("var"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("概率阈值").setCheck(Number),this.appendValueInput("nms_value").setAlign(Rt.inputs.Align.RIGHT).appendField("box_iou门限").setCheck(Number),this.appendValueInput("anchor_num").setAlign(Rt.inputs.Align.RIGHT).appendField("锚点数").setCheck(Number),this.appendValueInput("anchor").setAlign(Rt.inputs.Align.RIGHT).appendField("锚点参数"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("初始化yolo2网络")}},Rh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("yolo2").appendField("运行网络"),this.appendValueInput("SUB").setAlign(Rt.inputs.Align.RIGHT).appendField("模型").setCheck("var"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("运行yolo2网络")}},Mh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("yolo2").appendField("前向运算"),this.appendValueInput("SUB").setAlign(Rt.inputs.Align.RIGHT).appendField("模型").setCheck("var"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("运行网络前向运算")}},Eh={init:function(){this.setColour(Ih),this.appendDummyInput().appendField("yolo2").appendField("模型解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-x","x"],["坐标-y","y"],["标识号","classid"],["置信度","value"]]),"key"),this.setOutput(!0),this.setTooltip("对于模型解析,获取模型识别结果的目标坐标、标识好、置信度")}},Ch={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_OneNET").appendField("连接WiFi"),this.appendValueInput("account").appendField("名称").setCheck(String),this.appendValueInput("password").appendField("密码").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("AI-Onenet平台 连接WiFi")}},Ah={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_OneNET").appendField("获鉴权码"),this.appendValueInput("account").setAlign(Rt.inputs.Align.RIGHT).appendField("账号").setCheck(String),this.appendValueInput("password").setAlign(Rt.inputs.Align.RIGHT).appendField("密码").setCheck(String),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("AI-Onenet平台 需要注册平台才能使用账号获取用户鉴权码,鉴权码一般24小时有效")}},gh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_OneNET").appendField("调取API"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像"),this.appendDummyInput().appendField("识别").appendField(new Rt.FieldDropdown([["人脸检测","FACE_RECO"],["人脸分析","FACE_ATTRIBUTE"],["人体检测","BODY_RECO"],["图像抄表","AMMETER_READ"],["内容测评","IDENTIFY_PORN"],["车牌信息","NUMBER_PLATE_RECOGNITION"],["宠物种类","CAT_DOG_DETECTION"],["火灾检测","FIRE_DETECTION"]]),"api"),this.appendValueInput("token").setAlign(Rt.inputs.Align.RIGHT).appendField("鉴权码").setCheck(String),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("AI-Onenet平台 调用平台API,返回列表识别结果参数")}},Sh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_Local").appendField("模型训练"),this.appendValueInput("calss").setAlign(Rt.inputs.Align.RIGHT).appendField("物品"),this.appendValueInput("sample").setAlign(Rt.inputs.Align.RIGHT).appendField("训练量").setCheck(Number),this.appendValueInput("save").setAlign(Rt.inputs.Align.RIGHT).appendField("保存").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("AI-Local本地模型训练 需要识别的物品名称、每个物品训练数量、保存的名称")}},Dh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_Local").appendField("模型加载"),this.appendValueInput("path").setAlign(Rt.inputs.Align.RIGHT).appendField("路径").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("AI-Local 加载已经训练好的本地模型")}},Nh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_Local").appendField("运行模型"),this.appendValueInput("calss").setAlign(Rt.inputs.Align.RIGHT).appendField("物品"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("AI-Local 采集图像运行模型将返回识别的物品名、置信度")}},Lh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_Face").appendField("初始化 加载"),this.appendValueInput("FD").setAlign(Rt.inputs.Align.RIGHT).appendField("模型FD:").setCheck(String),this.appendValueInput("LD").setAlign(Rt.inputs.Align.RIGHT).appendField("模型LD:").setCheck(String),this.appendValueInput("FE").setAlign(Rt.inputs.Align.RIGHT).appendField("模型FE:").setCheck(String),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("人脸分辨,初始化")}},fh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_Face").appendField("运行识别"),this.appendValueInput("names").setAlign(Rt.inputs.Align.RIGHT).appendField("人名"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图象"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("人脸分辨,识别到人脸返回True,无人脸返回False")}},Fh={init:function(){this.setColour(Ih),this.appendDummyInput().appendField("AI_Face").appendField("识别解析"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["识别人名","info_name"],["置信度 %","info_score"],["脸部坐标","info_face"],["三官坐标","info_organs"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("人脸分辨,识别到人物名称,置信度,脸部坐标,三官(眼睛x2、鼻子、嘴巴*2)坐标")}},vh="#2CAAD2",Ph={init:function(){this.setColour(vh),this.appendValueInput("SUB").setCheck("var").appendField("初始化"),this.appendValueInput("BCK",Number).appendField("BCK#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("WS",Number).appendField("WS#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("DAT",Number).appendField("DAT#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("初始化配置扬声器,用于语音播放")}},Vh={init:function(){this.setColour(vh),this.appendValueInput("SUB").setCheck("var").appendField("初始化"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("初始化配置扬声器,用于语音播放")}},yh={init:function(){this.setColour(vh),this.appendDummyInput().appendField("Audio 音频播放"),this.appendValueInput("path").appendField("路径").setAlign(Rt.inputs.Align.RIGHT).setCheck(String),this.appendValueInput("SUB").setCheck("var").setAlign(Rt.inputs.Align.RIGHT).appendField("设备"),this.appendValueInput("volume").appendField("音量(%)").setAlign(Rt.inputs.Align.RIGHT).setCheck(Number),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("音频播放")}},Yh={init:function(){this.setColour(vh),this.appendDummyInput().appendField("Audio 音频录制"),this.appendValueInput("path").appendField("路径").setAlign(Rt.inputs.Align.RIGHT).setCheck(String),this.appendValueInput("SUB").setCheck("var").setAlign(Rt.inputs.Align.RIGHT).appendField("设备"),this.appendValueInput("time").appendField("时长(s)").setAlign(Rt.inputs.Align.RIGHT).setCheck(Number),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("音频录制")}},bh={init:function(){this.setColour(vh),this.appendDummyInput().appendField("Video 视频播放"),this.appendValueInput("path").appendField("路径").setAlign(Rt.inputs.Align.RIGHT).setCheck(String),this.appendValueInput("SUB").setCheck("var").setAlign(Rt.inputs.Align.RIGHT).appendField("设备"),this.appendValueInput("volume").appendField("音量(%)").setAlign(Rt.inputs.Align.RIGHT).setCheck(Number),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("视频播放")}},kh={init:function(){this.setColour(vh),this.appendDummyInput().appendField("Video 视频录制"),this.appendValueInput("path").appendField("路径").setAlign(Rt.inputs.Align.RIGHT).setCheck(String),this.appendValueInput("SUB").setCheck("var").setAlign(Rt.inputs.Align.RIGHT).appendField("设备"),this.appendValueInput("time").appendField("时长(s)").setAlign(Rt.inputs.Align.RIGHT).setCheck(Number),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("视频录制")}},Xh="#bc9705",Gh={init:function(){this.setColour(Xh),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["彩色图(YUV422)","sensor.YUV422"],["彩色图(RGB565)","sensor.RGB565"],["灰度图","sensor.GRAYSCALE"]]),"flag"),this.setOutput(!0),this.setTooltip()}},xh={init:function(){this.setColour(Xh),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["320x240","sensor.QVGA"],["240x240","sensor.B240X240"],["128x128","sensor.B128X128"],["64x64","sensor.B64X64"]]),"flag"),this.setOutput(!0),this.setTooltip()}},Uh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera").appendField("初始化"),this.appendValueInput("key1").setAlign(Rt.inputs.Align.RIGHT).appendField("帧格式"),this.appendValueInput("key2").setAlign(Rt.inputs.Align.RIGHT).appendField("帧大小"),this.appendValueInput("key3").setAlign(Rt.inputs.Align.RIGHT).appendField("图捕捉"),this.appendValueInput("key4").setAlign(Rt.inputs.Align.RIGHT).appendField("跳帧数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("初始化摄像头,会自动扫描并获取摄像头型号")}},Hh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendDummyInput().appendField("初始化"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("初始化摄像头,会自动扫描并获取摄像头型号")}},Bh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("key").appendField("帧格式"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("设置摄像头输出格式")}},wh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("key").appendField("帧大小"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("设置摄像头输出帧大小")}},Wh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("key").appendField("图捕捉"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("开启图像捕捉功能")}},Kh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("frame").appendField("跳帧数").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("摄像头跳过指定帧数")}},jh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendDummyInput().appendField("获取图像"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("控制摄像头捕捉图像")}},Qh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("key").appendField("设为"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("启动/关闭摄像头")}},qh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("key").appendField("水平镜像"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("设置摄像头水平镜像")}},Jh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("key").appendField("垂直镜像"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("设置摄像头垂直镜像")}},zh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("key").appendField("彩条模式"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("将摄像头设置为彩条模式")}},Zh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["分辨率宽度","width"],["分辨率高度","height"],["当前增益值","get_gain_db"],["帧缓冲图像","get_fb"],["类型型号ID","get_id"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("获取当前摄像头信息")}},$h={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendDummyInput().appendField("设置").appendField(new Rt.FieldDropdown([["对比度","set_contrast"],["亮度值","set_brightness"],["增益值","set_auto_gain"],["饱和度","set_saturation"]]),"key"),this.appendValueInput("num").appendField("值为").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("设置摄像头对比度、亮度、增益、饱和度")}},tm={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendDummyInput().appendField("设置窗口"),this.appendValueInput("numa").appendField("宽为").setCheck(Number),this.appendValueInput("numb").appendField("高为").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("设置摄像头窗口大小")}},em=140,im={init:function(){this.setColour(em),this.appendValueInput("PIN").appendField(Rt.Msg.MIXLY_IR_RECEIVE),this.appendDummyInput().appendField("获取编码"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_I2C_SCAN)}},nm={init:function(){this.setColour(em),this.appendValueInput("SUB").appendField("I2C "+Rt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("TX",Number).appendField("SCL#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("RX",Number).appendField("SDA#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendDummyInput().appendField("通道").appendField(new Rt.FieldDropdown([["0","I2C0"],["1","I2C1"],["2","I2C2"]]),"mode"),this.appendValueInput("freq").setCheck(Number).appendField(Rt.Msg.MIXLY_FREQUENCY).setAlign(Rt.inputs.Align.RIGHT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_I2C_INIT)}},sm={init:function(){this.setColour(em),this.appendValueInput("SUB").setCheck("var").appendField("I2S 初始化"),this.appendDummyInput().appendField("设备").appendField(new Rt.FieldDropdown([["麦克风","mic"],["扬声器","spk"]]),"mode"),this.appendValueInput("BCK",Number).appendField("BCK#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("WS",Number).appendField("WS#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("DAT",Number).appendField("DAT#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("sample").appendField("采样率").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_I2C_INIT)}},om={init:function(){this.setColour(em),this.appendValueInput("VAR").appendField("I2C").setCheck("var"),this.appendValueInput("address").setCheck(Number).appendField(Rt.Msg.MIXLY_ESP32_RNUMBER),this.appendValueInput("data").setCheck(Number).appendField(Rt.Msg.LANG_MATH_BYTE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_JS_I2C_READ)}},pm={init:function(){this.setColour(em),this.appendValueInput("VAR").appendField("I2C").setCheck("var"),this.appendValueInput("address").setCheck(Number).appendField(Rt.Msg.MIXLY_ESP32_WNUMBER),this.appendValueInput("data").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_JS_I2C_WRITE)}},um={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField(Rt.Msg.MIXLY_ESP32_I2C_SCAN1),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_I2C_SCAN2),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_I2C_SCAN)}},am={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField(Rt.Msg.MIXLY_ESP32_SPI_INIT),this.appendValueInput("freq").setCheck(Number).appendField(Rt.Msg.MIXLY_SERIAL_BEGIN),this.appendValueInput("polarity").setCheck(Number).appendField("polarity"),this.appendValueInput("phase").setCheck(Number).appendField("phase"),this.appendValueInput("sck").setCheck(Number).appendField("SCK"),this.appendValueInput("mosi").setCheck(Number).appendField("MOSI"),this.appendValueInput("miso").setCheck(Number).appendField("MISO"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_INIT_TOOLTIP)}},lm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField(Rt.Msg.MIXLY_SETTING+" SPI"),this.appendValueInput("data").setCheck(Number).appendField(Rt.Msg.MIXLY_SERIAL_BEGIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_SET)}},_m={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField(Rt.Msg.MIXLY_ESP32_SET+"SPI"),this.appendValueInput("data").setCheck(Number).appendField(Rt.Msg.MIXLY_ESP32_SPI_BUFFER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_BUFFER_SET)}},rm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("SPI"),this.appendValueInput("data").setCheck(Number).appendField(Rt.Msg.MIXLY_SERIAL_READ),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_4DIGITDISPLAY_NOMBER2+Rt.Msg.LANG_MATH_BYTE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_READ)}},dm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("SPI"),this.appendValueInput("data").setCheck(Number).appendField(Rt.Msg.MIXLY_SERIAL_READ),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_4DIGITDISPLAY_NOMBER2+Rt.Msg.LANG_MATH_BYTE+","+Rt.Msg.MIXLY_ESP32_SPI_OUTPUT),this.appendValueInput("val").setCheck(Number),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_READ_OUTPUT)}},Im={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("SPI"),this.appendValueInput("data").setCheck("var").appendField(Rt.Msg.MIXLY_SERIAL_READ+Rt.Msg.MIXLY_ESP32_SPI_BUFFER),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_READINTO)}},Tm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("SPI"),this.appendValueInput("data").setCheck("var").appendField(Rt.Msg.MIXLY_SERIAL_READ+Rt.Msg.MIXLY_ESP32_SPI_BUFFER),this.appendValueInput("val").setCheck(Number).appendField(","+Rt.Msg.MIXLY_ESP32_SPI_OUTPUT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_READINTO_OUTPUT)}},hm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("SPI"),this.appendValueInput("data").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_WRITE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_WRITE)}},mm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("SPI"),this.appendValueInput("data").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_WRITE),this.appendValueInput("val").setCheck("var").appendField(","+Rt.Msg.MIXLY_ESP32_BUFFER_READ),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_WRITE_READINTO)}},Om={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("I2C"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_READ),this.setOutput(!0,Number)}},cm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField(Rt.Msg.MIXLY_ESP32_READ+"I2C"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_SUCCESS),this.setOutput(!0,Boolean),this.setTooltip(Rt.Msg.MIXLY_ESP32_I2C_AVAILABLE)}},Rm={init:function(){this.setColour(em),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_I2C_SLAVE_ONRECEIVE).setCheck(Number),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Mm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("OneWire"),this.appendValueInput("BUS").setCheck(Number).appendField(Rt.Msg.MIXLY_SETUP+" "+Rt.Msg.MIXLY_PIN),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_OW_INIT)}},Em={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("OneWire"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_ONEWIRE_SCAN),this.setOutput(!0,"List"),this.setTooltip(Rt.Msg.MIXLY_ESP32_OW_SCAN)}},Cm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("OneWire"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_ONEWIRE_READ),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_OW_READ)}},Am={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("OneWire"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_ESP32_WRITE).appendField(new Rt.FieldDropdown([[Rt.Msg.LANG_MATH_STRING,"write"],[Rt.Msg.LANG_MATH_BYTE,"writebyte"]]),"op"),this.appendValueInput("byte").setCheck([Number,String]),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_OW_WRITE)}},gm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField(Rt.Msg.MIXLY_ESP32_ONEWIRE_SELECT),this.appendValueInput("byte").setCheck(String).appendField("ROM"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_OW_SELECT)}},Sm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField(Rt.Msg.MIXLY_ESP32_ONEWIRE_RESET),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Rt.Msg.MIXLY_ESP32_OW_RESET)}},Dm=nm,Nm=om,Lm=pm,fm=um,Fm=am,vm=lm,Pm=_m,Vm=rm,ym=dm,Ym=Im,bm=Tm,km=hm,Xm=mm,Gm=Om,xm=cm,Um=180,Hm={init:function(){this.setColour(Um),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["0°","0"],["90°","1"],["180°","2"],["270°","3"]]),"flag"),this.setOutput(!0),this.setTooltip()}},Bm={init:function(){this.setColour(Um),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["黑色","lcd.BLACK"],["深蓝色","lcd.NAVY"],["蓝色","lcd.BLUE"],["深绿色","lcd.DARKGREEN"],["深青色","lcd.DARKCYAN"],["绿色","lcd.GREEN"],["青色","lcd.CYAN"],["褐红色","lcd.MAROON"],["紫色","lcd.PURPLE"],["橄榄色","lcd.OLIVE"],["深灰色","lcd.DARKGREY"],["绿黄色","lcd.GREENYELLOW"],["浅灰色","lcd.LIGHTGREY"],["红色","lcd.RED"],["洋红色","lcd.MAGENTA"],["粉红色","lcd.PINK"],["橙色","lcd.ORANGE"],["黄色","lcd.YELLOW"],["白色","lcd.WHITE"]]),"flag"),this.setOutput(!0),this.setTooltip()}},wm={init:function(){this.setColour(Um),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["开启","1"],["关闭","0"]]),"flag"),this.setOutput(!0),this.setTooltip()}},Wm={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD 初始化"),this.appendValueInput("freq").setAlign(Rt.inputs.Align.RIGHT).appendField("通信频率").setCheck(Number),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("背景颜色").setCheck(Number),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("初始化LCD屏幕显示")}},Km={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD 获取 "),this.appendDummyInput().appendField(new Rt.FieldDropdown([["宽度","width"],["高度","height"]]),"key"),this.appendDummyInput().appendField("分辨率"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("获取LCD的宽度/高度(水平分辨率)")}},jm={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD"),this.appendValueInput("key").appendField("系统颜色"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("获取LCD的宽度/高度(水平分辨率)")}},Qm={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD 显示图像"),this.appendValueInput("img").appendField(""),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("在液晶屏上显示一张image(GRAYSCALE或RGB565")}},qm={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD 清屏颜色"),this.appendValueInput("color").appendField("").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("将液晶屏清空为指定的颜色")}},Jm={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD 屏幕旋转"),this.appendValueInput("key").appendField(""),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("设置LCD屏幕方向")}},zm={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD 镜像显示"),this.appendValueInput("key").appendField(""),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("设置LCD是否镜面显示")}},Zm={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD 绘制文本"),this.appendValueInput("x").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标X").setCheck(Number),this.appendValueInput("y").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标Y").setCheck(Number),this.appendValueInput("text").setAlign(Rt.inputs.Align.RIGHT).appendField("文本内容").setCheck(String),this.appendValueInput("color_T").setAlign(Rt.inputs.Align.RIGHT).appendField("文本颜色").setCheck(Number),this.appendValueInput("color_S").setAlign(Rt.inputs.Align.RIGHT).appendField("背景颜色").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("在液晶屏上显示文本字符(不支持中文)")}},$m={init:function(){this.setColour(40),this.appendDummyInput().appendField("Touch 初始化"),this.appendValueInput("I2C").appendField("通信").setCheck("var"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("初始化触摸屏")}},tO={init:function(){this.setColour(40),this.appendDummyInput().appendField("Touch 校准"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("校准屏幕,使屏幕显示和触摸屏像素能够对应")}},eO={init:function(){this.setColour(40),this.appendDummyInput().appendField("Touch 获取 "),this.appendDummyInput().appendField(new Rt.FieldDropdown([["状态","[0]"],["坐标x","[1]"],["坐标y","[2]"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("读取当前屏幕的状态以及按下的点的坐标值")}},iO={init:function(){this.setColour(40),this.appendDummyInput().appendField("Touch 状态"),this.appendDummyInput().appendField(new Rt.FieldDropdown([["空闲","ts.STATUS_IDLE"],["不按","ts.STATUS_RELEASE"],["按下","ts.STATUS_PRESS"],["移动","ts.STATUS_MOVE"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("读取当前屏幕的状态以及按下的点的坐标值")}},nO="#777777",sO={init:function(){this.setColour(nO),this.appendDummyInput("").appendField("from ").appendField(new Rt.FieldTextInput("mixno"),"path").appendField(" import ").appendField(new Rt.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},oO={init:function(){this.setColour(nO),this.appendDummyInput("").appendField("import ").appendField(new Rt.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pO={init:function(){this.setColour(nO),this.appendDummyInput("").appendField(new Rt.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Rt.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:"ni-hao"),"KEY"+e).appendField("”:")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},EO={init:function(){this.setColour(cO),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendDummyInput().appendField("启动识别 返回结果"),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip("语音识别,获取识别结果")}},CO={init:function(){this.setColour(cO),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendDummyInput().appendField("注销识别 内存释放"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("语音识别,注销语音识别,释放内存")}},AO="#90A244",gO={init:function(){this.setColour(AO),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["否","0"],["是","1"]]),"flag"),this.setOutput(!0),this.setTooltip()}},SO={init:function(){this.setColour(AO),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("path").appendField("打开路径").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("打开一个新的图像对象")}},DO={init:function(){this.setColour(AO),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField("打开空图"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("打开一个空的图像对象")}},NO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像信息"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["宽度","width"],["高度","height"],["格式","format"],["大小","size"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("获取图像的宽度、高度、格式、大小")}},LO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像保存"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("path").setAlign(Rt.inputs.Align.RIGHT).appendField("路径").setCheck(String),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("图像的副本保存到文件系统")}},fO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像截取"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("复制一个图像图像的副本")}},FO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("RGB"),this.appendDummyInput().appendField("["),this.appendValueInput("R").setCheck(Number),this.appendValueInput("G").appendField(",").setCheck(Number),this.appendValueInput("B").appendField(",").setCheck(Number),this.appendDummyInput().appendField("]"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("对图像进行适当压缩")}},vO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像压缩"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("quality").setAlign(Rt.inputs.Align.RIGHT).appendField("压缩率").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("对图像进行适当压缩")}},PO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像清除"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("将图像中的所有像素设置为零")}},VO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像转换"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.appendDummyInput().appendField("转换为").appendField(new Rt.FieldDropdown([["灰度图","to_grayscale"],["彩色图","to_rgb565"],["彩虹图","to_rainbow"],["AI格式","pix_to_ai"],["字节块","to_bytes"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("将图像转换为灰度图、彩色图、彩虹图像")}},yO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("修改点颜色"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xy"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("设置图像某点像素值")}},YO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("获取点颜色"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xy"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("获取图像某点像素值")}},bO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("字库加载"),this.appendValueInput("path").setAlign(Rt.inputs.Align.RIGHT).appendField("路径").setCheck(String),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("从SD中加载需要显示文字的字库")}},kO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("字库释放"),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("释放字库所占的内存")}},XO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制文本(中)"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("x0").setAlign(Rt.inputs.Align.RIGHT).appendField("起-x").setCheck(Number),this.appendValueInput("y0").setAlign(Rt.inputs.Align.RIGHT).appendField("起-y").setCheck(Number),this.appendValueInput("tex").setAlign(Rt.inputs.Align.RIGHT).appendField("内容").setCheck(String),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("scale").setAlign(Rt.inputs.Align.RIGHT).appendField("字号").setCheck(Number),this.appendValueInput("x_spacing").setAlign(Rt.inputs.Align.RIGHT).appendField("间距").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上绘制一个文本")}},GO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制文本"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("x0").setAlign(Rt.inputs.Align.RIGHT).appendField("起-x").setCheck(Number),this.appendValueInput("y0").setAlign(Rt.inputs.Align.RIGHT).appendField("起-y").setCheck(Number),this.appendValueInput("tex").setAlign(Rt.inputs.Align.RIGHT).appendField("内容").setCheck(String),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("scale").setAlign(Rt.inputs.Align.RIGHT).appendField("字号").setCheck(Number),this.appendValueInput("x_spacing").setAlign(Rt.inputs.Align.RIGHT).appendField("间距").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上绘制一个中文文本")}},xO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制文本(英)"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("x0").setAlign(Rt.inputs.Align.RIGHT).appendField("起-x").setCheck(Number),this.appendValueInput("y0").setAlign(Rt.inputs.Align.RIGHT).appendField("起-y").setCheck(Number),this.appendValueInput("tex").setAlign(Rt.inputs.Align.RIGHT).appendField("内容").setCheck(String),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("scale").setAlign(Rt.inputs.Align.RIGHT).appendField("字号").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上绘制一个字符文本")}},UO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制直线"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xyxy"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("thi").setAlign(Rt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一条从(x0,y0)到(x1,y1)的线")}},HO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制箭头"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xyxy"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("thi").setAlign(Rt.inputs.Align.RIGHT).appendField("大小").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一个箭头")}},BO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制十字"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xy"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("size").setAlign(Rt.inputs.Align.RIGHT).appendField("延伸").setCheck(Number),this.appendValueInput("thi").setAlign(Rt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一个十字")}},wO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制圆形"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xyr"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("thi").setAlign(Rt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.appendValueInput("fil").setAlign(Rt.inputs.Align.RIGHT).appendField("填充").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一个圆形")}},WO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制矩形"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xywh"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("thi").setAlign(Rt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.appendValueInput("fil").setAlign(Rt.inputs.Align.RIGHT).appendField("填充").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一个矩形")}},KO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制特征点"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("keypoints").setAlign(Rt.inputs.Align.RIGHT).appendField("对象"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("size").setAlign(Rt.inputs.Align.RIGHT).appendField("大小").setCheck(Number),this.appendValueInput("thi").setAlign(Rt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.appendValueInput("fil").setAlign(Rt.inputs.Align.RIGHT).appendField("填充").setCheck(Number),this.setOutput(!0),this.setTooltip("绘制一个特征点对象的各个点")}},jO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制图像"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xy"),this.appendValueInput("x_scale").setAlign(Rt.inputs.Align.RIGHT).appendField("x缩放").setCheck(Number),this.appendValueInput("y_scale").setAlign(Rt.inputs.Align.RIGHT).appendField("y缩放").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("绘制一个image图像")}},QO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("直线识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendValueInput("theta_margin").setAlign(Rt.inputs.Align.RIGHT).appendField("合并角度").setCheck(Number),this.appendValueInput("rho_margin").setAlign(Rt.inputs.Align.RIGHT).appendField("合并斜率").setCheck(Number),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[line]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用霍夫变换识别直线,返回image.line对象列表")}},qO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("线段识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("distance").setAlign(Rt.inputs.Align.RIGHT).appendField("间距").setCheck(Number),this.appendValueInput("difference").setAlign(Rt.inputs.Align.RIGHT).appendField("合并角度").setCheck(Number),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[line]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用霍夫变换识别线段,返回image.line对象列表")}},JO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("圆形识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendValueInput("r_min").setAlign(Rt.inputs.Align.RIGHT).appendField("最小r").setCheck(Number),this.appendValueInput("r_max").setAlign(Rt.inputs.Align.RIGHT).appendField("最大r").setCheck(Number),this.appendValueInput("r_step").setAlign(Rt.inputs.Align.RIGHT).appendField("步长r").setCheck(Number),this.appendValueInput("x_margin").setAlign(Rt.inputs.Align.RIGHT).appendField("合并x值").setCheck(Number),this.appendValueInput("y_margin").setAlign(Rt.inputs.Align.RIGHT).appendField("合并y值").setCheck(Number),this.appendValueInput("r_margin").setAlign(Rt.inputs.Align.RIGHT).appendField("合并r值").setCheck(Number),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[circle]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用霍夫变换识别圆形,返回image.cirle对象列表")}},zO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("矩形识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[rect]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用四元检测识别矩形,返回image.rect对象列表")}},ZO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("线性回归"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendValueInput("invert").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值反转"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("robust").setAlign(Rt.inputs.Align.RIGHT).appendField("泰尔指数").setCheck(Number),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[line]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("计算线性回归,返回image.line对象列表")}},$O={init:function(){this.setColour(AO),this.appendDummyInput().appendField("直线解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xywh","line"],["x1分量","x1"],["y1分量","y1"],["x2分量","x2"],["y2分量","y2"],["长度","length"],["角度","theta"],["斜率","rho"],["模","magnitude"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.line列表,获取直线信息")}},tc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("圆形解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xyr","circle"],["x分量","x"],["y分量","y"],["r分量","r"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.circle列表,获取圆形信息")}},ec={init:function(){this.setColour(AO),this.appendDummyInput().appendField("矩形解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.rect列表,获取矩形信息")}},ic={init:function(){this.setColour(AO),this.appendDummyInput().appendField("直方图均衡"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("key").setAlign(Rt.inputs.Align.RIGHT).appendField("自适应"),this.appendValueInput("limit").setAlign(Rt.inputs.Align.RIGHT).appendField("对比度").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上的简单直方图均衡化")}},nc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("模糊滤波"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("size").setAlign(Rt.inputs.Align.RIGHT).appendField("卷积核尺寸").setCheck(Number),this.appendValueInput("key").setAlign(Rt.inputs.Align.RIGHT).appendField("自适应"),this.appendValueInput("offset").setAlign(Rt.inputs.Align.RIGHT).appendField("补偿").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上的简单模糊滤波")}},sc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("卡通化滤波"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("seed").setAlign(Rt.inputs.Align.RIGHT).appendField("原始差异").setCheck(Number),this.appendValueInput("float").setAlign(Rt.inputs.Align.RIGHT).appendField("相邻差异").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上的简单卡通滤波器")}},oc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像腐蚀"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("size").setAlign(Rt.inputs.Align.RIGHT).appendField("卷积核尺寸").setCheck(Number),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.setOutput(!0),this.setTooltip("图像腐蚀,从分割区域的边缘删除像素(白色目标区域)")}},pc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像膨胀"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("size").setAlign(Rt.inputs.Align.RIGHT).appendField("卷积核尺寸").setCheck(Number),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.setOutput(!0),this.setTooltip("图像膨胀,将像素添加到分割区域的边缘中(白色目标区域)")}},uc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像填充"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("开始坐标"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("seed").setAlign(Rt.inputs.Align.RIGHT).appendField("原始差异").setCheck(Number),this.appendValueInput("float").setAlign(Rt.inputs.Align.RIGHT).appendField("相邻差异").setCheck(Number),this.appendValueInput("invert").setAlign(Rt.inputs.Align.RIGHT).appendField("反转"),this.appendValueInput("clear").setAlign(Rt.inputs.Align.RIGHT).appendField("清除"),this.setOutput(!0),this.setTooltip("像洪水一样填充图像中低矮凹陷的地方(洪水填充)")}},ac={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像投影"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("key").setAlign(Rt.inputs.Align.RIGHT).appendField("垂直投影"),this.setOutput(!0),this.setTooltip("图像从笛卡尔坐标到线性极坐标重新投影")}},lc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像反转"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("翻转图像中的所有像素值")}},_c={init:function(){this.setColour(AO),this.appendDummyInput().appendField("校正缩放"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.appendValueInput("strength").appendField("校正值").setCheck(Number),this.appendValueInput("zoom").appendField("缩放值").setCheck(Number),this.setOutput(!0),this.setTooltip("翻转图像中的所有像素值")}},rc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像二值化"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendValueInput("invert").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值反转"),this.appendValueInput("zero").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值像素为零"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("根据像素是否在阈值列表 thresholds 中的阈值内,将图像中的所有像素设置为黑色或白色。")}},dc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像边缘检测"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("size").setAlign(Rt.inputs.Align.RIGHT).appendField("卷积核尺寸").setCheck(Number),this.appendValueInput("kernel").setAlign(Rt.inputs.Align.RIGHT).appendField("内核"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("通过过滤器内核对图像进行卷积。")}},Ic={init:function(){this.setColour(AO),this.appendDummyInput().appendField("条形码识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[barcode]"),this.setOutput(!0),this.setInputsInline(!1),this.setOutput(!0),this.setTooltip("使用条形码识别,返回image.barcode对象列表")}},Tc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("二维码识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[qrcode]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用二维码识别,返回image.line对象列表")}},hc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("AprilTag识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[apriltag]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用image.TAG36H11识别,返回image.apriltag对象列表")}},mc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("二维码解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["内容","payload"],["版本","version"],["掩码","mask"],["类型","data_type"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.qrcode列表,获取二维码信息")}},Oc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("条形码解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["内容","payload"],["类型","type"],["角度","rotation"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.barcode列表,获取条形码信息")}},cc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("AprilTag解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["中心-x","cx"],["中心-y","cy"],["号码","id"],["家族","family"],["弧度","rotation"],["x向距离","x_translation"],["y向距离","y_translation"],["z向距离","z_translation"],["x向弧度","x_rotation"],["y向弧度","y_rotation"],["z向弧度","z_rotation"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.apriltag列表,获取Apriltag信息")}},Rc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("色块追踪"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值LAB"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("area").setAlign(Rt.inputs.Align.RIGHT).appendField("滤掉区域").setCheck(Number),this.appendValueInput("pixel").setAlign(Rt.inputs.Align.RIGHT).appendField("滤掉素数").setCheck(Number),this.appendValueInput("margin").setAlign(Rt.inputs.Align.RIGHT).appendField("合并").setCheck(Number),this.appendValueInput("key").setAlign(Rt.inputs.Align.RIGHT).appendField("重叠"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[blob]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用色块追踪,返回image.blob对象列表")}},Mc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("颜色识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[histogram]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用直方图识别颜色,返回image.histogram对象列表")}},Ec={init:function(){this.setColour(AO),this.appendDummyInput().appendField("追踪解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["中心-x","cx"],["中心-y","cy"],["像素量","pixels"],["弧度","rotation"],["号码数","code"],["合并量","count"],["面积","area"],["密度比","density"]]),"key"),this.setOutput(!0),this.setTooltip("通过image.blob列表,获取追踪色块信息")}},Cc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("色阈浮点"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["灰度图浮点列表","bins"],["LAB的L浮点列表","l_bins"],["LAB的A浮点列表","a_bins"],["LAB的B浮点列表","b_bins"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.barcode列表,获取条形码信息")}},Ac={init:function(){this.setColour(AO),this.appendDummyInput().appendField("颜色解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendValueInput("percentile").appendField("CDF").setCheck(Number),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["灰度图值","value"],["LAB的L值","l_value"],["LAB的A值","a_value"],["LAB的B值","b_value"]]),"key"),this.setOutput(!0),this.setTooltip("通过histogram列表,获取识别颜色信息")}},gc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("色阈解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["灰度图值","value"],["LAB的L值","l_value"],["LAB的A值","a_value"],["LAB的B值","b_value"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.barcode列表,获取条形码信息")}},Sc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("RGB888值"),this.appendValueInput("LIST").appendField("由LAB"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("LAB转RGB888")}},Dc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("LAB值"),this.appendValueInput("LIST").appendField("由RGB888"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("RGB888转LAB")}},Nc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("灰度值"),this.appendValueInput("LIST").appendField("由RGB888"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("RGB888转灰度图")}},Lc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("RGB888"),this.appendValueInput("g_value").appendField("由灰度值").setCheck(Number),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("灰度图转RGB888")}},fc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("定向梯度图"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("size").setAlign(Rt.inputs.Align.RIGHT).appendField("线长").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("用HOG(定向梯度直方图)线替换ROI中的像素,仅支持灰度图像")}},Fc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("特征识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("max_keypoints").setAlign(Rt.inputs.Align.RIGHT).appendField("关键点数").setCheck(Number),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("角点数").setCheck(Number),this.appendValueInput("scale_factor").setAlign(Rt.inputs.Align.RIGHT).appendField("比例因子").setCheck(Number),this.appendValueInput("normalized").setAlign(Rt.inputs.Align.RIGHT).appendField("多比例"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[keypoints]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用特征识别,返回image.keypoints对象列表")}},vc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("特征比较"),this.appendValueInput("VAR1").setAlign(Rt.inputs.Align.RIGHT).appendField("对象1").setCheck("var"),this.appendValueInput("VAR2").setAlign(Rt.inputs.Align.RIGHT).appendField("对象2").setCheck("var"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("相似度").setCheck(Number),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[kptmatch]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用特征识别,返回image.keypoints对象列表")}},Pc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("特征信息"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["中心-x","cx"],["中心-y","cy"],["匹配量","count"],["弧度","theta"],["匹配点-xy","match"]]),"key"),this.setOutput(!0),this.setTooltip("通过image.kptmatch列表,获取追踪特征信息")}},Vc=20,yc={init:function(){this.setColour(Vc),this.appendDummyInput("").appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_HIGH,"HIGH"],[Rt.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(Rt.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},Yc={init:function(){this.setColour(Vc),this.appendDummyInput().appendField("初始化 "),this.appendDummyInput("").appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_Digital_PINMODEOUT,"GPIO.OUT"],[Rt.Msg.MIXLY_Digital_PINMODEIN,"GPIO.IN"],[Rt.Msg.MIXLY_PINMODEPULLUP,"GPIO.IN, board.GPIO.PULL_UP"],[Rt.Msg.MIXLY_PINMODEPULLDOWN,"GPIO.IN, board.GPIO.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField("管脚").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)}},bc={init:function(){this.setColour(Vc),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(Rt.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},kc={init:function(){this.setColour(Vc),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Rt.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField("值"),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(Rt.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},Xc={init:function(){this.setColour(Vc),this.appendDummyInput().appendField("初始化 PWM输出"),this.appendValueInput("PIN",Number).appendField("管脚").setCheck(Number),this.appendValueInput("freq").appendField("频率").setCheck(Number),this.appendValueInput("VAR").appendField("定时器").setCheck("var"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化PWM输出设置,需要调用定时器")}},Gc={init:function(){this.setColour(Vc),this.appendValueInput("PIN",Number).appendField("PWM输出").setCheck(Number),this.appendValueInput("pwm").appendField("占空比").setCheck(Number),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("PWM输出,值范围为0-100%,可以为小数")}},xc={init:function(){this.setColour(Vc),this.appendDummyInput().appendField("硬件中断"),this.appendValueInput("PIN",Number).appendField("管键").setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MODE).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_RISING,"GPIO.IRQ_RISING"],[Rt.Msg.MIXLY_FALLING,"GPIO.IRQ_FALLING"],[Rt.Msg.MIXLY_CHANGE,"GPIO.IRQ_BOTH"]]),"mode"),this.appendValueInput("DO").appendField(Rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},Uc={init:function(){this.setColour(Vc),this.appendDummyInput().appendField("取消中断"),this.appendValueInput("PIN",Number).appendField("管键").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("取消中断")}},Hc="#637AAC",Bc={init:function(){this.setColour(Hc),this.appendDummyInput().appendField("OneNET 连接WiFi"),this.appendValueInput("WIFINAME").setCheck(String).appendField(Rt.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Rt.Msg.HTML_PASSWORD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},wc={init:function(){this.setColour(Hc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"+Rt.Msg.TUPLE_JOIN),this.appendValueInput("CLIENT").setAlign(Rt.inputs.Align.RIGHT).setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_CLIENT),this.appendValueInput("SERVER").setAlign(Rt.inputs.Align.RIGHT).setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_SERVER),this.appendValueInput("USERNAME").setAlign(Rt.inputs.Align.RIGHT).setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_USERNAME),this.appendValueInput("PASSWORD").setAlign(Rt.inputs.Align.RIGHT).setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_PASSWORD),this.appendValueInput("TOPIC").setAlign(Rt.inputs.Align.RIGHT).setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_TOPIC),this.appendValueInput("SUB").setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_ESP32_ONENET_SUB),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_CONNECT_TOOLTIP)}},Wc={init:function(){this.setColour(Hc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_DISCONNECT_TOOLTIP)}},Kc={init:function(){this.setColour(Hc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_CHECK_TOOLTIP)}},jc={init:function(){this.setColour(Hc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendValueInput("DICT").appendField(Rt.Msg.MIXLY_ESP32_PUBLISH_ONENET),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_IOT_ONENET_PRINT_DATA).appendField(new Rt.FieldCheckbox("TRUE"),"is_print"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_PUBLISH_DICT_TOOLTIP)}},Qc={init:function(){this.setColour(Hc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET").setAlign(Rt.inputs.Align.RIGHT),this.appendDummyInput().appendField(new Rt.FieldLabel(Rt.Msg.MIXLY_ESP32_PUBLISH_ONENET),"TIP").setAlign(Rt.inputs.Align.RIGHT),this.itemCount_=2,this.updateShape_(),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Rt.icons.MutatorIcon(["iot_publish_item"],this)),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_PUBLISH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("iot_publish_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},qc={init:function(){this.setColour(Hc),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Jc={init:function(){this.setColour(Hc),this.appendDummyInput().appendField(Rt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},zc={init:function(){this.setColour(Hc),this.appendDummyInput().appendField(Rt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Zc=Bc,$c=wc,tR=Wc,eR=Kc,iR=Qc,nR=230;Rt.FieldTextInput.math_number_validator=function(t){return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null},Rt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const sR={init:function(){this.setColour(nR),this.appendDummyInput().appendField(new Rt.FieldTextInput("0",Rt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MATH_NUMBER_TOOLTIP)}},oR={init:function(){this.setColour(nR);this.appendDummyInput("").appendField(Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Rt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},pR={init:function(){this.setColour(nR),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Rt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Rt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},uR={init:function(){this.setColour(nR),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Rt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Rt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},aR={init:function(){this.setColour(nR),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Rt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},lR={init:function(){this.setColour(nR),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Rt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Rt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Rt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Rt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Rt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Rt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Rt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Rt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},_R={init:function(){var t=[[Rt.Msg.LANG_MATH_TO_ROUND,"round"],[Rt.Msg.LANG_MATH_TO_CEIL,"ceil"],[Rt.Msg.LANG_MATH_TO_FLOOR,"floor"],[Rt.Msg.MATH_ABS,"fabs"],[Rt.Msg.MATH_SQRT,"sqrt"]];this.setColour(nR),this.appendValueInput("A").setCheck(Number).appendField(new Rt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Rt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Rt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Rt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Rt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Rt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Rt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},rR={init:function(){var t=[[Rt.Msg.MIXLY_MAX,"max"],[Rt.Msg.MIXLY_MIN,"min"]];this.setColour(nR),this.appendValueInput("A").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(new Rt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Rt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Rt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Rt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},dR={init:function(){var t=[[Rt.Msg.MIXLY_MAX,"max"],[Rt.Msg.MIXLY_MIN,"min"]];this.setColour(nR),this.appendValueInput("LIST").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(new Rt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Rt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Rt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},IR={init:function(){var t=[[Rt.Msg.MATH_TWO,"two"],[Rt.Msg.MATH_EIGHT,"eight"],[Rt.Msg.MATH_TEN,"ten"],[Rt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(nR),this.appendDummyInput("").appendField(Rt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Rt.FieldDropdown(t),"OP").appendField(Rt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.MATH_ZHW).appendField(new Rt.FieldDropdown(t),"OP2").appendField(Rt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:Rt.Msg.MATH_Before_two,eight:Rt.Msg.MATH_Before_eight,ten:Rt.Msg.MATH_Before_ten,sixteen:Rt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:Rt.Msg.MATH_Behind_two,eight:Rt.Msg.MATH_Behind_eight,ten:Rt.Msg.MATH_Behind_ten,sixteen:Rt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},TR={init:function(){var t=[[Rt.Msg.LANG_MATH_INT,"int"],[Rt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(nR),this.setOutput(!0,Number),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Rt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:Rt.Msg.LANG_MATH_INT,float:Rt.Msg.LANG_MATH_FLOAT_RANDOM};return Rt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},hR={init:function(){this.setColour(nR),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Rt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Rt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Rt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MATH_CONSTRAIN_TOOLTIP)}},mR={init:function(){this.setColour(nR),this.appendValueInput("NUM",Number).appendField(Rt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Rt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Rt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},OR={init:function(){this.setColour(nR),this.appendDummyInput().appendField(new Rt.FieldTextInput("0",Rt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Rt.Msg.MATH_NUMBER_TOOLTIP)}},cR={init:function(){this.setColour(nR),this.appendValueInput("NUM").setCheck(Number).appendField(Rt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},RR=mR,MR="#2E9883",ER={init:function(){this.setColour(MR),this.appendDummyInput().appendField("NES 初始化"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("PS2手柄"),this.appendValueInput("miso_pin",Number).setAlign(Rt.inputs.Align.RIGHT).appendField("DAT#").setCheck(Number),this.appendValueInput("mosi_pin",Number).setAlign(Rt.inputs.Align.RIGHT).appendField("CMD#").setCheck(Number),this.appendValueInput("cs_pin",Number).setAlign(Rt.inputs.Align.RIGHT).appendField("SEL#").setCheck(Number),this.appendValueInput("clk_pin",Number).setAlign(Rt.inputs.Align.RIGHT).appendField("CLK#").setCheck(Number),this.appendValueInput("vol").setAlign(Rt.inputs.Align.RIGHT).appendField("音量").setCheck(Number),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("初始化NES,使用PS2手柄控制")}},CR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("NES 初始化"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("UART键盘"),this.appendValueInput("vol").setAlign(Rt.inputs.Align.RIGHT).appendField("音量").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("初始化NES,使用串口键盘控制")}},AR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("NES 运行游戏"),this.appendValueInput("path").appendField("路径").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("运行NES游戏ROM")}},gR="#5B6DA5",SR={init:function(){this.setColour(gR),this.appendDummyInput().appendField("ESP-AT 初始化"),this.appendValueInput("RX",Number).appendField("RX#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("TX",Number).appendField("TX#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("使用串口连接ESP-AT设备,并初始化配置")}},DR={init:function(){this.setColour(gR),this.appendDummyInput().appendField("WiFi扫描"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("扫描附近可用的WiFi信息-返回多信息列表")}},NR={init:function(){this.setColour(gR),this.appendDummyInput("").appendField("WiFi连接"),this.appendValueInput("account").appendField("名称").setCheck(String),this.appendValueInput("password").appendField("密码").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("配置WiFi名称及密码,连接WiFi上网")}},LR={init:function(){this.setColour(gR),this.appendDummyInput().appendField("WiFi").appendField(new Rt.FieldDropdown([["连接信息","1"],["连接状态","2"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("查看wifi连接信息或者连接状态")}},fR={init:function(){this.setColour(gR),this.appendDummyInput().appendField("WiFi断开连接"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("断开wifi连接")}},FR={init:function(){this.setColour(gR),this.appendDummyInput("").setAlign(Rt.inputs.Align.RIGHT).appendField("打开热点"),this.appendValueInput("account").setAlign(Rt.inputs.Align.RIGHT).appendField("名称").setCheck(String),this.appendValueInput("password").setAlign(Rt.inputs.Align.RIGHT).appendField("密码").setCheck(String),this.appendValueInput("chl").setAlign(Rt.inputs.Align.RIGHT).appendField("通道").setCheck(Number),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("加密").appendField(new Rt.FieldDropdown([["WPA2_PSK","WPA2_PSK"],["OPEN","OPEN"],["WPA_PSK","WPA_PSK"],["WPA_WPA2_PSK","WPA_WPA2_PSK"]]),"mode"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("打开WiFi热点并配置")}},vR={init:function(){this.setColour(gR),this.appendDummyInput().appendField("关闭热点"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("关闭热点")}},PR={init:function(){this.setColour(gR),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("套接字 初始化"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("套接字初始化")}},VR={init:function(){this.setColour(gR),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("获取地址"),this.appendValueInput("addr").setAlign(Rt.inputs.Align.RIGHT).appendField("域名").setCheck(String),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("套接字根据域名解析地址IP信息")}},yR={init:function(){this.setColour(gR),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("创建连接"),this.appendValueInput("address").appendField("地址"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("套接字创建目标IP地址连接")}},YR={init:function(){this.setColour(gR),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("超时时间"),this.appendValueInput("time").setAlign(Rt.inputs.Align.RIGHT).appendField("").setCheck(Number),this.appendDummyInput().appendField("s"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("设置阻塞套接字超时时间")}},bR={init:function(){this.setColour(gR),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendValueInput("content").appendField("发送数据"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("套接发送数据")}},kR={init:function(){this.setColour(gR),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("接收数据"),this.appendValueInput("size").appendField("字节").setCheck(Number),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("套接接收数据,返回接收到的数据对象")}},XR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},GR=230,xR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.digital),"PIN"),this.setOutput(!0)}},UR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},HR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.analog),"PIN"),this.setOutput(!0)}},BR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},wR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.dac),"PIN"),this.setOutput(!0)}},WR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},KR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},jR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},QR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},qR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},JR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.touch),"PIN"),this.setOutput(!0)}},zR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},ZR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},$R={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},tM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},eM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},iM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},nM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},sM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},oM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},pM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},uM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},aM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},lM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},_M=40,rM={init:function(){this.setColour(_M),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["A","17"],["B","16"]]),"KEY"),this.setOutput(!0),this.setTooltip()}},dM={init:function(){this.setColour(_M),this.appendDummyInput().appendField("初始化"),this.appendValueInput("key").appendField("按键"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化按键")}},IM={init:function(){this.setColour(_M),this.appendValueInput("key").appendField("按键"),this.appendDummyInput().appendField("被按下?"),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip("获取按键值")}},TM={init:function(){this.setColour(_M),this.appendDummyInput().appendField("DHT11"),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField("获取").appendField(new Rt.FieldDropdown([["温度-℃","0"],["湿度-%","1"],["温湿度","2"]]),"TYPE"),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip("dht11,获取温湿度")}},hM={init:function(){this.setColour(_M),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_CHAOSHENGBO),this.appendValueInput("PIN1",Number).appendField("Trig #").setCheck(Number),this.appendValueInput("PIN2",Number).appendField("Echo #").setCheck(Number),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_CHAOSHENGBO)}},mM={init:function(){this.setColour(_M),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Rt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Rt.Msg.MIXLY_MICROBIT_Direction,s=Rt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Rt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},OM={init:function(){this.setColour(_M),this.appendValueInput("I2CSUB").appendField(Rt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_SETUP+Rt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Rt.FieldDropdown([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("MPU9250","key");var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return Rt.Msg.MIXLY_ESP32_SENSOR_USE_I2C_TOOLTIP+{MPU9250:"MPU9250",SHT20:"SHT20",BMP280:"BMP280",ADXL345:"ADXL345"}[e]}))}},cM={init:function(){this.setColour(_M),this.appendValueInput("SUB").appendField("BMP280").setCheck("var"),this.appendDummyInput("").appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[Rt.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":Rt.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":Rt.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},RM={init:function(){this.setColour(_M),this.appendValueInput("SUB").appendField("SHT20").setCheck("var"),this.appendDummyInput("").appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[Rt.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":Rt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":Rt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},MM={init:function(){this.setColour(_M),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_JS_GET+Rt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new Rt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Rt.Msg.MIXLY_MICROBIT_Direction,s=Rt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":Rt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},EM={init:function(){this.setColour(_M),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Rt.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Rt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Rt.Msg.MIXLY_MICROBIT_Direction,s=Rt.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":Rt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},CM={init:function(){this.setColour(_M),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_GETTEMPERATUE)}},AM={init:function(){this.setColour(_M),this.appendValueInput("SUB").appendField("ADXL345").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Rt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Rt.Msg.MIXLY_MICROBIT_Direction,s=Rt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Rt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},gM=65,SM={init:function(){this.setColour(gM),this.appendValueInput("CONTENT",String).appendField("Serial").appendField(new Rt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Rt.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.TEXT_PRINT_TOOLTIP)}},DM={init:function(){this.setColour(gM),this.appendValueInput("CONTENT",String).appendField("Serial").appendField(new Rt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Rt.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.TEXT_PRINT_Huanhang_TOOLTIP+Rt.Msg.TEXT_PRINT_TOOLTIP)}},NM={init:function(){this.setColour(gM),this.appendDummyInput().appendField("Serial").appendField(new Rt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Rt.Msg.MIXLY_SERIAL_PRINTLN),this.appendValueInput("CONTENT",Number).appendField(new Rt.FieldDropdown([[Rt.Msg.MATH_BIN,"bin"],[Rt.Msg.MATH_OCT,"oct"],[Rt.Msg.MATH_DEC,"int"],[Rt.Msg.MATH_HEX,"hex"]]),"STAT").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setFieldValue("hex","STAT"),this.setTooltip(Rt.Msg.TEXT_PRINT_HEX_TOOLTIP)}},LM={init:function(){this.setColour(gM),this.appendValueInput("char_marker").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_JS_SERIAL_WHEN_CONTAIN_DATA),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_DO)}},fM={init:function(){this.setColour(gM),this.appendDummyInput().appendField("Serial").appendField(new Rt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Rt.Msg.MIXLY_SERIAL_READSTR),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_SERIAL_READ_STR)}},FM={init:function(){this.setColour(gM),this.appendDummyInput().appendField("Serial").appendField(new Rt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Rt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Boolean),this.setTooltip(Rt.Msg.MIXLY_SERIAL_AVAILABLE1)}},vM={init:function(){this.setColour(gM),this.appendDummyInput().appendField("Serial").appendField(new Rt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Rt.Msg.MIXLY_ESP32_READ_LINE),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_JS_SERIAL_READ_LINE1)}},PM={init:function(){this.setColour(gM),this.appendDummyInput().appendField("Serial "+Rt.Msg.MIXLY_SERIAL_READSTR_UNTIL).appendField(new Rt.FieldDropdown([["new line","serial.delimiters(Delimiters.NewLine)"],[",","serial.delimiters(Delimiters.Comma)"],["$","serial.delimiters(Delimiters.Dollar)"],[":","serial.delimiters(Delimiters.Colon)"],[".","serial.delimiters(Delimiters.Fullstop)"],["#","serial.delimiters(Delimiters.Hash)"]]),"char_marker"),this.setInputsInline(!0),this.setOutput(!0,String)}},VM={init:function(){this.setColour(gM),this.appendValueInput("RX",Number).appendField(Rt.Msg.MIXLY_SETUP).appendField(new Rt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField("RX#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("TX",Number).appendField("TX#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendDummyInput().appendField(Rt.Msg.MIXLY_SERIAL_BEGIN).appendField(new Rt.FieldDropdown([["115200","115200"],["57600","57600"],["37400","38400"],["31250","31250"],["28800","28800"],["19200","19200"],["14400","14400"],["9600","9600"],["4800","4800"],["2400","2400"],["1200","1200"],["300","300"]]),"baudrate"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_SERIAL_softserial)}},yM={init:function(){this.setColour(gM),this.appendValueInput("VAR").appendField(Rt.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(Rt.Msg.INOUT_input_TOOLTIP)}},YM={init:function(){this.setColour(gM),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.BLOCKPY_PRINT_TOOLTIP)}},bM={init:function(){this.setColour(gM),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.TEXT_PRINT_TOOLTIP)}},kM={init:function(){this.setColour(gM),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_SERIAL_PRINT),this.appendValueInput("END").appendField(Rt.Msg.MIXLY_ENDSWITH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_INOUT_PRINT_END_TOOLTIP)}},XM={init:function(){this.setColour(gM),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Rt.icons.MutatorIcon(["system_print_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_MIXPY_INOUT_PRINT_MANY_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("system_print_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n {\n"+e.statementToCode(this,"do")+"})\n"},ED=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Mt.Profile.default.serial)+")\n"},CD=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Mt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Mt.Profile.default.serial)+")\n"},AD=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Mt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Mt.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},gD=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},SD=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},DD=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},ND=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},LD=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},fD=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},FD=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},vD=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},PD=function(){return"while True:\n pass\n"},VD=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},yD=function(t,e){e.definitions_["import machine"]="import machine";return"machine.reset()\n"},YD=function(t,e){return e.definitions_["import gc"]="import gc",this.getFieldValue("gc")+"\n"},bD=function(t,e){return e.definitions_.import_os="import os","os.uname()"},kD=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},XD=function(t,e){e.definitions_["from machine import Timer"]="from machine import Timer";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=i%3,s=parseInt(i/3),o=e.valueToCode(this,"period",e.ORDER_NONE);return"tim"+i+" =Timer(Timer.TIMER"+n+",Timer.CHANNEL"+s+",mode=Timer.MODE_"+this.getFieldValue("mode")+",period = "+o+", callback = "+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},GD=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},xD=function(t,e){e.definitions_["from machine import Timer"]="from machine import Timer";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"tim"+i+" = Timer(Timer.TIMER"+i%3+",Timer.CHANNEL"+parseInt(i/3)+", mode=Timer.MODE_PWM)\n"},UD=xD,HD=XD,BD=GD,wD=kD;const WD=function(t,e){return["["+this.getFieldValue("TEXT")+"]",e.ORDER_ATOMIC]},KD=function(t,e){return["("+this.getFieldValue("TEXT")+")",e.ORDER_ATOMIC]},jD=function(t,e){var i=this.getFieldValue("COLOR");return["("+("0x"+(i=i.substr(1)).substr(0,2))+","+("0x"+i.substr(2,2))+","+("0x"+i.substr(4,2))+")",e.ORDER_ATOMIC]},QD=function(t,e){var i=this.getFieldValue("COLOR");return[i=function(t){var e,i,n;e=(t=t.substr(1)).substr(0,2),i=t.substr(2,2),n=t.substr(4,2);var s=(64512&(t="0x"+(t=e+i+n)))>>10;return((248&t)>>3<<8)+((7&s)<<13)+((16252928&t)>>19<<3)+((56&s)>>3)}(i),e.ORDER_ATOMIC]};Object.assign(Rt.Variables,Ct),Object.assign(Rt.Procedures,yl),Rt.Python=Yl,Rt.generator=Yl,Mt.Profile.default={},Object.assign(Mt.Profile,$T),Object.assign(Mt.Profile.default,$T.k210),Object.assign(Rt.Blocks,e,i,n,s,o,p,u,a,l,_,r,d,I,F,f,L,N,Y,b,k,X,G,x,U,H,B,w,W,K,j,Q,q,J,z,Z,$),Object.assign(Rt.Python.forBlock,T,h,m,O,c,R,M,E,C,A,g,S,D,y,V,P,v,tt,et,it,nt,st,ot,pt,ut,at,lt,_t,rt,dt,It,Tt,ht,mt,Ot,ct)})(); \ No newline at end of file diff --git a/boards/default/micropython_k210_mixgoai/main.bundle.eeee8882.js b/boards/default/micropython_k210_mixgoai/main.bundle.eeee8882.js deleted file mode 100644 index e8b13f0e..00000000 --- a/boards/default/micropython_k210_mixgoai/main.bundle.eeee8882.js +++ /dev/null @@ -1,21 +0,0 @@ -(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>Ft,controls_typeLists:()=>vt,lists_zip:()=>Pt,lists_zip_container:()=>Vt,lists_zip_item:()=>yt,unpack_iterable_object:()=>Yt,variables_change:()=>Lt,variables_get:()=>Dt,variables_global:()=>ft,variables_set:()=>Nt});var i={};t.r(i),t.d(i,{base_setup:()=>Xt,controls_delay:()=>Gt,controls_end_program:()=>xt,controls_except:()=>$t,controls_finally:()=>te,controls_flow_statements:()=>Kt,controls_for:()=>jt,controls_forEach:()=>Bt,controls_for_range:()=>Qt,controls_if:()=>Ut,controls_if_else:()=>zt,controls_if_elseif:()=>Jt,controls_if_if:()=>qt,controls_lambda:()=>ie,controls_main:()=>kt,controls_pass:()=>ne,controls_range:()=>Ht,controls_repeat_ext:()=>ee,controls_thread:()=>se,controls_try:()=>Zt,controls_try_finally:()=>Wt,controls_whileUntil:()=>wt,datetime_fromtimestamp:()=>_e,do_while:()=>oe,garbage_collection:()=>pe,gene_unique_identifier:()=>re,get_mem_alloc:()=>ue,get_mem_free:()=>ae,get_unique_identifier:()=>le});var n={};t.r(n),t.d(n,{base_map:()=>Pe,generate_cartesian_product:()=>ye,math_arithmetic:()=>me,math_bit:()=>ce,math_constant:()=>Te,math_constant_mp:()=>he,math_constrain:()=>Se,math_dec:()=>Me,math_degree_to_radian:()=>be,math_indexer_number:()=>Ne,math_map:()=>De,math_max_min:()=>Ce,math_number:()=>Ie,math_number_base_conversion:()=>Ae,math_radian_to_degree:()=>Ye,math_random:()=>ge,math_random_seed:()=>Le,math_round:()=>fe,math_selfcalcu:()=>Oe,math_to_int:()=>Ee,math_trig:()=>Re,text_to_number:()=>Fe,text_to_number_skulpt:()=>ve,turn_to_int:()=>Ve});var s={};t.r(s),t.d(s,{ascii_to_char:()=>He,char_to_ascii:()=>Be,number_to_text:()=>we,os_system:()=>hi,text:()=>Xe,text_capital:()=>$e,text_center:()=>ti,text_char:()=>xe,text_char_at:()=>je,text_char_at2:()=>Ke,text_char_at3:()=>ri,text_compareTo:()=>_i,text_compare_to:()=>Ze,text_create_with_container:()=>ui,text_create_with_item:()=>ai,text_encode:()=>Ii,text_equals_starts_ends:()=>ze,text_eval:()=>Ti,text_find:()=>ei,text_format:()=>pi,text_format_noreturn:()=>di,text_join:()=>Ue,text_join_seq:()=>ii,text_length:()=>We,text_random_char:()=>Qe,text_replace:()=>ni,text_split:()=>si,text_strip:()=>oi,text_substring:()=>Je,text_substring2:()=>qe,text_substring3:()=>li,text_textarea:()=>Ge});var o={};t.r(o),t.d(o,{ENUMERATE:()=>zi,content_in_lists:()=>$i,enumerate:()=>Zi,list_many_input:()=>Xi,list_tolist:()=>Hi,list_tolist2:()=>Ji,list_trig:()=>Yi,lists_2d_get_col_row_data:()=>Mi,lists_2d_get_data_with_col_row:()=>Ri,lists_append_extend:()=>Di,lists_change_to:()=>ki,lists_change_to_general:()=>xi,lists_clear:()=>vi,lists_create_with:()=>Ei,lists_create_with2:()=>Bi,lists_create_with_container:()=>Ai,lists_create_with_item:()=>gi,lists_create_with_noreturn:()=>Gi,lists_create_with_text:()=>Ci,lists_create_with_text2:()=>wi,lists_del_general:()=>Ui,lists_find:()=>yi,lists_getIndex3:()=>Wi,lists_getSublist3:()=>Ki,lists_get_index:()=>Oi,lists_get_random_item:()=>Ni,lists_get_random_sublist:()=>Li,lists_get_sublist:()=>ci,lists_insert_value:()=>fi,lists_insert_value2:()=>Qi,lists_pop:()=>Vi,lists_remove_at:()=>Pi,lists_remove_at2:()=>qi,lists_reverse:()=>Fi,lists_setIndex3:()=>ji,lists_set_index:()=>Si,lists_sort:()=>bi});var p={};t.r(p),t.d(p,{dicts_add_change_del:()=>mn,dicts_add_or_change:()=>an,dicts_clear:()=>rn,dicts_create_with:()=>en,dicts_create_with_container:()=>nn,dicts_create_with_item:()=>sn,dicts_create_with_noreturn:()=>Rn,dicts_deldict:()=>hn,dicts_delete:()=>ln,dicts_get:()=>pn,dicts_get_default:()=>un,dicts_items:()=>dn,dicts_keys:()=>on,dicts_length:()=>Tn,dicts_pop:()=>On,dicts_setdefault:()=>cn,dicts_to_json:()=>En,dicts_to_json2:()=>gn,dicts_to_to:()=>An,dicts_todict:()=>Mn,dicts_update:()=>_n,dicts_values:()=>In,json_to_dicts:()=>Cn});var u={};t.r(u),t.d(u,{logic_boolean:()=>Fn,logic_compare:()=>Dn,logic_compare_continous:()=>Nn,logic_is:()=>yn,logic_is_in:()=>Vn,logic_negate:()=>fn,logic_null:()=>vn,logic_operation:()=>Ln,logic_tobool:()=>Yn,logic_true_or_false:()=>Pn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>ss,sdcard_use_spi_init:()=>ns,storage_can_write_ornot:()=>wn,storage_change_dir:()=>es,storage_close_file:()=>Kn,storage_delete_file:()=>Qn,storage_file_seek:()=>zn,storage_file_tell:()=>Jn,storage_file_write:()=>xn,storage_fileopen:()=>kn,storage_fileopen_new:()=>Xn,storage_fileopen_new_encoding:()=>Gn,storage_get_a_line:()=>Bn,storage_get_contents:()=>Hn,storage_get_contents_without_para:()=>Un,storage_get_current_dir:()=>Zn,storage_get_file_size:()=>qn,storage_get_filename:()=>Wn,storage_is_file:()=>is,storage_list_all_files:()=>jn,storage_make_dir:()=>$n,storage_open_file_with_os:()=>bn,storage_rename:()=>ts});var l={};t.r(l),t.d(l,{procedures_callnoreturn:()=>ls,procedures_callreturn:()=>_s,procedures_defnoreturn:()=>os,procedures_defreturn:()=>ps,procedures_ifreturn:()=>rs,procedures_mutatorarg:()=>as,procedures_mutatorcontainer:()=>us,procedures_return:()=>ds});var _={};t.r(_),t.d(_,{tuple_change_to:()=>gs,tuple_create_with:()=>Ts,tuple_create_with_container:()=>hs,tuple_create_with_item:()=>ms,tuple_create_with_noreturn:()=>Ls,tuple_create_with_text2:()=>Os,tuple_create_with_text_return:()=>cs,tuple_del:()=>Es,tuple_find:()=>Ss,tuple_getIndex:()=>Rs,tuple_getSublist:()=>Ns,tuple_get_random_item:()=>Fs,tuple_get_sublist:()=>fs,tuple_input:()=>Ps,tuple_join:()=>Cs,tuple_length:()=>Ms,tuple_max:()=>As,tuple_totuple:()=>vs,tuple_trig:()=>Ds});var r={};t.r(r),t.d(r,{set_add_discard:()=>Hs,set_clear:()=>Gs,set_create_with:()=>ys,set_create_with_container:()=>Ys,set_create_with_item:()=>bs,set_create_with_text_return:()=>Ws,set_length:()=>ks,set_operate:()=>xs,set_operate_update:()=>Us,set_pop:()=>Xs,set_sub:()=>Bs,set_toset:()=>Ks,set_update:()=>ws});var d={};t.r(d),t.d(d,{html_content:()=>zs,html_content_more:()=>Zs,html_document:()=>Qs,html_form:()=>to,html_head_body:()=>Js,html_style:()=>$s,html_style_color:()=>io,html_style_content:()=>eo,html_text:()=>no,html_title:()=>qs});var I={};t.r(I),t.d(I,{attribute_access:()=>co,function_call:()=>ho,function_call_container:()=>mo,function_call_item:()=>Oo,raw_block:()=>po,raw_empty:()=>ao,raw_expression:()=>uo,raw_table:()=>oo,text_comment:()=>lo,text_print_multiple:()=>ro,text_print_multiple_container:()=>Io,text_print_multiple_item:()=>To,type_check:()=>_o});var T={};t.r(T),t.d(T,{controls_type:()=>Ao,controls_typeLists:()=>go,lists_zip:()=>So,unpack_iterable_object:()=>Do,variables_change:()=>Eo,variables_get:()=>Ro,variables_global:()=>Co,variables_set:()=>Mo});var h={};t.r(h),t.d(h,{Panic_with_status_code:()=>bo,base_setup:()=>Lo,controls_delay:()=>Yo,controls_flow_statements:()=>yo,controls_for:()=>vo,controls_forEach:()=>Uo,controls_for_range:()=>Po,controls_if:()=>fo,controls_interrupts:()=>Go,controls_lambda:()=>Bo,controls_main:()=>No,controls_millis:()=>ko,controls_nointerrupts:()=>xo,controls_pass:()=>Wo,controls_range:()=>Ho,controls_repeat:()=>$o,controls_repeat_ext:()=>Qo,controls_thread:()=>Ko,controls_try_finally:()=>Fo,controls_whileUntil:()=>Vo,datetime_fromtimestamp:()=>tp,do_while:()=>jo,garbage_collection:()=>qo,gene_unique_identifier:()=>ep,get_mem_alloc:()=>Jo,get_mem_free:()=>zo,get_unique_identifier:()=>Zo,reset:()=>Xo,time_sleep:()=>wo});var m={};t.r(m),t.d(m,{base_map:()=>Cp,generate_cartesian_product:()=>gp,math_arithmetic:()=>pp,math_bit:()=>op,math_constant:()=>np,math_constant_mp:()=>sp,math_constrain:()=>hp,math_dec:()=>_p,math_degree_to_radian:()=>Dp,math_indexer_number:()=>cp,math_map:()=>Tp,math_max_min:()=>dp,math_number:()=>ip,math_number_base_conversion:()=>mp,math_radian_to_degree:()=>Sp,math_random:()=>Ip,math_random_seed:()=>Op,math_round:()=>Rp,math_selfcalcu:()=>up,math_single:()=>ap,math_to_int:()=>rp,math_trig:()=>lp,text_to_number:()=>Mp,text_to_number_skulpt:()=>Ep,turn_to_int:()=>Ap});var O={};t.r(O),t.d(O,{ascii_to_char:()=>vp,char_to_ascii:()=>Pp,number_to_text:()=>Vp,os_system:()=>iu,text:()=>Np,text_capital:()=>Hp,text_center:()=>Bp,text_char:()=>fp,text_char_at:()=>bp,text_char_at2:()=>Yp,text_char_at3:()=>$p,text_compareTo:()=>Zp,text_compare_to:()=>Gp,text_encode:()=>tu,text_equals_starts_ends:()=>Xp,text_eval:()=>eu,text_find:()=>wp,text_format:()=>qp,text_format_noreturn:()=>Jp,text_join:()=>Fp,text_join_seq:()=>Wp,text_length:()=>yp,text_random_char:()=>kp,text_replace:()=>Kp,text_split:()=>jp,text_strip:()=>Qp,text_substring:()=>Up,text_substring2:()=>xp,text_substring3:()=>zp,text_textarea:()=>Lp});var c={};t.r(c),t.d(c,{content_in_lists:()=>bu,enumerate:()=>Yu,list_many_input:()=>Cu,list_tolist:()=>Vu,list_tolist2:()=>yu,list_trig:()=>Ru,lists_2d_get_col_row_data:()=>ou,lists_2d_get_data_with_col_row:()=>su,lists_append_extend:()=>_u,lists_change_to:()=>Eu,lists_change_to_general:()=>gu,lists_clear:()=>hu,lists_create_with:()=>pu,lists_create_with2:()=>Du,lists_create_with_noreturn:()=>Au,lists_create_with_text:()=>uu,lists_create_with_text2:()=>Nu,lists_del_general:()=>Su,lists_find:()=>mu,lists_getIndex3:()=>Lu,lists_getSublist3:()=>fu,lists_get_index:()=>au,lists_get_random_item:()=>ru,lists_get_random_sublist:()=>du,lists_get_sublist:()=>nu,lists_insert_value:()=>Iu,lists_insert_value2:()=>vu,lists_pop:()=>cu,lists_remove_at:()=>Ou,lists_remove_at2:()=>Pu,lists_reverse:()=>Tu,lists_setIndex3:()=>Fu,lists_set_index:()=>lu,lists_sort:()=>Mu});var R={};t.r(R),t.d(R,{dicts_add_change_del:()=>qu,dicts_add_or_change:()=>Uu,dicts_clear:()=>wu,dicts_create_with:()=>ku,dicts_create_with_noreturn:()=>Zu,dicts_deldict:()=>Qu,dicts_delete:()=>Hu,dicts_get:()=>Gu,dicts_get_default:()=>xu,dicts_items:()=>Wu,dicts_keys:()=>Xu,dicts_length:()=>ju,dicts_pop:()=>Ju,dicts_setdefault:()=>zu,dicts_to_json:()=>ta,dicts_to_json2:()=>na,dicts_to_to:()=>ia,dicts_todict:()=>$u,dicts_update:()=>Bu,dicts_values:()=>Ku,json_to_dicts:()=>ea});var M={};t.r(M),t.d(M,{logic_boolean:()=>aa,logic_compare:()=>sa,logic_compare_continous:()=>oa,logic_is:()=>da,logic_is_in:()=>ra,logic_negate:()=>ua,logic_null:()=>la,logic_operation:()=>pa,logic_tobool:()=>Ia,logic_true_or_false:()=>_a});var E={};t.r(E),t.d(E,{sdcard_mount:()=>ba,sdcard_use_spi_init:()=>Ya,storage_can_write_ornot:()=>Ca,storage_change_dir:()=>Fa,storage_close_file:()=>ga,storage_delete_file:()=>Da,storage_file_seek:()=>fa,storage_file_tell:()=>La,storage_file_write:()=>ca,storage_fileopen:()=>ha,storage_fileopen_new:()=>ma,storage_fileopen_new_encoding:()=>Oa,storage_get_a_line:()=>Ea,storage_get_contents:()=>Ma,storage_get_contents_without_para:()=>Ra,storage_get_current_dir:()=>va,storage_get_file_size:()=>Na,storage_get_filename:()=>Aa,storage_is_file:()=>ya,storage_list_all_files:()=>Sa,storage_make_dir:()=>Pa,storage_open_file_with_os:()=>Ta,storage_rename:()=>Va});var C={};t.r(C),t.d(C,{procedures_callnoreturn:()=>xa,procedures_callreturn:()=>Ga,procedures_defnoreturn:()=>Xa,procedures_defreturn:()=>ka,procedures_ifreturn:()=>Ua,procedures_return:()=>Ha});var A={};t.r(A),t.d(A,{tuple_change_to:()=>za,tuple_create_with:()=>Ba,tuple_create_with_noreturn:()=>el,tuple_create_with_text2:()=>wa,tuple_create_with_text_return:()=>Wa,tuple_del:()=>Qa,tuple_find:()=>Za,tuple_getIndex:()=>Ka,tuple_getSublist:()=>tl,tuple_get_random_item:()=>nl,tuple_get_sublist:()=>il,tuple_input:()=>ol,tuple_join:()=>qa,tuple_length:()=>ja,tuple_max:()=>Ja,tuple_totuple:()=>sl,tuple_trig:()=>$a});var g={};t.r(g),t.d(g,{set_add_discard:()=>dl,set_clear:()=>ll,set_create_with:()=>pl,set_create_with_text_return:()=>hl,set_length:()=>ul,set_operate:()=>_l,set_operate_update:()=>rl,set_pop:()=>al,set_sub:()=>Il,set_toset:()=>ml,set_update:()=>Tl});var S={};t.r(S),t.d(S,{html_content:()=>Ml,html_content_more:()=>El,html_document:()=>Ol,html_form:()=>Al,html_head_body:()=>Rl,html_style:()=>Cl,html_style_content:()=>gl,html_text:()=>Sl,html_title:()=>cl});var D={};t.r(D),t.d(D,{attribute_access:()=>Pl,function_call:()=>vl,raw_block:()=>Dl,raw_empty:()=>Ll,raw_expression:()=>Nl,raw_table:()=>fl,type_check:()=>Fl});var N={};t.r(N),t.d(N,{actuator_extern_get_led_bright:()=>Ul,actuator_extern_led_bright:()=>xl,actuator_extern_led_brightness:()=>Hl,actuator_get_led_bright:()=>wl,actuator_led_bright:()=>Bl,actuator_led_brightness:()=>Wl,actuator_neopixel_init:()=>s_,actuator_neopixel_rgb:()=>o_,actuator_neopixel_write:()=>p_,actuator_onboard_neopixel_rgb:()=>u_,actuator_onboard_neopixel_rgb_all:()=>a_,actuator_onboard_neopixel_write:()=>l_,esp32_mixgo_music_play_list_show:()=>n_,esp32_music_get_tempo:()=>Jl,esp32_music_pitch:()=>Kl,esp32_music_pitch_with_time:()=>jl,esp32_music_play_list:()=>i_,esp32_music_reset:()=>zl,esp32_music_set_tempo:()=>ql,esp32_music_stop:()=>Ql,esp32_onboard_music_pitch:()=>Zl,esp32_onboard_music_pitch_with_time:()=>$l,esp32_onboard_music_play_list:()=>e_,esp32_onboard_music_stop:()=>t_,get_led_bright:()=>r_,led_brightness:()=>d_,led_light:()=>__,ledswitch:()=>Gl,number:()=>Xl,servo_move:()=>kl});var L={};t.r(L),t.d(L,{mpython_blynk_app_data:()=>N_,mpython_blynk_app_notify:()=>M_,mpython_blynk_email:()=>A_,mpython_blynk_get_timers:()=>g_,mpython_blynk_on_connected:()=>O_,mpython_blynk_on_disconnected:()=>m_,mpython_blynk_run:()=>R_,mpython_blynk_sensor_data_to_app:()=>D_,mpython_blynk_set_property:()=>C_,mpython_blynk_setup:()=>L_,mpython_blynk_stop_timers:()=>E_,mpython_blynk_sync_virtual:()=>h_,mpython_blynk_terminal_widget_vpin:()=>T_,mpython_blynktimer:()=>S_,mpython_blynktimer_run:()=>c_});var f={};t.r(f),t.d(f,{display_animate:()=>Ur,display_blink_rate:()=>fr,display_bright_point:()=>tr,display_bright_screen:()=>Lr,display_circle:()=>Hr,display_clear:()=>Z_,display_draw_4strings:()=>Er,display_fill:()=>br,display_get_pixel:()=>$_,display_get_screen_image:()=>Nr,display_get_screen_pixel:()=>Dr,display_help:()=>wr,display_image_builtins:()=>rr,display_image_create:()=>dr,display_image_size:()=>Cr,display_line:()=>gr,display_line_arbitrarily:()=>Sr,display_matrix_use_i2c_init:()=>jr,display_oled_drawPixel:()=>Kr,display_oled_showBitmap:()=>Wr,display_onoff:()=>Yr,display_rect:()=>Ar,display_rgb_color:()=>Fr,display_scroll_string:()=>Pr,display_scroll_string_delay:()=>yr,display_scroll_string_extern:()=>qr,display_show_image:()=>Qr,display_show_image_or_string:()=>vr,display_show_image_or_string_delay:()=>Vr,display_show_static:()=>nr,display_tm1650_power:()=>Xr,display_tm1650_show_dot:()=>xr,display_tm1650_show_num:()=>Gr,display_tm_use_i2c_init:()=>kr,display_triangle:()=>Br,display_use_i2c_init:()=>Mr,esp32_display_is_on:()=>_r,esp32_display_off:()=>lr,esp32_display_on:()=>ar,esp32_display_scroll:()=>ur,esp32_display_show_animation:()=>pr,esp32_display_show_default_image:()=>or,esp32_display_show_string:()=>hr,group_lcd_init:()=>Or,group_lcd_power:()=>Rr,group_lcd_print:()=>mr,group_lcd_print2:()=>cr,image_arithmetic:()=>Tr,image_shift:()=>Ir,microbit_display_show_image:()=>sr,monitor_show_scroll_string:()=>ir,monitor_show_string:()=>er});var F={};t.r(F),t.d(F,{IOT_CONNECT_OLLAMA:()=>Pd,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>Rd,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>cd,IOT_EMQX_PING:()=>md,IOT_FORMATTING:()=>Td,IOT_FORMAT_STRING:()=>hd,IOT_MIXIO_NTP:()=>Od,IOT_MIXIO_PUBLISH:()=>ud,IOT_MIXIO_SUBSCRIBE:()=>ad,iot_checkonenet:()=>fd,iot_client_onboard:()=>Ed,iot_connect_ollama:()=>vd,iot_connect_openai:()=>Vd,iot_create_with_item:()=>od,iot_http_client:()=>Cd,iot_http_data:()=>Ad,iot_mixio_check:()=>rd,iot_mixio_connect:()=>pd,iot_mixio_connect_only:()=>_d,iot_mixio_disconnect:()=>ld,iot_mixio_format_msg:()=>Id,iot_mixio_format_topic:()=>dd,iot_mixly_key:()=>Md,iot_mqtt_client:()=>gd,iot_mqtt_data:()=>Sd,iot_onenet_check:()=>td,iot_onenet_connect:()=>Zr,iot_onenet_disconnect:()=>$r,iot_onenet_publish:()=>id,iot_onenet_publish_dict:()=>ed,iot_onenetconnect:()=>Nd,iot_onenetdisconnect:()=>Ld,iot_publish:()=>Fd,iot_publish_container:()=>nd,iot_publish_item:()=>sd,iot_wifi_connect:()=>zr,iot_wificonnect:()=>Dd,ollama_empty_history:()=>bd,use_ollama_llm_to_chat:()=>yd,use_ollama_llm_to_chat_return:()=>Yd});var v={};t.r(v),t.d(v,{actuator_extern_get_led_bright:()=>lI,actuator_extern_led_bright:()=>aI,actuator_extern_led_brightness:()=>_I,actuator_get_led_bright:()=>dI,actuator_led_bright:()=>rI,actuator_led_brightness:()=>II,actuator_neopixel_init:()=>TI,actuator_neopixel_rgb:()=>mI,actuator_neopixel_write:()=>hI,actuator_onboard_neopixel_rgb:()=>cI,actuator_onboard_neopixel_rgb_all:()=>RI,actuator_onboard_neopixel_write:()=>OI,esp32_mixgo_music_play_list_show:()=>nI,esp32_music_get_tempo:()=>zd,esp32_music_pitch:()=>jd,esp32_music_pitch_with_time:()=>Qd,esp32_music_play_list:()=>iI,esp32_music_reset:()=>sI,esp32_music_set_tempo:()=>Jd,esp32_music_stop:()=>qd,esp32_onboard_music_pitch:()=>Zd,esp32_onboard_music_pitch_with_time:()=>$d,esp32_onboard_music_play_list:()=>eI,esp32_onboard_music_stop:()=>tI,get_led_bright:()=>EI,led_brightness:()=>CI,led_light:()=>MI,ledswitch:()=>uI,number:()=>pI,servo_move:()=>oI});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>yI,mpython_blynk_app_notify:()=>fI,mpython_blynk_email:()=>YI,mpython_blynk_get_timers:()=>vI,mpython_blynk_on_connected:()=>DI,mpython_blynk_on_disconnected:()=>SI,mpython_blynk_run:()=>LI,mpython_blynk_sensor_data_to_app:()=>VI,mpython_blynk_set_property:()=>bI,mpython_blynk_setup:()=>kI,mpython_blynk_stop_timers:()=>FI,mpython_blynk_sync_virtual:()=>gI,mpython_blynk_terminal_widget_vpin:()=>AI,mpython_blynktimer:()=>PI,mpython_blynktimer_run:()=>NI});var V={};t.r(V),t.d(V,{display_animate:()=>rT,display_blink_rate:()=>JI,display_bright_point:()=>KI,display_bright_screen:()=>qI,display_circle:()=>dT,display_clear:()=>zI,display_draw_4strings:()=>$I,display_fill:()=>pT,display_get_pixel:()=>WI,display_get_screen_image:()=>QI,display_get_screen_pixel:()=>jI,display_image_builtins:()=>wI,display_image_create:()=>BI,display_line:()=>nT,display_line_arbitrarily:()=>tT,display_matrix_use_i2c_init:()=>mT,display_oled_drawPixel:()=>hT,display_oled_showBitmap:()=>TT,display_onoff:()=>sT,display_rect:()=>eT,display_scroll_string:()=>GI,display_scroll_string_delay:()=>HI,display_scroll_string_extern:()=>cT,display_show_image:()=>OT,display_show_image_or_string:()=>XI,display_show_image_or_string_delay:()=>UI,display_show_static:()=>xI,display_tm1650_power:()=>aT,display_tm1650_show_dot:()=>_T,display_tm1650_show_num:()=>lT,display_tm_use_i2c_init:()=>uT,display_triangle:()=>IT,display_use_i2c_init:()=>ZI,image_arithmetic:()=>iT,image_shift:()=>oT});var y={};t.r(y),t.d(y,{IOT_CONNECT_OLLAMA:()=>KT,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>kT,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>YT,IOT_EMQX_PING:()=>XT,IOT_FORMATTING:()=>VT,IOT_FORMAT_STRING:()=>yT,IOT_MIXIO_NTP:()=>GT,IOT_MIXIO_PUBLISH:()=>DT,IOT_MIXIO_SUBSCRIBE:()=>NT,iot_client_onboard:()=>xT,iot_connect_ollama:()=>WT,iot_connect_openai:()=>jT,iot_http_client:()=>UT,iot_http_data:()=>HT,iot_mixio_check:()=>FT,iot_mixio_connect:()=>ST,iot_mixio_connect_only:()=>fT,iot_mixio_disconnect:()=>LT,iot_mixio_format_msg:()=>PT,iot_mixio_format_topic:()=>vT,iot_mixly_key:()=>bT,iot_mqtt_client:()=>BT,iot_mqtt_data:()=>wT,iot_onenet_check:()=>AT,iot_onenet_connect:()=>MT,iot_onenet_disconnect:()=>ET,iot_onenet_publish:()=>gT,iot_onenet_publish_dict:()=>CT,iot_wifi_connect:()=>RT,ollama_empty_history:()=>JT,use_ollama_llm_to_chat:()=>QT,use_ollama_llm_to_chat_return:()=>qT});var Y={};t.r(Y),t.d(Y,{PID_get_pid:()=>dh,PID_init:()=>rh,actuator_PAC9685_Servo:()=>sh,actuator_PAC9685_init:()=>nh,actuator_Servo:()=>ih,actuator_Servo_init:()=>eh,actuator_ms32006_dcmotor:()=>lh,actuator_ms32006_init:()=>ah,actuator_ms32006_stepper:()=>_h,actuator_rgb_display:()=>uh,actuator_rgb_init:()=>oh,actuator_rgb_set:()=>ph});var b={};t.r(b),t.d(b,{KPU_analysis:()=>Eh,KPU_forward:()=>Mh,KPU_init_yolo2:()=>ch,KPU_load:()=>mh,KPU_load1:()=>Oh,KPU_run_yolo2:()=>Rh,ai_face_info:()=>Fh,ai_face_init:()=>Lh,ai_face_train:()=>fh,ailocal_loading:()=>Dh,ailocal_predict:()=>Nh,ailocal_training:()=>Sh,aionenet_API:()=>gh,aionenet_nic_init:()=>Ch,aionenet_token:()=>Ah,tuple_anchor:()=>Th,tuple_calss:()=>hh});var k={};t.r(k),t.d(k,{audio_play:()=>yh,audio_record:()=>Yh,mic_init:()=>Vh,spk_init:()=>Ph,video_play:()=>bh,video_record:()=>kh});var X={};t.r(X),t.d(X,{camera_getinfo:()=>Zh,camera_init:()=>Uh,camera_reset:()=>Hh,camera_run:()=>Wh,camera_set_colorbar:()=>zh,camera_set_framesize:()=>wh,camera_set_hmirror:()=>qh,camera_set_pixformat:()=>Bh,camera_set_vflip:()=>Jh,camera_set_windowing:()=>tm,camera_setmun:()=>$h,camera_shutdown:()=>Qh,camera_skip_frames:()=>Kh,camera_snapshot:()=>jh,mode:()=>Gh,size:()=>xh});var G={};t.r(G),t.d(G,{communicate_i2c_available:()=>cm,communicate_i2c_init:()=>nm,communicate_i2c_master_read:()=>Om,communicate_i2c_read:()=>om,communicate_i2c_scan:()=>um,communicate_i2c_write:()=>pm,communicate_i2s_init:()=>sm,communicate_ir_recv:()=>im,communicate_ow_init:()=>Mm,communicate_ow_read:()=>Cm,communicate_ow_reset:()=>Sm,communicate_ow_scan:()=>Em,communicate_ow_select:()=>gm,communicate_ow_write:()=>Am,communicate_spi_buffer:()=>_m,communicate_spi_init:()=>am,communicate_spi_read:()=>rm,communicate_spi_read_output:()=>dm,communicate_spi_readinto:()=>Im,communicate_spi_readinto_output:()=>Tm,communicate_spi_set:()=>lm,communicate_spi_write:()=>hm,communicate_spi_write_readinto:()=>mm,i2c_available:()=>xm,i2c_init:()=>Dm,i2c_master_reader2:()=>Gm,i2c_read:()=>Nm,i2c_scan:()=>fm,i2c_slave_onreceive:()=>Rm,i2c_write:()=>Lm,spi_buffer:()=>Pm,spi_init:()=>Fm,spi_read:()=>Vm,spi_read_output:()=>ym,spi_readinto:()=>Ym,spi_readinto_output:()=>bm,spi_set:()=>vm,spi_write:()=>km,spi_write_readinto:()=>Xm});var x={};t.r(x),t.d(x,{angle:()=>Hm,lcd_clear:()=>qm,lcd_color:()=>Bm,lcd_colour:()=>jm,lcd_display:()=>Qm,lcd_draw_string:()=>Zm,lcd_init:()=>Wm,lcd_mirror:()=>zm,lcd_rotation:()=>Jm,lcd_width:()=>Km,on_off:()=>wm,touch_calibrate:()=>tO,touch_info:()=>iO,touch_init:()=>$m,touch_read:()=>eO});var U={};t.r(U),t.d(U,{factory_block:()=>IO,factory_block_notes:()=>OO,factory_block_return:()=>TO,factory_block_return_with_textarea:()=>mO,factory_block_with_textarea:()=>hO,factory_callMethod_noreturn:()=>rO,factory_callMethod_return:()=>dO,factory_create_with_container:()=>uO,factory_create_with_item:()=>aO,factory_declare:()=>_O,factory_from_import:()=>sO,factory_function_noreturn:()=>pO,factory_function_return:()=>lO,factory_import:()=>oO});var H={};t.r(H),t.d(H,{asrloca_config:()=>MO,asrloca_del:()=>CO,asrloca_init:()=>RO,asrloca_recognize:()=>EO});var B={};t.r(B),t.d(B,{image_Histogram:()=>Cc,image_Image:()=>SO,image_Image1:()=>DO,image_RGB:()=>FO,image_apriltag:()=>cc,image_barcode:()=>Oc,image_binary:()=>rc,image_blob:()=>Ec,image_cartoon:()=>sc,image_circle:()=>tc,image_clear:()=>PO,image_compress:()=>vO,image_copy:()=>fO,image_dilate:()=>pc,image_draw_arrow:()=>HO,image_draw_circle:()=>wO,image_draw_cross:()=>BO,image_draw_image:()=>jO,image_draw_keypoints:()=>KO,image_draw_line:()=>UO,image_draw_rectangle:()=>WO,image_draw_string:()=>xO,image_draw_string_UTF:()=>GO,image_draw_string_flash:()=>XO,image_erode:()=>oc,image_find_apriltags:()=>hc,image_find_barcodes:()=>Ic,image_find_blobs:()=>Rc,image_find_circles:()=>JO,image_find_hog:()=>fc,image_find_keypoints:()=>Fc,image_find_line_segments:()=>qO,image_find_lines:()=>QO,image_find_qrcodes:()=>Tc,image_find_rects:()=>zO,image_flood_fill:()=>uc,image_font_free:()=>kO,image_font_load:()=>bO,image_get_histogram:()=>Mc,image_get_pixel:()=>YO,image_get_regression:()=>ZO,image_getinfo:()=>NO,image_grayscale_to_rgb:()=>Lc,image_histeq:()=>ic,image_invert:()=>lc,image_kptmatch:()=>Pc,image_lab_to_rgb:()=>Sc,image_lens_corr:()=>_c,image_line:()=>$O,image_linpolar:()=>ac,image_match_descriptor:()=>vc,image_mean:()=>nc,image_morph:()=>dc,image_percentile:()=>Ac,image_qrcode:()=>mc,image_rect:()=>ec,image_rgb_to_grayscale:()=>Nc,image_rgb_to_lab:()=>Dc,image_save:()=>LO,image_set_pixel:()=>yO,image_threshold:()=>gc,image_tonew:()=>VO,true_false:()=>gO});var w={};t.r(w),t.d(w,{inout_digital_init:()=>Yc,inout_digital_read:()=>kc,inout_digital_write:()=>bc,inout_highlow:()=>yc,inout_pin_attachInterrupt:()=>xc,inout_pin_disirq:()=>Uc,inout_pwm_init:()=>Xc,inout_pwm_write:()=>Gc});var W={};t.r(W),t.d(W,{iot_checkonenet:()=>eR,iot_create_with_item:()=>zc,iot_onenet_check:()=>Kc,iot_onenet_connect:()=>wc,iot_onenet_disconnect:()=>Wc,iot_onenet_publish:()=>Qc,iot_onenet_publish_dict:()=>jc,iot_onenetconnect:()=>$c,iot_onenetdisconnect:()=>tR,iot_publish:()=>iR,iot_publish_container:()=>qc,iot_publish_item:()=>Jc,iot_wifi_connect:()=>Bc,iot_wificonnect:()=>Zc});var K={};t.r(K),t.d(K,{base_map:()=>RR,math_arithmetic:()=>pR,math_bit:()=>aR,math_constant:()=>oR,math_constrain:()=>hR,math_indexer_number:()=>OR,math_map:()=>mR,math_max_min:()=>rR,math_max_min1:()=>dR,math_number:()=>sR,math_number_base_conversion:()=>IR,math_random:()=>TR,math_random_seed:()=>cR,math_selfcalcu:()=>uR,math_to_int:()=>_R,math_trig:()=>lR});var j={};t.r(j),t.d(j,{nes_joystick_init:()=>ER,nes_keyboard_init:()=>CR,nes_run:()=>AR});var Q={};t.r(Q),t.d(Q,{network_connect:()=>NR,network_disable_ap:()=>vR,network_disconnect:()=>fR,network_enable_ap:()=>FR,network_ifconfig:()=>LR,network_init:()=>SR,network_scan:()=>DR,network_socket_close:()=>XR,network_socket_connect:()=>yR,network_socket_getaddrinfo:()=>VR,network_socket_init:()=>PR,network_socket_receive:()=>kR,network_socket_send:()=>bR,network_socket_settimeout:()=>YR});var q={};t.r(q),t.d(q,{pins_analog:()=>HR,pins_analog_pin:()=>BR,pins_axis:()=>nM,pins_brightness:()=>sM,pins_builtinimg:()=>ZR,pins_button:()=>KR,pins_dac:()=>wR,pins_dac_pin:()=>WR,pins_digital:()=>xR,pins_digital_dot:()=>lM,pins_digital_pin:()=>UR,pins_exlcdh:()=>eM,pins_exlcdv:()=>iM,pins_imglist:()=>$R,pins_one_more:()=>aM,pins_playlist:()=>tM,pins_pwm:()=>jR,pins_pwm_pin:()=>QR,pins_radio_datarate:()=>uM,pins_radio_power:()=>pM,pins_serial:()=>zR,pins_tone_notes:()=>oM,pins_touch:()=>JR,pins_touch_pin:()=>qR});var J={};t.r(J),t.d(J,{HCSR04:()=>hM,KEY_SELET:()=>rM,sensor_adxl345_get_acceleration:()=>AM,sensor_bmp:()=>cM,sensor_button_init:()=>dM,sensor_button_read:()=>IM,sensor_dht11:()=>TM,sensor_mpu9250_get_acceleration:()=>mM,sensor_mpu9250_get_gyro:()=>EM,sensor_mpu9250_get_magnetic:()=>MM,sensor_mpu9250_temperature:()=>CM,sensor_sht:()=>RM,sensor_use_i2c_init:()=>OM});var z={};t.r(z),t.d(z,{serial_any:()=>FM,serial_print:()=>SM,serial_print_hex:()=>NM,serial_println:()=>DM,serial_read_from_mixgoce:()=>HM,serial_readline:()=>vM,serial_readstr:()=>fM,serial_readstr_until:()=>PM,serial_receive_data_event:()=>LM,serial_send_to_mixgoce:()=>UM,serial_softserial1:()=>VM,system_input:()=>yM,system_print:()=>YM,system_print_container:()=>GM,system_print_end:()=>kM,system_print_inline:()=>bM,system_print_item:()=>xM,system_print_many:()=>XM});var Z={};t.r(Z),t.d(Z,{Panic_with_status_code:()=>KM,TIM_SELET:()=>wM,Timer_init:()=>eE,base_delay:()=>sE,controls_delay:()=>WM,controls_millis:()=>jM,controls_uname:()=>qM,raw_block:()=>QM,system_gc_collect:()=>ZM,system_reset:()=>zM,system_ticks_diff:()=>$M,system_timer:()=>JM,system_timer_init:()=>tE,time_ticks_diff:()=>nE,timer2:()=>iE});var $={};t.r($),t.d($,{LCD_color_seclet:()=>aE,lists_create_with_text1:()=>pE,tuple_create_with_text3:()=>uE});var tt={};t.r(tt),t.d(tt,{PID_get_pid:()=>ME,PID_init:()=>RE,actuator_PAC9685_Servo:()=>dE,actuator_PAC9685_init:()=>rE,actuator_Servo:()=>_E,actuator_Servo_init:()=>lE,actuator_ms32006_dcmotor:()=>OE,actuator_ms32006_init:()=>mE,actuator_ms32006_stepper:()=>cE,actuator_rgb_display:()=>hE,actuator_rgb_init:()=>IE,actuator_rgb_set:()=>TE});var et={};t.r(et),t.d(et,{KPU_analysis:()=>LE,KPU_forward:()=>NE,KPU_init_yolo2:()=>SE,KPU_load:()=>AE,KPU_load1:()=>gE,KPU_run_yolo2:()=>DE,ai_face_info:()=>kE,ai_face_init:()=>YE,ai_face_train:()=>bE,ailocal_loading:()=>VE,ailocal_predict:()=>yE,ailocal_training:()=>PE,aionenet_API:()=>vE,aionenet_nic_init:()=>fE,aionenet_token:()=>FE,tuple_anchor:()=>EE,tuple_calss:()=>CE});var it={};t.r(it),t.d(it,{audio_play:()=>xE,audio_record:()=>UE,mic_init:()=>GE,spk_init:()=>XE,video_play:()=>HE,video_record:()=>BE});var nt={};t.r(nt),t.d(nt,{camera_getinfo:()=>nC,camera_init:()=>KE,camera_reset:()=>jE,camera_run:()=>JE,camera_set_colorbar:()=>iC,camera_set_framesize:()=>qE,camera_set_hmirror:()=>tC,camera_set_pixformat:()=>QE,camera_set_vflip:()=>eC,camera_set_windowing:()=>oC,camera_setmun:()=>sC,camera_shutdown:()=>$E,camera_skip_frames:()=>zE,camera_snapshot:()=>ZE,mode:()=>wE,size:()=>WE});var st={};t.r(st),t.d(st,{communicate_i2c_available:()=>IC,communicate_i2c_init:()=>uC,communicate_i2c_master_read:()=>dC,communicate_i2c_read:()=>lC,communicate_i2c_scan:()=>rC,communicate_i2c_write:()=>_C,communicate_i2s_init:()=>aC,communicate_ir_recv:()=>pC,communicate_ow_init:()=>gC,communicate_ow_read:()=>NC,communicate_ow_reset:()=>DC,communicate_ow_scan:()=>SC,communicate_ow_select:()=>fC,communicate_ow_write:()=>LC,communicate_spi_buffer:()=>OC,communicate_spi_init:()=>hC,communicate_spi_read:()=>cC,communicate_spi_read_output:()=>RC,communicate_spi_readinto:()=>MC,communicate_spi_readinto_output:()=>EC,communicate_spi_set:()=>mC,communicate_spi_write:()=>CC,communicate_spi_write_readinto:()=>AC,i2c_slave_onreceive:()=>TC});var ot={};t.r(ot),t.d(ot,{angle:()=>FC,lcd_clear:()=>kC,lcd_color:()=>vC,lcd_colour:()=>yC,lcd_display:()=>bC,lcd_draw_string:()=>xC,lcd_init:()=>VC,lcd_mirror:()=>GC,lcd_rotation:()=>XC,lcd_width:()=>YC,on_off:()=>PC,touch_calibrate:()=>HC,touch_info:()=>wC,touch_init:()=>UC,touch_read:()=>BC});var pt={};t.r(pt),t.d(pt,{factory_block:()=>ZC,factory_block_notes:()=>iA,factory_block_return:()=>$C,factory_block_return_with_textarea:()=>eA,factory_block_with_textarea:()=>tA,factory_callMethod_noreturn:()=>JC,factory_callMethod_return:()=>zC,factory_declare:()=>qC,factory_from_import:()=>WC,factory_function_noreturn:()=>jC,factory_function_return:()=>QC,factory_import:()=>KC});var ut={};t.r(ut),t.d(ut,{asrloca_config:()=>sA,asrloca_del:()=>pA,asrloca_init:()=>nA,asrloca_recognize:()=>oA});var at={};t.r(at),t.d(at,{image_Histogram:()=>og,image_Image:()=>lA,image_Image1:()=>_A,image_RGB:()=>aA,image_apriltag:()=>eg,image_barcode:()=>$A,image_binary:()=>QA,image_blob:()=>sg,image_cartoon:()=>UA,image_circle:()=>kA,image_clear:()=>MA,image_compress:()=>RA,image_copy:()=>cA,image_dilate:()=>BA,image_draw_arrow:()=>SA,image_draw_circle:()=>NA,image_draw_cross:()=>DA,image_draw_image:()=>FA,image_draw_keypoints:()=>fA,image_draw_line:()=>gA,image_draw_rectangle:()=>LA,image_draw_string:()=>OA,image_draw_string_UTF:()=>mA,image_draw_string_flash:()=>hA,image_erode:()=>HA,image_find_apriltags:()=>ZA,image_find_barcodes:()=>JA,image_find_blobs:()=>ig,image_find_circles:()=>VA,image_find_hog:()=>dg,image_find_keypoints:()=>Ig,image_find_line_segments:()=>PA,image_find_lines:()=>vA,image_find_qrcodes:()=>zA,image_find_rects:()=>yA,image_flood_fill:()=>wA,image_font_free:()=>IA,image_font_load:()=>TA,image_get_histogram:()=>ng,image_get_pixel:()=>AA,image_get_regression:()=>YA,image_getinfo:()=>rA,image_grayscale_to_rgb:()=>rg,image_histeq:()=>GA,image_invert:()=>KA,image_kptmatch:()=>hg,image_lab_to_rgb:()=>ag,image_lens_corr:()=>jA,image_line:()=>bA,image_linpolar:()=>WA,image_match_descriptor:()=>Tg,image_mean:()=>xA,image_morph:()=>qA,image_percentile:()=>pg,image_qrcode:()=>tg,image_rect:()=>XA,image_rgb_to_grayscale:()=>_g,image_rgb_to_lab:()=>lg,image_save:()=>dA,image_set_pixel:()=>CA,image_threshold:()=>ug,image_tonew:()=>EA,true_false:()=>uA});var lt={};t.r(lt),t.d(lt,{PGA_SELET:()=>mg,inout_adc_Vread:()=>Sg,inout_adc_init:()=>Ag,inout_adc_read:()=>gg,inout_digital_init:()=>cg,inout_digital_read:()=>Mg,inout_digital_write:()=>Rg,inout_highlow:()=>Og,inout_pin_attachInterrupt:()=>Dg,inout_pin_disirq:()=>Ng,inout_pwm_init:()=>Eg,inout_pwm_write:()=>Cg});var _t={};t.r(_t),t.d(_t,{iot_onenet_check:()=>Pg,iot_onenet_connect:()=>fg,iot_onenet_disconnect:()=>Fg,iot_onenet_publish:()=>Vg,iot_onenet_publish_dict:()=>vg,iot_wifi_connect:()=>Lg});var rt={};t.r(rt),t.d(rt,{base_map:()=>Jg,math_arithmetic:()=>kg,math_bit:()=>bg,math_constant:()=>Yg,math_constrain:()=>Kg,math_indexer_number:()=>qg,math_map:()=>Wg,math_max_min:()=>Hg,math_max_min1:()=>Bg,math_number:()=>yg,math_number_base_conversion:()=>jg,math_random:()=>wg,math_random_seed:()=>Qg,math_selfcalcu:()=>Xg,math_single:()=>Gg,math_to_int:()=>Ug,math_trig:()=>xg});var dt={};t.r(dt),t.d(dt,{nes_joystick_init:()=>zg,nes_keyboard_init:()=>Zg,nes_run:()=>$g});var It={};t.r(It),t.d(It,{network_connect:()=>iS,network_disable_ap:()=>pS,network_disconnect:()=>sS,network_enable_ap:()=>oS,network_ifconfig:()=>nS,network_init:()=>tS,network_scan:()=>eS,network_server:()=>uS,network_socket_close:()=>TS,network_socket_connect:()=>_S,network_socket_getaddrinfo:()=>lS,network_socket_init:()=>aS,network_socket_receive:()=>dS,network_socket_send:()=>IS,network_socket_settimeout:()=>rS});var Tt={};t.r(Tt),t.d(Tt,{pins_analog:()=>RS,pins_analog_pin:()=>cS,pins_axis:()=>vS,pins_brightness:()=>yS,pins_builtinimg:()=>LS,pins_button:()=>mS,pins_dac:()=>AS,pins_dac_pin:()=>CS,pins_digital:()=>hS,pins_digital_dot:()=>GS,pins_digital_pin:()=>OS,pins_exlcdh:()=>PS,pins_exlcdv:()=>VS,pins_imglist:()=>fS,pins_interrupt:()=>DS,pins_one_more:()=>XS,pins_playlist:()=>FS,pins_pwm:()=>ES,pins_pwm_pin:()=>MS,pins_radio_datarate:()=>kS,pins_radio_power:()=>bS,pins_serial:()=>NS,pins_tone_notes:()=>YS,pins_touch:()=>SS,pins_touch_pin:()=>gS});var ht={};t.r(ht),t.d(ht,{HCSR04:()=>wS,KEY_SELET:()=>xS,sensor_adxl345_get_acceleration:()=>QS,sensor_bmp:()=>iD,sensor_button_init:()=>US,sensor_button_read:()=>HS,sensor_compass_reset:()=>tD,sensor_dht11:()=>BS,sensor_mpu9250_attachGestureInterrupt:()=>WS,sensor_mpu9250_calibrate_compass:()=>zS,sensor_mpu9250_field_strength:()=>$S,sensor_mpu9250_gesture:()=>KS,sensor_mpu9250_get_acceleration:()=>jS,sensor_mpu9250_get_gyro:()=>JS,sensor_mpu9250_get_magnetic:()=>qS,sensor_mpu9250_temperature:()=>ZS,sensor_sht:()=>nD,sensor_use_i2c_init:()=>eD});var mt={};t.r(mt),t.d(mt,{UART_SELET:()=>sD,serial_any:()=>aD,serial_print:()=>oD,serial_print_hex:()=>uD,serial_println:()=>pD,serial_read_from_mixgoce:()=>cD,serial_readline:()=>_D,serial_readstr:()=>lD,serial_send_to_mixgoce:()=>OD,serial_softserial1:()=>rD,system_input:()=>dD,system_print:()=>ID,system_print_end:()=>hD,system_print_inline:()=>TD,system_print_many:()=>mD});var Ot={};t.r(Ot),t.d(Ot,{Panic_with_status_code:()=>FD,TIM_SELET:()=>RD,Timer_init:()=>UD,base_delay:()=>wD,controls_delay:()=>kD,controls_end_program:()=>PD,controls_millis:()=>vD,controls_uname:()=>bD,reset:()=>VD,system_device_name:()=>LD,system_device_serial_number:()=>fD,system_event_bus_source:()=>DD,system_event_bus_value:()=>ND,system_gc_collect:()=>YD,system_on_event:()=>AD,system_raise_event:()=>CD,system_reset:()=>yD,system_run_in_background:()=>MD,system_ticks_diff:()=>GD,system_timer:()=>XD,system_timer_init:()=>xD,system_timestamp:()=>gD,system_value:()=>SD,system_wait:()=>ED,time_ticks_diff:()=>BD,timer2:()=>HD});var ct={};t.r(ct),t.d(ct,{LCD_color_seclet:()=>QD,LCD_color_seclet1:()=>jD,lists_create_with_text1:()=>WD,tuple_create_with_text3:()=>KD});const Rt=Blockly,Mt=Mixly,Et={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(p+=n)):i=p}else i="i";return i}},Ct=Et; -/** - * @license - * Visual Blocks Editor - * - * Copyright 2012 Google Inc. - * https://developers.google.com/blockly/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class At{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Rt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Rt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Rt.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_if_else");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Rt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(Rt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Rt.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Ht={init:function(){this.setColour(bt),this.appendValueInput("FROM").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.PYTHON_RANGE).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Bt={init:function(){this.setColour(bt),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Rt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Rt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},wt={init:function(){this.setColour(bt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Rt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Rt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Rt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Rt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Rt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Wt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Rt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Rt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Rt.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Rt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Rt.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_finally");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Rt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Rt.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Kt={init:function(){this.setColour(bt);var t=new Rt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Rt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Rt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},jt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Rt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Rt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Qt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Rt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Rt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};wt.OPERATORS=[[Rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Kt.OPERATORS=[[Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const qt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Rt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Jt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},zt={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Rt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Zt={init:function(){this.setColour(bt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},$t={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Rt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},te={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Rt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},ee={init:function(){this.jsonInit({message0:Rt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:bt,tooltip:Rt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Rt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},ie={init:function(){this.setColour(bt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_STAT),this.setOutput(!0)}},ne={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},se={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Rt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},oe={init:function(){this.appendDummyInput().appendField(Rt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Rt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Rt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Rt.FieldDropdown([[Rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(bt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},pe={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ue={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},ae={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},le={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_GET+Rt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Rt.Msg.PROCEDURES_DEFRETURN_RETURN+Rt.Msg.MIXLY_GET_UNIQUE_IDEN)}},_e={init:function(){this.setColour(bt),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Rt.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},re={init:function(){this.setColour(bt),this.appendDummyInput().appendField(Rt.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},de=230;Rt.FieldTextInput.math_number_validator=function(t){return String(t)},Rt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const Ie={init:function(){this.setColour(de),this.appendDummyInput().appendField(new Rt.FieldTextInput("0",Rt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MATH_NUMBER_TOOLTIP)}},Te={init:function(){this.setColour(de);this.appendDummyInput("").appendField(Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Rt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},he={init:function(){this.setColour(de);this.appendDummyInput("").appendField(Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Rt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},me={init:function(){this.setColour(de),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Rt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Rt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Oe={init:function(){this.setColour(de),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Rt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Rt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},ce={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Rt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Re={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Rt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Rt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Rt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Rt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Rt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Rt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Rt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Rt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Me={init:function(){var t=[[Rt.Msg.MATH_BIN,"bin"],[Rt.Msg.MATH_OCT,"oct"],[Rt.Msg.MATH_HEX,"hex"]];this.setColour(de),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Rt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:Rt.Msg.MATH_DEC_TOOLTIP_BIN,oct:Rt.Msg.MATH_DEC_TOOLTIP_OCT,hex:Rt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},Ee={init:function(){var t=[[Rt.Msg.LANG_MATH_TO_ROUND,"round"],[Rt.Msg.LANG_MATH_TO_CEIL,"ceil"],[Rt.Msg.LANG_MATH_TO_FLOOR,"floor"],[Rt.Msg.MATH_ABS,"fabs"],[Rt.Msg.MATH_SQRT,"sqrt"]];this.setColour(de),this.appendValueInput("A").setCheck(Number).appendField(new Rt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Rt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Rt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Rt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Rt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Rt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Rt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Ce={init:function(){var t=[[Rt.Msg.MIXLY_MAX,"max"],[Rt.Msg.MIXLY_MIN,"min"]];this.setColour(de),this.appendValueInput("A").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(new Rt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Rt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Rt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Rt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Ae={init:function(){var t=[[Rt.Msg.MATH_TWO,"two"],[Rt.Msg.MATH_EIGHT,"eight"],[Rt.Msg.MATH_TEN,"ten"],[Rt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(de),this.appendDummyInput("").appendField(Rt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Rt.FieldDropdown(t),"OP").appendField(Rt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.MATH_ZHW).appendField(new Rt.FieldDropdown(t),"OP2").appendField(Rt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:Rt.Msg.MATH_Before_two,eight:Rt.Msg.MATH_Before_eight,ten:Rt.Msg.MATH_Before_ten,sixteen:Rt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:Rt.Msg.MATH_Behind_two,eight:Rt.Msg.MATH_Behind_eight,ten:Rt.Msg.MATH_Behind_ten,sixteen:Rt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},ge={init:function(){var t=[[Rt.Msg.LANG_MATH_INT,"int"],[Rt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(de),this.setOutput(!0,Number),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Rt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:Rt.Msg.LANG_MATH_INT,float:Rt.Msg.LANG_MATH_FLOAT_RANDOM};return Rt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Se={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Rt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Rt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Rt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MATH_CONSTRAIN_TOOLTIP)}},De={init:function(){this.setColour(de),this.appendValueInput("NUM",Number).appendField(Rt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Rt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Rt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Ne={init:function(){this.setColour(de),this.appendDummyInput().appendField(new Rt.FieldTextInput("0",Rt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Rt.Msg.MATH_NUMBER_TOOLTIP)}},Le={init:function(){this.setColour(de),this.appendValueInput("NUM").setCheck(Number).appendField(Rt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},fe={init:function(){this.setColour(de),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Rt.Msg.MATH_ROUND).appendField(Rt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Rt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MATH_ROUND_NEW_TOOLTIP)}},Fe={init:function(){var t=[[Rt.Msg.MIXLY_TO_INT,"int"],[Rt.Msg.MIXLY_TO_FLOAT,"float"],[Rt.Msg.MIXLY_TO_BITES,"b"],[Rt.Msg.LANG_MATH_BYTE+Rt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(de),this.appendValueInput("VAR").appendField(new Rt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Rt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Rt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Rt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ve={init:function(){var t=[[Rt.Msg.MIXLY_TO_INT,"int"],[Rt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(de),this.appendValueInput("VAR").appendField(new Rt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Rt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Rt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},Pe=De,Ve={init:function(){this.setColour(de),this.appendValueInput("VAR").appendField(Rt.Msg.LANG_MATH_BYTE+Rt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},ye={init:function(){this.setColour(de),this.itemCount_=1,this.setMutator(new Rt.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(Rt.Msg.MIXLY_PRODUCT+Rt.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(Rt.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(Rt.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(Rt.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const xe={init:function(){this.setColour(ke),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Rt.FieldTextInput("",Rt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new Rt.FieldImage(e,7,12,'"')}},Ue={init:function(){this.setColour(ke),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Rt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},He={init:function(){this.setColour(ke),this.appendValueInput("VAR").setCheck(Number).appendField(Rt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Be={init:function(){this.setColour(ke),this.appendValueInput("VAR").setCheck(String).appendField(Rt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},we={init:function(){this.setColour(ke),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},We={init:function(){this.setColour(ke),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},Ke={init:function(){this.WHERE_OPTIONS=[[Rt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Rt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Rt.Msg.TEXT_GET_INDEX_RANDOM+1+Rt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Rt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Rt.Msg.LISTS_GET_INDEX_GET,"MODE"),Rt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Rt.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=Rt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=Rt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=Rt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=Rt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+Rt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Rt.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:Rt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Rt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Rt.Msg.TEXT_GET_INDEX_RANDOM};return Rt.Msg.PROCEDURES_DEFRETURN_RETURN+Rt.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+Rt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==Rt.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),Rt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Rt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new Rt.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),Rt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},je={init:function(){this.setHelpUrl(Rt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Rt.Msg.LISTS_GET_INDEX_GET+" "+Rt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Rt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Rt.Msg.PROCEDURES_DEFRETURN_RETURN+Rt.Msg.MIXLY_MICROBIT_TYPE_STRING+Rt.Msg.LISTS_GET_INDEX_FROM_START+"n"+Rt.Msg.TEXT_CHARAT2)}},Qe={init:function(){this.setHelpUrl(Rt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Rt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Rt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},qe={init:function(){this.WHERE_OPTIONS_1=[[Rt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Rt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Rt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Rt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Rt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Rt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Rt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(Rt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==Rt.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==Rt.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),Rt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(Rt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new Rt.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Je={init:function(){this.setHelpUrl(Rt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Rt.Msg.LISTS_GET_INDEX_GET+" "+Rt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Rt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Rt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Rt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},ze={init:function(){var t=[[Rt.Msg.MIXLY_EQUALS,"==="],[Rt.Msg.MIXLY_STARTSWITH,"startswith"],[Rt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(ke),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Rt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Ze={init:function(){this.setColour(ke),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Rt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_COMPARETO_HELP)}},$e={init:function(){var t=[[Rt.Msg.TEXT_UPPER,"upper"],[Rt.Msg.TEXT_TITLE,"title"],[Rt.Msg.TEXT_CAPITALIZE,"capitalize"],[Rt.Msg.TEXT_SWAPCASE,"swapcase"],[Rt.Msg.TEXT_LOWER,"lower"]];this.setColour(ke),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Rt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:Rt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Rt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Rt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Rt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Rt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},ti={init:function(){var t=[[Rt.Msg.TEXT_LJUST,"ljust"],[Rt.Msg.TEXT_CENTER,"center"],[Rt.Msg.TEXT_RJUST,"rjust"]];this.setColour(ke),this.appendValueInput("VAR").appendField(new Rt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Rt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Rt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},ei={init:function(){this.setColour(ke),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Rt.Msg.MIXLY_MID+Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Rt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ii={init:function(){this.setColour(ke),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Rt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},ni={init:function(){this.setColour(ke),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Rt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Rt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},si={init:function(){this.setColour(ke),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Rt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Rt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Rt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},oi={init:function(){var t=[[Rt.Msg.TEXT_TRIM_BOTH,"strip"],[Rt.Msg.TEXT_TRIM_LEFT,"lstrip"],[Rt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(ke),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Rt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Rt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(Rt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:Rt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Rt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Rt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},pi={init:function(){this.setColour(ke),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Rt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Rt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},nn={init:function(){this.setColour(tn),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},sn={init:function(){this.setColour(tn),this.appendDummyInput().appendField(Rt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},on={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_KEYS),this.setTooltip(Rt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},pn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Rt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Rt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Rt.Msg.DICTS_GET_TOOLTIP)}},un={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Rt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Rt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Rt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Rt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},an={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Rt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Rt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},ln={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Rt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Rt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_DELETE_TOOLTIP)}},_n={init:function(){this.setColour(tn),this.appendValueInput("DICT2").setCheck("Dict").appendField(Rt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Rt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MID),this.setTooltip(Rt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},rn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_CLEAR),this.setTooltip(Rt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_ITEMS),this.setTooltip(Rt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},In={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_VALUES),this.setTooltip(Rt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Tn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_LENGTH),this.setTooltip(Rt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},hn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.DICT_DELDICT),this.setTooltip(Rt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mn={init:function(){this.MODE=[[Rt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Rt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Rt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Rt.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=Rt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=Rt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==Rt.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new Rt.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},On={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Rt.Msg.DICTS_ADD_VALUE),this.setTooltip(Rt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},cn={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Rt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Rt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Rn={init:function(){this.setColour(tn),this.appendDummyInput("").appendField(new Rt.FieldLabel(Rt.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new Rt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Mn={init:function(){this.setColour(tn),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},En={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_TO_JSON),this.setTooltip(Rt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Cn={init:function(){this.setColour(tn),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Rt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},An={init:function(){this.setColour(tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},gn={init:function(){this.setColour(tn),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_TO_JSON),this.setTooltip(Rt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Sn=210,Dn={init:function(){var t=Rt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Sn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Rt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:Rt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Rt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Rt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Rt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Rt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Rt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},Nn={init:function(){var t=Rt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=Rt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Sn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Rt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new Rt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Ln={init:function(){var t=[[Rt.Msg.LOGIC_OPERATION_AND,"AND"],[Rt.Msg.LOGIC_OPERATION_OR,"OR"],[Rt.Msg.LOGIC_OPERATION_NOR,"NOR"],[Rt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Sn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Rt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:Rt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Rt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Rt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Rt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},fn={init:function(){this.setColour(Sn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Rt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Rt.Msg.LOGIC_NEGATE_TOOLTIP)}},Fn={init:function(){var t=[[Rt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Rt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Sn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Rt.FieldDropdown(t),"BOOL"),this.setTooltip(Rt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},vn={init:function(){this.setColour(Sn),this.setOutput(!0),this.appendDummyInput().appendField(Rt.Msg.LOGIC_NULL),this.setTooltip(Rt.Msg.LOGIC_NULL_TOOLTIP)}},Pn={init:function(){this.setColour(Sn),this.appendValueInput("A"),this.appendValueInput("B").appendField(Rt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Rt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},Vn={init:function(){var t=[[Rt.Msg.TEXT_APPEND_TO,"in"],[Rt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Sn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Rt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(Rt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Rt.Msg.IN)}},yn={init:function(){var t=[[Rt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Rt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Sn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Rt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},Yn={init:function(){this.setColour(Sn),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Rt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},bn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Rt.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},kn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.MIXLY_USE,n=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Rt.Msg.MIXLY_BELONG;return i+{r:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Xn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.MIXLY_USE,n=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Rt.Msg.MIXLY_BELONG,p=Rt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+p}))}},Gn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Rt.Msg.MIXPY_TEXT_ENCODE).appendField(new Rt.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.MIXLY_USE,n=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Rt.Msg.MIXLY_BELONG,p=Rt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+p}))}},xn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Rt.Msg.MIXLY_MICROBIT_TYPE_STRING+Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MICROBIT_PYTHON_TYPE)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Rt.Msg.HTML_FILE),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Kn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},jn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Qn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},qn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Jn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},zn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},Zn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},$n={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Rt.Msg.MIXLY_ESP32_SET+{mkdir:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},ts={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Rt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},es={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},is={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.HTML_FILE,"isfile"],[Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},ns={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Rt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_SETUP+Rt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Rt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ss={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Rt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},os={init:function(){var t=Rt.Procedures.findLegalName("",this),e=new Rt.FieldTextInput(t,Rt.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new Rt.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Rt.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Rt.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(Rt.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(Rt.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(Rt.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=Rt.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),Rt.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{Rt.Events.enable()}},mutationToDom:function(t){var e=Rt.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(Rt.Msg.MIXLY_AIP_ATTR).setAlign(Rt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$s={init:function(){this.setColour(js),this.appendDummyInput().appendField(Rt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},to={init:function(){this.setColour(js),this.appendDummyInput().appendField(Rt.Msg.HTML_FORM_CONTENT).appendField(new Rt.FieldDropdown([[Rt.Msg.HTML_TEXT,"text"],[Rt.Msg.HTML_EMAIL,"email"],[Rt.Msg.HTML_NUMBER,"number"],[Rt.Msg.HTML_PASSWORD,"password"],[Rt.Msg.HTML_CHECKBOX,"checkbox"],[Rt.Msg.HTML_RADIOBUTTON,"radiobutton"],[Rt.Msg.HTML_BUTTON,"button"],[Rt.Msg.HTML_COLOUR,"colour"],[Rt.Msg.HTML_DATE,"date"],[Rt.Msg.HTML_LOCALTIME,"local time"],[Rt.Msg.HTML_FILE,"file"],[Rt.Msg.HTML_HIDDEN,"hidden"],[Rt.Msg.HTML_IMAGE,"image"],[Rt.Msg.HTML_MONTH,"month"],[Rt.Msg.HTML_RANGE,"range"],[Rt.Msg.HTML_RESET,"reset"],[Rt.Msg.HTML_SEARCH,"search"],[Rt.Msg.HTML_SUBMIT,"submit"],[Rt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Rt.Msg.HTML_TIME,"time"],[Rt.Msg.HTML_URL,"url"],[Rt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Rt.Msg.HTML_NAME).appendField(new Rt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Rt.Msg.HTML_VALUE).appendField(new Rt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Rt.Msg.MIXLY_AIP_ATTR).setAlign(Rt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},eo={init:function(){this.setColour(js),this.appendDummyInput().appendField(new Rt.FieldTextInput("property"),"KEY").appendField(":").appendField(new Rt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},io={init:function(){this.setColour(js),this.appendDummyInput().appendField(new Rt.FieldTextInput("property"),"KEY").appendField(":").appendField(new Rt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},no={init:function(){this.setColour(js),this.appendDummyInput().appendField(Rt.Msg.HTML_TEXT).appendField(new Rt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},so=160,oo={init:function(){this.setColour(so),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Rt.FieldTable(""),"TEXT")}},po={init:function(){this.setColour(so),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Rt.FieldMultilineInput(""),"TEXT")}},uo={init:function(){this.setColour(so),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Rt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},ao={init:function(){this.setColour(so),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},lo={init:function(){this.setColour(so),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Rt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},_o={init:function(){this.setColour(so),this.appendValueInput("VALUE").appendField(Rt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},ro={init:function(){this.setColour(so),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Rt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Rt.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=Rt.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+l()+"("+t+", "+e+", "+i+")"},Rt.isNumber(n)&&Rt.isNumber(s)&&Rt.isNumber(o))n=parseFloat(n),s=parseFloat(s),o=Math.abs(parseFloat(o)),0==n%1&&0==s%1&&0==o%1?(n<=s?(s++,t=0==n&&1==o?s:n+", "+s,1!=o&&(t+=", "+o)):t=n+", "+--s+", -"+o,t="range("+t+")"):(t=n",GTE:">="};const pa=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",o=e.valueToCode(this,"B",n)||"False";if("AND"==i)var p=s+" and "+o;else if("OR"==i)p=s+" or "+o;else if("NOR"==i)p="not("+s+"^"+o+")";else p=s+"^"+o;return[p,n]},ua=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},aa=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},la=function(t,e){return["None",e.ORDER_ATOMIC]},_a=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},ra=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},da=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},Ia=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Ta=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},ha=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},ma=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Oa=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ca=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Ra=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},Ma=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ea=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ca=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Aa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},ga=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Sa=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Da=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Na=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},La=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},fa=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},Fa=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},va=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Pa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Va=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},ya=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},Ya=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},ba=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},ka=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),Rt.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var o=[],p=0;p\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},cl=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Rl=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},Ml=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},El=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Cl=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Al=function(t,e){return'"},gl=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Sl=function(){return this.getFieldValue("TEXT")+"\n"},Dl=function(t){return t.getFieldValue("TEXT")+"\n"},Nl=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Ll=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},fl=function(){return""},Fl=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},vl=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+i.join("\n")+n.join("\n")+p.join("\n")+u.join("")+t+"while True:\n"+a.join("")+l.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+p.join("\n")+u.join("")+t+l.join("\n")},Yl.scrubNakedValue=function(t){return t+"\n"},Yl.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},Yl.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Yl.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Rt.utils.string.wrap(o,Yl.COMMENT_WRAP-3),n+=Yl.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const bl=100,kl={init:function(){this.setColour(bl),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_SERVO).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SERVO_MOVE)}},Xl={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["1","1"],["2","2"]]),"op"),this.setOutput(!0)}},Gl={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_ESP32_ON,"1"],[Rt.Msg.MIXLY_ESP32_OFF,"0"],[Rt.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},xl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_SETTING).appendField(Rt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Rt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},Ul={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Rt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Hl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_SETTING).appendField(Rt.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(Rt.Msg.MIXLY_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Bl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Rt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Rt.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_LED_SETONOFF)}},wl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(Rt.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(Rt.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_LED_GETONOFF)}},Wl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(Rt.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(Rt.Msg.MIXLY_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_LED_SETBRIGHT)}},Kl={init:function(){this.setColour(bl),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_TONE).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(Rt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},jl={init:function(){this.setColour(bl),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_TONE).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(Rt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Rt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Ql={init:function(){this.setColour(bl),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_NOTONE).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ql={init:function(){this.setColour(bl),this.appendValueInput("TICKS").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Rt.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Rt.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},Jl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},zl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_RESET)}},Zl={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Rt.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},$l={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(Rt.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(Rt.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},t_={init:function(){this.setColour(bl),this.appendDummyInput().appendField(Rt.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},e_={init:function(){this.setColour(bl),this.appendValueInput("LIST").appendField(Rt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},i_={init:function(){this.setColour(bl),this.appendValueInput("LIST").appendField(Rt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.appendValueInput("PIN").setCheck(Number).appendField(Rt.Msg.MIXLY_PIN),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},n_={init:function(){this.setColour(bl),this.appendValueInput("LIST").appendField(Rt.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.appendValueInput("PIN").setCheck(Number).appendField(Rt.Msg.MIXLY_PIN),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_MIXGO_MUSIC_PLAY_TONE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_PLAYSHOW)}},s_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(Rt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.MIXLY_RGB_PIN_COUNT)}},o_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_RGB_NUM_R_G_B)}},p_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_WRI)}},u_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_RGB_NUM_R_G_B)}},a_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_RGB_NUM_R_G_B)}},l_={init:function(){this.setColour(bl),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RGB),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_WRI)}},__=Bl,r_=wl,d_=Wl,I_="#2FAD7A",T_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_TERMINAL_WIDGET_VPIN_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_TERMINAL_WIDGET_VPIN_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_TERMINAL_WIDGET_VPIN_MESSAGE0,args0:[{check:Number,type:"input_value",name:"virtual_pin"}]})}},h_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_SYNC_VIRTUAL_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_SYNC_VIRTUAL_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_SYNC_VIRTUAL_MESSAGE0,args0:[{check:Number,type:"input_value",name:"virtual_pin"}]})}},m_={init:function(){this.jsonInit({inputsInline:!0,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_ON_DISCONNECTED_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_ON_DISCONNECTED_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_ON_DISCONNECTED_MESSAGE0}),this.appendStatementInput("DO").appendField(Rt.CONTROLS_REPEAT_INPUT_DO)}},O_={init:function(){this.jsonInit({inputsInline:!0,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_ON_CONNECTED_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_ON_CONNECTED_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_ON_CONNECTED_MESSAGE0}),this.appendStatementInput("DO").appendField(Rt.CONTROLS_REPEAT_INPUT_DO)}},c_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNKTIMER_RUN_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNKTIMER_RUN_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNKTIMER_RUN_MESSAGE0})}},R_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_RUN_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_RUN_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_RUN_MESSAGE0})}},M_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_APP_NOTIFY_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_APP_NOTIFY_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_APP_NOTIFY_MESSAGE0,args0:[{check:String,type:"input_value",name:"notification"}]})}},E_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_STOP_TIMERS_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNKTIMER_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_STOP_TIMERS_MESSAGE0,args0:[{check:Number,type:"input_value",name:"timer_num"}]})}},C_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_SET_PROPERTY_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_SET_PROPERTY_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_SET_PROPERTY_MESSAGE0,args0:[{check:String,type:"input_value",name:"attribute_name"},{type:"input_value",name:"attribute_value"}]})}},A_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_EMAIL_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_EMAIL_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_EMAIL_MESSAGE0,args0:[{check:String,type:"input_value",name:"TargetEmail"},{check:String,type:"input_value",name:"subject"},{check:String,type:"input_value",name:"body"}]})}},g_={init:function(){this.jsonInit({inputsInline:!0,output:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_GET_TIMERS_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_GET_TIMERS_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_GET_TIMERS_MESSAGE0})}},S_={init:function(){this.jsonInit({message0:Rt.Msg.MPYTHON_BLYNKTIMER_MESSAGE0,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNKTIMER_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNKTIMER_TOOLTIP,args0:[{check:Number,type:"input_value",name:"Num"},{options:[[Rt.Msg.MIXLY_PYTHON_PERIODIC,"False"],[Rt.Msg.MIXLY_PYTHON_ONE_SHOT,"True"]],type:"field_dropdown",name:"Timer_mode"},{check:Number,type:"input_value",name:"period"}]}),this.appendStatementInput("DO").appendField(Rt.CONTROLS_REPEAT_INPUT_DO)}},D_={init:function(){this.jsonInit({inputsInline:!0,nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_SENSOR_DATA_TO_APP_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_SENSOR_DATA_TO_APP_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_SENSOR_DATA_TO_APP_MESSAGE0,args0:[{type:"input_value",name:"sensor_data"},{check:Number,type:"input_value",name:"virtual_pin"}]})}},N_={init:function(){this.jsonInit({inputsInline:!0,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_APP_DATA_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_SENSOR_DATA_TO_APP_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_APP_DATA_MESSAGE0,args0:[{check:Number,type:"input_value",name:"virtual_pin"},{type:"input_value",name:"virtual_pin_val"}]}),this.appendStatementInput("DO").appendField(Rt.CONTROLS_REPEAT_INPUT_DO)}},L_={init:function(){this.jsonInit({nextStatement:null,previousStatement:null,colour:I_,helpUrl:Rt.Msg.MPYTHON_BLYNK_SETUP_HELPURL,tooltip:Rt.Msg.MPYTHON_BLYNK_SETUP_TOOLTIP,message0:Rt.Msg.MPYTHON_BLYNK_SETUP_MESSAGE0,args0:[{type:"input_dummy"},{check:String,type:"input_value",name:"server"},{check:Number,type:"input_value",name:"port"},{check:String,type:"input_value",name:"auth"}]})}},f_=120,F_={init:function(){this.setColour(f_),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Rt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT).appendField(new Rt.FieldDropdown(F_.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Rt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Rt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))},OPERATORS:[[Rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]]},v_={init:function(){this.setColour(f_);var t=new Rt.FieldDropdown(v_.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Rt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Rt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}},OPERATORS:[[Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]]},P_="5BA5A5",V_={init:function(){this.appendValueInput("SUB").setCheck("var"),this.setColour(P_),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_LET2).appendField(new Rt.FieldDropdown(V_.OPERATORS),"OP"),this.appendValueInput("val").appendField(Rt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Rt.Msg.DISPLAY_IMAGE_LET,n=Rt.Msg.DISPLAY_IMAGE_LET2,s=Rt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Rt.Msg.MIXLY_UP,down:Rt.Msg.MIXLY_DOWN,left:Rt.Msg.MIXLY_LEFT,right:Rt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Rt.Msg.MIXLY_UP,"shift_up"],[Rt.Msg.MIXLY_DOWN,"shift_down"],[Rt.Msg.MIXLY_LEFT,"shift_left"],[Rt.Msg.MIXLY_RIGHT,"shift_right"]]},y_={init:function(){this.appendValueInput("SUB").setCheck("var"),this.setColour(P_),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Rt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Rt.FieldDropdown(y_.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Rt.Msg.MIXLY_MICROBIT_image_add,"-":Rt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Rt.Msg.MICROBIT_DISPLAY_UNION,"add"],[Rt.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Y_={init:function(){this.setColour(P_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Rt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Y_.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Rt.Msg.MIXLY_MICROBIT_IMAGE+{height:Rt.Msg.MIXLY_HEIGHT,width:Rt.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Rt.Msg.MIXLY_HEIGHT,"height"],[Rt.Msg.MIXLY_WIDTH,"width"]]},b_={init:function(){this.setColour(P_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RECT).appendField(new Rt.FieldDropdown(b_.STATUS),"OP"),this.jsonInit({message0:Rt.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_OLED_RECT)},STATUS:[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},k_={init:function(){this.setColour(P_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Rt.FieldDropdown(k_.STATUS),"OP"),this.jsonInit({message0:Rt.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},X_={init:function(){this.setColour(P_),this.appendValueInput("SUB").setCheck("var").appendField(Rt.Msg.MSG.catOLED),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_LET2).appendField(new Rt.FieldDropdown(X_.OPERATORS),"OP"),this.appendValueInput("val").appendField(Rt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Rt.Msg.DISPLAY_IMAGE_LET,n=Rt.Msg.DISPLAY_IMAGE_LET2,s=Rt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Rt.Msg.MIXLY_UP,down:Rt.Msg.MIXLY_DOWN,left:Rt.Msg.MIXLY_LEFT,right:Rt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Rt.Msg.MIXLY_UP,"shift_up"],[Rt.Msg.MIXLY_DOWN,"shift_down"],[Rt.Msg.MIXLY_LEFT,"shift_left"],[Rt.Msg.MIXLY_RIGHT,"shift_right"]]},G_="#569A98",x_={init:function(){this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Rt.inputs.Align.CENTRE).appendField(new Rt.FieldBitmap(x_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(32).fill(0)))},U_={init:function(){this.setColour(G_),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Rt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Rt.FieldDropdown(U_.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Rt.Msg.MIXLY_MICROBIT_image_add,"-":Rt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Rt.Msg.MICROBIT_DISPLAY_UNION,"add"],[Rt.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},H_={init:function(){this.setColour(G_),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_LET2).appendField(new Rt.FieldDropdown(H_.OPERATORS),"OP"),this.appendValueInput("val").appendField(Rt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_UNIT);Mt.Boards.getSelectedBoardKey();"Python ESP32-S3"===Mt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Rt.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Rt.Msg.DISPLAY_IMAGE_LET,n=Rt.Msg.DISPLAY_IMAGE_LET2,s=Rt.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:Rt.Msg.MIXLY_UP,shift_down:Rt.Msg.MIXLY_DOWN,shift_left:Rt.Msg.MIXLY_LEFT,shift_right:Rt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Rt.Msg.MIXLY_UP,"shift_up"],[Rt.Msg.MIXLY_DOWN,"shift_down"],[Rt.Msg.MIXLY_LEFT,"shift_left"],[Rt.Msg.MIXLY_RIGHT,"shift_right"]]},B_={init:function(){this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Rt.inputs.Align.CENTRE).appendField(new Rt.FieldBitmap(B_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},w_={init:function(){this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Rt.inputs.Align.CENTRE).appendField(new Rt.FieldBitmap(w_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},W_={init:function(){this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Rt.inputs.Align.CENTRE).appendField(new Rt.FieldBitmap(W_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},K_={init:function(){this.setColour(G_),this.appendDummyInput().appendField(Rt.Msg.OLED_SET_FONT).appendField(new Rt.FieldDropdown(K_.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+Rt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+Rt.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+Rt.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},j_={init:function(){this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Rt.inputs.Align.CENTRE).appendField(new Rt.FieldBitmap(j_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},Q_={init:function(){this.setColour(G_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new Rt.FieldDropdown(Q_.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[Rt.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[Rt.Msg.CLOCKWISE+"90"+Rt.Msg.blockpy_setheading_degree,"1"],[Rt.Msg.CLOCKWISE+"180"+Rt.Msg.blockpy_setheading_degree,"2"],[Rt.Msg.CLOCKWISE+"270"+Rt.Msg.blockpy_setheading_degree,"3"]]},q_={init:function(){this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Rt.inputs.Align.CENTRE).appendField(new Rt.FieldBitmap(q_.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(G_),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},J_=180,z_={colourOptions:["#f00","#000"],columns:2},Z_={init:function(){this.jsonInit({colour:J_,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.clear",message0:Rt.Msg.MIXLY_MICROBIT_Clear_display}),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Clear_display)}},$_={init:function(){this.setColour(J_),this.appendValueInput("x").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},tr={init:function(){this.setColour(J_),this.appendValueInput("x").setCheck(Number).appendField(Rt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},er={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(new Rt.FieldDropdown([[Rt.Msg.OLED_DRAWSTR_ONE_BY_ONE,"show"],[Rt.Msg.MIXLY_ESP32_MONITOR_SCROLL,"scroll"]]),"MODE").appendField(Rt.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.OLED_DRAWSTR;return{show:Rt.Msg.OLED_DRAWSTR_ONE_BY_ONE,scroll:Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING}[e]+i}))}},ir={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(new Rt.FieldDropdown([[Rt.Msg.OLED_DRAWSTR_ONE_BY_ONE,"show"],[Rt.Msg.MIXLY_ESP32_MONITOR_SCROLL,"scroll"]]),"MODE").appendField(Rt.Msg.OLED_DRAWSTR),this.appendValueInput("time").setCheck(Number).appendField(Rt.Msg.MIXLY_DELAY),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.OLED_DRAWSTR;return{show:Rt.Msg.OLED_DRAWSTR_ONE_BY_ONE,scroll:Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING}[e]+i}))}},nr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_MONITOR_SHOW_STATIC),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_MUSIC_SHOW_STATIC)}},sr={init:function(){this.setColour(J_),this.appendValueInput("PIN",String).setCheck("esp32_image").appendField(Rt.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.OLED_BITMAP)}},or={init:function(){this.jsonInit({colour:J_,InputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",tooltip:"Show the referenced image on the display.",message0:Rt.Msg.OLED_BITMAP,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"],["LEFT_ARROW","LEFT_ARROW"],["RIGHT_ARROW","RIGHT_ARROW"],["DRESS","DRESS"],["TRANSFORMERS","TRANSFORMERS"],["SCISSORS","SCISSORS"],["EXIT","EXIT"],["TREE","TREE"],["PACMAN","PACMAN"],["TARGET","TARGET"],["TSHIRT","TSHIRT"],["ROLLERSKATE","ROLLERSKATE"],["DUCK","DUCK"],["HOUSE","HOUSE"],["TORTOISE","TORTOISE"],["BUTTERFLY","BUTTERFLY"],["STICKFIGURE","STICKFIGURE"],["GHOST","GHOST"],["PITCHFORK","PITCHFORK"],["MUSIC_QUAVERS","MUSIC_QUAVERS"],["MUSIC_QUAVER","MUSIC_QUAVER"],["MUSIC_CROTCHET","MUSIC_CROTCHET"],["COW","COW"],["RABBIT","RABBIT"],["SQUARE_SMALL","SQUARE_SMALL"],["SQUARE","SQUARE"],["DIAMOND_SMALL","DIAMOND_SMALL"],["DIAMOND","DIAMOND"],["CHESSBOARD","CHESSBOARD"],["TRIANGLE_LEFT","TRIANGLE_LEFT"],["TRIANGLE","TRIANGLE"],["SNAKE","SNAKE"],["UMBRELLA","UMBRELLA"],["SKULL","SKULL"],["GIRAFFE","GIRAFFE"],["SWORD","SWORD"]],type:"field_dropdown"}]})}},pr={init:function(){this.jsonInit({colour:J_,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",message0:Rt.Msg.MIXLY_MICROBIT_Animate_images,args0:[{check:"List",type:"input_value",name:"images"},{type:"input_value",name:"delay"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"clear"}]}),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_delay+Rt.Msg.MIXLY_MICROBIT_Animate_images1)}},ur={init:function(){this.jsonInit({colour:J_,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.scroll",tooltip:"Scroll the referenced text across the display.",message0:Rt.Msg.MIXLY_MICROBIT_Scroll_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},ar={init:function(){this.setColour(J_),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_MICROBIT_Turn_on_display,"on"],[Rt.Msg.MIXLY_MICROBIT_Turn_off_display,"off"]]),"on_off").appendField(Rt.Msg.MIXLY_MICROBIT_monitor),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("on_off"),i=Rt.Msg.MIXLY_MICROBIT_monitor;return{on:Rt.Msg.MIXLY_MICROBIT_Turn_on_display,off:Rt.Msg.MIXLY_MICROBIT_Turn_off_display}[e]+i}))}},lr={init:function(){this.jsonInit({colour:J_,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.off",tooltip:"Turn off the display.",message0:Rt.Msg.MIXLY_MICROBIT_Turn_off_display})}},_r={init:function(){this.jsonInit({colour:J_,output:"Boolean",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.is_on",message0:Rt.Msg.MIXLY_MICROBIT_Display_is_on}),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Display_is_on1)}},rr={init:function(){this.jsonInit({colour:J_,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"],["LEFT_ARROW","LEFT_ARROW"],["RIGHT_ARROW","RIGHT_ARROW"],["DRESS","DRESS"],["TRANSFORMERS","TRANSFORMERS"],["SCISSORS","SCISSORS"],["EXIT","EXIT"],["TREE","TREE"],["PACMAN","PACMAN"],["TARGET","TARGET"],["TSHIRT","TSHIRT"],["ROLLERSKATE","ROLLERSKATE"],["DUCK","DUCK"],["HOUSE","HOUSE"],["TORTOISE","TORTOISE"],["BUTTERFLY","BUTTERFLY"],["STICKFIGURE","STICKFIGURE"],["GHOST","GHOST"],["PITCHFORK","PITCHFORK"],["MUSIC_QUAVERS","MUSIC_QUAVERS"],["MUSIC_QUAVER","MUSIC_QUAVER"],["MUSIC_CROTCHET","MUSIC_CROTCHET"],["COW","COW"],["RABBIT","RABBIT"],["SQUARE_SMALL","SQUARE_SMALL"],["SQUARE","SQUARE"],["DIAMOND_SMALL","DIAMOND_SMALL"],["DIAMOND","DIAMOND"],["CHESSBOARD","CHESSBOARD"],["TRIANGLE_LEFT","TRIANGLE_LEFT"],["TRIANGLE","TRIANGLE"],["SNAKE","SNAKE"],["UMBRELLA","UMBRELLA"],["SKULL","SKULL"],["GIRAFFE","GIRAFFE"],["SWORD","SWORD"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:Rt.Msg.MIXLY_MICROBIT_Built_in_image1,message0:Rt.Msg.MIXLY_MICROBIT_Built_in_image})}},dr={init:function(){this.jsonInit({colour:J_,args0:[{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"00"},{colour:"#000000",type:"field_colour",name:"01"},{colour:"#000000",type:"field_colour",name:"02"},{colour:"#000000",type:"field_colour",name:"03"},{colour:"#000000",type:"field_colour",name:"04"},{colour:"#000000",type:"field_colour",name:"05"},{colour:"#000000",type:"field_colour",name:"06"},{colour:"#000000",type:"field_colour",name:"07"},{colour:"#000000",type:"field_colour",name:"08"},{colour:"#000000",type:"field_colour",name:"09"},{colour:"#000000",type:"field_colour",name:"0a"},{colour:"#000000",type:"field_colour",name:"0b"},{colour:"#000000",type:"field_colour",name:"0c"},{colour:"#000000",type:"field_colour",name:"0d"},{colour:"#000000",type:"field_colour",name:"0e"},{colour:"#000000",type:"field_colour",name:"0f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"10"},{colour:"#000000",type:"field_colour",name:"11"},{colour:"#000000",type:"field_colour",name:"12"},{colour:"#000000",type:"field_colour",name:"13"},{colour:"#000000",type:"field_colour",name:"14"},{colour:"#000000",type:"field_colour",name:"15"},{colour:"#000000",type:"field_colour",name:"16"},{colour:"#000000",type:"field_colour",name:"17"},{colour:"#000000",type:"field_colour",name:"18"},{colour:"#000000",type:"field_colour",name:"19"},{colour:"#000000",type:"field_colour",name:"1a"},{colour:"#000000",type:"field_colour",name:"1b"},{colour:"#000000",type:"field_colour",name:"1c"},{colour:"#000000",type:"field_colour",name:"1d"},{colour:"#000000",type:"field_colour",name:"1e"},{colour:"#000000",type:"field_colour",name:"1f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"20"},{colour:"#000000",type:"field_colour",name:"21"},{colour:"#000000",type:"field_colour",name:"22"},{colour:"#000000",type:"field_colour",name:"23"},{colour:"#000000",type:"field_colour",name:"24"},{colour:"#000000",type:"field_colour",name:"25"},{colour:"#000000",type:"field_colour",name:"26"},{colour:"#000000",type:"field_colour",name:"27"},{colour:"#000000",type:"field_colour",name:"28"},{colour:"#000000",type:"field_colour",name:"29"},{colour:"#000000",type:"field_colour",name:"2a"},{colour:"#000000",type:"field_colour",name:"2b"},{colour:"#000000",type:"field_colour",name:"2c"},{colour:"#000000",type:"field_colour",name:"2d"},{colour:"#000000",type:"field_colour",name:"2e"},{colour:"#000000",type:"field_colour",name:"2f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"30"},{colour:"#000000",type:"field_colour",name:"31"},{colour:"#000000",type:"field_colour",name:"32"},{colour:"#000000",type:"field_colour",name:"33"},{colour:"#000000",type:"field_colour",name:"34"},{colour:"#000000",type:"field_colour",name:"35"},{colour:"#000000",type:"field_colour",name:"36"},{colour:"#000000",type:"field_colour",name:"37"},{colour:"#000000",type:"field_colour",name:"38"},{colour:"#000000",type:"field_colour",name:"39"},{colour:"#000000",type:"field_colour",name:"3a"},{colour:"#000000",type:"field_colour",name:"3b"},{colour:"#000000",type:"field_colour",name:"3c"},{colour:"#000000",type:"field_colour",name:"3d"},{colour:"#000000",type:"field_colour",name:"3e"},{colour:"#000000",type:"field_colour",name:"3f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"40"},{colour:"#000000",type:"field_colour",name:"41"},{colour:"#000000",type:"field_colour",name:"42"},{colour:"#000000",type:"field_colour",name:"43"},{colour:"#000000",type:"field_colour",name:"44"},{colour:"#000000",type:"field_colour",name:"45"},{colour:"#000000",type:"field_colour",name:"46"},{colour:"#000000",type:"field_colour",name:"47"},{colour:"#000000",type:"field_colour",name:"48"},{colour:"#000000",type:"field_colour",name:"49"},{colour:"#000000",type:"field_colour",name:"4a"},{colour:"#000000",type:"field_colour",name:"4b"},{colour:"#000000",type:"field_colour",name:"4c"},{colour:"#000000",type:"field_colour",name:"4d"},{colour:"#000000",type:"field_colour",name:"4e"},{colour:"#000000",type:"field_colour",name:"4f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"50"},{colour:"#000000",type:"field_colour",name:"51"},{colour:"#000000",type:"field_colour",name:"52"},{colour:"#000000",type:"field_colour",name:"53"},{colour:"#000000",type:"field_colour",name:"54"},{colour:"#000000",type:"field_colour",name:"55"},{colour:"#000000",type:"field_colour",name:"56"},{colour:"#000000",type:"field_colour",name:"57"},{colour:"#000000",type:"field_colour",name:"58"},{colour:"#000000",type:"field_colour",name:"59"},{colour:"#000000",type:"field_colour",name:"5a"},{colour:"#000000",type:"field_colour",name:"5b"},{colour:"#000000",type:"field_colour",name:"5c"},{colour:"#000000",type:"field_colour",name:"5d"},{colour:"#000000",type:"field_colour",name:"5e"},{colour:"#000000",type:"field_colour",name:"5f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"60"},{colour:"#000000",type:"field_colour",name:"61"},{colour:"#000000",type:"field_colour",name:"62"},{colour:"#000000",type:"field_colour",name:"63"},{colour:"#000000",type:"field_colour",name:"64"},{colour:"#000000",type:"field_colour",name:"65"},{colour:"#000000",type:"field_colour",name:"66"},{colour:"#000000",type:"field_colour",name:"67"},{colour:"#000000",type:"field_colour",name:"68"},{colour:"#000000",type:"field_colour",name:"69"},{colour:"#000000",type:"field_colour",name:"6a"},{colour:"#000000",type:"field_colour",name:"6b"},{colour:"#000000",type:"field_colour",name:"6c"},{colour:"#000000",type:"field_colour",name:"6d"},{colour:"#000000",type:"field_colour",name:"6e"},{colour:"#000000",type:"field_colour",name:"6f"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"70"},{colour:"#000000",type:"field_colour",name:"71"},{colour:"#000000",type:"field_colour",name:"72"},{colour:"#000000",type:"field_colour",name:"73"},{colour:"#000000",type:"field_colour",name:"74"},{colour:"#000000",type:"field_colour",name:"75"},{colour:"#000000",type:"field_colour",name:"76"},{colour:"#000000",type:"field_colour",name:"77"},{colour:"#000000",type:"field_colour",name:"78"},{colour:"#000000",type:"field_colour",name:"79"},{colour:"#000000",type:"field_colour",name:"7a"},{colour:"#000000",type:"field_colour",name:"7b"},{colour:"#000000",type:"field_colour",name:"7c"},{colour:"#000000",type:"field_colour",name:"7d"},{colour:"#000000",type:"field_colour",name:"7e"},{colour:"#000000",type:"field_colour",name:"7f"}],output:"esp32_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image",message0:Rt.Msg.MIXLY_ESP32_Create_image}),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_Create_image1)}},Ir={init:function(){this.setColour(J_),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(Rt.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_LET2).appendField(new Rt.FieldDropdown(Ir.OPERATORS),"OP"),this.appendValueInput("val").appendField(Rt.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Rt.Msg.DISPLAY_IMAGE_LET,n=Rt.Msg.DISPLAY_IMAGE_LET2,s=Rt.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Rt.Msg.MIXLY_UP,down:Rt.Msg.MIXLY_DOWN,left:Rt.Msg.MIXLY_LEFT,right:Rt.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Rt.Msg.MIXLY_UP,"up"],[Rt.Msg.MIXLY_DOWN,"down"],[Rt.Msg.MIXLY_LEFT,"left"],[Rt.Msg.MIXLY_RIGHT,"right"]]},Tr={init:function(){this.setColour(J_),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Rt.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Rt.FieldDropdown(Tr.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Rt.Msg.MIXLY_MICROBIT_image_add,"-":Rt.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Rt.Msg.MICROBIT_DISPLAY_UNION,"+"],[Rt.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},hr={init:function(){this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.OLED_DRAWSTR_ONE_BY_ONE,"show"],[Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING,"scroll"]]),"MODE"),this.jsonInit({colour:J_,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",tooltip:"Display the list of images as an animation with a certain delay between each frame. Indicate if you need to wait before continuing, continuously loop the animation and clear the display when finished.",message0:Rt.Msg.MIXLY_MICROBIT_SHOW_STRING,args0:[{check:String,type:"input_value",name:"images"},{type:"input_value",name:"delay"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"clear"}]}),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Rt.Msg.OLED_DRAWSTR;return Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_delay+{show:Rt.Msg.OLED_DRAWSTR_ONE_BY_ONE,scroll:Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING}[e]+i}))}},mr={init:function(){this.setColour(J_),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(Rt.Msg.MIXLY_LCD_PRINT1),this.appendValueInput("TEXT2",String).setCheck([String,Number]).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_LCD_PRINT2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.MIXLY_LCD_PRINT4_TOOLTIP)}},Or={init:function(){this.setColour(J_),this.appendValueInput("device").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_SETUP).appendField(Rt.Msg.MIXLY_DF_LCD).appendField("1602").appendField("mylcd").appendField(Rt.Msg.MIXLY_LCD_ADDRESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_SETUP+Rt.Msg.MIXLY_DF_LCD+Rt.Msg.MIXLY_LCD_ADDRESS)}},cr={init:function(){this.setColour(J_),this.appendValueInput("row",Number).setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(Rt.Msg.MIXLY_LCD_ROW),this.appendValueInput("column",Number).setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_LCD_COLUMN),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_LCD_PRINT),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.MIXLY_LCD_PRINT3_TOOLTIP)}},Rr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_ON,"on()"],[Rt.Msg.MIXLY_OFF,"off()"],[Rt.Msg.MIXLY_LCD_STAT_CLEAR,"clear()"],[Rt.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(off)"],[Rt.Msg.MIXLY_LCD_BACKLIGHT,"backlight(on)"]]),"STAT"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);var t=this;this.setTooltip((function(){var e=t.getFieldValue("STAT");return Rt.Msg.LISTS_SET_INDEX_SET+Rt.Msg.MIXLY_DF_LCD+{"on()":Rt.Msg.MIXLY_ON,"off()":Rt.Msg.MIXLY_OFF,"clear()":Rt.Msg.MIXLY_LCD_STAT_CLEAR,"backlight(off)":Rt.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(on)":Rt.Msg.MIXLY_LCD_BACKLIGHT}[e]}))}},Mr={init:function(){this.setColour(J_),this.appendValueInput("I2CSUB").appendField(Rt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendValueInput("row").appendField(Rt.Msg.MIXLY_SETUP+Rt.Msg.LISTS_SET_INDEX_INPUT_TO+"OLED").setCheck(Number),this.appendValueInput("column").appendField("X").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip()}},Er={init:function(){this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendValueInput("Text_line1","String").setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.OLEDDISPLAY+Rt.Msg.line1),this.appendValueInput("Text_line2","String").setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.line2),this.appendValueInput("Text_line3","String").setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.line3),this.appendValueInput("Text_line4","String").setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.line4),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(J_),this.setTooltip(Rt.Msg.MIXLY_DF_LCD+Rt.Msg.OLEDDISPLAY+Rt.Msg.MIXLY_MICROBIT_TYPE_STRING)}},Cr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Rt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Cr.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Rt.Msg.MIXLY_MICROBIT_IMAGE+{height:Rt.Msg.MIXLY_HEIGHT,width:Rt.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Rt.Msg.MIXLY_HEIGHT,"height"],[Rt.Msg.MIXLY_WIDTH,"width"]]},Ar={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RECT).appendField(new Rt.FieldDropdown(Ar.STATUS),"OP"),this.jsonInit({message0:Rt.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_OLED_RECT)},STATUS:[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},gr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_DISPLAY_DRAW).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_DISPLAY_RLINE,"hline"],[Rt.Msg.MIXLY_DISPLAY_VLINE,"vline"]]),"direction"),this.jsonInit({message0:Rt.Msg.MIXLY_MICROBIT_SHOW_LINE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"length"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.MIXLY_OLED_LINE)}},Sr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.jsonInit({message0:Rt.Msg.MIXLY_MICROBIT_SHOW_LINE_ARBITRARILY,args0:[{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.MIXLY_OLED_LINE_ARBIT)}},Dr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Nr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_MONITOR_GET_SCREEN_IMAGE),this.setInputsInline(!0),this.setOutput(!0,"esp32_image"),this.setTooltip(Rt.Msg.MIXLY_ESP32_MONITOR_GET_SCREEN_IMAGE_TOOLTIP)}},Lr={init:function(){this.setColour(J_),this.appendValueInput("x").setCheck(Number).appendField(Rt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS)}},fr={init:function(){this.setColour(J_),this.appendValueInput("x").setCheck(Number).appendField(Rt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BLINK_RATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_JS_MONITOR_SET_BLINK_RATE)}},Fr={init:function(){this.setColour(J_),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_RGB_NUM),this.appendDummyInput("").appendField(Rt.Msg.LISTS_SET_INDEX_SET+Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS).appendField(new Rt.FieldColour("#f00",null,z_),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_RGB_NUM_R_G_B)}},vr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(Rt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_OR_ANIMATION),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.OLED_BITMAP_OR_STRING)}},Pr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Vr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(Rt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_OR_ANIMATION),this.appendValueInput("time").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},yr={init:function(){this.setColour(J_),this.appendValueInput("data").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("time").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},Yr={init:function(){this.setColour(J_),this.appendDummyInput("").appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_ESP32_ON,"ON"],[Rt.Msg.MIXLY_ESP32_OFF,"OFF"]]),"ONOFF"),this.setOutput(!0,Boolean),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},br={init:function(){this.setColour(J_),this.appendValueInput("SUB"),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_LCD_STAT_CLEAR,"0"],[Rt.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL,"1"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i={0:Rt.Msg.MIXLY_LCD_STAT_CLEAR,1:Rt.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL};return Rt.Msg.MIXLY_DF_LCD+i[e]}))}},kr={init:function(){this.setColour(J_),this.appendValueInput("I2CSUB").appendField(Rt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_SETUP+Rt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Rt.FieldDropdown([["TM1650","TM1650"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return Rt.Msg.MIXLY_ESP32_SENSOR_USE_I2C_TOOLTIP+{TM1650:"TM1650"}[e]}))}},Xr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_4DIGITDISPLAY).appendField(new Rt.FieldDropdown([["TM1650","tm1650"]]),"TYPE"),this.appendValueInput("VAR"),this.appendDummyInput().appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_ON,"_on"],[Rt.Msg.MIXLY_OFF,"_off"],[Rt.Msg.MIXLY_LCD_STAT_CLEAR,"_clear"]]),"STAT"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_4digitdisplay_power)}},Gr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_4DIGITDISPLAY).appendField(new Rt.FieldDropdown([["TM1650","tm1650"]]),"TYPE"),this.appendValueInput("VAR"),this.appendValueInput("VALUE").setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_NUMBER),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},xr={init:function(){this.setColour(J_),this.appendDummyInput().appendField(Rt.Msg.MIXLY_4DIGITDISPLAY).appendField(new Rt.FieldDropdown([["TM1650","tm1650"]]),"TYPE"),this.appendValueInput("VAR"),this.appendValueInput("NO").appendField(Rt.Msg.MIXLY_4DIGITDISPLAY_NOMBER1),this.appendValueInput("STAT").appendField(Rt.Msg.MIXLY_4DIGITDISPLAY_NOMBER2+Rt.Msg.MIXLY_4DIGITDISPLAY_DOT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_4digitdisplay_showDot)}},Ur={init:function(){this.setColour(J_),this.setOutput(!0,"Tuple"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_DISPLAY_ANIMATE).appendField(new Rt.FieldDropdown(Ur.ANIMATE),"ANIMATION")},ANIMATE:[["ALL_CLOCKS","ALL_CLOCKS"],["ALL_ARROWS","ALL_ARROWS"]]},Hr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Rt.FieldDropdown(Hr.STATUS),"OP"),this.jsonInit({message0:Rt.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Br={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_DISPLAY_DRAW+Rt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new Rt.FieldDropdown(Br.STATUS),"OP"),this.jsonInit({message0:Rt.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Rt.Msg.MIXLY_DISPLAY_DRAW+Rt.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[Rt.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Rt.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},wr={init:function(){this.setColour("#555555"),this.appendDummyInput("").appendField(Rt.Msg.MIXGO_ONBOARDDISPLAY_HELP),this.setInputsInline(!0),this.setTooltip("")}},Wr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.OLED_BITMAP),this.appendValueInput("START_X",Number).appendField(Rt.Msg.OLED_START_X).setCheck(Number),this.appendValueInput("START_Y",Number).appendField(Rt.Msg.OLED_START_Y).setCheck(Number),this.appendValueInput("bitmap_name",String).appendField(Rt.Msg.OLED_BITMAP_NAME),this.appendValueInput("WIDTH",Number).appendField(Rt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("HEIGHT",Number).appendField(Rt.Msg.MIXLY_HEIGHT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.OLED_SHOW_BMP_TOOLTIP)}},Kr={init:function(){this.setColour(J_),this.appendValueInput("VAR").appendField(Rt.Msg.OLED),this.appendDummyInput("").appendField(Rt.Msg.OLED_DRAWPIXEL),this.appendValueInput("POS_X").appendField(Rt.Msg.OLED_POSX),this.appendValueInput("POS_Y").appendField(Rt.Msg.OLED_POSY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.OLED_DRAW_PIXE_TOOLTIP)}},jr={init:function(){this.setColour(J_),this.appendValueInput("I2CSUB").appendField(Rt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_SETUP+Rt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Rt.FieldDropdown([["32x12 Matrix","32x12 Matrix"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Qr={init:function(){this.setColour(J_),this.appendValueInput("SUB"),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(Rt.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.OLED_BITMAP_OR_STRING)}},qr={init:function(){this.setColour(J_),this.appendValueInput("SUB"),this.appendValueInput("data").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Jr="#526FC3",zr={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(Rt.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Rt.Msg.HTML_PASSWORD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},Zr={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"+Rt.Msg.TUPLE_JOIN),this.appendValueInput("CLIENT").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_CLIENT),this.appendValueInput("SERVER").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_SERVER),this.appendValueInput("USERNAME").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_USERNAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_PASSWORD),this.appendValueInput("TOPIC").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_TOPIC),this.appendValueInput("SUB").appendField(Rt.Msg.MIXLY_ESP32_ONENET_SUB),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_CONNECT_TOOLTIP)}},$r={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_DISCONNECT_TOOLTIP)}},td={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_CHECK_TOOLTIP)}},ed={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendValueInput("DICT").appendField(Rt.Msg.MIXLY_ESP32_PUBLISH_ONENET),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_IOT_ONENET_PRINT_DATA).appendField(new Rt.FieldCheckbox("TRUE"),"is_print"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_PUBLISH_DICT_TOOLTIP)}},id={init:function(){this.setColour(Jr),this.appendValueInput("VAR").setCheck("var").appendField("OneNET").setAlign(Rt.inputs.Align.RIGHT),this.appendDummyInput().appendField(new Rt.FieldLabel(Rt.Msg.MIXLY_ESP32_PUBLISH_ONENET),"TIP").setAlign(Rt.inputs.Align.RIGHT),this.itemCount_=2,this.updateShape_(),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Rt.icons.MutatorIcon(["iot_publish_item"],this)),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_PUBLISH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("iot_publish_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},nd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},sd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},od={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},pd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(Rt.Msg.MIXLY_EMQX_SERVER).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Rt.Msg.MIXLY_WIFI_USERNAME).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Rt.Msg.MIXLY_IOT_PASSWORD).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(Rt.Msg.MIXLY_EMQX_PROJECT).setAlign(Rt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ud={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Rt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Rt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Rt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},ad={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Rt.Msg.MIXLY_EMQX_SUBSCRIBE+Rt.Msg.MIXLY_MICROBIT_MSG).appendField(Rt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Rt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},ld={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_d={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},rd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Rt.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},Id={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Rt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},Td={init:function(){this.setColour(Jr),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},hd={init:function(){this.setColour(Jr),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},md={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},Od={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO").appendField(Rt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(Rt.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},cd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Rt.Msg.MIXLY_EMQX_SERVER).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Rt.Msg.CONTROLS_FOR_INPUT_WITH+Rt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(Rt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Rt.Msg.MIXLY_EMQX_SERVER).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Rt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(Rt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Md={init:function(){this.VISITOR_ID=Mt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(Jr),this.appendDummyInput("").appendField(new Rt.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},Ed={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MixIO").appendField(Rt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},Cd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("HTTP"+Rt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Rt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(Rt.Msg.MIXLY_REQUESTS_GET).appendField(Rt.Msg.MIXLY_GET_CURRENT_TIME).appendField(Rt.Msg.MIXLY_OPEN_DEBUG).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Rt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ad={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("HTTP"+Rt.Msg.MIXLY_Client).appendField(Rt.Msg.MIXLY_GET).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Rt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Rt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},gd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MQTT"+Rt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Rt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(Rt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(Rt.Msg.MQTT_Topic).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(Rt.Msg.MIXLY_OPEN_DEBUG).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Rt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Sd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("MQTT"+Rt.Msg.MIXLY_Client).appendField(Rt.Msg.MIXLY_GET).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Rt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Rt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},Dd=zr,Nd=Zr,Ld=$r,fd=td,Fd=id,vd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(Rt.Msg.MIXLY_EMQX_SERVER).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(Rt.Msg.MODEL_NAME).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(Rt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pd=vd,Vd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(Rt.Msg.MIXLY_EMQX_SERVER).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Rt.Msg.MIXLY_API_PRIVATE_KEY).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(Rt.Msg.MODEL_NAME).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(Rt.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(Rt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(Rt.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField(Rt.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(Rt.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(Rt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},bd={init:function(){this.setColour(Jr),this.appendDummyInput().appendField("Ollama "+Rt.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},kd=225,Xd={init:function(){this.appendValueInput("VAL"),this.setColour(kd),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Rt.FieldDropdown(Xd.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:Rt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Rt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Rt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[Rt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Rt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Rt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[Rt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},Gd="#3288dd",xd={init:function(){this.appendValueInput("VAL"),this.setColour(Gd),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Rt.FieldDropdown(xd.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[Rt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Rt.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[Rt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Rt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[Rt.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},Ud="#A58C5B",Hd={init:function(){this.setColour(Ud),this.appendValueInput("PIN",Number).appendField(new Rt.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Hd.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Rt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Rt.Msg.MIXLY_GETHUMIDITY,"humidity"]]},Bd=(Rt.Msg.PS2_TRIANGLE,Rt.Msg.PS2_CIRCLE,Rt.Msg.PS2_CROSS,Rt.Msg.PS2_SQUARE,Rt.Msg.PS2_L1,Rt.Msg.PS2_L2,Rt.Msg.PS2_R1,Rt.Msg.PS2_R2,Rt.Msg.PS2_UP,Rt.Msg.PS2_RIGHT,Rt.Msg.PS2_DOWN,Rt.Msg.PS2_LEFT,Rt.Msg.PS2_SELECT,Rt.Msg.PS2_START,{init:function(){this.setColour(Ud),this.appendDummyInput("").appendField(Rt.Msg.PS2_stick).appendField(new Rt.FieldDropdown(Bd.PSSTK),"psstk"),this.setOutput(!0,Number),this.setTooltip("")},PSSTK:[[Rt.Msg.PS2_RX,"0"],[Rt.Msg.PS2_RY,"1"],[Rt.Msg.PS2_LX,"2"],[Rt.Msg.PS2_LY,"3"]]}),wd={init:function(){this.setColour(Ud),this.appendValueInput("SUB").appendField(Rt.Msg.PS2),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_JOYSTICK).appendField(new Rt.FieldDropdown(wd.PSSTK),"psstk"),this.setOutput(!0,Number),this.setTooltip("")},PSSTK:[[Rt.Msg.PS2_RX,"RX"],[Rt.Msg.PS2_RY,"RY"],[Rt.Msg.PS2_LX,"LX"],[Rt.Msg.PS2_LY,"LY"]]},Wd=40,Kd={init:function(){this.setColour(Wd),this.appendValueInput("PIN",Number).appendField(new Rt.FieldDropdown([["DHT11","dht11"],["DHT22","dht22"]]),"TYPE").appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Kd.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Rt.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Rt.Msg.MIXLY_GETHUMIDITY,"relative_humidity"],[Rt.Msg.MIXLY_DHT11_T_H,"tempandhum"]]},jd=function(t,e){e.definitions_.import_music="import music";var i=e.valueToCode(this,"pitch",e.ORDER_ATOMIC);return"music.pitch("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+", "+i+")\n"},Qd=function(t,e){e.definitions_.import_music="import music";var i=e.valueToCode(this,"pitch",e.ORDER_ATOMIC),n=e.valueToCode(this,"time",e.ORDER_ATOMIC);return"music.pitch_time("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+", "+i+", "+n+")\n"},qd=function(t,e){return e.definitions_.import_music="import music","music.stop("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+")\n"},Jd=function(t,e){e.definitions_.import_music="import music";var i=e.valueToCode(this,"BPM",e.ORDER_ASSIGNMENT);return"music.set_tempo("+e.valueToCode(this,"TICKS",e.ORDER_ASSIGNMENT)+", "+i+")\n"},zd=function(t,e){e.definitions_.import_music="import music";return["music.get_tempo()",e.ORDER_ATOMIC]},Zd=function(t,e){return e.definitions_.import_music="import music","music.pitch("+e.valueToCode(this,"pitch",e.ORDER_ATOMIC)+")\n"},$d=function(t,e){return e.definitions_.import_music="import music","music.pitch_time("+e.valueToCode(this,"pitch",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"time",e.ORDER_ATOMIC)+")\n"},tI=function(t,e){e.definitions_.import_music="import music";return"music.stop()\n"},eI=function(t,e){return e.definitions_.import_music="import music","music.play("+e.valueToCode(this,"LIST",e.ORDER_ASSIGNMENT)+")\n"},iI=function(t,e){return e.definitions_.import_music="import music","music.play("+e.valueToCode(this,"LIST",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"PIN",e.ORDER_ASSIGNMENT)+")\n"},nI=function(t,e){return e.definitions_.import_music="import music",e.definitions_.import_matrix="import matrix","music.play_show("+e.valueToCode(this,"LIST",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"PIN",e.ORDER_ASSIGNMENT)+")\n"},sI=function(t,e){return e.definitions_.import_music="import music","music.reset()\n"},oI=function(t,e){return e.definitions_.import_servo="import servo",e.definitions_.import_machine="import machine","servo.servo_write_angle("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"DEGREE",e.ORDER_ATOMIC)+")\n"},pI=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},uI=function(t,e){return[this.getFieldValue("flag"),e.ORDER_ATOMIC]},aI=function(t,e){e.definitions_.import_mixgo="import mixgo";var i=e.valueToCode(this,"bright",e.ORDER_ATOMIC);return"mixgo.led("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+").setonoff("+i+")\n"},lI=function(t,e){return e.definitions_.import_mixgo="import mixgo",["mixgo.led("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+").getonoff()",e.ORDER_ATOMIC]},_I=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.led("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+").setbrightness("+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},rI=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.led"+e.valueToCode(this,"led",e.ORDER_ATOMIC)+".setonoff("+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},dI=function(t,e){return e.definitions_.import_mixgo="import mixgo",["mixgo.led"+e.valueToCode(this,"led",e.ORDER_ATOMIC)+".getonoff()",e.ORDER_ATOMIC]},II=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.led"+e.valueToCode(this,"led",e.ORDER_ATOMIC)+".setbrightness("+e.valueToCode(this,"bright",e.ORDER_ATOMIC)+")\n"},TI=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"PIN",e.ORDER_ATOMIC),s=e.valueToCode(this,"LEDCOUNT",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",e.definitions_.import_neopixel="import neopixel",i+" = neopixel.NeoPixel(machine.Pin("+n+"), "+s+", timing=True)\n"},hI=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_neopixel="import neopixel",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".write()\n"},mI=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_neopixel="import neopixel",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"["+e.valueToCode(this,"_LED_",e.ORDER_ATOMIC)+"] = ("+e.valueToCode(this,"RVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"GVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"BVALUE",e.ORDER_ATOMIC)+")\n"},OI=function(t,e){e.definitions_.import_mixgo="import mixgo";return"mixgo.rgb.write()\n"},cI=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.rgb["+e.valueToCode(this,"_LED_",e.ORDER_ATOMIC)+"] = ("+e.valueToCode(this,"RVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"GVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"BVALUE",e.ORDER_ATOMIC)+")\n"},RI=function(t,e){return e.definitions_.import_mixgo="import mixgo","mixgo.rgb.fill(("+e.valueToCode(this,"RVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"GVALUE",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"BVALUE",e.ORDER_ATOMIC)+"))\n"},MI=rI,EI=dI,CI=II,AI=function(t,e){var i=e.valueToCode(this,"virtual_pin",e.ORDER_ATOMIC);e.functions_["terminal_widget_vpin_"+i]=`\nALLOWED_COMMANDS_LIST = ['ls', 'lsusb', 'ip a', 'ip abc']\n\n@blynk.handle_event('write V${i}')\ndef write_handler(pin, _values):\n header = ''\n result = ''\n delimiter = '{}\\n'.format('=' * 30)\n if _values and _values[0] in ALLOWED_COMMANDS_LIST:\n cmd_params = _values[0].split(' ')\n try:\n result = subprocess.check_output(cmd_params).decode('utf-8')\n header = '[output]\\n'\n except subprocess.CalledProcessError as exe_err:\n header = '[error]\\n'\n result = 'Return Code: {}\\n'.format(exe_err.returncode)\n except Exception as g_err:\n print("Command caused '{}'".format(g_err))\n elif _values and _values[0] == 'help':\n header = '[help -> allowed commands]\\n'\n result = '{}\\n'.format('\\n'.join(ALLOWED_COMMANDS_LIST))\n\n # communicate with terminal if help or some allowed command\n if result:\n output = '{}{}{}{}'.format(header, delimiter, result, delimiter)\n print(output)\n blynk.virtual_write(pin, output)\n blynk.virtual_write(pin, '\\n')\n`;return""},gI=function(t,e){return"blynk.virtual_sync("+e.valueToCode(this,"virtual_pin",e.ORDER_ATOMIC)+")\n"},SI=function(t,e){var i=e.statementToCode(this,"DO");return i=e.addLoopTrap(i,this.id)||e.PASS,e.definitions_.blynk_on_disconnected="@blynk.handle_event(\"disconnect\")\ndef connect_handler():\n print('Blynk disconnected')\n"+i,""},DI=function(t,e){var i=e.statementToCode(this,"DO");return i=e.addLoopTrap(i,this.id)||e.PASS,e.definitions_.blynk_on_connected="@blynk.handle_event(\"connect\")\ndef connect_handler():\n print('Blynk connected')\n"+i,""},NI=function(){return"blynk_timer.run()\n"},LI=function(){return"blynk.run()\n"},fI=function(t,e){return"blynk.notify("+e.valueToCode(this,"notification",e.ORDER_ATOMIC)+")\n"},FI=function(t,e){e.definitions_.import_blynktimer="import blynktimer",e.definitions_.def_blynktimer="blynk_timer = blynktimer.Timer(no_timers_err=False)";var i=e.valueToCode(this,"timer_num",e.ORDER_ATOMIC);return`blynk_timer.stop('${i}_blynk_timer${i}')\n`},vI=function(t,e){e.definitions_.import_blynktimer="import blynktimer",e.definitions_.def_blynktimer="blynk_timer = blynktimer.Timer(no_timers_err=False)";return["blynk_timer.get_timers()",e.ORDER_ATOMIC]},PI=function(t,e){e.definitions_.import_blynktimer="import blynktimer";var i=e.valueToCode(this,"Num",e.ORDER_ATOMIC),n=e.valueToCode(this,"period",e.ORDER_ATOMIC),s=this.getFieldValue("Timer_mode"),o=e.statementToCode(this,"DO");return o=e.addLoopTrap(o,this.id)||e.PASS,e.definitions_.def_blynktimer="blynk_timer = blynktimer.Timer(no_timers_err=False)",e.definitions_["blynktimer_event"+i]=`\n@blynk_timer.register(interval=${n}, run_once=${s})\ndef blynk_timer${i}():\n`+o,""},VI=function(t,e){var i=e.valueToCode(this,"sensor_data",e.ORDER_ATOMIC);return"blynk.virtual_write("+e.valueToCode(this,"virtual_pin",e.ORDER_ATOMIC)+", "+i+")\n"},yI=function(t,e){var i=e.valueToCode(this,"virtual_pin",e.ORDER_ATOMIC),n=e.statementToCode(this,"DO");return n=e.addLoopTrap(n,this.id)||e.PASS,e.definitions_["blynk_VIRTUAL_WRITE_"+i]="@blynk.handle_event('write V"+i+"')\ndef write_virtual_pin_handler(pin, _value):\n for i in range(0, len(_value)):\n try: _value[i] = eval(_value[i])\n except: pass\n if len(_value) == 1: _value = _value[0]\n"+n,""},YI=function(t,e){var i=e.valueToCode(this,"body",e.ORDER_ATOMIC),n=e.valueToCode(this,"subject",e.ORDER_ATOMIC);return`blynk.email(${e.valueToCode(this,"TargetEmail",e.ORDER_ATOMIC)}, ${n}, ${i})\n`},bI=function(t,e){var i=e.valueToCode(this,"attribute_value",e.ORDER_ATOMIC);return`blynk.set_property(pin, ${e.valueToCode(this,"attribute_name",e.ORDER_ATOMIC)}, ${i})\n`},kI=function(t,e){e.definitions_.import_BlynkLib="import blynklib";var i=e.valueToCode(this,"server",e.ORDER_ATOMIC),n=e.valueToCode(this,"auth",e.ORDER_ATOMIC),s=e.valueToCode(this,"port",e.ORDER_ATOMIC);return e.definitions_.mpython_blynk_setup="blynk = blynklib.Blynk("+n+", server="+i+", port="+s+")",e.definitions_.blynk_on_connected="\n@blynk.handle_event(\"connect\")\ndef connect_handler():\n print('Blynk connected')\n",e.definitions_.blynk_on_disconnected="\n@blynk.handle_event(\"disconnect\")\ndef connect_handler():\n print('Blynk disconnected')\n",""};const XI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.show("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},GI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},xI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.showstatic("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},UI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.show("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},HI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},BI=function(t,e){e.definitions_.import_matrix="import matrix";var i={"#000000":"0","#ff0000":"1"};return['matrix.Image("'+i[t.getFieldValue("00")]+i[t.getFieldValue("01")]+i[t.getFieldValue("02")]+i[t.getFieldValue("03")]+i[t.getFieldValue("04")]+i[t.getFieldValue("05")]+i[t.getFieldValue("06")]+i[t.getFieldValue("07")]+i[t.getFieldValue("08")]+i[t.getFieldValue("09")]+i[t.getFieldValue("0a")]+i[t.getFieldValue("0b")]+i[t.getFieldValue("0c")]+i[t.getFieldValue("0d")]+i[t.getFieldValue("0e")]+i[t.getFieldValue("0f")]+":"+i[t.getFieldValue("10")]+i[t.getFieldValue("11")]+i[t.getFieldValue("12")]+i[t.getFieldValue("13")]+i[t.getFieldValue("14")]+i[t.getFieldValue("15")]+i[t.getFieldValue("16")]+i[t.getFieldValue("17")]+i[t.getFieldValue("18")]+i[t.getFieldValue("19")]+i[t.getFieldValue("1a")]+i[t.getFieldValue("1b")]+i[t.getFieldValue("1c")]+i[t.getFieldValue("1d")]+i[t.getFieldValue("1e")]+i[t.getFieldValue("1f")]+":"+i[t.getFieldValue("20")]+i[t.getFieldValue("21")]+i[t.getFieldValue("22")]+i[t.getFieldValue("23")]+i[t.getFieldValue("24")]+i[t.getFieldValue("25")]+i[t.getFieldValue("26")]+i[t.getFieldValue("27")]+i[t.getFieldValue("28")]+i[t.getFieldValue("29")]+i[t.getFieldValue("2a")]+i[t.getFieldValue("2b")]+i[t.getFieldValue("2c")]+i[t.getFieldValue("2d")]+i[t.getFieldValue("2e")]+i[t.getFieldValue("2f")]+":"+i[t.getFieldValue("30")]+i[t.getFieldValue("31")]+i[t.getFieldValue("32")]+i[t.getFieldValue("33")]+i[t.getFieldValue("34")]+i[t.getFieldValue("35")]+i[t.getFieldValue("36")]+i[t.getFieldValue("37")]+i[t.getFieldValue("38")]+i[t.getFieldValue("39")]+i[t.getFieldValue("3a")]+i[t.getFieldValue("3b")]+i[t.getFieldValue("3c")]+i[t.getFieldValue("3d")]+i[t.getFieldValue("3e")]+i[t.getFieldValue("3f")]+":"+i[t.getFieldValue("40")]+i[t.getFieldValue("41")]+i[t.getFieldValue("42")]+i[t.getFieldValue("43")]+i[t.getFieldValue("44")]+i[t.getFieldValue("45")]+i[t.getFieldValue("46")]+i[t.getFieldValue("47")]+i[t.getFieldValue("48")]+i[t.getFieldValue("49")]+i[t.getFieldValue("4a")]+i[t.getFieldValue("4b")]+i[t.getFieldValue("4c")]+i[t.getFieldValue("4d")]+i[t.getFieldValue("4e")]+i[t.getFieldValue("4f")]+":"+i[t.getFieldValue("50")]+i[t.getFieldValue("51")]+i[t.getFieldValue("52")]+i[t.getFieldValue("53")]+i[t.getFieldValue("54")]+i[t.getFieldValue("55")]+i[t.getFieldValue("56")]+i[t.getFieldValue("57")]+i[t.getFieldValue("58")]+i[t.getFieldValue("59")]+i[t.getFieldValue("5a")]+i[t.getFieldValue("5b")]+i[t.getFieldValue("5c")]+i[t.getFieldValue("5d")]+i[t.getFieldValue("5e")]+i[t.getFieldValue("5f")]+":"+i[t.getFieldValue("60")]+i[t.getFieldValue("61")]+i[t.getFieldValue("62")]+i[t.getFieldValue("63")]+i[t.getFieldValue("64")]+i[t.getFieldValue("65")]+i[t.getFieldValue("66")]+i[t.getFieldValue("67")]+i[t.getFieldValue("68")]+i[t.getFieldValue("69")]+i[t.getFieldValue("6a")]+i[t.getFieldValue("6b")]+i[t.getFieldValue("6c")]+i[t.getFieldValue("6d")]+i[t.getFieldValue("6e")]+i[t.getFieldValue("6f")]+":"+i[t.getFieldValue("70")]+i[t.getFieldValue("71")]+i[t.getFieldValue("72")]+i[t.getFieldValue("73")]+i[t.getFieldValue("74")]+i[t.getFieldValue("75")]+i[t.getFieldValue("76")]+i[t.getFieldValue("77")]+i[t.getFieldValue("78")]+i[t.getFieldValue("79")]+i[t.getFieldValue("7a")]+i[t.getFieldValue("7b")]+i[t.getFieldValue("7c")]+i[t.getFieldValue("7d")]+i[t.getFieldValue("7e")]+i[t.getFieldValue("7f")]+'")',e.ORDER_ATOMIC]},wI=function(t,e){return e.definitions_.import_matrix="import matrix",["matrix.Image."+t.getFieldValue("image"),e.ORDER_ATOMIC]},WI=function(t,e){return e.definitions_.import_matrix="import matrix",["matrix.get_pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},KI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.set_pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},jI=function(t,e){e.definitions_.import_matrix="import matrix";return["matrix.get_brightness()",e.ORDER_ATOMIC]},QI=function(t,e){e.definitions_.import_matrix="import matrix";return["matrix.get_screenimage()",e.ORDER_ATOMIC]},qI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},JI=function(t,e){return e.definitions_.import_matrix="import matrix","matrix.blink_rate("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},zI=function(t,e){e.definitions_.import_matrix="import matrix";return"matrix.clear()\n"},ZI=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},$I=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},tT=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},eT=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"width",e.ORDER_ATOMIC),p=e.valueToCode(this,"height",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP"),l="";switch(u){case"True":l=i+".show_fill_rect("+n+", "+s+", "+o+", "+p+", "+a+")\n";break;case"False":l=i+".show_rect("+n+", "+s+", "+o+", "+p+", "+a+")\n"}return l},iT=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP"),n=e.valueToCode(t,"A",e.ORDER_ATOMIC),s=e.valueToCode(t,"B",e.ORDER_ATOMIC);return["INTERSECTION"==i?n+"-("+n+"-"+s+")":n+i+s,e.ORDER_ATOMIC]},nT=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+o+", 1)\n"},sT=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},oT=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},pT=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},uT=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),o=this.getFieldValue("key");return"TM1650"==o?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+o+"("+s+")\n"):"TM1637"==o&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+o+"("+s+")\n"),i},aT=function(t,e){var i=this.getFieldValue("TYPE");return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+i+this.getFieldValue("STAT")+"()\n"},lT=function(t,e){var i=this.getFieldValue("TYPE");return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+i+"_show_num("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},_T=function(t,e){var i=this.getFieldValue("TYPE");return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+i+"_show_dot("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},rT=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},dT=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"r",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",u=this.getFieldValue("OP"),a="";switch(p){case"True":a=i+".show_fill_circle("+n+", "+s+", "+o+", "+u+")\n";break;case"False":a=i+".show_circle("+n+", "+s+", "+o+", "+u+")\n"}return a},IT=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),o=e.valueToCode(this,"x1",e.ORDER_ATOMIC),p=e.valueToCode(this,"y1",e.ORDER_ATOMIC),u=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),l="TRUE"==this.getFieldValue("fill")?"True":"False",_=this.getFieldValue("OP"),r="";switch(l){case"True":r=i+".show_fill_triangle("+n+", "+s+", "+o+", "+p+", "+u+", "+a+", "+_+")\n";break;case"False":r=i+".show_triangle("+n+", "+s+", "+o+", "+p+", "+u+", "+a+", "+_+")\n"}return r},TT=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},hT=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},mT=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),o=this.getFieldValue("key");return"32x12 Matrix"==o?(e.definitions_.import_matrix32x12="import matrix32x12",i=n+" = matrix32x12.Matrix("+s+")\n"):"TM1637"==o&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+o+"("+s+")\n"),i},OT=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_matrix32x12="import matrix32x12",i+".set_buffer("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},cT=function(t,e){return e.definitions_.import_matrix32x12="import matrix32x12",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},RT=function(t,e){return e.definitions_.import_mixiot="import mixiot","mixiot.wlan_connect("+e.valueToCode(this,"WIFINAME",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"PASSWORD",e.ORDER_ATOMIC)+")\n"},MT=function(t,e){return e.definitions_.import_onenet="import onenet",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+" = onenet.init_MQTT_client("+e.valueToCode(this,"CLIENT",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"SERVER",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"USERNAME",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"PASSWORD",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC)+", "+(e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)||"None")+")\n"},ET=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);return e.definitions_.import_onenet="import onenet",i+".do_disconnect()\n"},CT=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"DICT",e.ORDER_ATOMIC),s="TRUE"==this.getFieldValue("is_print")?"True":"False";return e.definitions_.import_onenet="import onenet",i+".publish("+n+", is_print="+s+")\n"},AT=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);return e.definitions_.import_onenet="import onenet",i+".check_msg()\n"},gT=function(t,e){e.definitions_.import_onenet="import onenet";var i=new Array(this.itemCount_),n=new Array(this.itemCount_),s=new Array(this.itemCount_),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);for(let t=0;t0?e.join("\n")+i.join("\n")+n.join("\n")+p.join("\n")+u.join("")+t+"while True:\n"+a.join("")+l.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+p.join("\n")+u.join("")+t+l.join("\n"),_},zT.scrubNakedValue=function(t){return t+"\n"},zT.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},zT.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},zT.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Rt.utils.string.wrap(o,zT.COMMENT_WRAP-3),n+=zT.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const ZT={k210:{description:"MicroPython[K210_MixGo AI]",digital_pin:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P6","6"],["P7","7"],["P8","8"],["P9","9"],["P10","10"],["P11","11"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"],["P17","17"],["P18","18"],["P19","19"],["P20","20"],["P21","21"],["P22","22"],["P23","23"],["P24","24"],["P25","25"]],digital:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P6","6"],["P7","7"],["P8","8"],["P9","9"],["P10","10"],["P11","11"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"],["P17","17"],["P18","18"],["P19","19"],["P20","20"],["P21","21"],["P22","22"],["P23","23"],["P24","24"],["P25","25"],["P30","30"],["P31","31"],["P32","32"],["P33","33"],["P34","34"],["P35","35"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]]}};ZT["MixGo AI"]=ZT.k210;const $T=ZT,th=100,eh={init:function(){this.setColour(th),this.appendDummyInput().appendField("初始化"),this.appendDummyInput().appendField("舵机"),this.appendValueInput("PIN",Number).appendField("管脚").setCheck(Number),this.appendValueInput("time").appendField("定时器").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},ih={init:function(){this.setColour(th),this.appendDummyInput().appendField("设置"),this.appendDummyInput().appendField("舵机"),this.appendValueInput("PIN",Number).appendField("管脚").setCheck(Number),this.appendValueInput("range").appendField("角度").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},nh={init:function(){this.setColour(th),this.appendDummyInput().appendField("初始化"),this.appendDummyInput().appendField("16路舵机"),this.appendValueInput("address").appendField("地址").setCheck(Number),this.appendValueInput("SUB").setCheck("var").setAlign(Rt.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("使用PCA9685驱动16路舵机并备注IIC端口")}},sh={init:function(){this.setColour(th),this.appendDummyInput().appendField("设置"),this.appendDummyInput().appendField("16路舵机"),this.appendValueInput("index").appendField("编号").setCheck(Number),this.appendValueInput("range").appendField("角度").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("使用PCA9685驱动16路舵机,输入编号机角度")}},oh={init:function(){this.setColour(th),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendValueInput("PIN",Number).appendField("管脚").setCheck(Number),this.appendValueInput("num").appendField("灯数").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},ph={init:function(){this.setColour(th),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendValueInput("num").appendField("灯号").setCheck(Number),this.appendValueInput("R").appendField("R值").setCheck(Number),this.appendValueInput("G").appendField("G值").setCheck(Number),this.appendValueInput("B").appendField("B值").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},uh={init:function(){this.setColour(th),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendDummyInput().appendField("生效"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},ah={init:function(){this.setColour(th),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new Rt.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(Rt.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},lh={init:function(){this.setColour(th),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_Direction).appendField(new Rt.FieldDropdown([[Rt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Rt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[Rt.Msg.MOTOR_N,"ms32006.MOT_N"],[Rt.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},_h={init:function(){this.setColour(th),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new Rt.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_Direction).appendField(new Rt.FieldDropdown([[Rt.Msg.CLOCKWISE,"ms32006.MOT_CW"],[Rt.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},rh={init:function(){this.setColour(th),this.appendValueInput("SUB").setCheck("var").appendField("初始化"),this.appendValueInput("P",Number).appendField("P值").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("I",Number).appendField("I值").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("D",Number).appendField("D值").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("初始化PID算法")}},dh={init:function(){this.setColour(th),this.appendValueInput("SUB").setCheck("var").appendField(""),this.appendDummyInput().appendField("运算"),this.appendValueInput("error").appendField("偏移量").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("scaler").appendField("定标量").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("根据参数返回运算结果")}},Ih="#55839A",Th={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField(new Rt.FieldTextInput("anchor"),"VAR").appendField("锚点参数= (").appendField(new Rt.FieldTextInput("1.889, 2.5245, 2.9465, 3.94056, 3.99987, 5.3658, 5.155437, 6.92275, 6.718375, 9.01025"),"TEXT").appendField(")"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("锚点参数")}},hh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField(new Rt.FieldTextInput("calss"),"VAR").appendField("物品名称= [").appendField(new Rt.FieldTextInput("'name1', 'name2', 'name3', 'name4'"),"TEXT").appendField("]"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("将要识别的物品名称")}},mh={init:function(){this.setColour(Ih),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendValueInput("path").appendField("模型加载").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("从flash系统中加载模型")}},Oh={init:function(){this.setColour(Ih),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendValueInput("path").appendField("模型路径").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("从文件系统中加载模型")}},ch={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("yolo2").appendField("初始化"),this.appendValueInput("SUB").setAlign(Rt.inputs.Align.RIGHT).appendField("网络模型").setCheck("var"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("概率阈值").setCheck(Number),this.appendValueInput("nms_value").setAlign(Rt.inputs.Align.RIGHT).appendField("box_iou门限").setCheck(Number),this.appendValueInput("anchor_num").setAlign(Rt.inputs.Align.RIGHT).appendField("锚点数").setCheck(Number),this.appendValueInput("anchor").setAlign(Rt.inputs.Align.RIGHT).appendField("锚点参数"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("初始化yolo2网络")}},Rh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("yolo2").appendField("运行网络"),this.appendValueInput("SUB").setAlign(Rt.inputs.Align.RIGHT).appendField("模型").setCheck("var"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("运行yolo2网络")}},Mh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("yolo2").appendField("前向运算"),this.appendValueInput("SUB").setAlign(Rt.inputs.Align.RIGHT).appendField("模型").setCheck("var"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("运行网络前向运算")}},Eh={init:function(){this.setColour(Ih),this.appendDummyInput().appendField("yolo2").appendField("模型解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-x","x"],["坐标-y","y"],["标识号","classid"],["置信度","value"]]),"key"),this.setOutput(!0),this.setTooltip("对于模型解析,获取模型识别结果的目标坐标、标识好、置信度")}},Ch={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_OneNET").appendField("连接WiFi"),this.appendValueInput("account").appendField("名称").setCheck(String),this.appendValueInput("password").appendField("密码").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("AI-Onenet平台 连接WiFi")}},Ah={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_OneNET").appendField("获鉴权码"),this.appendValueInput("account").setAlign(Rt.inputs.Align.RIGHT).appendField("账号").setCheck(String),this.appendValueInput("password").setAlign(Rt.inputs.Align.RIGHT).appendField("密码").setCheck(String),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("AI-Onenet平台 需要注册平台才能使用账号获取用户鉴权码,鉴权码一般24小时有效")}},gh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_OneNET").appendField("调取API"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像"),this.appendDummyInput().appendField("识别").appendField(new Rt.FieldDropdown([["人脸检测","FACE_RECO"],["人脸分析","FACE_ATTRIBUTE"],["人体检测","BODY_RECO"],["图像抄表","AMMETER_READ"],["内容测评","IDENTIFY_PORN"],["车牌信息","NUMBER_PLATE_RECOGNITION"],["宠物种类","CAT_DOG_DETECTION"],["火灾检测","FIRE_DETECTION"]]),"api"),this.appendValueInput("token").setAlign(Rt.inputs.Align.RIGHT).appendField("鉴权码").setCheck(String),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("AI-Onenet平台 调用平台API,返回列表识别结果参数")}},Sh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_Local").appendField("模型训练"),this.appendValueInput("calss").setAlign(Rt.inputs.Align.RIGHT).appendField("物品"),this.appendValueInput("sample").setAlign(Rt.inputs.Align.RIGHT).appendField("训练量").setCheck(Number),this.appendValueInput("save").setAlign(Rt.inputs.Align.RIGHT).appendField("保存").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("AI-Local本地模型训练 需要识别的物品名称、每个物品训练数量、保存的名称")}},Dh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_Local").appendField("模型加载"),this.appendValueInput("path").setAlign(Rt.inputs.Align.RIGHT).appendField("路径").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("AI-Local 加载已经训练好的本地模型")}},Nh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_Local").appendField("运行模型"),this.appendValueInput("calss").setAlign(Rt.inputs.Align.RIGHT).appendField("物品"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("AI-Local 采集图像运行模型将返回识别的物品名、置信度")}},Lh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_Face").appendField("初始化 加载"),this.appendValueInput("FD").setAlign(Rt.inputs.Align.RIGHT).appendField("模型FD:").setCheck(String),this.appendValueInput("LD").setAlign(Rt.inputs.Align.RIGHT).appendField("模型LD:").setCheck(String),this.appendValueInput("FE").setAlign(Rt.inputs.Align.RIGHT).appendField("模型FE:").setCheck(String),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("人脸分辨,初始化")}},fh={init:function(){this.setColour(Ih),this.appendDummyInput("").appendField("AI_Face").appendField("运行识别"),this.appendValueInput("names").setAlign(Rt.inputs.Align.RIGHT).appendField("人名"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图象"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("人脸分辨,识别到人脸返回True,无人脸返回False")}},Fh={init:function(){this.setColour(Ih),this.appendDummyInput().appendField("AI_Face").appendField("识别解析"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["识别人名","info_name"],["置信度 %","info_score"],["脸部坐标","info_face"],["三官坐标","info_organs"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("人脸分辨,识别到人物名称,置信度,脸部坐标,三官(眼睛x2、鼻子、嘴巴*2)坐标")}},vh="#2CAAD2",Ph={init:function(){this.setColour(vh),this.appendValueInput("SUB").setCheck("var").appendField("初始化"),this.appendValueInput("BCK",Number).appendField("BCK#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("WS",Number).appendField("WS#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("DAT",Number).appendField("DAT#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("初始化配置扬声器,用于语音播放")}},Vh={init:function(){this.setColour(vh),this.appendValueInput("SUB").setCheck("var").appendField("初始化"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("初始化配置扬声器,用于语音播放")}},yh={init:function(){this.setColour(vh),this.appendDummyInput().appendField("Audio 音频播放"),this.appendValueInput("path").appendField("路径").setAlign(Rt.inputs.Align.RIGHT).setCheck(String),this.appendValueInput("SUB").setCheck("var").setAlign(Rt.inputs.Align.RIGHT).appendField("设备"),this.appendValueInput("volume").appendField("音量(%)").setAlign(Rt.inputs.Align.RIGHT).setCheck(Number),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("音频播放")}},Yh={init:function(){this.setColour(vh),this.appendDummyInput().appendField("Audio 音频录制"),this.appendValueInput("path").appendField("路径").setAlign(Rt.inputs.Align.RIGHT).setCheck(String),this.appendValueInput("SUB").setCheck("var").setAlign(Rt.inputs.Align.RIGHT).appendField("设备"),this.appendValueInput("time").appendField("时长(s)").setAlign(Rt.inputs.Align.RIGHT).setCheck(Number),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("音频录制")}},bh={init:function(){this.setColour(vh),this.appendDummyInput().appendField("Video 视频播放"),this.appendValueInput("path").appendField("路径").setAlign(Rt.inputs.Align.RIGHT).setCheck(String),this.appendValueInput("SUB").setCheck("var").setAlign(Rt.inputs.Align.RIGHT).appendField("设备"),this.appendValueInput("volume").appendField("音量(%)").setAlign(Rt.inputs.Align.RIGHT).setCheck(Number),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("视频播放")}},kh={init:function(){this.setColour(vh),this.appendDummyInput().appendField("Video 视频录制"),this.appendValueInput("path").appendField("路径").setAlign(Rt.inputs.Align.RIGHT).setCheck(String),this.appendValueInput("SUB").setCheck("var").setAlign(Rt.inputs.Align.RIGHT).appendField("设备"),this.appendValueInput("time").appendField("时长(s)").setAlign(Rt.inputs.Align.RIGHT).setCheck(Number),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("视频录制")}},Xh="#bc9705",Gh={init:function(){this.setColour(Xh),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["彩色图(YUV422)","sensor.YUV422"],["彩色图(RGB565)","sensor.RGB565"],["灰度图","sensor.GRAYSCALE"]]),"flag"),this.setOutput(!0),this.setTooltip()}},xh={init:function(){this.setColour(Xh),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["320x240","sensor.QVGA"],["240x240","sensor.B240X240"],["128x128","sensor.B128X128"],["64x64","sensor.B64X64"]]),"flag"),this.setOutput(!0),this.setTooltip()}},Uh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera").appendField("初始化"),this.appendValueInput("key1").setAlign(Rt.inputs.Align.RIGHT).appendField("帧格式"),this.appendValueInput("key2").setAlign(Rt.inputs.Align.RIGHT).appendField("帧大小"),this.appendValueInput("key3").setAlign(Rt.inputs.Align.RIGHT).appendField("图捕捉"),this.appendValueInput("key4").setAlign(Rt.inputs.Align.RIGHT).appendField("跳帧数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("初始化摄像头,会自动扫描并获取摄像头型号")}},Hh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendDummyInput().appendField("初始化"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("初始化摄像头,会自动扫描并获取摄像头型号")}},Bh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("key").appendField("帧格式"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("设置摄像头输出格式")}},wh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("key").appendField("帧大小"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("设置摄像头输出帧大小")}},Wh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("key").appendField("图捕捉"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("开启图像捕捉功能")}},Kh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("frame").appendField("跳帧数").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("摄像头跳过指定帧数")}},jh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendDummyInput().appendField("获取图像"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("控制摄像头捕捉图像")}},Qh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("key").appendField("设为"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("启动/关闭摄像头")}},qh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("key").appendField("水平镜像"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("设置摄像头水平镜像")}},Jh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("key").appendField("垂直镜像"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("设置摄像头垂直镜像")}},zh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendValueInput("key").appendField("彩条模式"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("将摄像头设置为彩条模式")}},Zh={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["分辨率宽度","width"],["分辨率高度","height"],["当前增益值","get_gain_db"],["帧缓冲图像","get_fb"],["类型型号ID","get_id"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("获取当前摄像头信息")}},$h={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendDummyInput().appendField("设置").appendField(new Rt.FieldDropdown([["对比度","set_contrast"],["亮度值","set_brightness"],["增益值","set_auto_gain"],["饱和度","set_saturation"]]),"key"),this.appendValueInput("num").appendField("值为").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("设置摄像头对比度、亮度、增益、饱和度")}},tm={init:function(){this.setColour(Xh),this.appendDummyInput().appendField("Camera"),this.appendDummyInput().appendField("设置窗口"),this.appendValueInput("numa").appendField("宽为").setCheck(Number),this.appendValueInput("numb").appendField("高为").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("设置摄像头窗口大小")}},em=140,im={init:function(){this.setColour(em),this.appendValueInput("PIN").appendField(Rt.Msg.MIXLY_IR_RECEIVE),this.appendDummyInput().appendField("获取编码"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_I2C_SCAN)}},nm={init:function(){this.setColour(em),this.appendValueInput("SUB").appendField("I2C "+Rt.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("TX",Number).appendField("SCL#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("RX",Number).appendField("SDA#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendDummyInput().appendField("通道").appendField(new Rt.FieldDropdown([["0","I2C0"],["1","I2C1"],["2","I2C2"]]),"mode"),this.appendValueInput("freq").setCheck(Number).appendField(Rt.Msg.MIXLY_FREQUENCY).setAlign(Rt.inputs.Align.RIGHT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_I2C_INIT)}},sm={init:function(){this.setColour(em),this.appendValueInput("SUB").setCheck("var").appendField("I2S 初始化"),this.appendDummyInput().appendField("设备").appendField(new Rt.FieldDropdown([["麦克风","mic"],["扬声器","spk"]]),"mode"),this.appendValueInput("BCK",Number).appendField("BCK#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("WS",Number).appendField("WS#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("DAT",Number).appendField("DAT#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("sample").appendField("采样率").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_I2C_INIT)}},om={init:function(){this.setColour(em),this.appendValueInput("VAR").appendField("I2C").setCheck("var"),this.appendValueInput("address").setCheck(Number).appendField(Rt.Msg.MIXLY_ESP32_RNUMBER),this.appendValueInput("data").setCheck(Number).appendField(Rt.Msg.LANG_MATH_BYTE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_JS_I2C_READ)}},pm={init:function(){this.setColour(em),this.appendValueInput("VAR").appendField("I2C").setCheck("var"),this.appendValueInput("address").setCheck(Number).appendField(Rt.Msg.MIXLY_ESP32_WNUMBER),this.appendValueInput("data").setCheck(Number).appendField(Rt.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_JS_I2C_WRITE)}},um={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField(Rt.Msg.MIXLY_ESP32_I2C_SCAN1),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_I2C_SCAN2),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_I2C_SCAN)}},am={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField(Rt.Msg.MIXLY_ESP32_SPI_INIT),this.appendValueInput("freq").setCheck(Number).appendField(Rt.Msg.MIXLY_SERIAL_BEGIN),this.appendValueInput("polarity").setCheck(Number).appendField("polarity"),this.appendValueInput("phase").setCheck(Number).appendField("phase"),this.appendValueInput("sck").setCheck(Number).appendField("SCK"),this.appendValueInput("mosi").setCheck(Number).appendField("MOSI"),this.appendValueInput("miso").setCheck(Number).appendField("MISO"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_INIT_TOOLTIP)}},lm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField(Rt.Msg.MIXLY_SETTING+" SPI"),this.appendValueInput("data").setCheck(Number).appendField(Rt.Msg.MIXLY_SERIAL_BEGIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_SET)}},_m={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField(Rt.Msg.MIXLY_ESP32_SET+"SPI"),this.appendValueInput("data").setCheck(Number).appendField(Rt.Msg.MIXLY_ESP32_SPI_BUFFER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_BUFFER_SET)}},rm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("SPI"),this.appendValueInput("data").setCheck(Number).appendField(Rt.Msg.MIXLY_SERIAL_READ),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_4DIGITDISPLAY_NOMBER2+Rt.Msg.LANG_MATH_BYTE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_READ)}},dm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("SPI"),this.appendValueInput("data").setCheck(Number).appendField(Rt.Msg.MIXLY_SERIAL_READ),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_4DIGITDISPLAY_NOMBER2+Rt.Msg.LANG_MATH_BYTE+","+Rt.Msg.MIXLY_ESP32_SPI_OUTPUT),this.appendValueInput("val").setCheck(Number),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_READ_OUTPUT)}},Im={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("SPI"),this.appendValueInput("data").setCheck("var").appendField(Rt.Msg.MIXLY_SERIAL_READ+Rt.Msg.MIXLY_ESP32_SPI_BUFFER),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_READINTO)}},Tm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("SPI"),this.appendValueInput("data").setCheck("var").appendField(Rt.Msg.MIXLY_SERIAL_READ+Rt.Msg.MIXLY_ESP32_SPI_BUFFER),this.appendValueInput("val").setCheck(Number).appendField(","+Rt.Msg.MIXLY_ESP32_SPI_OUTPUT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_READINTO_OUTPUT)}},hm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("SPI"),this.appendValueInput("data").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_WRITE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_WRITE)}},mm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("SPI"),this.appendValueInput("data").setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_WRITE),this.appendValueInput("val").setCheck("var").appendField(","+Rt.Msg.MIXLY_ESP32_BUFFER_READ),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_SPI_WRITE_READINTO)}},Om={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("I2C"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_READ),this.setOutput(!0,Number)}},cm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField(Rt.Msg.MIXLY_ESP32_READ+"I2C"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_SUCCESS),this.setOutput(!0,Boolean),this.setTooltip(Rt.Msg.MIXLY_ESP32_I2C_AVAILABLE)}},Rm={init:function(){this.setColour(em),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_I2C_SLAVE_ONRECEIVE).setCheck(Number),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Mm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("OneWire"),this.appendValueInput("BUS").setCheck(Number).appendField(Rt.Msg.MIXLY_SETUP+" "+Rt.Msg.MIXLY_PIN),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_OW_INIT)}},Em={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("OneWire"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_ONEWIRE_SCAN),this.setOutput(!0,"List"),this.setTooltip(Rt.Msg.MIXLY_ESP32_OW_SCAN)}},Cm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("OneWire"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_ONEWIRE_READ),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_OW_READ)}},Am={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField("OneWire"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_ESP32_WRITE).appendField(new Rt.FieldDropdown([[Rt.Msg.LANG_MATH_STRING,"write"],[Rt.Msg.LANG_MATH_BYTE,"writebyte"]]),"op"),this.appendValueInput("byte").setCheck([Number,String]),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_OW_WRITE)}},gm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField(Rt.Msg.MIXLY_ESP32_ONEWIRE_SELECT),this.appendValueInput("byte").setCheck(String).appendField("ROM"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_OW_SELECT)}},Sm={init:function(){this.setColour(em),this.appendValueInput("VAR").setCheck("var").appendField(Rt.Msg.MIXLY_ESP32_ONEWIRE_RESET),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Rt.Msg.MIXLY_ESP32_OW_RESET)}},Dm=nm,Nm=om,Lm=pm,fm=um,Fm=am,vm=lm,Pm=_m,Vm=rm,ym=dm,Ym=Im,bm=Tm,km=hm,Xm=mm,Gm=Om,xm=cm,Um=180,Hm={init:function(){this.setColour(Um),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["0°","0"],["90°","1"],["180°","2"],["270°","3"]]),"flag"),this.setOutput(!0),this.setTooltip()}},Bm={init:function(){this.setColour(Um),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["黑色","lcd.BLACK"],["深蓝色","lcd.NAVY"],["蓝色","lcd.BLUE"],["深绿色","lcd.DARKGREEN"],["深青色","lcd.DARKCYAN"],["绿色","lcd.GREEN"],["青色","lcd.CYAN"],["褐红色","lcd.MAROON"],["紫色","lcd.PURPLE"],["橄榄色","lcd.OLIVE"],["深灰色","lcd.DARKGREY"],["绿黄色","lcd.GREENYELLOW"],["浅灰色","lcd.LIGHTGREY"],["红色","lcd.RED"],["洋红色","lcd.MAGENTA"],["粉红色","lcd.PINK"],["橙色","lcd.ORANGE"],["黄色","lcd.YELLOW"],["白色","lcd.WHITE"]]),"flag"),this.setOutput(!0),this.setTooltip()}},wm={init:function(){this.setColour(Um),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["开启","1"],["关闭","0"]]),"flag"),this.setOutput(!0),this.setTooltip()}},Wm={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD 初始化"),this.appendValueInput("freq").setAlign(Rt.inputs.Align.RIGHT).appendField("通信频率").setCheck(Number),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("背景颜色").setCheck(Number),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("初始化LCD屏幕显示")}},Km={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD 获取 "),this.appendDummyInput().appendField(new Rt.FieldDropdown([["宽度","width"],["高度","height"]]),"key"),this.appendDummyInput().appendField("分辨率"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("获取LCD的宽度/高度(水平分辨率)")}},jm={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD"),this.appendValueInput("key").appendField("系统颜色"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("获取LCD的宽度/高度(水平分辨率)")}},Qm={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD 显示图像"),this.appendValueInput("img").appendField(""),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("在液晶屏上显示一张image(GRAYSCALE或RGB565")}},qm={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD 清屏颜色"),this.appendValueInput("color").appendField("").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("将液晶屏清空为指定的颜色")}},Jm={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD 屏幕旋转"),this.appendValueInput("key").appendField(""),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("设置LCD屏幕方向")}},zm={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD 镜像显示"),this.appendValueInput("key").appendField(""),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("设置LCD是否镜面显示")}},Zm={init:function(){this.setColour(Um),this.appendDummyInput().appendField("LCD 绘制文本"),this.appendValueInput("x").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标X").setCheck(Number),this.appendValueInput("y").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标Y").setCheck(Number),this.appendValueInput("text").setAlign(Rt.inputs.Align.RIGHT).appendField("文本内容").setCheck(String),this.appendValueInput("color_T").setAlign(Rt.inputs.Align.RIGHT).appendField("文本颜色").setCheck(Number),this.appendValueInput("color_S").setAlign(Rt.inputs.Align.RIGHT).appendField("背景颜色").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("在液晶屏上显示文本字符(不支持中文)")}},$m={init:function(){this.setColour(40),this.appendDummyInput().appendField("Touch 初始化"),this.appendValueInput("I2C").appendField("通信").setCheck("var"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("初始化触摸屏")}},tO={init:function(){this.setColour(40),this.appendDummyInput().appendField("Touch 校准"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("校准屏幕,使屏幕显示和触摸屏像素能够对应")}},eO={init:function(){this.setColour(40),this.appendDummyInput().appendField("Touch 获取 "),this.appendDummyInput().appendField(new Rt.FieldDropdown([["状态","[0]"],["坐标x","[1]"],["坐标y","[2]"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("读取当前屏幕的状态以及按下的点的坐标值")}},iO={init:function(){this.setColour(40),this.appendDummyInput().appendField("Touch 状态"),this.appendDummyInput().appendField(new Rt.FieldDropdown([["空闲","ts.STATUS_IDLE"],["不按","ts.STATUS_RELEASE"],["按下","ts.STATUS_PRESS"],["移动","ts.STATUS_MOVE"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("读取当前屏幕的状态以及按下的点的坐标值")}},nO="#777777",sO={init:function(){this.setColour(nO),this.appendDummyInput("").appendField("from ").appendField(new Rt.FieldTextInput("mixno"),"path").appendField(" import ").appendField(new Rt.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},oO={init:function(){this.setColour(nO),this.appendDummyInput("").appendField("import ").appendField(new Rt.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pO={init:function(){this.setColour(nO),this.appendDummyInput("").appendField(new Rt.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Rt.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:"ni-hao"),"KEY"+e).appendField("”:")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},EO={init:function(){this.setColour(cO),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendDummyInput().appendField("启动识别 返回结果"),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip("语音识别,获取识别结果")}},CO={init:function(){this.setColour(cO),this.appendValueInput("SUB").appendField("").setCheck("var"),this.appendDummyInput().appendField("注销识别 内存释放"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("语音识别,注销语音识别,释放内存")}},AO="#90A244",gO={init:function(){this.setColour(AO),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["否","0"],["是","1"]]),"flag"),this.setOutput(!0),this.setTooltip()}},SO={init:function(){this.setColour(AO),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("path").appendField("打开路径").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("打开一个新的图像对象")}},DO={init:function(){this.setColour(AO),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField("打开空图"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("打开一个空的图像对象")}},NO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像信息"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["宽度","width"],["高度","height"],["格式","format"],["大小","size"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("获取图像的宽度、高度、格式、大小")}},LO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像保存"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("path").setAlign(Rt.inputs.Align.RIGHT).appendField("路径").setCheck(String),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("图像的副本保存到文件系统")}},fO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像截取"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("复制一个图像图像的副本")}},FO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("RGB"),this.appendDummyInput().appendField("["),this.appendValueInput("R").setCheck(Number),this.appendValueInput("G").appendField(",").setCheck(Number),this.appendValueInput("B").appendField(",").setCheck(Number),this.appendDummyInput().appendField("]"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("对图像进行适当压缩")}},vO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像压缩"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("quality").setAlign(Rt.inputs.Align.RIGHT).appendField("压缩率").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("对图像进行适当压缩")}},PO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像清除"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("将图像中的所有像素设置为零")}},VO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像转换"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.appendDummyInput().appendField("转换为").appendField(new Rt.FieldDropdown([["灰度图","to_grayscale"],["彩色图","to_rgb565"],["彩虹图","to_rainbow"],["AI格式","pix_to_ai"],["字节块","to_bytes"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("将图像转换为灰度图、彩色图、彩虹图像")}},yO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("修改点颜色"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xy"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("设置图像某点像素值")}},YO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("获取点颜色"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xy"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("获取图像某点像素值")}},bO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("字库加载"),this.appendValueInput("path").setAlign(Rt.inputs.Align.RIGHT).appendField("路径").setCheck(String),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("从SD中加载需要显示文字的字库")}},kO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("字库释放"),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("释放字库所占的内存")}},XO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制文本(中)"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("x0").setAlign(Rt.inputs.Align.RIGHT).appendField("起-x").setCheck(Number),this.appendValueInput("y0").setAlign(Rt.inputs.Align.RIGHT).appendField("起-y").setCheck(Number),this.appendValueInput("tex").setAlign(Rt.inputs.Align.RIGHT).appendField("内容").setCheck(String),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("scale").setAlign(Rt.inputs.Align.RIGHT).appendField("字号").setCheck(Number),this.appendValueInput("x_spacing").setAlign(Rt.inputs.Align.RIGHT).appendField("间距").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上绘制一个文本")}},GO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制文本"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("x0").setAlign(Rt.inputs.Align.RIGHT).appendField("起-x").setCheck(Number),this.appendValueInput("y0").setAlign(Rt.inputs.Align.RIGHT).appendField("起-y").setCheck(Number),this.appendValueInput("tex").setAlign(Rt.inputs.Align.RIGHT).appendField("内容").setCheck(String),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("scale").setAlign(Rt.inputs.Align.RIGHT).appendField("字号").setCheck(Number),this.appendValueInput("x_spacing").setAlign(Rt.inputs.Align.RIGHT).appendField("间距").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上绘制一个中文文本")}},xO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制文本(英)"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("x0").setAlign(Rt.inputs.Align.RIGHT).appendField("起-x").setCheck(Number),this.appendValueInput("y0").setAlign(Rt.inputs.Align.RIGHT).appendField("起-y").setCheck(Number),this.appendValueInput("tex").setAlign(Rt.inputs.Align.RIGHT).appendField("内容").setCheck(String),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("scale").setAlign(Rt.inputs.Align.RIGHT).appendField("字号").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上绘制一个字符文本")}},UO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制直线"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xyxy"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("thi").setAlign(Rt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一条从(x0,y0)到(x1,y1)的线")}},HO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制箭头"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xyxy"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("thi").setAlign(Rt.inputs.Align.RIGHT).appendField("大小").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一个箭头")}},BO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制十字"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xy"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("size").setAlign(Rt.inputs.Align.RIGHT).appendField("延伸").setCheck(Number),this.appendValueInput("thi").setAlign(Rt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一个十字")}},wO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制圆形"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xyr"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("thi").setAlign(Rt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.appendValueInput("fil").setAlign(Rt.inputs.Align.RIGHT).appendField("填充").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一个圆形")}},WO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制矩形"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xywh"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("thi").setAlign(Rt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.appendValueInput("fil").setAlign(Rt.inputs.Align.RIGHT).appendField("填充").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("图像上绘制一个矩形")}},KO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制特征点"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("keypoints").setAlign(Rt.inputs.Align.RIGHT).appendField("对象"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("size").setAlign(Rt.inputs.Align.RIGHT).appendField("大小").setCheck(Number),this.appendValueInput("thi").setAlign(Rt.inputs.Align.RIGHT).appendField("粗细").setCheck(Number),this.appendValueInput("fil").setAlign(Rt.inputs.Align.RIGHT).appendField("填充").setCheck(Number),this.setOutput(!0),this.setTooltip("绘制一个特征点对象的各个点")}},jO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("绘制图像"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("坐标-xy"),this.appendValueInput("x_scale").setAlign(Rt.inputs.Align.RIGHT).appendField("x缩放").setCheck(Number),this.appendValueInput("y_scale").setAlign(Rt.inputs.Align.RIGHT).appendField("y缩放").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("绘制一个image图像")}},QO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("直线识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendValueInput("theta_margin").setAlign(Rt.inputs.Align.RIGHT).appendField("合并角度").setCheck(Number),this.appendValueInput("rho_margin").setAlign(Rt.inputs.Align.RIGHT).appendField("合并斜率").setCheck(Number),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[line]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用霍夫变换识别直线,返回image.line对象列表")}},qO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("线段识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("distance").setAlign(Rt.inputs.Align.RIGHT).appendField("间距").setCheck(Number),this.appendValueInput("difference").setAlign(Rt.inputs.Align.RIGHT).appendField("合并角度").setCheck(Number),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[line]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用霍夫变换识别线段,返回image.line对象列表")}},JO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("圆形识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendValueInput("r_min").setAlign(Rt.inputs.Align.RIGHT).appendField("最小r").setCheck(Number),this.appendValueInput("r_max").setAlign(Rt.inputs.Align.RIGHT).appendField("最大r").setCheck(Number),this.appendValueInput("r_step").setAlign(Rt.inputs.Align.RIGHT).appendField("步长r").setCheck(Number),this.appendValueInput("x_margin").setAlign(Rt.inputs.Align.RIGHT).appendField("合并x值").setCheck(Number),this.appendValueInput("y_margin").setAlign(Rt.inputs.Align.RIGHT).appendField("合并y值").setCheck(Number),this.appendValueInput("r_margin").setAlign(Rt.inputs.Align.RIGHT).appendField("合并r值").setCheck(Number),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[circle]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用霍夫变换识别圆形,返回image.cirle对象列表")}},zO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("矩形识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[rect]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用四元检测识别矩形,返回image.rect对象列表")}},ZO={init:function(){this.setColour(AO),this.appendDummyInput().appendField("线性回归"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendValueInput("invert").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值反转"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("robust").setAlign(Rt.inputs.Align.RIGHT).appendField("泰尔指数").setCheck(Number),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[line]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("计算线性回归,返回image.line对象列表")}},$O={init:function(){this.setColour(AO),this.appendDummyInput().appendField("直线解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xywh","line"],["x1分量","x1"],["y1分量","y1"],["x2分量","x2"],["y2分量","y2"],["长度","length"],["角度","theta"],["斜率","rho"],["模","magnitude"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.line列表,获取直线信息")}},tc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("圆形解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xyr","circle"],["x分量","x"],["y分量","y"],["r分量","r"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.circle列表,获取圆形信息")}},ec={init:function(){this.setColour(AO),this.appendDummyInput().appendField("矩形解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.rect列表,获取矩形信息")}},ic={init:function(){this.setColour(AO),this.appendDummyInput().appendField("直方图均衡"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("key").setAlign(Rt.inputs.Align.RIGHT).appendField("自适应"),this.appendValueInput("limit").setAlign(Rt.inputs.Align.RIGHT).appendField("对比度").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上的简单直方图均衡化")}},nc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("模糊滤波"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("size").setAlign(Rt.inputs.Align.RIGHT).appendField("卷积核尺寸").setCheck(Number),this.appendValueInput("key").setAlign(Rt.inputs.Align.RIGHT).appendField("自适应"),this.appendValueInput("offset").setAlign(Rt.inputs.Align.RIGHT).appendField("补偿").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上的简单模糊滤波")}},sc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("卡通化滤波"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("seed").setAlign(Rt.inputs.Align.RIGHT).appendField("原始差异").setCheck(Number),this.appendValueInput("float").setAlign(Rt.inputs.Align.RIGHT).appendField("相邻差异").setCheck(Number),this.setOutput(!0),this.setTooltip("图像上的简单卡通滤波器")}},oc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像腐蚀"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("size").setAlign(Rt.inputs.Align.RIGHT).appendField("卷积核尺寸").setCheck(Number),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.setOutput(!0),this.setTooltip("图像腐蚀,从分割区域的边缘删除像素(白色目标区域)")}},pc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像膨胀"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("size").setAlign(Rt.inputs.Align.RIGHT).appendField("卷积核尺寸").setCheck(Number),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.setOutput(!0),this.setTooltip("图像膨胀,将像素添加到分割区域的边缘中(白色目标区域)")}},uc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像填充"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("开始坐标"),this.appendValueInput("color").setAlign(Rt.inputs.Align.RIGHT).appendField("颜色").setCheck(Number),this.appendValueInput("seed").setAlign(Rt.inputs.Align.RIGHT).appendField("原始差异").setCheck(Number),this.appendValueInput("float").setAlign(Rt.inputs.Align.RIGHT).appendField("相邻差异").setCheck(Number),this.appendValueInput("invert").setAlign(Rt.inputs.Align.RIGHT).appendField("反转"),this.appendValueInput("clear").setAlign(Rt.inputs.Align.RIGHT).appendField("清除"),this.setOutput(!0),this.setTooltip("像洪水一样填充图像中低矮凹陷的地方(洪水填充)")}},ac={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像投影"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("key").setAlign(Rt.inputs.Align.RIGHT).appendField("垂直投影"),this.setOutput(!0),this.setTooltip("图像从笛卡尔坐标到线性极坐标重新投影")}},lc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像反转"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("翻转图像中的所有像素值")}},_c={init:function(){this.setColour(AO),this.appendDummyInput().appendField("校正缩放"),this.appendValueInput("VAR").appendField("图像").setCheck("var"),this.appendValueInput("strength").appendField("校正值").setCheck(Number),this.appendValueInput("zoom").appendField("缩放值").setCheck(Number),this.setOutput(!0),this.setTooltip("翻转图像中的所有像素值")}},rc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像二值化"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值").setCheck(Number),this.appendValueInput("invert").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值反转"),this.appendValueInput("zero").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值像素为零"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("根据像素是否在阈值列表 thresholds 中的阈值内,将图像中的所有像素设置为黑色或白色。")}},dc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("图像边缘检测"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("size").setAlign(Rt.inputs.Align.RIGHT).appendField("卷积核尺寸").setCheck(Number),this.appendValueInput("kernel").setAlign(Rt.inputs.Align.RIGHT).appendField("内核"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("通过过滤器内核对图像进行卷积。")}},Ic={init:function(){this.setColour(AO),this.appendDummyInput().appendField("条形码识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[barcode]"),this.setOutput(!0),this.setInputsInline(!1),this.setOutput(!0),this.setTooltip("使用条形码识别,返回image.barcode对象列表")}},Tc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("二维码识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[qrcode]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用二维码识别,返回image.line对象列表")}},hc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("AprilTag识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[apriltag]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用image.TAG36H11识别,返回image.apriltag对象列表")}},mc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("二维码解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["内容","payload"],["版本","version"],["掩码","mask"],["类型","data_type"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.qrcode列表,获取二维码信息")}},Oc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("条形码解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["内容","payload"],["类型","type"],["角度","rotation"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.barcode列表,获取条形码信息")}},cc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("AprilTag解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["中心-x","cx"],["中心-y","cy"],["号码","id"],["家族","family"],["弧度","rotation"],["x向距离","x_translation"],["y向距离","y_translation"],["z向距离","z_translation"],["x向弧度","x_rotation"],["y向弧度","y_rotation"],["z向弧度","z_rotation"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.apriltag列表,获取Apriltag信息")}},Rc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("色块追踪"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("LIST").setAlign(Rt.inputs.Align.RIGHT).appendField("阈值LAB"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("area").setAlign(Rt.inputs.Align.RIGHT).appendField("滤掉区域").setCheck(Number),this.appendValueInput("pixel").setAlign(Rt.inputs.Align.RIGHT).appendField("滤掉素数").setCheck(Number),this.appendValueInput("margin").setAlign(Rt.inputs.Align.RIGHT).appendField("合并").setCheck(Number),this.appendValueInput("key").setAlign(Rt.inputs.Align.RIGHT).appendField("重叠"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[blob]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用色块追踪,返回image.blob对象列表")}},Mc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("颜色识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[histogram]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用直方图识别颜色,返回image.histogram对象列表")}},Ec={init:function(){this.setColour(AO),this.appendDummyInput().appendField("追踪解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["中心-x","cx"],["中心-y","cy"],["像素量","pixels"],["弧度","rotation"],["号码数","code"],["合并量","count"],["面积","area"],["密度比","density"]]),"key"),this.setOutput(!0),this.setTooltip("通过image.blob列表,获取追踪色块信息")}},Cc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("色阈浮点"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["灰度图浮点列表","bins"],["LAB的L浮点列表","l_bins"],["LAB的A浮点列表","a_bins"],["LAB的B浮点列表","b_bins"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.barcode列表,获取条形码信息")}},Ac={init:function(){this.setColour(AO),this.appendDummyInput().appendField("颜色解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendValueInput("percentile").appendField("CDF").setCheck(Number),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["灰度图值","value"],["LAB的L值","l_value"],["LAB的A值","a_value"],["LAB的B值","b_value"]]),"key"),this.setOutput(!0),this.setTooltip("通过histogram列表,获取识别颜色信息")}},gc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("色阈解析"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["灰度图值","value"],["LAB的L值","l_value"],["LAB的A值","a_value"],["LAB的B值","b_value"]]),"key"),this.setOutput(!0),this.setTooltip("通过遍历image.barcode列表,获取条形码信息")}},Sc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("RGB888值"),this.appendValueInput("LIST").appendField("由LAB"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("LAB转RGB888")}},Dc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("LAB值"),this.appendValueInput("LIST").appendField("由RGB888"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("RGB888转LAB")}},Nc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("灰度值"),this.appendValueInput("LIST").appendField("由RGB888"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("RGB888转灰度图")}},Lc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("RGB888"),this.appendValueInput("g_value").appendField("由灰度值").setCheck(Number),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("灰度图转RGB888")}},fc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("定向梯度图"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("size").setAlign(Rt.inputs.Align.RIGHT).appendField("线长").setCheck(Number),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("用HOG(定向梯度直方图)线替换ROI中的像素,仅支持灰度图像")}},Fc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("特征识别"),this.appendValueInput("VAR").setAlign(Rt.inputs.Align.RIGHT).appendField("图像").setCheck("var"),this.appendValueInput("roi").setAlign(Rt.inputs.Align.RIGHT).appendField("区域-xywh"),this.appendValueInput("max_keypoints").setAlign(Rt.inputs.Align.RIGHT).appendField("关键点数").setCheck(Number),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("角点数").setCheck(Number),this.appendValueInput("scale_factor").setAlign(Rt.inputs.Align.RIGHT).appendField("比例因子").setCheck(Number),this.appendValueInput("normalized").setAlign(Rt.inputs.Align.RIGHT).appendField("多比例"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[keypoints]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用特征识别,返回image.keypoints对象列表")}},vc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("特征比较"),this.appendValueInput("VAR1").setAlign(Rt.inputs.Align.RIGHT).appendField("对象1").setCheck("var"),this.appendValueInput("VAR2").setAlign(Rt.inputs.Align.RIGHT).appendField("对象2").setCheck("var"),this.appendValueInput("threshold").setAlign(Rt.inputs.Align.RIGHT).appendField("相似度").setCheck(Number),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("返回[kptmatch]"),this.setOutput(!0),this.setInputsInline(!1),this.setTooltip("使用特征识别,返回image.keypoints对象列表")}},Pc={init:function(){this.setColour(AO),this.appendDummyInput().appendField("特征信息"),this.appendValueInput("VAR").appendField("对象").setCheck("var"),this.appendDummyInput().appendField("获取").appendField(new Rt.FieldDropdown([["坐标-xywh","rect"],["x分量","x"],["y分量","y"],["w分量","w"],["h分量","h"],["中心-x","cx"],["中心-y","cy"],["匹配量","count"],["弧度","theta"],["匹配点-xy","match"]]),"key"),this.setOutput(!0),this.setTooltip("通过image.kptmatch列表,获取追踪特征信息")}},Vc=20,yc={init:function(){this.setColour(Vc),this.appendDummyInput("").appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_HIGH,"HIGH"],[Rt.Msg.MIXLY_LOW,"LOW"]]),"BOOL"),this.setOutput(!0,Boolean),this.setTooltip(Rt.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP)}},Yc={init:function(){this.setColour(Vc),this.appendDummyInput().appendField("初始化 "),this.appendDummyInput("").appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_Digital_PINMODEOUT,"GPIO.OUT"],[Rt.Msg.MIXLY_Digital_PINMODEIN,"GPIO.IN"],[Rt.Msg.MIXLY_PINMODEPULLUP,"GPIO.IN, board.GPIO.PULL_UP"],[Rt.Msg.MIXLY_PINMODEPULLDOWN,"GPIO.IN, board.GPIO.PULL_DOWN"]]),"MODE"),this.appendValueInput("PIN",Number).appendField("管脚").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP)}},bc={init:function(){this.setColour(Vc),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_Digital_PINMODEOUT).setCheck(Number),this.appendValueInput("STAT").appendField(Rt.Msg.MIXLY_STAT).setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP)}},kc={init:function(){this.setColour(Vc),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(Rt.Msg.MIXLY_Digital_PINMODEIN).setCheck(Number),this.appendDummyInput().appendField("值"),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip(Rt.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP)}},Xc={init:function(){this.setColour(Vc),this.appendDummyInput().appendField("初始化 PWM输出"),this.appendValueInput("PIN",Number).appendField("管脚").setCheck(Number),this.appendValueInput("freq").appendField("频率").setCheck(Number),this.appendValueInput("VAR").appendField("定时器").setCheck("var"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化PWM输出设置,需要调用定时器")}},Gc={init:function(){this.setColour(Vc),this.appendValueInput("PIN",Number).appendField("PWM输出").setCheck(Number),this.appendValueInput("pwm").appendField("占空比").setCheck(Number),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("PWM输出,值范围为0-100%,可以为小数")}},xc={init:function(){this.setColour(Vc),this.appendDummyInput().appendField("硬件中断"),this.appendValueInput("PIN",Number).appendField("管键").setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_MODE).appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_RISING,"GPIO.IRQ_RISING"],[Rt.Msg.MIXLY_FALLING,"GPIO.IRQ_FALLING"],[Rt.Msg.MIXLY_CHANGE,"GPIO.IRQ_BOTH"]]),"mode"),this.appendValueInput("DO").appendField(Rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP)}},Uc={init:function(){this.setColour(Vc),this.appendDummyInput().appendField("取消中断"),this.appendValueInput("PIN",Number).appendField("管键").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("取消中断")}},Hc="#637AAC",Bc={init:function(){this.setColour(Hc),this.appendDummyInput().appendField("OneNET 连接WiFi"),this.appendValueInput("WIFINAME").setCheck(String).appendField(Rt.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Rt.Msg.HTML_PASSWORD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},wc={init:function(){this.setColour(Hc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"+Rt.Msg.TUPLE_JOIN),this.appendValueInput("CLIENT").setAlign(Rt.inputs.Align.RIGHT).setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_CLIENT),this.appendValueInput("SERVER").setAlign(Rt.inputs.Align.RIGHT).setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_SERVER),this.appendValueInput("USERNAME").setAlign(Rt.inputs.Align.RIGHT).setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_USERNAME),this.appendValueInput("PASSWORD").setAlign(Rt.inputs.Align.RIGHT).setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_PASSWORD),this.appendValueInput("TOPIC").setAlign(Rt.inputs.Align.RIGHT).setCheck(String).appendField(Rt.Msg.MIXLY_ESP32_ONENET_TOPIC),this.appendValueInput("SUB").setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.MIXLY_ESP32_ONENET_SUB),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_CONNECT_TOOLTIP)}},Wc={init:function(){this.setColour(Hc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_DISCONNECT_TOOLTIP)}},Kc={init:function(){this.setColour(Hc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_CHECK_TOOLTIP)}},jc={init:function(){this.setColour(Hc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET"),this.appendValueInput("DICT").appendField(Rt.Msg.MIXLY_ESP32_PUBLISH_ONENET),this.appendDummyInput().appendField(Rt.Msg.MIXLY_ESP32_IOT_ONENET_PRINT_DATA).appendField(new Rt.FieldCheckbox("TRUE"),"is_print"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_PUBLISH_DICT_TOOLTIP)}},Qc={init:function(){this.setColour(Hc),this.appendValueInput("VAR").setCheck("var").appendField("OneNET").setAlign(Rt.inputs.Align.RIGHT),this.appendDummyInput().appendField(new Rt.FieldLabel(Rt.Msg.MIXLY_ESP32_PUBLISH_ONENET),"TIP").setAlign(Rt.inputs.Align.RIGHT),this.itemCount_=2,this.updateShape_(),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Rt.icons.MutatorIcon(["iot_publish_item"],this)),this.setTooltip(Rt.Msg.MIXLY_ESP32_IOT_ONENET_PUBLISH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("iot_publish_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},qc={init:function(){this.setColour(Hc),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Jc={init:function(){this.setColour(Hc),this.appendDummyInput().appendField(Rt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},zc={init:function(){this.setColour(Hc),this.appendDummyInput().appendField(Rt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Zc=Bc,$c=wc,tR=Wc,eR=Kc,iR=Qc,nR=230;Rt.FieldTextInput.math_number_validator=function(t){return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null},Rt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const sR={init:function(){this.setColour(nR),this.appendDummyInput().appendField(new Rt.FieldTextInput("0",Rt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MATH_NUMBER_TOOLTIP)}},oR={init:function(){this.setColour(nR);this.appendDummyInput("").appendField(Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Rt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},pR={init:function(){this.setColour(nR),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Rt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Rt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},uR={init:function(){this.setColour(nR),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Rt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Rt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Rt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},aR={init:function(){this.setColour(nR),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Rt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},lR={init:function(){this.setColour(nR),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Rt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Rt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Rt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Rt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Rt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Rt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Rt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Rt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},_R={init:function(){var t=[[Rt.Msg.LANG_MATH_TO_ROUND,"round"],[Rt.Msg.LANG_MATH_TO_CEIL,"ceil"],[Rt.Msg.LANG_MATH_TO_FLOOR,"floor"],[Rt.Msg.MATH_ABS,"fabs"],[Rt.Msg.MATH_SQRT,"sqrt"]];this.setColour(nR),this.appendValueInput("A").setCheck(Number).appendField(new Rt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Rt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Rt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Rt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Rt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Rt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Rt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},rR={init:function(){var t=[[Rt.Msg.MIXLY_MAX,"max"],[Rt.Msg.MIXLY_MIN,"min"]];this.setColour(nR),this.appendValueInput("A").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(new Rt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Rt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Rt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Rt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},dR={init:function(){var t=[[Rt.Msg.MIXLY_MAX,"max"],[Rt.Msg.MIXLY_MIN,"min"]];this.setColour(nR),this.appendValueInput("LIST").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(new Rt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Rt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Rt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},IR={init:function(){var t=[[Rt.Msg.MATH_TWO,"two"],[Rt.Msg.MATH_EIGHT,"eight"],[Rt.Msg.MATH_TEN,"ten"],[Rt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(nR),this.appendDummyInput("").appendField(Rt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Rt.FieldDropdown(t),"OP").appendField(Rt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Rt.Msg.MATH_ZHW).appendField(new Rt.FieldDropdown(t),"OP2").appendField(Rt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:Rt.Msg.MATH_Before_two,eight:Rt.Msg.MATH_Before_eight,ten:Rt.Msg.MATH_Before_ten,sixteen:Rt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:Rt.Msg.MATH_Behind_two,eight:Rt.Msg.MATH_Behind_eight,ten:Rt.Msg.MATH_Behind_ten,sixteen:Rt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},TR={init:function(){var t=[[Rt.Msg.LANG_MATH_INT,"int"],[Rt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(nR),this.setOutput(!0,Number),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Rt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Rt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT).appendField(Rt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:Rt.Msg.LANG_MATH_INT,float:Rt.Msg.LANG_MATH_FLOAT_RANDOM};return Rt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},hR={init:function(){this.setColour(nR),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Rt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Rt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Rt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MATH_CONSTRAIN_TOOLTIP)}},mR={init:function(){this.setColour(nR),this.appendValueInput("NUM",Number).appendField(Rt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Rt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Rt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},OR={init:function(){this.setColour(nR),this.appendDummyInput().appendField(new Rt.FieldTextInput("0",Rt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Rt.Msg.MATH_NUMBER_TOOLTIP)}},cR={init:function(){this.setColour(nR),this.appendValueInput("NUM").setCheck(Number).appendField(Rt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},RR=mR,MR="#2E9883",ER={init:function(){this.setColour(MR),this.appendDummyInput().appendField("NES 初始化"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("PS2手柄"),this.appendValueInput("miso_pin",Number).setAlign(Rt.inputs.Align.RIGHT).appendField("DAT#").setCheck(Number),this.appendValueInput("mosi_pin",Number).setAlign(Rt.inputs.Align.RIGHT).appendField("CMD#").setCheck(Number),this.appendValueInput("cs_pin",Number).setAlign(Rt.inputs.Align.RIGHT).appendField("SEL#").setCheck(Number),this.appendValueInput("clk_pin",Number).setAlign(Rt.inputs.Align.RIGHT).appendField("CLK#").setCheck(Number),this.appendValueInput("vol").setAlign(Rt.inputs.Align.RIGHT).appendField("音量").setCheck(Number),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("初始化NES,使用PS2手柄控制")}},CR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("NES 初始化"),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("UART键盘"),this.appendValueInput("vol").setAlign(Rt.inputs.Align.RIGHT).appendField("音量").setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("初始化NES,使用串口键盘控制")}},AR={init:function(){this.setColour(MR),this.appendDummyInput().appendField("NES 运行游戏"),this.appendValueInput("path").appendField("路径").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("运行NES游戏ROM")}},gR="#5B6DA5",SR={init:function(){this.setColour(gR),this.appendDummyInput().appendField("ESP-AT 初始化"),this.appendValueInput("RX",Number).appendField("RX#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("TX",Number).appendField("TX#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("使用串口连接ESP-AT设备,并初始化配置")}},DR={init:function(){this.setColour(gR),this.appendDummyInput().appendField("WiFi扫描"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("扫描附近可用的WiFi信息-返回多信息列表")}},NR={init:function(){this.setColour(gR),this.appendDummyInput("").appendField("WiFi连接"),this.appendValueInput("account").appendField("名称").setCheck(String),this.appendValueInput("password").appendField("密码").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("配置WiFi名称及密码,连接WiFi上网")}},LR={init:function(){this.setColour(gR),this.appendDummyInput().appendField("WiFi").appendField(new Rt.FieldDropdown([["连接信息","1"],["连接状态","2"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("查看wifi连接信息或者连接状态")}},fR={init:function(){this.setColour(gR),this.appendDummyInput().appendField("WiFi断开连接"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("断开wifi连接")}},FR={init:function(){this.setColour(gR),this.appendDummyInput("").setAlign(Rt.inputs.Align.RIGHT).appendField("打开热点"),this.appendValueInput("account").setAlign(Rt.inputs.Align.RIGHT).appendField("名称").setCheck(String),this.appendValueInput("password").setAlign(Rt.inputs.Align.RIGHT).appendField("密码").setCheck(String),this.appendValueInput("chl").setAlign(Rt.inputs.Align.RIGHT).appendField("通道").setCheck(Number),this.appendDummyInput().setAlign(Rt.inputs.Align.RIGHT).appendField("加密").appendField(new Rt.FieldDropdown([["WPA2_PSK","WPA2_PSK"],["OPEN","OPEN"],["WPA_PSK","WPA_PSK"],["WPA_WPA2_PSK","WPA_WPA2_PSK"]]),"mode"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("打开WiFi热点并配置")}},vR={init:function(){this.setColour(gR),this.appendDummyInput().appendField("关闭热点"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("关闭热点")}},PR={init:function(){this.setColour(gR),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("套接字 初始化"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("套接字初始化")}},VR={init:function(){this.setColour(gR),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("获取地址"),this.appendValueInput("addr").setAlign(Rt.inputs.Align.RIGHT).appendField("域名").setCheck(String),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("套接字根据域名解析地址IP信息")}},yR={init:function(){this.setColour(gR),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("创建连接"),this.appendValueInput("address").appendField("地址"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("套接字创建目标IP地址连接")}},YR={init:function(){this.setColour(gR),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("超时时间"),this.appendValueInput("time").setAlign(Rt.inputs.Align.RIGHT).appendField("").setCheck(Number),this.appendDummyInput().appendField("s"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("设置阻塞套接字超时时间")}},bR={init:function(){this.setColour(gR),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendValueInput("content").appendField("发送数据"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip("套接发送数据")}},kR={init:function(){this.setColour(gR),this.appendValueInput("VAR").appendField("").setCheck("var"),this.appendDummyInput().appendField("接收数据"),this.appendValueInput("size").appendField("字节").setCheck(Number),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("套接接收数据,返回接收到的数据对象")}},XR={init:function(){this.setColour(gR),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},GR=230,xR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.digital),"PIN"),this.setOutput(!0)}},UR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},HR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.analog),"PIN"),this.setOutput(!0)}},BR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},wR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.dac),"PIN"),this.setOutput(!0)}},WR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},KR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},jR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},QR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},qR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},JR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.touch),"PIN"),this.setOutput(!0)}},zR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},ZR={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},$R={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},tM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},eM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},iM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},nM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},sM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},oM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},pM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},uM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},aM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},lM={init:function(){this.setColour(GR),this.appendDummyInput("").appendField(new Rt.FieldDropdown(Mt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},_M=40,rM={init:function(){this.setColour(_M),this.appendDummyInput("").appendField(new Rt.FieldDropdown([["A","17"],["B","16"]]),"KEY"),this.setOutput(!0),this.setTooltip()}},dM={init:function(){this.setColour(_M),this.appendDummyInput().appendField("初始化"),this.appendValueInput("key").appendField("按键"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化按键")}},IM={init:function(){this.setColour(_M),this.appendValueInput("key").appendField("按键"),this.appendDummyInput().appendField("被按下?"),this.setInputsInline(!0),this.setOutput(!0,[Boolean,Number]),this.setTooltip("获取按键值")}},TM={init:function(){this.setColour(_M),this.appendDummyInput().appendField("DHT11"),this.appendValueInput("PIN",Number).appendField(Rt.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField("获取").appendField(new Rt.FieldDropdown([["温度-℃","0"],["湿度-%","1"],["温湿度","2"]]),"TYPE"),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip("dht11,获取温湿度")}},hM={init:function(){this.setColour(_M),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_CHAOSHENGBO),this.appendValueInput("PIN1",Number).appendField("Trig #").setCheck(Number),this.appendValueInput("PIN2",Number).appendField("Echo #").setCheck(Number),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_CHAOSHENGBO)}},mM={init:function(){this.setColour(_M),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Rt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Rt.Msg.MIXLY_MICROBIT_Direction,s=Rt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Rt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},OM={init:function(){this.setColour(_M),this.appendValueInput("I2CSUB").appendField(Rt.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(Rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Rt.Msg.MIXLY_SETUP+Rt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new Rt.FieldDropdown([["MPU9250","MPU9250"],["BMP280","BMP280"],["SHT20","SHT20"],["ADXL345","ADXL345"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("MPU9250","key");var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return Rt.Msg.MIXLY_ESP32_SENSOR_USE_I2C_TOOLTIP+{MPU9250:"MPU9250",SHT20:"SHT20",BMP280:"BMP280",ADXL345:"ADXL345"}[e]}))}},cM={init:function(){this.setColour(_M),this.appendValueInput("SUB").appendField("BMP280").setCheck("var"),this.appendDummyInput("").appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[Rt.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":Rt.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":Rt.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},RM={init:function(){this.setColour(_M),this.appendValueInput("SUB").appendField("SHT20").setCheck("var"),this.appendDummyInput("").appendField(new Rt.FieldDropdown([[Rt.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[Rt.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":Rt.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":Rt.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},MM={init:function(){this.setColour(_M),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_JS_GET+Rt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new Rt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Rt.Msg.MIXLY_MICROBIT_Direction,s=Rt.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":Rt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},EM={init:function(){this.setColour(_M),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Rt.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Rt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Rt.Msg.MIXLY_MICROBIT_Direction,s=Rt.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":Rt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},CM={init:function(){this.setColour(_M),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_GETTEMPERATUE)}},AM={init:function(){this.setColour(_M),this.appendValueInput("SUB").appendField("ADXL345").setCheck("var"),this.appendDummyInput().appendField(Rt.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Rt.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Rt.Msg.MIXLY_MICROBIT_Direction,s=Rt.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Rt.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},gM=65,SM={init:function(){this.setColour(gM),this.appendValueInput("CONTENT",String).appendField("Serial").appendField(new Rt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Rt.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.TEXT_PRINT_TOOLTIP)}},DM={init:function(){this.setColour(gM),this.appendValueInput("CONTENT",String).appendField("Serial").appendField(new Rt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Rt.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.TEXT_PRINT_Huanhang_TOOLTIP+Rt.Msg.TEXT_PRINT_TOOLTIP)}},NM={init:function(){this.setColour(gM),this.appendDummyInput().appendField("Serial").appendField(new Rt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Rt.Msg.MIXLY_SERIAL_PRINTLN),this.appendValueInput("CONTENT",Number).appendField(new Rt.FieldDropdown([[Rt.Msg.MATH_BIN,"bin"],[Rt.Msg.MATH_OCT,"oct"],[Rt.Msg.MATH_DEC,"int"],[Rt.Msg.MATH_HEX,"hex"]]),"STAT").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setFieldValue("hex","STAT"),this.setTooltip(Rt.Msg.TEXT_PRINT_HEX_TOOLTIP)}},LM={init:function(){this.setColour(gM),this.appendValueInput("char_marker").setCheck(String).appendField(Rt.Msg.MIXLY_MICROBIT_JS_SERIAL_WHEN_CONTAIN_DATA),this.appendStatementInput("DO").appendField(Rt.Msg.MIXLY_DO)}},fM={init:function(){this.setColour(gM),this.appendDummyInput().appendField("Serial").appendField(new Rt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Rt.Msg.MIXLY_SERIAL_READSTR),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_TOOLTIP_BLOCKGROUP_SERIAL_READ_STR)}},FM={init:function(){this.setColour(gM),this.appendDummyInput().appendField("Serial").appendField(new Rt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Rt.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Boolean),this.setTooltip(Rt.Msg.MIXLY_SERIAL_AVAILABLE1)}},vM={init:function(){this.setColour(gM),this.appendDummyInput().appendField("Serial").appendField(new Rt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField(Rt.Msg.MIXLY_ESP32_READ_LINE),this.setOutput(!0,String),this.setTooltip(Rt.Msg.MIXLY_MICROBIT_JS_SERIAL_READ_LINE1)}},PM={init:function(){this.setColour(gM),this.appendDummyInput().appendField("Serial "+Rt.Msg.MIXLY_SERIAL_READSTR_UNTIL).appendField(new Rt.FieldDropdown([["new line","serial.delimiters(Delimiters.NewLine)"],[",","serial.delimiters(Delimiters.Comma)"],["$","serial.delimiters(Delimiters.Dollar)"],[":","serial.delimiters(Delimiters.Colon)"],[".","serial.delimiters(Delimiters.Fullstop)"],["#","serial.delimiters(Delimiters.Hash)"]]),"char_marker"),this.setInputsInline(!0),this.setOutput(!0,String)}},VM={init:function(){this.setColour(gM),this.appendValueInput("RX",Number).appendField(Rt.Msg.MIXLY_SETUP).appendField(new Rt.FieldDropdown([["uart1","1"],["uart2","2"],["uart3","3"]]),"mode").appendField("RX#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendValueInput("TX",Number).appendField("TX#").setCheck(Number).setAlign(Rt.inputs.Align.RIGHT),this.appendDummyInput().appendField(Rt.Msg.MIXLY_SERIAL_BEGIN).appendField(new Rt.FieldDropdown([["115200","115200"],["57600","57600"],["37400","38400"],["31250","31250"],["28800","28800"],["19200","19200"],["14400","14400"],["9600","9600"],["4800","4800"],["2400","2400"],["1200","1200"],["300","300"]]),"baudrate"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_SERIAL_softserial)}},yM={init:function(){this.setColour(gM),this.appendValueInput("VAR").appendField(Rt.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(Rt.Msg.INOUT_input_TOOLTIP)}},YM={init:function(){this.setColour(gM),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.BLOCKPY_PRINT_TOOLTIP)}},bM={init:function(){this.setColour(gM),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Rt.Msg.TEXT_PRINT_TOOLTIP)}},kM={init:function(){this.setColour(gM),this.appendValueInput("VAR").appendField(Rt.Msg.MIXLY_SERIAL_PRINT),this.appendValueInput("END").appendField(Rt.Msg.MIXLY_ENDSWITH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Rt.Msg.MIXLY_PYTHON_INOUT_PRINT_END_TOOLTIP)}},XM={init:function(){this.setColour(gM),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Rt.icons.MutatorIcon(["system_print_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Rt.Msg.MIXLY_MIXPY_INOUT_PRINT_MANY_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("system_print_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n {\n"+e.statementToCode(this,"do")+"})\n"},ED=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||Mt.Profile.default.serial)+")\n"},CD=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Mt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Mt.Profile.default.serial)+")\n"},AD=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||Mt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||Mt.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},gD=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},SD=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},DD=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},ND=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},LD=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},fD=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},FD=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},vD=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},PD=function(){return"while True:\n pass\n"},VD=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},yD=function(t,e){e.definitions_["import machine"]="import machine";return"machine.reset()\n"},YD=function(t,e){return e.definitions_["import gc"]="import gc",this.getFieldValue("gc")+"\n"},bD=function(t,e){return e.definitions_.import_os="import os","os.uname()"},kD=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},XD=function(t,e){e.definitions_["from machine import Timer"]="from machine import Timer";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=i%3,s=parseInt(i/3),o=e.valueToCode(this,"period",e.ORDER_NONE);return"tim"+i+" =Timer(Timer.TIMER"+n+",Timer.CHANNEL"+s+",mode=Timer.MODE_"+this.getFieldValue("mode")+",period = "+o+", callback = "+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},GD=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},xD=function(t,e){e.definitions_["from machine import Timer"]="from machine import Timer";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"tim"+i+" = Timer(Timer.TIMER"+i%3+",Timer.CHANNEL"+parseInt(i/3)+", mode=Timer.MODE_PWM)\n"},UD=xD,HD=XD,BD=GD,wD=kD;const WD=function(t,e){return["["+this.getFieldValue("TEXT")+"]",e.ORDER_ATOMIC]},KD=function(t,e){return["("+this.getFieldValue("TEXT")+")",e.ORDER_ATOMIC]},jD=function(t,e){var i=this.getFieldValue("COLOR");return["("+("0x"+(i=i.substr(1)).substr(0,2))+","+("0x"+i.substr(2,2))+","+("0x"+i.substr(4,2))+")",e.ORDER_ATOMIC]},QD=function(t,e){var i=this.getFieldValue("COLOR");return[i=function(t){var e,i,n;e=(t=t.substr(1)).substr(0,2),i=t.substr(2,2),n=t.substr(4,2);var s=(64512&(t="0x"+(t=e+i+n)))>>10;return((248&t)>>3<<8)+((7&s)<<13)+((16252928&t)>>19<<3)+((56&s)>>3)}(i),e.ORDER_ATOMIC]};Object.assign(Rt.Variables,Ct),Object.assign(Rt.Procedures,yl),Rt.Python=Yl,Rt.generator=Yl,Mt.Profile.default={},Object.assign(Mt.Profile,$T),Object.assign(Mt.Profile.default,$T.k210),Object.assign(Rt.Blocks,e,i,n,s,o,p,u,a,l,_,r,d,I,F,f,L,N,Y,b,k,X,G,x,U,H,B,w,W,K,j,Q,q,J,z,Z,$),Object.assign(Rt.Python.forBlock,T,h,m,O,c,R,M,E,C,A,g,S,D,y,V,P,v,tt,et,it,nt,st,ot,pt,ut,at,lt,_t,rt,dt,It,Tt,ht,mt,Ot,ct)})(); \ No newline at end of file diff --git a/boards/default/micropython_nrf51822_microbit/index.xml b/boards/default/micropython_nrf51822_microbit/index.xml index fe193270..641aa8df 100644 --- a/boards/default/micropython_nrf51822_microbit/index.xml +++ b/boards/default/micropython_nrf51822_microbit/index.xml @@ -1 +1 @@ -0210000,1,2,3051i23390x151100a10.998124.82110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyprompt1011580020001110000039501000010011*255500mylist4120MixlyMixly 0.999 is great!64721281281621112040000MixlyMixly1201201>0x2711clear()oledExample1Example2Example3Example4filename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0192010000000000323760x756269740Mixlyresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponse \ No newline at end of file +0210000,1,2,3051i23390x151100a10.998124.82110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyprompt1011580020001110000039501000010011*255500mylist4120MixlyMixly 0.999 is great!64721281281621112040000MixlyMixly1201201>0x2711clear()oledExample1Example2Example3Example4filename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0192010000000000323760x756269740Mixlyresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponse \ No newline at end of file diff --git a/boards/default/micropython_nrf51822_microbit/main.bundle.fe389a90.js b/boards/default/micropython_nrf51822_microbit/main.bundle.8004de6a.js similarity index 55% rename from boards/default/micropython_nrf51822_microbit/main.bundle.fe389a90.js rename to boards/default/micropython_nrf51822_microbit/main.bundle.8004de6a.js index 23294ebc..cf43ad2e 100644 --- a/boards/default/micropython_nrf51822_microbit/main.bundle.fe389a90.js +++ b/boards/default/micropython_nrf51822_microbit/main.bundle.8004de6a.js @@ -18,4 +18,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -class ${constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Q.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Q.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_if_else");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Q.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(Q.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Ot={init:function(){this.setColour(It),this.appendValueInput("FROM").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.PYTHON_RANGE).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},ct={init:function(){this.setColour(It),this.appendValueInput("LIST").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Q.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Q.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Et={init:function(){this.setColour(It),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Q.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Q.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Q.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Rt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Q.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Q.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_finally");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},gt={init:function(){this.setColour(It);var t=new Q.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Ct={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Q.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Q.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},At={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Q.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Q.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Et.OPERATORS=[[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],gt.OPERATORS=[[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Lt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Q.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},St={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},ft={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Q.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Dt={init:function(){this.setColour(It),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},Nt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Q.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Pt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Q.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Ft={init:function(){this.jsonInit({message0:Q.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:It,tooltip:Q.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Q.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},vt={init:function(){this.setColour(It),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_STAT),this.setOutput(!0)}},Yt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},bt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Q.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},Xt={init:function(){this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Q.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Q.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Q.FieldDropdown([[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(It),this.setTooltip("do-while loop"),this.setHelpUrl("")}},yt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},Bt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},Gt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET+Q.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_GET_UNIQUE_IDEN)}},Ut={init:function(){this.setColour(It),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Q.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},kt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},wt=230;Q.FieldTextInput.math_number_validator=function(t){return String(t)},Q.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const xt={init:function(){this.setColour(wt),this.appendDummyInput().appendField(new Q.FieldTextInput("0",Q.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MATH_NUMBER_TOOLTIP)}},Ht={init:function(){this.setColour(wt);this.appendDummyInput("").appendField(Q.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Q.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Wt={init:function(){this.setColour(wt);this.appendDummyInput("").appendField(Q.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Q.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Kt={init:function(){this.setColour(wt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Q.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Q.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Q.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Jt={init:function(){this.setColour(wt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Q.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Q.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Q.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},jt={init:function(){this.setColour(wt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Q.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Qt={init:function(){this.setColour(wt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Q.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Q.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Q.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Q.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Q.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Q.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Q.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Q.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},qt={init:function(){var t=[[Q.Msg.MATH_BIN,"bin"],[Q.Msg.MATH_OCT,"oct"],[Q.Msg.MATH_HEX,"hex"]];this.setColour(wt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Q.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:Q.Msg.MATH_DEC_TOOLTIP_BIN,oct:Q.Msg.MATH_DEC_TOOLTIP_OCT,hex:Q.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},zt={init:function(){var t=[[Q.Msg.LANG_MATH_TO_ROUND,"round"],[Q.Msg.LANG_MATH_TO_CEIL,"ceil"],[Q.Msg.LANG_MATH_TO_FLOOR,"floor"],[Q.Msg.MATH_ABS,"fabs"],[Q.Msg.MATH_SQRT,"sqrt"]];this.setColour(wt),this.appendValueInput("A").setCheck(Number).appendField(new Q.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Q.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Q.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Q.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Q.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Q.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Q.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Zt={init:function(){var t=[[Q.Msg.MIXLY_MAX,"max"],[Q.Msg.MIXLY_MIN,"min"]];this.setColour(wt),this.appendValueInput("A").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(new Q.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Q.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Q.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Q.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},$t={init:function(){var t=[[Q.Msg.MATH_TWO,"two"],[Q.Msg.MATH_EIGHT,"eight"],[Q.Msg.MATH_TEN,"ten"],[Q.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(wt),this.appendDummyInput("").appendField(Q.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Q.FieldDropdown(t),"OP").appendField(Q.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.MATH_ZHW).appendField(new Q.FieldDropdown(t),"OP2").appendField(Q.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:Q.Msg.MATH_Before_two,eight:Q.Msg.MATH_Before_eight,ten:Q.Msg.MATH_Before_ten,sixteen:Q.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:Q.Msg.MATH_Behind_two,eight:Q.Msg.MATH_Behind_eight,ten:Q.Msg.MATH_Behind_ten,sixteen:Q.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},te={init:function(){var t=[[Q.Msg.LANG_MATH_INT,"int"],[Q.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(wt),this.setOutput(!0,Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Q.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:Q.Msg.LANG_MATH_INT,float:Q.Msg.LANG_MATH_FLOAT_RANDOM};return Q.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},ee={init:function(){this.setColour(wt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Q.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Q.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Q.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Q.Msg.MATH_CONSTRAIN_TOOLTIP)}},ie={init:function(){this.setColour(wt),this.appendValueInput("NUM",Number).appendField(Q.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Q.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Q.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_MATH_MAP)}},ne={init:function(){this.setColour(wt),this.appendDummyInput().appendField(new Q.FieldTextInput("0",Q.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Q.Msg.MATH_NUMBER_TOOLTIP)}},se={init:function(){this.setColour(wt),this.appendValueInput("NUM").setCheck(Number).appendField(Q.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},oe={init:function(){this.setColour(wt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Q.Msg.MATH_ROUND).appendField(Q.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Q.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Q.Msg.MATH_ROUND_NEW_TOOLTIP)}},_e={init:function(){var t=[[Q.Msg.MIXLY_TO_INT,"int"],[Q.Msg.MIXLY_TO_FLOAT,"float"],[Q.Msg.MIXLY_TO_BITES,"b"],[Q.Msg.LANG_MATH_BYTE+Q.Msg.MIXLY_TO_INT,"bti"]];this.setColour(wt),this.appendValueInput("VAR").appendField(new Q.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Q.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Q.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Q.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ue={init:function(){var t=[[Q.Msg.MIXLY_TO_INT,"int"],[Q.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(wt),this.appendValueInput("VAR").appendField(new Q.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Q.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Q.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},re=ie,pe={init:function(){this.setColour(wt),this.appendValueInput("VAR").appendField(Q.Msg.LANG_MATH_BYTE+Q.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},ae={init:function(){this.setColour(wt),this.itemCount_=1,this.setMutator(new Q.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(Q.Msg.MIXLY_PRODUCT+Q.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(Q.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(Q.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const Me={init:function(){this.setColour(de),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Q.FieldTextInput("",Q.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Q.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new Q.FieldImage(e,7,12,'"')}},me={init:function(){this.setColour(de),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Q.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},Oe={init:function(){this.setColour(de),this.appendValueInput("VAR").setCheck(Number).appendField(Q.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},ce={init:function(){this.setColour(de),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Ee={init:function(){this.setColour(de),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Re={init:function(){this.setColour(de),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},ge={init:function(){this.WHERE_OPTIONS=[[Q.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Q.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Q.Msg.TEXT_GET_INDEX_RANDOM+1+Q.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Q.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(de),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Q.Msg.LISTS_GET_INDEX_GET,"MODE"),Q.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Q.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+Q.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Q.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:Q.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Q.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Q.Msg.TEXT_GET_INDEX_RANDOM};return Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+Q.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==Q.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),Q.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Q.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new Q.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),Q.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Ce={init:function(){this.setHelpUrl(Q.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(de),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Q.Msg.LISTS_GET_INDEX_GET+" "+Q.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Q.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+Q.Msg.LISTS_GET_INDEX_FROM_START+"n"+Q.Msg.TEXT_CHARAT2)}},Ae={init:function(){this.setHelpUrl(Q.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(de),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Q.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Q.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Le={init:function(){this.WHERE_OPTIONS_1=[[Q.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Q.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Q.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Q.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Q.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Q.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Q.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(de),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(Q.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==Q.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==Q.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),Q.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(Q.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new Q.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Se={init:function(){this.setHelpUrl(Q.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(de),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Q.Msg.LISTS_GET_INDEX_GET+" "+Q.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Q.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Q.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Q.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},fe={init:function(){var t=[[Q.Msg.MIXLY_EQUALS,"==="],[Q.Msg.MIXLY_STARTSWITH,"startswith"],[Q.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(de),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Q.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},De={init:function(){this.setColour(de),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Q.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_COMPARETO_HELP)}},Ne={init:function(){var t=[[Q.Msg.TEXT_UPPER,"upper"],[Q.Msg.TEXT_TITLE,"title"],[Q.Msg.TEXT_CAPITALIZE,"capitalize"],[Q.Msg.TEXT_SWAPCASE,"swapcase"],[Q.Msg.TEXT_LOWER,"lower"]];this.setColour(de),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:Q.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Q.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Q.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Q.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Q.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Pe={init:function(){var t=[[Q.Msg.TEXT_LJUST,"ljust"],[Q.Msg.TEXT_CENTER,"center"],[Q.Msg.TEXT_RJUST,"rjust"]];this.setColour(de),this.appendValueInput("VAR").appendField(new Q.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Q.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Q.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Fe={init:function(){this.setColour(de),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Q.Msg.MIXLY_MID+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Q.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ve={init:function(){this.setColour(de),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Ye={init:function(){this.setColour(de),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Q.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Q.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},be={init:function(){this.setColour(de),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Q.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Q.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},Xe={init:function(){var t=[[Q.Msg.TEXT_TRIM_BOTH,"strip"],[Q.Msg.TEXT_TRIM_LEFT,"lstrip"],[Q.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(de),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Q.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Q.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(Q.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:Q.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Q.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Q.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},ye={init:function(){this.setColour(de),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Q.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Q.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},vi={init:function(){this.setColour(Pi),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Q.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Yi={init:function(){this.setColour(Pi),this.appendDummyInput().appendField(Q.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},bi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_KEYS),this.setTooltip(Q.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Xi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Q.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Q.Msg.DICTS_GET_TOOLTIP)}},yi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Q.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Q.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Q.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},Vi={init:function(){this.setColour(Pi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Q.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Bi={init:function(){this.setColour(Pi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Q.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_DELETE_TOOLTIP)}},Gi={init:function(){this.setColour(Pi),this.appendValueInput("DICT2").setCheck("Dict").appendField(Q.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Q.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MID),this.setTooltip(Q.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ui={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_CLEAR),this.setTooltip(Q.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ki={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_ITEMS),this.setTooltip(Q.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},wi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_VALUES),this.setTooltip(Q.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},xi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_LENGTH),this.setTooltip(Q.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Hi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_DELDICT),this.setTooltip(Q.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Wi={init:function(){this.MODE=[[Q.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Q.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Q.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Q.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=Q.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=Q.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==Q.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new Q.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},Ki={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Q.Msg.DICTS_ADD_VALUE),this.setTooltip(Q.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},Ji={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Q.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_SETDEFAULT_TOOLTIP)}},ji={init:function(){this.setColour(Pi),this.appendDummyInput("").appendField(new Q.FieldLabel(Q.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new Q.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Q.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Qi={init:function(){this.setColour(Pi),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},qi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_TO_JSON),this.setTooltip(Q.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},zi={init:function(){this.setColour(Pi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Q.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Zi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},$i={init:function(){this.setColour(Pi),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_TO_JSON),this.setTooltip(Q.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},tn=210,en={init:function(){var t=Q.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:Q.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Q.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Q.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Q.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Q.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Q.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},nn={init:function(){var t=Q.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=Q.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new Q.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},sn={init:function(){var t=[[Q.Msg.LOGIC_OPERATION_AND,"AND"],[Q.Msg.LOGIC_OPERATION_OR,"OR"],[Q.Msg.LOGIC_OPERATION_NOR,"NOR"],[Q.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:Q.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Q.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Q.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Q.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},on={init:function(){this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Q.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Q.Msg.LOGIC_NEGATE_TOOLTIP)}},_n={init:function(){var t=[[Q.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Q.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Q.FieldDropdown(t),"BOOL"),this.setTooltip(Q.Msg.LOGIC_BOOLEAN_TOOLTIP)}},un={init:function(){this.setColour(tn),this.setOutput(!0),this.appendDummyInput().appendField(Q.Msg.LOGIC_NULL),this.setTooltip(Q.Msg.LOGIC_NULL_TOOLTIP)}},rn={init:function(){this.setColour(tn),this.appendValueInput("A"),this.appendValueInput("B").appendField(Q.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Q.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},pn={init:function(){var t=[[Q.Msg.TEXT_APPEND_TO,"in"],[Q.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(tn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Q.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(Q.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.IN)}},an={init:function(){var t=[[Q.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Q.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(tn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},ln={init:function(){this.setColour(tn),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},In={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Q.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},dn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_USE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Q.Msg.MIXLY_BELONG;return i+{r:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Tn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_USE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Q.Msg.MIXLY_BELONG,_=Q.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},hn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Q.Msg.MIXPY_TEXT_ENCODE).appendField(new Q.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_USE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Q.Msg.MIXLY_BELONG,_=Q.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},Mn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},mn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},On={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},cn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Q.Msg.MICROBIT_PYTHON_TYPE)}},En={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.HTML_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Rn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},gn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Cn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const An={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Ln={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Sn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},fn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},Dn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Nn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Q.Msg.MIXLY_ESP32_SET+{mkdir:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Pn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Q.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Fn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},vn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.HTML_FILE,"isfile"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Yn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Q.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_SETUP+Q.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Q.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},bn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Q.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Xn={init:function(){var t=Q.Procedures.findLegalName("",this),e=new Q.FieldTextInput(t,Q.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new Q.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Q.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Q.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(Q.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(Q.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(Q.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=Q.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),Q.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{Q.Events.enable()}},mutationToDom:function(t){var e=Q.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(Q.Msg.MIXLY_AIP_ATTR).setAlign(Q.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ns={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(Q.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Ps={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(Q.Msg.HTML_FORM_CONTENT).appendField(new Q.FieldDropdown([[Q.Msg.HTML_TEXT,"text"],[Q.Msg.HTML_EMAIL,"email"],[Q.Msg.HTML_NUMBER,"number"],[Q.Msg.HTML_PASSWORD,"password"],[Q.Msg.HTML_CHECKBOX,"checkbox"],[Q.Msg.HTML_RADIOBUTTON,"radiobutton"],[Q.Msg.HTML_BUTTON,"button"],[Q.Msg.HTML_COLOUR,"colour"],[Q.Msg.HTML_DATE,"date"],[Q.Msg.HTML_LOCALTIME,"local time"],[Q.Msg.HTML_FILE,"file"],[Q.Msg.HTML_HIDDEN,"hidden"],[Q.Msg.HTML_IMAGE,"image"],[Q.Msg.HTML_MONTH,"month"],[Q.Msg.HTML_RANGE,"range"],[Q.Msg.HTML_RESET,"reset"],[Q.Msg.HTML_SEARCH,"search"],[Q.Msg.HTML_SUBMIT,"submit"],[Q.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Q.Msg.HTML_TIME,"time"],[Q.Msg.HTML_URL,"url"],[Q.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Q.Msg.HTML_NAME).appendField(new Q.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Q.Msg.HTML_VALUE).appendField(new Q.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Q.Msg.MIXLY_AIP_ATTR).setAlign(Q.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fs={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(new Q.FieldTextInput("property"),"KEY").appendField(":").appendField(new Q.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vs={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(new Q.FieldTextInput("property"),"KEY").appendField(":").appendField(new Q.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ys={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(Q.Msg.HTML_TEXT).appendField(new Q.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bs=160,Xs={init:function(){this.setColour(bs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Q.FieldTable(""),"TEXT")}},ys={init:function(){this.setColour(bs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Q.FieldMultilineInput(""),"TEXT")}},Vs={init:function(){this.setColour(bs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Q.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Bs={init:function(){this.setColour(bs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Gs={init:function(){this.setColour(bs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Q.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Us={init:function(){this.setColour(bs),this.appendValueInput("VALUE").appendField(Q.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},ks={init:function(){this.setColour(bs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Q.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Q.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=Q.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+r()+"("+t+", "+e+", "+i+") or "+p()+"("+t+", "+e+", "+i+")"},Q.isNumber(n)&&Q.isNumber(s)&&Q.isNumber(o))n=parseFloat(n),s=parseFloat(s),o=Math.abs(parseFloat(o)),0==n%1&&0==s%1&&0==o%1?(n<=s?(s++,t=0==n&&1==o?s:n+", "+s,1!=o&&(t+=", "+o)):t=n+", "+--s+", -"+o,t="range("+t+")"):(t=n",GTE:">="};const yu=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",o=e.valueToCode(this,"B",n)||"False";if("AND"==i)var _=s+" and "+o;else if("OR"==i)_=s+" or "+o;else if("NOR"==i)_="not("+s+"^"+o+")";else _=s+"^"+o;return[_,n]},Vu=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Bu=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Gu=function(t,e){return["None",e.ORDER_ATOMIC]},Uu=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},ku=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},wu=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},xu=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Hu=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Wu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Ku=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Ju=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ju=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Qu=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},qu=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},zu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Zu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},$u=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},tr=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},er=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},ir=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},nr=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},sr=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},or=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},_r=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ur=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},rr=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},pr=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},ar=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},lr=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Ir=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},dr=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),Q.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var o=[],_=0;_\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},jr=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Qr=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},qr=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},zr=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Zr=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},$r=function(t,e){return'"},tp=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},ep=function(){return this.getFieldValue("TEXT")+"\n"},ip=function(t){return t.getFieldValue("TEXT")+"\n"},np=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},sp=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},op=function(){return""},_p=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},up=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+"while True:\n"+r.join("")+p.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+p.join("\n")},lp.scrubNakedValue=function(t){return t+"\n"},lp.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},lp.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},lp.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Q.utils.string.wrap(o,lp.COMMENT_WRAP-3),n+=lp.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const Ip=120,dp={init:function(){this.setColour(Ip),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Q.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT).appendField(new Q.FieldDropdown(dp.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))},OPERATORS:[[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]]},Tp={init:function(){this.setColour(Ip);var t=new Q.FieldDropdown(Tp.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}},OPERATORS:[[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]]},hp="5BA5A5",Mp={init:function(){this.appendValueInput("SUB").setCheck("var"),this.setColour(hp),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(Mp.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"shift_up"],[Q.Msg.MIXLY_DOWN,"shift_down"],[Q.Msg.MIXLY_LEFT,"shift_left"],[Q.Msg.MIXLY_RIGHT,"shift_right"]]},mp={init:function(){this.appendValueInput("SUB").setCheck("var"),this.setColour(hp),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(mp.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Q.Msg.MICROBIT_DISPLAY_UNION,"add"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Op={init:function(){this.setColour(hp),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Q.FieldDropdown(Op.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE+{height:Q.Msg.MIXLY_HEIGHT,width:Q.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Q.Msg.MIXLY_HEIGHT,"height"],[Q.Msg.MIXLY_WIDTH,"width"]]},cp={init:function(){this.setColour(hp),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RECT).appendField(new Q.FieldDropdown(cp.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_OLED_RECT)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Ep={init:function(){this.setColour(hp),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Q.FieldDropdown(Ep.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Rp={init:function(){this.setColour(hp),this.appendValueInput("SUB").setCheck("var").appendField(Q.Msg.MSG.catOLED),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(Rp.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"shift_up"],[Q.Msg.MIXLY_DOWN,"shift_down"],[Q.Msg.MIXLY_LEFT,"shift_left"],[Q.Msg.MIXLY_RIGHT,"shift_right"]]},gp="#569A98",Cp={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Cp.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gp),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(32).fill(0)))},Ap={init:function(){this.setColour(gp),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(Ap.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Q.Msg.MICROBIT_DISPLAY_UNION,"add"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Lp={init:function(){this.setColour(gp),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(Lp.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);q.Boards.getSelectedBoardKey();"Python ESP32-S3"===q.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Q.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:Q.Msg.MIXLY_UP,shift_down:Q.Msg.MIXLY_DOWN,shift_left:Q.Msg.MIXLY_LEFT,shift_right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"shift_up"],[Q.Msg.MIXLY_DOWN,"shift_down"],[Q.Msg.MIXLY_LEFT,"shift_left"],[Q.Msg.MIXLY_RIGHT,"shift_right"]]},Sp={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Sp.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gp),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},fp={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(fp.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gp),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},Dp={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Dp.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gp),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},Np={init:function(){this.setColour(gp),this.appendDummyInput().appendField(Q.Msg.OLED_SET_FONT).appendField(new Q.FieldDropdown(Np.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+Q.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+Q.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+Q.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Pp={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Pp.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gp),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},Fp={init:function(){this.setColour(gp),this.appendDummyInput().appendField(Q.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new Q.FieldDropdown(Fp.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[Q.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[Q.Msg.CLOCKWISE+"90"+Q.Msg.blockpy_setheading_degree,"1"],[Q.Msg.CLOCKWISE+"180"+Q.Msg.blockpy_setheading_degree,"2"],[Q.Msg.CLOCKWISE+"270"+Q.Msg.blockpy_setheading_degree,"3"]]},vp={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(vp.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gp),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},Yp=180,bp={init:function(){this.setColour(Yp),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(Q.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(bp.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"up"],[Q.Msg.MIXLY_DOWN,"down"],[Q.Msg.MIXLY_LEFT,"left"],[Q.Msg.MIXLY_RIGHT,"right"]]},Xp={init:function(){this.setColour(Yp),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(Xp.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Q.Msg.MICROBIT_DISPLAY_UNION,"+"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},yp={init:function(){this.setColour(Yp),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Q.FieldDropdown(yp.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE+{height:Q.Msg.MIXLY_HEIGHT,width:Q.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Q.Msg.MIXLY_HEIGHT,"height"],[Q.Msg.MIXLY_WIDTH,"width"]]},Vp={init:function(){this.setColour(Yp),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RECT).appendField(new Q.FieldDropdown(Vp.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_OLED_RECT)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Bp={init:function(){this.setColour(Yp),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Q.FieldDropdown(Bp.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Gp={init:function(){this.setColour(Yp),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_DISPLAY_DRAW+Q.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new Q.FieldDropdown(Gp.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_DISPLAY_DRAW+Q.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Up=225,kp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(Q.Msg.MIXLY_NETWORK_MODE).appendField(new Q.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},wp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[Q.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=Q.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:Q.Msg.MIXLY_NETWORK_WIFI_OPEN,False:Q.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},xp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},Hp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return Q.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:Q.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},Wp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(Q.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(Q.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},Kp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_CONNECT+Q.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},Jp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[Q.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[Q.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:Q.Msg.MIXLY_ESP32_NETWORK_IP,1:Q.Msg.MIXLY_ESP32_NETWORK_MASK,2:Q.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},jp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},Qp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[Q.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},qp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(Q.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(Q.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},zp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},Zp={init:function(){this.setColour(Up),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new Q.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},$p={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},ta={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},ea={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},ia={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},na={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},sa={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},oa={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},_a={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},ua={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},ra={init:function(){this.setColour(Up),this.appendValueInput("DOMAIN").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Q.Msg.blockpy_REQUESTS_GET).appendField(new Q.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},pa={init:function(){this.appendValueInput("VAL"),this.setColour(Up),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Q.FieldDropdown(pa.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:Q.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Q.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Q.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[Q.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},aa={init:function(){this.appendValueInput("VAR").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(Up),this.appendDummyInput("").appendField(Q.Msg.blockpy_CONDUCT).appendField(new Q.FieldDropdown(aa.METHOD),"DIR"),this.appendDummyInput("").appendField(Q.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:Q.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:Q.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},la={init:function(){this.setColour(Up),this.appendDummyInput("").appendField(Q.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(Q.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},Ia={init:function(){this.setColour(Up),this.appendDummyInput("").appendField(new Q.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},da="#3288dd",Ta={init:function(){this.setColour(da),this.appendValueInput("URL").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Q.Msg.blockpy_CONDUCT).appendField(new Q.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(Q.Msg.blockpy_REQUESTS).appendField(Q.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},ha={init:function(){this.setColour(da),this.appendValueInput("URL").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Q.Msg.blockpy_CONDUCT).appendField(new Q.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(Q.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(Q.Msg.blockpy_REQUESTS+Q.Msg.OLED_STRING),this.appendDummyInput("").appendField(Q.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},Ma={init:function(){this.appendValueInput("VAL"),this.setColour(da),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Q.FieldDropdown(Ma.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[Q.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[Q.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},ma={init:function(){this.setColour(da),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(Q.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Q.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(Q.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(Q.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},Oa={init:function(){this.setColour(da),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(Q.Msg.MIXLY_EMQX_SERVER).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(Q.Msg.MIXLY_EMQX_PORT).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(Q.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Q.Msg.MIXLY_WIFI_USERNAME).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Q.Msg.MIXLY_IOT_PASSWORD).setAlign(Q.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ca={init:function(){this.setColour(da),this.appendValueInput("TOPIC").appendField(Q.Msg.MIXLY_EMQX_SUBSCRIBE+Q.Msg.MIXLY_MICROBIT_MSG).appendField(Q.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(Q.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},Ea={init:function(){this.setColour(da),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Q.Msg.MIXLY_EMQX_SUBSCRIBE+Q.Msg.MIXLY_MICROBIT_MSG).appendField(Q.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Q.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ra={init:function(){this.setColour(da),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Q.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Q.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Q.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ga={init:function(){this.setColour(da),this.appendDummyInput().appendField("mqtt"+Q.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},Ca="#A58C5B",Aa={init:function(){this.setColour(Ca),this.appendValueInput("PIN",Number).appendField(new Q.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Q.FieldDropdown(Aa.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Q.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Q.Msg.MIXLY_GETHUMIDITY,"humidity"]]},La={init:function(){this.setColour(Ca),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_GETTEMPERATUE)}},Sa={init:function(){this.setColour(Ca),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[Q.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return Q.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:Q.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},fa=(Q.Msg.PS2_TRIANGLE,Q.Msg.PS2_CIRCLE,Q.Msg.PS2_CROSS,Q.Msg.PS2_SQUARE,Q.Msg.PS2_L1,Q.Msg.PS2_L2,Q.Msg.PS2_R1,Q.Msg.PS2_R2,Q.Msg.PS2_UP,Q.Msg.PS2_RIGHT,Q.Msg.PS2_DOWN,Q.Msg.PS2_LEFT,Q.Msg.PS2_SELECT,Q.Msg.PS2_START,{init:function(){this.setColour(Ca),this.appendDummyInput("").appendField(Q.Msg.PS2_stick).appendField(new Q.FieldDropdown(fa.PSSTK),"psstk"),this.setOutput(!0,Number),this.setTooltip("")},PSSTK:[[Q.Msg.PS2_RX,"0"],[Q.Msg.PS2_RY,"1"],[Q.Msg.PS2_LX,"2"],[Q.Msg.PS2_LY,"3"]]}),Da={init:function(){this.setColour(Ca),this.appendValueInput("SUB").appendField(Q.Msg.PS2),this.appendDummyInput("").appendField(Q.Msg.MIXLY_JOYSTICK).appendField(new Q.FieldDropdown(Da.PSSTK),"psstk"),this.setOutput(!0,Number),this.setTooltip("")},PSSTK:[[Q.Msg.PS2_RX,"RX"],[Q.Msg.PS2_RY,"RY"],[Q.Msg.PS2_LX,"LX"],[Q.Msg.PS2_LY,"LY"]]},Na="#947C54",Pa={init:function(){this.setColour(Na),this.appendValueInput("btn").appendField(Q.Msg.MIXLY_BUTTON).setCheck(Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_IS_PRESSED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_SENOR_IS_PRESSED)}},Fa={init:function(){this.setColour(Na),this.appendValueInput("btn").appendField(Q.Msg.MIXLY_BUTTON).setCheck(Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_WAS_PRESSED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_SENOR_WAS_PRESSED)}},va={init:function(){this.setColour(Na),this.appendValueInput("btn").appendField(Q.Msg.MIXLY_BUTTON).setCheck(Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(Q.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_BUTTON+Q.Msg.MIXLY_GET_PRESSES)}},Ya={init:function(){this.setColour(Na),this.appendValueInput("btn").appendField(Q.Msg.MIXLY_ESP32_INTERRUPT).appendField(Q.Msg.MIXLY_BUTTON).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Q.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Q.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},ba={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_BUTTON),this.appendDummyInput().appendField(Q.Msg.MIXLY_IS_PRESSED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_SENOR_IS_PRESSED)}},Xa={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_BUTTON),this.appendDummyInput().appendField(Q.Msg.MIXLY_WAS_PRESSED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_SENOR_WAS_PRESSED)}},ya={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_BUTTON),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(Q.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_BUTTON+Q.Msg.MIXLY_GET_PRESSES)}},Va={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_INTERRUPT).appendField(Q.Msg.MIXLY_BUTTON),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Q.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Q.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},Ba={init:function(){this.setColour(Na),this.appendValueInput("button").appendField(Q.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(Q.Msg.MIXLY_IS_TOUCHED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_sensor_pin_pressed)}},Ga={init:function(){this.setColour(Na),this.appendValueInput("button").appendField(Q.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(Q.Msg.MIXLY_IS_TOUCHED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_sensor_pin_pressed)}},Ua={init:function(){this.setColour(Na),this.appendValueInput("button").appendField(Q.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(Q.Msg.MIXLY_IS_TOUCHED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_sensor_pin_pressed)}},ka={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_TOUCH_SLIDE),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOUCH_SLIDE_TOOLTIP)}},wa={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_CHAOSHENGBO),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_CHAOSHENGBO)}},xa={init:function(){this.setColour(Na),this.appendDummyInput("").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RTCSETTIME).appendField("myRTC"),this.appendValueInput("hour").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(" "+Q.Msg.MIXLY_HOUR),this.appendValueInput("minute").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(" "+Q.Msg.MIXLY_MINUTE),this.appendValueInput("second").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(" "+Q.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!1),this.setTooltip(Q.Msg.MIXLY_RTCSETTIME+Q.Msg.MIXLY_MIX2)}},Ha={init:function(){this.setColour(Na),this.appendDummyInput("").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RTCSETDATE).appendField("myRTC"),this.appendValueInput("year").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(" "+Q.Msg.MIXLY_YEAR),this.appendValueInput("month").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(" "+Q.Msg.MIXLY_MONTH),this.appendValueInput("day").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(" "+Q.Msg.MIXLY_DAY),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_RTCSETDATE+Q.Msg.MIXLY_MIX1)}},Wa={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_CHAOSHENGBO),this.appendValueInput("PIN1",Number).appendField("Trig #").setCheck(Number),this.appendValueInput("PIN2",Number).appendField("Echo #").setCheck(Number),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_CHAOSHENGBO)}},Ka={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_LIGHT),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},Ja={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown([["1","touch1"],["2","touch2"]]),"op"),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},ja={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown([["0","0"],["1","1"],["2","2"],["3","3"]]),"op"),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Qa={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_UP,"12"],[Q.Msg.MIXLY_DOWN,"14"],[Q.Msg.MIXLY_LEFT,"13"],[Q.Msg.MIXLY_RIGHT,"15"],["A","32"],["B","33"]]),"op"),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},qa={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown([["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]]),"op"),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},za={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown([["0","0"],["1","1"],["2","2"],["3","3"]]),"op"),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Za={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown([["3","3"],["4","4"]]),"op"),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},$a={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown([["0","0"],["1","1"]]),"op"),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},tl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_EXTERN_NEAR),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Q.Msg.MIXLY_ESP32_NEAR)}},el={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown([[Q.Msg.TEXT_TRIM_LEFT,"left"],[Q.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(Q.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=Q.Msg.MIXLY_ESP32_NEAR;return i+{left:Q.Msg.TEXT_TRIM_LEFT,right:Q.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},il={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0)}},nl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown([[Q.Msg.TEXT_TRIM_LEFT,"l"],[Q.Msg.TEXT_TRIM_RIGHT,"r"]]),"direction").appendField(Q.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=Q.Msg.MIXLY_ESP32_NEAR;return i+{l:Q.Msg.TEXT_TRIM_LEFT,r:Q.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},sl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown([[Q.Msg.TEXT_TRIM_LEFT,"l"],[Q.Msg.TEXT_TRIM_RIGHT,"r"]]),"direction").appendField(Q.Msg.MIXLY_ESP32_EXTERN_LIGHT+Q.Msg.MIXLY_DATA),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=Q.Msg.MIXLY_ESP32_EXTERN_LIGHT;return i+{l:Q.Msg.TEXT_TRIM_LEFT,r:Q.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},ol={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_ESP32_EXTERN_LIGHT+Q.Msg.MIXLY_DATA),this.setOutput(!0,Number),this.setInputsInline(!0)}},_l={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_COLOR_SENSOR+Q.Msg.MIXLY_DATA),this.setOutput(!0,Number),this.setInputsInline(!0)}},ul={init:function(){this.setColour(Na),this.appendDummyInput().appendField("RTC"),this.appendDummyInput().setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RTCGETTIME),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_ESP32_RTC_GET_TIME_TOOLTIP+" (year, month, mday, hour, minute, second, weekday, yearday)")}},rl={init:function(){this.setColour(Na),this.appendValueInput("LIST").appendField(Q.Msg.MIXLY_RTCGETTIMESTAMP),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_ESP32_RTC_GET_TIMESTAMP_TOOLTIP)}},pl={init:function(){this.setColour(Na),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Q.Msg.LISTS_TO_TUPLE),this.setInputsInline(!0),this.setOutput(!0,Number)}},al={init:function(){this.setColour(Na),this.appendDummyInput().appendField("RTC"),this.appendValueInput("CONTENT").appendField(Q.Msg.MIXLY_USE_STRING_TUPLE),this.appendDummyInput().appendField(Q.Msg.MIXLY_RTCSETTIME),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ll={init:function(){this.setColour(Na),this.appendDummyInput().appendField("RTC"),this.appendValueInput("year").setCheck(Number).appendField(" "+Q.Msg.MIXLY_YEAR),this.appendValueInput("month").setCheck(Number).appendField(" "+Q.Msg.MIXLY_MONTH),this.appendValueInput("day").setCheck(Number).appendField(" "+Q.Msg.MIXLY_DAY),this.appendValueInput("hour").setCheck(Number).appendField(" "+Q.Msg.MIXLY_HOUR),this.appendValueInput("minute").setCheck(Number).appendField(" "+Q.Msg.MIXLY_MINUTE),this.appendValueInput("second").setCheck(Number).appendField(" "+Q.Msg.MIXLY_SECOND),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_RTC_SET_DATATIME_TOOLTIP)}},Il={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("RTC"),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_SETUP).setCheck("var"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_ESP32_SENSOR_RTC_INT_TOOLTIP)}},dl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_RTC_GET_TIME_STR),this.setOutput(!0,String),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_RTC_GET_TIME_TOOLTIP)}},Tl={init:function(){this.setColour(Na),this.appendValueInput("CONTENT").appendField(Q.Msg.MIXLY_GPS_TIME+Q.Msg.MIXLY_MICROBIT_TYPE_TUPLE).setCheck(),this.appendDummyInput().appendField(Q.Msg.A_TO_B+Q.Msg.MIXLY_GPS_TIME+Q.Msg.LANG_MATH_STRING),this.setOutput(!0,String),this.setInputsInline(!0)}},hl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_LIGHT),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},Ml={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_SOUND),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},ml={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_TEM_HUM+" "),this.appendDummyInput("").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Q.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:Q.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:Q.Msg.MIXLY_ESP32C3_SENSOR_AHT_HUM_TOOLTIP}[e]}))}},Ol={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0)}},cl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_Altitude+Q.Msg.MSG.catSensor+" "),this.appendDummyInput("").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_GETPRESSURE,"pressure()"],[Q.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Q.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},El={init:function(){this.setColour(Na),this.appendDummyInput().appendField("RFID"+Q.Msg.MIXLY_RFID_READ_CARD),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},Rl={init:function(){this.setColour(Na),this.appendDummyInput().appendField("RFID"+Q.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SECTOR").appendField(Q.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,Number),this.setInputsInline(!0)}},gl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Q.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Q.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Cl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Q.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Q.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(Q.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},Al={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("RFID").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_RFID_SCAN_OK,"True"],[Q.Msg.MIXLY_RFID_SCAN_NOTAGERR,"None"],[Q.Msg.MIXLY_RFID_SCAN_ERROR,"False"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ll={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Q.FieldDropdown([["x","[0]"],["y","[1]"],["z","[2]"],["(x,y,z)",""],[Q.Msg.MIXLY_STRENGTH,"strength"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Q.Msg.MIXLY_MICROBIT_Direction,s=Q.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{"[0]":"x","[1]":"y","[2]":"z","":Q.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Sl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_GET_GESTURE_ALL).appendField(new Q.FieldDropdown([[Q.Msg.ME_GO_PITCH,"[0]"],[Q.Msg.ME_GO_ROLL,"[1]"],[Q.Msg.ME_GO_PITCH+", "+Q.Msg.ME_GO_ROLL,""]]),"angle"),this.appendDummyInput(""),this.setOutput(!0,Number),this.setInputsInline(!0)}},fl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_shake,"shake"],[Q.Msg.MIXLY_UP,"up"],[Q.Msg.MIXLY_DOWN,"down"],[Q.Msg.MIXLY_LEFT,"left"],[Q.Msg.MIXLY_RIGHT,"right"],[Q.Msg.MIXLY_MICROBIT_face_up,"face up"],[Q.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=Q.Msg.MIXLY_MICROBIT_JS_CURRENT,n=Q.Msg.MSG.catSensor,s=Q.Msg.MIXLY_MICROBIT_JS_STATE,o=Q.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:Q.Msg.MIXLY_MICROBIT_shake,up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT,"face up":Q.Msg.MIXLY_MICROBIT_face_up,"face down":Q.Msg.MIXLY_MICROBIT_face_down}[e]+o}))}},Dl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Q.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Q.Msg.MIXLY_MICROBIT_Direction,s=Q.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Q.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Nl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_GET+Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new Q.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Q.Msg.MIXLY_MICROBIT_Direction,s=Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":Q.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Pl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Q.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Q.Msg.MIXLY_MICROBIT_Direction,s=Q.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":Q.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Fl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},vl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput().appendField(Q.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_GETTEMPERATUE)}},Yl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[Q.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return Q.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:Q.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},bl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},Xl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_GET+Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new Q.FieldDropdown([["x","[0]"],["y","[1]"],["z","[2]"],["(x,y,z)",""],[Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH_ALL,"all"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Q.Msg.MIXLY_MICROBIT_Direction,s=Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{"[0]":"x","[1]":"y","[2]":"z","":Q.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},yl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+Q.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Vl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},Bl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_GETTEMPERATUE),this.appendDummyInput(""),this.setOutput(!0,Number),this.setInputsInline(!0)}},Gl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_GETTEMPERATUE),this.appendDummyInput(""),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ul={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Q.FieldDropdown([["x","[0]"],["y","[1]"],["z","[2]"],["(x,y,z)",""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Q.Msg.MIXLY_MICROBIT_Direction,s=Q.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{"[0]":"x","[1]":"y","[2]":"z","":Q.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},kl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_GETTEMPERATUE)}},wl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown([[Q.Msg.TEXT_TRIM_LEFT,"1"],[Q.Msg.TEXT_TRIM_RIGHT,"2"]]),"direction").appendField(Q.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=Q.Msg.MIXLY_ESP32_NEAR;return i+{left:Q.Msg.TEXT_TRIM_LEFT,right:Q.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},xl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0),this.setInputsInline(!0)}},Hl={init:function(){this.setColour(Na),this.appendDummyInput().appendField("acc"+Q.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_ADXL345_XA,"[0]"],[Q.Msg.MIXLY_ADXL345_YA,"[1]"],[Q.Msg.MIXLY_ACC_SHAKE,"[2]"],[Q.Msg.MIXLY_ADXL345_XA+","+Q.Msg.MIXLY_ADXL345_YA+","+Q.Msg.MIXLY_ACC_SHAKE,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_ACCELERATION)}},Wl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown([[Q.Msg.TEXT_TRIM_LEFT,"[0]"],[Q.Msg.MIXGO_LEFT_MID,"[1]"],[Q.Msg.MIXGO_RIGHT_MID,"[2]"],[Q.Msg.TEXT_TRIM_RIGHT,"[3]"],[Q.Msg.MIXLY_ALL,""]]),"key").appendField(Q.Msg.MIXGO_LINE_SENSOR_VAL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Q.Msg.MIXLY_ESP32_NEAR}))}},Kl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown([[Q.Msg.MIXGO_LEFT_FRONT,"[0]"],[Q.Msg.MIXGO_RIGHT_FRONT,"[1]"],[Q.Msg.MIXGO_LEFT_BACK,"[3]"],[Q.Msg.MIXGO_RIGHT_BACK,"[2]"],[Q.Msg.MIXLY_ALL,""]]),"key").appendField(Q.Msg.MIXGO_PROXIMITY_SENSOR),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Q.Msg.MIXLY_ESP32_NEAR}))}},Jl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MIXGO_CAR_SENSOR_ONBOARD_CHANGE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MIXGO_CAR_SENSOR_ONBOARD_AUTO_CHANGE,"AS"],[Q.Msg.MIXLY_MIXGO_CAR_USE_LINE_ONLY,"LP"],[Q.Msg.MIXLY_MIXGO_CAR_USE_PROXIMITY_ONLY,"OA"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},jl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0),this.setInputsInline(!0)}},Ql={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXGO_LINE_SENSOR).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MIXBOT_LINE_SENSOR_CALIBRATE_WHITE,"WHITE"],[Q.Msg.MIXLY_MIXBOT_LINE_SENSOR_CALIBRATE_BLACK,"BLACK"],[Q.Msg.MIXLY_MIXBOT_LINE_SENSOR_CALIBRATE_RESET,"RESET_TO_FAB"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ql={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown([[Q.Msg.MIXGO_LEFT_FRONT,"[0]"],[Q.Msg.MIXGO_RIGHT_FRONT,"[1]"],[Q.Msg.MIXGO_LEFT_BACK,"[3]"],[Q.Msg.MIXGO_RIGHT_BACK,"[2]"],[Q.Msg.MIXLY_ALL,""]]),"key").appendField(Q.Msg.MIXGO_LINE_SENSOR_VAL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Q.Msg.MIXLY_ESP32_NEAR}))}},zl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_GET+Q.Msg.MIXLY_MICROBIT_Board_temperature),this.appendDummyInput(""),this.setOutput(!0,Number),this.setInputsInline(!0)}},Zl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Q.FieldDropdown([["x","[0]"],["y","[1]"],["z","[2]"],["(x,y,z)",""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Q.Msg.MIXLY_MICROBIT_Direction,s=Q.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{"[0]":"x","[1]":"y","[2]":"z","":Q.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},$l={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.ANALOG+Q.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("mode").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_LIGHT_INTENSITY+"(%)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},tI={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown(q.Profile.default.als_num),"PIN"),this.setOutput(!0,Number)}},eI=Pa,iI=Fa,nI=va,sI=Ba,oI=il,_I=Ka,uI=Aa,rI=Sa,pI=La,aI={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_EXTERN_SOUND),this.setInputsInline(!0),this.setOutput(!0)}},lI={init:function(){this.setColour(Na),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_GET).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.blockpy_set_of+Q.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.setInputsInline(!0),this.setOutput(!0)}},II={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_LIGHT_SENSOR),this.setInputsInline(!0),this.setOutput(!0)}},dI={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_GYROSCOPE_SENSOR),this.setInputsInline(!0),this.setOutput(!0)}},TI={init:function(){this.setColour(Na),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_GET).setCheck("var"),this.appendDummyInput("").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_Horizontal_inclination,"X"],["y","[1]"],["z","[2]"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},hI={init:function(){this.setColour(Na),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_GET).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_BE_SHAKED),this.setInputsInline(!0),this.setOutput(!0)}},MI={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_BUTTON).appendField(new Q.FieldDropdown([["a","a"],["b","b"],["c","c"]]),"btn"),this.setOutput(!0),this.setInputsInline(!0)}},mI={init:function(){this.setColour(Na),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_BUTTON),this.appendDummyInput().appendField(Q.Msg.MIXLY_WAS_PRESSED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_SENOR_WAS_PRESSED)}},OI={init:function(){this.setColour(Na),this.appendValueInput("PIN").appendField(Q.Msg.MIXLY_COMMUNICATION_RFID_INITIAL),this.setOutput(!0),this.setInputsInline(!0)}},cI={init:function(){this.setColour(Na),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_COMMUNICATION_RFID_READ),this.setOutput(!0),this.setInputsInline(!0)}},EI={init:function(){this.setColour(Na),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_COMMUNICATION_RFID_READ+Q.Msg.MIXLY_COMMUNICATION_DATA_FROM),this.appendDummyInput("").appendField(Q.Msg.MIXLY_GET).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_SERIAL_NUMBER,"serial_number"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},RI={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET+Q.Msg.MIXLY_THE_COPROCESSOR_VERSION),this.setOutput(!0),this.setInputsInline(!0)}},gI=40,CI={init:function(){this.setColour(gI),this.appendValueInput("PIN",Number).appendField(new Q.FieldDropdown([["DHT11","dht11"],["DHT22","dht22"]]),"TYPE").appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Q.FieldDropdown(CI.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Q.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Q.Msg.MIXLY_GETHUMIDITY,"relative_humidity"],[Q.Msg.MIXLY_DHT11_T_H,"tempandhum"]]};const AI=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+" = network.WLAN(network."+this.getFieldValue("mode")+"_IF);\n"},LI=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".connect("+e.valueToCode(this,"id",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"password",e.ORDER_ATOMIC)+")\n"},SI=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".isconnected()",e.ORDER_ATOMIC]},fI=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".ifconfig()["+this.getFieldValue("mode")+"]",e.ORDER_ATOMIC]},DI=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".disconnect()\n"},NI=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".active("+this.getFieldValue("op")+")\n"},PI=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".active()",e.ORDER_ATOMIC]},FI=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".config('"+this.getFieldValue("op")+"')",e.ORDER_ATOMIC]},vI=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".config(essid = "+e.valueToCode(this,"essid",e.ORDER_ATOMIC)+", channel="+e.valueToCode(this,"channel",e.ORDER_ATOMIC)+")\n"},YI=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".scan()",e.ORDER_ATOMIC]},bI=function(t,e){e.definitions_["import_server_*"]="from server import *";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);return"if not "+i+".isconnected():\n connectWifi(SSID, PASSWORD)\nip="+i+".ifconfig()[0]\nprint(ip)\ntime.sleep(1)\nDATA=listenData()\n"},XI=function(t,e){e.definitions_.import_network="import network",e.definitions_.import_socket="import socket";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=this.getFieldValue("mode");return"UDP"==n?n="socket.SOCK_DGRAM":"TCP"==n&&(n="socket.SOCK_STREAM"),i+" = socket.socket(socket.AF_INET, "+n+")\n"},yI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".bind("+e.valueToCode(this,"address",e.ORDER_ATOMIC)+")\n"},VI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".connect(socket.getaddrinfo"+e.valueToCode(this,"address",e.ORDER_ATOMIC)+"[0][-1])\n"},BI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".listen("+e.valueToCode(this,"queue",e.ORDER_ATOMIC)+")\n"},GI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".accept()",e.ORDER_ASSIGNMENT]},UI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".recv("+e.valueToCode(this,"size",e.ORDER_ATOMIC)+")",e.ORDER_ASSIGNMENT]},kI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".send("+e.valueToCode(this,"content",e.ORDER_ATOMIC)+")\n"},wI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".recvfrom("+e.valueToCode(this,"size",e.ORDER_ATOMIC)+")",e.ORDER_ASSIGNMENT]},xI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".sendto("+e.valueToCode(this,"content",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"address",e.ORDER_ATOMIC)+")\n"},HI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".close()\n"},WI=function(t,e){return e.definitions_.import_requests="import requests",e.variableDB_.getName(this.getFieldValue("VAR"),Q.Variables.NAME_TYPE)+"= requests.get("+e.valueToCode(this,"DOMAIN",e.ORDER_ATOMIC)+")\n"},KI=function(t,e){return e.definitions_.import_requests="import requests",[(e.valueToCode(this,"VAL",e.ORDER_ASSIGNMENT)||"0")+"."+this.getFieldValue("ATTR"),e.ORDER_ATOMIC]},JI=function(t,e){return e.definitions_.import_requests="import requests","requests."+this.getFieldValue("DIR")+"("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+")\n"},jI=function(t,e){return e.definitions_.import_ntptime="import ntptime",["ntptime.time(host="+e.valueToCode(this,"data",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},QI=function(t,e){return["'"+this.getFieldValue("op")+"'",e.ORDER_ATOMIC]},qI=function(t,e){return e.definitions_.import_urequests="import urequests",["urequests."+this.getFieldValue("TYPE")+"("+e.valueToCode(this,"URL",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},zI=function(t,e){return e.definitions_.import_urequests="import urequests",[(e.valueToCode(this,"VAL",e.ORDER_ASSIGNMENT)||"0")+"."+this.getFieldValue("ATTR"),e.ORDER_ATOMIC]},ZI=function(t,e){return e.definitions_.import_urequests="import urequests",["urequests."+this.getFieldValue("TYPE")+"("+e.valueToCode(this,"URL",e.ORDER_ATOMIC)+", data="+e.valueToCode(this,"data",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},$I=function(t,e){return e.definitions_.import_educore_wifi="from educore import wifi","wifi.connect(ssid="+e.valueToCode(this,"WIFINAME",e.ORDER_ATOMIC)+", psd="+e.valueToCode(this,"PASSWORD",e.ORDER_ATOMIC)+", timeout="+e.valueToCode(this,"TIMEOUT",e.ORDER_ATOMIC)+")\n"},td=function(t,e){return e.definitions_.import_educore_mqttclient="from educore import mqttclient","mqttclient.connect(server="+e.valueToCode(this,"SERVER",e.ORDER_ATOMIC)+", port="+e.valueToCode(this,"PORT",e.ORDER_ATOMIC)+", client_id="+e.valueToCode(this,"CLIENT_ID",e.ORDER_ATOMIC)+", user="+e.valueToCode(this,"USERNAME",e.ORDER_ATOMIC)+", psd="+e.valueToCode(this,"PASSWORD",e.ORDER_ATOMIC)+")\n"},ed=function(t,e){e.definitions_.import_educore_mqttclient="from educore import mqttclient";var i=e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC);return["mqttclient."+e.valueToCode(this,"MESSAGE",e.ORDER_ATOMIC)+"("+i+")",e.ORDER_ATOMIC]},id=function(t,e){var i=e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC),n=e.valueToCode(this,"METHOD",e.ORDER_ATOMIC);return e.definitions_.import_educore_mqttclient="from educore import mqttclient","mqttclient.received(topic="+i+", callback="+n+")\n"},nd=function(t,e){return e.definitions_.import_educore_mqttclient="from educore import mqttclient","mqtt_client.publish(topic="+e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC)+", content="+e.valueToCode(this,"MSG",e.ORDER_ATOMIC)+")\n"},sd=function(t,e){e.definitions_.import_educore_mqttclient="from educore import mqttclient";return["mqtt_client.connescted()",e.ORDER_ATOMIC]},od=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+"."+e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".is_pressed()",e.ORDER_ATOMIC]},_d=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+"."+e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".was_pressed()",e.ORDER_ATOMIC]},ud=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+"."+e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".get_presses("+(e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT)||"0")+")",e.ORDER_ATOMIC]},rd=function(t,e){e.definitions_.import_machine="import machine";var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i]="import "+i;var n=e.valueToCode(this,"btn",e.ORDER_ATOMIC),s=this.getFieldValue("mode");return i+"."+n+".irq(handler="+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+", trigger="+s+")\n"},pd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+".button.is_pressed()",e.ORDER_ATOMIC]},ad=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+".button.was_pressed()",e.ORDER_ATOMIC]},ld=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+".button.get_presses("+(e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT)||"0")+")",e.ORDER_ATOMIC]},Id=function(t,e){e.definitions_.import_machine="import machine";var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i]="import "+i;var n=this.getFieldValue("mode");return i+".button.irq(handler="+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+", trigger="+n+")\n"},dd=function(t,e){return e.definitions_.import_sonar="import sonar",["sonar.Sonar("+e.valueToCode(this,"PIN1",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"PIN2",e.ORDER_ASSIGNMENT)+").checkdist()",e.ORDER_ATOMIC]},Td=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},hd=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},Md=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},md=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},Od=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},cd=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},Ed=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},Rd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_als"]="from "+i+" import onboard_als";return["onboard_als.ps_nl()",e.ORDER_ATOMIC]},gd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+".infrared_"+this.getFieldValue("direction")+"()",e.ORDER_ATOMIC]},Cd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_als"]="from "+i+" import onboard_als";return["onboard_als.ps()",e.ORDER_ATOMIC]},Ad=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("direction");return e.definitions_["import_"+i+"_"+n]="from "+i+" import onboard_als_"+n,["onboard_als_"+n+".ps_nl()",e.ORDER_ATOMIC]},Ld=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_als"]="from "+i+" import onboard_als";return["onboard_als.als()",e.ORDER_ATOMIC]},Sd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_als"]="from "+i+" import onboard_als";return["onboard_als.color()",e.ORDER_ATOMIC]},fd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("direction");return e.definitions_["import_"+i+"_"+n]="from "+i+" import onboard_als_"+n,["onboard_als_"+n+".als_vis()",e.ORDER_ATOMIC]},Dd=function(t,e){return e.definitions_.import_ds18x20x="import ds18x20x",["ds18x20x.get_ds18x20_temperature("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Nd=function(t,e){return e.definitions_.import_lm35="import lm35",["lm35.get_LM35_temperature("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Pd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];if("mixgo"==i)return e.definitions_.import_mixgo="import mixgo",["mixgo.get_brightness()",e.ORDER_ATOMIC];if("mixgo_ce"==i)return e.definitions_.import_mixgo_ce="import mixgo_ce",["mixgo_ce.get_brightness()",e.ORDER_ATOMIC];if("mpython"==i)return e.definitions_.import_mpython_onboard_light="from mpython import onboard_light",["onboard_light.brightness()",e.ORDER_ATOMIC];e.definitions_["import_"+i+"_onboard_als"]="from "+i+" import onboard_als";return["onboard_als.als_vis()",e.ORDER_ATOMIC]},Fd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];if("mixbot"==i){e.definitions_["import_"+i+"_sound"]="from "+i+" import sound";var n="sound.loudness()"}else if("mixgo_zero"==i){e.definitions_.import_mixgo_zero_voice_sound_level="from mixgo_zero_voice import sound_level";n="sound_level()"}else if("mixgo_nova"==i){e.definitions_.import_mixgo_nova_voice_sound_level="from mixgo_nova_voice import sound_level";n="sound_level()"}else{if("mixgo"==i)return e.definitions_.import_mixgo="import mixgo",["mixgo.get_soundlevel()",e.ORDER_ATOMIC];if("mpython"==i)return e.definitions_.import_mpython_onboard_sound="from mpython import onboard_sound",["onboard_sound.soundlevel()",e.ORDER_ATOMIC];if("mixgo_mini"==i){e.definitions_["import_"+i+"_onboard_bot"]="from "+i+" import onboard_bot";n="onboard_bot.soundlevel()"}else{e.definitions_["import_"+i+"_onboard_sound"]="from "+i+" import onboard_sound";n="onboard_sound.read()"}}return[n,e.ORDER_ATOMIC]},vd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("key");return"mixgo_mini"==i?(e.definitions_.import_mixgo_mini_onboard_i2c="from mixgo_mini import onboard_i2c",e.definitions_.import_spl06_001="import spl06_001",e.definitions_.import_onboard_bps="onboard_bps = spl06_001.SPL06(onboard_i2c)"):e.definitions_["import_"+i+"_onboard_bps"]="from "+i+" import onboard_bps",["onboard_bps."+n,e.ORDER_ATOMIC]},Yd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("key");return"mixgo_nova"==i||"mixgo_zero"==i?e.definitions_["import_"+i+"_onboard_ths"]="from "+i+" import onboard_ths":"mixgo_mini"==i?(e.definitions_.import_mixgo_mini_onboard_i2c="from mixgo_mini import onboard_i2c",e.definitions_.import_shtc3="import shtc3",e.definitions_.import_onboard_ths="onboard_ths = shtc3.SHTC3(onboard_i2c)"):e.definitions_["import_"+i+"_onboard_ths"]="from "+i+" import onboard_ths",["onboard_ths."+n+"()",e.ORDER_ATOMIC]},bd=function(t,e){return e.definitions_.import_feiyi_onboard_acc="from feiyi import onboard_acc",["onboard_acc.temperature()",e.ORDER_ATOMIC]},Xd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=i,s="onboard_rfid";return"mixgo_mini"===i?(n="mini_gx",s="ext_rfid"):"mixgo_me"===i?(n="me_g1",s="ext_rc522"):"mixgo_sant"===i&&(n="sant_gx",s="ext_rfid"),e.definitions_[`import_${n}_${s}`]=`from ${n} import ${s}`,[`${s}.read_card(0, x="id")`,e.ORDER_ATOMIC]},yd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),s=i,o="onboard_rfid";return"mixgo_mini"===i?(s="mini_gx",o="ext_rfid"):"mixgo_me"===i?(s="me_g1",o="ext_rc522"):"mixgo_sant"===i&&(s="sant_gx",o="ext_rfid"),e.definitions_[`import_${s}_${o}`]=`from ${s} import ${o}`,[`${o}.read_card(${n}, x="content")`,e.ORDER_ATOMIC]},Vd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),s=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC),o=i,_="onboard_rfid";return"mixgo_mini"===i?(o="mini_gx",_="ext_rfid"):"mixgo_me"===i?(o="me_g1",_="ext_rc522"):"mixgo_sant"===i&&(o="sant_gx",_="ext_rfid"),e.definitions_[`import_${o}_${_}`]=`from ${o} import ${_}`,`${_}.write_card(${s}, ${n})\n`},Bd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),s=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC),o=i,_="onboard_rfid";return"mixgo_mini"===i?(o="mini_gx",_="ext_rfid"):"mixgo_me"===i?(o="me_g1",_="ext_rc522"):"mixgo_sant"===i&&(o="sant_gx",_="ext_rfid"),e.definitions_[`import_${o}_${_}`]=`from ${o} import ${_}`,[`${_}.write_card(${s}, ${n})`,e.ORDER_ATOMIC]},Gd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("key"),s=i,o="onboard_rfid";return"mixgo_mini"===i?(s="mini_gx",o="ext_rfid"):"mixgo_me"===i?(s="me_g1",o="ext_rc522"):"mixgo_sant"===i&&(s="sant_gx",o="ext_rfid"),e.definitions_[`import_${s}_${o}`]=`from ${s} import ${o}`,[`${o}.scan_card() == ${n}`,e.ORDER_ATOMIC]},Ud=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("key");if("strength"==n){if("mixbot"==i){e.definitions_["import_"+i+"_acc_gyr"]="from "+i+" import acc_gyr";var s="acc_gyr.strength()"}else{e.definitions_["import_"+i+"_onboard_acc"]="from "+i+" import onboard_acc";s="onboard_acc.strength()"}return[s,e.ORDER_ATOMIC]}if("mixbot"==i){e.definitions_["import_"+i+"_acc_gyr"]="from "+i+" import acc_gyr";s="acc_gyr.accelerometer()"+n}else if("mpython"==i){e.definitions_.import_mpython_motion="from mpython import motion";s="motion.accelerometer()"+n}else{e.definitions_["import_"+i+"_onboard_acc"]="from "+i+" import onboard_acc";s="onboard_acc.acceleration()"+n}return[s,e.ORDER_ATOMIC]},kd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_acc"]="from "+i+" import onboard_acc",["onboard_acc.eulerangles()"+this.getFieldValue("angle"),e.ORDER_ATOMIC]},wd=function(t,e){e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine";var i=this.getFieldValue("gesture"),n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"mpu"==n&&(e.definitions_.import_mixgo_mpu="from mixgo import mpu"),[n+'.mpu9250_is_gesture("'+i+'")',e.ORDER_ATOMIC]},xd=function(t,e){e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine";var i=this.getFieldValue("key"),n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"mpu"==n&&(e.definitions_.import_mixgo_mpu="from mixgo import mpu"),[n+".mpu9250_get_"+i+"()",e.ORDER_ATOMIC]},Hd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"button",e.ORDER_ATOMIC);if("mixgo_mini"===i||"mixgo_sant"===i){e.definitions_["import_"+i+"_onboard_bot"]="from "+i+" import onboard_bot";var s="onboard_bot.touched("+n+")"}else{e.definitions_["import_"+i]="import "+i;s=i+".touched("+n+")"}return[s,e.ORDER_ATOMIC]},Wd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_mini"===i||"mixgo_sant"===i){e.definitions_["import_"+i+"_onboard_bot"]="from "+i+" import onboard_bot";var n="onboard_bot.touch_slide()"}else{e.definitions_["import_"+i]="import "+i;n=i+".touch_slide(3, 4)"}return[n,e.ORDER_ATOMIC]},Kd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+"."+e.valueToCode(this,"button",e.ORDER_ATOMIC)+".is_touched()",e.ORDER_ATOMIC]},Jd=function(t,e){return e.definitions_.import_mpython="import mpython",["mpython.touch_"+e.valueToCode(this,"button",e.ORDER_ATOMIC)+".is_touched()",e.ORDER_ATOMIC]},jd=function(t,e){e.definitions_.import_adxl345="import adxl345";var i,n=this.getFieldValue("key"),s=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"x"==n?i=s+".readX()":"y"==n?i=s+".readY()":"z"==n?i=s+".readZ()":"values"==n&&(i=s+".readXYZ()"),[i,e.ORDER_ATOMIC]},Qd=function(t,e){e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine";var i=this.getFieldValue("key"),n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"mpu"==n&&(e.definitions_.import_mixgo_mpu="from mixgo import mpu"),[n+".mpu9250_magnetic_"+i+"()",e.ORDER_ATOMIC]},qd=function(t,e){e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine";var i=this.getFieldValue("key"),n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"mpu"==n&&(e.definitions_.import_mixgo_mpu="from mixgo import mpu"),[n+".mpu9250_gyro_"+i+"()",e.ORDER_ATOMIC]},zd=function(t,e){return e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine",e.definitions_.import_mixgo_compass="from mixgo import compass",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".calibrate()\n"},Zd=function(t,e){e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"mpu"==i&&(e.definitions_.import_mixgo_mpu="from mixgo import mpu"),[i+".mpu9250_get_temperature()",e.ORDER_ATOMIC]},$d=function(t,e){e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);"compass"==i&&(e.definitions_.import_mixgo_compass="from mixgo import compass");var n,s=this.getFieldValue("compass");return"strength"==s?n=i+".get_field_strength()":"heading"==s&&(n=i+".heading()"),[n,e.ORDER_ATOMIC]},tT=function(t,e){return e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine",e.definitions_.import_mixgo_compass="from mixgo import compass",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".reset_calibrate()\n"},eT=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("gesture");return e.definitions_.import_mixgo_onboard_mpu="from mixgo import onboard_mpu",['onboard_mpu.mpu9250_is_gesture("'+i+'")',e.ORDER_ATOMIC]},iT=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("key");return e.definitions_.import_mixgo_onboard_mpu="from mixgo import onboard_mpu",["onboard_mpu.mpu9250_get_"+i+"()",e.ORDER_ATOMIC]},nT=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("key");return e.definitions_.import_mixgo_onboard_mpu="from mixgo import onboard_mpu",["onboard_mpu.mpu9250_magnetic_"+i+"()",e.ORDER_ATOMIC]},sT=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("key");return e.definitions_.import_mixgo_onboard_mpu="from mixgo import onboard_mpu",["onboard_mpu.mpu9250_gyro_"+i+"()",e.ORDER_ATOMIC]},oT=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_mixgo_onboard_compass="from mixgo import onboard_compass","onboard_compass.calibrate()\n"},_T=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_mixgo_onboard_mpu="from mixgo import onboard_mpu",["onboard_mpu.mpu9250_get_temperature()",e.ORDER_ATOMIC]},uT=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_mixgo_onboard_compass="from mixgo import onboard_compass";var i,n=this.getFieldValue("compass");return"strength"==n?i="onboard_compass.get_field_strength()":"heading"==n&&(i="onboard_compass.heading()"),[i,e.ORDER_ATOMIC]},rT=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_mixgo_onboard_compass="from mixgo import onboard_compass","onboard_compass.reset_calibrate()\n"},pT=function(t,e){return e.definitions_.import_rtctime="import rtctime","rtctime.settime(("+e.valueToCode(this,"year",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"month",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"day",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"hour",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"minute",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"second",e.ORDER_ASSIGNMENT)+", 0, 0))\n"},aT=function(t,e){var i=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC);return e.definitions_.import_rtctime="import rtctime","rtctime.settime("+i+")\n"},lT=function(t,e){e.definitions_.import_time="import time";return["time.localtime()",e.ORDER_ATOMIC]},IT=function(t,e){return e.definitions_.import_time="import time",["time.mktime("+e.valueToCode(this,"LIST",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},dT=function(t,e){return e.definitions_.import_time="import time",["time.localtime("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},TT=function(t,e){e.definitions_.import_rtctime="import rtctime";return["rtctime.strtime()",e.ORDER_ATOMIC]},hT=function(t,e){return e.definitions_.import_rtctime="import rtctime",["rtctime.strtime("+e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},MT=function(t,e){var i=this.getFieldValue("key"),n=q.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==n)if(e.definitions_.import_mpython_magnetic="from mpython import magnetic","all"==i)var s="magnetic.getstrength()";else s="magnetic.getdata()"+i;else if("mixgo_mini"==n)if(e.definitions_.import_mixgo_mini_onboard_i2c="from mixgo_mini import onboard_i2c",e.definitions_.import_mmc5603="import mmc5603",e.definitions_.import_onboard_mgs="onboard_mgs = mmc5603.MMC5603(onboard_i2c)","all"==i)s="onboard_mgs.getstrength()";else s="onboard_mgs.getdata()"+i;else if(e.definitions_["import_"+n+"_onboard_mgs"]="from "+n+" import onboard_mgs","all"==i)s="onboard_mgs.getstrength()";else s="onboard_mgs.getdata()"+i;return[s,e.ORDER_ATOMIC]},mT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i){e.definitions_.import_mpython_magnetic="from mpython import magnetic"}else"mixgo_mini"==i?(e.definitions_.import_mixgo_mini_onboard_i2c="from mixgo_mini import onboard_i2c",e.definitions_.import_mmc5603="import mmc5603",e.definitions_.import_onboard_mgs="onboard_mgs = mmc5603.MMC5603(onboard_i2c)"):e.definitions_["import_"+i+"_onboard_mgs"]="from "+i+" import onboard_mgs";return["onboard_mgs.getangle()",e.ORDER_ATOMIC]},OT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];"mixgo_mini"==i?(e.definitions_.import_mixgo_mini_onboard_i2c="from mixgo_mini import onboard_i2c",e.definitions_.import_mmc5603="import mmc5603",e.definitions_.import_onboard_mgs="onboard_mgs = mmc5603.MMC5603(onboard_i2c)"):e.definitions_["import_"+i+"_onboard_mgs"]="from "+i+" import onboard_mgs";return"onboard_mgs.calibrate()\n"},cT=function(t,e){if("mixgo_mini"==q.Boards.getSelectedBoardKey().split(":")[2]){e.definitions_.import_mixgo_mini_onboard_temperature="from mixgo_mini import onboard_temperature";var i="onboard_temperature()"}else{e.definitions_.import_mixgo_me_onboard_acc="from mixgo_me import onboard_acc";i="onboard_acc.temperature()"}return[i,e.ORDER_ATOMIC]},ET=function(t,e){e.definitions_.import_mixgo_ce="import mixgo_ce";return["mixgo_ce.get_temperature()",e.ORDER_ATOMIC]},RT=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mpython_motion="from mpython import motion",["motion.gyroscope()"+i,e.ORDER_ATOMIC]},gT=function(t,e){return e.definitions_.import_mpython_motion="from mpython import motion",["motion.temperature()",e.ORDER_ATOMIC]},CT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("direction");return e.definitions_["import_"+i+"_adc"+n]="from "+i+" import adc"+n,["adc"+n+".read()",e.ORDER_ATOMIC]},AT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return"feiyi"==i?(e.definitions_.import_feiyi_onboard_bot51="from feiyi import onboard_bot51",["onboard_bot51.read_bat()",e.ORDER_ATOMIC]):(e.definitions_["import_"+i+"_battery"]="from "+i+" import battery",["battery.voltage()",e.ORDER_ATOMIC])},LT=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_rm_e1_gyro="from rm_e1 import gyro",["gyro.acceleration()"+i,e.ORDER_ATOMIC]},ST=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mixgocar_c3_onboard_info="from mixgocar_c3 import onboard_info",["onboard_info.patrol()"+i,e.ORDER_ATOMIC]},fT=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mixgocar_c3_onboard_info="from mixgocar_c3 import onboard_info",["onboard_info.obstacle()"+i,e.ORDER_ATOMIC]},DT=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mixgocar_c3_onboard_info="from mixgocar_c3 import onboard_info","onboard_info.ir_mode(onboard_info."+i+")\n"},NT=function(t,e){e.definitions_.import_mixgocar_c3_onboard_info="from mixgocar_c3 import onboard_info";return["onboard_info.read_bat()",e.ORDER_ATOMIC]},PT=function(t,e){var i=this.getFieldValue("key"),n=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+n+"_patrol"]="from "+n+" import patrol","patrol.correct(patrol.CORRECTING_"+i+")\n"},FT=function(t,e){var i=this.getFieldValue("key"),n=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+n+"_patrol"]="from "+n+" import patrol",["patrol.getdata()"+i,e.ORDER_ATOMIC]},vT=function(t,e){e.definitions_.import_mixbot_acc_gyr="from mixbot import acc_gyr";return["acc_gyr.temperature()",e.ORDER_ATOMIC]},YT=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mixbot_acc_gyr="from mixbot import acc_gyr",["acc_gyr.gyroscope()"+i,e.ORDER_ATOMIC]},bT=function(t,e){return e.definitions_.import_feiyi_onboard_bot51="from feiyi import onboard_bot51",["onboard_bot51.read_als("+e.valueToCode(this,"mode",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},XT=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},yT=od,VT=_d,BT=ud,GT=Kd,UT=Cd,kT=Pd,wT=kT,xT=function(t,e){return e.definitions_.import_dhtx="import dhtx",["dhtx."+this.getFieldValue("TYPE")+"("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+")."+this.getFieldValue("WHAT")+"()",e.ORDER_ATOMIC]},HT=function(t,e){e.definitions_.import_educore_sound="from educore import sound";return["sound()",e.ORDER_ATOMIC]},WT=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},KT=function(t,e){e.definitions_.import_educore_light="from educore import light";return["light()",e.ORDER_ATOMIC]},JT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_accelerometer"]="from "+i+" import accelerometer";return["accelerometer()",e.ORDER_ATOMIC]},jT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_accelerometer"]="from "+i+" import accelerometer",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+this.getFieldValue("key")+"()",e.ORDER_ATOMIC]},QT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_accelerometer"]="from "+i+" import accelerometer",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shake()",e.ORDER_ATOMIC]},qT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_button"]="from "+i+" import button",["button(button."+this.getFieldValue("btn")+")",e.ORDER_ATOMIC]},zT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_button"]="from "+i+" import button",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".status()",e.ORDER_ATOMIC]},ZT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_rfid"]="from "+i+" import rfid",["rfid("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},$T=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_rfid"]="from "+i+" import rfid",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scanning()",e.ORDER_ATOMIC]},th=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_rfid"]="from "+i+" import rfid",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+this.getFieldValue("key")+"()",e.ORDER_ATOMIC]},eh=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_bot"]="from "+i+" import onboard_bot";return["onboard_bot.version()",e.ORDER_ATOMIC]},ih=new Q.Generator("Python");ih.INDENT=" ",ih.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),ih.ORDER_ATOMIC=0,ih.ORDER_COLLECTION=1,ih.ORDER_STRING_CONVERSION=1,ih.ORDER_UNARY_POSTFIX=1,ih.ORDER_UNARY_PREFIX=2,ih.ORDER_MEMBER=2.1,ih.ORDER_FUNCTION_CALL=2.2,ih.ORDER_EXPONENTIATION=3,ih.ORDER_UNARY_SIGN=4,ih.ORDER_BITWISE_NOT=4,ih.ORDER_MULTIPLICATIVE=5,ih.ORDER_ADDITIVE=6,ih.ORDER_BITWISE_SHIFT=7,ih.ORDER_BITWISE_AND=8,ih.ORDER_BITWISE_XOR=9,ih.ORDER_BITWISE_OR=10,ih.ORDER_RELATIONAL=11,ih.ORDER_EQUALITY=11,ih.ORDER_LOGICAL_NOT=12,ih.ORDER_LOGICAL_AND=13,ih.ORDER_LOGICAL_OR=14,ih.ORDER_ASSIGNMENT=14,ih.ORDER_CONDITIONAL=15,ih.ORDER_LAMBDA=16,ih.ORDER_NONE=99,ih.ORDER_OVERRIDES=[[ih.ORDER_FUNCTION_CALL,ih.ORDER_MEMBER],[ih.ORDER_FUNCTION_CALL,ih.ORDER_FUNCTION_CALL],[ih.ORDER_MEMBER,ih.ORDER_MEMBER],[ih.ORDER_MEMBER,ih.ORDER_FUNCTION_CALL]],ih.init=function(){ih.PASS=this.INDENT+"pass\n",ih.definitions_=Object.create(null),ih.functionNames_=Object.create(null),ih.setups_=Object.create(null),ih.loops_=Object.create(null),ih.codeEnd_=Object.create(null),ih.variableDB_?ih.variableDB_.reset():ih.variableDB_=new tt(ih.RESERVED_WORDS_)},ih.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var o=this.definitions_[s];0===s.indexOf("import")?e.push(o):0===s.indexOf("var_declare")?i.push(o):n.push(o)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var _=[];for(var s in ih.functions_)_.push(ih.functions_[s]);_.length&&_.push("\n");var u=[];for(var s in ih.setups_)u.push(ih.setups_[s]);u.length&&u.push("\n");var r=[];for(var s in ih.loops_)r.push(ih.loops_[s]);var p=[];for(var s in ih.codeEnd_)p.push(ih.codeEnd_[s]);0!==p.length&&p.push("\n");let a="";return a=r.length>0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+"while True:\n"+r.join("")+p.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+p.join("\n"),a},ih.scrubNakedValue=function(t){return t+"\n"},ih.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},ih.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},ih.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Q.utils.string.wrap(o,ih.COMMENT_WRAP-3),n+=ih.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const nh={microbit:{description:"microbit_python",digital:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P4","4"],["P5","5"],["P6","6"],["P7","7"],["P8","8"],["P9","9"],["P10","10"],["P11","11"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"],["P19","19"],["P20","20"]],pwm:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P4","4"],["P5","5"],["P6","6"],["P7","7"],["P8","8"],["P9","9"],["P10","10"],["P11","11"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"],["P19","19"],["P20","20"]],analog:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P4","4"],["P10","10"]],interrupt:[["P0","0"],["P1","1"],["P2","2"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],builtinimg:[["HEART","Image.HEART"],["HEART_SMALL","Image.HEART_SMALL"],["HAPPY","Image.HAPPY"],["SMILE","Image.SMILE"],["SAD","Image.SAD"],["CONFUSED","Image.CONFUSED"],["ANGRY","Image.ANGRY"],["ASLEEP","Image.ASLEEP"],["SURPRISED","Image.SURPRISED"],["SILLY","Image.SILLY"],["FABULOUS","Image.FABULOUS"],["MEH","Image.MEH"],["YES","Image.YES"],["NO","Image.NO"],["CLOCK12","Image.CLOCK12"],["CLOCK11","Image.CLOCK11"],["CLOCK10","Image.CLOCK10"],["CLOCK9","Image.CLOCK9"],["CLOCK8","Image.CLOCK8"],["CLOCK7","Image.CLOCK7"],["CLOCK6","Image.CLOCK6"],["CLOCK5","Image.CLOCK5"],["CLOCK4","Image.CLOCK4"],["CLOCK3","Image.CLOCK3"],["CLOCK2","Image.CLOCK2"],["CLOCK1","Image.CLOCK1"],["ARROW_N","Image.ARROW_N"],["ARROW_NE","Image.ARROW_NE"],["ARROW_E","Image.ARROW_E"],["ARROW_SE","Image.ARROW_SE"],["ARROW_S","Image.ARROW_S"],["ARROW_SW","Image.ARROW_SW"],["ARROW_W","Image.ARROW_W"],["ARROW_NW","Image.ARROW_NW"],["TRIANGLE","Image.TRIANGLE"],["TRIANGLE_LEFT","Image.TRIANGLE_LEFT"],["CHESSBOARD","Image.CHESSBOARD"],["DIAMOND","Image.DIAMOND"],["DIAMOND_SMALL","Image.DIAMOND_SMALL"],["SQUARE","Image.SQUARE"],["SQUARE_SMALL","Image.SQUARE_SMALL"],["RABBIT","Image.RABBIT"],["COW","Image.COW"],["MUSIC_CROTCHET","Image.MUSIC_CROTCHET"],["MUSIC_QUAVER","Image.MUSIC_QUAVER"],["MUSIC_QUAVERS","Image.MUSIC_QUAVERS"],["PITCHFORK","Image.PITCHFORK"],["XMAS","Image.XMAS"],["PACMAN","Image.PACMAN"],["TARGET","Image.TARGET"],["TSHIRT","Image.TSHIRT"],["ROLLERSKATE","Image.ROLLERSKATE"],["DUCK","Image.DUCK"],["HOUSE","Image.HOUSE"],["TORTOISE","Image.TORTOISE"],["BUTTERFLY","Image.BUTTERFLY"],["STICKFIGURE","Image.STICKFIGURE"],["GHOST","Image.GHOST"],["SWORD","Image.SWORD"],["GIRAFFE","Image.GIRAFFE"],["SKULL","Image.SKULL"],["UMBRELLA","Image.UMBRELLA"],["SNAKE","Image.SNAKE"],["ALL_CLOCKS","Image.ALL_CLOCKS"],["ALL_ARROWS","Image.ALL_ARROWS"]],imglist:[["ALL_CLOCKS","Image.ALL_CLOCKS"],["ALL_ARROWS","Image.ALL_ARROWS"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["P0","0"],["P1","1"],["P2","2"],["P8","8"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]]}};nh["BBC micro:bit"]=nh.microbit;const sh=nh,oh=100,_h={init:function(){this.jsonInit({colour:oh,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#built-in-melodies",message0:Q.Msg.MIXLY_MICROBIT_Play_built_in_melody,args0:[{name:"melody",options:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],type:"field_dropdown"},{type:"input_value",name:"PIN"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"}]}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Play_built_in_melody1)}},uh={init:function(){this.jsonInit({colour:oh,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#built-in-melodies",tooltip:"Play one of the built-in melodies. Indicate if you need to wait before continuing or continuously loop the melody.",message0:Q.Msg.MIXLY_MICROBIT_Play_built_in_melody_easy,args0:[{name:"melody",options:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],type:"field_dropdown"},{type:"input_value",name:"PIN"},{type:"input_dummy"}]})}},rh={init:function(){this.setColour(oh),this.appendValueInput("PIN",Number).appendField(Q.Msg.MIXLY_TONE).appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(Q.Msg.MIXLY_FREQUENCY),this.appendValueInput("duration").setCheck(Number).appendField(Q.Msg.MIXLY_DURATION),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MILLIS).appendField(Q.Msg.MIXLY_MICROBIT_WAIT),this.appendDummyInput("").appendField(new Q.FieldCheckbox(!0),"wait"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},ph={init:function(){this.setColour(oh),this.appendValueInput("PIN",Number).appendField(Q.Msg.MIXLY_TONE).appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(Q.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},ah={init:function(){this.jsonInit({colour:oh,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#musical-notation",message0:Q.Msg.MIXLY_MICROBIT_Play_notes,args0:[{check:"List",type:"input_value",name:"notes"},{type:"input_value",name:"PIN"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"}]}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Play_notes1)}},lh={init:function(){this.jsonInit({colour:oh,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#musical-notation",tooltip:"Play a list of notes expressed in the special music language. Indicate if you need to wait before continuing or continuously loop the melody.",message0:Q.Msg.MIXLY_MICROBIT_Play_notes,args0:[{check:"List",type:"input_value",name:"notes"},{type:"input_value",name:"PIN"},{type:"input_dummy"},{type:"input_dummy"},{type:"input_dummy"}]})}},Ih={init:function(){this.jsonInit({colour:oh,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.reset",message0:Q.Msg.MIXLY_MICROBIT_Reset_music}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Reset_music)}},dh={init:function(){this.setColour(oh),this.appendValueInput("PIN").appendField(Q.Msg.MIXLY_NOTONE).appendField(Q.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_NOTONE)}},Th={init:function(){this.jsonInit({colour:oh,output:"Array",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.get_tempo",message0:Q.Msg.MIXLY_MICROBIT_Get_current_tempo}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Get_current_tempo)}},hh={init:function(){this.setColour(oh),this.appendValueInput("TICKS").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Q.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Q.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_SET_TEMPO1)}},Mh={init:function(){this.setColour(oh),this.appendValueInput("VAR").setCheck(String).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,"say"],[Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,"sing"],[Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE,"pronounce"]]),"MODE"),this.appendValueInput("pitch").setCheck(Number).appendField(Q.Msg.MICROBIT_SPEECH_pitch),this.appendValueInput("speed").setCheck(Number).appendField(Q.Msg.MIXLY_SPEED),this.appendValueInput("mouth").setCheck(Number).appendField(Q.Msg.MICROBIT_SPEECH_mouth),this.appendValueInput("throat").setCheck(Number).appendField(Q.Msg.MICROBIT_SPEECH_throat),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH,n=Q.Msg.MIXLY_MICROBIT_TYPE_STRING;return i+{say:Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,sing:Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,pronounce:Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE}[e]+n}))}},mh={init:function(){this.setColour(oh),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Oh={init:function(){this.setColour(oh),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ch={init:function(){this.setColour(oh),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Eh={init:function(){this.setColour(oh),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MICROBIT_SPEECH_translation),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+Q.Msg.MICROBIT_SPEECH_translation)}},Rh={init:function(){this.setColour(oh),this.appendValueInput("PIN",Number).appendField(Q.Msg.MIXLY_SERVO).appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_SERVO_MOVE)}},gh={init:function(){this.appendValueInput("speed").setCheck(null).appendField(Q.Msg.MIXLY_MOTOR).appendField(new Q.FieldDropdown([["M1","1"],["M2","2"],["M3","3"],["M4","4"]]),"Motor").appendField(Q.Msg.MIXLY_SPEED),this.appendDummyInput().appendField(new Q.FieldDropdown([["Forward","1*"],["Reverse","-1*"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(oh),this.setTooltip(""),this.setHelpUrl("")}},Ch={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_RGB_PIN_COUNT)}},Ah={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_RGB_NUM_R_G_B)}},Lh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_NUM),this.appendDummyInput("").setAlign(Q.inputs.Align.RIGHT).appendField(new Q.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Sh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_ESP32_MUSIC_WRI)}},fh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.MIXLY_SETUP+" "+Q.Msg.QJ00X_MP3),this.appendValueInput("RX").setAlign(Q.inputs.Align.RIGHT).appendField("TX#"),this.appendValueInput("TX").setAlign(Q.inputs.Align.RIGHT).appendField("RX#"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Dh=[[Q.Msg.MIXLY_MP3_PLAY,"play"],[Q.Msg.MIXLY_MP3_PAUSE,"pause"],[Q.Msg.MIXLY_MP3_NEXT,"next_track"],[Q.Msg.MIXLY_MP3_PREV,"prev_track"],[Q.Msg.MIXLY_MP3_VOL_UP,"inc_vol"],[Q.Msg.MIXLY_MP3_VOL_DOWN,"dec_vol"]];const Nh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_STAT).appendField(new Q.FieldDropdown(Dh),"CONTROL_TYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Ph=[[Q.Msg.MIXLY_MP3_LOOP_ALL,"0"],[Q.Msg.MIXLY_MP3_LOOP_FOLDER,"1"],[Q.Msg.MIXLY_MP3_LOOP_ONE,"2"],[Q.Msg.MIXLY_MP3_LOOP_RAM,"3"]];const Fh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MP3_LOOP_MODE).appendField(Q.Msg.MIXLY_STAT).appendField(new Q.FieldDropdown(Ph),"LOOP_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var vh=[[Q.Msg.MIXLY_MP3_EQ_NORMAL,"0"],[Q.Msg.MIXLY_MP3_EQ_POP,"1"],[Q.Msg.MIXLY_MP3_EQ_ROCK,"2"],[Q.Msg.MIXLY_MP3_EQ_JAZZ,"3"],[Q.Msg.MIXLY_MP3_EQ_CLASSIC,"4"],[Q.Msg.MIXLY_MP3_EQ_BASS,"5"]];const Yh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MP3_EQ_MODE).appendField(Q.Msg.MIXLY_STAT).appendField(new Q.FieldDropdown(vh),"EQ_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},bh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MP3_VOL),this.appendValueInput("vol",Number).appendField(Q.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Xh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendValueInput("NUM",Number).appendField(Q.Msg.MIXLY_MP3_PLAY_NUM).setCheck(Number),this.appendDummyInput("").appendField("首"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},yh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendValueInput("FOLDER",Number).appendField(Q.Msg.DFPLAYER_MINI_FOLDER).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Q.Msg.MIXLY_MP3_PLAY_NUM).setCheck(Number),this.appendDummyInput("").appendField("首"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Vh=140,Bh={init:function(){this.setColour(225),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"on"],[Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"off"],[Q.Msg.HTML_RESET,"reset"]]),"type").appendField(Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_WIFI),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("type"),i=Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_WIFI;return{on:Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,off:Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,reset:Q.Blockly.Msg.HTML_RESET}[e]+i}))}},Gh={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.on",tooltip:"Turn on the radio. This needs to be explicitly called since the radio draws power and takes up memory that you may otherwise need.",message0:Q.Msg.MIXLY_MICROBIT_Switch_on_radio})}},Uh={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.off",tooltip:"Turn off the radio, thus saving power and memory.",message0:Q.Msg.MIXLY_MICROBIT_Switch_off_radio})}},kh={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.config",tooltip:Q.Msg.MIXLY_MICROBIT_Configure_radio1,message0:Q.Msg.MIXLY_MICROBIT_Configure_radio,args0:[{min:4,value:32,type:"input_value",max:251,name:"length"},{type:"input_dummy"},{min:1,value:3,type:"input_value",max:32,name:"queue"},{type:"input_dummy"},{min:0,value:7,type:"input_value",max:100,name:"channel"},{type:"input_dummy"},{name:"power",type:"input_value"},{type:"input_dummy"},{name:"address",type:"input_value"},{type:"input_dummy"},{name:"group",type:"input_value"},{type:"input_dummy"},{name:"data_rate",type:"input_value"}]})}},wh={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.reset",tooltip:"Reset the radio to default settings.",message0:Q.Msg.MIXLY_MICROBIT_Reset_radio})}},xh={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.send",tooltip:"Broadcast a text message.",message0:Q.Msg.MIXLY_MICROBIT_Send_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},Hh={init:function(){this.setColour(225),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_RADIO_SEND),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_MSG,"send"],[Q.Msg.MIXLY_MICROBIT_MSG_BYTE,"send_bytes"]]),"type"),this.appendValueInput("data"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Send_message1)}},Wh={init:function(){this.jsonInit({colour:225,output:"String",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.receive",tooltip:Q.Msg.MIXLY_MICROBIT_Receive_message,message0:Q.Msg.MIXLY_MICROBIT_Receive_message})}},Kh={init:function(){this.setColour(225),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_Receive_message),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_MSG,"receive"],[Q.Msg.MIXLY_MICROBIT_MSG_BYTE,"receive_bytes"],[Q.Msg.MIXLY_MICROBIT_MSG_FULL,"receive_full"]]),"type"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Receive_message)}},Jh={init:function(){this.setColour(Vh),this.appendValueInput("RX",Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_SETUP).appendField("sda").setCheck(Number).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("TX",Number).appendField("scl").setCheck(Number).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("freq").setCheck(Number).appendField("频率").setAlign(Q.inputs.Align.RIGHT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},jh={init:function(){this.setColour(Vh),this.appendValueInput("address").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_READ_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(Q.Msg.LANG_MATH_BYTE),this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new Q.FieldCheckbox(!1),"is_repeated"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_I2C_READ)}},Qh={init:function(){this.setColour(Vh),this.appendValueInput("address").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_WRITE_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new Q.FieldCheckbox(!1),"is_repeated"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_I2C_WRITE)}},qh={init:function(){this.jsonInit({colour:Vh,nextStatement:null,previousStatement:null,message0:Q.Msg.MIXLY_MICROBIT_SPI_INIT,args0:[{value:1e6,type:"field_number",name:"freq"},{type:"input_dummy"},{value:8,type:"field_number",name:"bits"},{type:"input_dummy"},{value:0,type:"field_number",name:"mode"},{type:"input_dummy"},{name:"mosi",options:q.Profile.default.digital,type:"field_dropdown"},{name:"miso",options:q.Profile.default.digital,type:"field_dropdown"},{name:"sck",options:q.Profile.default.digital,type:"field_dropdown"}]}),this.setFieldValue("15","mosi"),this.setFieldValue("14","miso"),this.setFieldValue("13","sck")}},zh={init:function(){this.setColour(Vh),this.appendValueInput("data").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_SPI_WRITE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_SPI_WRITE)}},Zh=180,$h={init:function(){this.jsonInit({colour:Zh,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.clear",message0:Q.Msg.MIXLY_MICROBIT_Clear_display}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Clear_display)}},tM={init:function(){this.setColour(Zh),this.appendValueInput("x").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_GET).appendField(Q.Msg.MIXLY_BRIGHTNESS).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_BRIGHTNESS1)}},eM={init:function(){this.setColour(Zh),this.appendValueInput("x").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SET_BRIGHTNESS).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("brightness").setCheck(Number).appendField(Q.Msg.MIXLY_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_BRIGHTNESS2)}},iM={init:function(){this.setColour(Zh),this.appendValueInput("data").setCheck([String,"microbit_image"]).appendField(Q.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING)}},nM={init:function(){this.setColour(Zh),this.appendValueInput("data").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},sM={init:function(){this.setColour(Zh),this.appendValueInput("data").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("delay").setCheck(null).appendField(Q.Msg.MIXLY_DELAY),this.appendDummyInput().appendField(Q.Msg.MIXLY_MILLIS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},oM={init:function(){this.setColour(Zh),this.appendValueInput("PIN",String).setCheck("microbit_image").appendField(Q.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.OLED_BITMAP)}},_M={init:function(){this.jsonInit({colour:Zh,InputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",tooltip:"Show the referenced image on the display.",message0:Q.Msg.OLED_BITMAP,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SMILE","SMILE"],["SAD","SAD"],["CONFUSED","CONFUSED"],["ANGRY","ANGRY"],["ASLEEP","ASLEEP"],["SURPRISED","SURPRISED"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["MEH","MEH"],["YES","YES"],["NO","NO"],["CLOCK12","CLOCK12"],["CLOCK11","CLOCK11"],["CLOCK10","CLOCK10"],["CLOCK9","CLOCK9"],["CLOCK8","CLOCK8"],["CLOCK7","CLOCK7"],["CLOCK6","CLOCK6"],["CLOCK5","CLOCK5"],["CLOCK4","CLOCK4"],["CLOCK3","CLOCK3"],["CLOCK2","CLOCK2"],["CLOCK1","CLOCK1"],["ARROW_N","ARROW_N"],["ARROW_NE","ARROW_NE"],["ARROW_E","ARROW_E"],["ARROW_SE","ARROW_SE"],["ARROW_S","ARROW_S"],["ARROW_SW","ARROW_SW"],["ARROW_W","ARROW_W"],["ARROW_NW","ARROW_NW"],["TRIANGLE","TRIANGLE"],["TRIANGLE_LEFT","TRIANGLE_LEFT"],["CHESSBOARD","CHESSBOARD"],["DIAMOND","DIAMOND"],["DIAMOND_SMALL","DIAMOND_SMALL"],["SQUARE","SQUARE"],["SQUARE_SMALL","SQUARE_SMALL"],["RABBIT","RABBIT"],["COW","COW"],["MUSIC_CROTCHET","MUSIC_CROTCHET"],["MUSIC_QUAVER","MUSIC_QUAVER"],["MUSIC_QUAVERS","MUSIC_QUAVERS"],["PITCHFORK","PITCHFORK"],["XMAS","XMAS"],["PACMAN","PACMAN"],["TARGET","TARGET"],["TSHIRT","TSHIRT"],["ROLLERSKATE","ROLLERSKATE"],["DUCK","DUCK"],["HOUSE","HOUSE"],["TORTOISE","TORTOISE"],["BUTTERFLY","BUTTERFLY"],["STICKFIGURE","STICKFIGURE"],["GHOST","GHOST"],["SWORD","SWORD"],["GIRAFFE","GIRAFFE"],["SKULL","SKULL"],["UMBRELLA","UMBRELLA"],["SNAKE","SNAKE"],["ALL_CLOCKS","ALL_CLOCKS"],["ALL_ARROWS","ALL_ARROWS"]],type:"field_dropdown"}]})}},uM={init:function(){this.jsonInit({colour:Zh,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",message0:Q.Msg.MIXLY_MICROBIT_Animate_images_or_string,args0:[{check:[String,"List"],type:"input_value",name:"images"},{type:"input_value",name:"delay"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"clear"}]}),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_delay+Q.Msg.MIXLY_MICROBIT_Animate_images1)}},rM={init:function(){this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.jsonInit({colour:Zh,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",tooltip:"Display the list of images as an animation with a certain delay between each frame. Indicate if you need to wait before continuing, continuously loop the animation and clear the display when finished.",message0:Q.Msg.MIXLY_MICROBIT_SHOW_STRING,args0:[{check:String,type:"input_value",name:"images"},{type:"input_value",name:"delay"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"clear"}]}),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING)}},pM={init:function(){this.jsonInit({colour:Zh,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.scroll",tooltip:"Scroll the referenced text across the display.",message0:Q.Msg.MIXLY_MICROBIT_Scroll_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},aM={init:function(){this.setColour(Zh),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_Turn_on_display,"on"],[Q.Msg.MIXLY_MICROBIT_Turn_off_display,"off"]]),"on_off").appendField(Q.Msg.MIXLY_MICROBIT_monitor),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("on_off"),i=Q.Msg.MIXLY_MICROBIT_monitor;return{on:Q.Msg.MIXLY_MICROBIT_Turn_on_display,off:Q.Msg.MIXLY_MICROBIT_Turn_off_display}[e]+i}))}},lM={init:function(){this.jsonInit({colour:Zh,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.off",tooltip:"Turn off the display.",message0:Q.Msg.MIXLY_MICROBIT_Turn_off_display})}},IM={init:function(){this.jsonInit({colour:Zh,output:"Boolean",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.is_on",message0:Q.Msg.MIXLY_MICROBIT_Display_is_on}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Display_is_on1)}},dM={init:function(){this.jsonInit({colour:Zh,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SMILE","SMILE"],["SAD","SAD"],["CONFUSED","CONFUSED"],["ANGRY","ANGRY"],["ASLEEP","ASLEEP"],["SURPRISED","SURPRISED"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["MEH","MEH"],["YES","YES"],["NO","NO"],["CLOCK12","CLOCK12"],["CLOCK11","CLOCK11"],["CLOCK10","CLOCK10"],["CLOCK9","CLOCK9"],["CLOCK8","CLOCK8"],["CLOCK7","CLOCK7"],["CLOCK6","CLOCK6"],["CLOCK5","CLOCK5"],["CLOCK4","CLOCK4"],["CLOCK3","CLOCK3"],["CLOCK2","CLOCK2"],["CLOCK1","CLOCK1"],["ARROW_N","ARROW_N"],["ARROW_NE","ARROW_NE"],["ARROW_E","ARROW_E"],["ARROW_SE","ARROW_SE"],["ARROW_S","ARROW_S"],["ARROW_SW","ARROW_SW"],["ARROW_W","ARROW_W"],["ARROW_NW","ARROW_NW"],["TRIANGLE","TRIANGLE"],["TRIANGLE_LEFT","TRIANGLE_LEFT"],["CHESSBOARD","CHESSBOARD"],["DIAMOND","DIAMOND"],["DIAMOND_SMALL","DIAMOND_SMALL"],["SQUARE","SQUARE"],["SQUARE_SMALL","SQUARE_SMALL"],["RABBIT","RABBIT"],["COW","COW"],["MUSIC_CROTCHET","MUSIC_CROTCHET"],["MUSIC_QUAVER","MUSIC_QUAVER"],["MUSIC_QUAVERS","MUSIC_QUAVERS"],["PITCHFORK","PITCHFORK"],["XMAS","XMAS"],["PACMAN","PACMAN"],["TARGET","TARGET"],["TSHIRT","TSHIRT"],["ROLLERSKATE","ROLLERSKATE"],["DUCK","DUCK"],["HOUSE","HOUSE"],["TORTOISE","TORTOISE"],["BUTTERFLY","BUTTERFLY"],["STICKFIGURE","STICKFIGURE"],["GHOST","GHOST"],["SWORD","SWORD"],["GIRAFFE","GIRAFFE"],["SKULL","SKULL"],["UMBRELLA","UMBRELLA"],["SNAKE","SNAKE"],["ALL_CLOCKS","ALL_CLOCKS"],["ALL_ARROWS","ALL_ARROWS"]],type:"field_dropdown"}],output:["microbit_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:Q.Msg.MIXLY_MICROBIT_Built_in_image1,message0:Q.Msg.MIXLY_MICROBIT_Built_in_image})}},TM={init:function(){this.jsonInit({colour:Zh,args0:[{check:["microbit_image","List",String],type:"input_value",name:"image"}],output:"microbit_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image.copy",message0:Q.Msg.MIXLY_MICROBIT_Copy_image}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Copy_image1)}},hM={init:function(){this.jsonInit({colour:Zh,args0:[{check:["microbit_image","List",String],type:"input_value",name:"image"}],output:"microbit_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image.invert",message0:Q.Msg.MIXLY_MICROBIT_Invert_image}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Invert_image1)}},MM={init:function(){this.jsonInit({colour:Zh,args0:[{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"00"},{colour:"#000000",type:"field_colour",name:"01"},{colour:"#000000",type:"field_colour",name:"02"},{colour:"#000000",type:"field_colour",name:"03"},{colour:"#000000",type:"field_colour",name:"04"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"10"},{colour:"#000000",type:"field_colour",name:"11"},{colour:"#000000",type:"field_colour",name:"12"},{colour:"#000000",type:"field_colour",name:"13"},{colour:"#000000",type:"field_colour",name:"14"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"20"},{colour:"#000000",type:"field_colour",name:"21"},{colour:"#000000",type:"field_colour",name:"22"},{colour:"#000000",type:"field_colour",name:"23"},{colour:"#000000",type:"field_colour",name:"24"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"30"},{colour:"#000000",type:"field_colour",name:"31"},{colour:"#000000",type:"field_colour",name:"32"},{colour:"#000000",type:"field_colour",name:"33"},{colour:"#000000",type:"field_colour",name:"34"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"40"},{colour:"#000000",type:"field_colour",name:"41"},{colour:"#000000",type:"field_colour",name:"42"},{colour:"#000000",type:"field_colour",name:"43"},{colour:"#000000",type:"field_colour",name:"44"}],output:"microbit_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image",message0:Q.Msg.MIXLY_MICROBIT_Create_image}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)}},mM={init:function(){var t=[[Q.Msg.MIXLY_UP,"up"],[Q.Msg.MIXLY_DOWN,"down"],[Q.Msg.MIXLY_LEFT,"left"],[Q.Msg.MIXLY_RIGHT,"right"]];this.setColour(Zh),this.setOutput(!0,"microbit_image"),this.setInputsInline(!0),this.appendValueInput("img").appendField(Q.Msg.DISPLAY_IMAGE_LET).setCheck(["microbit_image","List",String]),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(t),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[t]+s}))}},OM={init:function(){var t=[[Q.Msg.MICROBIT_DISPLAY_UNION,"+"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"-"]];this.setColour(Zh),this.setOutput(!0,"microbit_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[t]}))}},cM={init:function(){this.setColour(Zh),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(Q.Msg.MIXLY_LCD_PRINT1),this.appendValueInput("TEXT2",String).setCheck([String,Number]).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_LCD_PRINT2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_LCD_PRINT4_TOOLTIP)}},EM={init:function(){this.setColour(Zh),this.appendValueInput("device").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_SETUP).appendField(Q.Msg.MIXLY_DF_LCD).appendField("1602").appendField("mylcd").appendField(Q.Msg.MIXLY_LCD_ADDRESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_SETUP+Q.Msg.MIXLY_DF_LCD+Q.Msg.MIXLY_LCD_ADDRESS)}},RM={init:function(){this.setColour(Zh),this.appendValueInput("row",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(Q.Msg.MIXLY_LCD_ROW),this.appendValueInput("column",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_LCD_COLUMN),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_LCD_PRINT),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_LCD_PRINT3_TOOLTIP)}},gM={init:function(){this.setColour(Zh),this.appendDummyInput().appendField(Q.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_ON,"on()"],[Q.Msg.MIXLY_OFF,"off()"],[Q.Msg.MIXLY_LCD_STAT_CLEAR,"clear()"],[Q.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(False)"],[Q.Msg.MIXLY_LCD_BACKLIGHT,"backlight(True)"]]),"STAT"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);var t=this;this.setTooltip((function(){var e=t.getFieldValue("STAT");return Q.Msg.LISTS_SET_INDEX_SET+Q.Msg.MIXLY_DF_LCD+{"on()":Q.Msg.MIXLY_ON,"off()":Q.Msg.MIXLY_OFF,"clear()":Q.Msg.MIXLY_LCD_STAT_CLEAR,"backlight(off)":Q.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(on)":Q.Msg.MIXLY_LCD_BACKLIGHT}[e]}))}},CM={init:function(){this.appendDummyInput().appendField(Q.Msg.MIXLY_DF_LCD+" OLED "+Q.Msg.OLEDDISPLAY),this.appendValueInput("Text_line1","String").setAlign(Q.inputs.Align.RIGHT).appendField("(128*64) "+Q.Msg.line1),this.appendValueInput("Text_line2","String").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.line2),this.appendValueInput("Text_line3","String").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.line3),this.appendValueInput("Text_line4","String").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.line4),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Zh),this.setTooltip(Q.Msg.MIXLY_DF_LCD+Q.Msg.OLEDDISPLAY+Q.Msg.MIXLY_MICROBIT_TYPE_STRING)}},AM={init:function(){var t=[[Q.Msg.MIXLY_HEIGHT,"height"],[Q.Msg.MIXLY_WIDTH,"width"]];this.setColour(Zh),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("microbit_image"),this.appendDummyInput("").appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE+{height:Q.Msg.MIXLY_HEIGHT,width:Q.Msg.MIXLY_WIDTH}[t]}))}},LM={init:function(){this.setColour(Zh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_LCD_STAT_CLEAR,"0"],[Q.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL,"1"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i={0:Q.Msg.MIXLY_LCD_STAT_CLEAR,1:Q.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL};return Q.Msg.MIXLY_DF_LCD+i[e]}))}},SM="#777777",fM={init:function(){this.setColour(SM),this.appendDummyInput("").appendField("from ").appendField(new Q.FieldTextInput("microbit"),"path").appendField(" import ").appendField(new Q.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},DM={init:function(){this.setColour(SM),this.appendDummyInput("").appendField("import ").appendField(new Q.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},NM={init:function(){this.setColour(SM),this.appendDummyInput("").appendField(new Q.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Q.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;e 0:\n pre = bin(value).count("1")\n # find first non full high value afterwards\n try:\n k, value = next((ind, v)\n for ind, v in enumerate(resp[i:length - 2]) if resp[i + ind + 1] == 0)\n post = bin(value).count("1") if k else 0\n k = k + i\n except StopIteration:\n i = -1\n dist= -1 if i < 0 else round((pre + (k - i) * 8. + post) * 8 * 0.172)\n return dist\n\n def distance_cm(self):\n return self.distance_mm() / 10.0\n\nsonar=HCSR04()\n\n',["sonar.distance_cm()",e.ORDER_ATOMIC]},EE=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *"},RE=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *";var i=this.getFieldValue("TIME_TYPE");switch(i){case"Year":case"Month":case"Day":case"Hour":case"Minute":case"Second":case"Week":return["ds."+i+"()",e.ORDER_ASSIGNMENT];case"Mix1":return["ds.get_date()",e.ORDER_ASSIGNMENT];case"Mix2":return["ds.get_time()",e.ORDER_ASSIGNMENT]}},gE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *","ds.set_time("+e.valueToCode(this,"hour",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"minute",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"second",e.ORDER_ASSIGNMENT)+")\n"},CE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *","ds.set_date("+e.valueToCode(this,"year",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"month",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"day",e.ORDER_ASSIGNMENT)+")\n"},AE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","compass.clear_calibration()\n"},LE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["display.read_light_level()",e.ORDER_ATOMIC]},SE=function(t,e){var i=this.getFieldValue("Trig"),n=this.getFieldValue("Echo");return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_ultrasonic="from ultrasonic import *","sonar = HCSR04(tpin=pin"+i+", epin=pin"+n+")\n"},fE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_TCS="from TCS import *",["tcs.getRawRGBData("+this.getFieldValue("TCS34725_COLOR")+")",e.ORDER_ATOMIC]},DE=function(t,e){var i=this.getFieldValue("PIN"),n=e.valueToCode(this,"NominalResistance",e.ORDER_ATOMIC),s=e.valueToCode(this,"betaCoefficient",e.ORDER_ATOMIC),o=e.valueToCode(this,"seriesResistor",e.ORDER_ATOMIC);return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_ntc="import ntc",["ntc.read(pin"+i+", "+n+", "+s+", "+o+")",e.ORDER_ATOMIC]},NE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+"))\n"},PE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+")+'\\r\\n')\n"},FE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str(hex("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||"0")+")) + '\\r\\n')\n"},vE=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=e.valueToCode(this,"char_marker",e.ORDER_ATOMIC)||";",n=e.statementToCode(this,"DO");e.definitions_["func_serial_receive_data_event_"+i.charCodeAt(1)]="serial.onDataReceived("+i+", () => {\n"+n+"}\n"},YE=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.any()",e.ORDER_ATOMIC]},bE=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.read()",e.ORDER_ATOMIC]},XE=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.readline()",e.ORDER_ATOMIC]},yE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["serial.readUntil("+this.getFieldValue("char_marker")+")",e.ORDER_ATOMIC]},VE=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=e.valueToCode(this,"RX",e.ORDER_ATOMIC),n=e.valueToCode(this,"TX",e.ORDER_ATOMIC);return isNaN(parseInt(i))||(i="pin"+i),isNaN(parseInt(n))||(n="pin"+n),"uart.init(rx="+i+", tx="+n+", baudrate="+this.getFieldValue("baudrate")+")\n"},BE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.init(baudrate="+this.getFieldValue("baudrate")+")\n"},GE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["input("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")",e.ORDER_ATOMIC]},UE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")\n"},kE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+',end ="")\n'},wE=function(t,e){return"control.inBackground(() => {\n"+e.statementToCode(this,"do")+"})\n"},xE=function(){return"control.reset()\n"},HE=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||q.Profile.default.serial)+")\n"},WE=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||q.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||q.Profile.default.serial)+")\n"},KE=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||q.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||q.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},JE=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},jE=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},QE=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},qE=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},zE=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},ZE=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},$E=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","sleep("+(e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000")+")\n"},tR=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},eR=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["running_time()",e.ORDER_ATOMIC]},iR=function(){return"while True:\n pass\n"},nR=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","reset()\n"},sR=function(t,e){return e.definitions_.import_os="import os",["os.uname()",e.ORDER_ATOMIC]};Object.assign(Q.Variables,Z),Object.assign(Q.Procedures,ap),Q.Python=lp,Q.generator=lp,q.Profile.default={},Object.assign(q.Profile,sh),Object.assign(q.Profile.default,sh.microbit),Object.assign(Q.Blocks,e,i,n,s,o,_,u,r,p,a,l,I,d,f,D,F,v,Y,b,X,y,V,B,G),Object.assign(Q.Python.forBlock,T,h,M,m,O,c,E,R,g,C,A,L,S,N,P,U,k,w,x,H,W,K,J,j)})(); \ No newline at end of file +class ${constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Q.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Q.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_if_else");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Q.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(Q.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Ot={init:function(){this.setColour(It),this.appendValueInput("FROM").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.PYTHON_RANGE).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},ct={init:function(){this.setColour(It),this.appendValueInput("LIST").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Q.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Q.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Et={init:function(){this.setColour(It),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Q.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Q.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Q.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Rt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Q.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Q.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_finally");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},gt={init:function(){this.setColour(It);var t=new Q.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Ct={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Q.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Q.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},At={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Q.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Q.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Et.OPERATORS=[[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],gt.OPERATORS=[[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Lt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Q.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},St={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},ft={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Q.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Dt={init:function(){this.setColour(It),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},Nt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Q.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Pt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Q.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Ft={init:function(){this.jsonInit({message0:Q.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:It,tooltip:Q.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Q.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},vt={init:function(){this.setColour(It),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_STAT),this.setOutput(!0)}},Yt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},bt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Q.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},Xt={init:function(){this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Q.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Q.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Q.FieldDropdown([[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(It),this.setTooltip("do-while loop"),this.setHelpUrl("")}},yt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},Bt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},Gt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET+Q.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_GET_UNIQUE_IDEN)}},Ut={init:function(){this.setColour(It),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Q.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},kt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},wt=230;Q.FieldTextInput.math_number_validator=function(t){return String(t)},Q.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const xt={init:function(){this.setColour(wt),this.appendDummyInput().appendField(new Q.FieldTextInput("0",Q.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MATH_NUMBER_TOOLTIP)}},Ht={init:function(){this.setColour(wt);this.appendDummyInput("").appendField(Q.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Q.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Wt={init:function(){this.setColour(wt);this.appendDummyInput("").appendField(Q.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Q.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Kt={init:function(){this.setColour(wt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Q.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Q.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Q.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Jt={init:function(){this.setColour(wt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Q.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Q.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Q.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},jt={init:function(){this.setColour(wt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Q.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Qt={init:function(){this.setColour(wt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Q.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Q.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Q.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Q.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Q.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Q.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Q.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Q.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},qt={init:function(){var t=[[Q.Msg.MATH_BIN,"bin"],[Q.Msg.MATH_OCT,"oct"],[Q.Msg.MATH_HEX,"hex"]];this.setColour(wt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Q.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:Q.Msg.MATH_DEC_TOOLTIP_BIN,oct:Q.Msg.MATH_DEC_TOOLTIP_OCT,hex:Q.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},zt={init:function(){var t=[[Q.Msg.LANG_MATH_TO_ROUND,"round"],[Q.Msg.LANG_MATH_TO_CEIL,"ceil"],[Q.Msg.LANG_MATH_TO_FLOOR,"floor"],[Q.Msg.MATH_ABS,"fabs"],[Q.Msg.MATH_SQRT,"sqrt"]];this.setColour(wt),this.appendValueInput("A").setCheck(Number).appendField(new Q.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Q.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Q.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Q.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Q.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Q.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Q.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Zt={init:function(){var t=[[Q.Msg.MIXLY_MAX,"max"],[Q.Msg.MIXLY_MIN,"min"]];this.setColour(wt),this.appendValueInput("A").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(new Q.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Q.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Q.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Q.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},$t={init:function(){var t=[[Q.Msg.MATH_TWO,"two"],[Q.Msg.MATH_EIGHT,"eight"],[Q.Msg.MATH_TEN,"ten"],[Q.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(wt),this.appendDummyInput("").appendField(Q.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Q.FieldDropdown(t),"OP").appendField(Q.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.MATH_ZHW).appendField(new Q.FieldDropdown(t),"OP2").appendField(Q.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:Q.Msg.MATH_Before_two,eight:Q.Msg.MATH_Before_eight,ten:Q.Msg.MATH_Before_ten,sixteen:Q.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:Q.Msg.MATH_Behind_two,eight:Q.Msg.MATH_Behind_eight,ten:Q.Msg.MATH_Behind_ten,sixteen:Q.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},te={init:function(){var t=[[Q.Msg.LANG_MATH_INT,"int"],[Q.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(wt),this.setOutput(!0,Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Q.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:Q.Msg.LANG_MATH_INT,float:Q.Msg.LANG_MATH_FLOAT_RANDOM};return Q.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},ee={init:function(){this.setColour(wt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Q.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Q.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Q.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Q.Msg.MATH_CONSTRAIN_TOOLTIP)}},ie={init:function(){this.setColour(wt),this.appendValueInput("NUM",Number).appendField(Q.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Q.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Q.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_MATH_MAP)}},ne={init:function(){this.setColour(wt),this.appendDummyInput().appendField(new Q.FieldTextInput("0",Q.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Q.Msg.MATH_NUMBER_TOOLTIP)}},se={init:function(){this.setColour(wt),this.appendValueInput("NUM").setCheck(Number).appendField(Q.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},oe={init:function(){this.setColour(wt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Q.Msg.MATH_ROUND).appendField(Q.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Q.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Q.Msg.MATH_ROUND_NEW_TOOLTIP)}},_e={init:function(){var t=[[Q.Msg.MIXLY_TO_INT,"int"],[Q.Msg.MIXLY_TO_FLOAT,"float"],[Q.Msg.MIXLY_TO_BITES,"b"],[Q.Msg.LANG_MATH_BYTE+Q.Msg.MIXLY_TO_INT,"bti"]];this.setColour(wt),this.appendValueInput("VAR").appendField(new Q.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Q.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Q.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Q.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ue={init:function(){var t=[[Q.Msg.MIXLY_TO_INT,"int"],[Q.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(wt),this.appendValueInput("VAR").appendField(new Q.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Q.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Q.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},re=ie,pe={init:function(){this.setColour(wt),this.appendValueInput("VAR").appendField(Q.Msg.LANG_MATH_BYTE+Q.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},ae={init:function(){this.setColour(wt),this.itemCount_=1,this.setMutator(new Q.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(Q.Msg.MIXLY_PRODUCT+Q.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(Q.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(Q.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const Me={init:function(){this.setColour(de),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Q.FieldTextInput("",Q.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Q.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new Q.FieldImage(e,7,12,'"')}},me={init:function(){this.setColour(de),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Q.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},Oe={init:function(){this.setColour(de),this.appendValueInput("VAR").setCheck(Number).appendField(Q.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},ce={init:function(){this.setColour(de),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Ee={init:function(){this.setColour(de),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Re={init:function(){this.setColour(de),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},ge={init:function(){this.WHERE_OPTIONS=[[Q.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Q.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Q.Msg.TEXT_GET_INDEX_RANDOM+1+Q.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Q.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(de),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Q.Msg.LISTS_GET_INDEX_GET,"MODE"),Q.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Q.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+Q.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Q.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:Q.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Q.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Q.Msg.TEXT_GET_INDEX_RANDOM};return Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+Q.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==Q.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),Q.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Q.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new Q.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),Q.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Ce={init:function(){this.setHelpUrl(Q.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(de),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Q.Msg.LISTS_GET_INDEX_GET+" "+Q.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Q.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+Q.Msg.LISTS_GET_INDEX_FROM_START+"n"+Q.Msg.TEXT_CHARAT2)}},Ae={init:function(){this.setHelpUrl(Q.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(de),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Q.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Q.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Le={init:function(){this.WHERE_OPTIONS_1=[[Q.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Q.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Q.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Q.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Q.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Q.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Q.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(de),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(Q.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==Q.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==Q.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),Q.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(Q.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new Q.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Se={init:function(){this.setHelpUrl(Q.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(de),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Q.Msg.LISTS_GET_INDEX_GET+" "+Q.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Q.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Q.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Q.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},fe={init:function(){var t=[[Q.Msg.MIXLY_EQUALS,"==="],[Q.Msg.MIXLY_STARTSWITH,"startswith"],[Q.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(de),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Q.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},De={init:function(){this.setColour(de),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Q.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_COMPARETO_HELP)}},Ne={init:function(){var t=[[Q.Msg.TEXT_UPPER,"upper"],[Q.Msg.TEXT_TITLE,"title"],[Q.Msg.TEXT_CAPITALIZE,"capitalize"],[Q.Msg.TEXT_SWAPCASE,"swapcase"],[Q.Msg.TEXT_LOWER,"lower"]];this.setColour(de),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:Q.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Q.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Q.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Q.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Q.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Pe={init:function(){var t=[[Q.Msg.TEXT_LJUST,"ljust"],[Q.Msg.TEXT_CENTER,"center"],[Q.Msg.TEXT_RJUST,"rjust"]];this.setColour(de),this.appendValueInput("VAR").appendField(new Q.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Q.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Q.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Fe={init:function(){this.setColour(de),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Q.Msg.MIXLY_MID+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Q.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ve={init:function(){this.setColour(de),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Ye={init:function(){this.setColour(de),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Q.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Q.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},be={init:function(){this.setColour(de),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Q.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Q.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},Xe={init:function(){var t=[[Q.Msg.TEXT_TRIM_BOTH,"strip"],[Q.Msg.TEXT_TRIM_LEFT,"lstrip"],[Q.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(de),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Q.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Q.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(Q.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:Q.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Q.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Q.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},ye={init:function(){this.setColour(de),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Q.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Q.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},vi={init:function(){this.setColour(Pi),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Q.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Yi={init:function(){this.setColour(Pi),this.appendDummyInput().appendField(Q.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},bi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_KEYS),this.setTooltip(Q.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Xi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Q.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Q.Msg.DICTS_GET_TOOLTIP)}},yi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Q.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Q.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Q.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},Vi={init:function(){this.setColour(Pi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Q.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Bi={init:function(){this.setColour(Pi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Q.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_DELETE_TOOLTIP)}},Gi={init:function(){this.setColour(Pi),this.appendValueInput("DICT2").setCheck("Dict").appendField(Q.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Q.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MID),this.setTooltip(Q.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ui={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_CLEAR),this.setTooltip(Q.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ki={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_ITEMS),this.setTooltip(Q.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},wi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_VALUES),this.setTooltip(Q.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},xi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_LENGTH),this.setTooltip(Q.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Hi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_DELDICT),this.setTooltip(Q.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Wi={init:function(){this.MODE=[[Q.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Q.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Q.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Q.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=Q.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=Q.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==Q.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new Q.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},Ki={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Q.Msg.DICTS_ADD_VALUE),this.setTooltip(Q.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},Ji={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Q.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_SETDEFAULT_TOOLTIP)}},ji={init:function(){this.setColour(Pi),this.appendDummyInput("").appendField(new Q.FieldLabel(Q.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new Q.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Q.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Qi={init:function(){this.setColour(Pi),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},qi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_TO_JSON),this.setTooltip(Q.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},zi={init:function(){this.setColour(Pi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Q.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Zi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},$i={init:function(){this.setColour(Pi),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_TO_JSON),this.setTooltip(Q.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},tn=210,en={init:function(){var t=Q.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:Q.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Q.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Q.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Q.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Q.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Q.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},nn={init:function(){var t=Q.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=Q.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new Q.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},sn={init:function(){var t=[[Q.Msg.LOGIC_OPERATION_AND,"AND"],[Q.Msg.LOGIC_OPERATION_OR,"OR"],[Q.Msg.LOGIC_OPERATION_NOR,"NOR"],[Q.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:Q.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Q.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Q.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Q.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},on={init:function(){this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Q.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Q.Msg.LOGIC_NEGATE_TOOLTIP)}},_n={init:function(){var t=[[Q.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Q.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Q.FieldDropdown(t),"BOOL"),this.setTooltip(Q.Msg.LOGIC_BOOLEAN_TOOLTIP)}},un={init:function(){this.setColour(tn),this.setOutput(!0),this.appendDummyInput().appendField(Q.Msg.LOGIC_NULL),this.setTooltip(Q.Msg.LOGIC_NULL_TOOLTIP)}},rn={init:function(){this.setColour(tn),this.appendValueInput("A"),this.appendValueInput("B").appendField(Q.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Q.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},pn={init:function(){var t=[[Q.Msg.TEXT_APPEND_TO,"in"],[Q.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(tn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Q.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(Q.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.IN)}},an={init:function(){var t=[[Q.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Q.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(tn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},ln={init:function(){this.setColour(tn),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},In={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Q.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},dn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_USE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Q.Msg.MIXLY_BELONG;return i+{r:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Tn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_USE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Q.Msg.MIXLY_BELONG,_=Q.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},hn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Q.Msg.MIXPY_TEXT_ENCODE).appendField(new Q.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_USE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Q.Msg.MIXLY_BELONG,_=Q.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},Mn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},mn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},On={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},cn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Q.Msg.MICROBIT_PYTHON_TYPE)}},En={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.HTML_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Rn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},gn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Cn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const An={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Ln={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Sn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},fn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},Dn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Nn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Q.Msg.MIXLY_ESP32_SET+{mkdir:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Pn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Q.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Fn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},vn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.HTML_FILE,"isfile"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Yn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Q.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_SETUP+Q.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Q.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},bn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Q.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Xn={init:function(){var t=Q.Procedures.findLegalName("",this),e=new Q.FieldTextInput(t,Q.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new Q.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Q.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Q.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(Q.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(Q.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(Q.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=Q.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),Q.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{Q.Events.enable()}},mutationToDom:function(t){var e=Q.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(Q.Msg.MIXLY_AIP_ATTR).setAlign(Q.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ns={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(Q.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Ps={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(Q.Msg.HTML_FORM_CONTENT).appendField(new Q.FieldDropdown([[Q.Msg.HTML_TEXT,"text"],[Q.Msg.HTML_EMAIL,"email"],[Q.Msg.HTML_NUMBER,"number"],[Q.Msg.HTML_PASSWORD,"password"],[Q.Msg.HTML_CHECKBOX,"checkbox"],[Q.Msg.HTML_RADIOBUTTON,"radiobutton"],[Q.Msg.HTML_BUTTON,"button"],[Q.Msg.HTML_COLOUR,"colour"],[Q.Msg.HTML_DATE,"date"],[Q.Msg.HTML_LOCALTIME,"local time"],[Q.Msg.HTML_FILE,"file"],[Q.Msg.HTML_HIDDEN,"hidden"],[Q.Msg.HTML_IMAGE,"image"],[Q.Msg.HTML_MONTH,"month"],[Q.Msg.HTML_RANGE,"range"],[Q.Msg.HTML_RESET,"reset"],[Q.Msg.HTML_SEARCH,"search"],[Q.Msg.HTML_SUBMIT,"submit"],[Q.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Q.Msg.HTML_TIME,"time"],[Q.Msg.HTML_URL,"url"],[Q.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Q.Msg.HTML_NAME).appendField(new Q.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Q.Msg.HTML_VALUE).appendField(new Q.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Q.Msg.MIXLY_AIP_ATTR).setAlign(Q.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fs={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(new Q.FieldTextInput("property"),"KEY").appendField(":").appendField(new Q.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vs={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(new Q.FieldTextInput("property"),"KEY").appendField(":").appendField(new Q.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ys={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(Q.Msg.HTML_TEXT).appendField(new Q.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bs=160,Xs={init:function(){this.setColour(bs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Q.FieldTable(""),"TEXT")}},ys={init:function(){this.setColour(bs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Q.FieldMultilineInput(""),"TEXT")}},Vs={init:function(){this.setColour(bs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Q.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Bs={init:function(){this.setColour(bs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Gs={init:function(){this.setColour(bs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Q.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Us={init:function(){this.setColour(bs),this.appendValueInput("VALUE").appendField(Q.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},ks={init:function(){this.setColour(bs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Q.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Q.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=Q.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+r()+"("+t+", "+e+", "+i+") or "+p()+"("+t+", "+e+", "+i+")"},Q.isNumber(n)&&Q.isNumber(s)&&Q.isNumber(o))n=parseFloat(n),s=parseFloat(s),o=Math.abs(parseFloat(o)),0==n%1&&0==s%1&&0==o%1?(n<=s?(s++,t=0==n&&1==o?s:n+", "+s,1!=o&&(t+=", "+o)):t=n+", "+--s+", -"+o,t="range("+t+")"):(t=n",GTE:">="};const yu=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",o=e.valueToCode(this,"B",n)||"False";if("AND"==i)var _=s+" and "+o;else if("OR"==i)_=s+" or "+o;else if("NOR"==i)_="not("+s+"^"+o+")";else _=s+"^"+o;return[_,n]},Vu=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Bu=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Gu=function(t,e){return["None",e.ORDER_ATOMIC]},Uu=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},ku=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},wu=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},xu=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Hu=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Wu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Ku=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Ju=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ju=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Qu=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},qu=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},zu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Zu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},$u=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},tr=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},er=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},ir=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},nr=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},sr=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},or=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},_r=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ur=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},rr=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},pr=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},ar=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},lr=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Ir=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},dr=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),Q.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var o=[],_=0;_\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},jr=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Qr=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},qr=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},zr=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Zr=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},$r=function(t,e){return'"},tp=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},ep=function(){return this.getFieldValue("TEXT")+"\n"},ip=function(t){return t.getFieldValue("TEXT")+"\n"},np=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},sp=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},op=function(){return""},_p=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},up=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+"while True:\n"+r.join("")+p.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+p.join("\n")},lp.scrubNakedValue=function(t){return t+"\n"},lp.quote_=function(t){var e="'";return-1!==t.indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},lp.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},lp.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Q.utils.string.wrap(o,lp.COMMENT_WRAP-3),n+=lp.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const Ip=120,dp={init:function(){this.setColour(Ip),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Q.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT).appendField(new Q.FieldDropdown(dp.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))},OPERATORS:[[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]]},Tp={init:function(){this.setColour(Ip);var t=new Q.FieldDropdown(Tp.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}},OPERATORS:[[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]]},hp="5BA5A5",Mp={init:function(){this.appendValueInput("SUB").setCheck("var"),this.setColour(hp),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(Mp.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"shift_up"],[Q.Msg.MIXLY_DOWN,"shift_down"],[Q.Msg.MIXLY_LEFT,"shift_left"],[Q.Msg.MIXLY_RIGHT,"shift_right"]]},mp={init:function(){this.appendValueInput("SUB").setCheck("var"),this.setColour(hp),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(mp.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Q.Msg.MICROBIT_DISPLAY_UNION,"add"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Op={init:function(){this.setColour(hp),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Q.FieldDropdown(Op.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE+{height:Q.Msg.MIXLY_HEIGHT,width:Q.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Q.Msg.MIXLY_HEIGHT,"height"],[Q.Msg.MIXLY_WIDTH,"width"]]},cp={init:function(){this.setColour(hp),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RECT).appendField(new Q.FieldDropdown(cp.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_OLED_RECT)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Ep={init:function(){this.setColour(hp),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Q.FieldDropdown(Ep.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Rp={init:function(){this.setColour(hp),this.appendValueInput("SUB").setCheck("var").appendField(Q.Msg.MSG.catOLED),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(Rp.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"shift_up"],[Q.Msg.MIXLY_DOWN,"shift_down"],[Q.Msg.MIXLY_LEFT,"shift_left"],[Q.Msg.MIXLY_RIGHT,"shift_right"]]},gp="#569A98",Cp={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Cp.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gp),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(32).fill(0)))},Ap={init:function(){this.setColour(gp),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(Ap.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Q.Msg.MICROBIT_DISPLAY_UNION,"add"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Lp={init:function(){this.setColour(gp),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(Lp.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);q.Boards.getSelectedBoardKey();"Python ESP32-S3"===q.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Q.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:Q.Msg.MIXLY_UP,shift_down:Q.Msg.MIXLY_DOWN,shift_left:Q.Msg.MIXLY_LEFT,shift_right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"shift_up"],[Q.Msg.MIXLY_DOWN,"shift_down"],[Q.Msg.MIXLY_LEFT,"shift_left"],[Q.Msg.MIXLY_RIGHT,"shift_right"]]},Sp={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Sp.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gp),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},fp={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(fp.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gp),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},Dp={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Dp.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gp),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},Np={init:function(){this.setColour(gp),this.appendDummyInput().appendField(Q.Msg.OLED_SET_FONT).appendField(new Q.FieldDropdown(Np.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+Q.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+Q.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+Q.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Pp={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Pp.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gp),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},Fp={init:function(){this.setColour(gp),this.appendDummyInput().appendField(Q.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new Q.FieldDropdown(Fp.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[Q.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[Q.Msg.CLOCKWISE+"90"+Q.Msg.blockpy_setheading_degree,"1"],[Q.Msg.CLOCKWISE+"180"+Q.Msg.blockpy_setheading_degree,"2"],[Q.Msg.CLOCKWISE+"270"+Q.Msg.blockpy_setheading_degree,"3"]]},vp={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(vp.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gp),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},Yp=180,bp={init:function(){this.setColour(Yp),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(Q.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(bp.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"up"],[Q.Msg.MIXLY_DOWN,"down"],[Q.Msg.MIXLY_LEFT,"left"],[Q.Msg.MIXLY_RIGHT,"right"]]},Xp={init:function(){this.setColour(Yp),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(Xp.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Q.Msg.MICROBIT_DISPLAY_UNION,"+"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},yp={init:function(){this.setColour(Yp),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Q.FieldDropdown(yp.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE+{height:Q.Msg.MIXLY_HEIGHT,width:Q.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Q.Msg.MIXLY_HEIGHT,"height"],[Q.Msg.MIXLY_WIDTH,"width"]]},Vp={init:function(){this.setColour(Yp),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RECT).appendField(new Q.FieldDropdown(Vp.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_OLED_RECT)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Bp={init:function(){this.setColour(Yp),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Q.FieldDropdown(Bp.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Gp={init:function(){this.setColour(Yp),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_DISPLAY_DRAW+Q.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new Q.FieldDropdown(Gp.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_DISPLAY_DRAW+Q.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Up=225,kp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(Q.Msg.MIXLY_NETWORK_MODE).appendField(new Q.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},wp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[Q.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=Q.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:Q.Msg.MIXLY_NETWORK_WIFI_OPEN,False:Q.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},xp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},Hp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return Q.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:Q.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},Wp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(Q.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(Q.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},Kp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_CONNECT+Q.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},Jp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[Q.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[Q.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:Q.Msg.MIXLY_ESP32_NETWORK_IP,1:Q.Msg.MIXLY_ESP32_NETWORK_MASK,2:Q.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},jp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},Qp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[Q.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},qp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(Q.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(Q.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},zp={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},Zp={init:function(){this.setColour(Up),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new Q.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},$p={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},ta={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},ea={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},ia={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},na={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},sa={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},oa={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},_a={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},ua={init:function(){this.setColour(Up),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},ra={init:function(){this.setColour(Up),this.appendValueInput("DOMAIN").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Q.Msg.blockpy_REQUESTS_GET).appendField(new Q.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},pa={init:function(){this.appendValueInput("VAL"),this.setColour(Up),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Q.FieldDropdown(pa.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:Q.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Q.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Q.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[Q.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},aa={init:function(){this.appendValueInput("VAR").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(Up),this.appendDummyInput("").appendField(Q.Msg.blockpy_CONDUCT).appendField(new Q.FieldDropdown(aa.METHOD),"DIR"),this.appendDummyInput("").appendField(Q.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:Q.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:Q.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},la={init:function(){this.setColour(Up),this.appendDummyInput("").appendField(Q.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(Q.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},Ia={init:function(){this.setColour(Up),this.appendDummyInput("").appendField(new Q.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},da="#3288dd",Ta={init:function(){this.setColour(da),this.appendValueInput("URL").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Q.Msg.blockpy_CONDUCT).appendField(new Q.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(Q.Msg.blockpy_REQUESTS).appendField(Q.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},ha={init:function(){this.setColour(da),this.appendValueInput("URL").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Q.Msg.blockpy_CONDUCT).appendField(new Q.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(Q.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(Q.Msg.blockpy_REQUESTS+Q.Msg.OLED_STRING),this.appendDummyInput("").appendField(Q.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},Ma={init:function(){this.appendValueInput("VAL"),this.setColour(da),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Q.FieldDropdown(Ma.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[Q.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[Q.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},ma={init:function(){this.setColour(da),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(Q.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Q.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(Q.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(Q.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},Oa={init:function(){this.setColour(da),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(Q.Msg.MIXLY_EMQX_SERVER).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(Q.Msg.MIXLY_EMQX_PORT).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(Q.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Q.Msg.MIXLY_WIFI_USERNAME).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Q.Msg.MIXLY_IOT_PASSWORD).setAlign(Q.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ca={init:function(){this.setColour(da),this.appendValueInput("TOPIC").appendField(Q.Msg.MIXLY_EMQX_SUBSCRIBE+Q.Msg.MIXLY_MICROBIT_MSG).appendField(Q.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(Q.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},Ea={init:function(){this.setColour(da),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Q.Msg.MIXLY_EMQX_SUBSCRIBE+Q.Msg.MIXLY_MICROBIT_MSG).appendField(Q.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Q.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ra={init:function(){this.setColour(da),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Q.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Q.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Q.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ga={init:function(){this.setColour(da),this.appendDummyInput().appendField("mqtt"+Q.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},Ca="#A58C5B",Aa={init:function(){this.setColour(Ca),this.appendValueInput("PIN",Number).appendField(new Q.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Q.FieldDropdown(Aa.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Q.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Q.Msg.MIXLY_GETHUMIDITY,"humidity"]]},La={init:function(){this.setColour(Ca),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_GETTEMPERATUE)}},Sa={init:function(){this.setColour(Ca),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[Q.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return Q.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:Q.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},fa=(Q.Msg.PS2_TRIANGLE,Q.Msg.PS2_CIRCLE,Q.Msg.PS2_CROSS,Q.Msg.PS2_SQUARE,Q.Msg.PS2_L1,Q.Msg.PS2_L2,Q.Msg.PS2_R1,Q.Msg.PS2_R2,Q.Msg.PS2_UP,Q.Msg.PS2_RIGHT,Q.Msg.PS2_DOWN,Q.Msg.PS2_LEFT,Q.Msg.PS2_SELECT,Q.Msg.PS2_START,{init:function(){this.setColour(Ca),this.appendDummyInput("").appendField(Q.Msg.PS2_stick).appendField(new Q.FieldDropdown(fa.PSSTK),"psstk"),this.setOutput(!0,Number),this.setTooltip("")},PSSTK:[[Q.Msg.PS2_RX,"0"],[Q.Msg.PS2_RY,"1"],[Q.Msg.PS2_LX,"2"],[Q.Msg.PS2_LY,"3"]]}),Da={init:function(){this.setColour(Ca),this.appendValueInput("SUB").appendField(Q.Msg.PS2),this.appendDummyInput("").appendField(Q.Msg.MIXLY_JOYSTICK).appendField(new Q.FieldDropdown(Da.PSSTK),"psstk"),this.setOutput(!0,Number),this.setTooltip("")},PSSTK:[[Q.Msg.PS2_RX,"RX"],[Q.Msg.PS2_RY,"RY"],[Q.Msg.PS2_LX,"LX"],[Q.Msg.PS2_LY,"LY"]]},Na="#947C54",Pa={init:function(){this.setColour(Na),this.appendValueInput("btn").appendField(Q.Msg.MIXLY_BUTTON).setCheck(Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_IS_PRESSED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_SENOR_IS_PRESSED)}},Fa={init:function(){this.setColour(Na),this.appendValueInput("btn").appendField(Q.Msg.MIXLY_BUTTON).setCheck(Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_WAS_PRESSED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_SENOR_WAS_PRESSED)}},va={init:function(){this.setColour(Na),this.appendValueInput("btn").appendField(Q.Msg.MIXLY_BUTTON).setCheck(Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(Q.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_BUTTON+Q.Msg.MIXLY_GET_PRESSES)}},Ya={init:function(){this.setColour(Na),this.appendValueInput("btn").appendField(Q.Msg.MIXLY_ESP32_INTERRUPT).appendField(Q.Msg.MIXLY_BUTTON).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Q.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Q.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},ba={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_BUTTON),this.appendDummyInput().appendField(Q.Msg.MIXLY_IS_PRESSED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_SENOR_IS_PRESSED)}},Xa={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_BUTTON),this.appendDummyInput().appendField(Q.Msg.MIXLY_WAS_PRESSED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_SENOR_WAS_PRESSED)}},ya={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_BUTTON),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(Q.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_BUTTON+Q.Msg.MIXLY_GET_PRESSES)}},Va={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_INTERRUPT).appendField(Q.Msg.MIXLY_BUTTON),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[Q.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[Q.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},Ba={init:function(){this.setColour(Na),this.appendValueInput("button").appendField(Q.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(Q.Msg.MIXLY_IS_TOUCHED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_sensor_pin_pressed)}},Ga={init:function(){this.setColour(Na),this.appendValueInput("button").appendField(Q.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(Q.Msg.MIXLY_IS_TOUCHED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_sensor_pin_pressed)}},Ua={init:function(){this.setColour(Na),this.appendValueInput("button").appendField(Q.Msg.MIXLY_ESP32_TOUCH_SENSOR),this.appendDummyInput().appendField(Q.Msg.MIXLY_IS_TOUCHED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_sensor_pin_pressed)}},ka={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_TOUCH_SLIDE),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOUCH_SLIDE_TOOLTIP)}},wa={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_CHAOSHENGBO),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_CHAOSHENGBO)}},xa={init:function(){this.setColour(Na),this.appendDummyInput("").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RTCSETTIME).appendField("myRTC"),this.appendValueInput("hour").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(" "+Q.Msg.MIXLY_HOUR),this.appendValueInput("minute").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(" "+Q.Msg.MIXLY_MINUTE),this.appendValueInput("second").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(" "+Q.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!1),this.setTooltip(Q.Msg.MIXLY_RTCSETTIME+Q.Msg.MIXLY_MIX2)}},Ha={init:function(){this.setColour(Na),this.appendDummyInput("").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RTCSETDATE).appendField("myRTC"),this.appendValueInput("year").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(" "+Q.Msg.MIXLY_YEAR),this.appendValueInput("month").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(" "+Q.Msg.MIXLY_MONTH),this.appendValueInput("day").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(" "+Q.Msg.MIXLY_DAY),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_RTCSETDATE+Q.Msg.MIXLY_MIX1)}},Wa={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_CHAOSHENGBO),this.appendValueInput("PIN1",Number).appendField("Trig #").setCheck(Number),this.appendValueInput("PIN2",Number).appendField("Echo #").setCheck(Number),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_CHAOSHENGBO)}},Ka={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_LIGHT),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},Ja={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown([["1","touch1"],["2","touch2"]]),"op"),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},ja={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown([["0","0"],["1","1"],["2","2"],["3","3"]]),"op"),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Qa={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_UP,"12"],[Q.Msg.MIXLY_DOWN,"14"],[Q.Msg.MIXLY_LEFT,"13"],[Q.Msg.MIXLY_RIGHT,"15"],["A","32"],["B","33"]]),"op"),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},qa={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown([["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]]),"op"),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},za={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown([["0","0"],["1","1"],["2","2"],["3","3"]]),"op"),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},Za={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown([["3","3"],["4","4"]]),"op"),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},$a={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown([["0","0"],["1","1"]]),"op"),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},tl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_EXTERN_NEAR),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Q.Msg.MIXLY_ESP32_NEAR)}},el={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown([[Q.Msg.TEXT_TRIM_LEFT,"left"],[Q.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(Q.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=Q.Msg.MIXLY_ESP32_NEAR;return i+{left:Q.Msg.TEXT_TRIM_LEFT,right:Q.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},il={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0)}},nl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown([[Q.Msg.TEXT_TRIM_LEFT,"l"],[Q.Msg.TEXT_TRIM_RIGHT,"r"]]),"direction").appendField(Q.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=Q.Msg.MIXLY_ESP32_NEAR;return i+{l:Q.Msg.TEXT_TRIM_LEFT,r:Q.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},sl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown([[Q.Msg.TEXT_TRIM_LEFT,"l"],[Q.Msg.TEXT_TRIM_RIGHT,"r"]]),"direction").appendField(Q.Msg.MIXLY_ESP32_EXTERN_LIGHT+Q.Msg.MIXLY_DATA),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=Q.Msg.MIXLY_ESP32_EXTERN_LIGHT;return i+{l:Q.Msg.TEXT_TRIM_LEFT,r:Q.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},ol={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_ESP32_EXTERN_LIGHT+Q.Msg.MIXLY_DATA),this.setOutput(!0,Number),this.setInputsInline(!0)}},_l={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_COLOR_SENSOR+Q.Msg.MIXLY_DATA),this.setOutput(!0,Number),this.setInputsInline(!0)}},ul={init:function(){this.setColour(Na),this.appendDummyInput().appendField("RTC"),this.appendDummyInput().setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RTCGETTIME),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_ESP32_RTC_GET_TIME_TOOLTIP+" (year, month, mday, hour, minute, second, weekday, yearday)")}},rl={init:function(){this.setColour(Na),this.appendValueInput("LIST").appendField(Q.Msg.MIXLY_RTCGETTIMESTAMP),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_ESP32_RTC_GET_TIMESTAMP_TOOLTIP)}},pl={init:function(){this.setColour(Na),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Q.Msg.LISTS_TO_TUPLE),this.setInputsInline(!0),this.setOutput(!0,Number)}},al={init:function(){this.setColour(Na),this.appendDummyInput().appendField("RTC"),this.appendValueInput("CONTENT").appendField(Q.Msg.MIXLY_USE_STRING_TUPLE),this.appendDummyInput().appendField(Q.Msg.MIXLY_RTCSETTIME),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ll={init:function(){this.setColour(Na),this.appendDummyInput().appendField("RTC"),this.appendValueInput("year").setCheck(Number).appendField(" "+Q.Msg.MIXLY_YEAR),this.appendValueInput("month").setCheck(Number).appendField(" "+Q.Msg.MIXLY_MONTH),this.appendValueInput("day").setCheck(Number).appendField(" "+Q.Msg.MIXLY_DAY),this.appendValueInput("hour").setCheck(Number).appendField(" "+Q.Msg.MIXLY_HOUR),this.appendValueInput("minute").setCheck(Number).appendField(" "+Q.Msg.MIXLY_MINUTE),this.appendValueInput("second").setCheck(Number).appendField(" "+Q.Msg.MIXLY_SECOND),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_RTC_SET_DATATIME_TOOLTIP)}},Il={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("RTC"),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_SETUP).setCheck("var"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_ESP32_SENSOR_RTC_INT_TOOLTIP)}},dl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_RTC_GET_TIME_STR),this.setOutput(!0,String),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_RTC_GET_TIME_TOOLTIP)}},Tl={init:function(){this.setColour(Na),this.appendValueInput("CONTENT").appendField(Q.Msg.MIXLY_GPS_TIME+Q.Msg.MIXLY_MICROBIT_TYPE_TUPLE).setCheck(),this.appendDummyInput().appendField(Q.Msg.A_TO_B+Q.Msg.MIXLY_GPS_TIME+Q.Msg.LANG_MATH_STRING),this.setOutput(!0,String),this.setInputsInline(!0)}},hl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_LIGHT),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},Ml={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_SOUND),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},ml={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_TEM_HUM+" "),this.appendDummyInput("").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Q.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:Q.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:Q.Msg.MIXLY_ESP32C3_SENSOR_AHT_HUM_TOOLTIP}[e]}))}},Ol={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0)}},cl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_Altitude+Q.Msg.MSG.catSensor+" "),this.appendDummyInput("").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_GETPRESSURE,"pressure()"],[Q.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[Q.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},El={init:function(){this.setColour(Na),this.appendDummyInput().appendField("RFID"+Q.Msg.MIXLY_RFID_READ_CARD),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},Rl={init:function(){this.setColour(Na),this.appendDummyInput().appendField("RFID"+Q.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SECTOR").appendField(Q.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,Number),this.setInputsInline(!0)}},gl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Q.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Q.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Cl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SECTOR").appendField(Q.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(Q.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(Q.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},Al={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("RFID").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_RFID_SCAN_OK,"True"],[Q.Msg.MIXLY_RFID_SCAN_NOTAGERR,"None"],[Q.Msg.MIXLY_RFID_SCAN_ERROR,"False"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ll={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Q.FieldDropdown([["x","[0]"],["y","[1]"],["z","[2]"],["(x,y,z)",""],[Q.Msg.MIXLY_STRENGTH,"strength"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Q.Msg.MIXLY_MICROBIT_Direction,s=Q.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{"[0]":"x","[1]":"y","[2]":"z","":Q.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Sl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_GET_GESTURE_ALL).appendField(new Q.FieldDropdown([[Q.Msg.ME_GO_PITCH,"[0]"],[Q.Msg.ME_GO_ROLL,"[1]"],[Q.Msg.ME_GO_PITCH+", "+Q.Msg.ME_GO_ROLL,""]]),"angle"),this.appendDummyInput(""),this.setOutput(!0,Number),this.setInputsInline(!0)}},fl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_shake,"shake"],[Q.Msg.MIXLY_UP,"up"],[Q.Msg.MIXLY_DOWN,"down"],[Q.Msg.MIXLY_LEFT,"left"],[Q.Msg.MIXLY_RIGHT,"right"],[Q.Msg.MIXLY_MICROBIT_face_up,"face up"],[Q.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=Q.Msg.MIXLY_MICROBIT_JS_CURRENT,n=Q.Msg.MSG.catSensor,s=Q.Msg.MIXLY_MICROBIT_JS_STATE,o=Q.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:Q.Msg.MIXLY_MICROBIT_shake,up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT,"face up":Q.Msg.MIXLY_MICROBIT_face_up,"face down":Q.Msg.MIXLY_MICROBIT_face_down}[e]+o}))}},Dl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new Q.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Q.Msg.MIXLY_MICROBIT_Direction,s=Q.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":Q.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Nl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_GET+Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new Q.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Q.Msg.MIXLY_MICROBIT_Direction,s=Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":Q.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Pl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Q.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Q.Msg.MIXLY_MICROBIT_Direction,s=Q.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":Q.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},Fl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},vl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput().appendField(Q.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_GETTEMPERATUE)}},Yl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[Q.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return Q.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:Q.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},bl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField("MPU9250"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},Xl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_GET+Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new Q.FieldDropdown([["x","[0]"],["y","[1]"],["z","[2]"],["(x,y,z)",""],[Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH_ALL,"all"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Q.Msg.MIXLY_MICROBIT_Direction,s=Q.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{"[0]":"x","[1]":"y","[2]":"z","":Q.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},yl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+Q.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Vl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},Bl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_GETTEMPERATUE),this.appendDummyInput(""),this.setOutput(!0,Number),this.setInputsInline(!0)}},Gl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_GETTEMPERATUE),this.appendDummyInput(""),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ul={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Q.FieldDropdown([["x","[0]"],["y","[1]"],["z","[2]"],["(x,y,z)",""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Q.Msg.MIXLY_MICROBIT_Direction,s=Q.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{"[0]":"x","[1]":"y","[2]":"z","":Q.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},kl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_GETTEMPERATUE)}},wl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown([[Q.Msg.TEXT_TRIM_LEFT,"1"],[Q.Msg.TEXT_TRIM_RIGHT,"2"]]),"direction").appendField(Q.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=Q.Msg.MIXLY_ESP32_NEAR;return i+{left:Q.Msg.TEXT_TRIM_LEFT,right:Q.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},xl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0),this.setInputsInline(!0)}},Hl={init:function(){this.setColour(Na),this.appendDummyInput().appendField("acc"+Q.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_ADXL345_XA,"[0]"],[Q.Msg.MIXLY_ADXL345_YA,"[1]"],[Q.Msg.MIXLY_ACC_SHAKE,"[2]"],[Q.Msg.MIXLY_ADXL345_XA+","+Q.Msg.MIXLY_ADXL345_YA+","+Q.Msg.MIXLY_ACC_SHAKE,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_ACCELERATION)}},Wl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown([[Q.Msg.TEXT_TRIM_LEFT,"[0]"],[Q.Msg.MIXGO_LEFT_MID,"[1]"],[Q.Msg.MIXGO_RIGHT_MID,"[2]"],[Q.Msg.TEXT_TRIM_RIGHT,"[3]"],[Q.Msg.MIXLY_ALL,""]]),"key").appendField(Q.Msg.MIXGO_LINE_SENSOR_VAL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Q.Msg.MIXLY_ESP32_NEAR}))}},Kl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown([[Q.Msg.MIXGO_LEFT_FRONT,"[0]"],[Q.Msg.MIXGO_RIGHT_FRONT,"[1]"],[Q.Msg.MIXGO_LEFT_BACK,"[3]"],[Q.Msg.MIXGO_RIGHT_BACK,"[2]"],[Q.Msg.MIXLY_ALL,""]]),"key").appendField(Q.Msg.MIXGO_PROXIMITY_SENSOR),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Q.Msg.MIXLY_ESP32_NEAR}))}},Jl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MIXGO_CAR_SENSOR_ONBOARD_CHANGE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MIXGO_CAR_SENSOR_ONBOARD_AUTO_CHANGE,"AS"],[Q.Msg.MIXLY_MIXGO_CAR_USE_LINE_ONLY,"LP"],[Q.Msg.MIXLY_MIXGO_CAR_USE_PROXIMITY_ONLY,"OA"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},jl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MIXGO_CAR_BATTERY_LEFT),this.setOutput(!0),this.setInputsInline(!0)}},Ql={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXGO_LINE_SENSOR).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MIXBOT_LINE_SENSOR_CALIBRATE_WHITE,"WHITE"],[Q.Msg.MIXLY_MIXBOT_LINE_SENSOR_CALIBRATE_BLACK,"BLACK"],[Q.Msg.MIXLY_MIXBOT_LINE_SENSOR_CALIBRATE_RESET,"RESET_TO_FAB"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ql={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown([[Q.Msg.MIXGO_LEFT_FRONT,"[0]"],[Q.Msg.MIXGO_RIGHT_FRONT,"[1]"],[Q.Msg.MIXGO_LEFT_BACK,"[3]"],[Q.Msg.MIXGO_RIGHT_BACK,"[2]"],[Q.Msg.MIXLY_ALL,""]]),"key").appendField(Q.Msg.MIXGO_LINE_SENSOR_VAL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip((function(){return Q.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP+Q.Msg.MIXLY_ESP32_NEAR}))}},zl={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_GET+Q.Msg.MIXLY_MICROBIT_Board_temperature),this.appendDummyInput(""),this.setOutput(!0,Number),this.setInputsInline(!0)}},Zl={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new Q.FieldDropdown([["x","[0]"],["y","[1]"],["z","[2]"],["(x,y,z)",""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=Q.Msg.MIXLY_MICROBIT_Direction,s=Q.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{"[0]":"x","[1]":"y","[2]":"z","":Q.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},$l={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.ANALOG+Q.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("mode").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LCD_NUMBERING),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_LIGHT_INTENSITY+"(%)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},tI={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(new Q.FieldDropdown(q.Profile.default.als_num),"PIN"),this.setOutput(!0,Number)}},eI=Pa,iI=Fa,nI=va,sI=Ba,oI=il,_I=Ka,uI=Aa,rI=Sa,pI=La,aI={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_EXTERN_SOUND),this.setInputsInline(!0),this.setOutput(!0)}},lI={init:function(){this.setColour(Na),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_GET).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.blockpy_set_of+Q.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.setInputsInline(!0),this.setOutput(!0)}},II={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_LIGHT_SENSOR),this.setInputsInline(!0),this.setOutput(!0)}},dI={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_GYROSCOPE_SENSOR),this.setInputsInline(!0),this.setOutput(!0)}},TI={init:function(){this.setColour(Na),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_GET).setCheck("var"),this.appendDummyInput("").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_Horizontal_inclination,"X"],["y","[1]"],["z","[2]"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},hI={init:function(){this.setColour(Na),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_GET).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_BE_SHAKED),this.setInputsInline(!0),this.setOutput(!0)}},MI={init:function(){this.setColour(Na),this.appendDummyInput("").appendField(Q.Msg.MIXLY_BUTTON).appendField(new Q.FieldDropdown([["a","a"],["b","b"],["c","c"]]),"btn"),this.setOutput(!0),this.setInputsInline(!0)}},mI={init:function(){this.setColour(Na),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_BUTTON),this.appendDummyInput().appendField(Q.Msg.MIXLY_WAS_PRESSED),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_SENOR_WAS_PRESSED)}},OI={init:function(){this.setColour(Na),this.appendValueInput("PIN").appendField(Q.Msg.MIXLY_COMMUNICATION_RFID_INITIAL),this.setOutput(!0),this.setInputsInline(!0)}},cI={init:function(){this.setColour(Na),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_COMMUNICATION_RFID_READ),this.setOutput(!0),this.setInputsInline(!0)}},EI={init:function(){this.setColour(Na),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_COMMUNICATION_RFID_READ+Q.Msg.MIXLY_COMMUNICATION_DATA_FROM),this.appendDummyInput("").appendField(Q.Msg.MIXLY_GET).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_SERIAL_NUMBER,"serial_number"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},RI={init:function(){this.setColour(Na),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET+Q.Msg.MIXLY_THE_COPROCESSOR_VERSION),this.setOutput(!0),this.setInputsInline(!0)}},gI=40,CI={init:function(){this.setColour(gI),this.appendValueInput("PIN",Number).appendField(new Q.FieldDropdown([["DHT11","dht11"],["DHT22","dht22"]]),"TYPE").appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Q.FieldDropdown(CI.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Q.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Q.Msg.MIXLY_GETHUMIDITY,"relative_humidity"],[Q.Msg.MIXLY_DHT11_T_H,"tempandhum"]]};const AI=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+" = network.WLAN(network."+this.getFieldValue("mode")+"_IF);\n"},LI=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".connect("+e.valueToCode(this,"id",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"password",e.ORDER_ATOMIC)+")\n"},SI=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".isconnected()",e.ORDER_ATOMIC]},fI=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".ifconfig()["+this.getFieldValue("mode")+"]",e.ORDER_ATOMIC]},DI=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".disconnect()\n"},NI=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".active("+this.getFieldValue("op")+")\n"},PI=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".active()",e.ORDER_ATOMIC]},FI=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".config('"+this.getFieldValue("op")+"')",e.ORDER_ATOMIC]},vI=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".config(essid = "+e.valueToCode(this,"essid",e.ORDER_ATOMIC)+", channel="+e.valueToCode(this,"channel",e.ORDER_ATOMIC)+")\n"},YI=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".scan()",e.ORDER_ATOMIC]},bI=function(t,e){e.definitions_["import_server_*"]="from server import *";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);return"if not "+i+".isconnected():\n connectWifi(SSID, PASSWORD)\nip="+i+".ifconfig()[0]\nprint(ip)\ntime.sleep(1)\nDATA=listenData()\n"},XI=function(t,e){e.definitions_.import_network="import network",e.definitions_.import_socket="import socket";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=this.getFieldValue("mode");return"UDP"==n?n="socket.SOCK_DGRAM":"TCP"==n&&(n="socket.SOCK_STREAM"),i+" = socket.socket(socket.AF_INET, "+n+")\n"},yI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".bind("+e.valueToCode(this,"address",e.ORDER_ATOMIC)+")\n"},VI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".connect(socket.getaddrinfo"+e.valueToCode(this,"address",e.ORDER_ATOMIC)+"[0][-1])\n"},BI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".listen("+e.valueToCode(this,"queue",e.ORDER_ATOMIC)+")\n"},GI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".accept()",e.ORDER_ASSIGNMENT]},UI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".recv("+e.valueToCode(this,"size",e.ORDER_ATOMIC)+")",e.ORDER_ASSIGNMENT]},kI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".send("+e.valueToCode(this,"content",e.ORDER_ATOMIC)+")\n"},wI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".recvfrom("+e.valueToCode(this,"size",e.ORDER_ATOMIC)+")",e.ORDER_ASSIGNMENT]},xI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".sendto("+e.valueToCode(this,"content",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"address",e.ORDER_ATOMIC)+")\n"},HI=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".close()\n"},WI=function(t,e){return e.definitions_.import_requests="import requests",e.variableDB_.getName(this.getFieldValue("VAR"),Q.Variables.NAME_TYPE)+"= requests.get("+e.valueToCode(this,"DOMAIN",e.ORDER_ATOMIC)+")\n"},KI=function(t,e){return e.definitions_.import_requests="import requests",[(e.valueToCode(this,"VAL",e.ORDER_ASSIGNMENT)||"0")+"."+this.getFieldValue("ATTR"),e.ORDER_ATOMIC]},JI=function(t,e){return e.definitions_.import_requests="import requests","requests."+this.getFieldValue("DIR")+"("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+")\n"},jI=function(t,e){return e.definitions_.import_ntptime="import ntptime",["ntptime.time(host="+e.valueToCode(this,"data",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},QI=function(t,e){return["'"+this.getFieldValue("op")+"'",e.ORDER_ATOMIC]},qI=function(t,e){return e.definitions_.import_urequests="import urequests",["urequests."+this.getFieldValue("TYPE")+"("+e.valueToCode(this,"URL",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},zI=function(t,e){return e.definitions_.import_urequests="import urequests",[(e.valueToCode(this,"VAL",e.ORDER_ASSIGNMENT)||"0")+"."+this.getFieldValue("ATTR"),e.ORDER_ATOMIC]},ZI=function(t,e){return e.definitions_.import_urequests="import urequests",["urequests."+this.getFieldValue("TYPE")+"("+e.valueToCode(this,"URL",e.ORDER_ATOMIC)+", data="+e.valueToCode(this,"data",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},$I=function(t,e){return e.definitions_.import_educore_wifi="from educore import wifi","wifi.connect(ssid="+e.valueToCode(this,"WIFINAME",e.ORDER_ATOMIC)+", psd="+e.valueToCode(this,"PASSWORD",e.ORDER_ATOMIC)+", timeout="+e.valueToCode(this,"TIMEOUT",e.ORDER_ATOMIC)+")\n"},td=function(t,e){return e.definitions_.import_educore_mqttclient="from educore import mqttclient","mqttclient.connect(server="+e.valueToCode(this,"SERVER",e.ORDER_ATOMIC)+", port="+e.valueToCode(this,"PORT",e.ORDER_ATOMIC)+", client_id="+e.valueToCode(this,"CLIENT_ID",e.ORDER_ATOMIC)+", user="+e.valueToCode(this,"USERNAME",e.ORDER_ATOMIC)+", psd="+e.valueToCode(this,"PASSWORD",e.ORDER_ATOMIC)+")\n"},ed=function(t,e){e.definitions_.import_educore_mqttclient="from educore import mqttclient";var i=e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC);return["mqttclient."+e.valueToCode(this,"MESSAGE",e.ORDER_ATOMIC)+"("+i+")",e.ORDER_ATOMIC]},id=function(t,e){var i=e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC),n=e.valueToCode(this,"METHOD",e.ORDER_ATOMIC);return e.definitions_.import_educore_mqttclient="from educore import mqttclient","mqttclient.received(topic="+i+", callback="+n+")\n"},nd=function(t,e){return e.definitions_.import_educore_mqttclient="from educore import mqttclient","mqtt_client.publish(topic="+e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC)+", content="+e.valueToCode(this,"MSG",e.ORDER_ATOMIC)+")\n"},sd=function(t,e){e.definitions_.import_educore_mqttclient="from educore import mqttclient";return["mqtt_client.connescted()",e.ORDER_ATOMIC]},od=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+"."+e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".is_pressed()",e.ORDER_ATOMIC]},_d=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+"."+e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".was_pressed()",e.ORDER_ATOMIC]},ud=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+"."+e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".get_presses("+(e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT)||"0")+")",e.ORDER_ATOMIC]},rd=function(t,e){e.definitions_.import_machine="import machine";var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i]="import "+i;var n=e.valueToCode(this,"btn",e.ORDER_ATOMIC),s=this.getFieldValue("mode");return i+"."+n+".irq(handler="+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+", trigger="+s+")\n"},pd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+".button.is_pressed()",e.ORDER_ATOMIC]},ad=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+".button.was_pressed()",e.ORDER_ATOMIC]},ld=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+".button.get_presses("+(e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT)||"0")+")",e.ORDER_ATOMIC]},Id=function(t,e){e.definitions_.import_machine="import machine";var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i]="import "+i;var n=this.getFieldValue("mode");return i+".button.irq(handler="+e.valueToCode(this,"DO",e.ORDER_ATOMIC)+", trigger="+n+")\n"},dd=function(t,e){return e.definitions_.import_sonar="import sonar",["sonar.Sonar("+e.valueToCode(this,"PIN1",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"PIN2",e.ORDER_ASSIGNMENT)+").checkdist()",e.ORDER_ATOMIC]},Td=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},hd=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},Md=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},md=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},Od=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},cd=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},Ed=function(t,e){return[this.getFieldValue("op"),e.ORDER_ATOMIC]},Rd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_als"]="from "+i+" import onboard_als";return["onboard_als.ps_nl()",e.ORDER_ATOMIC]},gd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+".infrared_"+this.getFieldValue("direction")+"()",e.ORDER_ATOMIC]},Cd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_als"]="from "+i+" import onboard_als";return["onboard_als.ps()",e.ORDER_ATOMIC]},Ad=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("direction");return e.definitions_["import_"+i+"_"+n]="from "+i+" import onboard_als_"+n,["onboard_als_"+n+".ps_nl()",e.ORDER_ATOMIC]},Ld=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_als"]="from "+i+" import onboard_als";return["onboard_als.als()",e.ORDER_ATOMIC]},Sd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_als"]="from "+i+" import onboard_als";return["onboard_als.color()",e.ORDER_ATOMIC]},fd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("direction");return e.definitions_["import_"+i+"_"+n]="from "+i+" import onboard_als_"+n,["onboard_als_"+n+".als_vis()",e.ORDER_ATOMIC]},Dd=function(t,e){return e.definitions_.import_ds18x20x="import ds18x20x",["ds18x20x.get_ds18x20_temperature("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Nd=function(t,e){return e.definitions_.import_lm35="import lm35",["lm35.get_LM35_temperature("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Pd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];if("mixgo"==i)return e.definitions_.import_mixgo="import mixgo",["mixgo.get_brightness()",e.ORDER_ATOMIC];if("mixgo_ce"==i)return e.definitions_.import_mixgo_ce="import mixgo_ce",["mixgo_ce.get_brightness()",e.ORDER_ATOMIC];if("mpython"==i)return e.definitions_.import_mpython_onboard_light="from mpython import onboard_light",["onboard_light.brightness()",e.ORDER_ATOMIC];e.definitions_["import_"+i+"_onboard_als"]="from "+i+" import onboard_als";return["onboard_als.als_vis()",e.ORDER_ATOMIC]},Fd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];if("mixbot"==i){e.definitions_["import_"+i+"_sound"]="from "+i+" import sound";var n="sound.loudness()"}else if("mixgo_zero"==i){e.definitions_.import_mixgo_zero_voice_sound_level="from mixgo_zero_voice import sound_level";n="sound_level()"}else if("mixgo_nova"==i){e.definitions_.import_mixgo_nova_voice_sound_level="from mixgo_nova_voice import sound_level";n="sound_level()"}else{if("mixgo"==i)return e.definitions_.import_mixgo="import mixgo",["mixgo.get_soundlevel()",e.ORDER_ATOMIC];if("mpython"==i)return e.definitions_.import_mpython_onboard_sound="from mpython import onboard_sound",["onboard_sound.soundlevel()",e.ORDER_ATOMIC];if("mixgo_mini"==i){e.definitions_["import_"+i+"_onboard_bot"]="from "+i+" import onboard_bot";n="onboard_bot.soundlevel()"}else{e.definitions_["import_"+i+"_onboard_sound"]="from "+i+" import onboard_sound";n="onboard_sound.read()"}}return[n,e.ORDER_ATOMIC]},vd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("key");return"mixgo_mini"==i?(e.definitions_.import_mixgo_mini_onboard_i2c="from mixgo_mini import onboard_i2c",e.definitions_.import_spl06_001="import spl06_001",e.definitions_.import_onboard_bps="onboard_bps = spl06_001.SPL06(onboard_i2c)"):e.definitions_["import_"+i+"_onboard_bps"]="from "+i+" import onboard_bps",["onboard_bps."+n,e.ORDER_ATOMIC]},Yd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("key");return"mixgo_nova"==i||"mixgo_zero"==i?e.definitions_["import_"+i+"_onboard_ths"]="from "+i+" import onboard_ths":"mixgo_mini"==i?(e.definitions_.import_mixgo_mini_onboard_i2c="from mixgo_mini import onboard_i2c",e.definitions_.import_shtc3="import shtc3",e.definitions_.import_onboard_ths="onboard_ths = shtc3.SHTC3(onboard_i2c)"):e.definitions_["import_"+i+"_onboard_ths"]="from "+i+" import onboard_ths",["onboard_ths."+n+"()",e.ORDER_ATOMIC]},bd=function(t,e){return e.definitions_.import_feiyi_onboard_acc="from feiyi import onboard_acc",["onboard_acc.temperature()",e.ORDER_ATOMIC]},Xd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=i,s="onboard_rfid";return"mixgo_mini"===i?(n="mini_gx",s="ext_rfid"):"mixgo_me"===i?(n="me_g1",s="ext_rc522"):"mixgo_sant"===i&&(n="sant_gx",s="ext_rfid"),e.definitions_[`import_${n}_${s}`]=`from ${n} import ${s}`,[`${s}.read_card(0, x="id")`,e.ORDER_ATOMIC]},yd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),s=i,o="onboard_rfid";return"mixgo_mini"===i?(s="mini_gx",o="ext_rfid"):"mixgo_me"===i?(s="me_g1",o="ext_rc522"):"mixgo_sant"===i&&(s="sant_gx",o="ext_rfid"),e.definitions_[`import_${s}_${o}`]=`from ${s} import ${o}`,[`${o}.read_card(${n}, x="content")`,e.ORDER_ATOMIC]},Vd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),s=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC),o=i,_="onboard_rfid";return"mixgo_mini"===i?(o="mini_gx",_="ext_rfid"):"mixgo_me"===i?(o="me_g1",_="ext_rc522"):"mixgo_sant"===i&&(o="sant_gx",_="ext_rfid"),e.definitions_[`import_${o}_${_}`]=`from ${o} import ${_}`,`${_}.write_card(${s}, ${n})\n`},Bd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"SECTOR",e.ORDER_ATOMIC),s=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC),o=i,_="onboard_rfid";return"mixgo_mini"===i?(o="mini_gx",_="ext_rfid"):"mixgo_me"===i?(o="me_g1",_="ext_rc522"):"mixgo_sant"===i&&(o="sant_gx",_="ext_rfid"),e.definitions_[`import_${o}_${_}`]=`from ${o} import ${_}`,[`${_}.write_card(${s}, ${n})`,e.ORDER_ATOMIC]},Gd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("key"),s=i,o="onboard_rfid";return"mixgo_mini"===i?(s="mini_gx",o="ext_rfid"):"mixgo_me"===i?(s="me_g1",o="ext_rc522"):"mixgo_sant"===i&&(s="sant_gx",o="ext_rfid"),e.definitions_[`import_${s}_${o}`]=`from ${s} import ${o}`,[`${o}.scan_card() == ${n}`,e.ORDER_ATOMIC]},Ud=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("key");if("strength"==n){if("mixbot"==i){e.definitions_["import_"+i+"_acc_gyr"]="from "+i+" import acc_gyr";var s="acc_gyr.strength()"}else{e.definitions_["import_"+i+"_onboard_acc"]="from "+i+" import onboard_acc";s="onboard_acc.strength()"}return[s,e.ORDER_ATOMIC]}if("mixbot"==i){e.definitions_["import_"+i+"_acc_gyr"]="from "+i+" import acc_gyr";s="acc_gyr.accelerometer()"+n}else if("mpython"==i){e.definitions_.import_mpython_motion="from mpython import motion";s="motion.accelerometer()"+n}else{e.definitions_["import_"+i+"_onboard_acc"]="from "+i+" import onboard_acc";s="onboard_acc.acceleration()"+n}return[s,e.ORDER_ATOMIC]},kd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_acc"]="from "+i+" import onboard_acc",["onboard_acc.eulerangles()"+this.getFieldValue("angle"),e.ORDER_ATOMIC]},wd=function(t,e){e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine";var i=this.getFieldValue("gesture"),n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"mpu"==n&&(e.definitions_.import_mixgo_mpu="from mixgo import mpu"),[n+'.mpu9250_is_gesture("'+i+'")',e.ORDER_ATOMIC]},xd=function(t,e){e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine";var i=this.getFieldValue("key"),n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"mpu"==n&&(e.definitions_.import_mixgo_mpu="from mixgo import mpu"),[n+".mpu9250_get_"+i+"()",e.ORDER_ATOMIC]},Hd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"button",e.ORDER_ATOMIC);if("mixgo_mini"===i||"mixgo_sant"===i){e.definitions_["import_"+i+"_onboard_bot"]="from "+i+" import onboard_bot";var s="onboard_bot.touched("+n+")"}else{e.definitions_["import_"+i]="import "+i;s=i+".touched("+n+")"}return[s,e.ORDER_ATOMIC]},Wd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];if("mixgo_mini"===i||"mixgo_sant"===i){e.definitions_["import_"+i+"_onboard_bot"]="from "+i+" import onboard_bot";var n="onboard_bot.touch_slide()"}else{e.definitions_["import_"+i]="import "+i;n=i+".touch_slide(3, 4)"}return[n,e.ORDER_ATOMIC]},Kd=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i]="import "+i,[i+"."+e.valueToCode(this,"button",e.ORDER_ATOMIC)+".is_touched()",e.ORDER_ATOMIC]},Jd=function(t,e){return e.definitions_.import_mpython="import mpython",["mpython.touch_"+e.valueToCode(this,"button",e.ORDER_ATOMIC)+".is_touched()",e.ORDER_ATOMIC]},jd=function(t,e){e.definitions_.import_adxl345="import adxl345";var i,n=this.getFieldValue("key"),s=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"x"==n?i=s+".readX()":"y"==n?i=s+".readY()":"z"==n?i=s+".readZ()":"values"==n&&(i=s+".readXYZ()"),[i,e.ORDER_ATOMIC]},Qd=function(t,e){e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine";var i=this.getFieldValue("key"),n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"mpu"==n&&(e.definitions_.import_mixgo_mpu="from mixgo import mpu"),[n+".mpu9250_magnetic_"+i+"()",e.ORDER_ATOMIC]},qd=function(t,e){e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine";var i=this.getFieldValue("key"),n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"mpu"==n&&(e.definitions_.import_mixgo_mpu="from mixgo import mpu"),[n+".mpu9250_gyro_"+i+"()",e.ORDER_ATOMIC]},zd=function(t,e){return e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine",e.definitions_.import_mixgo_compass="from mixgo import compass",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".calibrate()\n"},Zd=function(t,e){e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return"mpu"==i&&(e.definitions_.import_mixgo_mpu="from mixgo import mpu"),[i+".mpu9250_get_temperature()",e.ORDER_ATOMIC]},$d=function(t,e){e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);"compass"==i&&(e.definitions_.import_mixgo_compass="from mixgo import compass");var n,s=this.getFieldValue("compass");return"strength"==s?n=i+".get_field_strength()":"heading"==s&&(n=i+".heading()"),[n,e.ORDER_ATOMIC]},tT=function(t,e){return e.definitions_.import_mpu9250="import mpu9250",e.definitions_.import_machine="import machine",e.definitions_.import_mixgo_compass="from mixgo import compass",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".reset_calibrate()\n"},eT=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("gesture");return e.definitions_.import_mixgo_onboard_mpu="from mixgo import onboard_mpu",['onboard_mpu.mpu9250_is_gesture("'+i+'")',e.ORDER_ATOMIC]},iT=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("key");return e.definitions_.import_mixgo_onboard_mpu="from mixgo import onboard_mpu",["onboard_mpu.mpu9250_get_"+i+"()",e.ORDER_ATOMIC]},nT=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("key");return e.definitions_.import_mixgo_onboard_mpu="from mixgo import onboard_mpu",["onboard_mpu.mpu9250_magnetic_"+i+"()",e.ORDER_ATOMIC]},sT=function(t,e){e.definitions_.import_machine="import machine";var i=this.getFieldValue("key");return e.definitions_.import_mixgo_onboard_mpu="from mixgo import onboard_mpu",["onboard_mpu.mpu9250_gyro_"+i+"()",e.ORDER_ATOMIC]},oT=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_mixgo_onboard_compass="from mixgo import onboard_compass","onboard_compass.calibrate()\n"},_T=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_mixgo_onboard_mpu="from mixgo import onboard_mpu",["onboard_mpu.mpu9250_get_temperature()",e.ORDER_ATOMIC]},uT=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_mixgo_onboard_compass="from mixgo import onboard_compass";var i,n=this.getFieldValue("compass");return"strength"==n?i="onboard_compass.get_field_strength()":"heading"==n&&(i="onboard_compass.heading()"),[i,e.ORDER_ATOMIC]},rT=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_mixgo_onboard_compass="from mixgo import onboard_compass","onboard_compass.reset_calibrate()\n"},pT=function(t,e){return e.definitions_.import_rtctime="import rtctime","rtctime.settime(("+e.valueToCode(this,"year",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"month",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"day",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"hour",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"minute",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"second",e.ORDER_ASSIGNMENT)+", 0, 0))\n"},aT=function(t,e){var i=e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC);return e.definitions_.import_rtctime="import rtctime","rtctime.settime("+i+")\n"},lT=function(t,e){e.definitions_.import_time="import time";return["time.localtime()",e.ORDER_ATOMIC]},IT=function(t,e){return e.definitions_.import_time="import time",["time.mktime("+e.valueToCode(this,"LIST",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},dT=function(t,e){return e.definitions_.import_time="import time",["time.localtime("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},TT=function(t,e){e.definitions_.import_rtctime="import rtctime";return["rtctime.strtime()",e.ORDER_ATOMIC]},hT=function(t,e){return e.definitions_.import_rtctime="import rtctime",["rtctime.strtime("+e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},MT=function(t,e){var i=this.getFieldValue("key"),n=q.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==n)if(e.definitions_.import_mpython_magnetic="from mpython import magnetic","all"==i)var s="magnetic.getstrength()";else s="magnetic.getdata()"+i;else if("mixgo_mini"==n)if(e.definitions_.import_mixgo_mini_onboard_i2c="from mixgo_mini import onboard_i2c",e.definitions_.import_mmc5603="import mmc5603",e.definitions_.import_onboard_mgs="onboard_mgs = mmc5603.MMC5603(onboard_i2c)","all"==i)s="onboard_mgs.getstrength()";else s="onboard_mgs.getdata()"+i;else if(e.definitions_["import_"+n+"_onboard_mgs"]="from "+n+" import onboard_mgs","all"==i)s="onboard_mgs.getstrength()";else s="onboard_mgs.getdata()"+i;return[s,e.ORDER_ATOMIC]},mT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i){e.definitions_.import_mpython_magnetic="from mpython import magnetic"}else"mixgo_mini"==i?(e.definitions_.import_mixgo_mini_onboard_i2c="from mixgo_mini import onboard_i2c",e.definitions_.import_mmc5603="import mmc5603",e.definitions_.import_onboard_mgs="onboard_mgs = mmc5603.MMC5603(onboard_i2c)"):e.definitions_["import_"+i+"_onboard_mgs"]="from "+i+" import onboard_mgs";return["onboard_mgs.getangle()",e.ORDER_ATOMIC]},OT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];"mixgo_mini"==i?(e.definitions_.import_mixgo_mini_onboard_i2c="from mixgo_mini import onboard_i2c",e.definitions_.import_mmc5603="import mmc5603",e.definitions_.import_onboard_mgs="onboard_mgs = mmc5603.MMC5603(onboard_i2c)"):e.definitions_["import_"+i+"_onboard_mgs"]="from "+i+" import onboard_mgs";return"onboard_mgs.calibrate()\n"},cT=function(t,e){if("mixgo_mini"==q.Boards.getSelectedBoardKey().split(":")[2]){e.definitions_.import_mixgo_mini_onboard_temperature="from mixgo_mini import onboard_temperature";var i="onboard_temperature()"}else{e.definitions_.import_mixgo_me_onboard_acc="from mixgo_me import onboard_acc";i="onboard_acc.temperature()"}return[i,e.ORDER_ATOMIC]},ET=function(t,e){e.definitions_.import_mixgo_ce="import mixgo_ce";return["mixgo_ce.get_temperature()",e.ORDER_ATOMIC]},RT=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mpython_motion="from mpython import motion",["motion.gyroscope()"+i,e.ORDER_ATOMIC]},gT=function(t,e){return e.definitions_.import_mpython_motion="from mpython import motion",["motion.temperature()",e.ORDER_ATOMIC]},CT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2],n=this.getFieldValue("direction");return e.definitions_["import_"+i+"_adc"+n]="from "+i+" import adc"+n,["adc"+n+".read()",e.ORDER_ATOMIC]},AT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return"feiyi"==i?(e.definitions_.import_feiyi_onboard_bot51="from feiyi import onboard_bot51",["onboard_bot51.read_bat()",e.ORDER_ATOMIC]):(e.definitions_["import_"+i+"_battery"]="from "+i+" import battery",["battery.voltage()",e.ORDER_ATOMIC])},LT=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_rm_e1_gyro="from rm_e1 import gyro",["gyro.acceleration()"+i,e.ORDER_ATOMIC]},ST=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mixgocar_c3_onboard_info="from mixgocar_c3 import onboard_info",["onboard_info.patrol()"+i,e.ORDER_ATOMIC]},fT=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mixgocar_c3_onboard_info="from mixgocar_c3 import onboard_info",["onboard_info.obstacle()"+i,e.ORDER_ATOMIC]},DT=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mixgocar_c3_onboard_info="from mixgocar_c3 import onboard_info","onboard_info.ir_mode(onboard_info."+i+")\n"},NT=function(t,e){e.definitions_.import_mixgocar_c3_onboard_info="from mixgocar_c3 import onboard_info";return["onboard_info.read_bat()",e.ORDER_ATOMIC]},PT=function(t,e){var i=this.getFieldValue("key"),n=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+n+"_patrol"]="from "+n+" import patrol","patrol.correct(patrol.CORRECTING_"+i+")\n"},FT=function(t,e){var i=this.getFieldValue("key"),n=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+n+"_patrol"]="from "+n+" import patrol",["patrol.getdata()"+i,e.ORDER_ATOMIC]},vT=function(t,e){e.definitions_.import_mixbot_acc_gyr="from mixbot import acc_gyr";return["acc_gyr.temperature()",e.ORDER_ATOMIC]},YT=function(t,e){var i=this.getFieldValue("key");return e.definitions_.import_mixbot_acc_gyr="from mixbot import acc_gyr",["acc_gyr.gyroscope()"+i,e.ORDER_ATOMIC]},bT=function(t,e){return e.definitions_.import_feiyi_onboard_bot51="from feiyi import onboard_bot51",["onboard_bot51.read_als("+e.valueToCode(this,"mode",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},XT=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},yT=od,VT=_d,BT=ud,GT=Kd,UT=Cd,kT=Pd,wT=kT,xT=function(t,e){return e.definitions_.import_dhtx="import dhtx",["dhtx."+this.getFieldValue("TYPE")+"("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+")."+this.getFieldValue("WHAT")+"()",e.ORDER_ATOMIC]},HT=function(t,e){e.definitions_.import_educore_sound="from educore import sound";return["sound()",e.ORDER_ATOMIC]},WT=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".read()",e.ORDER_ATOMIC]},KT=function(t,e){e.definitions_.import_educore_light="from educore import light";return["light()",e.ORDER_ATOMIC]},JT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_accelerometer"]="from "+i+" import accelerometer";return["accelerometer()",e.ORDER_ATOMIC]},jT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_accelerometer"]="from "+i+" import accelerometer",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+this.getFieldValue("key")+"()",e.ORDER_ATOMIC]},QT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_accelerometer"]="from "+i+" import accelerometer",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shake()",e.ORDER_ATOMIC]},qT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_button"]="from "+i+" import button",["button(button."+this.getFieldValue("btn")+")",e.ORDER_ATOMIC]},zT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_button"]="from "+i+" import button",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".status()",e.ORDER_ATOMIC]},ZT=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_rfid"]="from "+i+" import rfid",["rfid("+e.valueToCode(this,"PIN",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},$T=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_rfid"]="from "+i+" import rfid",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scanning()",e.ORDER_ATOMIC]},th=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_rfid"]="from "+i+" import rfid",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+this.getFieldValue("key")+"()",e.ORDER_ATOMIC]},eh=function(t,e){var i=q.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_bot"]="from "+i+" import onboard_bot";return["onboard_bot.version()",e.ORDER_ATOMIC]},ih=new Q.Generator("Python");ih.INDENT=" ",ih.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),ih.ORDER_ATOMIC=0,ih.ORDER_COLLECTION=1,ih.ORDER_STRING_CONVERSION=1,ih.ORDER_UNARY_POSTFIX=1,ih.ORDER_UNARY_PREFIX=2,ih.ORDER_MEMBER=2.1,ih.ORDER_FUNCTION_CALL=2.2,ih.ORDER_EXPONENTIATION=3,ih.ORDER_UNARY_SIGN=4,ih.ORDER_BITWISE_NOT=4,ih.ORDER_MULTIPLICATIVE=5,ih.ORDER_ADDITIVE=6,ih.ORDER_BITWISE_SHIFT=7,ih.ORDER_BITWISE_AND=8,ih.ORDER_BITWISE_XOR=9,ih.ORDER_BITWISE_OR=10,ih.ORDER_RELATIONAL=11,ih.ORDER_EQUALITY=11,ih.ORDER_LOGICAL_NOT=12,ih.ORDER_LOGICAL_AND=13,ih.ORDER_LOGICAL_OR=14,ih.ORDER_ASSIGNMENT=14,ih.ORDER_CONDITIONAL=15,ih.ORDER_LAMBDA=16,ih.ORDER_NONE=99,ih.ORDER_OVERRIDES=[[ih.ORDER_FUNCTION_CALL,ih.ORDER_MEMBER],[ih.ORDER_FUNCTION_CALL,ih.ORDER_FUNCTION_CALL],[ih.ORDER_MEMBER,ih.ORDER_MEMBER],[ih.ORDER_MEMBER,ih.ORDER_FUNCTION_CALL]],ih.init=function(){ih.PASS=this.INDENT+"pass\n",ih.definitions_=Object.create(null),ih.functionNames_=Object.create(null),ih.setups_=Object.create(null),ih.loops_=Object.create(null),ih.codeEnd_=Object.create(null),ih.variableDB_?ih.variableDB_.reset():ih.variableDB_=new tt(ih.RESERVED_WORDS_)},ih.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var o=this.definitions_[s];0===s.indexOf("import")?e.push(o):0===s.indexOf("var_declare")?i.push(o):n.push(o)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var _=[];for(var s in ih.functions_)_.push(ih.functions_[s]);_.length&&_.push("\n");var u=[];for(var s in ih.setups_)u.push(ih.setups_[s]);u.length&&u.push("\n");var r=[];for(var s in ih.loops_)r.push(ih.loops_[s]);var p=[];for(var s in ih.codeEnd_)p.push(ih.codeEnd_[s]);0!==p.length&&p.push("\n");let a="";return a=r.length>0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+"while True:\n"+r.join("")+p.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+p.join("\n"),a},ih.scrubNakedValue=function(t){return t+"\n"},ih.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},ih.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},ih.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Q.utils.string.wrap(o,ih.COMMENT_WRAP-3),n+=ih.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const nh={microbit:{description:"microbit_python",digital:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P4","4"],["P5","5"],["P6","6"],["P7","7"],["P8","8"],["P9","9"],["P10","10"],["P11","11"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"],["P19","19"],["P20","20"]],pwm:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P4","4"],["P5","5"],["P6","6"],["P7","7"],["P8","8"],["P9","9"],["P10","10"],["P11","11"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"],["P19","19"],["P20","20"]],analog:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P4","4"],["P10","10"]],interrupt:[["P0","0"],["P1","1"],["P2","2"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],builtinimg:[["HEART","Image.HEART"],["HEART_SMALL","Image.HEART_SMALL"],["HAPPY","Image.HAPPY"],["SMILE","Image.SMILE"],["SAD","Image.SAD"],["CONFUSED","Image.CONFUSED"],["ANGRY","Image.ANGRY"],["ASLEEP","Image.ASLEEP"],["SURPRISED","Image.SURPRISED"],["SILLY","Image.SILLY"],["FABULOUS","Image.FABULOUS"],["MEH","Image.MEH"],["YES","Image.YES"],["NO","Image.NO"],["CLOCK12","Image.CLOCK12"],["CLOCK11","Image.CLOCK11"],["CLOCK10","Image.CLOCK10"],["CLOCK9","Image.CLOCK9"],["CLOCK8","Image.CLOCK8"],["CLOCK7","Image.CLOCK7"],["CLOCK6","Image.CLOCK6"],["CLOCK5","Image.CLOCK5"],["CLOCK4","Image.CLOCK4"],["CLOCK3","Image.CLOCK3"],["CLOCK2","Image.CLOCK2"],["CLOCK1","Image.CLOCK1"],["ARROW_N","Image.ARROW_N"],["ARROW_NE","Image.ARROW_NE"],["ARROW_E","Image.ARROW_E"],["ARROW_SE","Image.ARROW_SE"],["ARROW_S","Image.ARROW_S"],["ARROW_SW","Image.ARROW_SW"],["ARROW_W","Image.ARROW_W"],["ARROW_NW","Image.ARROW_NW"],["TRIANGLE","Image.TRIANGLE"],["TRIANGLE_LEFT","Image.TRIANGLE_LEFT"],["CHESSBOARD","Image.CHESSBOARD"],["DIAMOND","Image.DIAMOND"],["DIAMOND_SMALL","Image.DIAMOND_SMALL"],["SQUARE","Image.SQUARE"],["SQUARE_SMALL","Image.SQUARE_SMALL"],["RABBIT","Image.RABBIT"],["COW","Image.COW"],["MUSIC_CROTCHET","Image.MUSIC_CROTCHET"],["MUSIC_QUAVER","Image.MUSIC_QUAVER"],["MUSIC_QUAVERS","Image.MUSIC_QUAVERS"],["PITCHFORK","Image.PITCHFORK"],["XMAS","Image.XMAS"],["PACMAN","Image.PACMAN"],["TARGET","Image.TARGET"],["TSHIRT","Image.TSHIRT"],["ROLLERSKATE","Image.ROLLERSKATE"],["DUCK","Image.DUCK"],["HOUSE","Image.HOUSE"],["TORTOISE","Image.TORTOISE"],["BUTTERFLY","Image.BUTTERFLY"],["STICKFIGURE","Image.STICKFIGURE"],["GHOST","Image.GHOST"],["SWORD","Image.SWORD"],["GIRAFFE","Image.GIRAFFE"],["SKULL","Image.SKULL"],["UMBRELLA","Image.UMBRELLA"],["SNAKE","Image.SNAKE"],["ALL_CLOCKS","Image.ALL_CLOCKS"],["ALL_ARROWS","Image.ALL_ARROWS"]],imglist:[["ALL_CLOCKS","Image.ALL_CLOCKS"],["ALL_ARROWS","Image.ALL_ARROWS"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["P0","0"],["P1","1"],["P2","2"],["P8","8"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]]}};nh["BBC micro:bit"]=nh.microbit;const sh=nh,oh=100,_h={init:function(){this.jsonInit({colour:oh,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#built-in-melodies",message0:Q.Msg.MIXLY_MICROBIT_Play_built_in_melody,args0:[{name:"melody",options:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],type:"field_dropdown"},{type:"input_value",name:"PIN"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"}]}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Play_built_in_melody1)}},uh={init:function(){this.jsonInit({colour:oh,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#built-in-melodies",tooltip:"Play one of the built-in melodies. Indicate if you need to wait before continuing or continuously loop the melody.",message0:Q.Msg.MIXLY_MICROBIT_Play_built_in_melody_easy,args0:[{name:"melody",options:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],type:"field_dropdown"},{type:"input_value",name:"PIN"},{type:"input_dummy"}]})}},rh={init:function(){this.setColour(oh),this.appendValueInput("PIN",Number).appendField(Q.Msg.MIXLY_TONE).appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(Q.Msg.MIXLY_FREQUENCY),this.appendValueInput("duration").setCheck(Number).appendField(Q.Msg.MIXLY_DURATION),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MILLIS).appendField(Q.Msg.MIXLY_MICROBIT_WAIT),this.appendDummyInput("").appendField(new Q.FieldCheckbox(!0),"wait"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},ph={init:function(){this.setColour(oh),this.appendValueInput("PIN",Number).appendField(Q.Msg.MIXLY_TONE).appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(Q.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},ah={init:function(){this.jsonInit({colour:oh,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#musical-notation",message0:Q.Msg.MIXLY_MICROBIT_Play_notes,args0:[{check:"List",type:"input_value",name:"notes"},{type:"input_value",name:"PIN"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"}]}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Play_notes1)}},lh={init:function(){this.jsonInit({colour:oh,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#musical-notation",tooltip:"Play a list of notes expressed in the special music language. Indicate if you need to wait before continuing or continuously loop the melody.",message0:Q.Msg.MIXLY_MICROBIT_Play_notes,args0:[{check:"List",type:"input_value",name:"notes"},{type:"input_value",name:"PIN"},{type:"input_dummy"},{type:"input_dummy"},{type:"input_dummy"}]})}},Ih={init:function(){this.jsonInit({colour:oh,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.reset",message0:Q.Msg.MIXLY_MICROBIT_Reset_music}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Reset_music)}},dh={init:function(){this.setColour(oh),this.appendValueInput("PIN").appendField(Q.Msg.MIXLY_NOTONE).appendField(Q.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_NOTONE)}},Th={init:function(){this.jsonInit({colour:oh,output:"Array",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.get_tempo",message0:Q.Msg.MIXLY_MICROBIT_Get_current_tempo}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Get_current_tempo)}},hh={init:function(){this.setColour(oh),this.appendValueInput("TICKS").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Q.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Q.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_SET_TEMPO1)}},Mh={init:function(){this.setColour(oh),this.appendValueInput("VAR").setCheck(String).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,"say"],[Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,"sing"],[Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE,"pronounce"]]),"MODE"),this.appendValueInput("pitch").setCheck(Number).appendField(Q.Msg.MICROBIT_SPEECH_pitch),this.appendValueInput("speed").setCheck(Number).appendField(Q.Msg.MIXLY_SPEED),this.appendValueInput("mouth").setCheck(Number).appendField(Q.Msg.MICROBIT_SPEECH_mouth),this.appendValueInput("throat").setCheck(Number).appendField(Q.Msg.MICROBIT_SPEECH_throat),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH,n=Q.Msg.MIXLY_MICROBIT_TYPE_STRING;return i+{say:Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,sing:Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,pronounce:Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE}[e]+n}))}},mh={init:function(){this.setColour(oh),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Oh={init:function(){this.setColour(oh),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ch={init:function(){this.setColour(oh),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Eh={init:function(){this.setColour(oh),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MICROBIT_SPEECH_translation),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+Q.Msg.MICROBIT_SPEECH_translation)}},Rh={init:function(){this.setColour(oh),this.appendValueInput("PIN",Number).appendField(Q.Msg.MIXLY_SERVO).appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_SERVO_MOVE)}},gh={init:function(){this.appendValueInput("speed").setCheck(null).appendField(Q.Msg.MIXLY_MOTOR).appendField(new Q.FieldDropdown([["M1","1"],["M2","2"],["M3","3"],["M4","4"]]),"Motor").appendField(Q.Msg.MIXLY_SPEED),this.appendDummyInput().appendField(new Q.FieldDropdown([["Forward","1*"],["Reverse","-1*"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(oh),this.setTooltip(""),this.setHelpUrl("")}},Ch={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_RGB_PIN_COUNT)}},Ah={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_RGB_NUM_R_G_B)}},Lh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_NUM),this.appendDummyInput("").setAlign(Q.inputs.Align.RIGHT).appendField(new Q.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Sh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_ESP32_MUSIC_WRI)}},fh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.MIXLY_SETUP+" "+Q.Msg.QJ00X_MP3),this.appendValueInput("RX").setAlign(Q.inputs.Align.RIGHT).appendField("TX#"),this.appendValueInput("TX").setAlign(Q.inputs.Align.RIGHT).appendField("RX#"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Dh=[[Q.Msg.MIXLY_MP3_PLAY,"play"],[Q.Msg.MIXLY_MP3_PAUSE,"pause"],[Q.Msg.MIXLY_MP3_NEXT,"next_track"],[Q.Msg.MIXLY_MP3_PREV,"prev_track"],[Q.Msg.MIXLY_MP3_VOL_UP,"inc_vol"],[Q.Msg.MIXLY_MP3_VOL_DOWN,"dec_vol"]];const Nh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_STAT).appendField(new Q.FieldDropdown(Dh),"CONTROL_TYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Ph=[[Q.Msg.MIXLY_MP3_LOOP_ALL,"0"],[Q.Msg.MIXLY_MP3_LOOP_FOLDER,"1"],[Q.Msg.MIXLY_MP3_LOOP_ONE,"2"],[Q.Msg.MIXLY_MP3_LOOP_RAM,"3"]];const Fh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MP3_LOOP_MODE).appendField(Q.Msg.MIXLY_STAT).appendField(new Q.FieldDropdown(Ph),"LOOP_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var vh=[[Q.Msg.MIXLY_MP3_EQ_NORMAL,"0"],[Q.Msg.MIXLY_MP3_EQ_POP,"1"],[Q.Msg.MIXLY_MP3_EQ_ROCK,"2"],[Q.Msg.MIXLY_MP3_EQ_JAZZ,"3"],[Q.Msg.MIXLY_MP3_EQ_CLASSIC,"4"],[Q.Msg.MIXLY_MP3_EQ_BASS,"5"]];const Yh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MP3_EQ_MODE).appendField(Q.Msg.MIXLY_STAT).appendField(new Q.FieldDropdown(vh),"EQ_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},bh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MP3_VOL),this.appendValueInput("vol",Number).appendField(Q.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Xh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendValueInput("NUM",Number).appendField(Q.Msg.MIXLY_MP3_PLAY_NUM).setCheck(Number),this.appendDummyInput("").appendField("首"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},yh={init:function(){this.setColour(oh),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendValueInput("FOLDER",Number).appendField(Q.Msg.DFPLAYER_MINI_FOLDER).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Q.Msg.MIXLY_MP3_PLAY_NUM).setCheck(Number),this.appendDummyInput("").appendField("首"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Vh=140,Bh={init:function(){this.setColour(225),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"on"],[Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"off"],[Q.Msg.HTML_RESET,"reset"]]),"type").appendField(Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_WIFI),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("type"),i=Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_WIFI;return{on:Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,off:Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,reset:Q.Blockly.Msg.HTML_RESET}[e]+i}))}},Gh={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.on",tooltip:"Turn on the radio. This needs to be explicitly called since the radio draws power and takes up memory that you may otherwise need.",message0:Q.Msg.MIXLY_MICROBIT_Switch_on_radio})}},Uh={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.off",tooltip:"Turn off the radio, thus saving power and memory.",message0:Q.Msg.MIXLY_MICROBIT_Switch_off_radio})}},kh={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.config",tooltip:Q.Msg.MIXLY_MICROBIT_Configure_radio1,message0:Q.Msg.MIXLY_MICROBIT_Configure_radio,args0:[{min:4,value:32,type:"input_value",max:251,name:"length"},{type:"input_dummy"},{min:1,value:3,type:"input_value",max:32,name:"queue"},{type:"input_dummy"},{min:0,value:7,type:"input_value",max:100,name:"channel"},{type:"input_dummy"},{name:"power",type:"input_value"},{type:"input_dummy"},{name:"address",type:"input_value"},{type:"input_dummy"},{name:"group",type:"input_value"},{type:"input_dummy"},{name:"data_rate",type:"input_value"}]})}},wh={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.reset",tooltip:"Reset the radio to default settings.",message0:Q.Msg.MIXLY_MICROBIT_Reset_radio})}},xh={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.send",tooltip:"Broadcast a text message.",message0:Q.Msg.MIXLY_MICROBIT_Send_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},Hh={init:function(){this.setColour(225),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_RADIO_SEND),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_MSG,"send"],[Q.Msg.MIXLY_MICROBIT_MSG_BYTE,"send_bytes"]]),"type"),this.appendValueInput("data"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Send_message1)}},Wh={init:function(){this.jsonInit({colour:225,output:"String",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.receive",tooltip:Q.Msg.MIXLY_MICROBIT_Receive_message,message0:Q.Msg.MIXLY_MICROBIT_Receive_message})}},Kh={init:function(){this.setColour(225),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_Receive_message),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_MSG,"receive"],[Q.Msg.MIXLY_MICROBIT_MSG_BYTE,"receive_bytes"],[Q.Msg.MIXLY_MICROBIT_MSG_FULL,"receive_full"]]),"type"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Receive_message)}},Jh={init:function(){this.setColour(Vh),this.appendValueInput("RX",Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_SETUP).appendField("sda").setCheck(Number).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("TX",Number).appendField("scl").setCheck(Number).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("freq").setCheck(Number).appendField("频率").setAlign(Q.inputs.Align.RIGHT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},jh={init:function(){this.setColour(Vh),this.appendValueInput("address").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_READ_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(Q.Msg.LANG_MATH_BYTE),this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new Q.FieldCheckbox(!1),"is_repeated"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_I2C_READ)}},Qh={init:function(){this.setColour(Vh),this.appendValueInput("address").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_WRITE_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new Q.FieldCheckbox(!1),"is_repeated"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_I2C_WRITE)}},qh={init:function(){this.jsonInit({colour:Vh,nextStatement:null,previousStatement:null,message0:Q.Msg.MIXLY_MICROBIT_SPI_INIT,args0:[{value:1e6,type:"field_number",name:"freq"},{type:"input_dummy"},{value:8,type:"field_number",name:"bits"},{type:"input_dummy"},{value:0,type:"field_number",name:"mode"},{type:"input_dummy"},{name:"mosi",options:q.Profile.default.digital,type:"field_dropdown"},{name:"miso",options:q.Profile.default.digital,type:"field_dropdown"},{name:"sck",options:q.Profile.default.digital,type:"field_dropdown"}]}),this.setFieldValue("15","mosi"),this.setFieldValue("14","miso"),this.setFieldValue("13","sck")}},zh={init:function(){this.setColour(Vh),this.appendValueInput("data").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_SPI_WRITE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_SPI_WRITE)}},Zh=180,$h={init:function(){this.jsonInit({colour:Zh,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.clear",message0:Q.Msg.MIXLY_MICROBIT_Clear_display}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Clear_display)}},tM={init:function(){this.setColour(Zh),this.appendValueInput("x").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_GET).appendField(Q.Msg.MIXLY_BRIGHTNESS).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_BRIGHTNESS1)}},eM={init:function(){this.setColour(Zh),this.appendValueInput("x").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SET_BRIGHTNESS).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("brightness").setCheck(Number).appendField(Q.Msg.MIXLY_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_BRIGHTNESS2)}},iM={init:function(){this.setColour(Zh),this.appendValueInput("data").setCheck([String,"microbit_image"]).appendField(Q.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING)}},nM={init:function(){this.setColour(Zh),this.appendValueInput("data").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},sM={init:function(){this.setColour(Zh),this.appendValueInput("data").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("delay").setCheck(null).appendField(Q.Msg.MIXLY_DELAY),this.appendDummyInput().appendField(Q.Msg.MIXLY_MILLIS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},oM={init:function(){this.setColour(Zh),this.appendValueInput("PIN",String).setCheck("microbit_image").appendField(Q.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.OLED_BITMAP)}},_M={init:function(){this.jsonInit({colour:Zh,InputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",tooltip:"Show the referenced image on the display.",message0:Q.Msg.OLED_BITMAP,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SMILE","SMILE"],["SAD","SAD"],["CONFUSED","CONFUSED"],["ANGRY","ANGRY"],["ASLEEP","ASLEEP"],["SURPRISED","SURPRISED"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["MEH","MEH"],["YES","YES"],["NO","NO"],["CLOCK12","CLOCK12"],["CLOCK11","CLOCK11"],["CLOCK10","CLOCK10"],["CLOCK9","CLOCK9"],["CLOCK8","CLOCK8"],["CLOCK7","CLOCK7"],["CLOCK6","CLOCK6"],["CLOCK5","CLOCK5"],["CLOCK4","CLOCK4"],["CLOCK3","CLOCK3"],["CLOCK2","CLOCK2"],["CLOCK1","CLOCK1"],["ARROW_N","ARROW_N"],["ARROW_NE","ARROW_NE"],["ARROW_E","ARROW_E"],["ARROW_SE","ARROW_SE"],["ARROW_S","ARROW_S"],["ARROW_SW","ARROW_SW"],["ARROW_W","ARROW_W"],["ARROW_NW","ARROW_NW"],["TRIANGLE","TRIANGLE"],["TRIANGLE_LEFT","TRIANGLE_LEFT"],["CHESSBOARD","CHESSBOARD"],["DIAMOND","DIAMOND"],["DIAMOND_SMALL","DIAMOND_SMALL"],["SQUARE","SQUARE"],["SQUARE_SMALL","SQUARE_SMALL"],["RABBIT","RABBIT"],["COW","COW"],["MUSIC_CROTCHET","MUSIC_CROTCHET"],["MUSIC_QUAVER","MUSIC_QUAVER"],["MUSIC_QUAVERS","MUSIC_QUAVERS"],["PITCHFORK","PITCHFORK"],["XMAS","XMAS"],["PACMAN","PACMAN"],["TARGET","TARGET"],["TSHIRT","TSHIRT"],["ROLLERSKATE","ROLLERSKATE"],["DUCK","DUCK"],["HOUSE","HOUSE"],["TORTOISE","TORTOISE"],["BUTTERFLY","BUTTERFLY"],["STICKFIGURE","STICKFIGURE"],["GHOST","GHOST"],["SWORD","SWORD"],["GIRAFFE","GIRAFFE"],["SKULL","SKULL"],["UMBRELLA","UMBRELLA"],["SNAKE","SNAKE"],["ALL_CLOCKS","ALL_CLOCKS"],["ALL_ARROWS","ALL_ARROWS"]],type:"field_dropdown"}]})}},uM={init:function(){this.jsonInit({colour:Zh,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",message0:Q.Msg.MIXLY_MICROBIT_Animate_images_or_string,args0:[{check:[String,"List"],type:"input_value",name:"images"},{type:"input_value",name:"delay"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"clear"}]}),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_delay+Q.Msg.MIXLY_MICROBIT_Animate_images1)}},rM={init:function(){this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.jsonInit({colour:Zh,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",tooltip:"Display the list of images as an animation with a certain delay between each frame. Indicate if you need to wait before continuing, continuously loop the animation and clear the display when finished.",message0:Q.Msg.MIXLY_MICROBIT_SHOW_STRING,args0:[{check:String,type:"input_value",name:"images"},{type:"input_value",name:"delay"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"clear"}]}),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING)}},pM={init:function(){this.jsonInit({colour:Zh,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.scroll",tooltip:"Scroll the referenced text across the display.",message0:Q.Msg.MIXLY_MICROBIT_Scroll_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},aM={init:function(){this.setColour(Zh),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_Turn_on_display,"on"],[Q.Msg.MIXLY_MICROBIT_Turn_off_display,"off"]]),"on_off").appendField(Q.Msg.MIXLY_MICROBIT_monitor),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("on_off"),i=Q.Msg.MIXLY_MICROBIT_monitor;return{on:Q.Msg.MIXLY_MICROBIT_Turn_on_display,off:Q.Msg.MIXLY_MICROBIT_Turn_off_display}[e]+i}))}},lM={init:function(){this.jsonInit({colour:Zh,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.off",tooltip:"Turn off the display.",message0:Q.Msg.MIXLY_MICROBIT_Turn_off_display})}},IM={init:function(){this.jsonInit({colour:Zh,output:"Boolean",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.is_on",message0:Q.Msg.MIXLY_MICROBIT_Display_is_on}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Display_is_on1)}},dM={init:function(){this.jsonInit({colour:Zh,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SMILE","SMILE"],["SAD","SAD"],["CONFUSED","CONFUSED"],["ANGRY","ANGRY"],["ASLEEP","ASLEEP"],["SURPRISED","SURPRISED"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["MEH","MEH"],["YES","YES"],["NO","NO"],["CLOCK12","CLOCK12"],["CLOCK11","CLOCK11"],["CLOCK10","CLOCK10"],["CLOCK9","CLOCK9"],["CLOCK8","CLOCK8"],["CLOCK7","CLOCK7"],["CLOCK6","CLOCK6"],["CLOCK5","CLOCK5"],["CLOCK4","CLOCK4"],["CLOCK3","CLOCK3"],["CLOCK2","CLOCK2"],["CLOCK1","CLOCK1"],["ARROW_N","ARROW_N"],["ARROW_NE","ARROW_NE"],["ARROW_E","ARROW_E"],["ARROW_SE","ARROW_SE"],["ARROW_S","ARROW_S"],["ARROW_SW","ARROW_SW"],["ARROW_W","ARROW_W"],["ARROW_NW","ARROW_NW"],["TRIANGLE","TRIANGLE"],["TRIANGLE_LEFT","TRIANGLE_LEFT"],["CHESSBOARD","CHESSBOARD"],["DIAMOND","DIAMOND"],["DIAMOND_SMALL","DIAMOND_SMALL"],["SQUARE","SQUARE"],["SQUARE_SMALL","SQUARE_SMALL"],["RABBIT","RABBIT"],["COW","COW"],["MUSIC_CROTCHET","MUSIC_CROTCHET"],["MUSIC_QUAVER","MUSIC_QUAVER"],["MUSIC_QUAVERS","MUSIC_QUAVERS"],["PITCHFORK","PITCHFORK"],["XMAS","XMAS"],["PACMAN","PACMAN"],["TARGET","TARGET"],["TSHIRT","TSHIRT"],["ROLLERSKATE","ROLLERSKATE"],["DUCK","DUCK"],["HOUSE","HOUSE"],["TORTOISE","TORTOISE"],["BUTTERFLY","BUTTERFLY"],["STICKFIGURE","STICKFIGURE"],["GHOST","GHOST"],["SWORD","SWORD"],["GIRAFFE","GIRAFFE"],["SKULL","SKULL"],["UMBRELLA","UMBRELLA"],["SNAKE","SNAKE"],["ALL_CLOCKS","ALL_CLOCKS"],["ALL_ARROWS","ALL_ARROWS"]],type:"field_dropdown"}],output:["microbit_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:Q.Msg.MIXLY_MICROBIT_Built_in_image1,message0:Q.Msg.MIXLY_MICROBIT_Built_in_image})}},TM={init:function(){this.jsonInit({colour:Zh,args0:[{check:["microbit_image","List",String],type:"input_value",name:"image"}],output:"microbit_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image.copy",message0:Q.Msg.MIXLY_MICROBIT_Copy_image}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Copy_image1)}},hM={init:function(){this.jsonInit({colour:Zh,args0:[{check:["microbit_image","List",String],type:"input_value",name:"image"}],output:"microbit_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image.invert",message0:Q.Msg.MIXLY_MICROBIT_Invert_image}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Invert_image1)}},MM={init:function(){this.jsonInit({colour:Zh,args0:[{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"00"},{colour:"#000000",type:"field_colour",name:"01"},{colour:"#000000",type:"field_colour",name:"02"},{colour:"#000000",type:"field_colour",name:"03"},{colour:"#000000",type:"field_colour",name:"04"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"10"},{colour:"#000000",type:"field_colour",name:"11"},{colour:"#000000",type:"field_colour",name:"12"},{colour:"#000000",type:"field_colour",name:"13"},{colour:"#000000",type:"field_colour",name:"14"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"20"},{colour:"#000000",type:"field_colour",name:"21"},{colour:"#000000",type:"field_colour",name:"22"},{colour:"#000000",type:"field_colour",name:"23"},{colour:"#000000",type:"field_colour",name:"24"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"30"},{colour:"#000000",type:"field_colour",name:"31"},{colour:"#000000",type:"field_colour",name:"32"},{colour:"#000000",type:"field_colour",name:"33"},{colour:"#000000",type:"field_colour",name:"34"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"40"},{colour:"#000000",type:"field_colour",name:"41"},{colour:"#000000",type:"field_colour",name:"42"},{colour:"#000000",type:"field_colour",name:"43"},{colour:"#000000",type:"field_colour",name:"44"}],output:"microbit_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image",message0:Q.Msg.MIXLY_MICROBIT_Create_image}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)}},mM={init:function(){var t=[[Q.Msg.MIXLY_UP,"up"],[Q.Msg.MIXLY_DOWN,"down"],[Q.Msg.MIXLY_LEFT,"left"],[Q.Msg.MIXLY_RIGHT,"right"]];this.setColour(Zh),this.setOutput(!0,"microbit_image"),this.setInputsInline(!0),this.appendValueInput("img").appendField(Q.Msg.DISPLAY_IMAGE_LET).setCheck(["microbit_image","List",String]),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(t),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[t]+s}))}},OM={init:function(){var t=[[Q.Msg.MICROBIT_DISPLAY_UNION,"+"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"-"]];this.setColour(Zh),this.setOutput(!0,"microbit_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[t]}))}},cM={init:function(){this.setColour(Zh),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(Q.Msg.MIXLY_LCD_PRINT1),this.appendValueInput("TEXT2",String).setCheck([String,Number]).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_LCD_PRINT2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_LCD_PRINT4_TOOLTIP)}},EM={init:function(){this.setColour(Zh),this.appendValueInput("device").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_SETUP).appendField(Q.Msg.MIXLY_DF_LCD).appendField("1602").appendField("mylcd").appendField(Q.Msg.MIXLY_LCD_ADDRESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_SETUP+Q.Msg.MIXLY_DF_LCD+Q.Msg.MIXLY_LCD_ADDRESS)}},RM={init:function(){this.setColour(Zh),this.appendValueInput("row",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(Q.Msg.MIXLY_LCD_ROW),this.appendValueInput("column",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_LCD_COLUMN),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_LCD_PRINT),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_LCD_PRINT3_TOOLTIP)}},gM={init:function(){this.setColour(Zh),this.appendDummyInput().appendField(Q.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_ON,"on()"],[Q.Msg.MIXLY_OFF,"off()"],[Q.Msg.MIXLY_LCD_STAT_CLEAR,"clear()"],[Q.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(False)"],[Q.Msg.MIXLY_LCD_BACKLIGHT,"backlight(True)"]]),"STAT"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);var t=this;this.setTooltip((function(){var e=t.getFieldValue("STAT");return Q.Msg.LISTS_SET_INDEX_SET+Q.Msg.MIXLY_DF_LCD+{"on()":Q.Msg.MIXLY_ON,"off()":Q.Msg.MIXLY_OFF,"clear()":Q.Msg.MIXLY_LCD_STAT_CLEAR,"backlight(off)":Q.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(on)":Q.Msg.MIXLY_LCD_BACKLIGHT}[e]}))}},CM={init:function(){this.appendDummyInput().appendField(Q.Msg.MIXLY_DF_LCD+" OLED "+Q.Msg.OLEDDISPLAY),this.appendValueInput("Text_line1","String").setAlign(Q.inputs.Align.RIGHT).appendField("(128*64) "+Q.Msg.line1),this.appendValueInput("Text_line2","String").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.line2),this.appendValueInput("Text_line3","String").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.line3),this.appendValueInput("Text_line4","String").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.line4),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Zh),this.setTooltip(Q.Msg.MIXLY_DF_LCD+Q.Msg.OLEDDISPLAY+Q.Msg.MIXLY_MICROBIT_TYPE_STRING)}},AM={init:function(){var t=[[Q.Msg.MIXLY_HEIGHT,"height"],[Q.Msg.MIXLY_WIDTH,"width"]];this.setColour(Zh),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("microbit_image"),this.appendDummyInput("").appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE+{height:Q.Msg.MIXLY_HEIGHT,width:Q.Msg.MIXLY_WIDTH}[t]}))}},LM={init:function(){this.setColour(Zh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_LCD_STAT_CLEAR,"0"],[Q.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL,"1"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i={0:Q.Msg.MIXLY_LCD_STAT_CLEAR,1:Q.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL};return Q.Msg.MIXLY_DF_LCD+i[e]}))}},SM="#777777",fM={init:function(){this.setColour(SM),this.appendDummyInput("").appendField("from ").appendField(new Q.FieldTextInput("microbit"),"path").appendField(" import ").appendField(new Q.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},DM={init:function(){this.setColour(SM),this.appendDummyInput("").appendField("import ").appendField(new Q.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},NM={init:function(){this.setColour(SM),this.appendDummyInput("").appendField(new Q.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Q.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;e 0:\n pre = bin(value).count("1")\n # find first non full high value afterwards\n try:\n k, value = next((ind, v)\n for ind, v in enumerate(resp[i:length - 2]) if resp[i + ind + 1] == 0)\n post = bin(value).count("1") if k else 0\n k = k + i\n except StopIteration:\n i = -1\n dist= -1 if i < 0 else round((pre + (k - i) * 8. + post) * 8 * 0.172)\n return dist\n\n def distance_cm(self):\n return self.distance_mm() / 10.0\n\nsonar=HCSR04()\n\n',["sonar.distance_cm()",e.ORDER_ATOMIC]},EE=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *"},RE=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *";var i=this.getFieldValue("TIME_TYPE");switch(i){case"Year":case"Month":case"Day":case"Hour":case"Minute":case"Second":case"Week":return["ds."+i+"()",e.ORDER_ASSIGNMENT];case"Mix1":return["ds.get_date()",e.ORDER_ASSIGNMENT];case"Mix2":return["ds.get_time()",e.ORDER_ASSIGNMENT]}},gE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *","ds.set_time("+e.valueToCode(this,"hour",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"minute",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"second",e.ORDER_ASSIGNMENT)+")\n"},CE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *","ds.set_date("+e.valueToCode(this,"year",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"month",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"day",e.ORDER_ASSIGNMENT)+")\n"},AE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","compass.clear_calibration()\n"},LE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["display.read_light_level()",e.ORDER_ATOMIC]},SE=function(t,e){var i=this.getFieldValue("Trig"),n=this.getFieldValue("Echo");return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_ultrasonic="from ultrasonic import *","sonar = HCSR04(tpin=pin"+i+", epin=pin"+n+")\n"},fE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_TCS="from TCS import *",["tcs.getRawRGBData("+this.getFieldValue("TCS34725_COLOR")+")",e.ORDER_ATOMIC]},DE=function(t,e){var i=this.getFieldValue("PIN"),n=e.valueToCode(this,"NominalResistance",e.ORDER_ATOMIC),s=e.valueToCode(this,"betaCoefficient",e.ORDER_ATOMIC),o=e.valueToCode(this,"seriesResistor",e.ORDER_ATOMIC);return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_ntc="import ntc",["ntc.read(pin"+i+", "+n+", "+s+", "+o+")",e.ORDER_ATOMIC]},NE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+"))\n"},PE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+")+'\\r\\n')\n"},FE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str(hex("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||"0")+")) + '\\r\\n')\n"},vE=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=e.valueToCode(this,"char_marker",e.ORDER_ATOMIC)||";",n=e.statementToCode(this,"DO");e.definitions_["func_serial_receive_data_event_"+i.charCodeAt(1)]="serial.onDataReceived("+i+", () => {\n"+n+"}\n"},YE=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.any()",e.ORDER_ATOMIC]},bE=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.read()",e.ORDER_ATOMIC]},XE=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.readline()",e.ORDER_ATOMIC]},yE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["serial.readUntil("+this.getFieldValue("char_marker")+")",e.ORDER_ATOMIC]},VE=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=e.valueToCode(this,"RX",e.ORDER_ATOMIC),n=e.valueToCode(this,"TX",e.ORDER_ATOMIC);return isNaN(parseInt(i))||(i="pin"+i),isNaN(parseInt(n))||(n="pin"+n),"uart.init(rx="+i+", tx="+n+", baudrate="+this.getFieldValue("baudrate")+")\n"},BE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.init(baudrate="+this.getFieldValue("baudrate")+")\n"},GE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["input("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")",e.ORDER_ATOMIC]},UE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")\n"},kE=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+',end ="")\n'},wE=function(t,e){return"control.inBackground(() => {\n"+e.statementToCode(this,"do")+"})\n"},xE=function(){return"control.reset()\n"},HE=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||q.Profile.default.serial)+")\n"},WE=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||q.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||q.Profile.default.serial)+")\n"},KE=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||q.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||q.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},JE=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},jE=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},QE=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},qE=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},zE=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},ZE=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},$E=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","sleep("+(e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000")+")\n"},tR=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},eR=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["running_time()",e.ORDER_ATOMIC]},iR=function(){return"while True:\n pass\n"},nR=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","reset()\n"},sR=function(t,e){return e.definitions_.import_os="import os",["os.uname()",e.ORDER_ATOMIC]};Object.assign(Q.Variables,Z),Object.assign(Q.Procedures,ap),Q.Python=lp,Q.generator=lp,q.Profile.default={},Object.assign(q.Profile,sh),Object.assign(q.Profile.default,sh.microbit),Object.assign(Q.Blocks,e,i,n,s,o,_,u,r,p,a,l,I,d,f,D,F,v,Y,b,X,y,V,B,G),Object.assign(Q.Python.forBlock,T,h,M,m,O,c,E,R,g,C,A,L,S,N,P,U,k,w,x,H,W,K,J,j)})(); \ No newline at end of file diff --git a/boards/default/micropython_nrf51822_mithoncc/index.xml b/boards/default/micropython_nrf51822_mithoncc/index.xml index 255b0158..77a41088 100644 --- a/boards/default/micropython_nrf51822_mithoncc/index.xml +++ b/boards/default/micropython_nrf51822_mithoncc/index.xml @@ -1 +1 @@ -1000100,1,2,3051i90x151100a10.998124.82110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyprompt100012MixlyMixly1201201>323760x756269740Mixlyresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponse \ No newline at end of file +1000100,1,2,3051i90x151100a10.998124.82110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyprompt100012MixlyMixly1201201>323760x756269740Mixlyresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponse \ No newline at end of file diff --git a/boards/default/micropython_nrf51822_mithoncc/main.bundle.cdeaf5ef.js b/boards/default/micropython_nrf51822_mithoncc/main.bundle.65c43588.js similarity index 60% rename from boards/default/micropython_nrf51822_mithoncc/main.bundle.cdeaf5ef.js rename to boards/default/micropython_nrf51822_mithoncc/main.bundle.65c43588.js index 50356f6e..9f0fa54d 100644 --- a/boards/default/micropython_nrf51822_mithoncc/main.bundle.cdeaf5ef.js +++ b/boards/default/micropython_nrf51822_mithoncc/main.bundle.65c43588.js @@ -18,4 +18,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -class ${constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Q.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Q.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_if_else");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Q.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(Q.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},mt={init:function(){this.setColour(It),this.appendValueInput("FROM").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.PYTHON_RANGE).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},ct={init:function(){this.setColour(It),this.appendValueInput("LIST").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Q.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Q.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Et={init:function(){this.setColour(It),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Q.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Q.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Q.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Rt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Q.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Q.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_finally");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},gt={init:function(){this.setColour(It);var t=new Q.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Ct={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Q.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Q.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},At={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Q.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Q.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Et.OPERATORS=[[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],gt.OPERATORS=[[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Lt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Q.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},St={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Dt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Q.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Nt={init:function(){this.setColour(It),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},ft={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Q.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Pt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Q.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Ft={init:function(){this.jsonInit({message0:Q.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:It,tooltip:Q.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Q.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},vt={init:function(){this.setColour(It),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_STAT),this.setOutput(!0)}},Yt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},Vt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Q.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},bt={init:function(){this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Q.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Q.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Q.FieldDropdown([[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(It),this.setTooltip("do-while loop"),this.setHelpUrl("")}},Xt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},Ut={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},Bt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET+Q.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_GET_UNIQUE_IDEN)}},wt={init:function(){this.setColour(It),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Q.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},Gt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},kt=230;Q.FieldTextInput.math_number_validator=function(t){return String(t)},Q.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const Ht={init:function(){this.setColour(kt),this.appendDummyInput().appendField(new Q.FieldTextInput("0",Q.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MATH_NUMBER_TOOLTIP)}},xt={init:function(){this.setColour(kt);this.appendDummyInput("").appendField(Q.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Q.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Wt={init:function(){this.setColour(kt);this.appendDummyInput("").appendField(Q.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Q.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Kt={init:function(){this.setColour(kt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Q.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Q.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Q.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},jt={init:function(){this.setColour(kt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Q.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Q.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Q.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Jt={init:function(){this.setColour(kt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Q.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Qt={init:function(){this.setColour(kt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Q.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Q.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Q.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Q.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Q.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Q.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Q.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Q.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},qt={init:function(){var t=[[Q.Msg.MATH_BIN,"bin"],[Q.Msg.MATH_OCT,"oct"],[Q.Msg.MATH_HEX,"hex"]];this.setColour(kt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Q.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:Q.Msg.MATH_DEC_TOOLTIP_BIN,oct:Q.Msg.MATH_DEC_TOOLTIP_OCT,hex:Q.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},zt={init:function(){var t=[[Q.Msg.LANG_MATH_TO_ROUND,"round"],[Q.Msg.LANG_MATH_TO_CEIL,"ceil"],[Q.Msg.LANG_MATH_TO_FLOOR,"floor"],[Q.Msg.MATH_ABS,"fabs"],[Q.Msg.MATH_SQRT,"sqrt"]];this.setColour(kt),this.appendValueInput("A").setCheck(Number).appendField(new Q.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Q.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Q.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Q.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Q.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Q.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Q.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Zt={init:function(){var t=[[Q.Msg.MIXLY_MAX,"max"],[Q.Msg.MIXLY_MIN,"min"]];this.setColour(kt),this.appendValueInput("A").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(new Q.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Q.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Q.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Q.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},$t={init:function(){var t=[[Q.Msg.MATH_TWO,"two"],[Q.Msg.MATH_EIGHT,"eight"],[Q.Msg.MATH_TEN,"ten"],[Q.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(kt),this.appendDummyInput("").appendField(Q.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Q.FieldDropdown(t),"OP").appendField(Q.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.MATH_ZHW).appendField(new Q.FieldDropdown(t),"OP2").appendField(Q.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:Q.Msg.MATH_Before_two,eight:Q.Msg.MATH_Before_eight,ten:Q.Msg.MATH_Before_ten,sixteen:Q.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:Q.Msg.MATH_Behind_two,eight:Q.Msg.MATH_Behind_eight,ten:Q.Msg.MATH_Behind_ten,sixteen:Q.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},te={init:function(){var t=[[Q.Msg.LANG_MATH_INT,"int"],[Q.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(kt),this.setOutput(!0,Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Q.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:Q.Msg.LANG_MATH_INT,float:Q.Msg.LANG_MATH_FLOAT_RANDOM};return Q.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},ee={init:function(){this.setColour(kt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Q.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Q.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Q.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Q.Msg.MATH_CONSTRAIN_TOOLTIP)}},ie={init:function(){this.setColour(kt),this.appendValueInput("NUM",Number).appendField(Q.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Q.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Q.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_MATH_MAP)}},ne={init:function(){this.setColour(kt),this.appendDummyInput().appendField(new Q.FieldTextInput("0",Q.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Q.Msg.MATH_NUMBER_TOOLTIP)}},se={init:function(){this.setColour(kt),this.appendValueInput("NUM").setCheck(Number).appendField(Q.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},oe={init:function(){this.setColour(kt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Q.Msg.MATH_ROUND).appendField(Q.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Q.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Q.Msg.MATH_ROUND_NEW_TOOLTIP)}},_e={init:function(){var t=[[Q.Msg.MIXLY_TO_INT,"int"],[Q.Msg.MIXLY_TO_FLOAT,"float"],[Q.Msg.MIXLY_TO_BITES,"b"],[Q.Msg.LANG_MATH_BYTE+Q.Msg.MIXLY_TO_INT,"bti"]];this.setColour(kt),this.appendValueInput("VAR").appendField(new Q.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Q.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Q.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Q.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ue={init:function(){var t=[[Q.Msg.MIXLY_TO_INT,"int"],[Q.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(kt),this.appendValueInput("VAR").appendField(new Q.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Q.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Q.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},ae=ie,re={init:function(){this.setColour(kt),this.appendValueInput("VAR").appendField(Q.Msg.LANG_MATH_BYTE+Q.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},pe={init:function(){this.setColour(kt),this.itemCount_=1,this.setMutator(new Q.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(Q.Msg.MIXLY_PRODUCT+Q.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(Q.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(Q.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const Me={init:function(){this.setColour(Te),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Q.FieldTextInput("",Q.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Q.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new Q.FieldImage(e,7,12,'"')}},Oe={init:function(){this.setColour(Te),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Q.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},me={init:function(){this.setColour(Te),this.appendValueInput("VAR").setCheck(Number).appendField(Q.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},ce={init:function(){this.setColour(Te),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Ee={init:function(){this.setColour(Te),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Re={init:function(){this.setColour(Te),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},ge={init:function(){this.WHERE_OPTIONS=[[Q.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Q.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Q.Msg.TEXT_GET_INDEX_RANDOM+1+Q.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Q.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Te),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Q.Msg.LISTS_GET_INDEX_GET,"MODE"),Q.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Q.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+Q.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Q.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:Q.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Q.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Q.Msg.TEXT_GET_INDEX_RANDOM};return Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+Q.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==Q.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),Q.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Q.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new Q.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),Q.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Ce={init:function(){this.setHelpUrl(Q.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Te),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Q.Msg.LISTS_GET_INDEX_GET+" "+Q.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Q.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+Q.Msg.LISTS_GET_INDEX_FROM_START+"n"+Q.Msg.TEXT_CHARAT2)}},Ae={init:function(){this.setHelpUrl(Q.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Te),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Q.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Q.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Le={init:function(){this.WHERE_OPTIONS_1=[[Q.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Q.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Q.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Q.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Q.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Q.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Q.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Te),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(Q.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==Q.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==Q.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),Q.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(Q.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new Q.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Se={init:function(){this.setHelpUrl(Q.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Te),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Q.Msg.LISTS_GET_INDEX_GET+" "+Q.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Q.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Q.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Q.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},De={init:function(){var t=[[Q.Msg.MIXLY_EQUALS,"==="],[Q.Msg.MIXLY_STARTSWITH,"startswith"],[Q.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Te),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Q.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Ne={init:function(){this.setColour(Te),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Q.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_COMPARETO_HELP)}},fe={init:function(){var t=[[Q.Msg.TEXT_UPPER,"upper"],[Q.Msg.TEXT_TITLE,"title"],[Q.Msg.TEXT_CAPITALIZE,"capitalize"],[Q.Msg.TEXT_SWAPCASE,"swapcase"],[Q.Msg.TEXT_LOWER,"lower"]];this.setColour(Te),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:Q.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Q.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Q.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Q.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Q.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Pe={init:function(){var t=[[Q.Msg.TEXT_LJUST,"ljust"],[Q.Msg.TEXT_CENTER,"center"],[Q.Msg.TEXT_RJUST,"rjust"]];this.setColour(Te),this.appendValueInput("VAR").appendField(new Q.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Q.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Q.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Fe={init:function(){this.setColour(Te),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Q.Msg.MIXLY_MID+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Q.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ve={init:function(){this.setColour(Te),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Ye={init:function(){this.setColour(Te),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Q.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Q.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},Ve={init:function(){this.setColour(Te),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Q.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Q.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},be={init:function(){var t=[[Q.Msg.TEXT_TRIM_BOTH,"strip"],[Q.Msg.TEXT_TRIM_LEFT,"lstrip"],[Q.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Te),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Q.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Q.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(Q.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:Q.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Q.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Q.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},Xe={init:function(){this.setColour(Te),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Q.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Q.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},vi={init:function(){this.setColour(Pi),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Q.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Yi={init:function(){this.setColour(Pi),this.appendDummyInput().appendField(Q.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Vi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_KEYS),this.setTooltip(Q.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},bi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Q.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Q.Msg.DICTS_GET_TOOLTIP)}},Xi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Q.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Q.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Q.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},yi={init:function(){this.setColour(Pi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Q.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Ui={init:function(){this.setColour(Pi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Q.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_DELETE_TOOLTIP)}},Bi={init:function(){this.setColour(Pi),this.appendValueInput("DICT2").setCheck("Dict").appendField(Q.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Q.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MID),this.setTooltip(Q.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_CLEAR),this.setTooltip(Q.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Gi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_ITEMS),this.setTooltip(Q.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},ki={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_VALUES),this.setTooltip(Q.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Hi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_LENGTH),this.setTooltip(Q.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},xi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_DELDICT),this.setTooltip(Q.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Wi={init:function(){this.MODE=[[Q.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Q.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Q.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Q.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=Q.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=Q.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==Q.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new Q.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},Ki={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Q.Msg.DICTS_ADD_VALUE),this.setTooltip(Q.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},ji={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Q.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Ji={init:function(){this.setColour(Pi),this.appendDummyInput("").appendField(new Q.FieldLabel(Q.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new Q.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Q.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Qi={init:function(){this.setColour(Pi),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},qi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_TO_JSON),this.setTooltip(Q.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},zi={init:function(){this.setColour(Pi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Q.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Zi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},$i={init:function(){this.setColour(Pi),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_TO_JSON),this.setTooltip(Q.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},tn=210,en={init:function(){var t=Q.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:Q.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Q.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Q.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Q.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Q.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Q.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},nn={init:function(){var t=Q.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=Q.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new Q.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},sn={init:function(){var t=[[Q.Msg.LOGIC_OPERATION_AND,"AND"],[Q.Msg.LOGIC_OPERATION_OR,"OR"],[Q.Msg.LOGIC_OPERATION_NOR,"NOR"],[Q.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:Q.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Q.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Q.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Q.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},on={init:function(){this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Q.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Q.Msg.LOGIC_NEGATE_TOOLTIP)}},_n={init:function(){var t=[[Q.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Q.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Q.FieldDropdown(t),"BOOL"),this.setTooltip(Q.Msg.LOGIC_BOOLEAN_TOOLTIP)}},un={init:function(){this.setColour(tn),this.setOutput(!0),this.appendDummyInput().appendField(Q.Msg.LOGIC_NULL),this.setTooltip(Q.Msg.LOGIC_NULL_TOOLTIP)}},an={init:function(){this.setColour(tn),this.appendValueInput("A"),this.appendValueInput("B").appendField(Q.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Q.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},rn={init:function(){var t=[[Q.Msg.TEXT_APPEND_TO,"in"],[Q.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(tn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Q.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(Q.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.IN)}},pn={init:function(){var t=[[Q.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Q.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(tn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},ln={init:function(){this.setColour(tn),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},In={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Q.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Tn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_USE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Q.Msg.MIXLY_BELONG;return i+{r:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},dn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_USE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Q.Msg.MIXLY_BELONG,_=Q.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},hn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Q.Msg.MIXPY_TEXT_ENCODE).appendField(new Q.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_USE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Q.Msg.MIXLY_BELONG,_=Q.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},Mn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},On={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},mn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},cn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Q.Msg.MICROBIT_PYTHON_TYPE)}},En={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.HTML_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Rn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},gn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Cn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const An={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Ln={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Sn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Dn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},Nn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},fn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Q.Msg.MIXLY_ESP32_SET+{mkdir:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Pn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Q.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Fn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},vn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.HTML_FILE,"isfile"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Yn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Q.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_SETUP+Q.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Q.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Vn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Q.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},bn={init:function(){var t=Q.Procedures.findLegalName("",this),e=new Q.FieldTextInput(t,Q.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new Q.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Q.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Q.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(Q.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(Q.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(Q.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=Q.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),Q.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{Q.Events.enable()}},mutationToDom:function(t){var e=Q.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(Q.Msg.MIXLY_AIP_ATTR).setAlign(Q.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},fs={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(Q.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Ps={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(Q.Msg.HTML_FORM_CONTENT).appendField(new Q.FieldDropdown([[Q.Msg.HTML_TEXT,"text"],[Q.Msg.HTML_EMAIL,"email"],[Q.Msg.HTML_NUMBER,"number"],[Q.Msg.HTML_PASSWORD,"password"],[Q.Msg.HTML_CHECKBOX,"checkbox"],[Q.Msg.HTML_RADIOBUTTON,"radiobutton"],[Q.Msg.HTML_BUTTON,"button"],[Q.Msg.HTML_COLOUR,"colour"],[Q.Msg.HTML_DATE,"date"],[Q.Msg.HTML_LOCALTIME,"local time"],[Q.Msg.HTML_FILE,"file"],[Q.Msg.HTML_HIDDEN,"hidden"],[Q.Msg.HTML_IMAGE,"image"],[Q.Msg.HTML_MONTH,"month"],[Q.Msg.HTML_RANGE,"range"],[Q.Msg.HTML_RESET,"reset"],[Q.Msg.HTML_SEARCH,"search"],[Q.Msg.HTML_SUBMIT,"submit"],[Q.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Q.Msg.HTML_TIME,"time"],[Q.Msg.HTML_URL,"url"],[Q.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Q.Msg.HTML_NAME).appendField(new Q.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Q.Msg.HTML_VALUE).appendField(new Q.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Q.Msg.MIXLY_AIP_ATTR).setAlign(Q.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fs={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(new Q.FieldTextInput("property"),"KEY").appendField(":").appendField(new Q.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vs={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(new Q.FieldTextInput("property"),"KEY").appendField(":").appendField(new Q.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ys={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(Q.Msg.HTML_TEXT).appendField(new Q.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vs=160,bs={init:function(){this.setColour(Vs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Q.FieldTable(""),"TEXT")}},Xs={init:function(){this.setColour(Vs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Q.FieldMultilineInput(""),"TEXT")}},ys={init:function(){this.setColour(Vs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Q.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Us={init:function(){this.setColour(Vs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Bs={init:function(){this.setColour(Vs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Q.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},ws={init:function(){this.setColour(Vs),this.appendValueInput("VALUE").appendField(Q.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Gs={init:function(){this.setColour(Vs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Q.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Q.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=Q.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+r()+"("+t+", "+e+", "+i+")"},Q.isNumber(n)&&Q.isNumber(s)&&Q.isNumber(o))n=parseFloat(n),s=parseFloat(s),o=Math.abs(parseFloat(o)),0==n%1&&0==s%1&&0==o%1?(n<=s?(s++,t=0==n&&1==o?s:n+", "+s,1!=o&&(t+=", "+o)):t=n+", "+--s+", -"+o,t="range("+t+")"):(t=n",GTE:">="};const Xu=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",o=e.valueToCode(this,"B",n)||"False";if("AND"==i)var _=s+" and "+o;else if("OR"==i)_=s+" or "+o;else if("NOR"==i)_="not("+s+"^"+o+")";else _=s+"^"+o;return[_,n]},yu=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Uu=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Bu=function(t,e){return["None",e.ORDER_ATOMIC]},wu=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},Gu=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},ku=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},Hu=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},xu=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Wu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Ku=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},ju=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Ju=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Qu=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},qu=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},zu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Zu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},$u=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},ta=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},ea=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},ia=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},na=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},sa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},oa=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},_a=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ua=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},aa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},ra=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},pa=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},la=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Ia=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},Ta=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),Q.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var o=[],_=0;_\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},Ja=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Qa=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},qa=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},za=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Za=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},$a=function(t,e){return'"},tr=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},er=function(){return this.getFieldValue("TEXT")+"\n"},ir=function(t){return t.getFieldValue("TEXT")+"\n"},nr=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},sr=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},or=function(){return""},_r=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},ur=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+"while True:\n"+a.join("")+r.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+r.join("\n")},lr.scrubNakedValue=function(t){return t+"\n"},lr.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},lr.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},lr.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Q.utils.string.wrap(o,lr.COMMENT_WRAP-3),n+=lr.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const Ir=120,Tr={init:function(){this.setColour(Ir),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Q.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT).appendField(new Q.FieldDropdown(Tr.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))},OPERATORS:[[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]]},dr={init:function(){this.setColour(Ir);var t=new Q.FieldDropdown(dr.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}},OPERATORS:[[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]]},hr="5BA5A5",Mr={init:function(){this.appendValueInput("SUB").setCheck("var"),this.setColour(hr),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(Mr.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"shift_up"],[Q.Msg.MIXLY_DOWN,"shift_down"],[Q.Msg.MIXLY_LEFT,"shift_left"],[Q.Msg.MIXLY_RIGHT,"shift_right"]]},Or={init:function(){this.appendValueInput("SUB").setCheck("var"),this.setColour(hr),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(Or.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Q.Msg.MICROBIT_DISPLAY_UNION,"add"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},mr={init:function(){this.setColour(hr),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Q.FieldDropdown(mr.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE+{height:Q.Msg.MIXLY_HEIGHT,width:Q.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Q.Msg.MIXLY_HEIGHT,"height"],[Q.Msg.MIXLY_WIDTH,"width"]]},cr={init:function(){this.setColour(hr),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RECT).appendField(new Q.FieldDropdown(cr.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_OLED_RECT)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Er={init:function(){this.setColour(hr),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Q.FieldDropdown(Er.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Rr={init:function(){this.setColour(hr),this.appendValueInput("SUB").setCheck("var").appendField(Q.Msg.MSG.catOLED),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(Rr.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"shift_up"],[Q.Msg.MIXLY_DOWN,"shift_down"],[Q.Msg.MIXLY_LEFT,"shift_left"],[Q.Msg.MIXLY_RIGHT,"shift_right"]]},gr="#569A98",Cr={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Cr.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gr),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(32).fill(0)))},Ar={init:function(){this.setColour(gr),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(Ar.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Q.Msg.MICROBIT_DISPLAY_UNION,"add"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Lr={init:function(){this.setColour(gr),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(Lr.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);q.Boards.getSelectedBoardKey();"Python ESP32-S3"===q.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Q.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:Q.Msg.MIXLY_UP,shift_down:Q.Msg.MIXLY_DOWN,shift_left:Q.Msg.MIXLY_LEFT,shift_right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"shift_up"],[Q.Msg.MIXLY_DOWN,"shift_down"],[Q.Msg.MIXLY_LEFT,"shift_left"],[Q.Msg.MIXLY_RIGHT,"shift_right"]]},Sr={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Sr.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gr),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},Dr={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Dr.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gr),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},Nr={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Nr.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gr),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},fr={init:function(){this.setColour(gr),this.appendDummyInput().appendField(Q.Msg.OLED_SET_FONT).appendField(new Q.FieldDropdown(fr.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+Q.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+Q.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+Q.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Pr={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Pr.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gr),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},Fr={init:function(){this.setColour(gr),this.appendDummyInput().appendField(Q.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new Q.FieldDropdown(Fr.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[Q.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[Q.Msg.CLOCKWISE+"90"+Q.Msg.blockpy_setheading_degree,"1"],[Q.Msg.CLOCKWISE+"180"+Q.Msg.blockpy_setheading_degree,"2"],[Q.Msg.CLOCKWISE+"270"+Q.Msg.blockpy_setheading_degree,"3"]]},vr={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(vr.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gr),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},Yr=180,Vr={init:function(){this.setColour(Yr),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(Q.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(Vr.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"up"],[Q.Msg.MIXLY_DOWN,"down"],[Q.Msg.MIXLY_LEFT,"left"],[Q.Msg.MIXLY_RIGHT,"right"]]},br={init:function(){this.setColour(Yr),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(br.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Q.Msg.MICROBIT_DISPLAY_UNION,"+"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},Xr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Q.FieldDropdown(Xr.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE+{height:Q.Msg.MIXLY_HEIGHT,width:Q.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Q.Msg.MIXLY_HEIGHT,"height"],[Q.Msg.MIXLY_WIDTH,"width"]]},yr={init:function(){this.setColour(Yr),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RECT).appendField(new Q.FieldDropdown(yr.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_OLED_RECT)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Ur={init:function(){this.setColour(Yr),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Q.FieldDropdown(Ur.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Br={init:function(){this.setColour(Yr),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_DISPLAY_DRAW+Q.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new Q.FieldDropdown(Br.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_DISPLAY_DRAW+Q.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},wr=225,Gr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(Q.Msg.MIXLY_NETWORK_MODE).appendField(new Q.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},kr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[Q.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=Q.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:Q.Msg.MIXLY_NETWORK_WIFI_OPEN,False:Q.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},Hr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},xr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return Q.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:Q.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},Wr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(Q.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(Q.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},Kr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_CONNECT+Q.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},jr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[Q.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[Q.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:Q.Msg.MIXLY_ESP32_NETWORK_IP,1:Q.Msg.MIXLY_ESP32_NETWORK_MASK,2:Q.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},Jr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},Qr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[Q.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},qr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(Q.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(Q.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},zr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},Zr={init:function(){this.setColour(wr),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new Q.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},$r={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},tp={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},ep={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},ip={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},np={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},sp={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},op={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},_p={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},up={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},ap={init:function(){this.setColour(wr),this.appendValueInput("DOMAIN").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Q.Msg.blockpy_REQUESTS_GET).appendField(new Q.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},rp={init:function(){this.appendValueInput("VAL"),this.setColour(wr),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Q.FieldDropdown(rp.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:Q.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Q.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Q.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[Q.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},pp={init:function(){this.appendValueInput("VAR").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(wr),this.appendDummyInput("").appendField(Q.Msg.blockpy_CONDUCT).appendField(new Q.FieldDropdown(pp.METHOD),"DIR"),this.appendDummyInput("").appendField(Q.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:Q.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:Q.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},lp={init:function(){this.setColour(wr),this.appendDummyInput("").appendField(Q.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(Q.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},Ip={init:function(){this.setColour(wr),this.appendDummyInput("").appendField(new Q.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},Tp="#3288dd",dp={init:function(){this.setColour(Tp),this.appendValueInput("URL").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Q.Msg.blockpy_CONDUCT).appendField(new Q.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(Q.Msg.blockpy_REQUESTS).appendField(Q.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},hp={init:function(){this.setColour(Tp),this.appendValueInput("URL").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Q.Msg.blockpy_CONDUCT).appendField(new Q.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(Q.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(Q.Msg.blockpy_REQUESTS+Q.Msg.OLED_STRING),this.appendDummyInput("").appendField(Q.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},Mp={init:function(){this.appendValueInput("VAL"),this.setColour(Tp),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Q.FieldDropdown(Mp.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[Q.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[Q.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},Op={init:function(){this.setColour(Tp),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(Q.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Q.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(Q.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(Q.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},mp={init:function(){this.setColour(Tp),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(Q.Msg.MIXLY_EMQX_SERVER).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(Q.Msg.MIXLY_EMQX_PORT).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(Q.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Q.Msg.MIXLY_WIFI_USERNAME).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Q.Msg.MIXLY_IOT_PASSWORD).setAlign(Q.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cp={init:function(){this.setColour(Tp),this.appendValueInput("TOPIC").appendField(Q.Msg.MIXLY_EMQX_SUBSCRIBE+Q.Msg.MIXLY_MICROBIT_MSG).appendField(Q.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(Q.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},Ep={init:function(){this.setColour(Tp),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Q.Msg.MIXLY_EMQX_SUBSCRIBE+Q.Msg.MIXLY_MICROBIT_MSG).appendField(Q.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Q.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rp={init:function(){this.setColour(Tp),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Q.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Q.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Q.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gp={init:function(){this.setColour(Tp),this.appendDummyInput().appendField("mqtt"+Q.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},Cp="#A58C5B",Ap={init:function(){this.setColour(Cp),this.appendValueInput("PIN",Number).appendField(new Q.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Q.FieldDropdown(Ap.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Q.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Q.Msg.MIXLY_GETHUMIDITY,"humidity"]]},Lp=(Q.Msg.PS2_TRIANGLE,Q.Msg.PS2_CIRCLE,Q.Msg.PS2_CROSS,Q.Msg.PS2_SQUARE,Q.Msg.PS2_L1,Q.Msg.PS2_L2,Q.Msg.PS2_R1,Q.Msg.PS2_R2,Q.Msg.PS2_UP,Q.Msg.PS2_RIGHT,Q.Msg.PS2_DOWN,Q.Msg.PS2_LEFT,Q.Msg.PS2_SELECT,Q.Msg.PS2_START,{init:function(){this.setColour(Cp),this.appendDummyInput("").appendField(Q.Msg.PS2_stick).appendField(new Q.FieldDropdown(Lp.PSSTK),"psstk"),this.setOutput(!0,Number),this.setTooltip("")},PSSTK:[[Q.Msg.PS2_RX,"0"],[Q.Msg.PS2_RY,"1"],[Q.Msg.PS2_LX,"2"],[Q.Msg.PS2_LY,"3"]]}),Sp={init:function(){this.setColour(Cp),this.appendValueInput("SUB").appendField(Q.Msg.PS2),this.appendDummyInput("").appendField(Q.Msg.MIXLY_JOYSTICK).appendField(new Q.FieldDropdown(Sp.PSSTK),"psstk"),this.setOutput(!0,Number),this.setTooltip("")},PSSTK:[[Q.Msg.PS2_RX,"RX"],[Q.Msg.PS2_RY,"RY"],[Q.Msg.PS2_LX,"LX"],[Q.Msg.PS2_LY,"LY"]]},Dp=40,Np={init:function(){this.setColour(Dp),this.appendValueInput("PIN",Number).appendField(new Q.FieldDropdown([["DHT11","dht11"],["DHT22","dht22"]]),"TYPE").appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Q.FieldDropdown(Np.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Q.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Q.Msg.MIXLY_GETHUMIDITY,"relative_humidity"],[Q.Msg.MIXLY_DHT11_T_H,"tempandhum"]]};const fp=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+" = network.WLAN(network."+this.getFieldValue("mode")+"_IF);\n"},Pp=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".connect("+e.valueToCode(this,"id",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"password",e.ORDER_ATOMIC)+")\n"},Fp=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".isconnected()",e.ORDER_ATOMIC]},vp=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".ifconfig()["+this.getFieldValue("mode")+"]",e.ORDER_ATOMIC]},Yp=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".disconnect()\n"},Vp=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".active("+this.getFieldValue("op")+")\n"},bp=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".active()",e.ORDER_ATOMIC]},Xp=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".config('"+this.getFieldValue("op")+"')",e.ORDER_ATOMIC]},yp=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".config(essid = "+e.valueToCode(this,"essid",e.ORDER_ATOMIC)+", channel="+e.valueToCode(this,"channel",e.ORDER_ATOMIC)+")\n"},Up=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".scan()",e.ORDER_ATOMIC]},Bp=function(t,e){e.definitions_["import_server_*"]="from server import *";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);return"if not "+i+".isconnected():\n connectWifi(SSID, PASSWORD)\nip="+i+".ifconfig()[0]\nprint(ip)\ntime.sleep(1)\nDATA=listenData()\n"},wp=function(t,e){e.definitions_.import_network="import network",e.definitions_.import_socket="import socket";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=this.getFieldValue("mode");return"UDP"==n?n="socket.SOCK_DGRAM":"TCP"==n&&(n="socket.SOCK_STREAM"),i+" = socket.socket(socket.AF_INET, "+n+")\n"},Gp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".bind("+e.valueToCode(this,"address",e.ORDER_ATOMIC)+")\n"},kp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".connect(socket.getaddrinfo"+e.valueToCode(this,"address",e.ORDER_ATOMIC)+"[0][-1])\n"},Hp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".listen("+e.valueToCode(this,"queue",e.ORDER_ATOMIC)+")\n"},xp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".accept()",e.ORDER_ASSIGNMENT]},Wp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".recv("+e.valueToCode(this,"size",e.ORDER_ATOMIC)+")",e.ORDER_ASSIGNMENT]},Kp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".send("+e.valueToCode(this,"content",e.ORDER_ATOMIC)+")\n"},jp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".recvfrom("+e.valueToCode(this,"size",e.ORDER_ATOMIC)+")",e.ORDER_ASSIGNMENT]},Jp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".sendto("+e.valueToCode(this,"content",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"address",e.ORDER_ATOMIC)+")\n"},Qp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".close()\n"},qp=function(t,e){return e.definitions_.import_requests="import requests",e.variableDB_.getName(this.getFieldValue("VAR"),Q.Variables.NAME_TYPE)+"= requests.get("+e.valueToCode(this,"DOMAIN",e.ORDER_ATOMIC)+")\n"},zp=function(t,e){return e.definitions_.import_requests="import requests",[(e.valueToCode(this,"VAL",e.ORDER_ASSIGNMENT)||"0")+"."+this.getFieldValue("ATTR"),e.ORDER_ATOMIC]},Zp=function(t,e){return e.definitions_.import_requests="import requests","requests."+this.getFieldValue("DIR")+"("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+")\n"},$p=function(t,e){return e.definitions_.import_ntptime="import ntptime",["ntptime.time(host="+e.valueToCode(this,"data",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},tl=function(t,e){return["'"+this.getFieldValue("op")+"'",e.ORDER_ATOMIC]},el=function(t,e){return e.definitions_.import_urequests="import urequests",["urequests."+this.getFieldValue("TYPE")+"("+e.valueToCode(this,"URL",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},il=function(t,e){return e.definitions_.import_urequests="import urequests",[(e.valueToCode(this,"VAL",e.ORDER_ASSIGNMENT)||"0")+"."+this.getFieldValue("ATTR"),e.ORDER_ATOMIC]},nl=function(t,e){return e.definitions_.import_urequests="import urequests",["urequests."+this.getFieldValue("TYPE")+"("+e.valueToCode(this,"URL",e.ORDER_ATOMIC)+", data="+e.valueToCode(this,"data",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},sl=function(t,e){return e.definitions_.import_educore_wifi="from educore import wifi","wifi.connect(ssid="+e.valueToCode(this,"WIFINAME",e.ORDER_ATOMIC)+", psd="+e.valueToCode(this,"PASSWORD",e.ORDER_ATOMIC)+", timeout="+e.valueToCode(this,"TIMEOUT",e.ORDER_ATOMIC)+")\n"},ol=function(t,e){return e.definitions_.import_educore_mqttclient="from educore import mqttclient","mqttclient.connect(server="+e.valueToCode(this,"SERVER",e.ORDER_ATOMIC)+", port="+e.valueToCode(this,"PORT",e.ORDER_ATOMIC)+", client_id="+e.valueToCode(this,"CLIENT_ID",e.ORDER_ATOMIC)+", user="+e.valueToCode(this,"USERNAME",e.ORDER_ATOMIC)+", psd="+e.valueToCode(this,"PASSWORD",e.ORDER_ATOMIC)+")\n"},_l=function(t,e){e.definitions_.import_educore_mqttclient="from educore import mqttclient";var i=e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC);return["mqttclient."+e.valueToCode(this,"MESSAGE",e.ORDER_ATOMIC)+"("+i+")",e.ORDER_ATOMIC]},ul=function(t,e){var i=e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC),n=e.valueToCode(this,"METHOD",e.ORDER_ATOMIC);return e.definitions_.import_educore_mqttclient="from educore import mqttclient","mqttclient.received(topic="+i+", callback="+n+")\n"},al=function(t,e){return e.definitions_.import_educore_mqttclient="from educore import mqttclient","mqtt_client.publish(topic="+e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC)+", content="+e.valueToCode(this,"MSG",e.ORDER_ATOMIC)+")\n"},rl=function(t,e){e.definitions_.import_educore_mqttclient="from educore import mqttclient";return["mqtt_client.connescted()",e.ORDER_ATOMIC]},pl=new Q.Generator("Python");pl.INDENT=" ",pl.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),pl.ORDER_ATOMIC=0,pl.ORDER_COLLECTION=1,pl.ORDER_STRING_CONVERSION=1,pl.ORDER_UNARY_POSTFIX=1,pl.ORDER_UNARY_PREFIX=2,pl.ORDER_MEMBER=2.1,pl.ORDER_FUNCTION_CALL=2.2,pl.ORDER_EXPONENTIATION=3,pl.ORDER_UNARY_SIGN=4,pl.ORDER_BITWISE_NOT=4,pl.ORDER_MULTIPLICATIVE=5,pl.ORDER_ADDITIVE=6,pl.ORDER_BITWISE_SHIFT=7,pl.ORDER_BITWISE_AND=8,pl.ORDER_BITWISE_XOR=9,pl.ORDER_BITWISE_OR=10,pl.ORDER_RELATIONAL=11,pl.ORDER_EQUALITY=11,pl.ORDER_LOGICAL_NOT=12,pl.ORDER_LOGICAL_AND=13,pl.ORDER_LOGICAL_OR=14,pl.ORDER_ASSIGNMENT=14,pl.ORDER_CONDITIONAL=15,pl.ORDER_LAMBDA=16,pl.ORDER_NONE=99,pl.ORDER_OVERRIDES=[[pl.ORDER_FUNCTION_CALL,pl.ORDER_MEMBER],[pl.ORDER_FUNCTION_CALL,pl.ORDER_FUNCTION_CALL],[pl.ORDER_MEMBER,pl.ORDER_MEMBER],[pl.ORDER_MEMBER,pl.ORDER_FUNCTION_CALL]],pl.init=function(){pl.PASS=this.INDENT+"pass\n",pl.definitions_=Object.create(null),pl.functionNames_=Object.create(null),pl.setups_=Object.create(null),pl.loops_=Object.create(null),pl.codeEnd_=Object.create(null),pl.variableDB_?pl.variableDB_.reset():pl.variableDB_=new tt(pl.RESERVED_WORDS_)},pl.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var o=this.definitions_[s];0===s.indexOf("import")?e.push(o):0===s.indexOf("var_declare")?i.push(o):n.push(o)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var _=[];for(var s in pl.functions_)_.push(pl.functions_[s]);_.length&&_.push("\n");var u=[];for(var s in pl.setups_)u.push(pl.setups_[s]);u.length&&u.push("\n");var a=[];for(var s in pl.loops_)a.push(pl.loops_[s]);var r=[];for(var s in pl.codeEnd_)r.push(pl.codeEnd_[s]);0!==r.length&&r.push("\n");let p="";return p=a.length>0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+"while True:\n"+a.join("")+r.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+r.join("\n"),p},pl.scrubNakedValue=function(t){return t+"\n"},pl.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},pl.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},pl.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Q.utils.string.wrap(o,pl.COMMENT_WRAP-3),n+=pl.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const ll={microbit:{description:"microbit_python",digital:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P4","4"],["P5","5"],["P6","6"],["P7","7"],["P8","8"],["P9","9"],["P10","10"],["P11","11"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"],["P19","19"],["P20","20"]],pwm:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P4","4"],["P5","5"],["P6","6"],["P7","7"],["P8","8"],["P9","9"],["P10","10"],["P11","11"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"],["P19","19"],["P20","20"]],analog:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P4","4"],["P10","10"]],interrupt:[["P0","0"],["P1","1"],["P2","2"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],builtinimg:[["HEART","Image.HEART"],["HEART_SMALL","Image.HEART_SMALL"],["HAPPY","Image.HAPPY"],["SMILE","Image.SMILE"],["SAD","Image.SAD"],["CONFUSED","Image.CONFUSED"],["ANGRY","Image.ANGRY"],["ASLEEP","Image.ASLEEP"],["SURPRISED","Image.SURPRISED"],["SILLY","Image.SILLY"],["FABULOUS","Image.FABULOUS"],["MEH","Image.MEH"],["YES","Image.YES"],["NO","Image.NO"],["CLOCK12","Image.CLOCK12"],["CLOCK11","Image.CLOCK11"],["CLOCK10","Image.CLOCK10"],["CLOCK9","Image.CLOCK9"],["CLOCK8","Image.CLOCK8"],["CLOCK7","Image.CLOCK7"],["CLOCK6","Image.CLOCK6"],["CLOCK5","Image.CLOCK5"],["CLOCK4","Image.CLOCK4"],["CLOCK3","Image.CLOCK3"],["CLOCK2","Image.CLOCK2"],["CLOCK1","Image.CLOCK1"],["ARROW_N","Image.ARROW_N"],["ARROW_NE","Image.ARROW_NE"],["ARROW_E","Image.ARROW_E"],["ARROW_SE","Image.ARROW_SE"],["ARROW_S","Image.ARROW_S"],["ARROW_SW","Image.ARROW_SW"],["ARROW_W","Image.ARROW_W"],["ARROW_NW","Image.ARROW_NW"],["TRIANGLE","Image.TRIANGLE"],["TRIANGLE_LEFT","Image.TRIANGLE_LEFT"],["CHESSBOARD","Image.CHESSBOARD"],["DIAMOND","Image.DIAMOND"],["DIAMOND_SMALL","Image.DIAMOND_SMALL"],["SQUARE","Image.SQUARE"],["SQUARE_SMALL","Image.SQUARE_SMALL"],["RABBIT","Image.RABBIT"],["COW","Image.COW"],["MUSIC_CROTCHET","Image.MUSIC_CROTCHET"],["MUSIC_QUAVER","Image.MUSIC_QUAVER"],["MUSIC_QUAVERS","Image.MUSIC_QUAVERS"],["PITCHFORK","Image.PITCHFORK"],["XMAS","Image.XMAS"],["PACMAN","Image.PACMAN"],["TARGET","Image.TARGET"],["TSHIRT","Image.TSHIRT"],["ROLLERSKATE","Image.ROLLERSKATE"],["DUCK","Image.DUCK"],["HOUSE","Image.HOUSE"],["TORTOISE","Image.TORTOISE"],["BUTTERFLY","Image.BUTTERFLY"],["STICKFIGURE","Image.STICKFIGURE"],["GHOST","Image.GHOST"],["SWORD","Image.SWORD"],["GIRAFFE","Image.GIRAFFE"],["SKULL","Image.SKULL"],["UMBRELLA","Image.UMBRELLA"],["SNAKE","Image.SNAKE"],["ALL_CLOCKS","Image.ALL_CLOCKS"],["ALL_ARROWS","Image.ALL_ARROWS"]],imglist:[["ALL_CLOCKS","Image.ALL_CLOCKS"],["ALL_ARROWS","Image.ALL_ARROWS"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["P0","0"],["P1","1"],["P2","2"],["P8","8"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]]}};ll["Mithon CC"]=ll.microbit;const Il=ll,Tl=100,dl={init:function(){this.jsonInit({colour:Tl,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#built-in-melodies",message0:Q.Msg.MIXLY_MICROBIT_Play_built_in_melody,args0:[{name:"melody",options:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],type:"field_dropdown"},{type:"input_value",name:"PIN"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"}]}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Play_built_in_melody1)}},hl={init:function(){this.jsonInit({colour:Tl,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#built-in-melodies",tooltip:"Play one of the built-in melodies. Indicate if you need to wait before continuing or continuously loop the melody.",message0:Q.Msg.MIXLY_MICROBIT_Play_built_in_melody_easy,args0:[{name:"melody",options:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],type:"field_dropdown"},{type:"input_value",name:"PIN"},{type:"input_dummy"}]})}},Ml={init:function(){this.setColour(Tl),this.appendValueInput("PIN",Number).appendField(Q.Msg.MIXLY_TONE).appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(Q.Msg.MIXLY_FREQUENCY),this.appendValueInput("duration").setCheck(Number).appendField(Q.Msg.MIXLY_DURATION),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MILLIS).appendField(Q.Msg.MIXLY_MICROBIT_WAIT),this.appendDummyInput("").appendField(new Q.FieldCheckbox(!0),"wait"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Ol={init:function(){this.setColour(Tl),this.appendValueInput("PIN",Number).appendField(Q.Msg.MIXLY_TONE).appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(Q.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},ml={init:function(){this.jsonInit({colour:Tl,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#musical-notation",message0:Q.Msg.MIXLY_MICROBIT_Play_notes,args0:[{check:"List",type:"input_value",name:"notes"},{type:"input_value",name:"PIN"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"}]}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Play_notes1)}},cl={init:function(){this.jsonInit({colour:Tl,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#musical-notation",tooltip:"Play a list of notes expressed in the special music language. Indicate if you need to wait before continuing or continuously loop the melody.",message0:Q.Msg.MIXLY_MICROBIT_Play_notes,args0:[{check:"List",type:"input_value",name:"notes"},{type:"input_value",name:"PIN"},{type:"input_dummy"},{type:"input_dummy"},{type:"input_dummy"}]})}},El={init:function(){this.jsonInit({colour:Tl,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.reset",message0:Q.Msg.MIXLY_MICROBIT_Reset_music}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Reset_music)}},Rl={init:function(){this.setColour(Tl),this.appendValueInput("PIN").appendField(Q.Msg.MIXLY_NOTONE).appendField(Q.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_NOTONE)}},gl={init:function(){this.jsonInit({colour:Tl,output:"Array",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.get_tempo",message0:Q.Msg.MIXLY_MICROBIT_Get_current_tempo}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Get_current_tempo)}},Cl={init:function(){this.setColour(Tl),this.appendValueInput("TICKS").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Q.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Q.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_SET_TEMPO1)}},Al={init:function(){this.setColour(Tl),this.appendValueInput("VAR").setCheck(String).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,"say"],[Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,"sing"],[Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE,"pronounce"]]),"MODE"),this.appendValueInput("pitch").setCheck(Number).appendField(Q.Msg.MICROBIT_SPEECH_pitch),this.appendValueInput("speed").setCheck(Number).appendField(Q.Msg.MIXLY_SPEED),this.appendValueInput("mouth").setCheck(Number).appendField(Q.Msg.MICROBIT_SPEECH_mouth),this.appendValueInput("throat").setCheck(Number).appendField(Q.Msg.MICROBIT_SPEECH_throat),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH,n=Q.Msg.MIXLY_MICROBIT_TYPE_STRING;return i+{say:Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,sing:Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,pronounce:Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE}[e]+n}))}},Ll={init:function(){this.setColour(Tl),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Sl={init:function(){this.setColour(Tl),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Dl={init:function(){this.setColour(Tl),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Nl={init:function(){this.setColour(Tl),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MICROBIT_SPEECH_translation),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+Q.Msg.MICROBIT_SPEECH_translation)}},fl={init:function(){this.setColour(Tl),this.appendValueInput("PIN",Number).appendField(Q.Msg.MIXLY_SERVO).appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_SERVO_MOVE)}},Pl={init:function(){this.appendValueInput("speed").setCheck(null).appendField(Q.Msg.MIXLY_MOTOR).appendField(new Q.FieldDropdown([["M1","1"],["M2","2"],["M3","3"],["M4","4"]]),"Motor").appendField(Q.Msg.MIXLY_SPEED),this.appendDummyInput().appendField(new Q.FieldDropdown([["Forward","1*"],["Reverse","-1*"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Tl),this.setTooltip(""),this.setHelpUrl("")}},Fl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_RGB_PIN_COUNT)}},vl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_RGB_NUM_R_G_B)}},Yl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_NUM),this.appendDummyInput("").setAlign(Q.inputs.Align.RIGHT).appendField(new Q.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Vl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_ESP32_MUSIC_WRI)}},bl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.MIXLY_SETUP+" "+Q.Msg.QJ00X_MP3),this.appendValueInput("RX").setAlign(Q.inputs.Align.RIGHT).appendField("RX#"),this.appendValueInput("TX").setAlign(Q.inputs.Align.RIGHT).appendField("TX#"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Xl=[[Q.Msg.MIXLY_MP3_PLAY,"play"],[Q.Msg.MIXLY_MP3_PAUSE,"pause"],[Q.Msg.MIXLY_MP3_NEXT,"next_track"],[Q.Msg.MIXLY_MP3_PREV,"prev_track"],[Q.Msg.MIXLY_MP3_VOL_UP,"inc_vol"],[Q.Msg.MIXLY_MP3_VOL_DOWN,"dec_vol"]];const yl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_STAT).appendField(new Q.FieldDropdown(Xl),"CONTROL_TYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Ul=[[Q.Msg.MIXLY_MP3_LOOP_ALL,"0"],[Q.Msg.MIXLY_MP3_LOOP_FOLDER,"1"],[Q.Msg.MIXLY_MP3_LOOP_ONE,"2"],[Q.Msg.MIXLY_MP3_LOOP_RAM,"3"]];const Bl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MP3_LOOP_MODE).appendField(Q.Msg.MIXLY_STAT).appendField(new Q.FieldDropdown(Ul),"LOOP_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var wl=[[Q.Msg.MIXLY_MP3_EQ_NORMAL,"0"],[Q.Msg.MIXLY_MP3_EQ_POP,"1"],[Q.Msg.MIXLY_MP3_EQ_ROCK,"2"],[Q.Msg.MIXLY_MP3_EQ_JAZZ,"3"],[Q.Msg.MIXLY_MP3_EQ_CLASSIC,"4"],[Q.Msg.MIXLY_MP3_EQ_BASS,"5"]];const Gl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MP3_EQ_MODE).appendField(Q.Msg.MIXLY_STAT).appendField(new Q.FieldDropdown(wl),"EQ_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},kl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MP3_VOL),this.appendValueInput("vol",Number).appendField(Q.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Hl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendValueInput("NUM",Number).appendField(Q.Msg.MIXLY_MP3_PLAY_NUM).setCheck(Number),this.appendDummyInput("").appendField("首"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},xl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendValueInput("FOLDER",Number).appendField(Q.Msg.DFPLAYER_MINI_FOLDER).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Q.Msg.MIXLY_MP3_PLAY_NUM).setCheck(Number),this.appendDummyInput("").appendField("首"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Wl=140,Kl={init:function(){this.setColour(225),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"on"],[Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"off"],[Q.Msg.HTML_RESET,"reset"]]),"type").appendField(Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_WIFI),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("type"),i=Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_WIFI;return{on:Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,off:Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,reset:Q.Blockly.Msg.HTML_RESET}[e]+i}))}},jl={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.on",tooltip:"Turn on the radio. This needs to be explicitly called since the radio draws power and takes up memory that you may otherwise need.",message0:Q.Msg.MIXLY_MICROBIT_Switch_on_radio})}},Jl={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.off",tooltip:"Turn off the radio, thus saving power and memory.",message0:Q.Msg.MIXLY_MICROBIT_Switch_off_radio})}},Ql={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.config",tooltip:Q.Msg.MIXLY_MICROBIT_Configure_radio1,message0:Q.Msg.MIXLY_MICROBIT_Configure_radio,args0:[{min:4,value:32,type:"input_value",max:251,name:"length"},{type:"input_dummy"},{min:1,value:3,type:"input_value",max:32,name:"queue"},{type:"input_dummy"},{min:0,value:7,type:"input_value",max:100,name:"channel"},{type:"input_dummy"},{name:"power",type:"input_value"},{type:"input_dummy"},{name:"address",type:"input_value"},{type:"input_dummy"},{name:"group",type:"input_value"},{type:"input_dummy"},{name:"data_rate",type:"input_value"}]})}},ql={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.reset",tooltip:"Reset the radio to default settings.",message0:Q.Msg.MIXLY_MICROBIT_Reset_radio})}},zl={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.send",tooltip:"Broadcast a text message.",message0:Q.Msg.MIXLY_MICROBIT_Send_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},Zl={init:function(){this.setColour(225),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_RADIO_SEND),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_MSG,"send"],[Q.Msg.MIXLY_MICROBIT_MSG_BYTE,"send_bytes"]]),"type"),this.appendValueInput("data"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Send_message1)}},$l={init:function(){this.jsonInit({colour:225,output:"String",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.receive",tooltip:Q.Msg.MIXLY_MICROBIT_Receive_message,message0:Q.Msg.MIXLY_MICROBIT_Receive_message})}},tI={init:function(){this.setColour(225),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_Receive_message),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_MSG,"receive"],[Q.Msg.MIXLY_MICROBIT_MSG_BYTE,"receive_bytes"],[Q.Msg.MIXLY_MICROBIT_MSG_FULL,"receive_full"]]),"type"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Receive_message)}},eI={init:function(){this.setColour(Wl),this.appendValueInput("RX",Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_SETUP).appendField("sda").setCheck(Number).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("TX",Number).appendField("scl").setCheck(Number).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("freq").setCheck(Number).appendField("频率").setAlign(Q.inputs.Align.RIGHT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},iI={init:function(){this.setColour(Wl),this.appendValueInput("address").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_READ_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(Q.Msg.LANG_MATH_BYTE),this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new Q.FieldCheckbox(!1),"is_repeated"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_I2C_READ)}},nI={init:function(){this.setColour(Wl),this.appendValueInput("address").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_WRITE_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new Q.FieldCheckbox(!1),"is_repeated"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_I2C_WRITE)}},sI={init:function(){this.jsonInit({colour:Wl,nextStatement:null,previousStatement:null,message0:Q.Msg.MIXLY_MICROBIT_SPI_INIT,args0:[{value:1e6,type:"field_number",name:"freq"},{type:"input_dummy"},{value:8,type:"field_number",name:"bits"},{type:"input_dummy"},{value:0,type:"field_number",name:"mode"},{type:"input_dummy"},{name:"mosi",options:q.Profile.default.digital,type:"field_dropdown"},{name:"miso",options:q.Profile.default.digital,type:"field_dropdown"},{name:"sck",options:q.Profile.default.digital,type:"field_dropdown"}]}),this.setFieldValue("15","mosi"),this.setFieldValue("14","miso"),this.setFieldValue("13","sck")}},oI={init:function(){this.setColour(Wl),this.appendValueInput("data").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_SPI_WRITE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_SPI_WRITE)}},_I=180,uI={init:function(){this.jsonInit({colour:_I,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.clear",message0:Q.Msg.MIXLY_MICROBIT_Clear_display}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Clear_display)}},aI={init:function(){this.setColour(_I),this.appendValueInput("x").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_GET).appendField(Q.Msg.MIXLY_BRIGHTNESS).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_BRIGHTNESS1)}},rI={init:function(){this.setColour(_I),this.appendValueInput("x").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SET_BRIGHTNESS).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("brightness").setCheck(Number).appendField(Q.Msg.MIXLY_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_BRIGHTNESS2)}},pI={init:function(){this.setColour(_I),this.appendValueInput("data").setCheck([String,"microbit_image"]).appendField(Q.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING)}},lI={init:function(){this.setColour(_I),this.appendValueInput("data").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},II={init:function(){this.setColour(_I),this.appendValueInput("data").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("delay").setCheck(null).appendField(Q.Msg.MIXLY_DELAY),this.appendDummyInput().appendField(Q.Msg.MIXLY_MILLIS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},TI={init:function(){this.setColour(_I),this.appendValueInput("PIN",String).setCheck("microbit_image").appendField(Q.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.OLED_BITMAP)}},dI={init:function(){this.jsonInit({colour:_I,InputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",tooltip:"Show the referenced image on the display.",message0:Q.Msg.OLED_BITMAP,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SMILE","SMILE"],["SAD","SAD"],["CONFUSED","CONFUSED"],["ANGRY","ANGRY"],["ASLEEP","ASLEEP"],["SURPRISED","SURPRISED"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["MEH","MEH"],["YES","YES"],["NO","NO"],["CLOCK12","CLOCK12"],["CLOCK11","CLOCK11"],["CLOCK10","CLOCK10"],["CLOCK9","CLOCK9"],["CLOCK8","CLOCK8"],["CLOCK7","CLOCK7"],["CLOCK6","CLOCK6"],["CLOCK5","CLOCK5"],["CLOCK4","CLOCK4"],["CLOCK3","CLOCK3"],["CLOCK2","CLOCK2"],["CLOCK1","CLOCK1"],["ARROW_N","ARROW_N"],["ARROW_NE","ARROW_NE"],["ARROW_E","ARROW_E"],["ARROW_SE","ARROW_SE"],["ARROW_S","ARROW_S"],["ARROW_SW","ARROW_SW"],["ARROW_W","ARROW_W"],["ARROW_NW","ARROW_NW"],["TRIANGLE","TRIANGLE"],["TRIANGLE_LEFT","TRIANGLE_LEFT"],["CHESSBOARD","CHESSBOARD"],["DIAMOND","DIAMOND"],["DIAMOND_SMALL","DIAMOND_SMALL"],["SQUARE","SQUARE"],["SQUARE_SMALL","SQUARE_SMALL"],["RABBIT","RABBIT"],["COW","COW"],["MUSIC_CROTCHET","MUSIC_CROTCHET"],["MUSIC_QUAVER","MUSIC_QUAVER"],["MUSIC_QUAVERS","MUSIC_QUAVERS"],["PITCHFORK","PITCHFORK"],["XMAS","XMAS"],["PACMAN","PACMAN"],["TARGET","TARGET"],["TSHIRT","TSHIRT"],["ROLLERSKATE","ROLLERSKATE"],["DUCK","DUCK"],["HOUSE","HOUSE"],["TORTOISE","TORTOISE"],["BUTTERFLY","BUTTERFLY"],["STICKFIGURE","STICKFIGURE"],["GHOST","GHOST"],["SWORD","SWORD"],["GIRAFFE","GIRAFFE"],["SKULL","SKULL"],["UMBRELLA","UMBRELLA"],["SNAKE","SNAKE"],["ALL_CLOCKS","ALL_CLOCKS"],["ALL_ARROWS","ALL_ARROWS"]],type:"field_dropdown"}]})}},hI={init:function(){this.jsonInit({colour:_I,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",message0:Q.Msg.MIXLY_MICROBIT_Animate_images_or_string,args0:[{check:[String,"List"],type:"input_value",name:"images"},{type:"input_value",name:"delay"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"clear"}]}),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_delay+Q.Msg.MIXLY_MICROBIT_Animate_images1)}},MI={init:function(){this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.jsonInit({colour:_I,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",tooltip:"Display the list of images as an animation with a certain delay between each frame. Indicate if you need to wait before continuing, continuously loop the animation and clear the display when finished.",message0:Q.Msg.MIXLY_MICROBIT_SHOW_STRING,args0:[{check:String,type:"input_value",name:"images"},{type:"input_value",name:"delay"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"clear"}]}),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING)}},OI={init:function(){this.jsonInit({colour:_I,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.scroll",tooltip:"Scroll the referenced text across the display.",message0:Q.Msg.MIXLY_MICROBIT_Scroll_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},mI={init:function(){this.setColour(_I),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_Turn_on_display,"on"],[Q.Msg.MIXLY_MICROBIT_Turn_off_display,"off"]]),"on_off").appendField(Q.Msg.MIXLY_MICROBIT_monitor),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("on_off"),i=Q.Msg.MIXLY_MICROBIT_monitor;return{on:Q.Msg.MIXLY_MICROBIT_Turn_on_display,off:Q.Msg.MIXLY_MICROBIT_Turn_off_display}[e]+i}))}},cI={init:function(){this.jsonInit({colour:_I,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.off",tooltip:"Turn off the display.",message0:Q.Msg.MIXLY_MICROBIT_Turn_off_display})}},EI={init:function(){this.jsonInit({colour:_I,output:"Boolean",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.is_on",message0:Q.Msg.MIXLY_MICROBIT_Display_is_on}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Display_is_on1)}},RI={init:function(){this.jsonInit({colour:_I,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SMILE","SMILE"],["SAD","SAD"],["CONFUSED","CONFUSED"],["ANGRY","ANGRY"],["ASLEEP","ASLEEP"],["SURPRISED","SURPRISED"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["MEH","MEH"],["YES","YES"],["NO","NO"],["CLOCK12","CLOCK12"],["CLOCK11","CLOCK11"],["CLOCK10","CLOCK10"],["CLOCK9","CLOCK9"],["CLOCK8","CLOCK8"],["CLOCK7","CLOCK7"],["CLOCK6","CLOCK6"],["CLOCK5","CLOCK5"],["CLOCK4","CLOCK4"],["CLOCK3","CLOCK3"],["CLOCK2","CLOCK2"],["CLOCK1","CLOCK1"],["ARROW_N","ARROW_N"],["ARROW_NE","ARROW_NE"],["ARROW_E","ARROW_E"],["ARROW_SE","ARROW_SE"],["ARROW_S","ARROW_S"],["ARROW_SW","ARROW_SW"],["ARROW_W","ARROW_W"],["ARROW_NW","ARROW_NW"],["TRIANGLE","TRIANGLE"],["TRIANGLE_LEFT","TRIANGLE_LEFT"],["CHESSBOARD","CHESSBOARD"],["DIAMOND","DIAMOND"],["DIAMOND_SMALL","DIAMOND_SMALL"],["SQUARE","SQUARE"],["SQUARE_SMALL","SQUARE_SMALL"],["RABBIT","RABBIT"],["COW","COW"],["MUSIC_CROTCHET","MUSIC_CROTCHET"],["MUSIC_QUAVER","MUSIC_QUAVER"],["MUSIC_QUAVERS","MUSIC_QUAVERS"],["PITCHFORK","PITCHFORK"],["XMAS","XMAS"],["PACMAN","PACMAN"],["TARGET","TARGET"],["TSHIRT","TSHIRT"],["ROLLERSKATE","ROLLERSKATE"],["DUCK","DUCK"],["HOUSE","HOUSE"],["TORTOISE","TORTOISE"],["BUTTERFLY","BUTTERFLY"],["STICKFIGURE","STICKFIGURE"],["GHOST","GHOST"],["SWORD","SWORD"],["GIRAFFE","GIRAFFE"],["SKULL","SKULL"],["UMBRELLA","UMBRELLA"],["SNAKE","SNAKE"],["ALL_CLOCKS","ALL_CLOCKS"],["ALL_ARROWS","ALL_ARROWS"]],type:"field_dropdown"}],output:["microbit_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:Q.Msg.MIXLY_MICROBIT_Built_in_image1,message0:Q.Msg.MIXLY_MICROBIT_Built_in_image})}},gI={init:function(){this.jsonInit({colour:_I,args0:[{check:["microbit_image","List",String],type:"input_value",name:"image"}],output:"microbit_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image.copy",message0:Q.Msg.MIXLY_MICROBIT_Copy_image}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Copy_image1)}},CI={init:function(){this.jsonInit({colour:_I,args0:[{check:["microbit_image","List",String],type:"input_value",name:"image"}],output:"microbit_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image.invert",message0:Q.Msg.MIXLY_MICROBIT_Invert_image}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Invert_image1)}},AI={init:function(){this.jsonInit({colour:_I,args0:[{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"00"},{colour:"#000000",type:"field_colour",name:"01"},{colour:"#000000",type:"field_colour",name:"02"},{colour:"#000000",type:"field_colour",name:"03"},{colour:"#000000",type:"field_colour",name:"04"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"10"},{colour:"#000000",type:"field_colour",name:"11"},{colour:"#000000",type:"field_colour",name:"12"},{colour:"#000000",type:"field_colour",name:"13"},{colour:"#000000",type:"field_colour",name:"14"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"20"},{colour:"#000000",type:"field_colour",name:"21"},{colour:"#000000",type:"field_colour",name:"22"},{colour:"#000000",type:"field_colour",name:"23"},{colour:"#000000",type:"field_colour",name:"24"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"30"},{colour:"#000000",type:"field_colour",name:"31"},{colour:"#000000",type:"field_colour",name:"32"},{colour:"#000000",type:"field_colour",name:"33"},{colour:"#000000",type:"field_colour",name:"34"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"40"},{colour:"#000000",type:"field_colour",name:"41"},{colour:"#000000",type:"field_colour",name:"42"},{colour:"#000000",type:"field_colour",name:"43"},{colour:"#000000",type:"field_colour",name:"44"}],output:"microbit_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image",message0:Q.Msg.MIXLY_MICROBIT_Create_image}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)}},LI={init:function(){var t=[[Q.Msg.MIXLY_UP,"up"],[Q.Msg.MIXLY_DOWN,"down"],[Q.Msg.MIXLY_LEFT,"left"],[Q.Msg.MIXLY_RIGHT,"right"]];this.setColour(_I),this.setOutput(!0,"microbit_image"),this.setInputsInline(!0),this.appendValueInput("img").appendField(Q.Msg.DISPLAY_IMAGE_LET).setCheck(["microbit_image","List",String]),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(t),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[t]+s}))}},SI={init:function(){var t=[[Q.Msg.MICROBIT_DISPLAY_UNION,"+"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"-"]];this.setColour(_I),this.setOutput(!0,"microbit_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[t]}))}},DI={init:function(){this.setColour(_I),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(Q.Msg.MIXLY_LCD_PRINT1),this.appendValueInput("TEXT2",String).setCheck([String,Number]).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_LCD_PRINT2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_LCD_PRINT4_TOOLTIP)}},NI={init:function(){this.setColour(_I),this.appendValueInput("device").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_SETUP).appendField(Q.Msg.MIXLY_DF_LCD).appendField("1602").appendField("mylcd").appendField(Q.Msg.MIXLY_LCD_ADDRESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_SETUP+Q.Msg.MIXLY_DF_LCD+Q.Msg.MIXLY_LCD_ADDRESS)}},fI={init:function(){this.setColour(_I),this.appendValueInput("row",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(Q.Msg.MIXLY_LCD_ROW),this.appendValueInput("column",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_LCD_COLUMN),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_LCD_PRINT),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_LCD_PRINT3_TOOLTIP)}},PI={init:function(){this.setColour(_I),this.appendDummyInput().appendField(Q.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_ON,"on()"],[Q.Msg.MIXLY_OFF,"off()"],[Q.Msg.MIXLY_LCD_STAT_CLEAR,"clear()"],[Q.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(False)"],[Q.Msg.MIXLY_LCD_BACKLIGHT,"backlight(True)"]]),"STAT"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);var t=this;this.setTooltip((function(){var e=t.getFieldValue("STAT");return Q.Msg.LISTS_SET_INDEX_SET+Q.Msg.MIXLY_DF_LCD+{"on()":Q.Msg.MIXLY_ON,"off()":Q.Msg.MIXLY_OFF,"clear()":Q.Msg.MIXLY_LCD_STAT_CLEAR,"backlight(off)":Q.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(on)":Q.Msg.MIXLY_LCD_BACKLIGHT}[e]}))}},FI={init:function(){this.appendDummyInput().appendField(Q.Msg.MIXLY_DF_LCD+" OLED "+Q.Msg.OLEDDISPLAY),this.appendValueInput("Text_line1","String").setAlign(Q.inputs.Align.RIGHT).appendField("(128*64) "+Q.Msg.line1),this.appendValueInput("Text_line2","String").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.line2),this.appendValueInput("Text_line3","String").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.line3),this.appendValueInput("Text_line4","String").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.line4),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(_I),this.setTooltip(Q.Msg.MIXLY_DF_LCD+Q.Msg.OLEDDISPLAY+Q.Msg.MIXLY_MICROBIT_TYPE_STRING)}},vI={init:function(){var t=[[Q.Msg.MIXLY_HEIGHT,"height"],[Q.Msg.MIXLY_WIDTH,"width"]];this.setColour(_I),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("microbit_image"),this.appendDummyInput("").appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE+{height:Q.Msg.MIXLY_HEIGHT,width:Q.Msg.MIXLY_WIDTH}[t]}))}},YI={init:function(){this.setColour(_I),this.appendValueInput("SUB"),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_LCD_STAT_CLEAR,"0"],[Q.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL,"1"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i={0:Q.Msg.MIXLY_LCD_STAT_CLEAR,1:Q.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL};return Q.Msg.MIXLY_DF_LCD+i[e]}))}},VI="#777777",bI={init:function(){this.setColour(VI),this.appendDummyInput("").appendField("from ").appendField(new Q.FieldTextInput("microbit"),"path").appendField(" import ").appendField(new Q.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},XI={init:function(){this.setColour(VI),this.appendDummyInput("").appendField("import ").appendField(new Q.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yI={init:function(){this.setColour(VI),this.appendDummyInput("").appendField(new Q.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Q.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;e0)var u="rgb_show.mixly_rgb_show("+(i-1)+", "+s+", "+o+", "+_+")\n";else u="rgb_show.mixly_rgb_show_all("+s+", "+o+", "+_+")\n";return u},_M=function(t,e){var i=this.getFieldValue("LED");if(e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_neopixel="import neopixel",e.definitions_.import_rgb_show="import rgb_show",i>0)var n="rgb_show.mixly_rgb_show("+(i-1)+", 0, 0, 0)\n";else n="rgb_show.mixly_rgb_show_all(0, 0, 0)\n";return n},uM=function(t,e){var i=e.valueToCode(this,"_LED_",e.ORDER_ATOMIC),n=e.valueToCode(this,"RVALUE",e.ORDER_ATOMIC),s=e.valueToCode(this,"GVALUE",e.ORDER_ATOMIC),o=e.valueToCode(this,"BVALUE",e.ORDER_ATOMIC);return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_neopixel="import neopixel",e.definitions_.import_rgb_show="import rgb_show","rgb_show.mixly_rgb_show("+i+", "+n+", "+s+", "+o+")\n"},aM=function(t,e){var i=this.getFieldValue("NUMBER"),n=e.valueToCode(this,"SPEED",e.ORDER_ATOMIC),s=this.getFieldValue("DIRECTION");if(e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_motor_control="import motor_control",0==i)var o="motor_control.motor1("+n+", "+s+")\nmotor_control.motor2("+n+", "+s+")\nmotor_control.motor3("+n+", "+s+")\n";else if(1==i)o="motor_control.motor1("+n+", "+s+")\n";else if(2==i)o="motor_control.motor2("+n+", "+s+")\n";else if(3==i)o="motor_control.motor3("+n+", "+s+")\n";return o},rM=function(t,e){var i=this.getFieldValue("NUMBER");if(e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_motor_control="import motor_control",0==i)var n="motor_control.motor1(0)\nmotor_control.motor2(0)\nmotor_control.motor3(0)\n";else if(1==i)n="motor_control.motor1(0)\n";else if(2==i)n="motor_control.motor2(0)\n";else if(3==i)n="motor_control.motor3(0)\n";return n},pM=function(t,e){return["pin"+this.getFieldValue("NUMBER")+".read_analog()",e.ORDER_ATOMIC]},lM=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=e.valueToCode(this,"btn",e.ORDER_ATOMIC);e.setups_["on_"+i]="def on_"+i+"():\n while True:\n if "+i+".was_pressed():\n yield callback_"+i+"()\n else:\n yield\n\nfunc_"+i+" = on_"+i+"()\n";var n=e.statementToCode(t,"DO");n=e.addLoopTrap(n,t.id)||e.PASS;return e.loops_[i+"_loop"]=" next(func_"+i+")\n","def callback_"+i+"():\n"+n},IM=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=this.getFieldValue("gesture");e.setups_["on_"+i]="def on_gesture_"+i+'():\n while True:\n if accelerometer.is_gesture("'+i+'"):\n yield callback_gesture_'+i+"()\n else:\n yield\n\nfunc_gesture_"+i+" = on_gesture_"+i+"()\n";var n=e.statementToCode(t,"DO");n=e.addLoopTrap(n,t.id)||e.PASS;return e.loops_[i+"_loop"]=" next(func_gesture_"+i+")\n","def callback_gesture_"+i+"():\n"+n},TM=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=this.getFieldValue("near");e.setups_["on_"+i]="def on_near_"+i+"():\n while True:\n if not pin"+i+".read_digital():\n yield callback_near_"+i+"()\n else:\n yield\n\nfunc_near_"+i+" = on_near_"+i+"()\n";var n=e.statementToCode(t,"DO");n=e.addLoopTrap(n,t.id)||e.PASS;return e.loops_[i+"_loop"]=" next(func_near_"+i+")\n","def callback_near_"+i+"():\n"+n},dM=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=e.valueToCode(this,"TIMES",e.ORDER_ATOMIC),n=e.statementToCode(t,"DO");return"for _my_variable in range("+i+"):\n"+(n=e.addLoopTrap(n,t.id)||e.PASS)},hM=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},MM=hM,OM=hM,mM=hM,cM=hM,EM=hM,RM=hM,gM=hM,CM=hM,AM=hM,LM=hM,SM=hM,DM=hM,NM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",[e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".is_pressed()",e.ORDER_ATOMIC]},fM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",[e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".was_pressed()",e.ORDER_ATOMIC]},PM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",[e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".get_presses()",e.ORDER_ATOMIC]},FM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",['"'+this.getFieldValue("gesture")+'"',e.ORDER_ATOMIC]},vM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",'if accelerometer.is_gesture("'+this.getFieldValue("gesture")+'"):\n'+(e.statementToCode(this,"DO")||e.PASS)},YM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",['accelerometer.is_gesture("'+this.getFieldValue("gesture")+'")',e.ORDER_ATOMIC]},VM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",['accelerometer.was_gesture("'+this.getFieldValue("gesture")+'")',e.ORDER_ATOMIC]},bM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",'if accelerometer.was_gesture("'+this.getFieldValue("gesture")+'"):\n'+(e.statementToCode(this,"DO")||e.PASS)},XM=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i,n=this.getFieldValue("GES");return"all"==n?i="accelerometer.get_gestures()":"current"==n&&(i="accelerometer.current_gesture()"),[i,e.ORDER_ATOMIC]},yM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["accelerometer.current_gesture()",e.ORDER_ATOMIC]},UM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["accelerometer.get_"+this.getFieldValue("key")+"()",e.ORDER_ATOMIC]},BM=function(){return"input.setAccelerometerRange("+this.getFieldValue("key")+")\n"},wM=function(t,e){return["input.lightLevel()",e.ORDER_ATOMIC]},GM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","compass.calibrate()\n"},kM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["compass.is_calibrated()",e.ORDER_ATOMIC]},HM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["compass.heading()",e.ORDER_ATOMIC]},xM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["temperature()",e.ORDER_ATOMIC]},WM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["compass."+this.getFieldValue("compass")+"()",e.ORDER_ATOMIC]},KM=function(t,e){return["input.rotation("+this.getFieldValue("key")+")",e.ORDER_ATOMIC]},jM=function(t,e){return["input.magneticForce("+this.getFieldValue("key")+")",e.ORDER_ATOMIC]},JM=function(t,e){var i=this.getFieldValue("Trig"),n=this.getFieldValue("Echo");return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_ultrasonic="import ultrasonic",["ultrasonic.distance_cm(t_pin=pin"+i+", e_pin=pin"+n+")",e.ORDER_ATOMIC]},QM=function(t,e){var i=this.getFieldValue("Trig"),n=this.getFieldValue("Echo");return e.definitions_["import_microbit_*"]="from microbit import *",e.setups_.class_hrsc04_="class HCSR04:\n def __init__(self, tpin=pin"+i+", epin=pin"+n+', spin=pin13):\n self.trigger_pin = tpin\n self.echo_pin = epin\n self.sclk_pin = spin\n\n def distance_mm(self):\n spi.init(baudrate=125000, sclk=self.sclk_pin,\n mosi=self.trigger_pin, miso=self.echo_pin)\n pre = 0\n post = 0\n k = -1\n length = 500\n resp = bytearray(length)\n resp[0] = 0xFF\n spi.write_readinto(resp, resp)\n # find first non zero value\n try:\n i, value = next((ind, v) for ind, v in enumerate(resp) if v)\n except StopIteration:\n i = -1\n if i > 0:\n pre = bin(value).count("1")\n # find first non full high value afterwards\n try:\n k, value = next((ind, v)\n for ind, v in enumerate(resp[i:length - 2]) if resp[i + ind + 1] == 0)\n post = bin(value).count("1") if k else 0\n k = k + i\n except StopIteration:\n i = -1\n dist= -1 if i < 0 else round((pre + (k - i) * 8. + post) * 8 * 0.172)\n return dist\n\n def distance_cm(self):\n return self.distance_mm() / 10.0\n\nsonar=HCSR04()\n\n',["sonar.distance_cm()",e.ORDER_ATOMIC]},qM=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *"},zM=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *";var i=this.getFieldValue("TIME_TYPE");switch(i){case"Year":case"Month":case"Day":case"Hour":case"Minute":case"Second":case"Week":return["ds."+i+"()",e.ORDER_ASSIGNMENT];case"Mix1":return["ds.get_date()",e.ORDER_ASSIGNMENT];case"Mix2":return["ds.get_time()",e.ORDER_ASSIGNMENT]}},ZM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *","ds.set_time("+e.valueToCode(this,"hour",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"minute",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"second",e.ORDER_ASSIGNMENT)+")\n"},$M=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *","ds.set_date("+e.valueToCode(this,"year",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"month",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"day",e.ORDER_ASSIGNMENT)+")\n"},tO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","compass.clear_calibration()\n"},eO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["display.read_light_level()",e.ORDER_ATOMIC]},iO=function(t,e){var i=this.getFieldValue("Trig"),n=this.getFieldValue("Echo");return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_ultrasonic="from ultrasonic import *","sonar = HCSR04(tpin=pin"+i+", epin=pin"+n+")\n"},nO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_TCS="from TCS import *",["tcs.getRawRGBData("+this.getFieldValue("TCS34725_COLOR")+")",e.ORDER_ATOMIC]},sO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+"))\n"},oO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+")+'\\r\\n')\n"},_O=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str(hex("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||"0")+")) + '\\r\\n')\n"},uO=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=e.valueToCode(this,"char_marker",e.ORDER_ATOMIC)||";",n=e.statementToCode(this,"DO");e.definitions_["func_serial_receive_data_event_"+i.charCodeAt(1)]="serial.onDataReceived("+i+", () => {\n"+n+"}\n"},aO=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.any()",e.ORDER_ATOMIC]},rO=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.read()",e.ORDER_ATOMIC]},pO=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.readline()",e.ORDER_ATOMIC]},lO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["serial.readUntil("+this.getFieldValue("char_marker")+")",e.ORDER_ATOMIC]},IO=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=e.valueToCode(this,"RX",e.ORDER_ATOMIC),n=e.valueToCode(this,"TX",e.ORDER_ATOMIC);return isNaN(parseInt(i))||(i="pin"+i),isNaN(parseInt(n))||(n="pin"+n),"uart.init(rx="+i+", tx="+n+", baudrate="+this.getFieldValue("baudrate")+")\n"},TO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.init(baudrate="+this.getFieldValue("baudrate")+")\n"},dO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["input("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")",e.ORDER_ATOMIC]},hO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")\n"},MO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+',end ="")\n'},OO=function(t,e){return"control.inBackground(() => {\n"+e.statementToCode(this,"do")+"})\n"},mO=function(){return"control.reset()\n"},cO=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||q.Profile.default.serial)+")\n"},EO=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||q.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||q.Profile.default.serial)+")\n"},RO=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||q.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||q.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},gO=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},CO=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},AO=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},LO=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},SO=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},DO=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},NO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","sleep("+(e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000")+")\n"},fO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},PO=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["running_time()",e.ORDER_ATOMIC]},FO=function(){return"while True:\n pass\n"},vO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","reset()\n"},YO=function(t,e){return e.definitions_.import_os="import os",["os.uname()",e.ORDER_ATOMIC]};Object.assign(Q.Variables,Z),Object.assign(Q.Procedures,pr),Q.Python=lr,Q.generator=lr,q.Profile.default={},Object.assign(q.Profile,Il),Object.assign(q.Profile.default,Il.microbit),Object.assign(Q.Blocks,e,i,n,s,o,_,u,a,r,p,l,I,T,D,f,P,F,F,v,Y,V,b,X,y,U),Object.assign(Q.Python.forBlock,d,h,M,O,m,c,E,R,g,C,A,L,S,N,B,w,G,G,k,H,x,W,K,j,J)})(); \ No newline at end of file +class ${constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Q.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Q.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_if_else");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Q.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(Q.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},mt={init:function(){this.setColour(It),this.appendValueInput("FROM").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.PYTHON_RANGE).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},ct={init:function(){this.setColour(It),this.appendValueInput("LIST").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Q.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Q.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Et={init:function(){this.setColour(It),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Q.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Q.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Q.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Rt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Q.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Q.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_finally");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Q.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},gt={init:function(){this.setColour(It);var t=new Q.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Ct={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Q.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Q.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},At={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Q.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Q.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Et.OPERATORS=[[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],gt.OPERATORS=[[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Lt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Q.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},St={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Dt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Q.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Nt={init:function(){this.setColour(It),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},ft={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Q.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Pt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Q.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Ft={init:function(){this.jsonInit({message0:Q.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:It,tooltip:Q.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Q.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},vt={init:function(){this.setColour(It),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_STAT),this.setOutput(!0)}},Yt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},Vt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Q.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},bt={init:function(){this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Q.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Q.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Q.FieldDropdown([[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(It),this.setTooltip("do-while loop"),this.setHelpUrl("")}},Xt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},Ut={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},Bt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET+Q.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_GET_UNIQUE_IDEN)}},wt={init:function(){this.setColour(It),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Q.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},Gt={init:function(){this.setColour(It),this.appendDummyInput().appendField(Q.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},kt=230;Q.FieldTextInput.math_number_validator=function(t){return String(t)},Q.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const Ht={init:function(){this.setColour(kt),this.appendDummyInput().appendField(new Q.FieldTextInput("0",Q.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MATH_NUMBER_TOOLTIP)}},xt={init:function(){this.setColour(kt);this.appendDummyInput("").appendField(Q.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Q.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Wt={init:function(){this.setColour(kt);this.appendDummyInput("").appendField(Q.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Q.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Q.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Kt={init:function(){this.setColour(kt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Q.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Q.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Q.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},jt={init:function(){this.setColour(kt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Q.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Q.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Q.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Q.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Q.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Jt={init:function(){this.setColour(kt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Q.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Qt={init:function(){this.setColour(kt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Q.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Q.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Q.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Q.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Q.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Q.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Q.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Q.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},qt={init:function(){var t=[[Q.Msg.MATH_BIN,"bin"],[Q.Msg.MATH_OCT,"oct"],[Q.Msg.MATH_HEX,"hex"]];this.setColour(kt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Q.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:Q.Msg.MATH_DEC_TOOLTIP_BIN,oct:Q.Msg.MATH_DEC_TOOLTIP_OCT,hex:Q.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},zt={init:function(){var t=[[Q.Msg.LANG_MATH_TO_ROUND,"round"],[Q.Msg.LANG_MATH_TO_CEIL,"ceil"],[Q.Msg.LANG_MATH_TO_FLOOR,"floor"],[Q.Msg.MATH_ABS,"fabs"],[Q.Msg.MATH_SQRT,"sqrt"]];this.setColour(kt),this.appendValueInput("A").setCheck(Number).appendField(new Q.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Q.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Q.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Q.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Q.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Q.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Q.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},Zt={init:function(){var t=[[Q.Msg.MIXLY_MAX,"max"],[Q.Msg.MIXLY_MIN,"min"]];this.setColour(kt),this.appendValueInput("A").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(new Q.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Q.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Q.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Q.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},$t={init:function(){var t=[[Q.Msg.MATH_TWO,"two"],[Q.Msg.MATH_EIGHT,"eight"],[Q.Msg.MATH_TEN,"ten"],[Q.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(kt),this.appendDummyInput("").appendField(Q.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Q.FieldDropdown(t),"OP").appendField(Q.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.MATH_ZHW).appendField(new Q.FieldDropdown(t),"OP2").appendField(Q.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:Q.Msg.MATH_Before_two,eight:Q.Msg.MATH_Before_eight,ten:Q.Msg.MATH_Before_ten,sixteen:Q.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:Q.Msg.MATH_Behind_two,eight:Q.Msg.MATH_Behind_eight,ten:Q.Msg.MATH_Behind_ten,sixteen:Q.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},te={init:function(){var t=[[Q.Msg.LANG_MATH_INT,"int"],[Q.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(kt),this.setOutput(!0,Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Q.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Q.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:Q.Msg.LANG_MATH_INT,float:Q.Msg.LANG_MATH_FLOAT_RANDOM};return Q.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},ee={init:function(){this.setColour(kt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Q.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Q.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Q.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Q.Msg.MATH_CONSTRAIN_TOOLTIP)}},ie={init:function(){this.setColour(kt),this.appendValueInput("NUM",Number).appendField(Q.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Q.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Q.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_MATH_MAP)}},ne={init:function(){this.setColour(kt),this.appendDummyInput().appendField(new Q.FieldTextInput("0",Q.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Q.Msg.MATH_NUMBER_TOOLTIP)}},se={init:function(){this.setColour(kt),this.appendValueInput("NUM").setCheck(Number).appendField(Q.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},oe={init:function(){this.setColour(kt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Q.Msg.MATH_ROUND).appendField(Q.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Q.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Q.Msg.MATH_ROUND_NEW_TOOLTIP)}},_e={init:function(){var t=[[Q.Msg.MIXLY_TO_INT,"int"],[Q.Msg.MIXLY_TO_FLOAT,"float"],[Q.Msg.MIXLY_TO_BITES,"b"],[Q.Msg.LANG_MATH_BYTE+Q.Msg.MIXLY_TO_INT,"bti"]];this.setColour(kt),this.appendValueInput("VAR").appendField(new Q.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Q.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Q.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Q.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ue={init:function(){var t=[[Q.Msg.MIXLY_TO_INT,"int"],[Q.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(kt),this.appendValueInput("VAR").appendField(new Q.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Q.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Q.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},ae=ie,re={init:function(){this.setColour(kt),this.appendValueInput("VAR").appendField(Q.Msg.LANG_MATH_BYTE+Q.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},pe={init:function(){this.setColour(kt),this.itemCount_=1,this.setMutator(new Q.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(Q.Msg.MIXLY_PRODUCT+Q.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(Q.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(Q.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const Me={init:function(){this.setColour(Te),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Q.FieldTextInput("",Q.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Q.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new Q.FieldImage(e,7,12,'"')}},Oe={init:function(){this.setColour(Te),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Q.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},me={init:function(){this.setColour(Te),this.appendValueInput("VAR").setCheck(Number).appendField(Q.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},ce={init:function(){this.setColour(Te),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Ee={init:function(){this.setColour(Te),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Re={init:function(){this.setColour(Te),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},ge={init:function(){this.WHERE_OPTIONS=[[Q.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Q.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Q.Msg.TEXT_GET_INDEX_RANDOM+1+Q.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Q.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Te),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Q.Msg.LISTS_GET_INDEX_GET,"MODE"),Q.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Q.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=Q.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+Q.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Q.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:Q.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Q.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Q.Msg.TEXT_GET_INDEX_RANDOM};return Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+Q.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==Q.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),Q.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Q.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new Q.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),Q.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Ce={init:function(){this.setHelpUrl(Q.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Te),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Q.Msg.LISTS_GET_INDEX_GET+" "+Q.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Q.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Q.Msg.PROCEDURES_DEFRETURN_RETURN+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+Q.Msg.LISTS_GET_INDEX_FROM_START+"n"+Q.Msg.TEXT_CHARAT2)}},Ae={init:function(){this.setHelpUrl(Q.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Te),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Q.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Q.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Le={init:function(){this.WHERE_OPTIONS_1=[[Q.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Q.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Q.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Q.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Q.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Q.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Q.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Te),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(Q.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==Q.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==Q.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),Q.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(Q.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new Q.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Se={init:function(){this.setHelpUrl(Q.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Te),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Q.Msg.LISTS_GET_INDEX_GET+" "+Q.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Q.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Q.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Q.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},De={init:function(){var t=[[Q.Msg.MIXLY_EQUALS,"==="],[Q.Msg.MIXLY_STARTSWITH,"startswith"],[Q.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Te),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Q.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Ne={init:function(){this.setColour(Te),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Q.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_COMPARETO_HELP)}},fe={init:function(){var t=[[Q.Msg.TEXT_UPPER,"upper"],[Q.Msg.TEXT_TITLE,"title"],[Q.Msg.TEXT_CAPITALIZE,"capitalize"],[Q.Msg.TEXT_SWAPCASE,"swapcase"],[Q.Msg.TEXT_LOWER,"lower"]];this.setColour(Te),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Q.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:Q.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Q.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Q.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Q.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Q.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Pe={init:function(){var t=[[Q.Msg.TEXT_LJUST,"ljust"],[Q.Msg.TEXT_CENTER,"center"],[Q.Msg.TEXT_RJUST,"rjust"]];this.setColour(Te),this.appendValueInput("VAR").appendField(new Q.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Q.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Q.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Fe={init:function(){this.setColour(Te),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Q.Msg.MIXLY_MID+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Q.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ve={init:function(){this.setColour(Te),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Ye={init:function(){this.setColour(Te),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Q.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Q.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},Ve={init:function(){this.setColour(Te),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Q.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Q.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},be={init:function(){var t=[[Q.Msg.TEXT_TRIM_BOTH,"strip"],[Q.Msg.TEXT_TRIM_LEFT,"lstrip"],[Q.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Te),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Q.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Q.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(Q.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:Q.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Q.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Q.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},Xe={init:function(){this.setColour(Te),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Q.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Q.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},vi={init:function(){this.setColour(Pi),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Q.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Yi={init:function(){this.setColour(Pi),this.appendDummyInput().appendField(Q.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Vi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_KEYS),this.setTooltip(Q.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},bi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Q.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Q.Msg.DICTS_GET_TOOLTIP)}},Xi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Q.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Q.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Q.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},yi={init:function(){this.setColour(Pi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Q.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Ui={init:function(){this.setColour(Pi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Q.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_DELETE_TOOLTIP)}},Bi={init:function(){this.setColour(Pi),this.appendValueInput("DICT2").setCheck("Dict").appendField(Q.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Q.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MID),this.setTooltip(Q.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_CLEAR),this.setTooltip(Q.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Gi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_ITEMS),this.setTooltip(Q.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},ki={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_VALUES),this.setTooltip(Q.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Hi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_LENGTH),this.setTooltip(Q.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},xi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.DICT_DELDICT),this.setTooltip(Q.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Wi={init:function(){this.MODE=[[Q.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Q.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Q.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Q.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=Q.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=Q.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==Q.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new Q.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},Ki={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Q.Msg.DICTS_ADD_VALUE),this.setTooltip(Q.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},ji={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Q.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Q.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Ji={init:function(){this.setColour(Pi),this.appendDummyInput("").appendField(new Q.FieldLabel(Q.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new Q.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Q.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Qi={init:function(){this.setColour(Pi),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},qi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_TO_JSON),this.setTooltip(Q.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},zi={init:function(){this.setColour(Pi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Q.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Zi={init:function(){this.setColour(Pi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},$i={init:function(){this.setColour(Pi),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_TO_JSON),this.setTooltip(Q.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},tn=210,en={init:function(){var t=Q.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:Q.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Q.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Q.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Q.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Q.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Q.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},nn={init:function(){var t=Q.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=Q.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new Q.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},sn={init:function(){var t=[[Q.Msg.LOGIC_OPERATION_AND,"AND"],[Q.Msg.LOGIC_OPERATION_OR,"OR"],[Q.Msg.LOGIC_OPERATION_NOR,"NOR"],[Q.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:Q.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Q.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Q.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Q.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},on={init:function(){this.setColour(tn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Q.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Q.Msg.LOGIC_NEGATE_TOOLTIP)}},_n={init:function(){var t=[[Q.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Q.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(tn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Q.FieldDropdown(t),"BOOL"),this.setTooltip(Q.Msg.LOGIC_BOOLEAN_TOOLTIP)}},un={init:function(){this.setColour(tn),this.setOutput(!0),this.appendDummyInput().appendField(Q.Msg.LOGIC_NULL),this.setTooltip(Q.Msg.LOGIC_NULL_TOOLTIP)}},an={init:function(){this.setColour(tn),this.appendValueInput("A"),this.appendValueInput("B").appendField(Q.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Q.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},rn={init:function(){var t=[[Q.Msg.TEXT_APPEND_TO,"in"],[Q.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(tn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Q.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(Q.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.IN)}},pn={init:function(){var t=[[Q.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Q.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(tn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},ln={init:function(){this.setColour(tn),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Q.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},In={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Q.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Tn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_USE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Q.Msg.MIXLY_BELONG;return i+{r:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},dn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_USE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Q.Msg.MIXLY_BELONG,_=Q.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},hn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Q.Msg.MIXPY_TEXT_ENCODE).appendField(new Q.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_USE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=Q.Msg.MIXLY_BELONG,_=Q.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},Mn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},On={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},mn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},cn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Q.Msg.MICROBIT_PYTHON_TYPE)}},En={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.HTML_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Rn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},gn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Cn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const An={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Ln={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Sn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Dn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},Nn={init:function(){this.setColour(0),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},fn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Q.Msg.MIXLY_ESP32_SET+{mkdir:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Pn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Q.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Fn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},vn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.HTML_FILE,"isfile"],[Q.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Q.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Q.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Yn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Q.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_SETUP+Q.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Q.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Vn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Q.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},bn={init:function(){var t=Q.Procedures.findLegalName("",this),e=new Q.FieldTextInput(t,Q.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new Q.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Q.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Q.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(Q.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(Q.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(Q.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=Q.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),Q.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{Q.Events.enable()}},mutationToDom:function(t){var e=Q.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(Q.Msg.MIXLY_AIP_ATTR).setAlign(Q.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},fs={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(Q.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Ps={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(Q.Msg.HTML_FORM_CONTENT).appendField(new Q.FieldDropdown([[Q.Msg.HTML_TEXT,"text"],[Q.Msg.HTML_EMAIL,"email"],[Q.Msg.HTML_NUMBER,"number"],[Q.Msg.HTML_PASSWORD,"password"],[Q.Msg.HTML_CHECKBOX,"checkbox"],[Q.Msg.HTML_RADIOBUTTON,"radiobutton"],[Q.Msg.HTML_BUTTON,"button"],[Q.Msg.HTML_COLOUR,"colour"],[Q.Msg.HTML_DATE,"date"],[Q.Msg.HTML_LOCALTIME,"local time"],[Q.Msg.HTML_FILE,"file"],[Q.Msg.HTML_HIDDEN,"hidden"],[Q.Msg.HTML_IMAGE,"image"],[Q.Msg.HTML_MONTH,"month"],[Q.Msg.HTML_RANGE,"range"],[Q.Msg.HTML_RESET,"reset"],[Q.Msg.HTML_SEARCH,"search"],[Q.Msg.HTML_SUBMIT,"submit"],[Q.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Q.Msg.HTML_TIME,"time"],[Q.Msg.HTML_URL,"url"],[Q.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Q.Msg.HTML_NAME).appendField(new Q.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Q.Msg.HTML_VALUE).appendField(new Q.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Q.Msg.MIXLY_AIP_ATTR).setAlign(Q.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fs={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(new Q.FieldTextInput("property"),"KEY").appendField(":").appendField(new Q.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vs={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(new Q.FieldTextInput("property"),"KEY").appendField(":").appendField(new Q.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ys={init:function(){this.setColour(Cs),this.appendDummyInput().appendField(Q.Msg.HTML_TEXT).appendField(new Q.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vs=160,bs={init:function(){this.setColour(Vs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Q.FieldTable(""),"TEXT")}},Xs={init:function(){this.setColour(Vs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Q.FieldMultilineInput(""),"TEXT")}},ys={init:function(){this.setColour(Vs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Q.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Us={init:function(){this.setColour(Vs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Bs={init:function(){this.setColour(Vs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Q.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},ws={init:function(){this.setColour(Vs),this.appendValueInput("VALUE").appendField(Q.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Gs={init:function(){this.setColour(Vs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Q.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Q.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=Q.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+r()+"("+t+", "+e+", "+i+")"},Q.isNumber(n)&&Q.isNumber(s)&&Q.isNumber(o))n=parseFloat(n),s=parseFloat(s),o=Math.abs(parseFloat(o)),0==n%1&&0==s%1&&0==o%1?(n<=s?(s++,t=0==n&&1==o?s:n+", "+s,1!=o&&(t+=", "+o)):t=n+", "+--s+", -"+o,t="range("+t+")"):(t=n",GTE:">="};const Xu=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",o=e.valueToCode(this,"B",n)||"False";if("AND"==i)var _=s+" and "+o;else if("OR"==i)_=s+" or "+o;else if("NOR"==i)_="not("+s+"^"+o+")";else _=s+"^"+o;return[_,n]},yu=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Uu=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Bu=function(t,e){return["None",e.ORDER_ATOMIC]},wu=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},Gu=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},ku=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},Hu=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},xu=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Wu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Ku=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},ju=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Ju=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Qu=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},qu=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},zu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Zu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},$u=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},ta=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},ea=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},ia=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},na=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},sa=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},oa=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},_a=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ua=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},aa=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},ra=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},pa=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},la=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Ia=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},Ta=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),Q.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var o=[],_=0;_\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},Ja=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Qa=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},qa=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},za=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Za=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},$a=function(t,e){return'"},tr=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},er=function(){return this.getFieldValue("TEXT")+"\n"},ir=function(t){return t.getFieldValue("TEXT")+"\n"},nr=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},sr=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},or=function(){return""},_r=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},ur=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+"while True:\n"+a.join("")+r.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+r.join("\n")},lr.scrubNakedValue=function(t){return t+"\n"},lr.quote_=function(t){var e="'";return-1!==t.indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},lr.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},lr.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Q.utils.string.wrap(o,lr.COMMENT_WRAP-3),n+=lr.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const Ir=120,Tr={init:function(){this.setColour(Ir),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Q.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT).appendField(new Q.FieldDropdown(Tr.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Q.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Q.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))},OPERATORS:[[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Q.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]]},dr={init:function(){this.setColour(Ir);var t=new Q.FieldDropdown(dr.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Q.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}},OPERATORS:[[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Q.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]]},hr="5BA5A5",Mr={init:function(){this.appendValueInput("SUB").setCheck("var"),this.setColour(hr),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(Mr.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"shift_up"],[Q.Msg.MIXLY_DOWN,"shift_down"],[Q.Msg.MIXLY_LEFT,"shift_left"],[Q.Msg.MIXLY_RIGHT,"shift_right"]]},Or={init:function(){this.appendValueInput("SUB").setCheck("var"),this.setColour(hr),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(Or.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Q.Msg.MICROBIT_DISPLAY_UNION,"add"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},mr={init:function(){this.setColour(hr),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Q.FieldDropdown(mr.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE+{height:Q.Msg.MIXLY_HEIGHT,width:Q.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Q.Msg.MIXLY_HEIGHT,"height"],[Q.Msg.MIXLY_WIDTH,"width"]]},cr={init:function(){this.setColour(hr),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RECT).appendField(new Q.FieldDropdown(cr.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_OLED_RECT)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Er={init:function(){this.setColour(hr),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Q.FieldDropdown(Er.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Rr={init:function(){this.setColour(hr),this.appendValueInput("SUB").setCheck("var").appendField(Q.Msg.MSG.catOLED),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(Rr.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"shift_up"],[Q.Msg.MIXLY_DOWN,"shift_down"],[Q.Msg.MIXLY_LEFT,"shift_left"],[Q.Msg.MIXLY_RIGHT,"shift_right"]]},gr="#569A98",Cr={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Cr.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gr),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(32).fill(0)))},Ar={init:function(){this.setColour(gr),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(Ar.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Q.Msg.MICROBIT_DISPLAY_UNION,"add"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Lr={init:function(){this.setColour(gr),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(Lr.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);q.Boards.getSelectedBoardKey();"Python ESP32-S3"===q.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(Q.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:Q.Msg.MIXLY_UP,shift_down:Q.Msg.MIXLY_DOWN,shift_left:Q.Msg.MIXLY_LEFT,shift_right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"shift_up"],[Q.Msg.MIXLY_DOWN,"shift_down"],[Q.Msg.MIXLY_LEFT,"shift_left"],[Q.Msg.MIXLY_RIGHT,"shift_right"]]},Sr={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Sr.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gr),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},Dr={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Dr.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gr),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},Nr={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Nr.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gr),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},fr={init:function(){this.setColour(gr),this.appendDummyInput().appendField(Q.Msg.OLED_SET_FONT).appendField(new Q.FieldDropdown(fr.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+Q.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+Q.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+Q.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Pr={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(Pr.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gr),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},Fr={init:function(){this.setColour(gr),this.appendDummyInput().appendField(Q.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new Q.FieldDropdown(Fr.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[Q.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[Q.Msg.CLOCKWISE+"90"+Q.Msg.blockpy_setheading_degree,"1"],[Q.Msg.CLOCKWISE+"180"+Q.Msg.blockpy_setheading_degree,"2"],[Q.Msg.CLOCKWISE+"270"+Q.Msg.blockpy_setheading_degree,"3"]]},vr={init:function(){this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(Q.inputs.Align.CENTRE).appendField(new Q.FieldBitmap(vr.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(gr),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},Yr=180,Vr={init:function(){this.setColour(Yr),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(Q.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(Vr.OPERATORS),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[Q.Msg.MIXLY_UP,"up"],[Q.Msg.MIXLY_DOWN,"down"],[Q.Msg.MIXLY_LEFT,"left"],[Q.Msg.MIXLY_RIGHT,"right"]]},br={init:function(){this.setColour(Yr),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(br.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[Q.Msg.MICROBIT_DISPLAY_UNION,"+"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},Xr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new Q.FieldDropdown(Xr.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE+{height:Q.Msg.MIXLY_HEIGHT,width:Q.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[Q.Msg.MIXLY_HEIGHT,"height"],[Q.Msg.MIXLY_WIDTH,"width"]]},yr={init:function(){this.setColour(Yr),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RECT).appendField(new Q.FieldDropdown(yr.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_OLED_RECT)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Ur={init:function(){this.setColour(Yr),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new Q.FieldDropdown(Ur.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},Br={init:function(){this.setColour(Yr),this.appendValueInput("VAR").appendField(Q.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_DISPLAY_DRAW+Q.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new Q.FieldDropdown(Br.STATUS),"OP"),this.jsonInit({message0:Q.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_DISPLAY_DRAW+Q.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[Q.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[Q.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},wr=225,Gr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(Q.Msg.MIXLY_NETWORK_MODE).appendField(new Q.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},kr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[Q.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=Q.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:Q.Msg.MIXLY_NETWORK_WIFI_OPEN,False:Q.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},Hr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},xr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return Q.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:Q.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},Wr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(Q.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(Q.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},Kr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_NETWORK_WIFI_CONNECT+Q.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},jr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[Q.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[Q.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:Q.Msg.MIXLY_ESP32_NETWORK_IP,1:Q.Msg.MIXLY_ESP32_NETWORK_MASK,2:Q.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},Jr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},Qr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[Q.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},qr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(Q.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(Q.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},zr={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(Q.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},Zr={init:function(){this.setColour(wr),this.appendValueInput("VAR").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new Q.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},$r={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},tp={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},ep={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},ip={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},np={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},sp={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},op={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},_p={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},up={init:function(){this.setColour(wr),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},ap={init:function(){this.setColour(wr),this.appendValueInput("DOMAIN").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Q.Msg.blockpy_REQUESTS_GET).appendField(new Q.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Q.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},rp={init:function(){this.appendValueInput("VAL"),this.setColour(wr),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Q.FieldDropdown(rp.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:Q.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Q.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Q.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[Q.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},pp={init:function(){this.appendValueInput("VAR").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(wr),this.appendDummyInput("").appendField(Q.Msg.blockpy_CONDUCT).appendField(new Q.FieldDropdown(pp.METHOD),"DIR"),this.appendDummyInput("").appendField(Q.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:Q.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:Q.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},lp={init:function(){this.setColour(wr),this.appendDummyInput("").appendField(Q.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(Q.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},Ip={init:function(){this.setColour(wr),this.appendDummyInput("").appendField(new Q.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},Tp="#3288dd",dp={init:function(){this.setColour(Tp),this.appendValueInput("URL").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Q.Msg.blockpy_CONDUCT).appendField(new Q.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(Q.Msg.blockpy_REQUESTS).appendField(Q.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},hp={init:function(){this.setColour(Tp),this.appendValueInput("URL").appendField(Q.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Q.Msg.blockpy_CONDUCT).appendField(new Q.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(Q.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(Q.Msg.blockpy_REQUESTS+Q.Msg.OLED_STRING),this.appendDummyInput("").appendField(Q.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},Mp={init:function(){this.appendValueInput("VAL"),this.setColour(Tp),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Q.FieldDropdown(Mp.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[Q.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Q.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[Q.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},Op={init:function(){this.setColour(Tp),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(Q.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(Q.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(Q.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(Q.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},mp={init:function(){this.setColour(Tp),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(Q.Msg.MIXLY_EMQX_SERVER).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(Q.Msg.MIXLY_EMQX_PORT).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(Q.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Q.Msg.MIXLY_WIFI_USERNAME).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Q.Msg.MIXLY_IOT_PASSWORD).setAlign(Q.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cp={init:function(){this.setColour(Tp),this.appendValueInput("TOPIC").appendField(Q.Msg.MIXLY_EMQX_SUBSCRIBE+Q.Msg.MIXLY_MICROBIT_MSG).appendField(Q.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(Q.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},Ep={init:function(){this.setColour(Tp),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Q.Msg.MIXLY_EMQX_SUBSCRIBE+Q.Msg.MIXLY_MICROBIT_MSG).appendField(Q.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Q.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rp={init:function(){this.setColour(Tp),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(Q.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Q.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Q.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gp={init:function(){this.setColour(Tp),this.appendDummyInput().appendField("mqtt"+Q.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},Cp="#A58C5B",Ap={init:function(){this.setColour(Cp),this.appendValueInput("PIN",Number).appendField(new Q.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Q.FieldDropdown(Ap.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Q.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Q.Msg.MIXLY_GETHUMIDITY,"humidity"]]},Lp=(Q.Msg.PS2_TRIANGLE,Q.Msg.PS2_CIRCLE,Q.Msg.PS2_CROSS,Q.Msg.PS2_SQUARE,Q.Msg.PS2_L1,Q.Msg.PS2_L2,Q.Msg.PS2_R1,Q.Msg.PS2_R2,Q.Msg.PS2_UP,Q.Msg.PS2_RIGHT,Q.Msg.PS2_DOWN,Q.Msg.PS2_LEFT,Q.Msg.PS2_SELECT,Q.Msg.PS2_START,{init:function(){this.setColour(Cp),this.appendDummyInput("").appendField(Q.Msg.PS2_stick).appendField(new Q.FieldDropdown(Lp.PSSTK),"psstk"),this.setOutput(!0,Number),this.setTooltip("")},PSSTK:[[Q.Msg.PS2_RX,"0"],[Q.Msg.PS2_RY,"1"],[Q.Msg.PS2_LX,"2"],[Q.Msg.PS2_LY,"3"]]}),Sp={init:function(){this.setColour(Cp),this.appendValueInput("SUB").appendField(Q.Msg.PS2),this.appendDummyInput("").appendField(Q.Msg.MIXLY_JOYSTICK).appendField(new Q.FieldDropdown(Sp.PSSTK),"psstk"),this.setOutput(!0,Number),this.setTooltip("")},PSSTK:[[Q.Msg.PS2_RX,"RX"],[Q.Msg.PS2_RY,"RY"],[Q.Msg.PS2_LX,"LX"],[Q.Msg.PS2_LY,"LY"]]},Dp=40,Np={init:function(){this.setColour(Dp),this.appendValueInput("PIN",Number).appendField(new Q.FieldDropdown([["DHT11","dht11"],["DHT22","dht22"]]),"TYPE").appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new Q.FieldDropdown(Np.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[Q.Msg.MIXLY_GETTEMPERATUE,"temperature"],[Q.Msg.MIXLY_GETHUMIDITY,"relative_humidity"],[Q.Msg.MIXLY_DHT11_T_H,"tempandhum"]]};const fp=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+" = network.WLAN(network."+this.getFieldValue("mode")+"_IF);\n"},Pp=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".connect("+e.valueToCode(this,"id",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"password",e.ORDER_ATOMIC)+")\n"},Fp=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".isconnected()",e.ORDER_ATOMIC]},vp=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".ifconfig()["+this.getFieldValue("mode")+"]",e.ORDER_ATOMIC]},Yp=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".disconnect()\n"},Vp=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".active("+this.getFieldValue("op")+")\n"},bp=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".active()",e.ORDER_ATOMIC]},Xp=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".config('"+this.getFieldValue("op")+"')",e.ORDER_ATOMIC]},yp=function(t,e){return e.definitions_.import_network="import network",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".config(essid = "+e.valueToCode(this,"essid",e.ORDER_ATOMIC)+", channel="+e.valueToCode(this,"channel",e.ORDER_ATOMIC)+")\n"},Up=function(t,e){return e.definitions_.import_network="import network",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".scan()",e.ORDER_ATOMIC]},Bp=function(t,e){e.definitions_["import_server_*"]="from server import *";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);return"if not "+i+".isconnected():\n connectWifi(SSID, PASSWORD)\nip="+i+".ifconfig()[0]\nprint(ip)\ntime.sleep(1)\nDATA=listenData()\n"},wp=function(t,e){e.definitions_.import_network="import network",e.definitions_.import_socket="import socket";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=this.getFieldValue("mode");return"UDP"==n?n="socket.SOCK_DGRAM":"TCP"==n&&(n="socket.SOCK_STREAM"),i+" = socket.socket(socket.AF_INET, "+n+")\n"},Gp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".bind("+e.valueToCode(this,"address",e.ORDER_ATOMIC)+")\n"},kp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".connect(socket.getaddrinfo"+e.valueToCode(this,"address",e.ORDER_ATOMIC)+"[0][-1])\n"},Hp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".listen("+e.valueToCode(this,"queue",e.ORDER_ATOMIC)+")\n"},xp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".accept()",e.ORDER_ASSIGNMENT]},Wp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".recv("+e.valueToCode(this,"size",e.ORDER_ATOMIC)+")",e.ORDER_ASSIGNMENT]},Kp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".send("+e.valueToCode(this,"content",e.ORDER_ATOMIC)+")\n"},jp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",[e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".recvfrom("+e.valueToCode(this,"size",e.ORDER_ATOMIC)+")",e.ORDER_ASSIGNMENT]},Jp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".sendto("+e.valueToCode(this,"content",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"address",e.ORDER_ATOMIC)+")\n"},Qp=function(t,e){return e.definitions_.import_network="import network",e.definitions_.import_socket="import socket",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".close()\n"},qp=function(t,e){return e.definitions_.import_requests="import requests",e.variableDB_.getName(this.getFieldValue("VAR"),Q.Variables.NAME_TYPE)+"= requests.get("+e.valueToCode(this,"DOMAIN",e.ORDER_ATOMIC)+")\n"},zp=function(t,e){return e.definitions_.import_requests="import requests",[(e.valueToCode(this,"VAL",e.ORDER_ASSIGNMENT)||"0")+"."+this.getFieldValue("ATTR"),e.ORDER_ATOMIC]},Zp=function(t,e){return e.definitions_.import_requests="import requests","requests."+this.getFieldValue("DIR")+"("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+")\n"},$p=function(t,e){return e.definitions_.import_ntptime="import ntptime",["ntptime.time(host="+e.valueToCode(this,"data",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},tl=function(t,e){return["'"+this.getFieldValue("op")+"'",e.ORDER_ATOMIC]},el=function(t,e){return e.definitions_.import_urequests="import urequests",["urequests."+this.getFieldValue("TYPE")+"("+e.valueToCode(this,"URL",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},il=function(t,e){return e.definitions_.import_urequests="import urequests",[(e.valueToCode(this,"VAL",e.ORDER_ASSIGNMENT)||"0")+"."+this.getFieldValue("ATTR"),e.ORDER_ATOMIC]},nl=function(t,e){return e.definitions_.import_urequests="import urequests",["urequests."+this.getFieldValue("TYPE")+"("+e.valueToCode(this,"URL",e.ORDER_ATOMIC)+", data="+e.valueToCode(this,"data",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},sl=function(t,e){return e.definitions_.import_educore_wifi="from educore import wifi","wifi.connect(ssid="+e.valueToCode(this,"WIFINAME",e.ORDER_ATOMIC)+", psd="+e.valueToCode(this,"PASSWORD",e.ORDER_ATOMIC)+", timeout="+e.valueToCode(this,"TIMEOUT",e.ORDER_ATOMIC)+")\n"},ol=function(t,e){return e.definitions_.import_educore_mqttclient="from educore import mqttclient","mqttclient.connect(server="+e.valueToCode(this,"SERVER",e.ORDER_ATOMIC)+", port="+e.valueToCode(this,"PORT",e.ORDER_ATOMIC)+", client_id="+e.valueToCode(this,"CLIENT_ID",e.ORDER_ATOMIC)+", user="+e.valueToCode(this,"USERNAME",e.ORDER_ATOMIC)+", psd="+e.valueToCode(this,"PASSWORD",e.ORDER_ATOMIC)+")\n"},_l=function(t,e){e.definitions_.import_educore_mqttclient="from educore import mqttclient";var i=e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC);return["mqttclient."+e.valueToCode(this,"MESSAGE",e.ORDER_ATOMIC)+"("+i+")",e.ORDER_ATOMIC]},ul=function(t,e){var i=e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC),n=e.valueToCode(this,"METHOD",e.ORDER_ATOMIC);return e.definitions_.import_educore_mqttclient="from educore import mqttclient","mqttclient.received(topic="+i+", callback="+n+")\n"},al=function(t,e){return e.definitions_.import_educore_mqttclient="from educore import mqttclient","mqtt_client.publish(topic="+e.valueToCode(this,"TOPIC",e.ORDER_ATOMIC)+", content="+e.valueToCode(this,"MSG",e.ORDER_ATOMIC)+")\n"},rl=function(t,e){e.definitions_.import_educore_mqttclient="from educore import mqttclient";return["mqtt_client.connescted()",e.ORDER_ATOMIC]},pl=new Q.Generator("Python");pl.INDENT=" ",pl.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),pl.ORDER_ATOMIC=0,pl.ORDER_COLLECTION=1,pl.ORDER_STRING_CONVERSION=1,pl.ORDER_UNARY_POSTFIX=1,pl.ORDER_UNARY_PREFIX=2,pl.ORDER_MEMBER=2.1,pl.ORDER_FUNCTION_CALL=2.2,pl.ORDER_EXPONENTIATION=3,pl.ORDER_UNARY_SIGN=4,pl.ORDER_BITWISE_NOT=4,pl.ORDER_MULTIPLICATIVE=5,pl.ORDER_ADDITIVE=6,pl.ORDER_BITWISE_SHIFT=7,pl.ORDER_BITWISE_AND=8,pl.ORDER_BITWISE_XOR=9,pl.ORDER_BITWISE_OR=10,pl.ORDER_RELATIONAL=11,pl.ORDER_EQUALITY=11,pl.ORDER_LOGICAL_NOT=12,pl.ORDER_LOGICAL_AND=13,pl.ORDER_LOGICAL_OR=14,pl.ORDER_ASSIGNMENT=14,pl.ORDER_CONDITIONAL=15,pl.ORDER_LAMBDA=16,pl.ORDER_NONE=99,pl.ORDER_OVERRIDES=[[pl.ORDER_FUNCTION_CALL,pl.ORDER_MEMBER],[pl.ORDER_FUNCTION_CALL,pl.ORDER_FUNCTION_CALL],[pl.ORDER_MEMBER,pl.ORDER_MEMBER],[pl.ORDER_MEMBER,pl.ORDER_FUNCTION_CALL]],pl.init=function(){pl.PASS=this.INDENT+"pass\n",pl.definitions_=Object.create(null),pl.functionNames_=Object.create(null),pl.setups_=Object.create(null),pl.loops_=Object.create(null),pl.codeEnd_=Object.create(null),pl.variableDB_?pl.variableDB_.reset():pl.variableDB_=new tt(pl.RESERVED_WORDS_)},pl.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var o=this.definitions_[s];0===s.indexOf("import")?e.push(o):0===s.indexOf("var_declare")?i.push(o):n.push(o)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var _=[];for(var s in pl.functions_)_.push(pl.functions_[s]);_.length&&_.push("\n");var u=[];for(var s in pl.setups_)u.push(pl.setups_[s]);u.length&&u.push("\n");var a=[];for(var s in pl.loops_)a.push(pl.loops_[s]);var r=[];for(var s in pl.codeEnd_)r.push(pl.codeEnd_[s]);0!==r.length&&r.push("\n");let p="";return p=a.length>0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+"while True:\n"+a.join("")+r.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+u.join("")+t+r.join("\n"),p},pl.scrubNakedValue=function(t){return t+"\n"},pl.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},pl.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},pl.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=Q.utils.string.wrap(o,pl.COMMENT_WRAP-3),n+=pl.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+u+" + "+s+")":s<0?"int("+u+" - "+-s+")":"int("+u+")",n&&(u="-"+u)),u};const ll={microbit:{description:"microbit_python",digital:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P4","4"],["P5","5"],["P6","6"],["P7","7"],["P8","8"],["P9","9"],["P10","10"],["P11","11"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"],["P19","19"],["P20","20"]],pwm:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P4","4"],["P5","5"],["P6","6"],["P7","7"],["P8","8"],["P9","9"],["P10","10"],["P11","11"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"],["P19","19"],["P20","20"]],analog:[["P0","0"],["P1","1"],["P2","2"],["P3","3"],["P4","4"],["P10","10"]],interrupt:[["P0","0"],["P1","1"],["P2","2"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],builtinimg:[["HEART","Image.HEART"],["HEART_SMALL","Image.HEART_SMALL"],["HAPPY","Image.HAPPY"],["SMILE","Image.SMILE"],["SAD","Image.SAD"],["CONFUSED","Image.CONFUSED"],["ANGRY","Image.ANGRY"],["ASLEEP","Image.ASLEEP"],["SURPRISED","Image.SURPRISED"],["SILLY","Image.SILLY"],["FABULOUS","Image.FABULOUS"],["MEH","Image.MEH"],["YES","Image.YES"],["NO","Image.NO"],["CLOCK12","Image.CLOCK12"],["CLOCK11","Image.CLOCK11"],["CLOCK10","Image.CLOCK10"],["CLOCK9","Image.CLOCK9"],["CLOCK8","Image.CLOCK8"],["CLOCK7","Image.CLOCK7"],["CLOCK6","Image.CLOCK6"],["CLOCK5","Image.CLOCK5"],["CLOCK4","Image.CLOCK4"],["CLOCK3","Image.CLOCK3"],["CLOCK2","Image.CLOCK2"],["CLOCK1","Image.CLOCK1"],["ARROW_N","Image.ARROW_N"],["ARROW_NE","Image.ARROW_NE"],["ARROW_E","Image.ARROW_E"],["ARROW_SE","Image.ARROW_SE"],["ARROW_S","Image.ARROW_S"],["ARROW_SW","Image.ARROW_SW"],["ARROW_W","Image.ARROW_W"],["ARROW_NW","Image.ARROW_NW"],["TRIANGLE","Image.TRIANGLE"],["TRIANGLE_LEFT","Image.TRIANGLE_LEFT"],["CHESSBOARD","Image.CHESSBOARD"],["DIAMOND","Image.DIAMOND"],["DIAMOND_SMALL","Image.DIAMOND_SMALL"],["SQUARE","Image.SQUARE"],["SQUARE_SMALL","Image.SQUARE_SMALL"],["RABBIT","Image.RABBIT"],["COW","Image.COW"],["MUSIC_CROTCHET","Image.MUSIC_CROTCHET"],["MUSIC_QUAVER","Image.MUSIC_QUAVER"],["MUSIC_QUAVERS","Image.MUSIC_QUAVERS"],["PITCHFORK","Image.PITCHFORK"],["XMAS","Image.XMAS"],["PACMAN","Image.PACMAN"],["TARGET","Image.TARGET"],["TSHIRT","Image.TSHIRT"],["ROLLERSKATE","Image.ROLLERSKATE"],["DUCK","Image.DUCK"],["HOUSE","Image.HOUSE"],["TORTOISE","Image.TORTOISE"],["BUTTERFLY","Image.BUTTERFLY"],["STICKFIGURE","Image.STICKFIGURE"],["GHOST","Image.GHOST"],["SWORD","Image.SWORD"],["GIRAFFE","Image.GIRAFFE"],["SKULL","Image.SKULL"],["UMBRELLA","Image.UMBRELLA"],["SNAKE","Image.SNAKE"],["ALL_CLOCKS","Image.ALL_CLOCKS"],["ALL_ARROWS","Image.ALL_ARROWS"]],imglist:[["ALL_CLOCKS","Image.ALL_CLOCKS"],["ALL_ARROWS","Image.ALL_ARROWS"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["P0","0"],["P1","1"],["P2","2"],["P8","8"],["P12","12"],["P13","13"],["P14","14"],["P15","15"],["P16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]]}};ll["Mithon CC"]=ll.microbit;const Il=ll,Tl=100,dl={init:function(){this.jsonInit({colour:Tl,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#built-in-melodies",message0:Q.Msg.MIXLY_MICROBIT_Play_built_in_melody,args0:[{name:"melody",options:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],type:"field_dropdown"},{type:"input_value",name:"PIN"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"}]}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Play_built_in_melody1)}},hl={init:function(){this.jsonInit({colour:Tl,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#built-in-melodies",tooltip:"Play one of the built-in melodies. Indicate if you need to wait before continuing or continuously loop the melody.",message0:Q.Msg.MIXLY_MICROBIT_Play_built_in_melody_easy,args0:[{name:"melody",options:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],type:"field_dropdown"},{type:"input_value",name:"PIN"},{type:"input_dummy"}]})}},Ml={init:function(){this.setColour(Tl),this.appendValueInput("PIN",Number).appendField(Q.Msg.MIXLY_TONE).appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(Q.Msg.MIXLY_FREQUENCY),this.appendValueInput("duration").setCheck(Number).appendField(Q.Msg.MIXLY_DURATION),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MILLIS).appendField(Q.Msg.MIXLY_MICROBIT_WAIT),this.appendDummyInput("").appendField(new Q.FieldCheckbox(!0),"wait"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Ol={init:function(){this.setColour(Tl),this.appendValueInput("PIN",Number).appendField(Q.Msg.MIXLY_TONE).appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("pitch").setCheck(Number).appendField(Q.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},ml={init:function(){this.jsonInit({colour:Tl,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#musical-notation",message0:Q.Msg.MIXLY_MICROBIT_Play_notes,args0:[{check:"List",type:"input_value",name:"notes"},{type:"input_value",name:"PIN"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"}]}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Play_notes1)}},cl={init:function(){this.jsonInit({colour:Tl,nextStatement:null,previousStatement:null,inputsInline:!0,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#musical-notation",tooltip:"Play a list of notes expressed in the special music language. Indicate if you need to wait before continuing or continuously loop the melody.",message0:Q.Msg.MIXLY_MICROBIT_Play_notes,args0:[{check:"List",type:"input_value",name:"notes"},{type:"input_value",name:"PIN"},{type:"input_dummy"},{type:"input_dummy"},{type:"input_dummy"}]})}},El={init:function(){this.jsonInit({colour:Tl,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.reset",message0:Q.Msg.MIXLY_MICROBIT_Reset_music}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Reset_music)}},Rl={init:function(){this.setColour(Tl),this.appendValueInput("PIN").appendField(Q.Msg.MIXLY_NOTONE).appendField(Q.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_NOTONE)}},gl={init:function(){this.jsonInit({colour:Tl,output:"Array",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/music.html#music.get_tempo",message0:Q.Msg.MIXLY_MICROBIT_Get_current_tempo}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Get_current_tempo)}},Cl={init:function(){this.setColour(Tl),this.appendValueInput("TICKS").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(Q.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(Q.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_SET_TEMPO1)}},Al={init:function(){this.setColour(Tl),this.appendValueInput("VAR").setCheck(String).appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,"say"],[Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,"sing"],[Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE,"pronounce"]]),"MODE"),this.appendValueInput("pitch").setCheck(Number).appendField(Q.Msg.MICROBIT_SPEECH_pitch),this.appendValueInput("speed").setCheck(Number).appendField(Q.Msg.MIXLY_SPEED),this.appendValueInput("mouth").setCheck(Number).appendField(Q.Msg.MICROBIT_SPEECH_mouth),this.appendValueInput("throat").setCheck(Number).appendField(Q.Msg.MICROBIT_SPEECH_throat),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH,n=Q.Msg.MIXLY_MICROBIT_TYPE_STRING;return i+{say:Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY,sing:Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING,pronounce:Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE}[e]+n}))}},Ll={init:function(){this.setColour(Tl),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SAY),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Sl={init:function(){this.setColour(Tl),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_SING),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Dl={init:function(){this.setColour(Tl),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_PY_ACTUATOR_SPEECH_PRENOUNCE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Nl={init:function(){this.setColour(Tl),this.appendValueInput("VAR").setCheck(String).appendField(Q.Msg.MICROBIT_SPEECH_translation),this.setOutput(!0,String),this.setTooltip(Q.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Q.Msg.MIXLY_MICROBIT_TYPE_STRING+Q.Msg.MICROBIT_SPEECH_translation)}},fl={init:function(){this.setColour(Tl),this.appendValueInput("PIN",Number).appendField(Q.Msg.MIXLY_SERVO).appendField(Q.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_TOOLTIP_BLOCKGROUP_SERVO_MOVE)}},Pl={init:function(){this.appendValueInput("speed").setCheck(null).appendField(Q.Msg.MIXLY_MOTOR).appendField(new Q.FieldDropdown([["M1","1"],["M2","2"],["M3","3"],["M4","4"]]),"Motor").appendField(Q.Msg.MIXLY_SPEED),this.appendDummyInput().appendField(new Q.FieldDropdown([["Forward","1*"],["Reverse","-1*"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Tl),this.setTooltip(""),this.setHelpUrl("")}},Fl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_RGB_PIN_COUNT)}},vl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_RGB_NUM_R_G_B)}},Yl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_RGB_NUM),this.appendDummyInput("").setAlign(Q.inputs.Align.RIGHT).appendField(new Q.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Vl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.MIXLY_RGB),this.appendDummyInput().appendField(Q.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(Q.Msg.MIXLY_ESP32_MUSIC_WRI)}},bl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.MIXLY_SETUP+" "+Q.Msg.QJ00X_MP3),this.appendValueInput("RX").setAlign(Q.inputs.Align.RIGHT).appendField("RX#"),this.appendValueInput("TX").setAlign(Q.inputs.Align.RIGHT).appendField("TX#"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Xl=[[Q.Msg.MIXLY_MP3_PLAY,"play"],[Q.Msg.MIXLY_MP3_PAUSE,"pause"],[Q.Msg.MIXLY_MP3_NEXT,"next_track"],[Q.Msg.MIXLY_MP3_PREV,"prev_track"],[Q.Msg.MIXLY_MP3_VOL_UP,"inc_vol"],[Q.Msg.MIXLY_MP3_VOL_DOWN,"dec_vol"]];const yl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_STAT).appendField(new Q.FieldDropdown(Xl),"CONTROL_TYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var Ul=[[Q.Msg.MIXLY_MP3_LOOP_ALL,"0"],[Q.Msg.MIXLY_MP3_LOOP_FOLDER,"1"],[Q.Msg.MIXLY_MP3_LOOP_ONE,"2"],[Q.Msg.MIXLY_MP3_LOOP_RAM,"3"]];const Bl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MP3_LOOP_MODE).appendField(Q.Msg.MIXLY_STAT).appendField(new Q.FieldDropdown(Ul),"LOOP_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}};var wl=[[Q.Msg.MIXLY_MP3_EQ_NORMAL,"0"],[Q.Msg.MIXLY_MP3_EQ_POP,"1"],[Q.Msg.MIXLY_MP3_EQ_ROCK,"2"],[Q.Msg.MIXLY_MP3_EQ_JAZZ,"3"],[Q.Msg.MIXLY_MP3_EQ_CLASSIC,"4"],[Q.Msg.MIXLY_MP3_EQ_BASS,"5"]];const Gl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MP3_EQ_MODE).appendField(Q.Msg.MIXLY_STAT).appendField(new Q.FieldDropdown(wl),"EQ_MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},kl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendDummyInput("").appendField(Q.Msg.MIXLY_MP3_VOL),this.appendValueInput("vol",Number).appendField(Q.Msg.MIXLY_STAT).setCheck(Number),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Hl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendValueInput("NUM",Number).appendField(Q.Msg.MIXLY_MP3_PLAY_NUM).setCheck(Number),this.appendDummyInput("").appendField("首"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},xl={init:function(){this.setColour(Tl),this.appendDummyInput("").appendField(Q.Msg.QJ00X_MP3),this.appendValueInput("FOLDER",Number).appendField(Q.Msg.DFPLAYER_MINI_FOLDER).setCheck(Number),this.appendValueInput("NUM",Number).appendField(Q.Msg.MIXLY_MP3_PLAY_NUM).setCheck(Number),this.appendDummyInput("").appendField("首"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(),this.setHelpUrl()}},Wl=140,Kl={init:function(){this.setColour(225),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"on"],[Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"off"],[Q.Msg.HTML_RESET,"reset"]]),"type").appendField(Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_WIFI),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("type"),i=Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_WIFI;return{on:Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,off:Q.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,reset:Q.Blockly.Msg.HTML_RESET}[e]+i}))}},jl={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.on",tooltip:"Turn on the radio. This needs to be explicitly called since the radio draws power and takes up memory that you may otherwise need.",message0:Q.Msg.MIXLY_MICROBIT_Switch_on_radio})}},Jl={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.off",tooltip:"Turn off the radio, thus saving power and memory.",message0:Q.Msg.MIXLY_MICROBIT_Switch_off_radio})}},Ql={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.config",tooltip:Q.Msg.MIXLY_MICROBIT_Configure_radio1,message0:Q.Msg.MIXLY_MICROBIT_Configure_radio,args0:[{min:4,value:32,type:"input_value",max:251,name:"length"},{type:"input_dummy"},{min:1,value:3,type:"input_value",max:32,name:"queue"},{type:"input_dummy"},{min:0,value:7,type:"input_value",max:100,name:"channel"},{type:"input_dummy"},{name:"power",type:"input_value"},{type:"input_dummy"},{name:"address",type:"input_value"},{type:"input_dummy"},{name:"group",type:"input_value"},{type:"input_dummy"},{name:"data_rate",type:"input_value"}]})}},ql={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.reset",tooltip:"Reset the radio to default settings.",message0:Q.Msg.MIXLY_MICROBIT_Reset_radio})}},zl={init:function(){this.jsonInit({colour:225,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.send",tooltip:"Broadcast a text message.",message0:Q.Msg.MIXLY_MICROBIT_Send_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},Zl={init:function(){this.setColour(225),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_RADIO_SEND),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_MSG,"send"],[Q.Msg.MIXLY_MICROBIT_MSG_BYTE,"send_bytes"]]),"type"),this.appendValueInput("data"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Send_message1)}},$l={init:function(){this.jsonInit({colour:225,output:"String",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/radio.html#radio.receive",tooltip:Q.Msg.MIXLY_MICROBIT_Receive_message,message0:Q.Msg.MIXLY_MICROBIT_Receive_message})}},tI={init:function(){this.setColour(225),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_Receive_message),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_MSG,"receive"],[Q.Msg.MIXLY_MICROBIT_MSG_BYTE,"receive_bytes"],[Q.Msg.MIXLY_MICROBIT_MSG_FULL,"receive_full"]]),"type"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Receive_message)}},eI={init:function(){this.setColour(Wl),this.appendValueInput("RX",Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_SETUP).appendField("sda").setCheck(Number).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("TX",Number).appendField("scl").setCheck(Number).setAlign(Q.inputs.Align.RIGHT),this.appendValueInput("freq").setCheck(Number).appendField("频率").setAlign(Q.inputs.Align.RIGHT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},iI={init:function(){this.setColour(Wl),this.appendValueInput("address").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_READ_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(Q.Msg.LANG_MATH_BYTE),this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new Q.FieldCheckbox(!1),"is_repeated"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_I2C_READ)}},nI={init:function(){this.setColour(Wl),this.appendValueInput("address").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_WRITE_ADDRESS),this.appendValueInput("data").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendDummyInput().appendField(Q.Msg.CONTROLS_REPEAT_TITLE_REPEAT).appendField(new Q.FieldCheckbox(!1),"is_repeated"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_I2C_WRITE)}},sI={init:function(){this.jsonInit({colour:Wl,nextStatement:null,previousStatement:null,message0:Q.Msg.MIXLY_MICROBIT_SPI_INIT,args0:[{value:1e6,type:"field_number",name:"freq"},{type:"input_dummy"},{value:8,type:"field_number",name:"bits"},{type:"input_dummy"},{value:0,type:"field_number",name:"mode"},{type:"input_dummy"},{name:"mosi",options:q.Profile.default.digital,type:"field_dropdown"},{name:"miso",options:q.Profile.default.digital,type:"field_dropdown"},{name:"sck",options:q.Profile.default.digital,type:"field_dropdown"}]}),this.setFieldValue("15","mosi"),this.setFieldValue("14","miso"),this.setFieldValue("13","sck")}},oI={init:function(){this.setColour(Wl),this.appendValueInput("data").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_SPI_WRITE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_SPI_WRITE)}},_I=180,uI={init:function(){this.jsonInit({colour:_I,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.clear",message0:Q.Msg.MIXLY_MICROBIT_Clear_display}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Clear_display)}},aI={init:function(){this.setColour(_I),this.appendValueInput("x").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_GET).appendField(Q.Msg.MIXLY_BRIGHTNESS).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Q.Msg.MIXLY_BRIGHTNESS1)}},rI={init:function(){this.setColour(_I),this.appendValueInput("x").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SET_BRIGHTNESS).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("brightness").setCheck(Number).appendField(Q.Msg.MIXLY_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_BRIGHTNESS2)}},pI={init:function(){this.setColour(_I),this.appendValueInput("data").setCheck([String,"microbit_image"]).appendField(Q.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_SHOW_IMAGE_OR_STRING)}},lI={init:function(){this.setColour(_I),this.appendValueInput("data").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},II={init:function(){this.setColour(_I),this.appendValueInput("data").setCheck(String).appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("delay").setCheck(null).appendField(Q.Msg.MIXLY_DELAY),this.appendDummyInput().appendField(Q.Msg.MIXLY_MILLIS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},TI={init:function(){this.setColour(_I),this.appendValueInput("PIN",String).setCheck("microbit_image").appendField(Q.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.OLED_BITMAP)}},dI={init:function(){this.jsonInit({colour:_I,InputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",tooltip:"Show the referenced image on the display.",message0:Q.Msg.OLED_BITMAP,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SMILE","SMILE"],["SAD","SAD"],["CONFUSED","CONFUSED"],["ANGRY","ANGRY"],["ASLEEP","ASLEEP"],["SURPRISED","SURPRISED"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["MEH","MEH"],["YES","YES"],["NO","NO"],["CLOCK12","CLOCK12"],["CLOCK11","CLOCK11"],["CLOCK10","CLOCK10"],["CLOCK9","CLOCK9"],["CLOCK8","CLOCK8"],["CLOCK7","CLOCK7"],["CLOCK6","CLOCK6"],["CLOCK5","CLOCK5"],["CLOCK4","CLOCK4"],["CLOCK3","CLOCK3"],["CLOCK2","CLOCK2"],["CLOCK1","CLOCK1"],["ARROW_N","ARROW_N"],["ARROW_NE","ARROW_NE"],["ARROW_E","ARROW_E"],["ARROW_SE","ARROW_SE"],["ARROW_S","ARROW_S"],["ARROW_SW","ARROW_SW"],["ARROW_W","ARROW_W"],["ARROW_NW","ARROW_NW"],["TRIANGLE","TRIANGLE"],["TRIANGLE_LEFT","TRIANGLE_LEFT"],["CHESSBOARD","CHESSBOARD"],["DIAMOND","DIAMOND"],["DIAMOND_SMALL","DIAMOND_SMALL"],["SQUARE","SQUARE"],["SQUARE_SMALL","SQUARE_SMALL"],["RABBIT","RABBIT"],["COW","COW"],["MUSIC_CROTCHET","MUSIC_CROTCHET"],["MUSIC_QUAVER","MUSIC_QUAVER"],["MUSIC_QUAVERS","MUSIC_QUAVERS"],["PITCHFORK","PITCHFORK"],["XMAS","XMAS"],["PACMAN","PACMAN"],["TARGET","TARGET"],["TSHIRT","TSHIRT"],["ROLLERSKATE","ROLLERSKATE"],["DUCK","DUCK"],["HOUSE","HOUSE"],["TORTOISE","TORTOISE"],["BUTTERFLY","BUTTERFLY"],["STICKFIGURE","STICKFIGURE"],["GHOST","GHOST"],["SWORD","SWORD"],["GIRAFFE","GIRAFFE"],["SKULL","SKULL"],["UMBRELLA","UMBRELLA"],["SNAKE","SNAKE"],["ALL_CLOCKS","ALL_CLOCKS"],["ALL_ARROWS","ALL_ARROWS"]],type:"field_dropdown"}]})}},hI={init:function(){this.jsonInit({colour:_I,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",message0:Q.Msg.MIXLY_MICROBIT_Animate_images_or_string,args0:[{check:[String,"List"],type:"input_value",name:"images"},{type:"input_value",name:"delay"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"clear"}]}),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SHOW_delay+Q.Msg.MIXLY_MICROBIT_Animate_images1)}},MI={init:function(){this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.jsonInit({colour:_I,inputsInline:!0,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.show",tooltip:"Display the list of images as an animation with a certain delay between each frame. Indicate if you need to wait before continuing, continuously loop the animation and clear the display when finished.",message0:Q.Msg.MIXLY_MICROBIT_SHOW_STRING,args0:[{check:String,type:"input_value",name:"images"},{type:"input_value",name:"delay"},{type:"input_dummy"},{checked:!0,type:"field_checkbox",name:"wait"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"loop"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"clear"}]}),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING)}},OI={init:function(){this.jsonInit({colour:_I,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.scroll",tooltip:"Scroll the referenced text across the display.",message0:Q.Msg.MIXLY_MICROBIT_Scroll_message,args0:[{check:"String",type:"input_value",name:"message"}]})}},mI={init:function(){this.setColour(_I),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_MICROBIT_Turn_on_display,"on"],[Q.Msg.MIXLY_MICROBIT_Turn_off_display,"off"]]),"on_off").appendField(Q.Msg.MIXLY_MICROBIT_monitor),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("on_off"),i=Q.Msg.MIXLY_MICROBIT_monitor;return{on:Q.Msg.MIXLY_MICROBIT_Turn_on_display,off:Q.Msg.MIXLY_MICROBIT_Turn_off_display}[e]+i}))}},cI={init:function(){this.jsonInit({colour:_I,nextStatement:null,previousStatement:null,helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.off",tooltip:"Turn off the display.",message0:Q.Msg.MIXLY_MICROBIT_Turn_off_display})}},EI={init:function(){this.jsonInit({colour:_I,output:"Boolean",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/display.html#microbit.display.is_on",message0:Q.Msg.MIXLY_MICROBIT_Display_is_on}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Display_is_on1)}},RI={init:function(){this.jsonInit({colour:_I,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SMILE","SMILE"],["SAD","SAD"],["CONFUSED","CONFUSED"],["ANGRY","ANGRY"],["ASLEEP","ASLEEP"],["SURPRISED","SURPRISED"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["MEH","MEH"],["YES","YES"],["NO","NO"],["CLOCK12","CLOCK12"],["CLOCK11","CLOCK11"],["CLOCK10","CLOCK10"],["CLOCK9","CLOCK9"],["CLOCK8","CLOCK8"],["CLOCK7","CLOCK7"],["CLOCK6","CLOCK6"],["CLOCK5","CLOCK5"],["CLOCK4","CLOCK4"],["CLOCK3","CLOCK3"],["CLOCK2","CLOCK2"],["CLOCK1","CLOCK1"],["ARROW_N","ARROW_N"],["ARROW_NE","ARROW_NE"],["ARROW_E","ARROW_E"],["ARROW_SE","ARROW_SE"],["ARROW_S","ARROW_S"],["ARROW_SW","ARROW_SW"],["ARROW_W","ARROW_W"],["ARROW_NW","ARROW_NW"],["TRIANGLE","TRIANGLE"],["TRIANGLE_LEFT","TRIANGLE_LEFT"],["CHESSBOARD","CHESSBOARD"],["DIAMOND","DIAMOND"],["DIAMOND_SMALL","DIAMOND_SMALL"],["SQUARE","SQUARE"],["SQUARE_SMALL","SQUARE_SMALL"],["RABBIT","RABBIT"],["COW","COW"],["MUSIC_CROTCHET","MUSIC_CROTCHET"],["MUSIC_QUAVER","MUSIC_QUAVER"],["MUSIC_QUAVERS","MUSIC_QUAVERS"],["PITCHFORK","PITCHFORK"],["XMAS","XMAS"],["PACMAN","PACMAN"],["TARGET","TARGET"],["TSHIRT","TSHIRT"],["ROLLERSKATE","ROLLERSKATE"],["DUCK","DUCK"],["HOUSE","HOUSE"],["TORTOISE","TORTOISE"],["BUTTERFLY","BUTTERFLY"],["STICKFIGURE","STICKFIGURE"],["GHOST","GHOST"],["SWORD","SWORD"],["GIRAFFE","GIRAFFE"],["SKULL","SKULL"],["UMBRELLA","UMBRELLA"],["SNAKE","SNAKE"],["ALL_CLOCKS","ALL_CLOCKS"],["ALL_ARROWS","ALL_ARROWS"]],type:"field_dropdown"}],output:["microbit_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:Q.Msg.MIXLY_MICROBIT_Built_in_image1,message0:Q.Msg.MIXLY_MICROBIT_Built_in_image})}},gI={init:function(){this.jsonInit({colour:_I,args0:[{check:["microbit_image","List",String],type:"input_value",name:"image"}],output:"microbit_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image.copy",message0:Q.Msg.MIXLY_MICROBIT_Copy_image}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Copy_image1)}},CI={init:function(){this.jsonInit({colour:_I,args0:[{check:["microbit_image","List",String],type:"input_value",name:"image"}],output:"microbit_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image.invert",message0:Q.Msg.MIXLY_MICROBIT_Invert_image}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Invert_image1)}},AI={init:function(){this.jsonInit({colour:_I,args0:[{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"00"},{colour:"#000000",type:"field_colour",name:"01"},{colour:"#000000",type:"field_colour",name:"02"},{colour:"#000000",type:"field_colour",name:"03"},{colour:"#000000",type:"field_colour",name:"04"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"10"},{colour:"#000000",type:"field_colour",name:"11"},{colour:"#000000",type:"field_colour",name:"12"},{colour:"#000000",type:"field_colour",name:"13"},{colour:"#000000",type:"field_colour",name:"14"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"20"},{colour:"#000000",type:"field_colour",name:"21"},{colour:"#000000",type:"field_colour",name:"22"},{colour:"#000000",type:"field_colour",name:"23"},{colour:"#000000",type:"field_colour",name:"24"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"30"},{colour:"#000000",type:"field_colour",name:"31"},{colour:"#000000",type:"field_colour",name:"32"},{colour:"#000000",type:"field_colour",name:"33"},{colour:"#000000",type:"field_colour",name:"34"},{type:"input_dummy"},{colour:"#000000",type:"field_colour",name:"40"},{colour:"#000000",type:"field_colour",name:"41"},{colour:"#000000",type:"field_colour",name:"42"},{colour:"#000000",type:"field_colour",name:"43"},{colour:"#000000",type:"field_colour",name:"44"}],output:"microbit_image",helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#microbit.Image",message0:Q.Msg.MIXLY_MICROBIT_Create_image}),this.setTooltip(Q.Msg.MIXLY_MICROBIT_Create_image1)}},LI={init:function(){var t=[[Q.Msg.MIXLY_UP,"up"],[Q.Msg.MIXLY_DOWN,"down"],[Q.Msg.MIXLY_LEFT,"left"],[Q.Msg.MIXLY_RIGHT,"right"]];this.setColour(_I),this.setOutput(!0,"microbit_image"),this.setInputsInline(!0),this.appendValueInput("img").appendField(Q.Msg.DISPLAY_IMAGE_LET).setCheck(["microbit_image","List",String]),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_LET2).appendField(new Q.FieldDropdown(t),"OP"),this.appendValueInput("val").appendField(Q.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(Q.Msg.DISPLAY_IMAGE_UNIT);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i=Q.Msg.DISPLAY_IMAGE_LET,n=Q.Msg.DISPLAY_IMAGE_LET2,s=Q.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:Q.Msg.MIXLY_UP,down:Q.Msg.MIXLY_DOWN,left:Q.Msg.MIXLY_LEFT,right:Q.Msg.MIXLY_RIGHT}[t]+s}))}},SI={init:function(){var t=[[Q.Msg.MICROBIT_DISPLAY_UNION,"+"],[Q.Msg.MICROBIT_DISPLAY_MINUS,"-"]];this.setColour(_I),this.setOutput(!0,"microbit_image"),this.appendValueInput("A").appendField(Q.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{"+":Q.Msg.MIXLY_MICROBIT_image_add,"-":Q.Msg.MIXLY_MICROBIT_image_reduce}[t]}))}},DI={init:function(){this.setColour(_I),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(Q.Msg.MIXLY_LCD_PRINT1),this.appendValueInput("TEXT2",String).setCheck([String,Number]).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_LCD_PRINT2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_LCD_PRINT4_TOOLTIP)}},NI={init:function(){this.setColour(_I),this.appendValueInput("device").setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_SETUP).appendField(Q.Msg.MIXLY_DF_LCD).appendField("1602").appendField("mylcd").appendField(Q.Msg.MIXLY_LCD_ADDRESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Q.Msg.MIXLY_SETUP+Q.Msg.MIXLY_DF_LCD+Q.Msg.MIXLY_LCD_ADDRESS)}},fI={init:function(){this.setColour(_I),this.appendValueInput("row",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(Q.Msg.MIXLY_LCD_ROW),this.appendValueInput("column",Number).setCheck(Number).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_LCD_COLUMN),this.appendValueInput("TEXT",String).setCheck([String,Number]).setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.MIXLY_LCD_PRINT),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setNextStatement(!0,null),this.setTooltip(Q.Msg.MIXLY_LCD_PRINT3_TOOLTIP)}},PI={init:function(){this.setColour(_I),this.appendDummyInput().appendField(Q.Msg.MIXLY_DF_LCD).appendField("mylcd").appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_ON,"on()"],[Q.Msg.MIXLY_OFF,"off()"],[Q.Msg.MIXLY_LCD_STAT_CLEAR,"clear()"],[Q.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(False)"],[Q.Msg.MIXLY_LCD_BACKLIGHT,"backlight(True)"]]),"STAT"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);var t=this;this.setTooltip((function(){var e=t.getFieldValue("STAT");return Q.Msg.LISTS_SET_INDEX_SET+Q.Msg.MIXLY_DF_LCD+{"on()":Q.Msg.MIXLY_ON,"off()":Q.Msg.MIXLY_OFF,"clear()":Q.Msg.MIXLY_LCD_STAT_CLEAR,"backlight(off)":Q.Msg.MIXLY_LCD_NOBACKLIGHT,"backlight(on)":Q.Msg.MIXLY_LCD_BACKLIGHT}[e]}))}},FI={init:function(){this.appendDummyInput().appendField(Q.Msg.MIXLY_DF_LCD+" OLED "+Q.Msg.OLEDDISPLAY),this.appendValueInput("Text_line1","String").setAlign(Q.inputs.Align.RIGHT).appendField("(128*64) "+Q.Msg.line1),this.appendValueInput("Text_line2","String").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.line2),this.appendValueInput("Text_line3","String").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.line3),this.appendValueInput("Text_line4","String").setAlign(Q.inputs.Align.RIGHT).appendField(Q.Msg.line4),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(_I),this.setTooltip(Q.Msg.MIXLY_DF_LCD+Q.Msg.OLEDDISPLAY+Q.Msg.MIXLY_MICROBIT_TYPE_STRING)}},vI={init:function(){var t=[[Q.Msg.MIXLY_HEIGHT,"height"],[Q.Msg.MIXLY_WIDTH,"width"]];this.setColour(_I),this.appendDummyInput().appendField(Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("microbit_image"),this.appendDummyInput("").appendField(new Q.FieldDropdown(t),"OP"),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return Q.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+Q.Msg.MIXLY_MICROBIT_IMAGE+{height:Q.Msg.MIXLY_HEIGHT,width:Q.Msg.MIXLY_WIDTH}[t]}))}},YI={init:function(){this.setColour(_I),this.appendValueInput("SUB"),this.appendDummyInput().appendField(new Q.FieldDropdown([[Q.Msg.MIXLY_LCD_STAT_CLEAR,"0"],[Q.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL,"1"]]),"key"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i={0:Q.Msg.MIXLY_LCD_STAT_CLEAR,1:Q.Msg.MIXLY_HANDBIT_DISLPAY_OLED_FILL};return Q.Msg.MIXLY_DF_LCD+i[e]}))}},VI="#777777",bI={init:function(){this.setColour(VI),this.appendDummyInput("").appendField("from ").appendField(new Q.FieldTextInput("microbit"),"path").appendField(" import ").appendField(new Q.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},XI={init:function(){this.setColour(VI),this.appendDummyInput("").appendField("import ").appendField(new Q.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yI={init:function(){this.setColour(VI),this.appendDummyInput("").appendField(new Q.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Q.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;e0)var u="rgb_show.mixly_rgb_show("+(i-1)+", "+s+", "+o+", "+_+")\n";else u="rgb_show.mixly_rgb_show_all("+s+", "+o+", "+_+")\n";return u},_M=function(t,e){var i=this.getFieldValue("LED");if(e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_neopixel="import neopixel",e.definitions_.import_rgb_show="import rgb_show",i>0)var n="rgb_show.mixly_rgb_show("+(i-1)+", 0, 0, 0)\n";else n="rgb_show.mixly_rgb_show_all(0, 0, 0)\n";return n},uM=function(t,e){var i=e.valueToCode(this,"_LED_",e.ORDER_ATOMIC),n=e.valueToCode(this,"RVALUE",e.ORDER_ATOMIC),s=e.valueToCode(this,"GVALUE",e.ORDER_ATOMIC),o=e.valueToCode(this,"BVALUE",e.ORDER_ATOMIC);return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_neopixel="import neopixel",e.definitions_.import_rgb_show="import rgb_show","rgb_show.mixly_rgb_show("+i+", "+n+", "+s+", "+o+")\n"},aM=function(t,e){var i=this.getFieldValue("NUMBER"),n=e.valueToCode(this,"SPEED",e.ORDER_ATOMIC),s=this.getFieldValue("DIRECTION");if(e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_motor_control="import motor_control",0==i)var o="motor_control.motor1("+n+", "+s+")\nmotor_control.motor2("+n+", "+s+")\nmotor_control.motor3("+n+", "+s+")\n";else if(1==i)o="motor_control.motor1("+n+", "+s+")\n";else if(2==i)o="motor_control.motor2("+n+", "+s+")\n";else if(3==i)o="motor_control.motor3("+n+", "+s+")\n";return o},rM=function(t,e){var i=this.getFieldValue("NUMBER");if(e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_motor_control="import motor_control",0==i)var n="motor_control.motor1(0)\nmotor_control.motor2(0)\nmotor_control.motor3(0)\n";else if(1==i)n="motor_control.motor1(0)\n";else if(2==i)n="motor_control.motor2(0)\n";else if(3==i)n="motor_control.motor3(0)\n";return n},pM=function(t,e){return["pin"+this.getFieldValue("NUMBER")+".read_analog()",e.ORDER_ATOMIC]},lM=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=e.valueToCode(this,"btn",e.ORDER_ATOMIC);e.setups_["on_"+i]="def on_"+i+"():\n while True:\n if "+i+".was_pressed():\n yield callback_"+i+"()\n else:\n yield\n\nfunc_"+i+" = on_"+i+"()\n";var n=e.statementToCode(t,"DO");n=e.addLoopTrap(n,t.id)||e.PASS;return e.loops_[i+"_loop"]=" next(func_"+i+")\n","def callback_"+i+"():\n"+n},IM=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=this.getFieldValue("gesture");e.setups_["on_"+i]="def on_gesture_"+i+'():\n while True:\n if accelerometer.is_gesture("'+i+'"):\n yield callback_gesture_'+i+"()\n else:\n yield\n\nfunc_gesture_"+i+" = on_gesture_"+i+"()\n";var n=e.statementToCode(t,"DO");n=e.addLoopTrap(n,t.id)||e.PASS;return e.loops_[i+"_loop"]=" next(func_gesture_"+i+")\n","def callback_gesture_"+i+"():\n"+n},TM=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=this.getFieldValue("near");e.setups_["on_"+i]="def on_near_"+i+"():\n while True:\n if not pin"+i+".read_digital():\n yield callback_near_"+i+"()\n else:\n yield\n\nfunc_near_"+i+" = on_near_"+i+"()\n";var n=e.statementToCode(t,"DO");n=e.addLoopTrap(n,t.id)||e.PASS;return e.loops_[i+"_loop"]=" next(func_near_"+i+")\n","def callback_near_"+i+"():\n"+n},dM=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=e.valueToCode(this,"TIMES",e.ORDER_ATOMIC),n=e.statementToCode(t,"DO");return"for _my_variable in range("+i+"):\n"+(n=e.addLoopTrap(n,t.id)||e.PASS)},hM=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},MM=hM,OM=hM,mM=hM,cM=hM,EM=hM,RM=hM,gM=hM,CM=hM,AM=hM,LM=hM,SM=hM,DM=hM,NM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",[e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".is_pressed()",e.ORDER_ATOMIC]},fM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",[e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".was_pressed()",e.ORDER_ATOMIC]},PM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",[e.valueToCode(this,"btn",e.ORDER_ATOMIC)+".get_presses()",e.ORDER_ATOMIC]},FM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",['"'+this.getFieldValue("gesture")+'"',e.ORDER_ATOMIC]},vM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",'if accelerometer.is_gesture("'+this.getFieldValue("gesture")+'"):\n'+(e.statementToCode(this,"DO")||e.PASS)},YM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",['accelerometer.is_gesture("'+this.getFieldValue("gesture")+'")',e.ORDER_ATOMIC]},VM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",['accelerometer.was_gesture("'+this.getFieldValue("gesture")+'")',e.ORDER_ATOMIC]},bM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",'if accelerometer.was_gesture("'+this.getFieldValue("gesture")+'"):\n'+(e.statementToCode(this,"DO")||e.PASS)},XM=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i,n=this.getFieldValue("GES");return"all"==n?i="accelerometer.get_gestures()":"current"==n&&(i="accelerometer.current_gesture()"),[i,e.ORDER_ATOMIC]},yM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["accelerometer.current_gesture()",e.ORDER_ATOMIC]},UM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["accelerometer.get_"+this.getFieldValue("key")+"()",e.ORDER_ATOMIC]},BM=function(){return"input.setAccelerometerRange("+this.getFieldValue("key")+")\n"},wM=function(t,e){return["input.lightLevel()",e.ORDER_ATOMIC]},GM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","compass.calibrate()\n"},kM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["compass.is_calibrated()",e.ORDER_ATOMIC]},HM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["compass.heading()",e.ORDER_ATOMIC]},xM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["temperature()",e.ORDER_ATOMIC]},WM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["compass."+this.getFieldValue("compass")+"()",e.ORDER_ATOMIC]},KM=function(t,e){return["input.rotation("+this.getFieldValue("key")+")",e.ORDER_ATOMIC]},jM=function(t,e){return["input.magneticForce("+this.getFieldValue("key")+")",e.ORDER_ATOMIC]},JM=function(t,e){var i=this.getFieldValue("Trig"),n=this.getFieldValue("Echo");return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_ultrasonic="import ultrasonic",["ultrasonic.distance_cm(t_pin=pin"+i+", e_pin=pin"+n+")",e.ORDER_ATOMIC]},QM=function(t,e){var i=this.getFieldValue("Trig"),n=this.getFieldValue("Echo");return e.definitions_["import_microbit_*"]="from microbit import *",e.setups_.class_hrsc04_="class HCSR04:\n def __init__(self, tpin=pin"+i+", epin=pin"+n+', spin=pin13):\n self.trigger_pin = tpin\n self.echo_pin = epin\n self.sclk_pin = spin\n\n def distance_mm(self):\n spi.init(baudrate=125000, sclk=self.sclk_pin,\n mosi=self.trigger_pin, miso=self.echo_pin)\n pre = 0\n post = 0\n k = -1\n length = 500\n resp = bytearray(length)\n resp[0] = 0xFF\n spi.write_readinto(resp, resp)\n # find first non zero value\n try:\n i, value = next((ind, v) for ind, v in enumerate(resp) if v)\n except StopIteration:\n i = -1\n if i > 0:\n pre = bin(value).count("1")\n # find first non full high value afterwards\n try:\n k, value = next((ind, v)\n for ind, v in enumerate(resp[i:length - 2]) if resp[i + ind + 1] == 0)\n post = bin(value).count("1") if k else 0\n k = k + i\n except StopIteration:\n i = -1\n dist= -1 if i < 0 else round((pre + (k - i) * 8. + post) * 8 * 0.172)\n return dist\n\n def distance_cm(self):\n return self.distance_mm() / 10.0\n\nsonar=HCSR04()\n\n',["sonar.distance_cm()",e.ORDER_ATOMIC]},qM=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *"},zM=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *";var i=this.getFieldValue("TIME_TYPE");switch(i){case"Year":case"Month":case"Day":case"Hour":case"Minute":case"Second":case"Week":return["ds."+i+"()",e.ORDER_ASSIGNMENT];case"Mix1":return["ds.get_date()",e.ORDER_ASSIGNMENT];case"Mix2":return["ds.get_time()",e.ORDER_ASSIGNMENT]}},ZM=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *","ds.set_time("+e.valueToCode(this,"hour",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"minute",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"second",e.ORDER_ASSIGNMENT)+")\n"},$M=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_RTC="from RTC import *","ds.set_date("+e.valueToCode(this,"year",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"month",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"day",e.ORDER_ASSIGNMENT)+")\n"},tO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","compass.clear_calibration()\n"},eO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["display.read_light_level()",e.ORDER_ATOMIC]},iO=function(t,e){var i=this.getFieldValue("Trig"),n=this.getFieldValue("Echo");return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_ultrasonic="from ultrasonic import *","sonar = HCSR04(tpin=pin"+i+", epin=pin"+n+")\n"},nO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",e.definitions_.import_TCS="from TCS import *",["tcs.getRawRGBData("+this.getFieldValue("TCS34725_COLOR")+")",e.ORDER_ATOMIC]},sO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+"))\n"},oO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||'""')+")+'\\r\\n')\n"},_O=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.write(str(hex("+(e.valueToCode(this,"CONTENT",e.ORDER_ATOMIC)||"0")+")) + '\\r\\n')\n"},uO=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=e.valueToCode(this,"char_marker",e.ORDER_ATOMIC)||";",n=e.statementToCode(this,"DO");e.definitions_["func_serial_receive_data_event_"+i.charCodeAt(1)]="serial.onDataReceived("+i+", () => {\n"+n+"}\n"},aO=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.any()",e.ORDER_ATOMIC]},rO=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.read()",e.ORDER_ATOMIC]},pO=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["uart.readline()",e.ORDER_ATOMIC]},lO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["serial.readUntil("+this.getFieldValue("char_marker")+")",e.ORDER_ATOMIC]},IO=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";var i=e.valueToCode(this,"RX",e.ORDER_ATOMIC),n=e.valueToCode(this,"TX",e.ORDER_ATOMIC);return isNaN(parseInt(i))||(i="pin"+i),isNaN(parseInt(n))||(n="pin"+n),"uart.init(rx="+i+", tx="+n+", baudrate="+this.getFieldValue("baudrate")+")\n"},TO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","uart.init(baudrate="+this.getFieldValue("baudrate")+")\n"},dO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *",["input("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")",e.ORDER_ATOMIC]},hO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+")\n"},MO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","print("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+',end ="")\n'},OO=function(t,e){return"control.inBackground(() => {\n"+e.statementToCode(this,"do")+"})\n"},mO=function(){return"control.reset()\n"},cO=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||q.Profile.default.serial)+")\n"},EO=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||q.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||q.Profile.default.serial)+")\n"},RO=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||q.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||q.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},gO=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},CO=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},AO=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},LO=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},SO=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},DO=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},NO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","sleep("+(e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000")+")\n"},fO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},PO=function(t,e){e.definitions_["import_microbit_*"]="from microbit import *";return["running_time()",e.ORDER_ATOMIC]},FO=function(){return"while True:\n pass\n"},vO=function(t,e){return e.definitions_["import_microbit_*"]="from microbit import *","reset()\n"},YO=function(t,e){return e.definitions_.import_os="import os",["os.uname()",e.ORDER_ATOMIC]};Object.assign(Q.Variables,Z),Object.assign(Q.Procedures,pr),Q.Python=lr,Q.generator=lr,q.Profile.default={},Object.assign(q.Profile,Il),Object.assign(q.Profile.default,Il.microbit),Object.assign(Q.Blocks,e,i,n,s,o,_,u,a,r,p,l,I,T,D,f,P,F,F,v,Y,V,b,X,y,U),Object.assign(Q.Python.forBlock,d,h,M,O,m,c,E,R,g,C,A,L,S,N,B,w,G,G,k,H,x,W,K,j,J)})(); \ No newline at end of file diff --git a/boards/default/micropython_robot/index.xml b/boards/default/micropython_robot/index.xml index 6fbcea91..261900ee 100644 --- a/boards/default/micropython_robot/index.xml +++ b/boards/default/micropython_robot/index.xml @@ -1 +1 @@ -02000attachInterrupt_funcattachInterrupt_func10,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!ms10timtim1000tim_callbacktim_callback5000200090x151100a10.998124.82997110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyMixly,HelloMixlyprompt02MixlyMixly0XFF00FFcodebMixlyMixly1attachInterrupt_funcattachInterrupt_func00Mixly0Mixly20189141420452023,1,1,12,0,0180291001001001001004404401000004120000000000010001000Mixly0MixlyMixly500MixlyMixly500>10.50.5wifinamewifipassword8080AUTH TOKEN0_value02000notify0Your Target Emailsubjectbodycolor#FF0000wifinamewifipasswordmixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012http://mixio.mixly.org/time.phpmixio.mixly.cnwifinamewifipasswordcsub_cb31444082183.230.40.3914109261n63JySRowo13ZLDBKw6y896E0=MixlyRobotsub_cbEQmsg1ciot_dict"tc"ciot_dictccwifinamewifipasswordclientEnter Your API_KEYEnter Your SECRET_KEYclient1clientS72099北京今天天气如何?wifinamewifipasswordSGJl0ExVN-4j27msR北京SGJl0ExVN-4j27msR北京1SGJl0ExVN-4j27msR北京24ble_cble_pMixlyble_cble_cMixlyble_cble_xble_xble_xMixlyble_xble_methodble_methodEQdataMixlyhandlehandle_methodhandle_methodkey1key2key3keyx02000001000009000,4500,563,5630x1234callbackcmdaddrrawpulsesi2c2221100000i2c00i2c00i2ci2ci2cspi200000045spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345buf1Mixlyow12owowow12345ow12345owmy_now0my_nowmy_nowmy_nowFFFFFFFFFFFFmixlymy_nowmy_nowcbcbEQmsg1spi10000004512spi8my_lora433.925716my_loramy_loramy_loraMixly100100100180100360100100filename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0wifinamewifipasswordwlanwlanwlanwlanwlan127.16.0.801234567wlanwlanwlanwlanwlan127.16.0.81connect_wifiwlanAPwlanTruewlanwlanSmallCabbage1WHILETRUEEQ0wlan0.0.0.0ms1000TRUEss0.0.0.080s192.168.0.180s5ss1024sbMixlyresponses1024sbMixlyresponse127.0.0.180sntp.aliyun.comresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponsehttp://192.168.1.1:11434qwen2.5-coder:0.5b5https://api.deepseek.comAPI Keydeepseek-chat5请介绍一下米思齐?content_callbackcontent_callbackcontent请介绍一下米思齐? \ No newline at end of file +02000attachInterrupt_funcattachInterrupt_func10,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!ms10timtim1000tim_callbacktim_callback5000200090x151100a10.998124.82997110010101000110050110011000110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')mylist1,2,3,4,5mylist0mylist02mylistmylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xMixlyMixlyMixly,HelloMixlyprompt02MixlyMixly0XFF00FFcodebMixlyMixly1attachInterrupt_funcattachInterrupt_func00Mixly0Mixly20189141420452023,1,1,12,0,0180291001001001001004404401000004120000000000010001000Mixly0MixlyMixly500MixlyMixly500>10.50.5wifinamewifipassword8080AUTH TOKEN0_value02000notify0Your Target Emailsubjectbodycolor#FF0000wifinamewifipasswordmixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012http://mixio.mixly.org/time.phpmixio.mixly.cnwifinamewifipasswordcsub_cb31444082183.230.40.3914109261n63JySRowo13ZLDBKw6y896E0=MixlyRobotsub_cbEQmsg1ciot_dict"tc"ciot_dictccwifinamewifipasswordclientEnter Your API_KEYEnter Your SECRET_KEYclient1clientS72099北京今天天气如何?wifinamewifipasswordSGJl0ExVN-4j27msR北京SGJl0ExVN-4j27msR北京1SGJl0ExVN-4j27msR北京24ble_cble_pMixlyble_cble_cMixlyble_cble_xble_xble_xMixlyble_xble_methodble_methodEQdataMixlyhandlehandle_methodhandle_methodkey1key2key3keyx02000001000009000,4500,563,5630x1234callbackcmdaddrrawpulsesi2c2221100000i2c00i2c00i2ci2ci2cspi200000045spi200000buf50spi10spi100xffspibufspibuf0xffspi12345spi12345buf1Mixlyow12owowow12345ow12345owmy_now0my_nowmy_nowmy_nowFFFFFFFFFFFFmixlymy_nowmy_nowcbcbEQmsg1spi10000004512spi8my_lora433.925716my_loramy_loramy_loraMixly100100100180100360100100filename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtpathff0wifinamewifipasswordwlanwlanwlanwlanwlan127.16.0.801234567wlanwlanwlanwlanwlan127.16.0.81connect_wifiwlanAPwlanTruewlanwlanSmallCabbage1WHILETRUEEQ0wlan0.0.0.0ms1000TRUEss0.0.0.080s192.168.0.180s5ss1024sbMixlyresponses1024sbMixlyresponse127.0.0.180sntp.aliyun.comresponsehttp://mixio.mixly.cnresponsehttp://mixio.mixly.cnresponsehttp://192.168.1.1:11434qwen2.5-coder:0.5b5https://api.deepseek.comAPI Keydeepseek-chat5请介绍一下米思齐?content_callbackcontent_callbackcontent请介绍一下米思齐? \ No newline at end of file diff --git a/boards/default/micropython_robot/main.bundle.6e531814.js b/boards/default/micropython_robot/main.bundle.6e531814.js deleted file mode 100644 index 697d287a..00000000 --- a/boards/default/micropython_robot/main.bundle.6e531814.js +++ /dev/null @@ -1,21 +0,0 @@ -(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>Rt,controls_typeLists:()=>ct,lists_zip:()=>gt,lists_zip_container:()=>Ct,lists_zip_item:()=>St,unpack_iterable_object:()=>At,variables_change:()=>Et,variables_get:()=>ht,variables_global:()=>Ot,variables_set:()=>mt});var i={};t.r(i),t.d(i,{base_setup:()=>Dt,controls_delay:()=>ft,controls_end_program:()=>Ft,controls_except:()=>kt,controls_finally:()=>Ht,controls_flow_statements:()=>yt,controls_for:()=>xt,controls_forEach:()=>Yt,controls_for_range:()=>Vt,controls_if:()=>Pt,controls_if_else:()=>Ut,controls_if_elseif:()=>Gt,controls_if_if:()=>Bt,controls_lambda:()=>Kt,controls_main:()=>Nt,controls_pass:()=>Jt,controls_range:()=>vt,controls_repeat_ext:()=>Wt,controls_thread:()=>qt,controls_try:()=>wt,controls_try_finally:()=>bt,controls_whileUntil:()=>Xt,datetime_fromtimestamp:()=>te,do_while:()=>Qt,garbage_collection:()=>zt,gene_unique_identifier:()=>ee,get_mem_alloc:()=>jt,get_mem_free:()=>$t,get_unique_identifier:()=>Zt});var n={};t.r(n),t.d(n,{base_map:()=>ge,generate_cartesian_product:()=>Se,math_arithmetic:()=>_e,math_bit:()=>ae,math_constant:()=>se,math_constant_mp:()=>oe,math_constrain:()=>Me,math_dec:()=>re,math_degree_to_radian:()=>Le,math_indexer_number:()=>me,math_map:()=>he,math_max_min:()=>le,math_number:()=>ne,math_number_base_conversion:()=>Ie,math_radian_to_degree:()=>Ae,math_random:()=>Te,math_random_seed:()=>Ee,math_round:()=>Oe,math_selfcalcu:()=>pe,math_to_int:()=>de,math_trig:()=>ue,text_to_number:()=>Re,text_to_number_skulpt:()=>ce,turn_to_int:()=>Ce});var s={};t.r(s),t.d(s,{ascii_to_char:()=>ve,char_to_ascii:()=>Ye,number_to_text:()=>Xe,os_system:()=>oi,text:()=>De,text_capital:()=>ke,text_center:()=>He,text_char:()=>Fe,text_char_at:()=>xe,text_char_at2:()=>ye,text_char_at3:()=>ei,text_compareTo:()=>ti,text_compare_to:()=>we,text_create_with_container:()=>je,text_create_with_item:()=>$e,text_encode:()=>ni,text_equals_starts_ends:()=>Ue,text_eval:()=>si,text_find:()=>We,text_format:()=>ze,text_format_noreturn:()=>ii,text_join:()=>Pe,text_join_seq:()=>Ke,text_length:()=>be,text_random_char:()=>Ve,text_replace:()=>Je,text_split:()=>qe,text_strip:()=>Qe,text_substring:()=>Ge,text_substring2:()=>Be,text_substring3:()=>Ze,text_textarea:()=>fe});var o={};t.r(o),t.d(o,{ENUMERATE:()=>Ui,content_in_lists:()=>ki,enumerate:()=>wi,list_many_input:()=>Di,list_tolist:()=>vi,list_tolist2:()=>Gi,list_trig:()=>Ai,lists_2d_get_col_row_data:()=>ri,lists_2d_get_data_with_col_row:()=>ui,lists_append_extend:()=>hi,lists_change_to:()=>Ni,lists_change_to_general:()=>Fi,lists_clear:()=>ci,lists_create_with:()=>di,lists_create_with2:()=>Yi,lists_create_with_container:()=>Ii,lists_create_with_item:()=>Ti,lists_create_with_noreturn:()=>fi,lists_create_with_text:()=>li,lists_create_with_text2:()=>Xi,lists_del_general:()=>Pi,lists_find:()=>Si,lists_getIndex3:()=>bi,lists_getSublist3:()=>yi,lists_get_index:()=>pi,lists_get_random_item:()=>mi,lists_get_random_sublist:()=>Ei,lists_get_sublist:()=>ai,lists_insert_value:()=>Oi,lists_insert_value2:()=>Vi,lists_pop:()=>Ci,lists_remove_at:()=>gi,lists_remove_at2:()=>Bi,lists_reverse:()=>Ri,lists_setIndex3:()=>xi,lists_set_index:()=>Mi,lists_sort:()=>Li});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>_n,dicts_add_or_change:()=>ji,dicts_clear:()=>tn,dicts_create_with:()=>Wi,dicts_create_with_container:()=>Ki,dicts_create_with_item:()=>Ji,dicts_create_with_noreturn:()=>un,dicts_deldict:()=>on,dicts_delete:()=>$i,dicts_get:()=>Qi,dicts_get_default:()=>zi,dicts_items:()=>en,dicts_keys:()=>qi,dicts_length:()=>sn,dicts_pop:()=>pn,dicts_setdefault:()=>an,dicts_to_json:()=>dn,dicts_to_json2:()=>Tn,dicts_to_to:()=>In,dicts_todict:()=>rn,dicts_update:()=>Zi,dicts_values:()=>nn,json_to_dicts:()=>ln});var p={};t.r(p),t.d(p,{logic_boolean:()=>Rn,logic_compare:()=>hn,logic_compare_continous:()=>mn,logic_is:()=>Sn,logic_is_in:()=>Cn,logic_negate:()=>On,logic_null:()=>cn,logic_operation:()=>En,logic_tobool:()=>An,logic_true_or_false:()=>gn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>qn,sdcard_use_spi_init:()=>Jn,storage_can_write_ornot:()=>Xn,storage_change_dir:()=>Wn,storage_close_file:()=>yn,storage_delete_file:()=>Vn,storage_file_seek:()=>Un,storage_file_tell:()=>Gn,storage_file_write:()=>Fn,storage_fileopen:()=>Nn,storage_fileopen_new:()=>Dn,storage_fileopen_new_encoding:()=>fn,storage_get_a_line:()=>Yn,storage_get_contents:()=>vn,storage_get_contents_without_para:()=>Pn,storage_get_current_dir:()=>wn,storage_get_file_size:()=>Bn,storage_get_filename:()=>bn,storage_is_file:()=>Kn,storage_list_all_files:()=>xn,storage_make_dir:()=>kn,storage_open_file_with_os:()=>Ln,storage_rename:()=>Hn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>Zn,procedures_callreturn:()=>ts,procedures_defnoreturn:()=>Qn,procedures_defreturn:()=>zn,procedures_ifreturn:()=>es,procedures_mutatorarg:()=>$n,procedures_mutatorcontainer:()=>jn,procedures_return:()=>is});var r={};t.r(r),t.d(r,{tuple_change_to:()=>Ts,tuple_create_with:()=>ss,tuple_create_with_container:()=>os,tuple_create_with_item:()=>_s,tuple_create_with_noreturn:()=>Es,tuple_create_with_text2:()=>ps,tuple_create_with_text_return:()=>as,tuple_del:()=>ds,tuple_find:()=>Ms,tuple_getIndex:()=>us,tuple_getSublist:()=>ms,tuple_get_random_item:()=>Rs,tuple_get_sublist:()=>Os,tuple_input:()=>gs,tuple_join:()=>ls,tuple_length:()=>rs,tuple_max:()=>Is,tuple_totuple:()=>cs,tuple_trig:()=>hs});var d={};t.r(d),t.d(d,{set_add_discard:()=>vs,set_clear:()=>fs,set_create_with:()=>Ss,set_create_with_container:()=>As,set_create_with_item:()=>Ls,set_create_with_text_return:()=>bs,set_length:()=>Ns,set_operate:()=>Fs,set_operate_update:()=>Ps,set_pop:()=>Ds,set_sub:()=>Ys,set_toset:()=>ys,set_update:()=>Xs});var l={};t.r(l),t.d(l,{html_content:()=>Us,html_content_more:()=>ws,html_document:()=>Vs,html_form:()=>Hs,html_head_body:()=>Gs,html_style:()=>ks,html_style_color:()=>Ks,html_style_content:()=>Ws,html_text:()=>Js,html_title:()=>Bs});var I={};t.r(I),t.d(I,{attribute_access:()=>po,function_call:()=>so,function_call_container:()=>oo,function_call_item:()=>_o,raw_block:()=>zs,raw_empty:()=>$s,raw_expression:()=>js,raw_table:()=>Qs,text_comment:()=>Zs,text_print_multiple:()=>eo,text_print_multiple_container:()=>io,text_print_multiple_item:()=>no,type_check:()=>to});var T={};t.r(T),t.d(T,{controls_type:()=>Io,controls_typeLists:()=>To,lists_zip:()=>Mo,unpack_iterable_object:()=>ho,variables_change:()=>ro,variables_get:()=>ao,variables_global:()=>lo,variables_set:()=>uo});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>Lo,base_setup:()=>Eo,controls_delay:()=>Ao,controls_flow_statements:()=>So,controls_for:()=>co,controls_forEach:()=>Po,controls_for_range:()=>go,controls_if:()=>Oo,controls_interrupts:()=>fo,controls_lambda:()=>Yo,controls_main:()=>mo,controls_millis:()=>No,controls_nointerrupts:()=>Fo,controls_pass:()=>bo,controls_range:()=>vo,controls_repeat:()=>ko,controls_repeat_ext:()=>Vo,controls_thread:()=>yo,controls_try_finally:()=>Ro,controls_whileUntil:()=>Co,datetime_fromtimestamp:()=>Ho,do_while:()=>xo,garbage_collection:()=>Bo,gene_unique_identifier:()=>Wo,get_mem_alloc:()=>Go,get_mem_free:()=>Uo,get_unique_identifier:()=>wo,reset:()=>Do,time_sleep:()=>Xo});var h={};t.r(h),t.d(h,{base_map:()=>l_,generate_cartesian_product:()=>T_,math_arithmetic:()=>zo,math_bit:()=>Qo,math_constant:()=>Jo,math_constant_mp:()=>qo,math_constrain:()=>o_,math_dec:()=>t_,math_degree_to_radian:()=>h_,math_indexer_number:()=>a_,math_map:()=>s_,math_max_min:()=>i_,math_number:()=>Ko,math_number_base_conversion:()=>__,math_radian_to_degree:()=>M_,math_random:()=>n_,math_random_seed:()=>p_,math_round:()=>u_,math_selfcalcu:()=>jo,math_single:()=>$o,math_to_int:()=>e_,math_trig:()=>Zo,text_to_number:()=>r_,text_to_number_skulpt:()=>d_,turn_to_int:()=>I_});var m={};t.r(m),t.d(m,{ascii_to_char:()=>c_,char_to_ascii:()=>g_,number_to_text:()=>C_,os_system:()=>K_,text:()=>m_,text_capital:()=>v_,text_center:()=>Y_,text_char:()=>O_,text_char_at:()=>L_,text_char_at2:()=>A_,text_char_at3:()=>k_,text_compareTo:()=>w_,text_compare_to:()=>f_,text_encode:()=>H_,text_equals_starts_ends:()=>D_,text_eval:()=>W_,text_find:()=>X_,text_format:()=>B_,text_format_noreturn:()=>G_,text_join:()=>R_,text_join_seq:()=>b_,text_length:()=>S_,text_random_char:()=>N_,text_replace:()=>y_,text_split:()=>x_,text_strip:()=>V_,text_substring:()=>P_,text_substring2:()=>F_,text_substring3:()=>U_,text_textarea:()=>E_});var E={};t.r(E),t.d(E,{content_in_lists:()=>Lp,enumerate:()=>Ap,list_many_input:()=>lp,list_tolist:()=>Cp,list_tolist2:()=>Sp,list_trig:()=>up,lists_2d_get_col_row_data:()=>Q_,lists_2d_get_data_with_col_row:()=>q_,lists_append_extend:()=>tp,lists_change_to:()=>dp,lists_change_to_general:()=>Tp,lists_clear:()=>op,lists_create_with:()=>z_,lists_create_with2:()=>hp,lists_create_with_noreturn:()=>Ip,lists_create_with_text:()=>j_,lists_create_with_text2:()=>mp,lists_del_general:()=>Mp,lists_find:()=>_p,lists_getIndex3:()=>Ep,lists_getSublist3:()=>Op,lists_get_index:()=>$_,lists_get_random_item:()=>ep,lists_get_random_sublist:()=>ip,lists_get_sublist:()=>J_,lists_insert_value:()=>np,lists_insert_value2:()=>cp,lists_pop:()=>ap,lists_remove_at:()=>pp,lists_remove_at2:()=>gp,lists_reverse:()=>sp,lists_setIndex3:()=>Rp,lists_set_index:()=>Z_,lists_sort:()=>rp});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Bp,dicts_add_or_change:()=>Pp,dicts_clear:()=>Xp,dicts_create_with:()=>Np,dicts_create_with_noreturn:()=>wp,dicts_deldict:()=>Vp,dicts_delete:()=>vp,dicts_get:()=>fp,dicts_get_default:()=>Fp,dicts_items:()=>bp,dicts_keys:()=>Dp,dicts_length:()=>xp,dicts_pop:()=>Gp,dicts_setdefault:()=>Up,dicts_to_json:()=>Hp,dicts_to_json2:()=>Jp,dicts_to_to:()=>Kp,dicts_todict:()=>kp,dicts_update:()=>Yp,dicts_values:()=>yp,json_to_dicts:()=>Wp});var R={};t.r(R),t.d(R,{logic_boolean:()=>$p,logic_compare:()=>qp,logic_compare_continous:()=>Qp,logic_is:()=>ia,logic_is_in:()=>ea,logic_negate:()=>jp,logic_null:()=>Zp,logic_operation:()=>zp,logic_tobool:()=>na,logic_true_or_false:()=>ta});var c={};t.r(c),t.d(c,{sdcard_mount:()=>La,sdcard_use_spi_init:()=>Aa,storage_can_write_ornot:()=>la,storage_change_dir:()=>Ra,storage_close_file:()=>Ta,storage_delete_file:()=>ha,storage_file_seek:()=>Oa,storage_file_tell:()=>Ea,storage_file_write:()=>aa,storage_fileopen:()=>oa,storage_fileopen_new:()=>_a,storage_fileopen_new_encoding:()=>pa,storage_get_a_line:()=>da,storage_get_contents:()=>ra,storage_get_contents_without_para:()=>ua,storage_get_current_dir:()=>ca,storage_get_file_size:()=>ma,storage_get_filename:()=>Ia,storage_is_file:()=>Sa,storage_list_all_files:()=>Ma,storage_make_dir:()=>ga,storage_open_file_with_os:()=>sa,storage_rename:()=>Ca});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Fa,procedures_callreturn:()=>fa,procedures_defnoreturn:()=>Da,procedures_defreturn:()=>Na,procedures_ifreturn:()=>Pa,procedures_return:()=>va});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Ua,tuple_create_with:()=>Ya,tuple_create_with_noreturn:()=>Wa,tuple_create_with_text2:()=>Xa,tuple_create_with_text_return:()=>ba,tuple_del:()=>Va,tuple_find:()=>wa,tuple_getIndex:()=>ya,tuple_getSublist:()=>Ha,tuple_get_random_item:()=>Ja,tuple_get_sublist:()=>Ka,tuple_input:()=>Qa,tuple_join:()=>Ba,tuple_length:()=>xa,tuple_max:()=>Ga,tuple_totuple:()=>qa,tuple_trig:()=>ka});var S={};t.r(S),t.d(S,{set_add_discard:()=>iu,set_clear:()=>Za,set_create_with:()=>za,set_create_with_text_return:()=>ou,set_length:()=>ja,set_operate:()=>tu,set_operate_update:()=>eu,set_pop:()=>$a,set_sub:()=>nu,set_toset:()=>_u,set_update:()=>su});var A={};t.r(A),t.d(A,{html_content:()=>ru,html_content_more:()=>du,html_document:()=>pu,html_form:()=>Iu,html_head_body:()=>uu,html_style:()=>lu,html_style_content:()=>Tu,html_text:()=>Mu,html_title:()=>au});var L={};t.r(L),t.d(L,{attribute_access:()=>gu,function_call:()=>cu,raw_block:()=>hu,raw_empty:()=>Eu,raw_expression:()=>mu,raw_table:()=>Ou,type_check:()=>Ru});var N={};t.r(N),t.d(N,{PIN_init:()=>Nr,actuator_extern_get_led_bright:()=>yu,actuator_extern_get_led_state:()=>xu,actuator_extern_led_bright:()=>bu,actuator_extern_led_brightness:()=>Vu,actuator_ms32006_dcmotor:()=>Ju,actuator_ms32006_init:()=>Ku,actuator_ms32006_stepper:()=>qu,actuator_neopixel_init:()=>Qu,actuator_neopixel_rgb:()=>zu,actuator_neopixel_rgb_all:()=>ju,actuator_neopixel_rgb_show_all_chase:()=>tr,actuator_neopixel_rgb_show_all_rainbow:()=>Zu,actuator_neopixel_write:()=>$u,actuator_use_uart_init:()=>er,esp32_music_get_tempo_extern:()=>vu,esp32_music_pitch:()=>Du,esp32_music_pitch_init:()=>Nu,esp32_music_pitch_with_time:()=>fu,esp32_music_play_list:()=>Fu,esp32_music_reset_extern:()=>Yu,esp32_music_set_tempo_extern:()=>Pu,esp32_music_stop:()=>Xu,mixbot_actuator_extern_get_addr:()=>Ar,mixbot_actuator_extern_set_addr:()=>Lr,mixbot_addr_extern:()=>lr,parrot_PIN_init:()=>Pr,parrot_move_speed:()=>vr,pin_led_bright:()=>Dr,player_insert_music:()=>pr,player_play_music:()=>_r,player_set_mode:()=>or,player_set_play:()=>nr,player_set_volume:()=>sr,player_whether_stop:()=>ir,robot_led_extern:()=>hr,robot_led_extern_get_value:()=>mr,robot_motor_extern:()=>Ir,robot_motor_extern_get_speed:()=>Tr,robot_servo_extern_absolute_run:()=>cr,robot_servo_extern_get_status:()=>Er,robot_servo_extern_relative_continue:()=>Sr,robot_servo_extern_relative_origin:()=>gr,robot_servo_extern_relative_run:()=>Cr,robot_servo_extern_stop:()=>Rr,robot_servo_extern_stop_mode:()=>Or,robot_traffic_light_extern:()=>Mr,servo_PIN_init:()=>fr,servo_get_angle:()=>Hu,servo_get_speed:()=>Wu,servo_init:()=>Bu,servo_move:()=>Gu,servo_move_angle:()=>Fr,servo_set_angle:()=>wu,servo_set_speed:()=>ku,servo_speed_360:()=>Uu,syn6288_builtin_voice:()=>rr,syn6288_get_voice:()=>ur,syn6288_set_voice:()=>ar,syn6288_tts_play:()=>dr});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>rd,actuator_dc_motor_stop:()=>dd,actuator_get_led_bright:()=>xr,actuator_get_led_state:()=>Vr,actuator_led_bright:()=>yr,actuator_led_brightness:()=>Br,actuator_mixbot_buzzer_on_off:()=>hd,actuator_mixgo_nova_mic_get:()=>cd,actuator_mixgo_nova_mic_set:()=>Rd,actuator_mixgo_nova_onboard_music_pitch:()=>Nd,actuator_mixgo_nova_onboard_music_stop:()=>Dd,actuator_mixgo_nova_play_audio:()=>Ad,actuator_mixgo_nova_play_online_audio:()=>Ld,actuator_mixgo_nova_record_audio:()=>Sd,actuator_mixgo_nova_voice_get:()=>Cd,actuator_mixgo_nova_voice_set:()=>gd,actuator_mixgo_zero_led_color:()=>Gr,actuator_onboard_neopixel_rgb:()=>Kr,actuator_onboard_neopixel_rgb_all:()=>Jr,actuator_onboard_neopixel_rgb_show_all_chase:()=>Qr,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>qr,actuator_onboard_neopixel_write:()=>zr,actuator_rm_onboard_neopixel_rgb:()=>jr,actuator_rm_onboard_neopixel_rgb_all:()=>$r,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>Zr,actuator_stepper_keep:()=>ad,actuator_stepper_stop:()=>ud,analog_ble_keyboard_init:()=>Ud,analog_ble_keyboard_input:()=>Hd,analog_ble_keyboard_mouse_init:()=>$d,analog_ble_keyboard_mouse_input:()=>il,analog_ble_keyboard_mouse_send_battery:()=>el,analog_ble_keyboard_mouse_str:()=>nl,analog_ble_keyboard_send_battery:()=>Kd,analog_ble_keyboard_str:()=>Wd,analog_ble_mouse_init:()=>Jd,analog_ble_mouse_input:()=>zd,analog_ble_mouse_keyboard_input:()=>sl,analog_ble_mouse_send_battery:()=>jd,analog_keyboard_input:()=>vd,analog_keyboard_str:()=>Gd,analog_mouse_input:()=>Vd,bitbot_motor:()=>Od,bitbot_move:()=>md,bitbot_stop:()=>Ed,ble_keyboard_connect:()=>kd,ble_keyboard_get_mac:()=>wd,ble_keyboard_mouse_connect:()=>tl,ble_keyboard_mouse_get_mac:()=>Zd,ble_mouse_connect:()=>Qd,ble_mouse_get_mac:()=>qd,cc_number:()=>Wr,educore_ble_keyboard_input:()=>Tl,educore_ble_sensor_connected:()=>Il,educore_ble_sensor_init:()=>ll,educore_buzzer:()=>ol,educore_buzzer_play_tone:()=>_l,educore_buzzer_play_tone_time:()=>pl,educore_buzzer_stop:()=>al,educore_neopixel_clear:()=>dl,educore_neopixel_rgb:()=>rl,educore_rgb_light:()=>ul,esp32_music_get_tempo:()=>ed,esp32_music_reset:()=>id,esp32_music_set_tempo:()=>td,esp32_onboard_music_pitch:()=>nd,esp32_onboard_music_pitch_with_time:()=>sd,esp32_onboard_music_play_list:()=>_d,esp32_onboard_music_stop:()=>od,general_key:()=>Xd,general_key_tuple:()=>bd,generalkey_container:()=>yd,generalkey_create_with_item:()=>xd,get_keyboard_light:()=>Ml,get_power_output:()=>Fd,ledswitch:()=>br,mixbot_motor:()=>Md,mixbot_motor_status:()=>ld,mixbot_move:()=>Id,mixbot_stop:()=>Td,mouse_key:()=>Bd,number:()=>Xr,rm_actuator_get_led_bright:()=>wr,rm_actuator_get_led_state:()=>kr,rm_actuator_led_bright:()=>Ur,rm_actuator_led_brightness:()=>Hr,rm_motor:()=>pd,set_all_power_output:()=>Pd,set_power_output:()=>fd,special_key:()=>Yd});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>Ql,ai_sensor_ailocal_class:()=>Vl,ai_sensor_ailocal_class_result:()=>Bl,ai_sensor_ailocal_train:()=>xl,ai_sensor_asr_recognize:()=>Hl,ai_sensor_audio_play:()=>Ul,ai_sensor_audio_record:()=>Gl,ai_sensor_barcode:()=>Cl,ai_sensor_circle:()=>fl,ai_sensor_classifier_faces:()=>ql,ai_sensor_color:()=>Yl,ai_sensor_color_chases:()=>yl,ai_sensor_color_chases_result:()=>bl,ai_sensor_config:()=>cl,ai_sensor_face:()=>Jl,ai_sensor_find_20objects:()=>zl,ai_sensor_find_barcodes:()=>Sl,ai_sensor_find_circles:()=>Fl,ai_sensor_find_colors:()=>Xl,ai_sensor_find_licenseplates:()=>Kl,ai_sensor_find_lines:()=>Dl,ai_sensor_find_qrcodes:()=>Rl,ai_sensor_find_rects:()=>vl,ai_sensor_find_tags:()=>Ll,ai_sensor_licenseplate:()=>Wl,ai_sensor_line:()=>Nl,ai_sensor_qrcode:()=>El,ai_sensor_qrcode_lite:()=>Ol,ai_sensor_rect:()=>Pl,ai_sensor_rgb:()=>gl,ai_sensor_tag:()=>Al,ai_sensor_use_uart_init:()=>ml,ai_sensor_yolo_recognize:()=>wl,ai_sensor_yolo_recognize_result:()=>kl});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>Zl,MICROPYTHON_AI_Speech_unit:()=>$l,MICROPYTHON_AI_client:()=>jl});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>TI,mpython_blynk_app_notify:()=>pI,mpython_blynk_email:()=>rI,mpython_blynk_get_timers:()=>dI,mpython_blynk_on_connected:()=>sI,mpython_blynk_on_disconnected:()=>nI,mpython_blynk_run:()=>_I,mpython_blynk_sensor_data_to_app:()=>II,mpython_blynk_set_property:()=>uI,mpython_blynk_setup:()=>MI,mpython_blynk_stop_timers:()=>aI,mpython_blynk_sync_virtual:()=>iI,mpython_blynk_terminal_widget_vpin:()=>eI,mpython_blynktimer:()=>lI,mpython_blynktimer_run:()=>oI});var v={};t.r(v),t.d(v,{communicate_bluetooth_central_init:()=>jI,communicate_bluetooth_connect:()=>eT,communicate_bluetooth_disconnect:()=>iT,communicate_bluetooth_handle:()=>pT,communicate_bluetooth_is_connected:()=>sT,communicate_bluetooth_mac:()=>tT,communicate_bluetooth_peripheral_init:()=>$I,communicate_bluetooth_recv:()=>oT,communicate_bluetooth_recv_only:()=>_T,communicate_bluetooth_scan:()=>ZI,communicate_bluetooth_send:()=>nT,communicate_espnow_init:()=>aT,communicate_espnow_init_new:()=>uT,communicate_i2c_available:()=>YI,communicate_i2c_init:()=>OI,communicate_i2c_master_read:()=>vI,communicate_i2c_onboard:()=>mI,communicate_i2c_read:()=>RI,communicate_i2c_scan:()=>gI,communicate_i2c_write:()=>cI,communicate_ir_recv_init:()=>UI,communicate_ir_send_init:()=>KI,communicate_ow_init:()=>bI,communicate_ow_read:()=>xI,communicate_ow_reset:()=>GI,communicate_ow_scan:()=>yI,communicate_ow_select:()=>BI,communicate_ow_write:()=>VI,communicate_spi_buffer:()=>AI,communicate_spi_init:()=>CI,communicate_spi_onboard:()=>EI,communicate_spi_read:()=>LI,communicate_spi_read_output:()=>NI,communicate_spi_readinto:()=>DI,communicate_spi_readinto_output:()=>fI,communicate_spi_set:()=>SI,communicate_spi_write:()=>FI,communicate_spi_write_readinto:()=>PI,espnow_radio_channel:()=>MT,espnow_radio_channel_new:()=>mT,espnow_radio_on_off:()=>ET,espnow_radio_rec:()=>RT,espnow_radio_recv:()=>gT,espnow_radio_recv_certain_msg:()=>CT,espnow_radio_recv_certain_msg_new:()=>AT,espnow_radio_recv_msg:()=>cT,espnow_radio_recv_new:()=>ST,espnow_radio_send:()=>OT,espnow_radio_txpower:()=>hT,i2c_available:()=>JT,i2c_init:()=>YT,i2c_master_reader2:()=>KT,i2c_read:()=>XT,i2c_scan:()=>yT,i2c_slave_onreceive:()=>XI,i2c_write:()=>bT,internal_variable:()=>wI,ir_recv_timeout:()=>WI,ir_transmit_busy:()=>zI,ir_transmit_conventional_data:()=>JI,ir_transmit_raw_code:()=>QI,ir_transmit_study_code:()=>qI,ir_whether_recv:()=>HI,lora_init:()=>LT,lora_packet:()=>NT,lora_recv:()=>fT,lora_send:()=>DT,network_espnow_info:()=>dT,network_espnow_mac:()=>rT,network_espnow_recv:()=>lT,network_espnow_recv_handle:()=>TT,network_espnow_send:()=>IT,recv_fun:()=>kI,spi_buffer:()=>BT,spi_init:()=>xT,spi_read:()=>GT,spi_read_output:()=>UT,spi_readinto:()=>wT,spi_readinto_output:()=>kT,spi_set:()=>VT,spi_write:()=>HT,spi_write_readinto:()=>WT,urequests_attribute:()=>PT,urequests_get:()=>FT,urequests_method:()=>vT});var Y={};t.r(Y),t.d(Y,{display_animate:()=>AM,display_blink_rate:()=>cM,display_circle:()=>LM,display_color_seclet:()=>VM,display_draw_4strings:()=>MM,display_fill:()=>SM,display_get_screen_image:()=>RM,display_help:()=>DM,display_image_size:()=>hM,display_lcd_use_i2c_init:()=>HM,display_line:()=>EM,display_line_arbitrarily:()=>OM,display_matrix_extern_bright_point:()=>pM,display_matrix_extern_bright_screen:()=>uM,display_matrix_extern_clear:()=>rM,display_matrix_extern_get_pixel:()=>_M,display_matrix_extern_get_screen_pixel:()=>aM,display_matrix_extern_image_builtins:()=>dM,display_matrix_extern_scroll_string:()=>eM,display_matrix_extern_scroll_string_delay:()=>iM,display_matrix_extern_shift:()=>oM,display_matrix_extern_show_frame_string:()=>nM,display_matrix_extern_show_frame_string_delay:()=>sM,display_matrix_extern_show_image:()=>ZT,display_matrix_extern_show_image_or_string_delay:()=>tM,display_matrix_use_i2c_init:()=>$T,display_oled_drawPixel:()=>FM,display_oled_showBitmap:()=>fM,display_oled_use_i2c_init:()=>QM,display_onoff:()=>CM,display_rect:()=>mM,display_rgb_color:()=>gM,display_tm1650_power:()=>vM,display_tm1650_set_brightness:()=>bM,display_tm1650_show_dot:()=>XM,display_tm1650_show_num:()=>YM,display_tm_use_i2c_init:()=>PM,display_triangle:()=>NM,display_use_i2c_init:()=>TM,extern_oled_bright_point:()=>_h,extern_oled_clear:()=>ph,extern_oled_get_pixel:()=>oh,extern_oled_hvline:()=>uh,extern_oled_line:()=>rh,extern_oled_scroll_string:()=>th,extern_oled_scroll_string_delay:()=>eh,extern_oled_shape_rect:()=>ah,extern_oled_shift:()=>sh,extern_oled_show_frame_string:()=>ih,extern_oled_show_frame_string_delay:()=>nh,extern_oled_show_image:()=>zM,extern_oled_show_image_or_string_delay:()=>ZM,extern_oled_show_image_xy:()=>jM,extern_oled_show_string:()=>$M,lcd_backlight:()=>JM,lcd_clear:()=>qM,lcd_print_string:()=>KM,lcd_show_image_or_string_delay:()=>WM,matrix_extern_image_arithmetic:()=>lM,matrix_extern_image_invert:()=>IM,tft_fill:()=>wM,tft_line_arbitrarily:()=>kM,tft_scroll_string_delay:()=>GM,tft_show_frame_string_delay:()=>UM,tft_show_image_or_string_delay:()=>BM,tft_show_image_xy:()=>xM,tft_use_spi_init:()=>yM});var X={};t.r(X),t.d(X,{bitbot_display_bitmap_create:()=>nm,bitbot_display_image_create:()=>im,display_available:()=>Ph,display_bitmap_create:()=>Rh,display_bright_point:()=>Nh,display_bright_screen:()=>fh,display_clear:()=>Fh,display_get_pixel:()=>Lh,display_get_screen_pixel:()=>Dh,display_image_builtins:()=>ch,display_image_builtins_all:()=>gh,display_image_create:()=>Oh,display_scroll_string:()=>Th,display_scroll_string_delay:()=>Mh,display_shift:()=>Ah,display_show_frame_string:()=>mh,display_show_frame_string_delay:()=>Eh,display_show_image:()=>lh,display_show_image_or_string_delay:()=>Ih,draw_pointer:()=>Rm,image_arithmetic:()=>Ch,image_invert:()=>Sh,mixbot_display_bitmap_create:()=>jh,mixbot_display_bright_screen:()=>tm,mixbot_display_get_ambientbright:()=>Zh,mixbot_display_get_screen_pixel:()=>$h,mixbot_display_image_create:()=>zh,mixbot_display_rotate:()=>em,mixgo_display_bitmap_create:()=>xh,mixgo_display_image_create_new:()=>yh,mixgome_display_bitmap_create:()=>Yh,mixgome_display_font:()=>Vh,mixgome_display_image_create:()=>vh,mixgomini_display_bitmap_create:()=>bh,mixgomini_display_image_create:()=>Xh,mpython_display_hvline:()=>Jh,mpython_display_line:()=>qh,mpython_display_shape_rect:()=>Kh,mpython_pbm_image:()=>Qh,nova_draw_pointer:()=>cm,onboard_oled_bright_point:()=>Wh,onboard_oled_scroll_string_delay:()=>kh,onboard_oled_show_frame_string_delay:()=>Hh,onboard_oled_show_image:()=>Bh,onboard_oled_show_image_or_string_delay:()=>wh,onboard_oled_show_image_xy:()=>Gh,onboard_oled_show_string:()=>Uh,onboard_tft_bright_point:()=>lm,onboard_tft_bright_screen:()=>Dm,onboard_tft_clear:()=>fm,onboard_tft_clock_clear:()=>Em,onboard_tft_clock_draw:()=>mm,onboard_tft_clock_get_rtctime:()=>Mm,onboard_tft_clock_init:()=>Tm,onboard_tft_clock_set_time:()=>hm,onboard_tft_display_hvline:()=>um,onboard_tft_display_line:()=>rm,onboard_tft_display_shape_circle:()=>Om,onboard_tft_display_shape_rect:()=>am,onboard_tft_fill:()=>Im,onboard_tft_get_pixel:()=>dm,onboard_tft_get_screen_pixel:()=>Nm,onboard_tft_scroll_string:()=>Sm,onboard_tft_scroll_string_delay:()=>hh,onboard_tft_shift:()=>Lm,onboard_tft_show_frame_string:()=>Am,onboard_tft_show_frame_string_delay:()=>pm,onboard_tft_show_image:()=>Cm,onboard_tft_show_image_or_string_delay:()=>_m,onboard_tft_show_image_xy:()=>sm,onboard_tft_show_image_xy_direct:()=>om,onboard_tft_show_texts:()=>gm});var b={};t.r(b),t.d(b,{factory_block:()=>Jm,factory_block_return:()=>qm,factory_block_return_with_textarea:()=>zm,factory_block_with_textarea:()=>Qm,factory_callMethod_noreturn:()=>Wm,factory_callMethod_return:()=>Km,factory_create_with_container:()=>Um,factory_create_with_item:()=>wm,factory_declare:()=>Hm,factory_from_import:()=>Vm,factory_function_noreturn:()=>Gm,factory_function_return:()=>km,factory_import:()=>Bm,folding_block:()=>jm});var y={};t.r(y),t.d(y,{controls_pin_attachInterrupt:()=>OE,inout_analog_atten:()=>pE,inout_analog_read:()=>_E,inout_analog_read_init:()=>IE,inout_analog_write:()=>nE,inout_analog_write_init:()=>lE,inout_analog_write_set:()=>sE,inout_analog_write_set_freq:()=>hE,inout_digital_init:()=>rE,inout_digital_read:()=>eE,inout_digital_write:()=>tE,inout_highlow:()=>Zm,inout_pinMode:()=>ME,inout_pin_attachInterrupt:()=>uE,inout_pin_pressed:()=>aE,inout_pin_pressed_init:()=>TE,inout_pwm_analog_write:()=>iE,inout_pwm_analog_write_init:()=>dE,inout_pwm_analog_write_set_freq:()=>oE,pin_pressed:()=>EE,pin_pressed_init:()=>mE});var x={};t.r(x),t.d(x,{IOT_CONNECT_OLLAMA:()=>iO,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>kE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>wE,IOT_EMQX_PING:()=>GE,IOT_FORMATTING:()=>VE,IOT_FORMAT_STRING:()=>BE,IOT_MIXIO_NTP:()=>UE,IOT_MIXIO_PUBLISH:()=>PE,IOT_MIXIO_SUBSCRIBE:()=>vE,iot_checkonenet:()=>ZE,iot_client_onboard:()=>WE,iot_connect_ollama:()=>eO,iot_connect_openai:()=>nO,iot_create_with_item:()=>fE,iot_http_client:()=>KE,iot_http_data:()=>JE,iot_mixio_check:()=>bE,iot_mixio_connect:()=>FE,iot_mixio_connect_only:()=>XE,iot_mixio_disconnect:()=>YE,iot_mixio_format_msg:()=>xE,iot_mixio_format_topic:()=>yE,iot_mixly_key:()=>HE,iot_mqtt_client:()=>qE,iot_mqtt_data:()=>QE,iot_onenet_check:()=>SE,iot_onenet_connect:()=>gE,iot_onenet_disconnect:()=>CE,iot_onenet_publish:()=>LE,iot_onenet_publish_dict:()=>AE,iot_onenetconnect:()=>jE,iot_onenetdisconnect:()=>$E,iot_publish:()=>tO,iot_publish_container:()=>NE,iot_publish_item:()=>DE,iot_wifi_connect:()=>cE,iot_wificonnect:()=>zE,ollama_empty_history:()=>_O,use_ollama_llm_to_chat:()=>sO,use_ollama_llm_to_chat_return:()=>oO});var V={};t.r(V),t.d(V,{educore_mqtt_connect:()=>BO,educore_mqtt_connect_success:()=>kO,educore_mqtt_subscribe_message:()=>GO,educore_mqtt_topic_publish:()=>wO,educore_mqtt_topic_subscribe:()=>UO,educore_wifi_connect:()=>VO,network_ap_connect:()=>mO,network_connect:()=>lO,network_get_connect:()=>TO,network_get_wifi:()=>hO,network_init:()=>aO,network_is_active:()=>rO,network_open:()=>uO,network_scan:()=>dO,network_server:()=>EO,network_socket_accept:()=>CO,network_socket_bind:()=>RO,network_socket_close:()=>DO,network_socket_connect:()=>cO,network_socket_init:()=>OO,network_socket_listen:()=>gO,network_socket_receive:()=>SO,network_socket_receive_from:()=>LO,network_socket_send:()=>AO,network_socket_send_to:()=>NO,network_stop:()=>MO,network_wifi_connect:()=>IO,ntptime_address:()=>YO,ntptime_time:()=>vO,requests_attribute:()=>FO,requests_attribute2:()=>xO,requests_get:()=>fO,requests_get2:()=>bO,requests_method:()=>PO,requests_post:()=>yO});var B={};t.r(B),t.d(B,{CI130X_BROADCAST:()=>TR,CI130X_GET_THE_RECOGNIZED_CMD:()=>IR,CI130X_GET_WHETHER_IDENTIFY:()=>lR,CI130X_IDENTIFY_AND_SAVE:()=>dR,CI130X_SET_SYSTEM_CMD:()=>MR,HCSR04:()=>nc,PS2_Button:()=>pc,PS2_Buttons:()=>uc,PS2_Buttons_new:()=>Ic,PS2_State:()=>ac,PS2_init:()=>sc,PS2_init_new:()=>dc,PS2_stk:()=>rc,PS2_stk_new:()=>Tc,PS2_vibration:()=>_c,PS2_vibration_new:()=>lc,camera_sensor_init:()=>Hc,camera_sensor_result:()=>Wc,column_tube_foot:()=>zc,define_keyboards:()=>jc,educore_body_sensor:()=>Xc,educore_button_sensor_extern:()=>Vc,educore_camera_sensor:()=>kc,educore_infrared_sensor:()=>xc,educore_soilhum_sensor:()=>bc,educore_temp_sensor:()=>wc,educore_temphum_sensor:()=>yc,educore_ultrasonic_sensor:()=>Gc,esp32_s2_weather_init:()=>ZR,esp32_s2_weather_rain:()=>ec,esp32_s2_weather_wd:()=>tc,esp32_s2_weather_ws:()=>ic,extern_rfid_read:()=>BR,extern_rfid_readcontent:()=>UR,extern_rfid_readid:()=>GR,extern_rfid_status:()=>HR,extern_rfid_write:()=>wR,extern_rfid_write_return:()=>kR,get_keboards_value:()=>$c,gnss_get_data:()=>Ec,gnss_have_data:()=>mc,init_matrix_keyboard:()=>qc,interaction_whether_to_interaction:()=>uR,interaction_whether_to_interaction_SANT:()=>rR,line_tube_foot:()=>Qc,mixbot_sensor_extern_get_addr:()=>Lc,mixbot_sensor_extern_set_addr:()=>Nc,pm25_get_data:()=>hc,radar_set_DETECTION_THRESHOLD:()=>pR,radar_set_DETECTION_THRESHOLD_SANT:()=>aR,robot_button_extern_get_value:()=>Rc,robot_color_extern_get_value:()=>Ac,robot_infrared_extern_get_value:()=>gc,robot_infrared_extern_grey_get_value:()=>Cc,robot_potentiometer_extern_get_value:()=>Sc,robot_sonar_extern_get_value:()=>Dc,robot_sonar_extern_led:()=>fc,robot_touch_extern_get_value:()=>cc,sensor_APDS9960_extern:()=>mR,sensor_DS18X20:()=>sR,sensor_LTR308_extern:()=>ER,sensor_LTR390UV_extern:()=>cR,sensor_MAX30102_extern:()=>hR,sensor_QMC5883L_extern:()=>fR,sensor_VL530LX_extern:()=>gR,sensor_adxl345_get_acceleration:()=>zO,sensor_aht11_extern:()=>SR,sensor_bmp:()=>iR,sensor_compass_reset:()=>xR,sensor_dht11:()=>$O,sensor_hp203_extern:()=>AR,sensor_light_level:()=>jO,sensor_lm35:()=>oR,sensor_ltr381_extern:()=>OR,sensor_mixgo_extern_button_attachInterrupt:()=>qO,sensor_mixgo_extern_button_get_presses:()=>JO,sensor_mixgo_extern_button_is_pressed:()=>WO,sensor_mixgo_extern_button_was_pressed:()=>KO,sensor_mixgo_extern_light:()=>ZO,sensor_mixgo_extern_pin_near:()=>eR,sensor_mixgo_extern_sound:()=>tR,sensor_mixgoce_hot_wheel_degrees:()=>$R,sensor_mixgoce_hot_wheel_is_touched:()=>jR,sensor_mpu9250_attachGestureInterrupt:()=>QO,sensor_mpu9250_calibrate_compass:()=>XR,sensor_mpu9250_field_strength:()=>yR,sensor_mpu9250_gesture:()=>FR,sensor_mpu9250_get_acceleration:()=>PR,sensor_mpu9250_get_gyro:()=>YR,sensor_mpu9250_get_magnetic:()=>vR,sensor_mpu9250_temperature:()=>bR,sensor_ms5611_extern:()=>NR,sensor_ms5611_extern_altitude:()=>DR,sensor_read_humiture:()=>Bc,sensor_sht:()=>nR,sensor_shtc3_extern:()=>CR,sensor_spl06_001_extern:()=>LR,sensor_ucs12071_extern:()=>RR,sensor_use_i2c_init:()=>_R,sensor_use_spi_init:()=>VR,sensor_use_uart_init:()=>Mc,sensor_weather_solo_init:()=>Fc,sensor_weather_solo_rain:()=>Yc,sensor_weather_solo_wd:()=>Pc,sensor_weather_solo_ws:()=>vc,sensor_weigh_init:()=>Kc,tvoc_get_data:()=>Oc,ultrasonic_sensor_read_distance:()=>Uc,weather_data:()=>WR,weather_have_data:()=>KR,weather_set_label:()=>qR,weather_set_label_container:()=>QR,weather_set_label_item:()=>zR,weather_uart_mixio:()=>JR,weigh_sensor_get_weight:()=>Jc});var G={};t.r(G),t.d(G,{HCSR04:()=>Mg,RTC_set_date:()=>Tg,RTC_set_time:()=>Ig,bitbot_als_num:()=>SC,dht11:()=>PC,educore_button_sensor:()=>GC,educore_button_was_pressed:()=>UC,educore_gyroscope_sensor:()=>xC,educore_gyroscope_sensor_read:()=>VC,educore_gyroscope_sensor_shake:()=>BC,educore_light_sensor:()=>yC,educore_rfid_sensor:()=>wC,educore_rfid_sensor_scan:()=>kC,educore_rfid_sensor_scan_data:()=>HC,educore_voice_sensor:()=>XC,number1:()=>mg,number2:()=>Eg,number3:()=>Og,number4:()=>Rg,number5:()=>cg,number6:()=>gg,number7:()=>Cg,onboard_RTC_get_time:()=>Pg,onboard_RTC_get_time_str:()=>xg,onboard_RTC_get_timestamp:()=>vg,onboard_RTC_get_timetuple_to_str:()=>Vg,onboard_RTC_set_datetime:()=>bg,onboard_RTC_settime_string:()=>Xg,onboard_RTC_timestamp_totuple:()=>Yg,rfid_readcontent:()=>Wg,rfid_readid:()=>Hg,rfid_status:()=>qg,rfid_write:()=>Kg,rfid_write_return:()=>Jg,sensor_LTR308:()=>Bg,sensor_aht11:()=>Ug,sensor_bitbot_ALS:()=>CC,sensor_button_get_presses:()=>NC,sensor_button_is_pressed:()=>AC,sensor_button_was_pressed:()=>LC,sensor_distance_hrsc04:()=>lg,sensor_eulerangles:()=>zg,sensor_field_strength:()=>vC,sensor_get_acceleration:()=>Qg,sensor_get_temperature:()=>wg,sensor_get_the_coprocessor_version:()=>WC,sensor_hp203:()=>kg,sensor_light:()=>FC,sensor_mixbot_get_gyro:()=>gC,sensor_mixbot_patrol_calibrate:()=>OC,sensor_mixbot_patrol_value:()=>RC,sensor_mixbot_temperature:()=>cC,sensor_mixgo_LTR308:()=>fg,sensor_mixgo_button_attachInterrupt:()=>ng,sensor_mixgo_button_get_presses:()=>ig,sensor_mixgo_button_is_pressed:()=>tg,sensor_mixgo_button_was_pressed:()=>eg,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>pC,sensor_mixgo_cc_mmc5603_get_angle:()=>_C,sensor_mixgo_cc_mmc5603_get_magnetic:()=>oC,sensor_mixgo_light:()=>hg,sensor_mixgo_nova_LTR308:()=>Dg,sensor_mixgo_nova_pin_near:()=>Ng,sensor_mixgo_pin_near:()=>Lg,sensor_mixgo_pin_near_double:()=>Ag,sensor_mixgo_pin_near_single:()=>Sg,sensor_mixgo_pin_pressed:()=>ag,sensor_mixgo_sant_color:()=>Fg,sensor_mixgo_touch_slide:()=>dg,sensor_mixgocar42_button_attachInterrupt:()=>pg,sensor_mixgocar42_button_get_presses:()=>_g,sensor_mixgocar42_button_is_pressed:()=>sg,sensor_mixgocar42_button_was_pressed:()=>og,sensor_mixgocar_battery_left:()=>EC,sensor_mixgocar_pin_near:()=>hC,sensor_mixgocar_pin_near_line:()=>MC,sensor_mixgocar_pin_near_state_change:()=>mC,sensor_mixgoce_pin_pressed:()=>ug,sensor_mixgoce_temperature:()=>uC,sensor_mixgome_temperature:()=>aC,sensor_mpython_pin_pressed:()=>rg,sensor_mpython_qmi8658_get_gyro:()=>rC,sensor_mpython_qmi8658_temperature:()=>dC,sensor_onboard_compass_reset:()=>sC,sensor_onboard_mpu9250_calibrate_compass:()=>eC,sensor_onboard_mpu9250_field_strength:()=>nC,sensor_onboard_mpu9250_gesture:()=>jg,sensor_onboard_mpu9250_get_acceleration:()=>$g,sensor_onboard_mpu9250_get_gyro:()=>tC,sensor_onboard_mpu9250_get_magnetic:()=>Zg,sensor_onboard_mpu9250_temperature:()=>iC,sensor_pin_near:()=>fC,sensor_pin_pressed:()=>DC,sensor_read:()=>bC,sensor_rm_acc:()=>TC,sensor_rm_battery_left:()=>IC,sensor_rm_pin_near_double:()=>lC,sensor_rtc_init:()=>yg,sensor_sound:()=>Gg,sensor_temperature:()=>YC});var U={};t.r(U),t.d(U,{serial_any:()=>eS,serial_begin:()=>_S,serial_print:()=>zC,serial_print_byte:()=>QC,serial_print_hex:()=>$C,serial_println:()=>jC,serial_read_from_ai:()=>MS,serial_readline:()=>iS,serial_readstr:()=>tS,serial_readstr_until:()=>nS,serial_receive_data_event:()=>ZC,serial_send_to_ai:()=>TS,serial_softserial:()=>oS,serial_softserial_new:()=>sS,system_input:()=>pS,system_print:()=>aS,system_print_container:()=>lS,system_print_end:()=>rS,system_print_inline:()=>uS,system_print_item:()=>IS,system_print_many:()=>dS});var w={};t.r(w),t.d(w,{Panic_with_status_code:()=>OS,Timer_init:()=>vS,base_delay:()=>bS,controls_delay:()=>ES,controls_delay_new:()=>mS,controls_millis:()=>cS,controls_uname:()=>CS,raw_block:()=>gS,reset:()=>RS,system_bitbot_shutdown:()=>PS,system_machine_reset:()=>FS,system_ticks_diff:()=>LS,system_timer:()=>AS,system_timer_init:()=>NS,system_wdt_feed:()=>fS,system_wdt_init:()=>DS,time_ticks_diff:()=>XS,timer:()=>SS,timer2:()=>YS});var k={};t.r(k),t.d(k,{Air_daily_content:()=>QS,Air_now_content:()=>wS,Geo_moon_content:()=>jS,Geo_sun_content:()=>zS,Life_suggestion_content:()=>HS,Location_search_content:()=>KS,Tide_daily_content:()=>WS,WEATHER_DAILY:()=>VS,WEATHER_HOUR:()=>BS,WEATHER_NOW:()=>xS,Weather_alarm_content:()=>kS,Weather_daily:()=>JS,Weather_daily_content:()=>qS,Weather_now:()=>GS,Weather_now_content:()=>US});var H={};t.r(H),t.d(H,{PIN_init:()=>jA,actuator_extern_get_led_bright:()=>mA,actuator_extern_get_led_state:()=>EA,actuator_extern_led_bright:()=>hA,actuator_extern_led_brightness:()=>OA,actuator_ms32006_dcmotor:()=>oA,actuator_ms32006_init:()=>sA,actuator_ms32006_stepper:()=>_A,actuator_neopixel_init:()=>RA,actuator_neopixel_rgb:()=>CA,actuator_neopixel_rgb_all:()=>cA,actuator_neopixel_rgb_show_all_chase:()=>SA,actuator_neopixel_rgb_show_all_rainbow:()=>AA,actuator_neopixel_write:()=>gA,actuator_use_uart_init:()=>LA,esp32_music_get_tempo_extern:()=>lA,esp32_music_pitch:()=>aA,esp32_music_pitch_init:()=>pA,esp32_music_pitch_with_time:()=>uA,esp32_music_play_list:()=>IA,esp32_music_reset_extern:()=>TA,esp32_music_set_tempo_extern:()=>dA,esp32_music_stop:()=>rA,mixbot_actuator_extern_get_addr:()=>QA,mixbot_actuator_extern_set_addr:()=>zA,mixbot_addr_extern:()=>yA,parrot_PIN_init:()=>eL,parrot_move_speed:()=>iL,pin_led_bright:()=>$A,player_play_music:()=>PA,player_set_mode:()=>FA,player_set_play:()=>DA,player_set_volume:()=>fA,player_whether_stop:()=>NA,robot_led_extern:()=>GA,robot_led_extern_get_value:()=>UA,robot_motor_extern:()=>xA,robot_motor_extern_get_speed:()=>VA,robot_servo_extern_absolute_run:()=>WA,robot_servo_extern_get_status:()=>wA,robot_servo_extern_relative_continue:()=>qA,robot_servo_extern_relative_origin:()=>KA,robot_servo_extern_relative_run:()=>JA,robot_servo_extern_stop:()=>HA,robot_servo_extern_stop_mode:()=>kA,robot_traffic_light_extern:()=>BA,servo_PIN_init:()=>ZA,servo_get_angle:()=>iA,servo_get_speed:()=>nA,servo_init:()=>$S,servo_move:()=>MA,servo_move_angle:()=>tL,servo_set_angle:()=>tA,servo_set_speed:()=>eA,servo_speed_360:()=>ZS,syn6288_builtin_voice:()=>XA,syn6288_get_voice:()=>YA,syn6288_set_voice:()=>vA,syn6288_tts_play:()=>bA});var W={};t.r(W),t.d(W,{actuator_dc_motor:()=>FL,actuator_dc_motor_stop:()=>PL,actuator_get_led_bright:()=>IL,actuator_get_led_state:()=>TL,actuator_led_bright:()=>lL,actuator_led_brightness:()=>ML,actuator_mixbot_buzzer_on_off:()=>yL,actuator_mixgo_nova_mic_get:()=>UL,actuator_mixgo_nova_mic_set:()=>GL,actuator_mixgo_nova_onboard_music_pitch:()=>JL,actuator_mixgo_nova_onboard_music_stop:()=>qL,actuator_mixgo_nova_play_audio:()=>WL,actuator_mixgo_nova_play_online_audio:()=>KL,actuator_mixgo_nova_record_audio:()=>HL,actuator_mixgo_nova_voice_get:()=>kL,actuator_mixgo_nova_voice_set:()=>wL,actuator_mixgo_zero_led_color:()=>hL,actuator_onboard_neopixel_rgb:()=>CL,actuator_onboard_neopixel_rgb_all:()=>SL,actuator_onboard_neopixel_rgb_show_all_chase:()=>AL,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>LL,actuator_onboard_neopixel_write:()=>gL,actuator_stepper_keep:()=>DL,actuator_stepper_stop:()=>fL,analog_ble_keyboard_init:()=>oN,analog_ble_keyboard_input:()=>aN,analog_ble_keyboard_mouse_init:()=>hN,analog_ble_keyboard_mouse_input:()=>RN,analog_ble_keyboard_mouse_send_battery:()=>ON,analog_ble_keyboard_mouse_str:()=>cN,analog_ble_keyboard_send_battery:()=>rN,analog_ble_keyboard_str:()=>uN,analog_ble_mouse_init:()=>dN,analog_ble_mouse_input:()=>TN,analog_ble_mouse_keyboard_input:()=>gN,analog_ble_mouse_send_battery:()=>MN,analog_keyboard_input:()=>$L,analog_keyboard_str:()=>nN,analog_mouse_input:()=>eN,bitbot_motor:()=>BL,bitbot_move:()=>xL,bitbot_stop:()=>VL,ble_keyboard_connect:()=>pN,ble_keyboard_get_mac:()=>_N,ble_keyboard_mouse_connect:()=>EN,ble_keyboard_mouse_get_mac:()=>mN,ble_mouse_connect:()=>IN,ble_mouse_get_mac:()=>lN,cc_number:()=>mL,educore_ble_keyboard_input:()=>vN,educore_ble_sensor_connected:()=>PN,educore_ble_sensor_init:()=>FN,educore_buzzer:()=>CN,educore_buzzer_play_tone:()=>SN,educore_buzzer_play_tone_time:()=>AN,educore_buzzer_stop:()=>LN,educore_neopixel_clear:()=>fN,educore_neopixel_rgb:()=>DN,educore_rgb_light:()=>NN,esp32_music_get_tempo:()=>sL,esp32_music_reset:()=>uL,esp32_music_set_tempo:()=>nL,esp32_onboard_music_pitch:()=>oL,esp32_onboard_music_pitch_with_time:()=>_L,esp32_onboard_music_play_list:()=>aL,esp32_onboard_music_stop:()=>pL,general_key:()=>tN,general_key_tuple:()=>sN,get_keyboard_light:()=>YN,get_power_output:()=>zL,ledswitch:()=>dL,mixbot_motor:()=>bL,mixbot_motor_status:()=>vL,mixbot_move:()=>YL,mixbot_stop:()=>XL,mouse_key:()=>iN,number:()=>rL,rm_actuator_get_led_bright:()=>OL,rm_actuator_get_led_state:()=>RL,rm_actuator_led_bright:()=>EL,rm_actuator_led_brightness:()=>cL,rm_motor:()=>NL,set_all_power_output:()=>jL,set_power_output:()=>QL,special_key:()=>ZL});var K={};t.r(K),t.d(K,{ai_sensor_20object:()=>lD,ai_sensor_ailocal_class:()=>eD,ai_sensor_ailocal_class_result:()=>iD,ai_sensor_ailocal_train:()=>tD,ai_sensor_asr_recognize:()=>pD,ai_sensor_audio_play:()=>sD,ai_sensor_audio_record:()=>nD,ai_sensor_barcode:()=>GN,ai_sensor_circle:()=>KN,ai_sensor_classifier_faces:()=>dD,ai_sensor_color:()=>zN,ai_sensor_color_chases:()=>ZN,ai_sensor_color_chases_result:()=>$N,ai_sensor_config:()=>yN,ai_sensor_face:()=>rD,ai_sensor_find_20objects:()=>ID,ai_sensor_find_barcodes:()=>UN,ai_sensor_find_circles:()=>JN,ai_sensor_find_colors:()=>jN,ai_sensor_find_licenseplates:()=>uD,ai_sensor_find_lines:()=>WN,ai_sensor_find_qrcodes:()=>BN,ai_sensor_find_rects:()=>QN,ai_sensor_find_tags:()=>kN,ai_sensor_licenseplate:()=>aD,ai_sensor_line:()=>HN,ai_sensor_qrcode:()=>VN,ai_sensor_qrcode_lite:()=>bN,ai_sensor_rect:()=>qN,ai_sensor_rgb:()=>xN,ai_sensor_tag:()=>wN,ai_sensor_use_uart_init:()=>XN,ai_sensor_yolo_recognize:()=>oD,ai_sensor_yolo_recognize_result:()=>_D});var J={};t.r(J),t.d(J,{MICROPYTHON_AI_Speech_asr:()=>hD,MICROPYTHON_AI_Speech_unit:()=>MD,MICROPYTHON_AI_client:()=>TD});var q={};t.r(q),t.d(q,{mpython_blynk_app_data:()=>DD,mpython_blynk_app_notify:()=>CD,mpython_blynk_email:()=>fD,mpython_blynk_get_timers:()=>AD,mpython_blynk_on_connected:()=>RD,mpython_blynk_on_disconnected:()=>OD,mpython_blynk_run:()=>gD,mpython_blynk_sensor_data_to_app:()=>ND,mpython_blynk_set_property:()=>FD,mpython_blynk_setup:()=>PD,mpython_blynk_stop_timers:()=>SD,mpython_blynk_sync_virtual:()=>ED,mpython_blynk_terminal_widget_vpin:()=>mD,mpython_blynktimer:()=>LD,mpython_blynktimer_run:()=>cD});var Q={};t.r(Q),t.d(Q,{communicate_bluetooth_central_init:()=>If,communicate_bluetooth_connect:()=>hf,communicate_bluetooth_disconnect:()=>mf,communicate_bluetooth_handle:()=>Cf,communicate_bluetooth_is_connected:()=>Of,communicate_bluetooth_mac:()=>Ef,communicate_bluetooth_peripheral_init:()=>Tf,communicate_bluetooth_recv:()=>gf,communicate_bluetooth_recv_only:()=>cf,communicate_bluetooth_scan:()=>Mf,communicate_bluetooth_send:()=>Rf,communicate_espnow_init:()=>Sf,communicate_espnow_init_new:()=>Af,communicate_i2c_available:()=>BD,communicate_i2c_init:()=>XD,communicate_i2c_master_read:()=>VD,communicate_i2c_onboard:()=>vD,communicate_i2c_read:()=>bD,communicate_i2c_scan:()=>xD,communicate_i2c_write:()=>yD,communicate_ir_recv_init:()=>nf,communicate_ir_send_init:()=>af,communicate_ow_init:()=>zD,communicate_ow_read:()=>ZD,communicate_ow_reset:()=>$D,communicate_ow_scan:()=>jD,communicate_ow_select:()=>ef,communicate_ow_write:()=>tf,communicate_spi_buffer:()=>kD,communicate_spi_init:()=>UD,communicate_spi_onboard:()=>YD,communicate_spi_read:()=>HD,communicate_spi_read_output:()=>WD,communicate_spi_readinto:()=>KD,communicate_spi_readinto_output:()=>JD,communicate_spi_set:()=>wD,communicate_spi_write:()=>qD,communicate_spi_write_readinto:()=>QD,espnow_radio_channel:()=>Pf,espnow_radio_channel_new:()=>Yf,espnow_radio_on_off:()=>Xf,espnow_radio_rec:()=>yf,espnow_radio_recv:()=>Vf,espnow_radio_recv_certain_msg:()=>Bf,espnow_radio_recv_certain_msg_new:()=>Uf,espnow_radio_recv_msg:()=>xf,espnow_radio_recv_new:()=>Gf,espnow_radio_send:()=>bf,espnow_radio_txpower:()=>vf,i2c_slave_onreceive:()=>GD,internal_variable:()=>sf,ir_recv_timeout:()=>pf,ir_transmit_busy:()=>lf,ir_transmit_conventional_data:()=>uf,ir_transmit_raw_code:()=>df,ir_transmit_study_code:()=>rf,ir_whether_recv:()=>_f,lora_init:()=>wf,lora_packet:()=>kf,lora_recv:()=>Wf,lora_send:()=>Hf,network_espnow_info:()=>Nf,network_espnow_mac:()=>Lf,network_espnow_recv:()=>Df,network_espnow_recv_handle:()=>Ff,network_espnow_send:()=>ff,recv_fun:()=>of,urequests_attribute:()=>Jf,urequests_get:()=>Kf,urequests_method:()=>qf});var z={};t.r(z),t.d(z,{display_animate:()=>OF,display_circle:()=>RF,display_color_seclet:()=>PF,display_draw_4strings:()=>lF,display_fill:()=>EF,display_lcd_use_i2c_init:()=>xF,display_line:()=>MF,display_line_arbitrarily:()=>IF,display_matrix_extern_bright_point:()=>oF,display_matrix_extern_bright_screen:()=>pF,display_matrix_extern_clear:()=>iF,display_matrix_extern_get_pixel:()=>sF,display_matrix_extern_get_screen_pixel:()=>_F,display_matrix_extern_image_builtins:()=>aF,display_matrix_extern_scroll_string:()=>tF,display_matrix_extern_scroll_string_delay:()=>eF,display_matrix_extern_shift:()=>nF,display_matrix_extern_show_frame_string:()=>$f,display_matrix_extern_show_frame_string_delay:()=>Zf,display_matrix_extern_show_image:()=>zf,display_matrix_extern_show_image_or_string_delay:()=>jf,display_matrix_use_i2c_init:()=>Qf,display_oled_drawPixel:()=>CF,display_oled_showBitmap:()=>gF,display_oled_use_i2c_init:()=>wF,display_onoff:()=>hF,display_rect:()=>TF,display_tm1650_power:()=>AF,display_tm1650_set_brightness:()=>DF,display_tm1650_show_dot:()=>NF,display_tm1650_show_num:()=>LF,display_tm_use_i2c_init:()=>SF,display_triangle:()=>cF,display_use_i2c_init:()=>dF,extern_oled_bright_point:()=>tP,extern_oled_clear:()=>jF,extern_oled_get_pixel:()=>ZF,extern_oled_hvline:()=>iP,extern_oled_line:()=>nP,extern_oled_scroll_string:()=>QF,extern_oled_scroll_string_delay:()=>zF,extern_oled_shape_rect:()=>eP,extern_oled_shift:()=>$F,extern_oled_show_frame_string:()=>JF,extern_oled_show_frame_string_delay:()=>qF,extern_oled_show_image:()=>kF,extern_oled_show_image_or_string_delay:()=>KF,extern_oled_show_image_xy:()=>HF,extern_oled_show_string:()=>WF,image_shift:()=>mF,lcd_backlight:()=>GF,lcd_clear:()=>UF,lcd_print_string:()=>BF,lcd_show_image_or_string_delay:()=>VF,matrix_extern_image_arithmetic:()=>uF,matrix_extern_image_invert:()=>rF,tft_fill:()=>bF,tft_line_arbitrarily:()=>yF,tft_scroll_string_delay:()=>XF,tft_show_frame_string_delay:()=>YF,tft_show_image_or_string_delay:()=>vF,tft_show_image_xy:()=>FF,tft_use_spi_init:()=>fF});var j={};t.r(j),t.d(j,{bitbot_display_bitmap_create:()=>QP,bitbot_display_image_create:()=>qP,display_available:()=>hP,display_bitmap_create:()=>TP,display_bright_point:()=>cP,display_bright_screen:()=>CP,display_clear:()=>MP,display_get_pixel:()=>RP,display_get_screen_pixel:()=>gP,display_image_builtins:()=>dP,display_image_builtins_all:()=>lP,display_image_create:()=>IP,display_scroll_string:()=>aP,display_scroll_string_delay:()=>uP,display_shift:()=>OP,display_show_frame_string:()=>_P,display_show_frame_string_delay:()=>pP,display_show_image:()=>sP,display_show_image_or_string_delay:()=>oP,draw_pointer:()=>lv,image_arithmetic:()=>mP,image_invert:()=>EP,mixbot_display_bitmap_create:()=>kP,mixbot_display_bright_screen:()=>KP,mixbot_display_get_ambientbright:()=>WP,mixbot_display_get_screen_pixel:()=>HP,mixbot_display_image_create:()=>wP,mixbot_display_rotate:()=>JP,mixgo_display_bitmap_create:()=>FP,mixgo_display_image_create_new:()=>fP,mixgome_display_bitmap_create:()=>AP,mixgome_display_font:()=>DP,mixgome_display_image_create:()=>SP,mixgomini_display_bitmap_create:()=>NP,mixgomini_display_image_create:()=>LP,mpython_display_hvline:()=>GP,mpython_display_line:()=>UP,mpython_display_shape_rect:()=>BP,mpython_pbm_image:()=>PP,nova_draw_pointer:()=>Iv,onboard_oled_bright_point:()=>VP,onboard_oled_scroll_string_delay:()=>xP,onboard_oled_show_frame_string_delay:()=>yP,onboard_oled_show_image:()=>vP,onboard_oled_show_image_or_string_delay:()=>bP,onboard_oled_show_image_xy:()=>YP,onboard_oled_show_string:()=>XP,onboard_tft_bright_point:()=>sv,onboard_tft_bright_screen:()=>Ov,onboard_tft_clear:()=>Rv,onboard_tft_clock_clear:()=>rv,onboard_tft_clock_draw:()=>uv,onboard_tft_clock_get_rtctime:()=>pv,onboard_tft_clock_init:()=>_v,onboard_tft_clock_set_time:()=>av,onboard_tft_display_hvline:()=>ev,onboard_tft_display_line:()=>iv,onboard_tft_display_shape_circle:()=>dv,onboard_tft_display_shape_rect:()=>tv,onboard_tft_fill:()=>ov,onboard_tft_get_pixel:()=>nv,onboard_tft_get_screen_pixel:()=>Ev,onboard_tft_scroll_string_delay:()=>rP,onboard_tft_shift:()=>mv,onboard_tft_show_frame_string:()=>hv,onboard_tft_show_frame_string_delay:()=>ZP,onboard_tft_show_image:()=>Mv,onboard_tft_show_image_or_string_delay:()=>$P,onboard_tft_show_image_xy:()=>zP,onboard_tft_show_image_xy_direct:()=>jP,onboard_tft_show_texts:()=>Tv});var $={};t.r($),t.d($,{factory_block:()=>Dv,factory_block_return:()=>fv,factory_block_return_with_textarea:()=>Pv,factory_block_with_textarea:()=>Fv,factory_callMethod_noreturn:()=>Lv,factory_callMethod_return:()=>Nv,factory_declare:()=>Av,factory_from_import:()=>cv,factory_function_noreturn:()=>Cv,factory_function_return:()=>Sv,factory_import:()=>gv,folding_block:()=>vv});var Z={};t.r(Z),t.d(Z,{inout_analog_atten:()=>Jv,inout_analog_read:()=>Gv,inout_analog_read_init:()=>Kv,inout_analog_write:()=>xv,inout_analog_write_init:()=>Wv,inout_analog_write_set:()=>Vv,inout_digital_init:()=>kv,inout_digital_read:()=>bv,inout_digital_write:()=>Xv,inout_highlow:()=>Yv,inout_pin_attachInterrupt:()=>wv,inout_pin_pressed:()=>Uv,inout_pin_pressed_init:()=>qv,inout_pwm_analog_write:()=>yv,inout_pwm_analog_write_init:()=>Hv,inout_pwm_analog_write_set_freq:()=>Bv});var tt={};t.r(tt),t.d(tt,{IOT_CONNECT_OLLAMA:()=>gY,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>IY,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>dY,IOT_EMQX_PING:()=>TY,IOT_FORMATTING:()=>uY,IOT_FORMAT_STRING:()=>rY,IOT_MIXIO_NTP:()=>MY,IOT_MIXIO_PUBLISH:()=>iY,IOT_MIXIO_SUBSCRIBE:()=>nY,iot_client_onboard:()=>hY,iot_connect_ollama:()=>cY,iot_connect_openai:()=>CY,iot_http_client:()=>mY,iot_http_data:()=>EY,iot_mixio_check:()=>_Y,iot_mixio_connect:()=>eY,iot_mixio_connect_only:()=>oY,iot_mixio_disconnect:()=>sY,iot_mixio_format_msg:()=>aY,iot_mixio_format_topic:()=>pY,iot_mixly_key:()=>lY,iot_mqtt_client:()=>OY,iot_mqtt_data:()=>RY,iot_onenet_check:()=>Zv,iot_onenet_connect:()=>zv,iot_onenet_disconnect:()=>jv,iot_onenet_publish:()=>tY,iot_onenet_publish_dict:()=>$v,iot_wifi_connect:()=>Qv,ollama_empty_history:()=>LY,use_ollama_llm_to_chat:()=>SY,use_ollama_llm_to_chat_return:()=>AY});var et={};t.r(et),t.d(et,{educore_mqtt_connect:()=>nX,educore_mqtt_connect_success:()=>pX,educore_mqtt_subscribe_message:()=>sX,educore_mqtt_topic_publish:()=>_X,educore_mqtt_topic_subscribe:()=>oX,educore_wifi_connect:()=>iX,network_ap_connect:()=>bY,network_connect:()=>DY,network_get_connect:()=>FY,network_get_wifi:()=>XY,network_init:()=>NY,network_is_active:()=>YY,network_open:()=>vY,network_scan:()=>yY,network_server:()=>xY,network_socket_accept:()=>wY,network_socket_bind:()=>BY,network_socket_close:()=>JY,network_socket_connect:()=>GY,network_socket_init:()=>VY,network_socket_listen:()=>UY,network_socket_receive:()=>kY,network_socket_receive_from:()=>WY,network_socket_send:()=>HY,network_socket_send_to:()=>KY,network_stop:()=>PY,network_wifi_connect:()=>fY,ntptime_address:()=>$Y,ntptime_time:()=>jY,requests_attribute:()=>QY,requests_attribute2:()=>tX,requests_get:()=>qY,requests_get2:()=>ZY,requests_method:()=>zY,requests_post:()=>eX});var it={};t.r(it),t.d(it,{CI130X_BROADCAST:()=>FX,CI130X_GET_THE_RECOGNIZED_CMD:()=>fX,CI130X_GET_WHETHER_IDENTIFY:()=>DX,CI130X_IDENTIFY_AND_SAVE:()=>NX,CI130X_SET_SYSTEM_CMD:()=>PX,HCSR04:()=>ub,PS2_Button:()=>lb,PS2_Buttons:()=>Ib,PS2_Buttons_new:()=>cb,PS2_State:()=>Tb,PS2_init:()=>rb,PS2_init_new:()=>Ob,PS2_stk:()=>Mb,PS2_stk_new:()=>gb,PS2_vibration:()=>db,PS2_vibration_new:()=>Rb,RTC_get_time:()=>mb,RTC_set_date:()=>MX,RTC_set_datetime:()=>hb,RTC_set_time:()=>TX,camera_sensor_init:()=>Zb,camera_sensor_result:()=>ty,column_tube_foot:()=>sy,define_keyboards:()=>oy,educore_body_sensor:()=>kb,educore_button_sensor_extern:()=>Jb,educore_camera_sensor:()=>$b,educore_infrared_sensor:()=>Kb,educore_soilhum_sensor:()=>Hb,educore_temp_sensor:()=>jb,educore_temphum_sensor:()=>Wb,educore_ultrasonic_sensor:()=>Qb,esp32_s2_weather_init:()=>ob,esp32_s2_weather_rain:()=>pb,esp32_s2_weather_wd:()=>_b,esp32_s2_weather_ws:()=>ab,extern_rfid_read:()=>JX,extern_rfid_readcontent:()=>QX,extern_rfid_readid:()=>qX,extern_rfid_status:()=>$X,extern_rfid_write:()=>zX,extern_rfid_write_return:()=>jX,get_keboards_value:()=>py,gnss_get_data:()=>Ab,gnss_have_data:()=>Lb,init_matrix_keyboard:()=>_y,interaction_whether_to_interaction:()=>AX,interaction_whether_to_interaction_SANT:()=>LX,line_tube_foot:()=>ny,mixbot_sensor_extern_get_addr:()=>yb,mixbot_sensor_extern_set_addr:()=>xb,pm25_get_data:()=>Sb,radar_set_DETECTION_THRESHOLD:()=>CX,radar_set_DETECTION_THRESHOLD_SANT:()=>SX,robot_button_extern_get_value:()=>Db,robot_color_extern_get_value:()=>Yb,robot_infrared_extern_get_value:()=>Fb,robot_infrared_extern_grey_get_value:()=>Pb,robot_potentiometer_extern_get_value:()=>vb,robot_sonar_extern_get_value:()=>Xb,robot_sonar_extern_led:()=>bb,robot_touch_extern_get_value:()=>fb,sensor_APDS9960_extern:()=>YX,sensor_DS18X20:()=>wb,sensor_LTR308_extern:()=>XX,sensor_LTR390UV_extern:()=>UX,sensor_MAX30102_extern:()=>vX,sensor_QMC5883L_extern:()=>wX,sensor_VL530LX_extern:()=>WX,sensor_aht11_extern:()=>HX,sensor_bmp:()=>RX,sensor_dht11:()=>Eb,sensor_distance_hrsc04:()=>IX,sensor_hp203_extern:()=>bX,sensor_ltr381_extern:()=>BX,sensor_mixgo_extern_button_attachInterrupt:()=>dX,sensor_mixgo_extern_button_get_presses:()=>rX,sensor_mixgo_extern_button_is_pressed:()=>aX,sensor_mixgo_extern_button_was_pressed:()=>uX,sensor_mixgo_extern_light:()=>hX,sensor_mixgo_extern_pin_near:()=>EX,sensor_mixgo_extern_sound:()=>mX,sensor_mixgoce_hot_wheel_degrees:()=>sb,sensor_mixgoce_hot_wheel_is_touched:()=>nb,sensor_mpu9250_attachGestureInterrupt:()=>lX,sensor_ms5611_extern:()=>xX,sensor_ms5611_extern_altitude:()=>VX,sensor_read_humiture:()=>qb,sensor_rtc_init:()=>OX,sensor_sht:()=>cX,sensor_shtc3_extern:()=>kX,sensor_spl06_001_extern:()=>yX,sensor_ucs12071_extern:()=>GX,sensor_use_i2c_init:()=>gX,sensor_use_spi_init:()=>KX,sensor_use_uart_init:()=>Cb,sensor_weather_solo_init:()=>Vb,sensor_weather_solo_rain:()=>Ub,sensor_weather_solo_wd:()=>Bb,sensor_weather_solo_ws:()=>Gb,sensor_weigh_init:()=>ey,tvoc_get_data:()=>Nb,ultrasonic_sensor_read_distance:()=>zb,weather_data:()=>ZX,weather_have_data:()=>tb,weather_set_label:()=>ib,weather_uart_mixio:()=>eb,weigh_sensor_get_weight:()=>iy});var nt={};t.r(nt),t.d(nt,{HCSR04:()=>hy,bitbot_als_num:()=>Vx,dht11:()=>Kx,educore_button_sensor:()=>Zx,educore_button_was_pressed:()=>tV,educore_gyroscope_sensor:()=>zx,educore_gyroscope_sensor_read:()=>jx,educore_gyroscope_sensor_shake:()=>$x,educore_light_sensor:()=>Qx,educore_rfid_sensor:()=>eV,educore_rfid_sensor_scan:()=>iV,educore_rfid_sensor_scan_data:()=>nV,educore_voice_sensor:()=>Jx,number1:()=>my,number2:()=>Ey,number3:()=>Oy,number4:()=>Ry,number5:()=>cy,number6:()=>gy,number7:()=>Cy,onboard_RTC_get_time:()=>Tx,onboard_RTC_get_time_str:()=>mx,onboard_RTC_get_timestamp:()=>Mx,onboard_RTC_get_timetuple_to_str:()=>Ex,onboard_RTC_set_datetime:()=>lx,onboard_RTC_settime_string:()=>Ix,onboard_RTC_timestamp_totuple:()=>hx,rfid_readcontent:()=>By,rfid_readid:()=>Vy,rfid_status:()=>wy,rfid_write:()=>Gy,rfid_write_return:()=>Uy,sensor_LTR308:()=>Yy,sensor_adxl345_get_acceleration:()=>jy,sensor_aht11:()=>yy,sensor_bitbot_ALS:()=>xx,sensor_button_get_presses:()=>Ux,sensor_button_is_pressed:()=>Bx,sensor_button_was_pressed:()=>Gx,sensor_compass_reset:()=>nx,sensor_ds18x20:()=>Py,sensor_eulerangles:()=>Hy,sensor_get_acceleration:()=>ky,sensor_get_temperature:()=>xy,sensor_get_the_coprocessor_version:()=>sV,sensor_hp203:()=>by,sensor_light:()=>Wx,sensor_lm35:()=>vy,sensor_mixbot_get_gyro:()=>yx,sensor_mixbot_patrol_calibrate:()=>Yx,sensor_mixbot_patrol_value:()=>Xx,sensor_mixbot_temperature:()=>bx,sensor_mixgo_LTR308:()=>Dy,sensor_mixgo_button_attachInterrupt:()=>dy,sensor_mixgo_button_get_presses:()=>ry,sensor_mixgo_button_is_pressed:()=>ay,sensor_mixgo_button_was_pressed:()=>uy,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>cx,sensor_mixgo_cc_mmc5603_get_angle:()=>Rx,sensor_mixgo_cc_mmc5603_get_magnetic:()=>Ox,sensor_mixgo_light:()=>Hx,sensor_mixgo_nova_LTR308:()=>Fy,sensor_mixgo_nova_pin_near:()=>Ny,sensor_mixgo_pin_near:()=>Ly,sensor_mixgo_pin_near_double:()=>Ay,sensor_mixgo_pin_near_single:()=>Sy,sensor_mixgo_pin_pressed:()=>Qy,sensor_mixgo_sant_color:()=>fy,sensor_mixgo_touch_slide:()=>qy,sensor_mixgocar42_button_attachInterrupt:()=>My,sensor_mixgocar42_button_get_presses:()=>Ty,sensor_mixgocar42_button_is_pressed:()=>ly,sensor_mixgocar42_button_was_pressed:()=>Iy,sensor_mixgocar_battery_left:()=>vx,sensor_mixgocar_pin_near:()=>Fx,sensor_mixgocar_pin_near_line:()=>fx,sensor_mixgocar_pin_near_state_change:()=>Px,sensor_mixgoce_pin_pressed:()=>Jy,sensor_mixgoce_temperature:()=>Cx,sensor_mixgome_temperature:()=>gx,sensor_mpu9250_calibrate_compass:()=>tx,sensor_mpu9250_field_strength:()=>ix,sensor_mpu9250_gesture:()=>Wy,sensor_mpu9250_get_acceleration:()=>Ky,sensor_mpu9250_get_gyro:()=>Zy,sensor_mpu9250_get_magnetic:()=>$y,sensor_mpu9250_temperature:()=>ex,sensor_mpython_pin_pressed:()=>zy,sensor_mpython_qmi8658_get_gyro:()=>Sx,sensor_mpython_qmi8658_temperature:()=>Ax,sensor_onboard_compass_reset:()=>dx,sensor_onboard_mpu9250_calibrate_compass:()=>ax,sensor_onboard_mpu9250_field_strength:()=>rx,sensor_onboard_mpu9250_gesture:()=>sx,sensor_onboard_mpu9250_get_acceleration:()=>ox,sensor_onboard_mpu9250_get_gyro:()=>px,sensor_onboard_mpu9250_get_magnetic:()=>_x,sensor_onboard_mpu9250_temperature:()=>ux,sensor_pin_near:()=>kx,sensor_pin_pressed:()=>wx,sensor_read:()=>qx,sensor_rm_acc:()=>Dx,sensor_rm_battery_left:()=>Nx,sensor_rm_pin_near_double:()=>Lx,sensor_sound:()=>Xy});var st={};t.r(st),t.d(st,{serial_any:()=>uV,serial_print:()=>oV,serial_print_byte:()=>_V,serial_print_hex:()=>aV,serial_println:()=>pV,serial_read_from_ai:()=>RV,serial_readline:()=>dV,serial_readstr:()=>rV,serial_send_to_ai:()=>OV,serial_softserial:()=>lV,serial_softserial_new:()=>IV,system_input:()=>TV,system_print:()=>MV,system_print_end:()=>mV,system_print_inline:()=>hV,system_print_many:()=>EV});var ot={};t.r(ot),t.d(ot,{Panic_with_status_code:()=>vV,Timer_init:()=>JV,base_delay:()=>zV,controls_delay:()=>xV,controls_delay_new:()=>VV,controls_end_program:()=>XV,controls_millis:()=>YV,controls_uname:()=>yV,reset:()=>bV,system_bitbot_shutdown:()=>KV,system_device_name:()=>FV,system_device_serial_number:()=>PV,system_event_bus_source:()=>DV,system_event_bus_value:()=>fV,system_machine_reset:()=>WV,system_on_event:()=>AV,system_raise_event:()=>SV,system_reset:()=>gV,system_run_in_background:()=>cV,system_ticks_diff:()=>UV,system_timer:()=>GV,system_timer_init:()=>wV,system_timestamp:()=>LV,system_value:()=>NV,system_wait:()=>CV,system_wdt_feed:()=>HV,system_wdt_init:()=>kV,time_ticks_diff:()=>QV,timer:()=>BV,timer2:()=>qV});var _t={};t.r(_t),t.d(_t,{Air_daily_content:()=>uB,Air_now_content:()=>iB,Geo_moon_content:()=>dB,Geo_sun_content:()=>rB,Life_suggestion_content:()=>sB,Location_search_content:()=>_B,Tide_daily_content:()=>oB,WEATHER_DAILY:()=>$V,WEATHER_HOUR:()=>ZV,WEATHER_NOW:()=>jV,Weather_alarm_content:()=>nB,Weather_daily:()=>pB,Weather_daily_content:()=>aB,Weather_now:()=>tB,Weather_now_content:()=>eB});var pt={};t.r(pt),t.d(pt,{analog_input:()=>SB,analog_output:()=>LB,espnow_channel:()=>cB,haskylens_model:()=>gB,i2c_A_pin:()=>NB,i2c_B_pin:()=>DB,pins_analog:()=>YB,pins_analog_pin:()=>XB,pins_axis:()=>zB,pins_brightness:()=>jB,pins_builtinimg:()=>kB,pins_builtinimg_extern:()=>HB,pins_button:()=>xB,pins_dac:()=>bB,pins_dac_pin:()=>yB,pins_digital:()=>hB,pins_digital_dot:()=>oG,pins_digital_pin:()=>mB,pins_exlcdh:()=>qB,pins_exlcdv:()=>QB,pins_imglist:()=>WB,pins_input_pin:()=>EB,pins_mpython_touch:()=>RB,pins_one_more:()=>sG,pins_output_pin:()=>OB,pins_playlist:()=>KB,pins_playlist_extern:()=>JB,pins_pwm:()=>VB,pins_pwm_pin:()=>BB,pins_radio_datarate:()=>nG,pins_radio_power:()=>iG,pins_serial:()=>wB,pins_tone_notes:()=>eG,pins_touch:()=>UB,pins_touch_pin:()=>GB,pins_tts_bgmusic:()=>tG,pins_tts_builtin_music:()=>ZB,pins_tts_voice:()=>$B,pwm_input:()=>CB,pwm_output:()=>AB,spi_A_pin:()=>fB,spi_B_pin:()=>FB,spi_C_pin:()=>PB,spi_D_pin:()=>vB});var at={};t.r(at),t.d(at,{espnow_channel:()=>MG,haskylens_model:()=>hG,pins_analog:()=>lG,pins_analog_pin:()=>dG,pins_axis:()=>fG,pins_brightness:()=>vG,pins_builtinimg:()=>SG,pins_builtinimg_extern:()=>AG,pins_button:()=>pG,pins_dac:()=>OG,pins_dac_pin:()=>EG,pins_digital:()=>_G,pins_digital_dot:()=>GG,pins_digital_pin:()=>aG,pins_exlcdh:()=>FG,pins_exlcdv:()=>PG,pins_imglist:()=>LG,pins_input_pin:()=>uG,pins_interrupt:()=>gG,pins_mpython_touch:()=>mG,pins_one_more:()=>BG,pins_output_pin:()=>rG,pins_playlist:()=>NG,pins_playlist_extern:()=>DG,pins_pwm:()=>TG,pins_pwm_pin:()=>IG,pins_radio_datarate:()=>VG,pins_radio_power:()=>xG,pins_serial:()=>CG,pins_tone_notes:()=>yG,pins_touch:()=>cG,pins_touch_pin:()=>RG,pins_tts_bgmusic:()=>bG,pins_tts_builtin_music:()=>XG,pins_tts_voice:()=>YG});const ut=Blockly,rt=Mixly,dt={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(_+=n)):i=_}else i="i";return i}},lt=dt; -/** - * @license - * Visual Blocks Editor - * - * Copyright 2012 Google Inc. - * https://developers.google.com/blockly/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class It{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(ut.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(ut.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(ut.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_if_else");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(ut.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(ut.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(ut.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},vt={init:function(){this.setColour(Lt),this.appendValueInput("FROM").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.PYTHON_RANGE).appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Yt={init:function(){this.setColour(Lt),this.appendValueInput("LIST").setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(ut.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(ut.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return ut.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Xt={init:function(){this.setColour(Lt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(ut.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new ut.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(ut.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+ut.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:ut.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:ut.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},bt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(ut.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new ut.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(ut.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(ut.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(ut.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_finally");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(ut.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(ut.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},yt={init:function(){this.setColour(Lt);var t=new ut.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(ut.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:ut.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:ut.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(ut.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},xt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new ut.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(ut.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return ut.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Vt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new ut.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(ut.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return ut.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Xt.OPERATORS=[[ut.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[ut.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],yt.OPERATORS=[[ut.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[ut.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Bt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(ut.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Gt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Ut={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(ut.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},wt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},kt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(ut.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Ht={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(ut.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Wt={init:function(){this.jsonInit({message0:ut.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:Lt,tooltip:ut.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:ut.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Kt={init:function(){this.setColour(Lt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(ut.Msg.MIXLY_STAT),this.setOutput(!0)}},Jt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},qt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(ut.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},Qt={init:function(){this.appendDummyInput().appendField(ut.Msg.CONTROLS_REPEAT_TITLE_REPEAT+ut.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(ut.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new ut.FieldDropdown([[ut.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[ut.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Lt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},zt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},jt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},$t={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},Zt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET+ut.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(ut.Msg.PROCEDURES_DEFRETURN_RETURN+ut.Msg.MIXLY_GET_UNIQUE_IDEN)}},te={init:function(){this.setColour(Lt),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(ut.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},ee={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},ie=230;ut.FieldTextInput.math_number_validator=function(t){return String(t)},ut.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const ne={init:function(){this.setColour(ie),this.appendDummyInput().appendField(new ut.FieldTextInput("0",ut.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MATH_NUMBER_TOOLTIP)}},se={init:function(){this.setColour(ie);this.appendDummyInput("").appendField(ut.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new ut.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:ut.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:ut.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},oe={init:function(){this.setColour(ie);this.appendDummyInput("").appendField(ut.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new ut.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:ut.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:ut.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},_e={init:function(){this.setColour(ie),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ut.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:ut.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:ut.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:ut.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:ut.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:ut.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:ut.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:ut.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},pe={init:function(){this.setColour(ie),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ut.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:ut.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:ut.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:ut.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:ut.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:ut.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:ut.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:ut.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},ae={init:function(){this.setColour(ie),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new ut.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},ue={init:function(){this.setColour(ie),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new ut.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:ut.Msg.MATH_TRIG_TOOLTIP_SIN,COS:ut.Msg.MATH_TRIG_TOOLTIP_COS,TAN:ut.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:ut.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:ut.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:ut.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:ut.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},re={init:function(){var t=[[ut.Msg.MATH_BIN,"bin"],[ut.Msg.MATH_OCT,"oct"],[ut.Msg.MATH_HEX,"hex"]];this.setColour(ie),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new ut.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:ut.Msg.MATH_DEC_TOOLTIP_BIN,oct:ut.Msg.MATH_DEC_TOOLTIP_OCT,hex:ut.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},de={init:function(){var t=[[ut.Msg.LANG_MATH_TO_ROUND,"round"],[ut.Msg.LANG_MATH_TO_CEIL,"ceil"],[ut.Msg.LANG_MATH_TO_FLOOR,"floor"],[ut.Msg.MATH_ABS,"fabs"],[ut.Msg.MATH_SQRT,"sqrt"]];this.setColour(ie),this.appendValueInput("A").setCheck(Number).appendField(new ut.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:ut.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:ut.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:ut.Msg.MATH_SINGLE_TOOLTIP_SQ,round:ut.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:ut.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:ut.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},le={init:function(){var t=[[ut.Msg.MIXLY_MAX,"max"],[ut.Msg.MIXLY_MIN,"min"]];this.setColour(ie),this.appendValueInput("A").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(new ut.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(ut.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:ut.Msg.MIXLY_TOOLTIP_MATH_MAX,min:ut.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Ie={init:function(){var t=[[ut.Msg.MATH_TWO,"two"],[ut.Msg.MATH_EIGHT,"eight"],[ut.Msg.MATH_TEN,"ten"],[ut.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(ie),this.appendDummyInput("").appendField(ut.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new ut.FieldDropdown(t),"OP").appendField(ut.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(ut.Msg.MATH_ZHW).appendField(new ut.FieldDropdown(t),"OP2").appendField(ut.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:ut.Msg.MATH_Before_two,eight:ut.Msg.MATH_Before_eight,ten:ut.Msg.MATH_Before_ten,sixteen:ut.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:ut.Msg.MATH_Behind_two,eight:ut.Msg.MATH_Behind_eight,ten:ut.Msg.MATH_Behind_ten,sixteen:ut.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},Te={init:function(){var t=[[ut.Msg.LANG_MATH_INT,"int"],[ut.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(ie),this.setOutput(!0,Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_RANDOM).appendField(new ut.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:ut.Msg.LANG_MATH_INT,float:ut.Msg.LANG_MATH_FLOAT_RANDOM};return ut.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Me={init:function(){this.setColour(ie),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(ut.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(ut.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(ut.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(ut.Msg.MATH_CONSTRAIN_TOOLTIP)}},he={init:function(){this.setColour(ie),this.appendValueInput("NUM",Number).appendField(ut.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(ut.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(ut.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_MATH_MAP)}},me={init:function(){this.setColour(ie),this.appendDummyInput().appendField(new ut.FieldTextInput("0",ut.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(ut.Msg.MATH_NUMBER_TOOLTIP)}},Ee={init:function(){this.setColour(ie),this.appendValueInput("NUM").setCheck(Number).appendField(ut.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},Oe={init:function(){this.setColour(ie),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(ut.Msg.MATH_ROUND).appendField(ut.Msg.TEXT_KEEP),this.appendDummyInput().appendField(ut.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(ut.Msg.MATH_ROUND_NEW_TOOLTIP)}},Re={init:function(){var t=[[ut.Msg.MIXLY_TO_INT,"int"],[ut.Msg.MIXLY_TO_FLOAT,"float"],[ut.Msg.MIXLY_TO_BITES,"b"],[ut.Msg.LANG_MATH_BYTE+ut.Msg.MIXLY_TO_INT,"bti"]];this.setColour(ie),this.appendValueInput("VAR").appendField(new ut.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:ut.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:ut.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:ut.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ce={init:function(){var t=[[ut.Msg.MIXLY_TO_INT,"int"],[ut.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(ie),this.appendValueInput("VAR").appendField(new ut.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:ut.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:ut.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},ge=he,Ce={init:function(){this.setColour(ie),this.appendValueInput("VAR").appendField(ut.Msg.LANG_MATH_BYTE+ut.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},Se={init:function(){this.setColour(ie),this.itemCount_=1,this.setMutator(new ut.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(ut.Msg.MIXLY_PRODUCT+ut.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(ut.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(ut.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(ut.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const Fe={init:function(){this.setColour(Ne),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new ut.FieldTextInput("",ut.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(ut.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new ut.FieldImage(e,7,12,'"')}},Pe={init:function(){this.setColour(Ne),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(ut.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},ve={init:function(){this.setColour(Ne),this.appendValueInput("VAR").setCheck(Number).appendField(ut.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Ye={init:function(){this.setColour(Ne),this.appendValueInput("VAR").setCheck(String).appendField(ut.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Xe={init:function(){this.setColour(Ne),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},be={init:function(){this.setColour(Ne),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},ye={init:function(){this.WHERE_OPTIONS=[[ut.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[ut.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[ut.Msg.TEXT_GET_INDEX_RANDOM+1+ut.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(ut.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ne),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(ut.Msg.LISTS_GET_INDEX_GET,"MODE"),ut.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(ut.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=ut.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=ut.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=ut.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=ut.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+ut.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",ut.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:ut.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:ut.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:ut.Msg.TEXT_GET_INDEX_RANDOM};return ut.Msg.PROCEDURES_DEFRETURN_RETURN+ut.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+ut.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==ut.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),ut.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(ut.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new ut.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),ut.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},xe={init:function(){this.setHelpUrl(ut.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ne),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(ut.Msg.LISTS_GET_INDEX_GET+" "+ut.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(ut.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(ut.Msg.PROCEDURES_DEFRETURN_RETURN+ut.Msg.MIXLY_MICROBIT_TYPE_STRING+ut.Msg.LISTS_GET_INDEX_FROM_START+"n"+ut.Msg.TEXT_CHARAT2)}},Ve={init:function(){this.setHelpUrl(ut.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ne),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(ut.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(ut.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Be={init:function(){this.WHERE_OPTIONS_1=[[ut.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[ut.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[ut.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[ut.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[ut.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[ut.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(ut.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ne),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(ut.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==ut.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==ut.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),ut.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(ut.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new ut.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Ge={init:function(){this.setHelpUrl(ut.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ne),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(ut.Msg.LISTS_GET_INDEX_GET+" "+ut.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(ut.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(ut.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(ut.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},Ue={init:function(){var t=[[ut.Msg.MIXLY_EQUALS,"==="],[ut.Msg.MIXLY_STARTSWITH,"startswith"],[ut.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Ne),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new ut.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},we={init:function(){this.setColour(Ne),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(ut.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_COMPARETO_HELP)}},ke={init:function(){var t=[[ut.Msg.TEXT_UPPER,"upper"],[ut.Msg.TEXT_TITLE,"title"],[ut.Msg.TEXT_CAPITALIZE,"capitalize"],[ut.Msg.TEXT_SWAPCASE,"swapcase"],[ut.Msg.TEXT_LOWER,"lower"]];this.setColour(Ne),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new ut.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:ut.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:ut.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:ut.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:ut.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:ut.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},He={init:function(){var t=[[ut.Msg.TEXT_LJUST,"ljust"],[ut.Msg.TEXT_CENTER,"center"],[ut.Msg.TEXT_RJUST,"rjust"]];this.setColour(Ne),this.appendValueInput("VAR").appendField(new ut.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(ut.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(ut.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},We={init:function(){this.setColour(Ne),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(ut.Msg.MIXLY_MID+ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(ut.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Ke={init:function(){this.setColour(Ne),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(ut.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(ut.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Je={init:function(){this.setColour(Ne),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(ut.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(ut.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},qe={init:function(){this.setColour(Ne),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(ut.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(ut.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(ut.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},Qe={init:function(){var t=[[ut.Msg.TEXT_TRIM_BOTH,"strip"],[ut.Msg.TEXT_TRIM_LEFT,"lstrip"],[ut.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Ne),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(ut.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new ut.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(ut.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:ut.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:ut.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:ut.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},ze={init:function(){this.setColour(Ne),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new ut.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new ut.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(ut.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Ki={init:function(){this.setColour(Hi),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Ji={init:function(){this.setColour(Hi),this.appendDummyInput().appendField(ut.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},qi={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_KEYS),this.setTooltip(ut.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Qi={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(ut.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(ut.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(ut.Msg.DICTS_GET_TOOLTIP)}},zi={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(ut.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(ut.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(ut.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(ut.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},ji={init:function(){this.setColour(Hi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(ut.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(ut.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},$i={init:function(){this.setColour(Hi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(ut.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(ut.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.DICTS_DELETE_TOOLTIP)}},Zi={init:function(){this.setColour(Hi),this.appendValueInput("DICT2").setCheck("Dict").appendField(ut.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(ut.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MID),this.setTooltip(ut.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},tn={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_CLEAR),this.setTooltip(ut.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},en={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_ITEMS),this.setTooltip(ut.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},nn={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_VALUES),this.setTooltip(ut.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},sn={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_LENGTH),this.setTooltip(ut.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},on={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_DELDICT),this.setTooltip(ut.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_n={init:function(){this.MODE=[[ut.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[ut.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(ut.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(ut.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=ut.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=ut.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==ut.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new ut.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},pn={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(ut.Msg.DICTS_ADD_VALUE),this.setTooltip(ut.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},an={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(ut.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(ut.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.DICTS_SETDEFAULT_TOOLTIP)}},un={init:function(){this.setColour(Hi),this.appendDummyInput("").appendField(new ut.FieldLabel(ut.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new ut.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},rn={init:function(){this.setColour(Hi),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},dn={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_TO_JSON),this.setTooltip(ut.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},ln={init:function(){this.setColour(Hi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(ut.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},In={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Tn={init:function(){this.setColour(Hi),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_TO_JSON),this.setTooltip(ut.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Mn=210,hn={init:function(){var t=ut.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Mn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ut.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:ut.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:ut.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:ut.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:ut.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:ut.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:ut.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},mn={init:function(){var t=ut.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=ut.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Mn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ut.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new ut.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},En={init:function(){var t=[[ut.Msg.LOGIC_OPERATION_AND,"AND"],[ut.Msg.LOGIC_OPERATION_OR,"OR"],[ut.Msg.LOGIC_OPERATION_NOR,"NOR"],[ut.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Mn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new ut.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:ut.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:ut.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:ut.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:ut.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},On={init:function(){this.setColour(Mn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(ut.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(ut.Msg.LOGIC_NEGATE_TOOLTIP)}},Rn={init:function(){var t=[[ut.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[ut.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Mn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new ut.FieldDropdown(t),"BOOL"),this.setTooltip(ut.Msg.LOGIC_BOOLEAN_TOOLTIP)}},cn={init:function(){this.setColour(Mn),this.setOutput(!0),this.appendDummyInput().appendField(ut.Msg.LOGIC_NULL),this.setTooltip(ut.Msg.LOGIC_NULL_TOOLTIP)}},gn={init:function(){this.setColour(Mn),this.appendValueInput("A"),this.appendValueInput("B").appendField(ut.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(ut.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},Cn={init:function(){var t=[[ut.Msg.TEXT_APPEND_TO,"in"],[ut.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Mn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new ut.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(ut.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ut.Msg.IN)}},Sn={init:function(){var t=[[ut.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[ut.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Mn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ut.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},An={init:function(){this.setColour(Mn),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(ut.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Ln={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(ut.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Nn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=ut.Msg.MIXLY_USE,n=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=ut.Msg.MIXLY_BELONG;return i+{r:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Dn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=ut.Msg.MIXLY_USE,n=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=ut.Msg.MIXLY_BELONG,_=ut.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},fn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(ut.Msg.MIXPY_TEXT_ENCODE).appendField(new ut.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=ut.Msg.MIXLY_USE,n=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=ut.Msg.MIXLY_BELONG,_=ut.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},Fn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+ut.Msg.MIXLY_MICROBIT_TYPE_STRING+ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Pn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},vn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},Yn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(ut.Msg.MICROBIT_PYTHON_TYPE)}},Xn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(ut.Msg.HTML_FILE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},bn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},yn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},xn={init:function(){this.setColour(0),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};ut.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Vn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+ut.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Gn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},wn={init:function(){this.setColour(0),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},kn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return ut.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+ut.Msg.MIXLY_ESP32_SET+{mkdir:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(ut.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Wn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Kn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.HTML_FILE,"isfile"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return ut.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+ut.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Jn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(ut.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_SETUP+ut.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(ut.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},qn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(ut.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Qn={init:function(){var t=ut.Procedures.findLegalName("",this),e=new ut.FieldTextInput(t,ut.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new ut.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&ut.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(ut.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(ut.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(ut.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(ut.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=ut.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),ut.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{ut.Events.enable()}},mutationToDom:function(t){var e=ut.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(ut.Msg.MIXLY_AIP_ATTR).setAlign(ut.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ks={init:function(){this.setColour(xs),this.appendDummyInput().appendField(ut.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Hs={init:function(){this.setColour(xs),this.appendDummyInput().appendField(ut.Msg.HTML_FORM_CONTENT).appendField(new ut.FieldDropdown([[ut.Msg.HTML_TEXT,"text"],[ut.Msg.HTML_EMAIL,"email"],[ut.Msg.HTML_NUMBER,"number"],[ut.Msg.HTML_PASSWORD,"password"],[ut.Msg.HTML_CHECKBOX,"checkbox"],[ut.Msg.HTML_RADIOBUTTON,"radiobutton"],[ut.Msg.HTML_BUTTON,"button"],[ut.Msg.HTML_COLOUR,"colour"],[ut.Msg.HTML_DATE,"date"],[ut.Msg.HTML_LOCALTIME,"local time"],[ut.Msg.HTML_FILE,"file"],[ut.Msg.HTML_HIDDEN,"hidden"],[ut.Msg.HTML_IMAGE,"image"],[ut.Msg.HTML_MONTH,"month"],[ut.Msg.HTML_RANGE,"range"],[ut.Msg.HTML_RESET,"reset"],[ut.Msg.HTML_SEARCH,"search"],[ut.Msg.HTML_SUBMIT,"submit"],[ut.Msg.HTML_TELEPHONENUMBER,"telephone number"],[ut.Msg.HTML_TIME,"time"],[ut.Msg.HTML_URL,"url"],[ut.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(ut.Msg.HTML_NAME).appendField(new ut.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(ut.Msg.HTML_VALUE).appendField(new ut.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(ut.Msg.MIXLY_AIP_ATTR).setAlign(ut.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ws={init:function(){this.setColour(xs),this.appendDummyInput().appendField(new ut.FieldTextInput("property"),"KEY").appendField(":").appendField(new ut.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ks={init:function(){this.setColour(xs),this.appendDummyInput().appendField(new ut.FieldTextInput("property"),"KEY").appendField(":").appendField(new ut.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Js={init:function(){this.setColour(xs),this.appendDummyInput().appendField(ut.Msg.HTML_TEXT).appendField(new ut.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qs=160,Qs={init:function(){this.setColour(qs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new ut.FieldTable(""),"TEXT")}},zs={init:function(){this.setColour(qs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new ut.FieldMultilineInput(""),"TEXT")}},js={init:function(){this.setColour(qs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new ut.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},$s={init:function(){this.setColour(qs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Zs={init:function(){this.setColour(qs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new ut.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},to={init:function(){this.setColour(qs),this.appendValueInput("VALUE").appendField(ut.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},eo={init:function(){this.setColour(qs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new ut.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(ut.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=ut.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+t+", "+e+", "+i+")"},ut.isNumber(n)&&ut.isNumber(s)&&ut.isNumber(o))n=parseFloat(n),s=parseFloat(s),o=Math.abs(parseFloat(o)),0==n%1&&0==s%1&&0==o%1?(n<=s?(s++,t=0==n&&1==o?s:n+", "+s,1!=o&&(t+=", "+o)):t=n+", "+--s+", -"+o,t="range("+t+")"):(t=n",GTE:">="};const zp=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",o=e.valueToCode(this,"B",n)||"False";if("AND"==i)var _=s+" and "+o;else if("OR"==i)_=s+" or "+o;else if("NOR"==i)_="not("+s+"^"+o+")";else _=s+"^"+o;return[_,n]},jp=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},$p=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Zp=function(t,e){return["None",e.ORDER_ATOMIC]},ta=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},ea=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},ia=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},na=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},sa=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},oa=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},_a=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},pa=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},aa=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},ua=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},ra=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},da=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},la=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Ia=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},Ta=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Ma=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},ha=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ma=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ea=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Oa=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},Ra=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ca=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},ga=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Ca=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},Sa=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},Aa=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},La=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},Na=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),ut.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var o=[],_=0;_\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},au=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},uu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},ru=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},du=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},lu=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Iu=function(t,e){return'"},Tu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Mu=function(){return this.getFieldValue("TEXT")+"\n"},hu=function(t){return t.getFieldValue("TEXT")+"\n"},mu=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Eu=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Ou=function(){return""},Ru=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},cu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+u.join("\n")},Au.scrubNakedValue=function(t){return t+"\n"},Au.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},Au.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Au.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=ut.utils.string.wrap(o,Au.COMMENT_WRAP-3),n+=Au.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const Lu="#74A55B",Nu={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(ut.Msg.MIXLY_RGB_PIN_COUNT)}},Du={init:function(){this.setColour(Lu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ut.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},fu={init:function(){this.setColour(Lu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ut.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Fu={init:function(){this.setColour(Lu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(ut.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Pu={init:function(){this.setColour(Lu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(ut.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(ut.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},vu={init:function(){this.setColour(Lu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Yu={init:function(){this.setColour(Lu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_RESET)}},Xu={init:function(){this.setColour(Lu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bu={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING).appendField(ut.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},yu={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ut.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},xu={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ut.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Vu={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING).appendField(ut.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Bu={init:function(){this.setColour(Lu),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_SETUP+ut.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Gu={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_SERVO).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SERVO_MOVE)}},Uu={init:function(){this.setColour(Lu),this.appendValueInput("VAR").appendField("360°"+ut.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_SETTING+ut.Msg.blockpy_turtle_rotate+ut.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},wu={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).appendField("180°"+ut.Msg.MIXLY_SERVO).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SERVO_MOVE)}},ku={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).appendField("360°"+ut.Msg.MIXLY_SERVO).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},Hu={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).appendField("180°"+ut.Msg.MIXLY_SERVO).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Wu={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).appendField("360°"+ut.Msg.MIXLY_SERVO).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET+ut.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ku={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new ut.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(ut.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},Ju={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Direction).appendField(new ut.FieldDropdown([[ut.Msg.CLOCKWISE,"ms32006.MOT_CW"],[ut.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[ut.Msg.MOTOR_N,"ms32006.MOT_N"],[ut.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},qu={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new ut.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Direction).appendField(new ut.FieldDropdown([[ut.Msg.CLOCKWISE,"ms32006.MOT_CW"],[ut.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},Qu={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(ut.Msg.MIXLY_RGB_PIN_COUNT)}},zu={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},ju={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},$u={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_WRI)}},Zu={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.MIXLY_DURATION).appendField(ut.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},tr={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.PYTHON_RANGE_STEP).appendField(ut.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},er={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new ut.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_SETUP+ut.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new ut.FieldDropdown([["SYN6288"+ut.Msg.MIXLY_AipSpeech_synthesis,"SYN6288"],["NS9300"+ut.Msg.MIXLY_MUSIC_PLAYER,"NS9300"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ir={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_GET+ut.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_WHETHER).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_STOPPED,"0"],[ut.Msg.MIXLY_PLAYING,"1"],[ut.Msg.MIXLY_PAUSED,"2"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},nr={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_STAT).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MP3_PLAY,"1"],[ut.Msg.MIXLY_MP3_PAUSE,"2"],[ut.Msg.MIXLY_STOP,"3"],[ut.Msg.MIXLY_MP3_PREV,"4"],[ut.Msg.MIXLY_MP3_NEXT,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sr={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendValueInput("volume").appendField(ut.Msg.MIXLY_MP3_VOL+ut.Msg.MIXLY_STAT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_PLAYER_SET_VOLUME_TOOLTIP)}},or={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MODE+ut.Msg.MIXLY_STAT).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MP3_LOOP_ALL,"0"],[ut.Msg.MIXLY_MP3_LOOP_ONE,"1"],[ut.Msg.MIXLY_PLAYER_DIRECTORY_LOOP,"2"],[ut.Msg.MIXLY_MP3_LOOP_RAM,"3"],[ut.Msg.MIXLY_PLAYER_SINGLE_STOP,"4"],[ut.Msg.MIXLY_PLAYER_SEQUENTIAL_PLAY,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_r={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_START_MELODY,"play"],[ut.Msg.MIXLY_PLAYER_INSERT_MUSIC,"insert"]]),"key"),this.appendValueInput("song"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_PLAYER_PLAY_MUSIC_TOOTIP)}},pr={},ar={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(ut.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},ur={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},rr={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(ut.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(ut.Msg.MIXLY_PROGRAM_BLOCK).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},dr={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(ut.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(ut.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(ut.Msg.MIXLY_PROGRAM_BLOCK).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},lr={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Ir={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_MOTOR).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Tr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_MOTOR).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_GET+ut.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Mr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_TRAFFIC_LIGHT).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.LISTS_SET_INDEX_SET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[ut.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[ut.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[ut.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[ut.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[ut.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[ut.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},hr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN).appendField(new ut.FieldDropdown([[ut.Msg.COLOUR_RGB_WHITE,"W"],[ut.Msg.COLOUR_RGB_RED,"R"],[ut.Msg.COLOUR_RGB_YELLOW,"Y"],[ut.Msg.COLOUR_RGB_GREEN,"G"],[ut.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},mr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN).appendField(new ut.FieldDropdown([[ut.Msg.COLOUR_RGB_WHITE,"W"],[ut.Msg.COLOUR_RGB_RED,"R"],[ut.Msg.COLOUR_RGB_YELLOW,"Y"],[ut.Msg.COLOUR_RGB_GREEN,"G"],[ut.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET+ut.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Er={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_SERVO_MOTOR).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[ut.Msg.MIXLY_SPEED,"[1]"],[ut.Msg.MATH_SINGLE_OP_ABSOLUTE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[ut.Msg.MIXLY_RELATIVE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[ut.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[ut.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[ut.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Or={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_SERVO_MOTOR).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[ut.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[ut.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Rr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_SERVO_MOTOR).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_SERVO_MOTOR).appendField(ut.Msg.MATH_SINGLE_OP_ABSOLUTE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+ut.Msg.MSG.run).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MODE).setAlign(ut.inputs.Align.RIGHT).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_SPEED+ut.Msg.MIXLY_MODE,"0"],[ut.Msg.MIXLY_MICROBIT_JS_BLE_POWER+ut.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(ut.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(ut.inputs.Align.RIGHT).appendField(new ut.FieldDropdown([[ut.Msg.CLOCKWISE,"0"],[ut.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[ut.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},gr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_SERVO_MOTOR).appendField(ut.Msg.MIXLY_RELATIVE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+ut.Msg.MSG.run).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Cr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_SERVO_MOTOR).appendField(ut.Msg.MIXLY_RELATIVE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+ut.Msg.MSG.run).appendField("("+ut.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MODE).setAlign(ut.inputs.Align.RIGHT).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_SPEED+ut.Msg.MIXLY_MODE,"0"],[ut.Msg.MIXLY_MICROBIT_JS_BLE_POWER+ut.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(ut.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},Sr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_SERVO_MOTOR).appendField(ut.Msg.MIXLY_RELATIVE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+ut.Msg.MSG.run).appendField("("+ut.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MODE).setAlign(ut.inputs.Align.RIGHT).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_SPEED+ut.Msg.MIXLY_MODE,"0"],[ut.Msg.MIXLY_MICROBIT_JS_BLE_POWER+ut.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(ut.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(ut.inputs.Align.RIGHT).appendField(new ut.FieldDropdown([[ut.Msg.CLOCKWISE,"0"],[ut.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ar={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.MIXBOT).appendField(ut.Msg.ME_GO_MOTOR_EXTERN).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MOTOR,"ext_motor"],[ut.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[ut.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[ut.Msg.COLOUR_RGB_RED+"LED","R_LED"],[ut.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[ut.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[ut.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[ut.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},Lr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.MIXBOT).appendField(ut.Msg.ME_GO_MOTOR_EXTERN).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MOTOR,"ext_motor"],[ut.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[ut.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[ut.Msg.COLOUR_RGB_RED+"LED","R_LED"],[ut.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[ut.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[ut.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[ut.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Nr={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_SETUP+ut.Msg.MIXLY_AT).appendField(ut.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Dr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING),this.appendValueInput("pin").appendField("LED"),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fr={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_SERVO+ut.Msg.MIXLY_SETUP+ut.Msg.MIXLY_AT).appendField(ut.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Fr={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_SERVO),this.appendValueInput("angle").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_DISPLAY_MATRIX_ROTATE),this.appendDummyInput().appendField(ut.Msg.DRAW_POINTER_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pr={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_MOTOR+ut.Msg.MIXLY_SETUP+ut.Msg.MIXLY_AT).appendField(ut.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},vr={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MOTOR),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+ut.Msg.MIXLY_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yr="#6C9858",Xr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(new ut.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},br={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_ESP32_ON,"1"],[ut.Msg.MIXLY_ESP32_OFF,"0"],[ut.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},yr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(ut.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_SETONOFF)}},xr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(ut.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(ut.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_GETONOFF)}},Vr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(ut.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(ut.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_GETONOFF)}},Br={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(ut.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_SETTING+ut.Msg.MIXLY_BUILDIN_LED+ut.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},Gr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(ut.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(ut.Msg.MIXLY_LCD_SETCOLOR).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LIGHT_RED,"1"],[ut.Msg.MIXLY_LIGHT_GREEN,"2"],[ut.Msg.MIXLY_LIGHT_BLUE,"3"],[ut.Msg.MIXLY_LIGHT_YELLOW,"4"],[ut.Msg.MIXLY_LIGHT_CYAN,"5"],[ut.Msg.MIXLY_LIGHT_PURPLE,"6"],[ut.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Ur={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING).appendField(ut.Msg.MIXLY_BUILDIN_LED).appendField(new ut.FieldDropdown([[ut.Msg.COLOUR_RGB_RED,"r"],[ut.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_SETONOFF)}},wr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ut.Msg.MIXLY_BUILDIN_LED).appendField(new ut.FieldDropdown([[ut.Msg.COLOUR_RGB_RED,"r"],[ut.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(ut.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_GETONOFF)}},kr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ut.Msg.MIXLY_BUILDIN_LED).appendField(new ut.FieldDropdown([[ut.Msg.COLOUR_RGB_RED,"r"],[ut.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(ut.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_GETONOFF)}},Hr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING).appendField(ut.Msg.MIXLY_BUILDIN_LED).appendField(new ut.FieldDropdown([[ut.Msg.COLOUR_RGB_RED,"r"],[ut.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_SETTING+ut.Msg.MIXLY_BUILDIN_LED+ut.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},Wr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(new ut.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},Kr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(rt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(ut.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(ut.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(ut.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},Jr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},qr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.MIXLY_DURATION).appendField(ut.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Qr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(ut.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.PYTHON_RANGE_STEP).appendField(ut.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},zr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_WRI)}},jr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(rt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(ut.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(ut.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(ut.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},$r={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Zr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(ut.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.PYTHON_RANGE_STEP).appendField(ut.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},td={init:function(){this.setColour(Yr),this.appendValueInput("TICKS").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(ut.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(ut.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},ed={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},id={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_RESET)}},nd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ut.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},sd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ut.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},od={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_d={init:function(){this.setColour(Yr),this.appendValueInput("LIST").appendField(ut.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},pd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MOTOR_DC).appendField(new ut.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Direction).appendField(new ut.FieldDropdown([[ut.Msg.CLOCKWISE,"CW"],[ut.Msg.ANTI_CLOCKWISE,"CCW"],[ut.Msg.MOTOR_P,"P"],[ut.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ad={init:function(){this.setColour(Yr),this.appendDummyInput().appendField("MixGo Car").appendField(new ut.FieldDropdown([[ut.Msg.blockpy_forward,"F"],[ut.Msg.blockpy_backward,"B"],[ut.Msg.blockpy_left,"L"],[ut.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ud={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField("MixGo Car").appendField(new ut.FieldDropdown([[ut.Msg.MOTOR_P,"P"],[ut.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},rd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MOTOR_DC).appendField(new ut.FieldDropdown([[ut.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[ut.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Direction).appendField(new ut.FieldDropdown([[ut.Msg.CLOCKWISE,"CW"],[ut.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},dd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MOTOR_DC).appendField(new ut.FieldDropdown([[ut.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[ut.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(ut.Msg.MIXLY_STOP).appendField(new ut.FieldDropdown([[ut.Msg.MOTOR_P,"P"],[ut.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ld={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Id={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXBOT).appendField(new ut.FieldDropdown([[ut.Msg.blockpy_forward,"F"],[ut.Msg.blockpy_backward,"B"],[ut.Msg.blockpy_left,"L"],[ut.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[ut.Msg.MIXLY_SPEED,"SPEED"],[ut.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Td={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXBOT).appendField(new ut.FieldDropdown([[ut.Msg.MOTOR_P,"P"],[ut.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Md={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXBOT).appendField(ut.Msg.MIXLY_MOTOR).appendField(new ut.FieldDropdown([[ut.Msg.TEXT_TRIM_LEFT,"1"],[ut.Msg.TEXT_TRIM_RIGHT,"2"],[ut.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[ut.Msg.MIXLY_SPEED,"SPEED"],[ut.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},hd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[ut.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},md={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.BITBOT).appendField(new ut.FieldDropdown([[ut.Msg.blockpy_forward,"F"],[ut.Msg.blockpy_backward,"B"],[ut.Msg.blockpy_left,"L"],[ut.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ed={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.BITBOT).appendField(new ut.FieldDropdown([[ut.Msg.MOTOR_P,"P"],[ut.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Od={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.BITBOT).appendField(ut.Msg.MIXLY_MOTOR).appendField(new ut.FieldDropdown([[ut.Msg.TEXT_TRIM_LEFT,"0"],[ut.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Direction).appendField(new ut.FieldDropdown([[ut.Msg.CLOCKWISE,"CW"],[ut.Msg.ANTI_CLOCKWISE,"CCW"],[ut.Msg.MOTOR_P,"P"],[ut.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Rd={init:function(){this.setColour(Yr),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_SETONOFF)}},cd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_GETONOFF)}},gd={init:function(){this.setColour(Yr),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_SETTING+ut.Msg.MIXLY_MIXBOT_BUZZER+ut.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_SETONOFF)}},Cd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET+ut.Msg.MIXLY_MIXBOT_BUZZER+ut.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_GETONOFF)}},Sd={init:function(){this.setColour(Yr),this.appendValueInput("PATH").appendField(ut.Msg.MIXLY_RECORD_AUDIO).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(ut.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Ad={init:function(){this.setColour(Yr),this.appendValueInput("PATH").appendField(ut.Msg.MIXLY_PLAY_AUDIO).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Ld={init:function(){this.setColour(Yr),this.appendValueInput("PATH").appendField(ut.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Nd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ut.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Dd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},fd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.LISTS_SET_INDEX_SET+ut.Msg.ME_GO_MOTOR_EXTERN).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([["1","1"],["2","2"],["3","3"],["4","4"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.blynk_IOT_IR_POWER+ut.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Fd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET+ut.Msg.ME_GO_MOTOR_EXTERN).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.blynk_IOT_IR_POWER+ut.Msg.MIXLY_PINMODEOUT+ut.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Pd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.LISTS_SET_INDEX_SET+ut.Msg.ME_GO_MOTOR_EXTERN).appendField(ut.Msg.MIXLY_ALL+ut.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(ut.ALIGN_RIGHT).appendField(ut.Msg.blynk_IOT_IR_POWER+ut.Msg.MIXLY_PINMODEOUT+ut.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},vd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.ANALOG+ut.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(ut.Msg.MIXLY_RELEASE).appendField(new ut.FieldDropdown([[ut.Msg.MICROPYTHON_DISPLAY_YES,"True"],[ut.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.ANALOG+ut.Msg.MIXLY_KEYBOARD_INPUT)}},Yd={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_SPECIAL_KEY).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[ut.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[ut.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[ut.Msg.MIXLY_SPECIAL_KEY4,"0x04"],[ut.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[ut.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[ut.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[ut.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[ut.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},Xd={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_GENERAL_KEY).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_SPECIAL_KEY0,"0x00"],["A","0x04"],["B","0x05"],["C","0x06"],["D","0x07"],["E","0x08"],["F","0x09"],["G","0x0A"],["H","0x0B"],["I","0x0C"],["J","0x0D"],["K","0x0E"],["L","0x0F"],["M","0x10"],["N","0x11"],["O","0x12"],["P","0x13"],["Q","0x14"],["R","0x15"],["S","0x16"],["T","0x17"],["U","0x18"],["V","0x19"],["W","0x1A"],["X","0x1B"],["Y","0x1C"],["Z","0x1D"],["1 !","0x1E"],["2 @","0x1F"],["3 #","0x20"],["4 $","0x21"],["5 %","0x22"],["6 ^","0x23"],["7 &","0x24"],["8 *","0x25"],["9 (","0x26"],["0 )","0x27"],["ENTER","0x28"],["ESC","0x29"],["BACKSPACE","0x2A"],["TAB","0x2B"],["SPACE","0x2C"],["- _","0x2D"],["= +","0x2E"],["[ {","0x2F"],["] }","0x30"],["\\ |","0x31"],["; :","0x33"],["' \"","0x34"],["` ~","0x35"],[", <","0x36"],[". >","0x37"],["/ ?","0x38"],["CAPS_LOCK","0x39"],["F1","0x3A"],["F2","0x3B"],["F3","0x3C"],["F4","0x3D"],["F5","0x3E"],["F6","0x3F"],["F7","0x40"],["F8","0x41"],["F9","0x42"],["F10","0x43"],["F11","0x44"],["F12","0x45"],["PRINTSCREEN","0x46"],["SCROLL_LOCK","0x47"],["PAUSE","0x48"],["INSERT","0x49"],["HOME","0x4A"],["PAGE_UP","0x4B"],["DELETE","0x4C"],["END","0x4D"],["PAGE_DOWN","0x4E"],["RIGHT","0x4F"],["LEFT","0x50"],["DOWN","0x51"],["UP","0x52"],["NUM_LOCK","0x53"],["/","0x54"],["*","0x55"],["-","0x56"],["+","0x57"],["ENTER","0x58"],["1","0x59"],["2","0x5A"],["3","0x5B"],["4","0x5C"],["5","0x5D"],["6","0x5E"],["7","0x5F"],["8","0x60"],["9","0x61"],["0","0x62"],[".","0x63"]]),"op"),this.setOutput(!0)}},bd={init:function(){this.setColour(Yr),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new ut.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(ut.Msg.GENERALKEY_TUPLE_CREATE_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("generalkey_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;nnew Array(32).fill(0)))},ch={init:function(){this.jsonInit({colour:dh,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:ut.Msg.MIXLY_MICROBIT_Built_in_image1,message0:ut.Msg.MIXLY_MICROBIT_Built_in_image})}},gh={init:function(){this.setColour(dh),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new ut.FieldDropdown(rt.Profile.default.builtinimg),"image"),this.setOutput(!0,["esp32_image","List"])}},Ch={init:function(){this.setColour(dh),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(ut.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new ut.FieldDropdown(Ch.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":ut.Msg.MIXLY_MICROBIT_image_add,"-":ut.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[ut.Msg.MICROBIT_DISPLAY_UNION,"add"],[ut.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Sh={init:function(){this.setColour(dh),this.appendValueInput("A").setCheck("esp32_image").appendField(ut.Msg.MIXLY_MICROBIT_Invert_image1),this.setInputsInline(!0),this.setOutput(!0,"esp32_image")}},Ah={init:function(){this.setColour(dh),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(ut.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(ut.Msg.DISPLAY_IMAGE_LET2).appendField(new ut.FieldDropdown(Ah.OPERATORS),"OP"),this.appendValueInput("val").appendField(ut.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(ut.Msg.DISPLAY_IMAGE_UNIT);rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(ut.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=ut.Msg.DISPLAY_IMAGE_LET,n=ut.Msg.DISPLAY_IMAGE_LET2,s=ut.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:ut.Msg.MIXLY_UP,shift_down:ut.Msg.MIXLY_DOWN,shift_left:ut.Msg.MIXLY_LEFT,shift_right:ut.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[ut.Msg.MIXLY_UP,"shift_up"],[ut.Msg.MIXLY_DOWN,"shift_down"],[ut.Msg.MIXLY_LEFT,"shift_left"],[ut.Msg.MIXLY_RIGHT,"shift_right"]]},Lh={init:function(){this.setColour(dh),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},Nh={init:function(){this.setColour(dh),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Dh={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},fh={init:function(){this.setColour(dh),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},Fh={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Clear_display);rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(ut.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Clear_display)}},Ph={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.MIXLY_SHOW+ut.Msg.MIXLY_DISPLAY_MATRIX_WRITE_NOW),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<8;i++)e.appendField(new ut.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Yh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(ut.inputs.Align.CENTRE).appendField(new ut.FieldBitmap(Yh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},Xh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new ut.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},bh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(ut.inputs.Align.CENTRE).appendField(new ut.FieldBitmap(bh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},yh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<16;i++)e.appendField(new ut.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,"esp32_image"),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},xh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(ut.inputs.Align.CENTRE).appendField(new ut.FieldBitmap(xh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},Vh={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.OLED_SET_FONT).appendField(new ut.FieldDropdown(Vh.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+ut.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+ut.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+ut.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Bh={init:function(){this.setColour(dh),this.appendValueInput("data").appendField(ut.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.OLED_BITMAP_OR_STRING)}},Gh={init:function(){this.setColour(dh),this.appendValueInput("data").appendField(ut.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.OLED_BITMAP_OR_STRING)}},Uh={init:function(){this.setColour(dh),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(ut.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.OLED_BITMAP_OR_STRING)}},wh={init:function(){this.setColour(dh),this.appendValueInput("data").setCheck(String).appendField(ut.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(ut.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(ut.Msg.TEXT_CENTER).appendField(new ut.FieldDropdown([[ut.Msg.MICROPYTHON_DISPLAY_YES,"True"],[ut.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},kh={init:function(){this.setColour(dh),this.appendValueInput("data").setCheck(String).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(ut.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},Hh={init:function(){this.setColour(dh),this.appendValueInput("data").setCheck(String).appendField(ut.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Wh={init:function(){this.setColour(dh),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Kh={init:function(){this.jsonInit({colour:dh,args0:[{name:"state",options:[[ut.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[ut.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"shape",options:[[ut.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[ut.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"}],inputsInline:!0,helpUrl:ut.Msg.mpython_HELPURL,tooltip:ut.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:ut.Msg.MPYTHON_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Jh={init:function(){this.jsonInit({colour:dh,args0:[{name:"state",options:[[ut.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[ut.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"dir_h_v",options:[[ut.Msg.mpython_vertical,"0"],[ut.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"}],inputsInline:!0,helpUrl:ut.Msg.mpython_HELPURL,tooltip:ut.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:ut.Msg.MPYTHON_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},qh={init:function(){this.jsonInit({colour:dh,args0:[{name:"state",options:[[ut.Msg.mpython_display_hline_1,"1"],[ut.Msg.mpython_display_hline_0,"0"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"}],inputsInline:!0,helpUrl:ut.Msg.mpython_HELPURL,tooltip:ut.Msg.mpython_display_line_TOOLTIP,message0:ut.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},Qh={init:function(){this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new ut.FieldDropdown(Qh.IMAGES),"path"),this.setColour(dh),this.setOutput(!0)},IMAGES:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]]},zh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<5;i++)e.appendField(new ut.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},jh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(ut.inputs.Align.CENTRE).appendField(new ut.FieldBitmap(jh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},$h={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Zh={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_AMBIENTBRIGHT),this.setInputsInline(!0),this.setOutput(!0,Number)}},tm={init:function(){this.setColour(dh),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},em={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new ut.FieldDropdown(em.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[ut.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[ut.Msg.CLOCKWISE+"90"+ut.Msg.blockpy_setheading_degree,"1"],[ut.Msg.CLOCKWISE+"180"+ut.Msg.blockpy_setheading_degree,"2"],[ut.Msg.CLOCKWISE+"270"+ut.Msg.blockpy_setheading_degree,"3"]]},im={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<12;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new ut.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},nm={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(ut.inputs.Align.CENTRE).appendField(new ut.FieldBitmap(nm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},sm={init:function(){this.setColour(dh),this.appendValueInput("data").appendField(ut.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(ut.Msg.HTML_COLOUR);rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(ut.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},om={init:function(){this.setColour(dh),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.OLED_BITMAP).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("direct").setCheck(String).appendField(ut.Msg.MIXLY_AipImageClassify_Image+ut.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},_m={init:function(){this.setColour(dh),this.appendValueInput("data").setCheck(String).appendField(ut.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(ut.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(ut.Msg.TEXT_CENTER).appendField(new ut.FieldDropdown([[ut.Msg.MICROPYTHON_DISPLAY_YES,"True"],[ut.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.appendValueInput("VAR").appendField(ut.Msg.HTML_COLOUR);rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(ut.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},pm={init:function(){this.setColour(dh),this.appendValueInput("data").setCheck(String).appendField(ut.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.appendValueInput("VAR").appendField(ut.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},am={init:function(){this.jsonInit({colour:dh,args0:[{name:"shape",options:[[ut.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[ut.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:ut.Msg.mpython_HELPURL,tooltip:ut.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:ut.Msg.ONBOARD_TFT_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},um={init:function(){this.jsonInit({colour:dh,args0:[{name:"dir_h_v",options:[[ut.Msg.mpython_vertical,"0"],[ut.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:ut.Msg.mpython_HELPURL,tooltip:ut.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:ut.Msg.ONBOARD_TFT_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},rm={init:function(){this.jsonInit({colour:dh,args0:[{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:ut.Msg.mpython_HELPURL,tooltip:ut.Msg.mpython_display_line_TOOLTIP,message0:ut.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},dm={init:function(){this.setColour(dh),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(ut.Msg.HTML_COLOUR),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},lm={init:function(){this.setColour(dh),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.MIXLY_LCD_SETCOLOR).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("VAR").appendField(ut.Msg.HTML_COLOUR);rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(ut.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Im={init:function(){this.setColour(dh),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_SCREEN_FILL);rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(ut.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Tm={init:function(){this.setColour(dh),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_INIT_CLOCK),this.appendDummyInput().appendField(ut.Msg.MIXLY_CENTER_POS),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.OLED_CIRCLE_RADIUS),this.appendValueInput("VAR").appendField(ut.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Mm={init:function(){this.setColour(dh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(ut.Msg.GET_RTCTIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},hm={init:function(){this.setColour(dh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(ut.Msg.SET_TIME),this.appendValueInput("h").setCheck(Number).appendField(ut.Msg.MIXLY_HOUR),this.appendValueInput("m").setCheck(Number).appendField(ut.Msg.MIXLY_MINUTE),this.appendValueInput("s").setCheck(Number).appendField(ut.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},mm={init:function(){this.setColour(dh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(ut.Msg.DRAW_CLOCK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Em={init:function(){this.setColour(dh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(ut.Msg.CLEAR_CLOCK),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_STM32_TFT_BACKGROUND_COLOR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Om={init:function(){this.jsonInit({colour:dh,args0:[{name:"shape",options:[[ut.Msg.MPYTHON_DISPLAY_HOLLOW,"False"],[ut.Msg.MPYTHON_DISPLAY_SOLID,"True"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"r",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:ut.Msg.mpython_HELPURL,message0:ut.Msg.ONBOARD_TFT_DISPLAY_SHAPE_CIRCLE_MESSAGE0,nextStatement:null,previousStatement:null})}},Rm={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.DRAW_POINTER).appendField(ut.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(ut.Msg.MIXLY_DRAW_POINTER_DU),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.DRAW_POINTER_TOOLTIP)}},cm={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.DRAW_POINTER).appendField(ut.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(ut.Msg.MIXLY_DRAW_POINTER_DU),this.appendValueInput("VAR").appendField(ut.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.DRAW_POINTER_TOOLTIP)}},gm={init:function(){this.setColour(dh),this.appendValueInput("data").appendField(ut.Msg.MIXLY_Display_long_text),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(ut.Msg.HTML_COLOUR);rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(ut.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Cm={init:function(){this.setColour(dh),this.appendValueInput("data").appendField(ut.Msg.OLED_BITMAP),this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.OLED_BITMAP_OR_STRING),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Sm={init:function(){Th.init.call(this),this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Am={init:function(){mh.init.call(this),this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Lm={init:function(){Ah.init.call(this),this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Nm={init:function(){Dh.init.call(this),this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Dm={init:function(){fh.init.call(this),this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},fm={init:function(){Fh.init.call(this),this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Fm=180,Pm={init:function(){this.setColour(Fm),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(ut.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(ut.Msg.DISPLAY_IMAGE_LET2).appendField(new ut.FieldDropdown(Pm.OPERATORS),"OP"),this.appendValueInput("val").appendField(ut.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(ut.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=ut.Msg.DISPLAY_IMAGE_LET,n=ut.Msg.DISPLAY_IMAGE_LET2,s=ut.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:ut.Msg.MIXLY_UP,down:ut.Msg.MIXLY_DOWN,left:ut.Msg.MIXLY_LEFT,right:ut.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[ut.Msg.MIXLY_UP,"up"],[ut.Msg.MIXLY_DOWN,"down"],[ut.Msg.MIXLY_LEFT,"left"],[ut.Msg.MIXLY_RIGHT,"right"]]},vm={init:function(){this.setColour(Fm),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(ut.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new ut.FieldDropdown(vm.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":ut.Msg.MIXLY_MICROBIT_image_add,"-":ut.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[ut.Msg.MICROBIT_DISPLAY_UNION,"+"],[ut.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},Ym={init:function(){this.setColour(Fm),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+ut.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new ut.FieldDropdown(Ym.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+ut.Msg.MIXLY_MICROBIT_IMAGE+{height:ut.Msg.MIXLY_HEIGHT,width:ut.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[ut.Msg.MIXLY_HEIGHT,"height"],[ut.Msg.MIXLY_WIDTH,"width"]]},Xm={init:function(){this.setColour(Fm),this.appendValueInput("VAR").appendField(ut.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RECT).appendField(new ut.FieldDropdown(Xm.STATUS),"OP"),this.jsonInit({message0:ut.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_OLED_RECT)},STATUS:[[ut.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[ut.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},bm={init:function(){this.setColour(Fm),this.appendValueInput("VAR").appendField(ut.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new ut.FieldDropdown(bm.STATUS),"OP"),this.jsonInit({message0:ut.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[ut.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[ut.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},ym={init:function(){this.setColour(Fm),this.appendValueInput("VAR").appendField(ut.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_DISPLAY_DRAW+ut.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new ut.FieldDropdown(ym.STATUS),"OP"),this.jsonInit({message0:ut.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_DISPLAY_DRAW+ut.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[ut.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[ut.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},xm="#777777",Vm={init:function(){this.setColour(xm),this.appendDummyInput("").appendField("from ").appendField(new ut.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new ut.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bm={init:function(){this.setColour(xm),this.appendDummyInput("").appendField("import ").appendField(new ut.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Gm={init:function(){this.setColour(xm),this.appendDummyInput("").appendField(new ut.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new ut.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},NE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},DE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},fE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},FE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(ut.Msg.MIXLY_EMQX_SERVER).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(ut.Msg.MIXLY_WIFI_USERNAME).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(ut.Msg.MIXLY_IOT_PASSWORD).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(ut.Msg.MIXLY_EMQX_PROJECT).setAlign(ut.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},PE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(ut.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(ut.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(ut.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},vE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(ut.Msg.MIXLY_EMQX_SUBSCRIBE+ut.Msg.MIXLY_MICROBIT_MSG).appendField(ut.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(ut.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},YE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},XE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ut.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(ut.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},xE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(ut.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},VE={init:function(){this.setColour(RE),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},BE={init:function(){this.setColour(RE),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},GE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ut.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},UE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO").appendField(ut.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(ut.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},wE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(ut.Msg.MIXLY_EMQX_SERVER).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(ut.Msg.CONTROLS_FOR_INPUT_WITH+ut.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(ut.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},kE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(ut.Msg.MIXLY_EMQX_SERVER).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(ut.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(ut.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},HE={init:function(){this.VISITOR_ID=rt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(RE),this.appendDummyInput("").appendField(new ut.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},WE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO").appendField(ut.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},KE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("HTTP"+ut.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(ut.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(ut.Msg.MIXLY_REQUESTS_GET).appendField(ut.Msg.MIXLY_GET_CURRENT_TIME).appendField(ut.Msg.MIXLY_OPEN_DEBUG).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},JE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("HTTP"+ut.Msg.MIXLY_Client).appendField(ut.Msg.MIXLY_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_REQUESTS_LEN,"client_len"],[ut.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[ut.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},qE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MQTT"+ut.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(ut.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(ut.Msg.MIXLY_INIT_SUBSCRIBE).appendField(ut.Msg.MQTT_Topic).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(ut.Msg.MIXLY_OPEN_DEBUG).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},QE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MQTT"+ut.Msg.MIXLY_Client).appendField(ut.Msg.MIXLY_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_REQUESTS_LEN,"client_len"],[ut.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[ut.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},zE=cE,jE=gE,$E=CE,ZE=SE,tO=LE,eO={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(ut.Msg.MIXLY_EMQX_SERVER).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(ut.Msg.MODEL_NAME).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(ut.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iO=eO,nO={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(ut.Msg.MIXLY_EMQX_SERVER).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(ut.Msg.MIXLY_API_PRIVATE_KEY).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(ut.Msg.MODEL_NAME).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(ut.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sO={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(ut.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(ut.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},oO={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(ut.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(ut.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},_O={init:function(){this.setColour(RE),this.appendDummyInput().appendField("Ollama "+ut.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pO=225,aO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(ut.Msg.MIXLY_NETWORK_MODE).appendField(new ut.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},uO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[ut.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=ut.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:ut.Msg.MIXLY_NETWORK_WIFI_OPEN,False:ut.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},rO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},dO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return ut.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:ut.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},lO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(ut.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(ut.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},IO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_NETWORK_WIFI_CONNECT+ut.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},TO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[ut.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[ut.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return ut.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:ut.Msg.MIXLY_ESP32_NETWORK_IP,1:ut.Msg.MIXLY_ESP32_NETWORK_MASK,2:ut.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},MO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},hO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[ut.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},mO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(ut.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(ut.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},EO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(ut.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},OO={init:function(){this.setColour(pO),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new ut.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},RO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},cO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},gO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},CO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},SO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},AO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},LO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},NO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},DO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},fO={init:function(){this.setColour(pO),this.appendValueInput("DOMAIN").appendField(ut.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(ut.Msg.blockpy_REQUESTS_GET).appendField(new ut.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},FO={init:function(){this.appendValueInput("VAL"),this.setColour(pO),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ut.FieldDropdown(FO.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:ut.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:ut.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:ut.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[ut.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[ut.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[ut.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[ut.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},PO={init:function(){this.appendValueInput("VAR").appendField(ut.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(pO),this.appendDummyInput("").appendField(ut.Msg.blockpy_CONDUCT).appendField(new ut.FieldDropdown(PO.METHOD),"DIR"),this.appendDummyInput("").appendField(ut.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:ut.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:ut.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},vO={init:function(){this.setColour(pO),this.appendDummyInput("").appendField(ut.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(ut.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},YO={init:function(){this.setColour(pO),this.appendDummyInput("").appendField(new ut.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},XO="#3288dd",bO={init:function(){this.setColour(XO),this.appendValueInput("URL").appendField(ut.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(ut.Msg.blockpy_CONDUCT).appendField(new ut.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(ut.Msg.blockpy_REQUESTS).appendField(ut.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},yO={init:function(){this.setColour(XO),this.appendValueInput("URL").appendField(ut.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(ut.Msg.blockpy_CONDUCT).appendField(new ut.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(ut.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(ut.Msg.blockpy_REQUESTS+ut.Msg.OLED_STRING),this.appendDummyInput("").appendField(ut.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},xO={init:function(){this.appendValueInput("VAL"),this.setColour(XO),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ut.FieldDropdown(xO.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[ut.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[ut.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[ut.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[ut.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[ut.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},VO={init:function(){this.setColour(XO),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(ut.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(ut.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(ut.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(ut.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},BO={init:function(){this.setColour(XO),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(ut.Msg.MIXLY_EMQX_SERVER).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(ut.Msg.MIXLY_EMQX_PORT).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(ut.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(ut.Msg.MIXLY_WIFI_USERNAME).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(ut.Msg.MIXLY_IOT_PASSWORD).setAlign(ut.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},GO={init:function(){this.setColour(XO),this.appendValueInput("TOPIC").appendField(ut.Msg.MIXLY_EMQX_SUBSCRIBE+ut.Msg.MIXLY_MICROBIT_MSG).appendField(ut.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(ut.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},UO={init:function(){this.setColour(XO),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(ut.Msg.MIXLY_EMQX_SUBSCRIBE+ut.Msg.MIXLY_MICROBIT_MSG).appendField(ut.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(ut.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wO={init:function(){this.setColour(XO),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(ut.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(ut.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(ut.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},kO={init:function(){this.setColour(XO),this.appendDummyInput().appendField("mqtt"+ut.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},HO="#A58C5B",WO={init:function(){this.setColour(HO),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_BUTTON).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(ut.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_SENOR_IS_PRESSED)}},KO={init:function(){this.setColour(HO),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_BUTTON).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(ut.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_SENOR_WAS_PRESSED)}},JO={init:function(){this.setColour(HO),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_BUTTON).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(ut.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.PROCEDURES_DEFRETURN_RETURN+ut.Msg.MIXLY_BUTTON+ut.Msg.MIXLY_GET_PRESSES)}},qO={init:function(){this.setColour(HO),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_BUTTON).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MODE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[ut.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[ut.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(ut.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},QO={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_shake,"shake"],[ut.Msg.MIXLY_UP,"up"],[ut.Msg.MIXLY_DOWN,"down"],[ut.Msg.MIXLY_LEFT,"left"],[ut.Msg.MIXLY_RIGHT,"right"],[ut.Msg.MIXLY_MICROBIT_face_up,"face up"],[ut.Msg.MIXLY_MICROBIT_face_down,"face down"],[ut.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(ut.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=ut.Msg.MIXLY_MICROBIT_JS_CURRENT,n=ut.Msg.MSG.catSensor,s=ut.Msg.MIXLY_MICROBIT_JS_STATE,o=ut.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:ut.Msg.MIXLY_MICROBIT_shake,up:ut.Msg.MIXLY_UP,down:ut.Msg.MIXLY_DOWN,left:ut.Msg.MIXLY_LEFT,right:ut.Msg.MIXLY_RIGHT,"face up":ut.Msg.MIXLY_MICROBIT_face_up,"face down":ut.Msg.MIXLY_MICROBIT_face_down,freefall:ut.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+o}))}},zO={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new ut.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=ut.Msg.MIXLY_MICROBIT_Direction,s=ut.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":ut.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},jO={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},$O={init:function(){this.setColour(HO),this.appendValueInput("PIN",Number).appendField(new ut.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new ut.FieldDropdown($O.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[ut.Msg.MIXLY_GETTEMPERATUE,"temperature"],[ut.Msg.MIXLY_GETHUMIDITY,"humidity"]]},ZO={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},tR={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},eR={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new ut.FieldDropdown([[ut.Msg.TEXT_TRIM_LEFT,"left"],[ut.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(ut.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=ut.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=ut.Msg.MIXLY_ESP32_NEAR;return i+{left:ut.Msg.TEXT_TRIM_LEFT,right:ut.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},iR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_ALTITUDE_SENSOR+" BMP280").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[ut.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":ut.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":ut.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},nR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+" SHT20").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[ut.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":ut.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":ut.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},sR={init:function(){this.setColour(HO),this.appendValueInput("PIN",Number).appendField("DS18X20 "+ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(ut.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},oR={init:function(){this.setColour(HO),this.appendDummyInput("").appendField("LM35"+ut.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(ut.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_LM35)}},_R={init:function(){this.setColour(HO),this.appendValueInput("I2CSUB").appendField(ut.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_SETUP+ut.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_ESP32_EXTERN_LIGHT+"(LTR308ALS)","LTR308"],[ut.Msg.MIXLY_COLOR_SENSOR+"(LTR381RGB)","LTR381RGB"],[ut.Msg.MIXLY_COLOR_SENSOR+"(UCS12071)","UCS12071"],[ut.Msg.MIXLY_EXTERN_LIGHTUV+"(LTR390UV)","LTR390UV"],[ut.Msg.MIXLY_ALTITUDE_SENSOR+"(HP203X)","HP203X"],[ut.Msg.MIXLY_ALTITUDE_SENSOR+"(SPL06_001)","SPL06_001"],[ut.Msg.MIXLY_ALTITUDE_SENSOR+"(MS5611)","MS5611"],[ut.Msg.MIXLY_ALTITUDE_SENSOR+"(BMP280)","BMP280"],[ut.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHTC3)","SHTC3"],[ut.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(AHT21)","AHT21"],[ut.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHT20)","SHT20"],[ut.Msg.MIXLY_LASER_RANGE_SENSOR+"(VL53L0X)","VL53L0X"],[ut.Msg.MIXLY_GEOMAGNETIC_SENSOR+"(QMC5883L)","QMC5883L"],[ut.Msg.MIXLY_ESP32_MAX30102+"(MAX30102)","MAX30102"],[ut.Msg.HTML_COLOUR+"、"+ut.Msg.MIXLY_ENVIRONMENT_LIGHT+"、"+ut.Msg.MIXLY_NEXT+"、"+ut.Msg.MIXLY_ESP32_APDS9960+"(APDS9960)","APDS9960"],[ut.Msg.MIXLY_NINE_AXIS_SENSOR+"(MPU9250)","MPU9250"],[ut.Msg.MixGo_MPU9250+"(ADXL345)","ADXL345"],["RFID","RFID"],[ut.Msg.MIXLY_RADAR_SENSOR+"(CBR817)","CBR817"],[ut.Msg.MIXLY_AipSpeech_asr+"(CI130X)","CI130X"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},pR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.LISTS_SET_INDEX_SET+ut.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(ut.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+ut.Msg.MIXLY_DELAY_TIME_RANGE)}},aR={init:function(){this.setColour(HO),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RADAR).appendField(ut.Msg.LISTS_SET_INDEX_SET+ut.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(ut.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+ut.Msg.MIXLY_DELAY_TIME_RANGE)}},uR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},rR={init:function(){this.setColour(HO),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RADAR).appendField(ut.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},dR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_IDENTIFY_ONCE_AND_SAVE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},lR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_HELLO_XIAOZHI,"1"],[ut.Msg.MIXLY_XIAOZHIXIAOZHI,"2"],[ut.Msg.MIXLY_THE_FIRST,"3"],[ut.Msg.MIXLY_THE_SECOND,"4"],[ut.Msg.MIXLY_THE_THIRD,"5"],[ut.Msg.MIXLY_THE_FOURTH,"6"],[ut.Msg.MIXLY_THE_FIFTH,"7"],[ut.Msg.MIXLY_THE_SIXTH,"8"],[ut.Msg.MIXLY_THE_SEVENTH,"9"],[ut.Msg.MIXLY_THE_EIGHTH,"10"],[ut.Msg.MIXLY_THE_NINTH,"11"],[ut.Msg.MIXLY_THE_TENTH,"12"],[ut.Msg.MIXLY_THE_ELEVENTH,"13"],[ut.Msg.MIXLY_THE_TWELFTH,"14"],[ut.Msg.MIXLY_THE_13TH,"15"],[ut.Msg.MIXLY_THE_14TH,"16"],[ut.Msg.MIXLY_THE_15TH,"17"],[ut.Msg.MIXLY_THE_16TH,"18"],[ut.Msg.MIXLY_THE_17TH,"19"],[ut.Msg.MIXLY_THE_18TH,"20"],[ut.Msg.MIXLY_THE_19TH,"21"],[ut.Msg.MIXLY_THE_20TH,"22"],[ut.Msg.MIXLY_Turn_on_the_lights,"23"],[ut.Msg.MIXLY_Turn_off_the_lights,"24"],[ut.Msg.MIXLY_Turn_up_the_brightness,"25"],[ut.Msg.MIXLY_Turn_down_the_brightness,"26"],[ut.Msg.MIXLY_Set_it_to_red,"27"],[ut.Msg.MIXLY_Set_it_to_orange,"28"],[ut.Msg.MIXLY_Set_it_to_yellow,"29"],[ut.Msg.MIXLY_Set_it_to_green,"30"],[ut.Msg.MIXLY_Set_it_to_cyan,"31"],[ut.Msg.MIXLY_Set_it_to_blue,"32"],[ut.Msg.MIXLY_Set_it_to_purple,"33"],[ut.Msg.MIXLY_Set_it_to_white,"34"],[ut.Msg.MIXLY_Turn_on_the_fan,"35"],[ut.Msg.MIXLY_Turn_off_the_fan,"36"],[ut.Msg.MIXLY_First_gear,"37"],[ut.Msg.MIXLY_Wind_speed_second,"38"],[ut.Msg.MIXLY_Third_gear,"39"],[ut.Msg.MIXLY_Previous,"40"],[ut.Msg.MIXLY_Next_page,"41"],[ut.Msg.MIXLY_Show_smiley_face,"42"],[ut.Msg.MIXLY_Show_crying_face,"43"],[ut.Msg.MIXLY_Show_love,"44"],[ut.Msg.MIXLY_Close_display,"45"],[ut.Msg.MIXLY_Start_execution,"46"],[ut.Msg.MIXLY_FORWARD,"47"],[ut.Msg.MIXLY_BACKWARD,"48"],[ut.Msg.MIXLY_TURNLEFT,"49"],[ut.Msg.MIXLY_TURNRIGHT,"50"],[ut.Msg.MIXLY_STOP,"51"],[ut.Msg.MIXLY_Accelerate,"52"],[ut.Msg.MIXLY_retard,"53"],[ut.Msg.ROTATION_FORWARD,"54"],[ut.Msg.ROTATION_BACKWARD,"55"],[ut.Msg.MIXLY_Query_temperature,"56"],[ut.Msg.MIXLY_Query_humidity,"57"],[ut.Msg.MIXLY_Query_brightness,"58"],[ut.Msg.MIXLY_Query_sound,"59"],[ut.Msg.MIXLY_Query_time,"60"],[ut.Msg.MIXLY_Query_distance,"61"],[ut.Msg.MIXLY_Query_pressure,"62"],[ut.Msg.MIXLY_Query_key,"63"],[ut.Msg.MIXLY_Query_touch,"64"],[ut.Msg.MIXLY_Query_color,"65"]]),"cmd").appendField(ut.Msg.MIXLY_WHETHER+ut.Msg.MIXLY_BE_IDENTIFIED),this.setOutput(!0),this.setInputsInline(!0)}},IR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_RECOGNIZED_STATE,"status1"],[ut.Msg.MIXLY_WHETHER_BROADCAST,"status2"],[ut.Msg.MIXLY_THE_RECOGNIZED_CMD,"result"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_CI130X_GET_THE_RECOGNIZED_STATE_TOOLTIP)}},TR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MP3_PLAY).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[ut.Msg.MIXLY_WIND_SPEED,"154"],[ut.Msg.MIXLY_HYETAL,"155"],[ut.Msg.MIXLY_TEMPERATURE,"156"],[ut.Msg.MIXLY_Humidity,"157"],[ut.Msg.MIXLY_Altitude,"158"],[ut.Msg.MIXLY_SOUND,"159"],[ut.Msg.MIXLY_BRIGHTNESS,"160"],[ut.Msg.ME_GO_HALL_SENSOR_DISTANCE,"161"],[ut.Msg.MIXLY_SERVO,"162"],[ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"163"],[ut.Msg.MIXLY_BUTTON2,"164"],[ut.Msg.MIXLY_ESP32_TOUCH,"165"],[ut.Msg.MIXLY_PAY,"166"],[ut.Msg.MIXLY_CARSH_CHANGE,"167"],[ut.Msg.MIXLY_COUNTDOWN,"168"],[ut.Msg.MIXLY_TIMING,"169"],[ut.Msg.MIXLY_AT_THE_MOMENT,"170"],[ut.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE,"171"],[ut.Msg.MIXLY_FORWARD,"172"],[ut.Msg.MIXLY_BACKWARD,"173"],[ut.Msg.MIXLY_TURNLEFT,"174"],[ut.Msg.MIXLY_TURNRIGHT,"175"],[ut.Msg.MIXLY_STOP,"176"],[ut.Msg.MIXLY_Accelerate,"177"],[ut.Msg.MIXLY_retard,"178"],[ut.Msg.ROTATION_FORWARD,"179"],[ut.Msg.ROTATION_BACKWARD,"180"],[ut.Msg.TUPLE_JOIN,"181"],[ut.Msg.MIXLY_SHOW,"182"],[ut.Msg.MIXLY_LAMPLIGHT,"183"],[ut.Msg.MIXLY_ACCELERATION,"184"]]),"star"),this.appendValueInput("NUM").appendField(ut.Msg.MIXLY_NUMBER),this.appendDummyInput("").appendField(ut.Msg.MIXLY_UNIT).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[ut.Msg.MIXLY_YEAR,"117"],[ut.Msg.MIXLY_MONTH,"118"],[ut.Msg.MIXLY_DAY,"119"],[ut.Msg.MIXLY_HOUR,"120"],[ut.Msg.MIXLY_MINUTE,"121"],[ut.Msg.MIXLY_SECOND,"122"],[ut.Msg.MIXLY_WEEK2,"123"],[ut.Msg.MIXLY_RMB_UNIT,"124"],[ut.Msg.blockpy_setheading_degree,"125"],[ut.Msg.MIXLY_GEAR,"126"],[ut.Msg.MIXLY_LAYER,"127"],[ut.Msg.MIXLY_GRAM,"128"],[ut.Msg.MIXLY_METER,"129"],[ut.Msg.MIXLY_CENTIMETER,"130"],[ut.Msg.MIXLY_MILLIMETER,"131"],[ut.Msg.MIXLY_LUMEN,"132"],[ut.Msg.MIXLY_DECIBEL,"133"],[ut.Msg.MIXLY_hectopascal,"134"],[ut.Msg.MIXLY_PERCENT,"135"],[ut.Msg.MIXLY_CELSIUS,"136"],[ut.Msg.MIXLY_METER_PER_SEC,"137"],[ut.Msg.MIXLY_MICROBIT_Turn_on_display,"138"],[ut.Msg.MIXLY_MICROBIT_Turn_off_display,"139"],[ut.Msg.MIXLY_SUCCESS,"140"],[ut.Msg.MIXLY_FAILED,"141"],[ut.Msg.MIXLY_WRONG,"142"],[ut.Msg.MIXLY_GOOD,"143"],[ut.Msg.MIXLY_blockpy_set_add,"144"],[ut.Msg.MIXLY_DECREASE,"145"],[ut.Msg.COLOUR_RGB_RED,"146"],[ut.Msg.COLOUR_RGB_ORANGE,"147"],[ut.Msg.COLOUR_YELLOW,"148"],[ut.Msg.COLOUR_RGB_GREEN,"149"],[ut.Msg.COLOUR_CYAN,"150"],[ut.Msg.COLOUR_RGB_BLUE,"151"],[ut.Msg.COLOUR_RGB_PURPLE,"152"],[ut.Msg.COLOUR_RGB_WHITE,"153"]]),"end"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},MR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.LISTS_SET_INDEX_SET+ut.Msg.MIXLY_SYSTEM+ut.Msg.MIXLY_CMD).appendField(new ut.FieldDropdown([[ut.Msg.MILXY_ENTER_WAKE_UP,"1"],[ut.Msg.MIXLY_INCREASE_VOLUME,"202"],[ut.Msg.MIXLY_REDUCE_VOLUME,"203"],[ut.Msg.MIXLY_MAX_VOLUME,"204"],[ut.Msg.MIXLY_MINIMUM,"205"],[ut.Msg.MIXLY_OPEN_RESPONSE,"206"],[ut.Msg.MIXLY_CLOSE_RESPONSE,"207"],[ut.Msg.MIXLY_QUIT_WAKE_UP,"208"]]),"cmd"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},hR={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[ut.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[ut.Msg.MIXLY_ESP32_MAX30102_IR+","+ut.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},mR={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[ut.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[ut.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ER={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308ALS"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},OR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.HTML_COLOUR+ut.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GET+ut.Msg.HTML_COLOUR,"[2]"],[ut.Msg.MIXLY_GET+ut.Msg.MIXLY_IR_STRENGTH,"[1]"],[ut.Msg.MIXLY_GET+ut.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},RR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.HTML_COLOUR+ut.Msg.MSG.catSensor+" UCS12071").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GET+"RGB"+ut.Msg.HTML_COLOUR,"0"],[ut.Msg.MIXLY_GET+ut.Msg.MIXLY_RGB_RAW,"1"],[ut.Msg.MIXLY_GET_ENV_LIGHT+ut.Msg.MIXLY_BRIGHTNESS,"2"],[ut.Msg.GET_IR_STRENGTH+ut.Msg.MIXLY_BRIGHTNESS,"3"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},cR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GET_ENV_LIGHT,"E"],[ut.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},gR={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},CR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GETTEMPERATUE,"temperature"],[ut.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:ut.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:ut.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},SR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GETTEMPERATUE,"temperature"],[ut.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:ut.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:ut.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},AR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_Altitude+ut.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GETPRESSURE,"pressure()"],[ut.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[ut.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},LR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_Altitude+ut.Msg.MSG.catSensor+" SPL06_001").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GETPRESSURE,"pressure()"],[ut.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[ut.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},NR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_Altitude+ut.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GETPRESSURE,"pressure()"],[ut.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[ut.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},DR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_Altitude+ut.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_REF_TO_PRESSURE),this.appendDummyInput().appendField(ut.Msg.MIXLY_CAL_TO_ALTITUDE),this.setOutput(!0,Number),this.setInputsInline(!0)}},fR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MIXGOPE_FIELD+ut.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[ut.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},FR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_shake,"shake"],[ut.Msg.MIXLY_UP,"up"],[ut.Msg.MIXLY_DOWN,"down"],[ut.Msg.MIXLY_LEFT,"left"],[ut.Msg.MIXLY_RIGHT,"right"],[ut.Msg.MIXLY_MICROBIT_face_up,"face up"],[ut.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=ut.Msg.MIXLY_MICROBIT_JS_CURRENT,n=ut.Msg.MSG.catSensor,s=ut.Msg.MIXLY_MICROBIT_JS_STATE,o=ut.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:ut.Msg.MIXLY_MICROBIT_shake,up:ut.Msg.MIXLY_UP,down:ut.Msg.MIXLY_DOWN,left:ut.Msg.MIXLY_LEFT,right:ut.Msg.MIXLY_RIGHT,"face up":ut.Msg.MIXLY_MICROBIT_face_up,"face down":ut.Msg.MIXLY_MICROBIT_face_down}[e]+o}))}},PR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new ut.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=ut.Msg.MIXLY_MICROBIT_Direction,s=ut.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":ut.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},vR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_JS_GET+ut.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new ut.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=ut.Msg.MIXLY_MICROBIT_Direction,s=ut.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":ut.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},YR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+ut.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new ut.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=ut.Msg.MIXLY_MICROBIT_Direction,s=ut.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":ut.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},XR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},bR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_GETTEMPERATUE)}},yR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return ut.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:ut.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},xR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},VR={init:function(){this.setColour(HO),this.appendValueInput("SPISUB").appendField(ut.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_SETUP+ut.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new ut.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},BR={init:function(){this.setColour(HO),this.appendDummyInput().appendField("RFID"+ut.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(ut.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[ut.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},GR={init:function(){this.setColour(HO),this.appendDummyInput().appendField("RFID"+ut.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},UR={init:function(){this.setColour(HO),this.appendDummyInput().appendField("RFID"+ut.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(ut.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},wR={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(ut.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(ut.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},kR={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(ut.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(ut.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(ut.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},HR={init:function(){this.setColour(HO),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_RFID_SCAN_OK,"0"],[ut.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[ut.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},WR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ut.FieldDropdown([["全部(元组)","data()[0]"],["全部(json)","data()[1]"],["全部(json,附带位置信息)","data()[2]"],["编号","data()[0][0]"],["电量","data()[0][1]"],["风速","data()[0][2]"],["阵风","data()[0][3]"],["风向","data()[0][4]"],["雨量","data()[0][5]"],["温度","data()[0][6]"],["湿度","data()[0][7]"],["光照","data()[0][8]"],["紫外线","data()[0][9]"],["大气压","data()[0][10]"],["信号强度","data()[0][11]"],["信噪比","data()[0][12]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip("返回气象数据元组 data= (设备id,电池状态,风速m/s,阵风m/s,风向°,雨量mm,温度℃,湿度%,光照Lux,UVI,大气压Pa,信号强度dB,信噪比dB)")}},KR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},JR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendValueInput("BASE").appendField("以主题"),this.appendDummyInput("").appendField("串口发送至MixIO"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},qR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new ut.icons.MutatorIcon(["weather_set_label_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("weather_set_label_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n>6),i.push(128|63&o)):(2048<=o&&o<=55295||57344<=o&&o<=65535)&&(n+=3,i.push(224|15&o>>12),i.push(128|63&o>>6),i.push(128|63&o))}for(s=0;s>8,255&n].concat(i)}(t,!0),i="",n=0;n=0?"0x700000":["mixgo_sant"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==_?(e.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+o+", font_address="+p+")\n"):"16x8 Matrix"==_&&(e.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+o+")\n"),i},zf=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},jf=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},$f=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},Zf=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},tF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},eF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},iF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},nF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},sF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},oF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},_F=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},pF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},aF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},uF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_"+t.getFieldValue("OP")+"("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"B",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},rF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},dF=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},lF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},IF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},TF=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"width",e.ORDER_ATOMIC),_=e.valueToCode(this,"height",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP");switch(p){case"True":return i+".show_fill_rect("+n+", "+s+", "+o+", "+_+", "+a+")\n";case"False":return i+".show_rect("+n+", "+s+", "+o+", "+_+", "+a+")\n"}},MF=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+o+", 1)\n"},hF=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},mF=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},EF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},OF=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},RF=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"r",e.ORDER_ATOMIC),_="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(_){case"True":return i+".show_fill_circle("+n+", "+s+", "+o+", "+p+")\n";case"False":return i+".show_circle("+n+", "+s+", "+o+", "+p+")\n"}},cF=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),o=e.valueToCode(this,"x1",e.ORDER_ATOMIC),_=e.valueToCode(this,"y1",e.ORDER_ATOMIC),p=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",r=this.getFieldValue("OP");switch(u){case"True":return i+".show_fill_triangle("+n+", "+s+", "+o+", "+_+", "+p+", "+a+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+o+", "+_+", "+p+", "+a+", "+r+")\n"}},gF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+","+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+","+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},CF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},SF=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),o=this.getFieldValue("key");return"TM1650"==o?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+o+"("+s+")\n"):"TM1637"==o&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+o+"("+s+")\n"),i},AF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},LF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},NF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".showDP("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},DF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},fF=function(t,e){e.definitions_.import_st7789="import st7789";var i=rt.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_sant"].indexOf(i)>=0?"0xE00000":"0x3A0000";var s=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),o=e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC),_=e.valueToCode(this,"PINCS",e.ORDER_ATOMIC),p=e.valueToCode(this,"PINDC",e.ORDER_ATOMIC);return s+" = st7789.ST7789("+o+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+", dc_pin="+p+", cs_pin="+_+", rotation="+this.getFieldValue("rotate")+", font_address="+n+")\n"},FF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".image("+n+", x="+s+", y="+o+", size="+_+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".image("+n+", x= "+s+",y="+o+", size="+_+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},PF=function(t,e){var i="0x"+this.getFieldValue("COLOR").slice(1);return["0x"+((16252928&i)>>8|(64512&i)>>5|(255&i)>>3).toString(16),e.ORDER_ATOMIC]},vF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==a.slice(0,2))var r=i+".shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+u+", color="+a+")\n";else{const t=a.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r=i+".shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+u+", color=0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+")\n"}return r},YF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==_.slice(0,2))var p=i+".frame("+n+", size="+s+", delay="+o+", color="+_+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".frame("+n+", size="+s+", delay="+o+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},XF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u=i+".scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u=i+".scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},bF=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},yF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"x1",e.ORDER_ATOMIC),s=e.valueToCode(this,"y1",e.ORDER_ATOMIC),o=e.valueToCode(this,"x2",e.ORDER_ATOMIC),_=e.valueToCode(this,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".line("+n+", "+s+", "+o+", "+_+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".line("+n+", "+s+", "+o+", "+_+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},xF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=this.getFieldValue("key"),o=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return e.definitions_.import_i2clcd="import i2clcd",i+" = i2clcd.LCD("+n+", lcd_width="+s+", i2c_addr="+o+")\n"},VF=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+",center = "+this.getFieldValue("center")+")\n"},BF=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".print("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},GF=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},UF=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},wF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC),o=this.getFieldValue("driver"),_=rt.Boards.getSelectedBoardKey().split(":")[2],p="";return p=["mpython","mixgo_pe","mixgo_nova"].indexOf(_)>=0?"0x700000":["mixgo_sant"].indexOf(_)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+", address="+s+", font_address="+p+", types="+o+")\n"},kF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},HF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+")\n"},WF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},KF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},JF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},qF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},QF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},zF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},jF=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},$F=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},ZF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},tP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},eP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"w",e.ORDER_ATOMIC),_=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=t.getFieldValue("state");return i+"."+t.getFieldValue("shape")+"("+n+", "+s+", "+o+", "+_+", "+p+")\n"+i+".show()\n"},iP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"length",e.ORDER_ATOMIC),_=t.getFieldValue("state");return i+"."+("0"==t.getFieldValue("dir_h_v")?"v":"h")+"line("+n+", "+s+", "+o+", "+_+")\n"+i+".show()\n"},nP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".line("+e.valueToCode(t,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y2",e.ORDER_ATOMIC)+", "+t.getFieldValue("state")+")\n"+i+".show()\n"},sP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("Python ESP32-S3"===rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var s="onboard_tft.image("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff,sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n"}else if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled";s="oled.print("+n+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.shows("+n+")\n"}return s},oP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),o=this.getFieldValue("center");if("mixgo_sant"==i||"mixgo_nova"==i)return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+", space="+s+", center="+o+",sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n";if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled"}return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+", space="+s+", center="+o+")\n"},_P=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var s="onboard_oled.frame("+n+")\n"}else if("Python ESP32-S3"===rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";s="onboard_tft.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.frame("+n+")\n"}return s},pP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var o="onboard_oled.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", delay="+s+")\n"}else if("Python ESP32-S3"===rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";o="onboard_tft.frame("+n+", size=5 , delay="+s+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";o="onboard_matrix.frame("+n+", delay="+s+")\n"}return o},aP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else if("Python ESP32-S3"===rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";n="onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},uP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var _="onboard_oled.scroll("+n+", speed="+s+", space="+o+")\n"}else if("Python ESP32-S3"===rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";_="onboard_tft.scroll("+n+", y=0, size=5, speed="+s+", space="+o+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";_="onboard_matrix.scroll("+n+", speed="+s+", space="+o+")\n"}return _},rP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u="onboard_tft.scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},dP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},lP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===rt.JSFuncs.getPlatform()){const i=t.getFieldValue("image").split(".");if(2!==i.length)throw Error("pin value error");e.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`;var n=i[1]}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix."+t.getFieldValue("image")}return[n,e.ORDER_ATOMIC]},IP=function(t,e){var i={"#000000":"0","#ff0000":"1"};function n(t){let e="";if(t.length%2==1&&(t="0"+t),t.length<8){let e=8-t.length;for(let i=1;i<=e;i++)t="0"+t}for(let i=1;i<=t.length;i++)i%2==0&&i!==t.length?e=e+t[i-1]+",0x":e+=t[i-1];return"0x"+e}let s=[];for(let e=0;e<12;e++){let o="",_=0,p=0;for(let n=0;n<32;n++)n<8?p=7-n:n<16?p=23-n:n<24?p=39-n:n<32&&(p=55-n),_+=Number(i[t.getFieldValue(e+"-"+n)])*Math.pow(2,31-p);o+=n(_.toString(16)),s.unshift(o)}let o=[];for(let t=0;t>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},jP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.picture("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"direct",e.ORDER_ASSIGNMENT)+")\n"},$P=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=this.getFieldValue("center"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True",r=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==r.slice(0,2))var d="onboard_tft.shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+a+", color="+r+",sync="+u+")\n";else{const t=r.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");d="onboard_tft.shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+a+", color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+",sync="+u+")\n"}return d},ZP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==_.slice(0,2))var p="onboard_tft.frame("+n+", size="+s+", delay="+o+", color="+_+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.frame("+n+", size="+s+", delay="+o+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},tv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"w",e.ORDER_ATOMIC),_=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=t.getFieldValue("shape"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var r="onboard_tft."+a+"("+n+", "+s+", "+o+", "+_+", "+p+",sync="+u+")\n";else{const t=p.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r="onboard_tft."+a+"("+n+", "+s+", "+o+", "+_+", 0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+",sync="+u+")\n"}return r},ev=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"length",e.ORDER_ATOMIC),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("dir_h_v"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+o+", "+_+",sync="+a+")\n";else{const t=_.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},iv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x1",e.ORDER_ATOMIC),s=e.valueToCode(t,"y1",e.ORDER_ATOMIC),o=e.valueToCode(t,"x2",e.ORDER_ATOMIC),_=e.valueToCode(t,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.line("+n+", "+s+", "+o+", "+_+", "+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.line("+n+", "+s+", "+o+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},nv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},sv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),_=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var p="onboard_tft.pixel(int("+n+"), int("+s+"), "+o+",sync="+_+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+",sync="+_+")\n"}return p},ov=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==n.slice(0,2))var o="onboard_tft.fill("+n+",sync="+s+")\n";else{const t=n.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o="onboard_tft.fill(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+",sync="+s+")\n"}return o},_v=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=_+"=Clock("+n+", "+s+", "+o+", "+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=_+"=Clock("+n+", "+s+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},pv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},av=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_time("+e.valueToCode(this,"h",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"m",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"s",e.ORDER_ASSIGNMENT)+")\n"},uv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},rv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2))var o=n+".clear("+s+")\n";else{const t=s.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o=n+".clear(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+")\n"}return o},dv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"r",e.ORDER_ATOMIC),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("shape"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var u="onboard_tft.ellipse("+n+", "+s+", "+o+", "+o+", "+_+", "+p+",sync="+a+")\n";else{const t=_.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.ellipse("+n+", "+s+", "+o+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+", "+p+",sync="+a+")\n"}return u},lv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n="onboard_tft.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}return n},Iv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2));else{const t=s.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)}return"onboard_tft.pointern(angle="+n+")\n"},Tv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.texts("+n+", x="+s+", y="+o+", size="+_+", color="+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.texts("+n+", x="+s+", y="+o+", size="+_+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},Mv=sP,hv=gP,mv=OP,Ev=gP,Ov=CP,Rv=MP,cv=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},gv=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},Cv=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},gV=function(){return"control.reset()\n"},CV=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||rt.Profile.default.serial)+")\n"},SV=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||rt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||rt.Profile.default.serial)+")\n"},AV=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||rt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||rt.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},LV=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},NV=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},DV=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},fV=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},FV=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},PV=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},vV=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},YV=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},XV=function(){return"while True:\n pass\n"},bV=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},yV=function(t,e){return e.definitions_.import_os="import os","os.uname()"},xV=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},VV=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},BV=function(t,e){return e.definitions_.import_mixgo="import mixgo",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period="+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=Timer."+(e.valueToCode(this,"mode",e.ORDER_NONE)||"None")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},GV=function(t,e){return e.definitions_.import_machine="import machine",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period = "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=machine.Timer."+this.getFieldValue("mode")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},UV=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},wV=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},kV=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},HV=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},WV=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},KV=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},JV=wV,qV=GV,QV=UV,zV=xV,jV=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},$V=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ZV=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api.weather_hourly("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"hour",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},tB=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")\n"},eB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_now.analysis()";else n='Weather_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},iB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Air_now.analysis()";else n='Air_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},nB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_alarm.analysis()";else n='Weather_alarm.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},sB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Life_suggestion.analysis()";else n='Life_suggestion.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},oB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Tide_daily.analysis()";else n='Tide_daily.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},_B=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Location_search.analysis()";else n='Location_search.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},pB=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")\n"},aB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Weather_daily.analysis("+n+")";else s="Weather_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},uB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Air_daily.analysis("+n+")";else s="Air_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},rB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_sun.analysis("+n+")";else s="Geo_sun.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},dB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_moon.analysis("+n+")";else s="Geo_moon.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},lB=new ut.Generator("Python");lB.INDENT=" ",lB.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),lB.ORDER_ATOMIC=0,lB.ORDER_COLLECTION=1,lB.ORDER_STRING_CONVERSION=1,lB.ORDER_UNARY_POSTFIX=1,lB.ORDER_UNARY_PREFIX=2,lB.ORDER_MEMBER=2.1,lB.ORDER_FUNCTION_CALL=2.2,lB.ORDER_EXPONENTIATION=3,lB.ORDER_UNARY_SIGN=4,lB.ORDER_BITWISE_NOT=4,lB.ORDER_MULTIPLICATIVE=5,lB.ORDER_ADDITIVE=6,lB.ORDER_BITWISE_SHIFT=7,lB.ORDER_BITWISE_AND=8,lB.ORDER_BITWISE_XOR=9,lB.ORDER_BITWISE_OR=10,lB.ORDER_RELATIONAL=11,lB.ORDER_EQUALITY=11,lB.ORDER_LOGICAL_NOT=12,lB.ORDER_LOGICAL_AND=13,lB.ORDER_LOGICAL_OR=14,lB.ORDER_ASSIGNMENT=14,lB.ORDER_CONDITIONAL=15,lB.ORDER_LAMBDA=16,lB.ORDER_NONE=99,lB.ORDER_OVERRIDES=[[lB.ORDER_FUNCTION_CALL,lB.ORDER_MEMBER],[lB.ORDER_FUNCTION_CALL,lB.ORDER_FUNCTION_CALL],[lB.ORDER_MEMBER,lB.ORDER_MEMBER],[lB.ORDER_MEMBER,lB.ORDER_FUNCTION_CALL]],lB.init=function(){lB.PASS=this.INDENT+"pass\n",lB.definitions_=Object.create(null),lB.functionNames_=Object.create(null),lB.setups_=Object.create(null),lB.loops_=Object.create(null),lB.codeEnd_=Object.create(null),lB.variableDB_?lB.variableDB_.reset():lB.variableDB_=new Tt(lB.RESERVED_WORDS_)},lB.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var o=this.definitions_[s];0===s.indexOf("import")?e.push(o):0===s.indexOf("var_declare")?i.push(o):n.push(o)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var _=[];for(var s in lB.functions_)_.push(lB.functions_[s]);_.length&&_.push("\n");var p=[];for(var s in lB.setups_)p.push(lB.setups_[s]);p.length&&p.push("\n");var a=[];for(var s in lB.loops_)a.push(lB.loops_[s]);var u=[];for(var s in lB.codeEnd_)u.push(lB.codeEnd_[s]);0!==u.length&&u.push("\n");let r="";return r=a.length>0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+u.join("\n"),r},lB.scrubNakedValue=function(t){return t+"\n"},lB.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},lB.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},lB.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=ut.utils.string.wrap(o,lB.COMMENT_WRAP-3),n+=lB.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const IB={};IB["飞乙"]={description:"MicroPython[ESP32C3 Bitbot]",digital_pin:rt.Profile.generate(["0-11","18-21"]),input_pin:rt.Profile.generate(["0-11","18-21"]),output_pin:rt.Profile.generate(["0-11","18-21"]),pwm_input:rt.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_input:rt.Profile.generate(["0-5"],"adc","adc"),pwm_output:rt.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_output:rt.Profile.generate(["0-5"],"adc","adc"),espnow_channel:rt.Profile.generate(["1-13"]),haskylens_model:rt.Profile.generate(["0-4"]),digital:rt.Profile.generate(["0-11","18-21"],"pin","pin"),pwm_pin:rt.Profile.generate(["0-11","18-21"]),pwm:rt.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_pin:rt.Profile.generate(["0-5"]),analog:rt.Profile.generate(["0-5"],"adc","adc"),button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],tts_voice:rt.Profile.generate(["0-16"]),tts_builtin_music:rt.Profile.generate(["0-47"]),tts_bgmusic:rt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["MUSIC_QUAVERS","onboard_matrix.MUSIC_QUAVERS"],["MUSIC_QUAVER","onboard_matrix.MUSIC_QUAVER"],["MUSIC_CROTCHET","onboard_matrix.MUSIC_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]],extern_addr:rt.Profile.generate(["0-1"]),als_num:rt.Profile.generate(["0-3"])},IB["超霸大师"]={description:"MicroPython[ESP32 Mixbot]",digital_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["39","39"]],digital:[["pin0","pin0"],["pin2","pin2"],["pin4","pin4"],["pin5","pin5"],["pin12","pin12"],["pin13","pin13"],["pin14","pin14"],["pin15","pin15"],["pin16","pin16"],["pin17","pin17"],["pin18","pin18"],["pin19","pin19"],["pin21","pin21"],["pin22","pin22"],["pin23","pin23"],["pin25","pin25"],["pin26","pin26"],["pin27","pin27"],["pin32","pin32"],["pin33","pin33"],["pin34","pin34"],["pin35","pin35"],["pin36","pin36"],["pin39","pin39"]],input_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["39","39"]],output_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"]],pwm:[["pwm0","pwm0"],["pwm2","pwm2"],["pwm4","pwm4"],["pwm5","pwm5"],["pwm12","pwm12"],["pwm13","pwm13"],["pwm14","pwm14"],["pwm15","pwm15"],["pwm16","pwm16"],["pwm17","pwm17"],["pwm18","pwm18"],["pwm19","pwm19"],["pwm20","pwm20"],["pwm21","pwm21"],["pwm22","pwm22"],["pwm23","pwm23"],["pwm25","pwm25"],["pwm26","pwm26"],["pwm27","pwm27"],["pwm32","pwm32"]],analog_pin:[["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],analog:[["adc32","adc32"],["adc33","adc33"],["adc34","adc34"],["adc35","adc35"],["adc36","adc36"],["adc37","adc37"],["adc38","adc38"],["adc39","adc39"]],espnow_channel:rt.Profile.generate(["1-13"]),haskylens_model:rt.Profile.generate(["0-4"]),dac_pin:[["25","25"],["26","26"]],dac:[["dac25","dac25"],["dac26","dac26"]],touch:[["tc0","tc0"],["tc2","tc2"],["tc4","tc4"],["tc12","tc12"],["tc13","tc13"],["tc14","tc14"],["tc15","tc15"],["tc27","tc27"],["tc32","tc32"],["tc33","tc33"]],touch_pin:[["0","0"],["2","2"],["4","4"],["12","12"],["13","13"],["14","14"],["15","15"],["27","27"],["32","32"],["33","33"]],button:[["P","button_p"],["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],tts_voice:rt.Profile.generate(["0-16"]),tts_builtin_music:rt.Profile.generate(["0-47"]),tts_bgmusic:rt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["MUSIC_QUAVERS","onboard_matrix.MUSIC_QUAVERS"],["MUSIC_QUAVER","onboard_matrix.MUSIC_QUAVER"],["MUSIC_CROTCHET","onboard_matrix.MUSIC_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]],extern_addr:rt.Profile.generate(["0-3"])},IB["ESP32 Generic"]={description:"MicroPython[ESP32 Generic]",digital_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],digital:[["pin0","pin0"],["pin2","pin2"],["pin4","pin4"],["pin5","pin5"],["pin6","pin6"],["pin7","pin7"],["pin8","pin8"],["pin9","pin9"],["pin10","pin10"],["pin11","pin11"],["pin12","pin12"],["pin13","pin13"],["pin14","pin14"],["pin15","pin15"],["pin16","pin16"],["pin17","pin17"],["pin18","pin18"],["pin19","pin19"],["pin20","pin20"],["pin21","pin21"],["pin22","pin22"],["pin23","pin23"],["pin25","pin25"],["pin26","pin26"],["pin27","pin27"],["pin32","pin32"],["pin33","pin33"],["pin34","pin34"],["pin35","pin35"],["pin36","pin36"],["pin37","pin37"],["pin38","pin38"],["pin39","pin39"]],input_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],output_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"]],pwm:[["pwm0","pwm0"],["pwm2","pwm2"],["pwm4","pwm4"],["pwm5","pwm5"],["pwm12","pwm12"],["pwm13","pwm13"],["pwm14","pwm14"],["pwm15","pwm15"],["pwm16","pwm16"],["pwm17","pwm17"],["pwm18","pwm18"],["pwm19","pwm19"],["pwm20","pwm20"],["pwm21","pwm21"],["pwm22","pwm22"],["pwm23","pwm23"],["pwm25","pwm25"],["pwm26","pwm26"],["pwm27","pwm27"],["pwm32","pwm32"]],analog_pin:[["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],analog:[["adc32","adc32"],["adc33","adc33"],["adc34","adc34"],["adc35","adc35"],["adc36","adc36"],["adc37","adc37"],["adc38","adc38"],["adc39","adc39"]],espnow_channel:rt.Profile.generate(["1-13"]),haskylens_model:rt.Profile.generate(["0-4"]),dac_pin:[["25","25"],["26","26"]],dac:[["dac25","dac25"],["dac26","dac26"]],touch:[["tc0","tc0"],["tc2","tc2"],["tc4","tc4"],["tc12","tc12"],["tc13","tc13"],["tc14","tc14"],["tc15","tc15"],["tc27","tc27"],["tc32","tc32"],["tc33","tc33"]],touch_pin:[["0","0"],["2","2"],["4","4"],["12","12"],["13","13"],["14","14"],["15","15"],["27","27"],["32","32"],["33","33"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],tts_voice:rt.Profile.generate(["0-16"]),tts_builtin_music:rt.Profile.generate(["0-47"]),tts_bgmusic:rt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["onboard_music_QUAVERS","onboard_matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","onboard_matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","onboard_matrix.onboard_music_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]]},IB["机器人大师"]={description:"MicroPython[ESP32 Generic]",digital_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],digital:[["pin0","pin0"],["pin2","pin2"],["pin4","pin4"],["pin5","pin5"],["pin12","pin12"],["pin13","pin13"],["pin14","pin14"],["pin15","pin15"],["pin16","pin16"],["pin17","pin17"],["pin18","pin18"],["pin19","pin19"],["pin20","pin20"],["pin21","pin21"],["pin22","pin22"],["pin23","pin23"],["pin25","pin25"],["pin26","pin26"],["pin27","pin27"],["pin32","pin32"],["pin33","pin33"],["pin34","pin34"],["pin35","pin35"],["pin36","pin36"],["pin37","pin37"],["pin38","pin38"],["pin39","pin39"]],input_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],output_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"]],pwm:[["pwm0","pwm0"],["pwm2","pwm2"],["pwm4","pwm4"],["pwm5","pwm5"],["pwm12","pwm12"],["pwm13","pwm13"],["pwm14","pwm14"],["pwm15","pwm15"],["pwm16","pwm16"],["pwm17","pwm17"],["pwm18","pwm18"],["pwm19","pwm19"],["pwm20","pwm20"],["pwm21","pwm21"],["pwm22","pwm22"],["pwm23","pwm23"],["pwm25","pwm25"],["pwm26","pwm26"],["pwm27","pwm27"],["pwm32","pwm32"]],espnow_channel:rt.Profile.generate(["1-13"]),haskylens_model:rt.Profile.generate(["0-4"]),analog_pin:[["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],analog:[["adc32","adc32"],["adc33","adc33"],["adc34","adc34"],["adc35","adc35"],["adc36","adc36"],["adc37","adc37"],["adc38","adc38"],["adc39","adc39"]],dac_pin:[["25","25"],["26","26"]],dac:[["dac25","dac25"],["dac26","dac26"]],touch:[["tc0","tc0"],["tc2","tc2"],["tc4","tc4"],["tc12","tc12"],["tc13","tc13"],["tc14","tc14"],["tc15","tc15"],["tc27","tc27"],["tc32","tc32"],["tc33","tc33"]],touch_pin:[["0","0"],["2","2"],["4","4"],["12","12"],["13","13"],["14","14"],["15","15"],["27","27"],["32","32"],["33","33"]],button:[["p","button_p"],["cw","button_cw"],["ccw","button_ccw"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],tts_voice:rt.Profile.generate(["0-16"]),tts_builtin_music:rt.Profile.generate(["0-47"]),tts_bgmusic:rt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["onboard_music_QUAVERS","onboard_matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","onboard_matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","onboard_matrix.onboard_music_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]]};const TB=IB,MB=230,hB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.digital),"PIN"),this.setOutput(!0)}},mB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},EB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},OB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},RB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.touch_mpython),"PIN"),this.setOutput(!0,Number)}},cB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},gB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},CB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},SB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},AB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},LB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},NB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},DB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},fB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},FB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},PB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},vB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},YB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog),"PIN"),this.setOutput(!0)}},XB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},bB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.dac),"PIN"),this.setOutput(!0)}},yB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},xB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},VB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},BB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},GB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},UB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.touch),"PIN"),this.setOutput(!0)}},wB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},kB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},HB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},WB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},KB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},JB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},qB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},QB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},zB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},jB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},$B={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},ZB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},tG={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},eG={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},iG={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},nG={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},sG={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},oG={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},_G=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},pG=_G,aG=_G,uG=_G,rG=_G,dG=_G,lG=_G,IG=_G,TG=_G,MG=_G,hG=_G,mG=_G,EG=_G,OG=_G,RG=_G,cG=_G,gG=_G,CG=_G,SG=_G,AG=_G,LG=_G,NG=_G,DG=_G,fG=_G,FG=_G,PG=_G,vG=_G,YG=_G,XG=_G,bG=_G,yG=_G,xG=_G,VG=_G,BG=_G,GG=_G;Object.assign(ut.Variables,lt),Object.assign(ut.Procedures,Su),ut.Python=Au,ut.generator=Au,rt.Profile.default={},Object.assign(rt.Profile,TB),Object.assign(rt.Profile.default,TB["ESP32 Generic"]),Object.assign(ut.Blocks,e,i,n,s,o,_,p,a,u,r,d,l,I,y,w,U,v,x,k,f,G,B,V,F,D,N,X,Y,b,P,pt),Object.assign(ut.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,Z,ot,st,Q,tt,_t,K,nt,it,et,J,W,H,j,z,$,q,at)})(); \ No newline at end of file diff --git a/boards/default/micropython_robot/main.bundle.e644be83.js b/boards/default/micropython_robot/main.bundle.e644be83.js new file mode 100644 index 00000000..a3d121cd --- /dev/null +++ b/boards/default/micropython_robot/main.bundle.e644be83.js @@ -0,0 +1,21 @@ +(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>Rt,controls_typeLists:()=>ct,lists_zip:()=>gt,lists_zip_container:()=>Ct,lists_zip_item:()=>St,unpack_iterable_object:()=>At,variables_change:()=>Et,variables_get:()=>ht,variables_global:()=>Ot,variables_set:()=>mt});var i={};t.r(i),t.d(i,{base_setup:()=>Dt,controls_delay:()=>ft,controls_end_program:()=>Ft,controls_except:()=>kt,controls_finally:()=>Ht,controls_flow_statements:()=>yt,controls_for:()=>xt,controls_forEach:()=>Yt,controls_for_range:()=>Vt,controls_if:()=>Pt,controls_if_else:()=>Ut,controls_if_elseif:()=>Gt,controls_if_if:()=>Bt,controls_lambda:()=>Kt,controls_main:()=>Nt,controls_pass:()=>Jt,controls_range:()=>vt,controls_repeat_ext:()=>Wt,controls_thread:()=>qt,controls_try:()=>wt,controls_try_finally:()=>bt,controls_whileUntil:()=>Xt,datetime_fromtimestamp:()=>te,do_while:()=>Qt,garbage_collection:()=>zt,gene_unique_identifier:()=>ee,get_mem_alloc:()=>jt,get_mem_free:()=>$t,get_unique_identifier:()=>Zt});var n={};t.r(n),t.d(n,{base_map:()=>ge,generate_cartesian_product:()=>Se,math_arithmetic:()=>_e,math_bit:()=>ae,math_constant:()=>se,math_constant_mp:()=>oe,math_constrain:()=>Me,math_dec:()=>re,math_degree_to_radian:()=>Le,math_indexer_number:()=>me,math_map:()=>he,math_max_min:()=>le,math_number:()=>ne,math_number_base_conversion:()=>Ie,math_radian_to_degree:()=>Ae,math_random:()=>Te,math_random_seed:()=>Ee,math_round:()=>Oe,math_selfcalcu:()=>pe,math_to_int:()=>de,math_trig:()=>ue,text_to_number:()=>Re,text_to_number_skulpt:()=>ce,turn_to_int:()=>Ce});var s={};t.r(s),t.d(s,{ascii_to_char:()=>ve,char_to_ascii:()=>Ye,number_to_text:()=>Xe,os_system:()=>oi,text:()=>De,text_capital:()=>ke,text_center:()=>He,text_char:()=>Fe,text_char_at:()=>xe,text_char_at2:()=>ye,text_char_at3:()=>ei,text_compareTo:()=>ti,text_compare_to:()=>we,text_create_with_container:()=>je,text_create_with_item:()=>$e,text_encode:()=>ni,text_equals_starts_ends:()=>Ue,text_eval:()=>si,text_find:()=>We,text_format:()=>ze,text_format_noreturn:()=>ii,text_join:()=>Pe,text_join_seq:()=>Ke,text_length:()=>be,text_random_char:()=>Ve,text_replace:()=>Je,text_split:()=>qe,text_strip:()=>Qe,text_substring:()=>Ge,text_substring2:()=>Be,text_substring3:()=>Ze,text_textarea:()=>fe});var o={};t.r(o),t.d(o,{ENUMERATE:()=>Ui,content_in_lists:()=>ki,enumerate:()=>wi,list_many_input:()=>Di,list_tolist:()=>vi,list_tolist2:()=>Gi,list_trig:()=>Ai,lists_2d_get_col_row_data:()=>ri,lists_2d_get_data_with_col_row:()=>ui,lists_append_extend:()=>hi,lists_change_to:()=>Ni,lists_change_to_general:()=>Fi,lists_clear:()=>ci,lists_create_with:()=>di,lists_create_with2:()=>Yi,lists_create_with_container:()=>Ii,lists_create_with_item:()=>Ti,lists_create_with_noreturn:()=>fi,lists_create_with_text:()=>li,lists_create_with_text2:()=>Xi,lists_del_general:()=>Pi,lists_find:()=>Si,lists_getIndex3:()=>bi,lists_getSublist3:()=>yi,lists_get_index:()=>pi,lists_get_random_item:()=>mi,lists_get_random_sublist:()=>Ei,lists_get_sublist:()=>ai,lists_insert_value:()=>Oi,lists_insert_value2:()=>Vi,lists_pop:()=>Ci,lists_remove_at:()=>gi,lists_remove_at2:()=>Bi,lists_reverse:()=>Ri,lists_setIndex3:()=>xi,lists_set_index:()=>Mi,lists_sort:()=>Li});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>_n,dicts_add_or_change:()=>ji,dicts_clear:()=>tn,dicts_create_with:()=>Wi,dicts_create_with_container:()=>Ki,dicts_create_with_item:()=>Ji,dicts_create_with_noreturn:()=>un,dicts_deldict:()=>on,dicts_delete:()=>$i,dicts_get:()=>Qi,dicts_get_default:()=>zi,dicts_items:()=>en,dicts_keys:()=>qi,dicts_length:()=>sn,dicts_pop:()=>pn,dicts_setdefault:()=>an,dicts_to_json:()=>dn,dicts_to_json2:()=>Tn,dicts_to_to:()=>In,dicts_todict:()=>rn,dicts_update:()=>Zi,dicts_values:()=>nn,json_to_dicts:()=>ln});var p={};t.r(p),t.d(p,{logic_boolean:()=>Rn,logic_compare:()=>hn,logic_compare_continous:()=>mn,logic_is:()=>Sn,logic_is_in:()=>Cn,logic_negate:()=>On,logic_null:()=>cn,logic_operation:()=>En,logic_tobool:()=>An,logic_true_or_false:()=>gn});var a={};t.r(a),t.d(a,{sdcard_mount:()=>qn,sdcard_use_spi_init:()=>Jn,storage_can_write_ornot:()=>Xn,storage_change_dir:()=>Wn,storage_close_file:()=>yn,storage_delete_file:()=>Vn,storage_file_seek:()=>Un,storage_file_tell:()=>Gn,storage_file_write:()=>Fn,storage_fileopen:()=>Nn,storage_fileopen_new:()=>Dn,storage_fileopen_new_encoding:()=>fn,storage_get_a_line:()=>Yn,storage_get_contents:()=>vn,storage_get_contents_without_para:()=>Pn,storage_get_current_dir:()=>wn,storage_get_file_size:()=>Bn,storage_get_filename:()=>bn,storage_is_file:()=>Kn,storage_list_all_files:()=>xn,storage_make_dir:()=>kn,storage_open_file_with_os:()=>Ln,storage_rename:()=>Hn});var u={};t.r(u),t.d(u,{procedures_callnoreturn:()=>Zn,procedures_callreturn:()=>ts,procedures_defnoreturn:()=>Qn,procedures_defreturn:()=>zn,procedures_ifreturn:()=>es,procedures_mutatorarg:()=>$n,procedures_mutatorcontainer:()=>jn,procedures_return:()=>is});var r={};t.r(r),t.d(r,{tuple_change_to:()=>Ts,tuple_create_with:()=>ss,tuple_create_with_container:()=>os,tuple_create_with_item:()=>_s,tuple_create_with_noreturn:()=>Es,tuple_create_with_text2:()=>ps,tuple_create_with_text_return:()=>as,tuple_del:()=>ds,tuple_find:()=>Ms,tuple_getIndex:()=>us,tuple_getSublist:()=>ms,tuple_get_random_item:()=>Rs,tuple_get_sublist:()=>Os,tuple_input:()=>gs,tuple_join:()=>ls,tuple_length:()=>rs,tuple_max:()=>Is,tuple_totuple:()=>cs,tuple_trig:()=>hs});var d={};t.r(d),t.d(d,{set_add_discard:()=>vs,set_clear:()=>fs,set_create_with:()=>Ss,set_create_with_container:()=>As,set_create_with_item:()=>Ls,set_create_with_text_return:()=>bs,set_length:()=>Ns,set_operate:()=>Fs,set_operate_update:()=>Ps,set_pop:()=>Ds,set_sub:()=>Ys,set_toset:()=>ys,set_update:()=>Xs});var l={};t.r(l),t.d(l,{html_content:()=>Us,html_content_more:()=>ws,html_document:()=>Vs,html_form:()=>Hs,html_head_body:()=>Gs,html_style:()=>ks,html_style_color:()=>Ks,html_style_content:()=>Ws,html_text:()=>Js,html_title:()=>Bs});var I={};t.r(I),t.d(I,{attribute_access:()=>po,function_call:()=>so,function_call_container:()=>oo,function_call_item:()=>_o,raw_block:()=>zs,raw_empty:()=>$s,raw_expression:()=>js,raw_table:()=>Qs,text_comment:()=>Zs,text_print_multiple:()=>eo,text_print_multiple_container:()=>io,text_print_multiple_item:()=>no,type_check:()=>to});var T={};t.r(T),t.d(T,{controls_type:()=>Io,controls_typeLists:()=>To,lists_zip:()=>Mo,unpack_iterable_object:()=>ho,variables_change:()=>ro,variables_get:()=>ao,variables_global:()=>lo,variables_set:()=>uo});var M={};t.r(M),t.d(M,{Panic_with_status_code:()=>Lo,base_setup:()=>Eo,controls_delay:()=>Ao,controls_flow_statements:()=>So,controls_for:()=>co,controls_forEach:()=>Po,controls_for_range:()=>go,controls_if:()=>Oo,controls_interrupts:()=>fo,controls_lambda:()=>Yo,controls_main:()=>mo,controls_millis:()=>No,controls_nointerrupts:()=>Fo,controls_pass:()=>bo,controls_range:()=>vo,controls_repeat:()=>ko,controls_repeat_ext:()=>Vo,controls_thread:()=>yo,controls_try_finally:()=>Ro,controls_whileUntil:()=>Co,datetime_fromtimestamp:()=>Ho,do_while:()=>xo,garbage_collection:()=>Bo,gene_unique_identifier:()=>Wo,get_mem_alloc:()=>Go,get_mem_free:()=>Uo,get_unique_identifier:()=>wo,reset:()=>Do,time_sleep:()=>Xo});var h={};t.r(h),t.d(h,{base_map:()=>l_,generate_cartesian_product:()=>T_,math_arithmetic:()=>zo,math_bit:()=>Qo,math_constant:()=>Jo,math_constant_mp:()=>qo,math_constrain:()=>o_,math_dec:()=>t_,math_degree_to_radian:()=>h_,math_indexer_number:()=>a_,math_map:()=>s_,math_max_min:()=>i_,math_number:()=>Ko,math_number_base_conversion:()=>__,math_radian_to_degree:()=>M_,math_random:()=>n_,math_random_seed:()=>p_,math_round:()=>u_,math_selfcalcu:()=>jo,math_single:()=>$o,math_to_int:()=>e_,math_trig:()=>Zo,text_to_number:()=>r_,text_to_number_skulpt:()=>d_,turn_to_int:()=>I_});var m={};t.r(m),t.d(m,{ascii_to_char:()=>c_,char_to_ascii:()=>g_,number_to_text:()=>C_,os_system:()=>K_,text:()=>m_,text_capital:()=>v_,text_center:()=>Y_,text_char:()=>O_,text_char_at:()=>L_,text_char_at2:()=>A_,text_char_at3:()=>k_,text_compareTo:()=>w_,text_compare_to:()=>f_,text_encode:()=>H_,text_equals_starts_ends:()=>D_,text_eval:()=>W_,text_find:()=>X_,text_format:()=>B_,text_format_noreturn:()=>G_,text_join:()=>R_,text_join_seq:()=>b_,text_length:()=>S_,text_random_char:()=>N_,text_replace:()=>y_,text_split:()=>x_,text_strip:()=>V_,text_substring:()=>P_,text_substring2:()=>F_,text_substring3:()=>U_,text_textarea:()=>E_});var E={};t.r(E),t.d(E,{content_in_lists:()=>Lp,enumerate:()=>Ap,list_many_input:()=>lp,list_tolist:()=>Cp,list_tolist2:()=>Sp,list_trig:()=>up,lists_2d_get_col_row_data:()=>Q_,lists_2d_get_data_with_col_row:()=>q_,lists_append_extend:()=>tp,lists_change_to:()=>dp,lists_change_to_general:()=>Tp,lists_clear:()=>op,lists_create_with:()=>z_,lists_create_with2:()=>hp,lists_create_with_noreturn:()=>Ip,lists_create_with_text:()=>j_,lists_create_with_text2:()=>mp,lists_del_general:()=>Mp,lists_find:()=>_p,lists_getIndex3:()=>Ep,lists_getSublist3:()=>Op,lists_get_index:()=>$_,lists_get_random_item:()=>ep,lists_get_random_sublist:()=>ip,lists_get_sublist:()=>J_,lists_insert_value:()=>np,lists_insert_value2:()=>cp,lists_pop:()=>ap,lists_remove_at:()=>pp,lists_remove_at2:()=>gp,lists_reverse:()=>sp,lists_setIndex3:()=>Rp,lists_set_index:()=>Z_,lists_sort:()=>rp});var O={};t.r(O),t.d(O,{dicts_add_change_del:()=>Bp,dicts_add_or_change:()=>Pp,dicts_clear:()=>Xp,dicts_create_with:()=>Np,dicts_create_with_noreturn:()=>wp,dicts_deldict:()=>Vp,dicts_delete:()=>vp,dicts_get:()=>fp,dicts_get_default:()=>Fp,dicts_items:()=>bp,dicts_keys:()=>Dp,dicts_length:()=>xp,dicts_pop:()=>Gp,dicts_setdefault:()=>Up,dicts_to_json:()=>Hp,dicts_to_json2:()=>Jp,dicts_to_to:()=>Kp,dicts_todict:()=>kp,dicts_update:()=>Yp,dicts_values:()=>yp,json_to_dicts:()=>Wp});var R={};t.r(R),t.d(R,{logic_boolean:()=>$p,logic_compare:()=>qp,logic_compare_continous:()=>Qp,logic_is:()=>ia,logic_is_in:()=>ea,logic_negate:()=>jp,logic_null:()=>Zp,logic_operation:()=>zp,logic_tobool:()=>na,logic_true_or_false:()=>ta});var c={};t.r(c),t.d(c,{sdcard_mount:()=>La,sdcard_use_spi_init:()=>Aa,storage_can_write_ornot:()=>la,storage_change_dir:()=>Ra,storage_close_file:()=>Ta,storage_delete_file:()=>ha,storage_file_seek:()=>Oa,storage_file_tell:()=>Ea,storage_file_write:()=>aa,storage_fileopen:()=>oa,storage_fileopen_new:()=>_a,storage_fileopen_new_encoding:()=>pa,storage_get_a_line:()=>da,storage_get_contents:()=>ra,storage_get_contents_without_para:()=>ua,storage_get_current_dir:()=>ca,storage_get_file_size:()=>ma,storage_get_filename:()=>Ia,storage_is_file:()=>Sa,storage_list_all_files:()=>Ma,storage_make_dir:()=>ga,storage_open_file_with_os:()=>sa,storage_rename:()=>Ca});var g={};t.r(g),t.d(g,{procedures_callnoreturn:()=>Fa,procedures_callreturn:()=>fa,procedures_defnoreturn:()=>Da,procedures_defreturn:()=>Na,procedures_ifreturn:()=>Pa,procedures_return:()=>va});var C={};t.r(C),t.d(C,{tuple_change_to:()=>Ua,tuple_create_with:()=>Ya,tuple_create_with_noreturn:()=>Wa,tuple_create_with_text2:()=>Xa,tuple_create_with_text_return:()=>ba,tuple_del:()=>Va,tuple_find:()=>wa,tuple_getIndex:()=>ya,tuple_getSublist:()=>Ha,tuple_get_random_item:()=>Ja,tuple_get_sublist:()=>Ka,tuple_input:()=>Qa,tuple_join:()=>Ba,tuple_length:()=>xa,tuple_max:()=>Ga,tuple_totuple:()=>qa,tuple_trig:()=>ka});var S={};t.r(S),t.d(S,{set_add_discard:()=>iu,set_clear:()=>Za,set_create_with:()=>za,set_create_with_text_return:()=>ou,set_length:()=>ja,set_operate:()=>tu,set_operate_update:()=>eu,set_pop:()=>$a,set_sub:()=>nu,set_toset:()=>_u,set_update:()=>su});var A={};t.r(A),t.d(A,{html_content:()=>ru,html_content_more:()=>du,html_document:()=>pu,html_form:()=>Iu,html_head_body:()=>uu,html_style:()=>lu,html_style_content:()=>Tu,html_text:()=>Mu,html_title:()=>au});var L={};t.r(L),t.d(L,{attribute_access:()=>gu,function_call:()=>cu,raw_block:()=>hu,raw_empty:()=>Eu,raw_expression:()=>mu,raw_table:()=>Ou,type_check:()=>Ru});var N={};t.r(N),t.d(N,{PIN_init:()=>Nr,actuator_extern_get_led_bright:()=>yu,actuator_extern_get_led_state:()=>xu,actuator_extern_led_bright:()=>bu,actuator_extern_led_brightness:()=>Vu,actuator_ms32006_dcmotor:()=>Ju,actuator_ms32006_init:()=>Ku,actuator_ms32006_stepper:()=>qu,actuator_neopixel_init:()=>Qu,actuator_neopixel_rgb:()=>zu,actuator_neopixel_rgb_all:()=>ju,actuator_neopixel_rgb_show_all_chase:()=>tr,actuator_neopixel_rgb_show_all_rainbow:()=>Zu,actuator_neopixel_write:()=>$u,actuator_use_uart_init:()=>er,esp32_music_get_tempo_extern:()=>vu,esp32_music_pitch:()=>Du,esp32_music_pitch_init:()=>Nu,esp32_music_pitch_with_time:()=>fu,esp32_music_play_list:()=>Fu,esp32_music_reset_extern:()=>Yu,esp32_music_set_tempo_extern:()=>Pu,esp32_music_stop:()=>Xu,mixbot_actuator_extern_get_addr:()=>Ar,mixbot_actuator_extern_set_addr:()=>Lr,mixbot_addr_extern:()=>lr,parrot_PIN_init:()=>Pr,parrot_move_speed:()=>vr,pin_led_bright:()=>Dr,player_insert_music:()=>pr,player_play_music:()=>_r,player_set_mode:()=>or,player_set_play:()=>nr,player_set_volume:()=>sr,player_whether_stop:()=>ir,robot_led_extern:()=>hr,robot_led_extern_get_value:()=>mr,robot_motor_extern:()=>Ir,robot_motor_extern_get_speed:()=>Tr,robot_servo_extern_absolute_run:()=>cr,robot_servo_extern_get_status:()=>Er,robot_servo_extern_relative_continue:()=>Sr,robot_servo_extern_relative_origin:()=>gr,robot_servo_extern_relative_run:()=>Cr,robot_servo_extern_stop:()=>Rr,robot_servo_extern_stop_mode:()=>Or,robot_traffic_light_extern:()=>Mr,servo_PIN_init:()=>fr,servo_get_angle:()=>Hu,servo_get_speed:()=>Wu,servo_init:()=>Bu,servo_move:()=>Gu,servo_move_angle:()=>Fr,servo_set_angle:()=>wu,servo_set_speed:()=>ku,servo_speed_360:()=>Uu,syn6288_builtin_voice:()=>rr,syn6288_get_voice:()=>ur,syn6288_set_voice:()=>ar,syn6288_tts_play:()=>dr});var D={};t.r(D),t.d(D,{actuator_dc_motor:()=>rd,actuator_dc_motor_stop:()=>dd,actuator_get_led_bright:()=>xr,actuator_get_led_state:()=>Vr,actuator_led_bright:()=>yr,actuator_led_brightness:()=>Br,actuator_mixbot_buzzer_on_off:()=>hd,actuator_mixgo_nova_mic_get:()=>cd,actuator_mixgo_nova_mic_set:()=>Rd,actuator_mixgo_nova_onboard_music_pitch:()=>Nd,actuator_mixgo_nova_onboard_music_stop:()=>Dd,actuator_mixgo_nova_play_audio:()=>Ad,actuator_mixgo_nova_play_online_audio:()=>Ld,actuator_mixgo_nova_record_audio:()=>Sd,actuator_mixgo_nova_voice_get:()=>Cd,actuator_mixgo_nova_voice_set:()=>gd,actuator_mixgo_zero_led_color:()=>Gr,actuator_onboard_neopixel_rgb:()=>Kr,actuator_onboard_neopixel_rgb_all:()=>Jr,actuator_onboard_neopixel_rgb_show_all_chase:()=>Qr,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>qr,actuator_onboard_neopixel_write:()=>zr,actuator_rm_onboard_neopixel_rgb:()=>jr,actuator_rm_onboard_neopixel_rgb_all:()=>$r,actuator_rm_onboard_neopixel_rgb_show_all_chase:()=>Zr,actuator_stepper_keep:()=>ad,actuator_stepper_stop:()=>ud,analog_ble_keyboard_init:()=>Ud,analog_ble_keyboard_input:()=>Hd,analog_ble_keyboard_mouse_init:()=>$d,analog_ble_keyboard_mouse_input:()=>il,analog_ble_keyboard_mouse_send_battery:()=>el,analog_ble_keyboard_mouse_str:()=>nl,analog_ble_keyboard_send_battery:()=>Kd,analog_ble_keyboard_str:()=>Wd,analog_ble_mouse_init:()=>Jd,analog_ble_mouse_input:()=>zd,analog_ble_mouse_keyboard_input:()=>sl,analog_ble_mouse_send_battery:()=>jd,analog_keyboard_input:()=>vd,analog_keyboard_str:()=>Gd,analog_mouse_input:()=>Vd,bitbot_motor:()=>Od,bitbot_move:()=>md,bitbot_stop:()=>Ed,ble_keyboard_connect:()=>kd,ble_keyboard_get_mac:()=>wd,ble_keyboard_mouse_connect:()=>tl,ble_keyboard_mouse_get_mac:()=>Zd,ble_mouse_connect:()=>Qd,ble_mouse_get_mac:()=>qd,cc_number:()=>Wr,educore_ble_keyboard_input:()=>Tl,educore_ble_sensor_connected:()=>Il,educore_ble_sensor_init:()=>ll,educore_buzzer:()=>ol,educore_buzzer_play_tone:()=>_l,educore_buzzer_play_tone_time:()=>pl,educore_buzzer_stop:()=>al,educore_neopixel_clear:()=>dl,educore_neopixel_rgb:()=>rl,educore_rgb_light:()=>ul,esp32_music_get_tempo:()=>ed,esp32_music_reset:()=>id,esp32_music_set_tempo:()=>td,esp32_onboard_music_pitch:()=>nd,esp32_onboard_music_pitch_with_time:()=>sd,esp32_onboard_music_play_list:()=>_d,esp32_onboard_music_stop:()=>od,general_key:()=>Xd,general_key_tuple:()=>bd,generalkey_container:()=>yd,generalkey_create_with_item:()=>xd,get_keyboard_light:()=>Ml,get_power_output:()=>Fd,ledswitch:()=>br,mixbot_motor:()=>Md,mixbot_motor_status:()=>ld,mixbot_move:()=>Id,mixbot_stop:()=>Td,mouse_key:()=>Bd,number:()=>Xr,rm_actuator_get_led_bright:()=>wr,rm_actuator_get_led_state:()=>kr,rm_actuator_led_bright:()=>Ur,rm_actuator_led_brightness:()=>Hr,rm_motor:()=>pd,set_all_power_output:()=>Pd,set_power_output:()=>fd,special_key:()=>Yd});var f={};t.r(f),t.d(f,{ai_sensor_20object:()=>Ql,ai_sensor_ailocal_class:()=>Vl,ai_sensor_ailocal_class_result:()=>Bl,ai_sensor_ailocal_train:()=>xl,ai_sensor_asr_recognize:()=>Hl,ai_sensor_audio_play:()=>Ul,ai_sensor_audio_record:()=>Gl,ai_sensor_barcode:()=>Cl,ai_sensor_circle:()=>fl,ai_sensor_classifier_faces:()=>ql,ai_sensor_color:()=>Yl,ai_sensor_color_chases:()=>yl,ai_sensor_color_chases_result:()=>bl,ai_sensor_config:()=>cl,ai_sensor_face:()=>Jl,ai_sensor_find_20objects:()=>zl,ai_sensor_find_barcodes:()=>Sl,ai_sensor_find_circles:()=>Fl,ai_sensor_find_colors:()=>Xl,ai_sensor_find_licenseplates:()=>Kl,ai_sensor_find_lines:()=>Dl,ai_sensor_find_qrcodes:()=>Rl,ai_sensor_find_rects:()=>vl,ai_sensor_find_tags:()=>Ll,ai_sensor_licenseplate:()=>Wl,ai_sensor_line:()=>Nl,ai_sensor_qrcode:()=>El,ai_sensor_qrcode_lite:()=>Ol,ai_sensor_rect:()=>Pl,ai_sensor_rgb:()=>gl,ai_sensor_tag:()=>Al,ai_sensor_use_uart_init:()=>ml,ai_sensor_yolo_recognize:()=>wl,ai_sensor_yolo_recognize_result:()=>kl});var F={};t.r(F),t.d(F,{MICROPYTHON_AI_Speech_asr:()=>Zl,MICROPYTHON_AI_Speech_unit:()=>$l,MICROPYTHON_AI_client:()=>jl});var P={};t.r(P),t.d(P,{mpython_blynk_app_data:()=>TI,mpython_blynk_app_notify:()=>pI,mpython_blynk_email:()=>rI,mpython_blynk_get_timers:()=>dI,mpython_blynk_on_connected:()=>sI,mpython_blynk_on_disconnected:()=>nI,mpython_blynk_run:()=>_I,mpython_blynk_sensor_data_to_app:()=>II,mpython_blynk_set_property:()=>uI,mpython_blynk_setup:()=>MI,mpython_blynk_stop_timers:()=>aI,mpython_blynk_sync_virtual:()=>iI,mpython_blynk_terminal_widget_vpin:()=>eI,mpython_blynktimer:()=>lI,mpython_blynktimer_run:()=>oI});var v={};t.r(v),t.d(v,{communicate_bluetooth_central_init:()=>jI,communicate_bluetooth_connect:()=>eT,communicate_bluetooth_disconnect:()=>iT,communicate_bluetooth_handle:()=>pT,communicate_bluetooth_is_connected:()=>sT,communicate_bluetooth_mac:()=>tT,communicate_bluetooth_peripheral_init:()=>$I,communicate_bluetooth_recv:()=>oT,communicate_bluetooth_recv_only:()=>_T,communicate_bluetooth_scan:()=>ZI,communicate_bluetooth_send:()=>nT,communicate_espnow_init:()=>aT,communicate_espnow_init_new:()=>uT,communicate_i2c_available:()=>YI,communicate_i2c_init:()=>OI,communicate_i2c_master_read:()=>vI,communicate_i2c_onboard:()=>mI,communicate_i2c_read:()=>RI,communicate_i2c_scan:()=>gI,communicate_i2c_write:()=>cI,communicate_ir_recv_init:()=>UI,communicate_ir_send_init:()=>KI,communicate_ow_init:()=>bI,communicate_ow_read:()=>xI,communicate_ow_reset:()=>GI,communicate_ow_scan:()=>yI,communicate_ow_select:()=>BI,communicate_ow_write:()=>VI,communicate_spi_buffer:()=>AI,communicate_spi_init:()=>CI,communicate_spi_onboard:()=>EI,communicate_spi_read:()=>LI,communicate_spi_read_output:()=>NI,communicate_spi_readinto:()=>DI,communicate_spi_readinto_output:()=>fI,communicate_spi_set:()=>SI,communicate_spi_write:()=>FI,communicate_spi_write_readinto:()=>PI,espnow_radio_channel:()=>MT,espnow_radio_channel_new:()=>mT,espnow_radio_on_off:()=>ET,espnow_radio_rec:()=>RT,espnow_radio_recv:()=>gT,espnow_radio_recv_certain_msg:()=>CT,espnow_radio_recv_certain_msg_new:()=>AT,espnow_radio_recv_msg:()=>cT,espnow_radio_recv_new:()=>ST,espnow_radio_send:()=>OT,espnow_radio_txpower:()=>hT,i2c_available:()=>JT,i2c_init:()=>YT,i2c_master_reader2:()=>KT,i2c_read:()=>XT,i2c_scan:()=>yT,i2c_slave_onreceive:()=>XI,i2c_write:()=>bT,internal_variable:()=>wI,ir_recv_timeout:()=>WI,ir_transmit_busy:()=>zI,ir_transmit_conventional_data:()=>JI,ir_transmit_raw_code:()=>QI,ir_transmit_study_code:()=>qI,ir_whether_recv:()=>HI,lora_init:()=>LT,lora_packet:()=>NT,lora_recv:()=>fT,lora_send:()=>DT,network_espnow_info:()=>dT,network_espnow_mac:()=>rT,network_espnow_recv:()=>lT,network_espnow_recv_handle:()=>TT,network_espnow_send:()=>IT,recv_fun:()=>kI,spi_buffer:()=>BT,spi_init:()=>xT,spi_read:()=>GT,spi_read_output:()=>UT,spi_readinto:()=>wT,spi_readinto_output:()=>kT,spi_set:()=>VT,spi_write:()=>HT,spi_write_readinto:()=>WT,urequests_attribute:()=>PT,urequests_get:()=>FT,urequests_method:()=>vT});var Y={};t.r(Y),t.d(Y,{display_animate:()=>AM,display_blink_rate:()=>cM,display_circle:()=>LM,display_color_seclet:()=>VM,display_draw_4strings:()=>MM,display_fill:()=>SM,display_get_screen_image:()=>RM,display_help:()=>DM,display_image_size:()=>hM,display_lcd_use_i2c_init:()=>HM,display_line:()=>EM,display_line_arbitrarily:()=>OM,display_matrix_extern_bright_point:()=>pM,display_matrix_extern_bright_screen:()=>uM,display_matrix_extern_clear:()=>rM,display_matrix_extern_get_pixel:()=>_M,display_matrix_extern_get_screen_pixel:()=>aM,display_matrix_extern_image_builtins:()=>dM,display_matrix_extern_scroll_string:()=>eM,display_matrix_extern_scroll_string_delay:()=>iM,display_matrix_extern_shift:()=>oM,display_matrix_extern_show_frame_string:()=>nM,display_matrix_extern_show_frame_string_delay:()=>sM,display_matrix_extern_show_image:()=>ZT,display_matrix_extern_show_image_or_string_delay:()=>tM,display_matrix_use_i2c_init:()=>$T,display_oled_drawPixel:()=>FM,display_oled_showBitmap:()=>fM,display_oled_use_i2c_init:()=>QM,display_onoff:()=>CM,display_rect:()=>mM,display_rgb_color:()=>gM,display_tm1650_power:()=>vM,display_tm1650_set_brightness:()=>bM,display_tm1650_show_dot:()=>XM,display_tm1650_show_num:()=>YM,display_tm_use_i2c_init:()=>PM,display_triangle:()=>NM,display_use_i2c_init:()=>TM,extern_oled_bright_point:()=>_h,extern_oled_clear:()=>ph,extern_oled_get_pixel:()=>oh,extern_oled_hvline:()=>uh,extern_oled_line:()=>rh,extern_oled_scroll_string:()=>th,extern_oled_scroll_string_delay:()=>eh,extern_oled_shape_rect:()=>ah,extern_oled_shift:()=>sh,extern_oled_show_frame_string:()=>ih,extern_oled_show_frame_string_delay:()=>nh,extern_oled_show_image:()=>zM,extern_oled_show_image_or_string_delay:()=>ZM,extern_oled_show_image_xy:()=>jM,extern_oled_show_string:()=>$M,lcd_backlight:()=>JM,lcd_clear:()=>qM,lcd_print_string:()=>KM,lcd_show_image_or_string_delay:()=>WM,matrix_extern_image_arithmetic:()=>lM,matrix_extern_image_invert:()=>IM,tft_fill:()=>wM,tft_line_arbitrarily:()=>kM,tft_scroll_string_delay:()=>GM,tft_show_frame_string_delay:()=>UM,tft_show_image_or_string_delay:()=>BM,tft_show_image_xy:()=>xM,tft_use_spi_init:()=>yM});var X={};t.r(X),t.d(X,{bitbot_display_bitmap_create:()=>nm,bitbot_display_image_create:()=>im,display_available:()=>Ph,display_bitmap_create:()=>Rh,display_bright_point:()=>Nh,display_bright_screen:()=>fh,display_clear:()=>Fh,display_get_pixel:()=>Lh,display_get_screen_pixel:()=>Dh,display_image_builtins:()=>ch,display_image_builtins_all:()=>gh,display_image_create:()=>Oh,display_scroll_string:()=>Th,display_scroll_string_delay:()=>Mh,display_shift:()=>Ah,display_show_frame_string:()=>mh,display_show_frame_string_delay:()=>Eh,display_show_image:()=>lh,display_show_image_or_string_delay:()=>Ih,draw_pointer:()=>Rm,image_arithmetic:()=>Ch,image_invert:()=>Sh,mixbot_display_bitmap_create:()=>jh,mixbot_display_bright_screen:()=>tm,mixbot_display_get_ambientbright:()=>Zh,mixbot_display_get_screen_pixel:()=>$h,mixbot_display_image_create:()=>zh,mixbot_display_rotate:()=>em,mixgo_display_bitmap_create:()=>xh,mixgo_display_image_create_new:()=>yh,mixgome_display_bitmap_create:()=>Yh,mixgome_display_font:()=>Vh,mixgome_display_image_create:()=>vh,mixgomini_display_bitmap_create:()=>bh,mixgomini_display_image_create:()=>Xh,mpython_display_hvline:()=>Jh,mpython_display_line:()=>qh,mpython_display_shape_rect:()=>Kh,mpython_pbm_image:()=>Qh,nova_draw_pointer:()=>cm,onboard_oled_bright_point:()=>Wh,onboard_oled_scroll_string_delay:()=>kh,onboard_oled_show_frame_string_delay:()=>Hh,onboard_oled_show_image:()=>Bh,onboard_oled_show_image_or_string_delay:()=>wh,onboard_oled_show_image_xy:()=>Gh,onboard_oled_show_string:()=>Uh,onboard_tft_bright_point:()=>lm,onboard_tft_bright_screen:()=>Dm,onboard_tft_clear:()=>fm,onboard_tft_clock_clear:()=>Em,onboard_tft_clock_draw:()=>mm,onboard_tft_clock_get_rtctime:()=>Mm,onboard_tft_clock_init:()=>Tm,onboard_tft_clock_set_time:()=>hm,onboard_tft_display_hvline:()=>um,onboard_tft_display_line:()=>rm,onboard_tft_display_shape_circle:()=>Om,onboard_tft_display_shape_rect:()=>am,onboard_tft_fill:()=>Im,onboard_tft_get_pixel:()=>dm,onboard_tft_get_screen_pixel:()=>Nm,onboard_tft_scroll_string:()=>Sm,onboard_tft_scroll_string_delay:()=>hh,onboard_tft_shift:()=>Lm,onboard_tft_show_frame_string:()=>Am,onboard_tft_show_frame_string_delay:()=>pm,onboard_tft_show_image:()=>Cm,onboard_tft_show_image_or_string_delay:()=>_m,onboard_tft_show_image_xy:()=>sm,onboard_tft_show_image_xy_direct:()=>om,onboard_tft_show_texts:()=>gm});var b={};t.r(b),t.d(b,{factory_block:()=>Jm,factory_block_return:()=>qm,factory_block_return_with_textarea:()=>zm,factory_block_with_textarea:()=>Qm,factory_callMethod_noreturn:()=>Wm,factory_callMethod_return:()=>Km,factory_create_with_container:()=>Um,factory_create_with_item:()=>wm,factory_declare:()=>Hm,factory_from_import:()=>Vm,factory_function_noreturn:()=>Gm,factory_function_return:()=>km,factory_import:()=>Bm,folding_block:()=>jm});var y={};t.r(y),t.d(y,{controls_pin_attachInterrupt:()=>OE,inout_analog_atten:()=>pE,inout_analog_read:()=>_E,inout_analog_read_init:()=>IE,inout_analog_write:()=>nE,inout_analog_write_init:()=>lE,inout_analog_write_set:()=>sE,inout_analog_write_set_freq:()=>hE,inout_digital_init:()=>rE,inout_digital_read:()=>eE,inout_digital_write:()=>tE,inout_highlow:()=>Zm,inout_pinMode:()=>ME,inout_pin_attachInterrupt:()=>uE,inout_pin_pressed:()=>aE,inout_pin_pressed_init:()=>TE,inout_pwm_analog_write:()=>iE,inout_pwm_analog_write_init:()=>dE,inout_pwm_analog_write_set_freq:()=>oE,pin_pressed:()=>EE,pin_pressed_init:()=>mE});var x={};t.r(x),t.d(x,{IOT_CONNECT_OLLAMA:()=>iO,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>kE,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>wE,IOT_EMQX_PING:()=>GE,IOT_FORMATTING:()=>VE,IOT_FORMAT_STRING:()=>BE,IOT_MIXIO_NTP:()=>UE,IOT_MIXIO_PUBLISH:()=>PE,IOT_MIXIO_SUBSCRIBE:()=>vE,iot_checkonenet:()=>ZE,iot_client_onboard:()=>WE,iot_connect_ollama:()=>eO,iot_connect_openai:()=>nO,iot_create_with_item:()=>fE,iot_http_client:()=>KE,iot_http_data:()=>JE,iot_mixio_check:()=>bE,iot_mixio_connect:()=>FE,iot_mixio_connect_only:()=>XE,iot_mixio_disconnect:()=>YE,iot_mixio_format_msg:()=>xE,iot_mixio_format_topic:()=>yE,iot_mixly_key:()=>HE,iot_mqtt_client:()=>qE,iot_mqtt_data:()=>QE,iot_onenet_check:()=>SE,iot_onenet_connect:()=>gE,iot_onenet_disconnect:()=>CE,iot_onenet_publish:()=>LE,iot_onenet_publish_dict:()=>AE,iot_onenetconnect:()=>jE,iot_onenetdisconnect:()=>$E,iot_publish:()=>tO,iot_publish_container:()=>NE,iot_publish_item:()=>DE,iot_wifi_connect:()=>cE,iot_wificonnect:()=>zE,ollama_empty_history:()=>_O,use_ollama_llm_to_chat:()=>sO,use_ollama_llm_to_chat_return:()=>oO});var V={};t.r(V),t.d(V,{educore_mqtt_connect:()=>BO,educore_mqtt_connect_success:()=>kO,educore_mqtt_subscribe_message:()=>GO,educore_mqtt_topic_publish:()=>wO,educore_mqtt_topic_subscribe:()=>UO,educore_wifi_connect:()=>VO,network_ap_connect:()=>mO,network_connect:()=>lO,network_get_connect:()=>TO,network_get_wifi:()=>hO,network_init:()=>aO,network_is_active:()=>rO,network_open:()=>uO,network_scan:()=>dO,network_server:()=>EO,network_socket_accept:()=>CO,network_socket_bind:()=>RO,network_socket_close:()=>DO,network_socket_connect:()=>cO,network_socket_init:()=>OO,network_socket_listen:()=>gO,network_socket_receive:()=>SO,network_socket_receive_from:()=>LO,network_socket_send:()=>AO,network_socket_send_to:()=>NO,network_stop:()=>MO,network_wifi_connect:()=>IO,ntptime_address:()=>YO,ntptime_time:()=>vO,requests_attribute:()=>FO,requests_attribute2:()=>xO,requests_get:()=>fO,requests_get2:()=>bO,requests_method:()=>PO,requests_post:()=>yO});var B={};t.r(B),t.d(B,{CI130X_BROADCAST:()=>TR,CI130X_GET_THE_RECOGNIZED_CMD:()=>IR,CI130X_GET_WHETHER_IDENTIFY:()=>lR,CI130X_IDENTIFY_AND_SAVE:()=>dR,CI130X_SET_SYSTEM_CMD:()=>MR,HCSR04:()=>nc,PS2_Button:()=>pc,PS2_Buttons:()=>uc,PS2_Buttons_new:()=>Ic,PS2_State:()=>ac,PS2_init:()=>sc,PS2_init_new:()=>dc,PS2_stk:()=>rc,PS2_stk_new:()=>Tc,PS2_vibration:()=>_c,PS2_vibration_new:()=>lc,camera_sensor_init:()=>Hc,camera_sensor_result:()=>Wc,column_tube_foot:()=>zc,define_keyboards:()=>jc,educore_body_sensor:()=>Xc,educore_button_sensor_extern:()=>Vc,educore_camera_sensor:()=>kc,educore_infrared_sensor:()=>xc,educore_soilhum_sensor:()=>bc,educore_temp_sensor:()=>wc,educore_temphum_sensor:()=>yc,educore_ultrasonic_sensor:()=>Gc,esp32_s2_weather_init:()=>ZR,esp32_s2_weather_rain:()=>ec,esp32_s2_weather_wd:()=>tc,esp32_s2_weather_ws:()=>ic,extern_rfid_read:()=>BR,extern_rfid_readcontent:()=>UR,extern_rfid_readid:()=>GR,extern_rfid_status:()=>HR,extern_rfid_write:()=>wR,extern_rfid_write_return:()=>kR,get_keboards_value:()=>$c,gnss_get_data:()=>Ec,gnss_have_data:()=>mc,init_matrix_keyboard:()=>qc,interaction_whether_to_interaction:()=>uR,interaction_whether_to_interaction_SANT:()=>rR,line_tube_foot:()=>Qc,mixbot_sensor_extern_get_addr:()=>Lc,mixbot_sensor_extern_set_addr:()=>Nc,pm25_get_data:()=>hc,radar_set_DETECTION_THRESHOLD:()=>pR,radar_set_DETECTION_THRESHOLD_SANT:()=>aR,robot_button_extern_get_value:()=>Rc,robot_color_extern_get_value:()=>Ac,robot_infrared_extern_get_value:()=>gc,robot_infrared_extern_grey_get_value:()=>Cc,robot_potentiometer_extern_get_value:()=>Sc,robot_sonar_extern_get_value:()=>Dc,robot_sonar_extern_led:()=>fc,robot_touch_extern_get_value:()=>cc,sensor_APDS9960_extern:()=>mR,sensor_DS18X20:()=>sR,sensor_LTR308_extern:()=>ER,sensor_LTR390UV_extern:()=>cR,sensor_MAX30102_extern:()=>hR,sensor_QMC5883L_extern:()=>fR,sensor_VL530LX_extern:()=>gR,sensor_adxl345_get_acceleration:()=>zO,sensor_aht11_extern:()=>SR,sensor_bmp:()=>iR,sensor_compass_reset:()=>xR,sensor_dht11:()=>$O,sensor_hp203_extern:()=>AR,sensor_light_level:()=>jO,sensor_lm35:()=>oR,sensor_ltr381_extern:()=>OR,sensor_mixgo_extern_button_attachInterrupt:()=>qO,sensor_mixgo_extern_button_get_presses:()=>JO,sensor_mixgo_extern_button_is_pressed:()=>WO,sensor_mixgo_extern_button_was_pressed:()=>KO,sensor_mixgo_extern_light:()=>ZO,sensor_mixgo_extern_pin_near:()=>eR,sensor_mixgo_extern_sound:()=>tR,sensor_mixgoce_hot_wheel_degrees:()=>$R,sensor_mixgoce_hot_wheel_is_touched:()=>jR,sensor_mpu9250_attachGestureInterrupt:()=>QO,sensor_mpu9250_calibrate_compass:()=>XR,sensor_mpu9250_field_strength:()=>yR,sensor_mpu9250_gesture:()=>FR,sensor_mpu9250_get_acceleration:()=>PR,sensor_mpu9250_get_gyro:()=>YR,sensor_mpu9250_get_magnetic:()=>vR,sensor_mpu9250_temperature:()=>bR,sensor_ms5611_extern:()=>NR,sensor_ms5611_extern_altitude:()=>DR,sensor_read_humiture:()=>Bc,sensor_sht:()=>nR,sensor_shtc3_extern:()=>CR,sensor_spl06_001_extern:()=>LR,sensor_ucs12071_extern:()=>RR,sensor_use_i2c_init:()=>_R,sensor_use_spi_init:()=>VR,sensor_use_uart_init:()=>Mc,sensor_weather_solo_init:()=>Fc,sensor_weather_solo_rain:()=>Yc,sensor_weather_solo_wd:()=>Pc,sensor_weather_solo_ws:()=>vc,sensor_weigh_init:()=>Kc,tvoc_get_data:()=>Oc,ultrasonic_sensor_read_distance:()=>Uc,weather_data:()=>WR,weather_have_data:()=>KR,weather_set_label:()=>qR,weather_set_label_container:()=>QR,weather_set_label_item:()=>zR,weather_uart_mixio:()=>JR,weigh_sensor_get_weight:()=>Jc});var G={};t.r(G),t.d(G,{HCSR04:()=>Mg,RTC_set_date:()=>Tg,RTC_set_time:()=>Ig,bitbot_als_num:()=>SC,dht11:()=>PC,educore_button_sensor:()=>GC,educore_button_was_pressed:()=>UC,educore_gyroscope_sensor:()=>xC,educore_gyroscope_sensor_read:()=>VC,educore_gyroscope_sensor_shake:()=>BC,educore_light_sensor:()=>yC,educore_rfid_sensor:()=>wC,educore_rfid_sensor_scan:()=>kC,educore_rfid_sensor_scan_data:()=>HC,educore_voice_sensor:()=>XC,number1:()=>mg,number2:()=>Eg,number3:()=>Og,number4:()=>Rg,number5:()=>cg,number6:()=>gg,number7:()=>Cg,onboard_RTC_get_time:()=>Pg,onboard_RTC_get_time_str:()=>xg,onboard_RTC_get_timestamp:()=>vg,onboard_RTC_get_timetuple_to_str:()=>Vg,onboard_RTC_set_datetime:()=>bg,onboard_RTC_settime_string:()=>Xg,onboard_RTC_timestamp_totuple:()=>Yg,rfid_readcontent:()=>Wg,rfid_readid:()=>Hg,rfid_status:()=>qg,rfid_write:()=>Kg,rfid_write_return:()=>Jg,sensor_LTR308:()=>Bg,sensor_aht11:()=>Ug,sensor_bitbot_ALS:()=>CC,sensor_button_get_presses:()=>NC,sensor_button_is_pressed:()=>AC,sensor_button_was_pressed:()=>LC,sensor_distance_hrsc04:()=>lg,sensor_eulerangles:()=>zg,sensor_field_strength:()=>vC,sensor_get_acceleration:()=>Qg,sensor_get_temperature:()=>wg,sensor_get_the_coprocessor_version:()=>WC,sensor_hp203:()=>kg,sensor_light:()=>FC,sensor_mixbot_get_gyro:()=>gC,sensor_mixbot_patrol_calibrate:()=>OC,sensor_mixbot_patrol_value:()=>RC,sensor_mixbot_temperature:()=>cC,sensor_mixgo_LTR308:()=>fg,sensor_mixgo_button_attachInterrupt:()=>ng,sensor_mixgo_button_get_presses:()=>ig,sensor_mixgo_button_is_pressed:()=>tg,sensor_mixgo_button_was_pressed:()=>eg,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>pC,sensor_mixgo_cc_mmc5603_get_angle:()=>_C,sensor_mixgo_cc_mmc5603_get_magnetic:()=>oC,sensor_mixgo_light:()=>hg,sensor_mixgo_nova_LTR308:()=>Dg,sensor_mixgo_nova_pin_near:()=>Ng,sensor_mixgo_pin_near:()=>Lg,sensor_mixgo_pin_near_double:()=>Ag,sensor_mixgo_pin_near_single:()=>Sg,sensor_mixgo_pin_pressed:()=>ag,sensor_mixgo_sant_color:()=>Fg,sensor_mixgo_touch_slide:()=>dg,sensor_mixgocar42_button_attachInterrupt:()=>pg,sensor_mixgocar42_button_get_presses:()=>_g,sensor_mixgocar42_button_is_pressed:()=>sg,sensor_mixgocar42_button_was_pressed:()=>og,sensor_mixgocar_battery_left:()=>EC,sensor_mixgocar_pin_near:()=>hC,sensor_mixgocar_pin_near_line:()=>MC,sensor_mixgocar_pin_near_state_change:()=>mC,sensor_mixgoce_pin_pressed:()=>ug,sensor_mixgoce_temperature:()=>uC,sensor_mixgome_temperature:()=>aC,sensor_mpython_pin_pressed:()=>rg,sensor_mpython_qmi8658_get_gyro:()=>rC,sensor_mpython_qmi8658_temperature:()=>dC,sensor_onboard_compass_reset:()=>sC,sensor_onboard_mpu9250_calibrate_compass:()=>eC,sensor_onboard_mpu9250_field_strength:()=>nC,sensor_onboard_mpu9250_gesture:()=>jg,sensor_onboard_mpu9250_get_acceleration:()=>$g,sensor_onboard_mpu9250_get_gyro:()=>tC,sensor_onboard_mpu9250_get_magnetic:()=>Zg,sensor_onboard_mpu9250_temperature:()=>iC,sensor_pin_near:()=>fC,sensor_pin_pressed:()=>DC,sensor_read:()=>bC,sensor_rm_acc:()=>TC,sensor_rm_battery_left:()=>IC,sensor_rm_pin_near_double:()=>lC,sensor_rtc_init:()=>yg,sensor_sound:()=>Gg,sensor_temperature:()=>YC});var U={};t.r(U),t.d(U,{serial_any:()=>eS,serial_begin:()=>_S,serial_print:()=>zC,serial_print_byte:()=>QC,serial_print_hex:()=>$C,serial_println:()=>jC,serial_read_from_ai:()=>MS,serial_readline:()=>iS,serial_readstr:()=>tS,serial_readstr_until:()=>nS,serial_receive_data_event:()=>ZC,serial_send_to_ai:()=>TS,serial_softserial:()=>oS,serial_softserial_new:()=>sS,system_input:()=>pS,system_print:()=>aS,system_print_container:()=>lS,system_print_end:()=>rS,system_print_inline:()=>uS,system_print_item:()=>IS,system_print_many:()=>dS});var w={};t.r(w),t.d(w,{Panic_with_status_code:()=>OS,Timer_init:()=>vS,base_delay:()=>bS,controls_delay:()=>ES,controls_delay_new:()=>mS,controls_millis:()=>cS,controls_uname:()=>CS,raw_block:()=>gS,reset:()=>RS,system_bitbot_shutdown:()=>PS,system_machine_reset:()=>FS,system_ticks_diff:()=>LS,system_timer:()=>AS,system_timer_init:()=>NS,system_wdt_feed:()=>fS,system_wdt_init:()=>DS,time_ticks_diff:()=>XS,timer:()=>SS,timer2:()=>YS});var k={};t.r(k),t.d(k,{Air_daily_content:()=>QS,Air_now_content:()=>wS,Geo_moon_content:()=>jS,Geo_sun_content:()=>zS,Life_suggestion_content:()=>HS,Location_search_content:()=>KS,Tide_daily_content:()=>WS,WEATHER_DAILY:()=>VS,WEATHER_HOUR:()=>BS,WEATHER_NOW:()=>xS,Weather_alarm_content:()=>kS,Weather_daily:()=>JS,Weather_daily_content:()=>qS,Weather_now:()=>GS,Weather_now_content:()=>US});var H={};t.r(H),t.d(H,{PIN_init:()=>jA,actuator_extern_get_led_bright:()=>mA,actuator_extern_get_led_state:()=>EA,actuator_extern_led_bright:()=>hA,actuator_extern_led_brightness:()=>OA,actuator_ms32006_dcmotor:()=>oA,actuator_ms32006_init:()=>sA,actuator_ms32006_stepper:()=>_A,actuator_neopixel_init:()=>RA,actuator_neopixel_rgb:()=>CA,actuator_neopixel_rgb_all:()=>cA,actuator_neopixel_rgb_show_all_chase:()=>SA,actuator_neopixel_rgb_show_all_rainbow:()=>AA,actuator_neopixel_write:()=>gA,actuator_use_uart_init:()=>LA,esp32_music_get_tempo_extern:()=>lA,esp32_music_pitch:()=>aA,esp32_music_pitch_init:()=>pA,esp32_music_pitch_with_time:()=>uA,esp32_music_play_list:()=>IA,esp32_music_reset_extern:()=>TA,esp32_music_set_tempo_extern:()=>dA,esp32_music_stop:()=>rA,mixbot_actuator_extern_get_addr:()=>QA,mixbot_actuator_extern_set_addr:()=>zA,mixbot_addr_extern:()=>yA,parrot_PIN_init:()=>eL,parrot_move_speed:()=>iL,pin_led_bright:()=>$A,player_play_music:()=>PA,player_set_mode:()=>FA,player_set_play:()=>DA,player_set_volume:()=>fA,player_whether_stop:()=>NA,robot_led_extern:()=>GA,robot_led_extern_get_value:()=>UA,robot_motor_extern:()=>xA,robot_motor_extern_get_speed:()=>VA,robot_servo_extern_absolute_run:()=>WA,robot_servo_extern_get_status:()=>wA,robot_servo_extern_relative_continue:()=>qA,robot_servo_extern_relative_origin:()=>KA,robot_servo_extern_relative_run:()=>JA,robot_servo_extern_stop:()=>HA,robot_servo_extern_stop_mode:()=>kA,robot_traffic_light_extern:()=>BA,servo_PIN_init:()=>ZA,servo_get_angle:()=>iA,servo_get_speed:()=>nA,servo_init:()=>$S,servo_move:()=>MA,servo_move_angle:()=>tL,servo_set_angle:()=>tA,servo_set_speed:()=>eA,servo_speed_360:()=>ZS,syn6288_builtin_voice:()=>XA,syn6288_get_voice:()=>YA,syn6288_set_voice:()=>vA,syn6288_tts_play:()=>bA});var W={};t.r(W),t.d(W,{actuator_dc_motor:()=>FL,actuator_dc_motor_stop:()=>PL,actuator_get_led_bright:()=>IL,actuator_get_led_state:()=>TL,actuator_led_bright:()=>lL,actuator_led_brightness:()=>ML,actuator_mixbot_buzzer_on_off:()=>yL,actuator_mixgo_nova_mic_get:()=>UL,actuator_mixgo_nova_mic_set:()=>GL,actuator_mixgo_nova_onboard_music_pitch:()=>JL,actuator_mixgo_nova_onboard_music_stop:()=>qL,actuator_mixgo_nova_play_audio:()=>WL,actuator_mixgo_nova_play_online_audio:()=>KL,actuator_mixgo_nova_record_audio:()=>HL,actuator_mixgo_nova_voice_get:()=>kL,actuator_mixgo_nova_voice_set:()=>wL,actuator_mixgo_zero_led_color:()=>hL,actuator_onboard_neopixel_rgb:()=>CL,actuator_onboard_neopixel_rgb_all:()=>SL,actuator_onboard_neopixel_rgb_show_all_chase:()=>AL,actuator_onboard_neopixel_rgb_show_all_rainbow:()=>LL,actuator_onboard_neopixel_write:()=>gL,actuator_stepper_keep:()=>DL,actuator_stepper_stop:()=>fL,analog_ble_keyboard_init:()=>oN,analog_ble_keyboard_input:()=>aN,analog_ble_keyboard_mouse_init:()=>hN,analog_ble_keyboard_mouse_input:()=>RN,analog_ble_keyboard_mouse_send_battery:()=>ON,analog_ble_keyboard_mouse_str:()=>cN,analog_ble_keyboard_send_battery:()=>rN,analog_ble_keyboard_str:()=>uN,analog_ble_mouse_init:()=>dN,analog_ble_mouse_input:()=>TN,analog_ble_mouse_keyboard_input:()=>gN,analog_ble_mouse_send_battery:()=>MN,analog_keyboard_input:()=>$L,analog_keyboard_str:()=>nN,analog_mouse_input:()=>eN,bitbot_motor:()=>BL,bitbot_move:()=>xL,bitbot_stop:()=>VL,ble_keyboard_connect:()=>pN,ble_keyboard_get_mac:()=>_N,ble_keyboard_mouse_connect:()=>EN,ble_keyboard_mouse_get_mac:()=>mN,ble_mouse_connect:()=>IN,ble_mouse_get_mac:()=>lN,cc_number:()=>mL,educore_ble_keyboard_input:()=>vN,educore_ble_sensor_connected:()=>PN,educore_ble_sensor_init:()=>FN,educore_buzzer:()=>CN,educore_buzzer_play_tone:()=>SN,educore_buzzer_play_tone_time:()=>AN,educore_buzzer_stop:()=>LN,educore_neopixel_clear:()=>fN,educore_neopixel_rgb:()=>DN,educore_rgb_light:()=>NN,esp32_music_get_tempo:()=>sL,esp32_music_reset:()=>uL,esp32_music_set_tempo:()=>nL,esp32_onboard_music_pitch:()=>oL,esp32_onboard_music_pitch_with_time:()=>_L,esp32_onboard_music_play_list:()=>aL,esp32_onboard_music_stop:()=>pL,general_key:()=>tN,general_key_tuple:()=>sN,get_keyboard_light:()=>YN,get_power_output:()=>zL,ledswitch:()=>dL,mixbot_motor:()=>bL,mixbot_motor_status:()=>vL,mixbot_move:()=>YL,mixbot_stop:()=>XL,mouse_key:()=>iN,number:()=>rL,rm_actuator_get_led_bright:()=>OL,rm_actuator_get_led_state:()=>RL,rm_actuator_led_bright:()=>EL,rm_actuator_led_brightness:()=>cL,rm_motor:()=>NL,set_all_power_output:()=>jL,set_power_output:()=>QL,special_key:()=>ZL});var K={};t.r(K),t.d(K,{ai_sensor_20object:()=>lD,ai_sensor_ailocal_class:()=>eD,ai_sensor_ailocal_class_result:()=>iD,ai_sensor_ailocal_train:()=>tD,ai_sensor_asr_recognize:()=>pD,ai_sensor_audio_play:()=>sD,ai_sensor_audio_record:()=>nD,ai_sensor_barcode:()=>GN,ai_sensor_circle:()=>KN,ai_sensor_classifier_faces:()=>dD,ai_sensor_color:()=>zN,ai_sensor_color_chases:()=>ZN,ai_sensor_color_chases_result:()=>$N,ai_sensor_config:()=>yN,ai_sensor_face:()=>rD,ai_sensor_find_20objects:()=>ID,ai_sensor_find_barcodes:()=>UN,ai_sensor_find_circles:()=>JN,ai_sensor_find_colors:()=>jN,ai_sensor_find_licenseplates:()=>uD,ai_sensor_find_lines:()=>WN,ai_sensor_find_qrcodes:()=>BN,ai_sensor_find_rects:()=>QN,ai_sensor_find_tags:()=>kN,ai_sensor_licenseplate:()=>aD,ai_sensor_line:()=>HN,ai_sensor_qrcode:()=>VN,ai_sensor_qrcode_lite:()=>bN,ai_sensor_rect:()=>qN,ai_sensor_rgb:()=>xN,ai_sensor_tag:()=>wN,ai_sensor_use_uart_init:()=>XN,ai_sensor_yolo_recognize:()=>oD,ai_sensor_yolo_recognize_result:()=>_D});var J={};t.r(J),t.d(J,{MICROPYTHON_AI_Speech_asr:()=>hD,MICROPYTHON_AI_Speech_unit:()=>MD,MICROPYTHON_AI_client:()=>TD});var q={};t.r(q),t.d(q,{mpython_blynk_app_data:()=>DD,mpython_blynk_app_notify:()=>CD,mpython_blynk_email:()=>fD,mpython_blynk_get_timers:()=>AD,mpython_blynk_on_connected:()=>RD,mpython_blynk_on_disconnected:()=>OD,mpython_blynk_run:()=>gD,mpython_blynk_sensor_data_to_app:()=>ND,mpython_blynk_set_property:()=>FD,mpython_blynk_setup:()=>PD,mpython_blynk_stop_timers:()=>SD,mpython_blynk_sync_virtual:()=>ED,mpython_blynk_terminal_widget_vpin:()=>mD,mpython_blynktimer:()=>LD,mpython_blynktimer_run:()=>cD});var Q={};t.r(Q),t.d(Q,{communicate_bluetooth_central_init:()=>If,communicate_bluetooth_connect:()=>hf,communicate_bluetooth_disconnect:()=>mf,communicate_bluetooth_handle:()=>Cf,communicate_bluetooth_is_connected:()=>Of,communicate_bluetooth_mac:()=>Ef,communicate_bluetooth_peripheral_init:()=>Tf,communicate_bluetooth_recv:()=>gf,communicate_bluetooth_recv_only:()=>cf,communicate_bluetooth_scan:()=>Mf,communicate_bluetooth_send:()=>Rf,communicate_espnow_init:()=>Sf,communicate_espnow_init_new:()=>Af,communicate_i2c_available:()=>BD,communicate_i2c_init:()=>XD,communicate_i2c_master_read:()=>VD,communicate_i2c_onboard:()=>vD,communicate_i2c_read:()=>bD,communicate_i2c_scan:()=>xD,communicate_i2c_write:()=>yD,communicate_ir_recv_init:()=>nf,communicate_ir_send_init:()=>af,communicate_ow_init:()=>zD,communicate_ow_read:()=>ZD,communicate_ow_reset:()=>$D,communicate_ow_scan:()=>jD,communicate_ow_select:()=>ef,communicate_ow_write:()=>tf,communicate_spi_buffer:()=>kD,communicate_spi_init:()=>UD,communicate_spi_onboard:()=>YD,communicate_spi_read:()=>HD,communicate_spi_read_output:()=>WD,communicate_spi_readinto:()=>KD,communicate_spi_readinto_output:()=>JD,communicate_spi_set:()=>wD,communicate_spi_write:()=>qD,communicate_spi_write_readinto:()=>QD,espnow_radio_channel:()=>Pf,espnow_radio_channel_new:()=>Yf,espnow_radio_on_off:()=>Xf,espnow_radio_rec:()=>yf,espnow_radio_recv:()=>Vf,espnow_radio_recv_certain_msg:()=>Bf,espnow_radio_recv_certain_msg_new:()=>Uf,espnow_radio_recv_msg:()=>xf,espnow_radio_recv_new:()=>Gf,espnow_radio_send:()=>bf,espnow_radio_txpower:()=>vf,i2c_slave_onreceive:()=>GD,internal_variable:()=>sf,ir_recv_timeout:()=>pf,ir_transmit_busy:()=>lf,ir_transmit_conventional_data:()=>uf,ir_transmit_raw_code:()=>df,ir_transmit_study_code:()=>rf,ir_whether_recv:()=>_f,lora_init:()=>wf,lora_packet:()=>kf,lora_recv:()=>Wf,lora_send:()=>Hf,network_espnow_info:()=>Nf,network_espnow_mac:()=>Lf,network_espnow_recv:()=>Df,network_espnow_recv_handle:()=>Ff,network_espnow_send:()=>ff,recv_fun:()=>of,urequests_attribute:()=>Jf,urequests_get:()=>Kf,urequests_method:()=>qf});var z={};t.r(z),t.d(z,{display_animate:()=>OF,display_circle:()=>RF,display_color_seclet:()=>PF,display_draw_4strings:()=>lF,display_fill:()=>EF,display_lcd_use_i2c_init:()=>xF,display_line:()=>MF,display_line_arbitrarily:()=>IF,display_matrix_extern_bright_point:()=>oF,display_matrix_extern_bright_screen:()=>pF,display_matrix_extern_clear:()=>iF,display_matrix_extern_get_pixel:()=>sF,display_matrix_extern_get_screen_pixel:()=>_F,display_matrix_extern_image_builtins:()=>aF,display_matrix_extern_scroll_string:()=>tF,display_matrix_extern_scroll_string_delay:()=>eF,display_matrix_extern_shift:()=>nF,display_matrix_extern_show_frame_string:()=>$f,display_matrix_extern_show_frame_string_delay:()=>Zf,display_matrix_extern_show_image:()=>zf,display_matrix_extern_show_image_or_string_delay:()=>jf,display_matrix_use_i2c_init:()=>Qf,display_oled_drawPixel:()=>CF,display_oled_showBitmap:()=>gF,display_oled_use_i2c_init:()=>wF,display_onoff:()=>hF,display_rect:()=>TF,display_tm1650_power:()=>AF,display_tm1650_set_brightness:()=>DF,display_tm1650_show_dot:()=>NF,display_tm1650_show_num:()=>LF,display_tm_use_i2c_init:()=>SF,display_triangle:()=>cF,display_use_i2c_init:()=>dF,extern_oled_bright_point:()=>tP,extern_oled_clear:()=>jF,extern_oled_get_pixel:()=>ZF,extern_oled_hvline:()=>iP,extern_oled_line:()=>nP,extern_oled_scroll_string:()=>QF,extern_oled_scroll_string_delay:()=>zF,extern_oled_shape_rect:()=>eP,extern_oled_shift:()=>$F,extern_oled_show_frame_string:()=>JF,extern_oled_show_frame_string_delay:()=>qF,extern_oled_show_image:()=>kF,extern_oled_show_image_or_string_delay:()=>KF,extern_oled_show_image_xy:()=>HF,extern_oled_show_string:()=>WF,image_shift:()=>mF,lcd_backlight:()=>GF,lcd_clear:()=>UF,lcd_print_string:()=>BF,lcd_show_image_or_string_delay:()=>VF,matrix_extern_image_arithmetic:()=>uF,matrix_extern_image_invert:()=>rF,tft_fill:()=>bF,tft_line_arbitrarily:()=>yF,tft_scroll_string_delay:()=>XF,tft_show_frame_string_delay:()=>YF,tft_show_image_or_string_delay:()=>vF,tft_show_image_xy:()=>FF,tft_use_spi_init:()=>fF});var j={};t.r(j),t.d(j,{bitbot_display_bitmap_create:()=>QP,bitbot_display_image_create:()=>qP,display_available:()=>hP,display_bitmap_create:()=>TP,display_bright_point:()=>cP,display_bright_screen:()=>CP,display_clear:()=>MP,display_get_pixel:()=>RP,display_get_screen_pixel:()=>gP,display_image_builtins:()=>dP,display_image_builtins_all:()=>lP,display_image_create:()=>IP,display_scroll_string:()=>aP,display_scroll_string_delay:()=>uP,display_shift:()=>OP,display_show_frame_string:()=>_P,display_show_frame_string_delay:()=>pP,display_show_image:()=>sP,display_show_image_or_string_delay:()=>oP,draw_pointer:()=>lv,image_arithmetic:()=>mP,image_invert:()=>EP,mixbot_display_bitmap_create:()=>kP,mixbot_display_bright_screen:()=>KP,mixbot_display_get_ambientbright:()=>WP,mixbot_display_get_screen_pixel:()=>HP,mixbot_display_image_create:()=>wP,mixbot_display_rotate:()=>JP,mixgo_display_bitmap_create:()=>FP,mixgo_display_image_create_new:()=>fP,mixgome_display_bitmap_create:()=>AP,mixgome_display_font:()=>DP,mixgome_display_image_create:()=>SP,mixgomini_display_bitmap_create:()=>NP,mixgomini_display_image_create:()=>LP,mpython_display_hvline:()=>GP,mpython_display_line:()=>UP,mpython_display_shape_rect:()=>BP,mpython_pbm_image:()=>PP,nova_draw_pointer:()=>Iv,onboard_oled_bright_point:()=>VP,onboard_oled_scroll_string_delay:()=>xP,onboard_oled_show_frame_string_delay:()=>yP,onboard_oled_show_image:()=>vP,onboard_oled_show_image_or_string_delay:()=>bP,onboard_oled_show_image_xy:()=>YP,onboard_oled_show_string:()=>XP,onboard_tft_bright_point:()=>sv,onboard_tft_bright_screen:()=>Ov,onboard_tft_clear:()=>Rv,onboard_tft_clock_clear:()=>rv,onboard_tft_clock_draw:()=>uv,onboard_tft_clock_get_rtctime:()=>pv,onboard_tft_clock_init:()=>_v,onboard_tft_clock_set_time:()=>av,onboard_tft_display_hvline:()=>ev,onboard_tft_display_line:()=>iv,onboard_tft_display_shape_circle:()=>dv,onboard_tft_display_shape_rect:()=>tv,onboard_tft_fill:()=>ov,onboard_tft_get_pixel:()=>nv,onboard_tft_get_screen_pixel:()=>Ev,onboard_tft_scroll_string_delay:()=>rP,onboard_tft_shift:()=>mv,onboard_tft_show_frame_string:()=>hv,onboard_tft_show_frame_string_delay:()=>ZP,onboard_tft_show_image:()=>Mv,onboard_tft_show_image_or_string_delay:()=>$P,onboard_tft_show_image_xy:()=>zP,onboard_tft_show_image_xy_direct:()=>jP,onboard_tft_show_texts:()=>Tv});var $={};t.r($),t.d($,{factory_block:()=>Dv,factory_block_return:()=>fv,factory_block_return_with_textarea:()=>Pv,factory_block_with_textarea:()=>Fv,factory_callMethod_noreturn:()=>Lv,factory_callMethod_return:()=>Nv,factory_declare:()=>Av,factory_from_import:()=>cv,factory_function_noreturn:()=>Cv,factory_function_return:()=>Sv,factory_import:()=>gv,folding_block:()=>vv});var Z={};t.r(Z),t.d(Z,{inout_analog_atten:()=>Jv,inout_analog_read:()=>Gv,inout_analog_read_init:()=>Kv,inout_analog_write:()=>xv,inout_analog_write_init:()=>Wv,inout_analog_write_set:()=>Vv,inout_digital_init:()=>kv,inout_digital_read:()=>bv,inout_digital_write:()=>Xv,inout_highlow:()=>Yv,inout_pin_attachInterrupt:()=>wv,inout_pin_pressed:()=>Uv,inout_pin_pressed_init:()=>qv,inout_pwm_analog_write:()=>yv,inout_pwm_analog_write_init:()=>Hv,inout_pwm_analog_write_set_freq:()=>Bv});var tt={};t.r(tt),t.d(tt,{IOT_CONNECT_OLLAMA:()=>gY,IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>IY,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>dY,IOT_EMQX_PING:()=>TY,IOT_FORMATTING:()=>uY,IOT_FORMAT_STRING:()=>rY,IOT_MIXIO_NTP:()=>MY,IOT_MIXIO_PUBLISH:()=>iY,IOT_MIXIO_SUBSCRIBE:()=>nY,iot_client_onboard:()=>hY,iot_connect_ollama:()=>cY,iot_connect_openai:()=>CY,iot_http_client:()=>mY,iot_http_data:()=>EY,iot_mixio_check:()=>_Y,iot_mixio_connect:()=>eY,iot_mixio_connect_only:()=>oY,iot_mixio_disconnect:()=>sY,iot_mixio_format_msg:()=>aY,iot_mixio_format_topic:()=>pY,iot_mixly_key:()=>lY,iot_mqtt_client:()=>OY,iot_mqtt_data:()=>RY,iot_onenet_check:()=>Zv,iot_onenet_connect:()=>zv,iot_onenet_disconnect:()=>jv,iot_onenet_publish:()=>tY,iot_onenet_publish_dict:()=>$v,iot_wifi_connect:()=>Qv,ollama_empty_history:()=>LY,use_ollama_llm_to_chat:()=>SY,use_ollama_llm_to_chat_return:()=>AY});var et={};t.r(et),t.d(et,{educore_mqtt_connect:()=>nX,educore_mqtt_connect_success:()=>pX,educore_mqtt_subscribe_message:()=>sX,educore_mqtt_topic_publish:()=>_X,educore_mqtt_topic_subscribe:()=>oX,educore_wifi_connect:()=>iX,network_ap_connect:()=>bY,network_connect:()=>DY,network_get_connect:()=>FY,network_get_wifi:()=>XY,network_init:()=>NY,network_is_active:()=>YY,network_open:()=>vY,network_scan:()=>yY,network_server:()=>xY,network_socket_accept:()=>wY,network_socket_bind:()=>BY,network_socket_close:()=>JY,network_socket_connect:()=>GY,network_socket_init:()=>VY,network_socket_listen:()=>UY,network_socket_receive:()=>kY,network_socket_receive_from:()=>WY,network_socket_send:()=>HY,network_socket_send_to:()=>KY,network_stop:()=>PY,network_wifi_connect:()=>fY,ntptime_address:()=>$Y,ntptime_time:()=>jY,requests_attribute:()=>QY,requests_attribute2:()=>tX,requests_get:()=>qY,requests_get2:()=>ZY,requests_method:()=>zY,requests_post:()=>eX});var it={};t.r(it),t.d(it,{CI130X_BROADCAST:()=>FX,CI130X_GET_THE_RECOGNIZED_CMD:()=>fX,CI130X_GET_WHETHER_IDENTIFY:()=>DX,CI130X_IDENTIFY_AND_SAVE:()=>NX,CI130X_SET_SYSTEM_CMD:()=>PX,HCSR04:()=>ub,PS2_Button:()=>lb,PS2_Buttons:()=>Ib,PS2_Buttons_new:()=>cb,PS2_State:()=>Tb,PS2_init:()=>rb,PS2_init_new:()=>Ob,PS2_stk:()=>Mb,PS2_stk_new:()=>gb,PS2_vibration:()=>db,PS2_vibration_new:()=>Rb,RTC_get_time:()=>mb,RTC_set_date:()=>MX,RTC_set_datetime:()=>hb,RTC_set_time:()=>TX,camera_sensor_init:()=>Zb,camera_sensor_result:()=>ty,column_tube_foot:()=>sy,define_keyboards:()=>oy,educore_body_sensor:()=>kb,educore_button_sensor_extern:()=>Jb,educore_camera_sensor:()=>$b,educore_infrared_sensor:()=>Kb,educore_soilhum_sensor:()=>Hb,educore_temp_sensor:()=>jb,educore_temphum_sensor:()=>Wb,educore_ultrasonic_sensor:()=>Qb,esp32_s2_weather_init:()=>ob,esp32_s2_weather_rain:()=>pb,esp32_s2_weather_wd:()=>_b,esp32_s2_weather_ws:()=>ab,extern_rfid_read:()=>JX,extern_rfid_readcontent:()=>QX,extern_rfid_readid:()=>qX,extern_rfid_status:()=>$X,extern_rfid_write:()=>zX,extern_rfid_write_return:()=>jX,get_keboards_value:()=>py,gnss_get_data:()=>Ab,gnss_have_data:()=>Lb,init_matrix_keyboard:()=>_y,interaction_whether_to_interaction:()=>AX,interaction_whether_to_interaction_SANT:()=>LX,line_tube_foot:()=>ny,mixbot_sensor_extern_get_addr:()=>yb,mixbot_sensor_extern_set_addr:()=>xb,pm25_get_data:()=>Sb,radar_set_DETECTION_THRESHOLD:()=>CX,radar_set_DETECTION_THRESHOLD_SANT:()=>SX,robot_button_extern_get_value:()=>Db,robot_color_extern_get_value:()=>Yb,robot_infrared_extern_get_value:()=>Fb,robot_infrared_extern_grey_get_value:()=>Pb,robot_potentiometer_extern_get_value:()=>vb,robot_sonar_extern_get_value:()=>Xb,robot_sonar_extern_led:()=>bb,robot_touch_extern_get_value:()=>fb,sensor_APDS9960_extern:()=>YX,sensor_DS18X20:()=>wb,sensor_LTR308_extern:()=>XX,sensor_LTR390UV_extern:()=>UX,sensor_MAX30102_extern:()=>vX,sensor_QMC5883L_extern:()=>wX,sensor_VL530LX_extern:()=>WX,sensor_aht11_extern:()=>HX,sensor_bmp:()=>RX,sensor_dht11:()=>Eb,sensor_distance_hrsc04:()=>IX,sensor_hp203_extern:()=>bX,sensor_ltr381_extern:()=>BX,sensor_mixgo_extern_button_attachInterrupt:()=>dX,sensor_mixgo_extern_button_get_presses:()=>rX,sensor_mixgo_extern_button_is_pressed:()=>aX,sensor_mixgo_extern_button_was_pressed:()=>uX,sensor_mixgo_extern_light:()=>hX,sensor_mixgo_extern_pin_near:()=>EX,sensor_mixgo_extern_sound:()=>mX,sensor_mixgoce_hot_wheel_degrees:()=>sb,sensor_mixgoce_hot_wheel_is_touched:()=>nb,sensor_mpu9250_attachGestureInterrupt:()=>lX,sensor_ms5611_extern:()=>xX,sensor_ms5611_extern_altitude:()=>VX,sensor_read_humiture:()=>qb,sensor_rtc_init:()=>OX,sensor_sht:()=>cX,sensor_shtc3_extern:()=>kX,sensor_spl06_001_extern:()=>yX,sensor_ucs12071_extern:()=>GX,sensor_use_i2c_init:()=>gX,sensor_use_spi_init:()=>KX,sensor_use_uart_init:()=>Cb,sensor_weather_solo_init:()=>Vb,sensor_weather_solo_rain:()=>Ub,sensor_weather_solo_wd:()=>Bb,sensor_weather_solo_ws:()=>Gb,sensor_weigh_init:()=>ey,tvoc_get_data:()=>Nb,ultrasonic_sensor_read_distance:()=>zb,weather_data:()=>ZX,weather_have_data:()=>tb,weather_set_label:()=>ib,weather_uart_mixio:()=>eb,weigh_sensor_get_weight:()=>iy});var nt={};t.r(nt),t.d(nt,{HCSR04:()=>hy,bitbot_als_num:()=>Vx,dht11:()=>Kx,educore_button_sensor:()=>Zx,educore_button_was_pressed:()=>tV,educore_gyroscope_sensor:()=>zx,educore_gyroscope_sensor_read:()=>jx,educore_gyroscope_sensor_shake:()=>$x,educore_light_sensor:()=>Qx,educore_rfid_sensor:()=>eV,educore_rfid_sensor_scan:()=>iV,educore_rfid_sensor_scan_data:()=>nV,educore_voice_sensor:()=>Jx,number1:()=>my,number2:()=>Ey,number3:()=>Oy,number4:()=>Ry,number5:()=>cy,number6:()=>gy,number7:()=>Cy,onboard_RTC_get_time:()=>Tx,onboard_RTC_get_time_str:()=>mx,onboard_RTC_get_timestamp:()=>Mx,onboard_RTC_get_timetuple_to_str:()=>Ex,onboard_RTC_set_datetime:()=>lx,onboard_RTC_settime_string:()=>Ix,onboard_RTC_timestamp_totuple:()=>hx,rfid_readcontent:()=>By,rfid_readid:()=>Vy,rfid_status:()=>wy,rfid_write:()=>Gy,rfid_write_return:()=>Uy,sensor_LTR308:()=>Yy,sensor_adxl345_get_acceleration:()=>jy,sensor_aht11:()=>yy,sensor_bitbot_ALS:()=>xx,sensor_button_get_presses:()=>Ux,sensor_button_is_pressed:()=>Bx,sensor_button_was_pressed:()=>Gx,sensor_compass_reset:()=>nx,sensor_ds18x20:()=>Py,sensor_eulerangles:()=>Hy,sensor_get_acceleration:()=>ky,sensor_get_temperature:()=>xy,sensor_get_the_coprocessor_version:()=>sV,sensor_hp203:()=>by,sensor_light:()=>Wx,sensor_lm35:()=>vy,sensor_mixbot_get_gyro:()=>yx,sensor_mixbot_patrol_calibrate:()=>Yx,sensor_mixbot_patrol_value:()=>Xx,sensor_mixbot_temperature:()=>bx,sensor_mixgo_LTR308:()=>Dy,sensor_mixgo_button_attachInterrupt:()=>dy,sensor_mixgo_button_get_presses:()=>ry,sensor_mixgo_button_is_pressed:()=>ay,sensor_mixgo_button_was_pressed:()=>uy,sensor_mixgo_cc_mmc5603_calibrate_compass:()=>cx,sensor_mixgo_cc_mmc5603_get_angle:()=>Rx,sensor_mixgo_cc_mmc5603_get_magnetic:()=>Ox,sensor_mixgo_light:()=>Hx,sensor_mixgo_nova_LTR308:()=>Fy,sensor_mixgo_nova_pin_near:()=>Ny,sensor_mixgo_pin_near:()=>Ly,sensor_mixgo_pin_near_double:()=>Ay,sensor_mixgo_pin_near_single:()=>Sy,sensor_mixgo_pin_pressed:()=>Qy,sensor_mixgo_sant_color:()=>fy,sensor_mixgo_touch_slide:()=>qy,sensor_mixgocar42_button_attachInterrupt:()=>My,sensor_mixgocar42_button_get_presses:()=>Ty,sensor_mixgocar42_button_is_pressed:()=>ly,sensor_mixgocar42_button_was_pressed:()=>Iy,sensor_mixgocar_battery_left:()=>vx,sensor_mixgocar_pin_near:()=>Fx,sensor_mixgocar_pin_near_line:()=>fx,sensor_mixgocar_pin_near_state_change:()=>Px,sensor_mixgoce_pin_pressed:()=>Jy,sensor_mixgoce_temperature:()=>Cx,sensor_mixgome_temperature:()=>gx,sensor_mpu9250_calibrate_compass:()=>tx,sensor_mpu9250_field_strength:()=>ix,sensor_mpu9250_gesture:()=>Wy,sensor_mpu9250_get_acceleration:()=>Ky,sensor_mpu9250_get_gyro:()=>Zy,sensor_mpu9250_get_magnetic:()=>$y,sensor_mpu9250_temperature:()=>ex,sensor_mpython_pin_pressed:()=>zy,sensor_mpython_qmi8658_get_gyro:()=>Sx,sensor_mpython_qmi8658_temperature:()=>Ax,sensor_onboard_compass_reset:()=>dx,sensor_onboard_mpu9250_calibrate_compass:()=>ax,sensor_onboard_mpu9250_field_strength:()=>rx,sensor_onboard_mpu9250_gesture:()=>sx,sensor_onboard_mpu9250_get_acceleration:()=>ox,sensor_onboard_mpu9250_get_gyro:()=>px,sensor_onboard_mpu9250_get_magnetic:()=>_x,sensor_onboard_mpu9250_temperature:()=>ux,sensor_pin_near:()=>kx,sensor_pin_pressed:()=>wx,sensor_read:()=>qx,sensor_rm_acc:()=>Dx,sensor_rm_battery_left:()=>Nx,sensor_rm_pin_near_double:()=>Lx,sensor_sound:()=>Xy});var st={};t.r(st),t.d(st,{serial_any:()=>uV,serial_print:()=>oV,serial_print_byte:()=>_V,serial_print_hex:()=>aV,serial_println:()=>pV,serial_read_from_ai:()=>RV,serial_readline:()=>dV,serial_readstr:()=>rV,serial_send_to_ai:()=>OV,serial_softserial:()=>lV,serial_softserial_new:()=>IV,system_input:()=>TV,system_print:()=>MV,system_print_end:()=>mV,system_print_inline:()=>hV,system_print_many:()=>EV});var ot={};t.r(ot),t.d(ot,{Panic_with_status_code:()=>vV,Timer_init:()=>JV,base_delay:()=>zV,controls_delay:()=>xV,controls_delay_new:()=>VV,controls_end_program:()=>XV,controls_millis:()=>YV,controls_uname:()=>yV,reset:()=>bV,system_bitbot_shutdown:()=>KV,system_device_name:()=>FV,system_device_serial_number:()=>PV,system_event_bus_source:()=>DV,system_event_bus_value:()=>fV,system_machine_reset:()=>WV,system_on_event:()=>AV,system_raise_event:()=>SV,system_reset:()=>gV,system_run_in_background:()=>cV,system_ticks_diff:()=>UV,system_timer:()=>GV,system_timer_init:()=>wV,system_timestamp:()=>LV,system_value:()=>NV,system_wait:()=>CV,system_wdt_feed:()=>HV,system_wdt_init:()=>kV,time_ticks_diff:()=>QV,timer:()=>BV,timer2:()=>qV});var _t={};t.r(_t),t.d(_t,{Air_daily_content:()=>uB,Air_now_content:()=>iB,Geo_moon_content:()=>dB,Geo_sun_content:()=>rB,Life_suggestion_content:()=>sB,Location_search_content:()=>_B,Tide_daily_content:()=>oB,WEATHER_DAILY:()=>$V,WEATHER_HOUR:()=>ZV,WEATHER_NOW:()=>jV,Weather_alarm_content:()=>nB,Weather_daily:()=>pB,Weather_daily_content:()=>aB,Weather_now:()=>tB,Weather_now_content:()=>eB});var pt={};t.r(pt),t.d(pt,{analog_input:()=>SB,analog_output:()=>LB,espnow_channel:()=>cB,haskylens_model:()=>gB,i2c_A_pin:()=>NB,i2c_B_pin:()=>DB,pins_analog:()=>YB,pins_analog_pin:()=>XB,pins_axis:()=>zB,pins_brightness:()=>jB,pins_builtinimg:()=>kB,pins_builtinimg_extern:()=>HB,pins_button:()=>xB,pins_dac:()=>bB,pins_dac_pin:()=>yB,pins_digital:()=>hB,pins_digital_dot:()=>oG,pins_digital_pin:()=>mB,pins_exlcdh:()=>qB,pins_exlcdv:()=>QB,pins_imglist:()=>WB,pins_input_pin:()=>EB,pins_mpython_touch:()=>RB,pins_one_more:()=>sG,pins_output_pin:()=>OB,pins_playlist:()=>KB,pins_playlist_extern:()=>JB,pins_pwm:()=>VB,pins_pwm_pin:()=>BB,pins_radio_datarate:()=>nG,pins_radio_power:()=>iG,pins_serial:()=>wB,pins_tone_notes:()=>eG,pins_touch:()=>UB,pins_touch_pin:()=>GB,pins_tts_bgmusic:()=>tG,pins_tts_builtin_music:()=>ZB,pins_tts_voice:()=>$B,pwm_input:()=>CB,pwm_output:()=>AB,spi_A_pin:()=>fB,spi_B_pin:()=>FB,spi_C_pin:()=>PB,spi_D_pin:()=>vB});var at={};t.r(at),t.d(at,{espnow_channel:()=>MG,haskylens_model:()=>hG,pins_analog:()=>lG,pins_analog_pin:()=>dG,pins_axis:()=>fG,pins_brightness:()=>vG,pins_builtinimg:()=>SG,pins_builtinimg_extern:()=>AG,pins_button:()=>pG,pins_dac:()=>OG,pins_dac_pin:()=>EG,pins_digital:()=>_G,pins_digital_dot:()=>GG,pins_digital_pin:()=>aG,pins_exlcdh:()=>FG,pins_exlcdv:()=>PG,pins_imglist:()=>LG,pins_input_pin:()=>uG,pins_interrupt:()=>gG,pins_mpython_touch:()=>mG,pins_one_more:()=>BG,pins_output_pin:()=>rG,pins_playlist:()=>NG,pins_playlist_extern:()=>DG,pins_pwm:()=>TG,pins_pwm_pin:()=>IG,pins_radio_datarate:()=>VG,pins_radio_power:()=>xG,pins_serial:()=>CG,pins_tone_notes:()=>yG,pins_touch:()=>cG,pins_touch_pin:()=>RG,pins_tts_bgmusic:()=>bG,pins_tts_builtin_music:()=>XG,pins_tts_voice:()=>YG});const ut=Blockly,rt=Mixly,dt={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(_+=n)):i=_}else i="i";return i}},lt=dt; +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class It{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(ut.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(ut.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(ut.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_if_else");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(ut.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(ut.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(ut.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},vt={init:function(){this.setColour(Lt),this.appendValueInput("FROM").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.PYTHON_RANGE).appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Yt={init:function(){this.setColour(Lt),this.appendValueInput("LIST").setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(ut.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(ut.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return ut.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Xt={init:function(){this.setColour(Lt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(ut.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new ut.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(ut.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+ut.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:ut.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:ut.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},bt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(ut.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new ut.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(ut.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(ut.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(ut.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_finally");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(ut.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(ut.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},yt={init:function(){this.setColour(Lt);var t=new ut.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(ut.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:ut.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:ut.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(ut.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},xt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new ut.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(ut.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return ut.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Vt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new ut.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(ut.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return ut.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};Xt.OPERATORS=[[ut.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[ut.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],yt.OPERATORS=[[ut.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[ut.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Bt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(ut.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Gt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Ut={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(ut.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},wt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},kt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(ut.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Ht={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(ut.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Wt={init:function(){this.jsonInit({message0:ut.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:Lt,tooltip:ut.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:ut.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Kt={init:function(){this.setColour(Lt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(ut.Msg.MIXLY_STAT),this.setOutput(!0)}},Jt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},qt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(ut.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},Qt={init:function(){this.appendDummyInput().appendField(ut.Msg.CONTROLS_REPEAT_TITLE_REPEAT+ut.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(ut.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new ut.FieldDropdown([[ut.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[ut.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Lt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},zt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},jt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},$t={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},Zt={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET+ut.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(ut.Msg.PROCEDURES_DEFRETURN_RETURN+ut.Msg.MIXLY_GET_UNIQUE_IDEN)}},te={init:function(){this.setColour(Lt),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(ut.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},ee={init:function(){this.setColour(Lt),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},ie=230;ut.FieldTextInput.math_number_validator=function(t){return String(t)},ut.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const ne={init:function(){this.setColour(ie),this.appendDummyInput().appendField(new ut.FieldTextInput("0",ut.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MATH_NUMBER_TOOLTIP)}},se={init:function(){this.setColour(ie);this.appendDummyInput("").appendField(ut.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new ut.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:ut.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:ut.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},oe={init:function(){this.setColour(ie);this.appendDummyInput("").appendField(ut.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new ut.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:ut.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:ut.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},_e={init:function(){this.setColour(ie),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ut.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:ut.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:ut.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:ut.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:ut.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:ut.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:ut.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:ut.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},pe={init:function(){this.setColour(ie),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ut.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:ut.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:ut.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:ut.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:ut.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:ut.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:ut.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:ut.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},ae={init:function(){this.setColour(ie),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new ut.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},ue={init:function(){this.setColour(ie),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new ut.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:ut.Msg.MATH_TRIG_TOOLTIP_SIN,COS:ut.Msg.MATH_TRIG_TOOLTIP_COS,TAN:ut.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:ut.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:ut.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:ut.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:ut.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},re={init:function(){var t=[[ut.Msg.MATH_BIN,"bin"],[ut.Msg.MATH_OCT,"oct"],[ut.Msg.MATH_HEX,"hex"]];this.setColour(ie),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new ut.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:ut.Msg.MATH_DEC_TOOLTIP_BIN,oct:ut.Msg.MATH_DEC_TOOLTIP_OCT,hex:ut.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},de={init:function(){var t=[[ut.Msg.LANG_MATH_TO_ROUND,"round"],[ut.Msg.LANG_MATH_TO_CEIL,"ceil"],[ut.Msg.LANG_MATH_TO_FLOOR,"floor"],[ut.Msg.MATH_ABS,"fabs"],[ut.Msg.MATH_SQRT,"sqrt"]];this.setColour(ie),this.appendValueInput("A").setCheck(Number).appendField(new ut.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:ut.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:ut.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:ut.Msg.MATH_SINGLE_TOOLTIP_SQ,round:ut.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:ut.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:ut.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},le={init:function(){var t=[[ut.Msg.MIXLY_MAX,"max"],[ut.Msg.MIXLY_MIN,"min"]];this.setColour(ie),this.appendValueInput("A").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(new ut.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(ut.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:ut.Msg.MIXLY_TOOLTIP_MATH_MAX,min:ut.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Ie={init:function(){var t=[[ut.Msg.MATH_TWO,"two"],[ut.Msg.MATH_EIGHT,"eight"],[ut.Msg.MATH_TEN,"ten"],[ut.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(ie),this.appendDummyInput("").appendField(ut.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new ut.FieldDropdown(t),"OP").appendField(ut.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(ut.Msg.MATH_ZHW).appendField(new ut.FieldDropdown(t),"OP2").appendField(ut.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:ut.Msg.MATH_Before_two,eight:ut.Msg.MATH_Before_eight,ten:ut.Msg.MATH_Before_ten,sixteen:ut.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:ut.Msg.MATH_Behind_two,eight:ut.Msg.MATH_Behind_eight,ten:ut.Msg.MATH_Behind_ten,sixteen:ut.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},Te={init:function(){var t=[[ut.Msg.LANG_MATH_INT,"int"],[ut.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(ie),this.setOutput(!0,Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_RANDOM).appendField(new ut.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(ut.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:ut.Msg.LANG_MATH_INT,float:ut.Msg.LANG_MATH_FLOAT_RANDOM};return ut.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Me={init:function(){this.setColour(ie),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(ut.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(ut.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(ut.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(ut.Msg.MATH_CONSTRAIN_TOOLTIP)}},he={init:function(){this.setColour(ie),this.appendValueInput("NUM",Number).appendField(ut.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(ut.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(ut.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_MATH_MAP)}},me={init:function(){this.setColour(ie),this.appendDummyInput().appendField(new ut.FieldTextInput("0",ut.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(ut.Msg.MATH_NUMBER_TOOLTIP)}},Ee={init:function(){this.setColour(ie),this.appendValueInput("NUM").setCheck(Number).appendField(ut.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},Oe={init:function(){this.setColour(ie),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(ut.Msg.MATH_ROUND).appendField(ut.Msg.TEXT_KEEP),this.appendDummyInput().appendField(ut.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(ut.Msg.MATH_ROUND_NEW_TOOLTIP)}},Re={init:function(){var t=[[ut.Msg.MIXLY_TO_INT,"int"],[ut.Msg.MIXLY_TO_FLOAT,"float"],[ut.Msg.MIXLY_TO_BITES,"b"],[ut.Msg.LANG_MATH_BYTE+ut.Msg.MIXLY_TO_INT,"bti"]];this.setColour(ie),this.appendValueInput("VAR").appendField(new ut.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:ut.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:ut.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:ut.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ce={init:function(){var t=[[ut.Msg.MIXLY_TO_INT,"int"],[ut.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(ie),this.appendValueInput("VAR").appendField(new ut.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:ut.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:ut.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},ge=he,Ce={init:function(){this.setColour(ie),this.appendValueInput("VAR").appendField(ut.Msg.LANG_MATH_BYTE+ut.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},Se={init:function(){this.setColour(ie),this.itemCount_=1,this.setMutator(new ut.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(ut.Msg.MIXLY_PRODUCT+ut.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(ut.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(ut.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(ut.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const Fe={init:function(){this.setColour(Ne),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new ut.FieldTextInput("",ut.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(ut.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new ut.FieldImage(e,7,12,'"')}},Pe={init:function(){this.setColour(Ne),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(ut.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},ve={init:function(){this.setColour(Ne),this.appendValueInput("VAR").setCheck(Number).appendField(ut.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Ye={init:function(){this.setColour(Ne),this.appendValueInput("VAR").setCheck(String).appendField(ut.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},Xe={init:function(){this.setColour(Ne),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},be={init:function(){this.setColour(Ne),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},ye={init:function(){this.WHERE_OPTIONS=[[ut.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[ut.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[ut.Msg.TEXT_GET_INDEX_RANDOM+1+ut.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(ut.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ne),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(ut.Msg.LISTS_GET_INDEX_GET,"MODE"),ut.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(ut.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=ut.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=ut.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=ut.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=ut.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+ut.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",ut.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:ut.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:ut.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:ut.Msg.TEXT_GET_INDEX_RANDOM};return ut.Msg.PROCEDURES_DEFRETURN_RETURN+ut.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+ut.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==ut.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),ut.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(ut.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new ut.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),ut.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},xe={init:function(){this.setHelpUrl(ut.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ne),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(ut.Msg.LISTS_GET_INDEX_GET+" "+ut.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(ut.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(ut.Msg.PROCEDURES_DEFRETURN_RETURN+ut.Msg.MIXLY_MICROBIT_TYPE_STRING+ut.Msg.LISTS_GET_INDEX_FROM_START+"n"+ut.Msg.TEXT_CHARAT2)}},Ve={init:function(){this.setHelpUrl(ut.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Ne),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(ut.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(ut.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Be={init:function(){this.WHERE_OPTIONS_1=[[ut.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[ut.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[ut.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[ut.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[ut.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[ut.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(ut.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ne),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(ut.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==ut.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==ut.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),ut.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(ut.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new ut.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Ge={init:function(){this.setHelpUrl(ut.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Ne),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(ut.Msg.LISTS_GET_INDEX_GET+" "+ut.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(ut.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(ut.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(ut.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},Ue={init:function(){var t=[[ut.Msg.MIXLY_EQUALS,"==="],[ut.Msg.MIXLY_STARTSWITH,"startswith"],[ut.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Ne),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new ut.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},we={init:function(){this.setColour(Ne),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(ut.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_COMPARETO_HELP)}},ke={init:function(){var t=[[ut.Msg.TEXT_UPPER,"upper"],[ut.Msg.TEXT_TITLE,"title"],[ut.Msg.TEXT_CAPITALIZE,"capitalize"],[ut.Msg.TEXT_SWAPCASE,"swapcase"],[ut.Msg.TEXT_LOWER,"lower"]];this.setColour(Ne),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new ut.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:ut.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:ut.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:ut.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:ut.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:ut.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},He={init:function(){var t=[[ut.Msg.TEXT_LJUST,"ljust"],[ut.Msg.TEXT_CENTER,"center"],[ut.Msg.TEXT_RJUST,"rjust"]];this.setColour(Ne),this.appendValueInput("VAR").appendField(new ut.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(ut.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(ut.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},We={init:function(){this.setColour(Ne),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(ut.Msg.MIXLY_MID+ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(ut.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Ke={init:function(){this.setColour(Ne),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(ut.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(ut.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Je={init:function(){this.setColour(Ne),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(ut.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(ut.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},qe={init:function(){this.setColour(Ne),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(ut.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(ut.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(ut.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},Qe={init:function(){var t=[[ut.Msg.TEXT_TRIM_BOTH,"strip"],[ut.Msg.TEXT_TRIM_LEFT,"lstrip"],[ut.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Ne),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(ut.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new ut.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(ut.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:ut.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:ut.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:ut.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},ze={init:function(){this.setColour(Ne),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new ut.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new ut.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(ut.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Ki={init:function(){this.setColour(Hi),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Ji={init:function(){this.setColour(Hi),this.appendDummyInput().appendField(ut.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},qi={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_KEYS),this.setTooltip(ut.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Qi={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(ut.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(ut.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(ut.Msg.DICTS_GET_TOOLTIP)}},zi={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(ut.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(ut.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(ut.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(ut.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},ji={init:function(){this.setColour(Hi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(ut.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(ut.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},$i={init:function(){this.setColour(Hi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(ut.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(ut.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.DICTS_DELETE_TOOLTIP)}},Zi={init:function(){this.setColour(Hi),this.appendValueInput("DICT2").setCheck("Dict").appendField(ut.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(ut.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MID),this.setTooltip(ut.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},tn={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_CLEAR),this.setTooltip(ut.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},en={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_ITEMS),this.setTooltip(ut.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},nn={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_VALUES),this.setTooltip(ut.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},sn={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_LENGTH),this.setTooltip(ut.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},on={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.DICT_DELDICT),this.setTooltip(ut.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_n={init:function(){this.MODE=[[ut.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[ut.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(ut.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(ut.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=ut.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=ut.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==ut.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new ut.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},pn={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(ut.Msg.DICTS_ADD_VALUE),this.setTooltip(ut.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},an={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(ut.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(ut.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.DICTS_SETDEFAULT_TOOLTIP)}},un={init:function(){this.setColour(Hi),this.appendDummyInput("").appendField(new ut.FieldLabel(ut.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new ut.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},rn={init:function(){this.setColour(Hi),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},dn={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_TO_JSON),this.setTooltip(ut.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},ln={init:function(){this.setColour(Hi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(ut.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},In={init:function(){this.setColour(Hi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Tn={init:function(){this.setColour(Hi),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_TO_JSON),this.setTooltip(ut.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Mn=210,hn={init:function(){var t=ut.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Mn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ut.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:ut.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:ut.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:ut.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:ut.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:ut.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:ut.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},mn={init:function(){var t=ut.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=ut.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Mn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ut.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new ut.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},En={init:function(){var t=[[ut.Msg.LOGIC_OPERATION_AND,"AND"],[ut.Msg.LOGIC_OPERATION_OR,"OR"],[ut.Msg.LOGIC_OPERATION_NOR,"NOR"],[ut.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Mn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new ut.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:ut.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:ut.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:ut.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:ut.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},On={init:function(){this.setColour(Mn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(ut.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(ut.Msg.LOGIC_NEGATE_TOOLTIP)}},Rn={init:function(){var t=[[ut.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[ut.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Mn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new ut.FieldDropdown(t),"BOOL"),this.setTooltip(ut.Msg.LOGIC_BOOLEAN_TOOLTIP)}},cn={init:function(){this.setColour(Mn),this.setOutput(!0),this.appendDummyInput().appendField(ut.Msg.LOGIC_NULL),this.setTooltip(ut.Msg.LOGIC_NULL_TOOLTIP)}},gn={init:function(){this.setColour(Mn),this.appendValueInput("A"),this.appendValueInput("B").appendField(ut.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(ut.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},Cn={init:function(){var t=[[ut.Msg.TEXT_APPEND_TO,"in"],[ut.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Mn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new ut.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(ut.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ut.Msg.IN)}},Sn={init:function(){var t=[[ut.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[ut.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Mn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new ut.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},An={init:function(){this.setColour(Mn),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(ut.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Ln={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(ut.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Nn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=ut.Msg.MIXLY_USE,n=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=ut.Msg.MIXLY_BELONG;return i+{r:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Dn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=ut.Msg.MIXLY_USE,n=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=ut.Msg.MIXLY_BELONG,_=ut.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},fn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(ut.Msg.MIXPY_TEXT_ENCODE).appendField(new ut.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=ut.Msg.MIXLY_USE,n=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=ut.Msg.MIXLY_BELONG,_=ut.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},Fn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+ut.Msg.MIXLY_MICROBIT_TYPE_STRING+ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Pn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},vn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},Yn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(ut.Msg.MICROBIT_PYTHON_TYPE)}},Xn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(ut.Msg.HTML_FILE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},bn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},yn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},xn={init:function(){this.setColour(0),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};ut.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Vn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+ut.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},Gn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},wn={init:function(){this.setColour(0),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},kn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return ut.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+ut.Msg.MIXLY_ESP32_SET+{mkdir:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Hn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(ut.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Wn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Kn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.HTML_FILE,"isfile"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return ut.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+ut.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Jn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(ut.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_SETUP+ut.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(ut.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},qn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(ut.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Qn={init:function(){var t=ut.Procedures.findLegalName("",this),e=new ut.FieldTextInput(t,ut.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new ut.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&ut.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(ut.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(ut.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(ut.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(ut.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=ut.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),ut.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{ut.Events.enable()}},mutationToDom:function(t){var e=ut.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(ut.Msg.MIXLY_AIP_ATTR).setAlign(ut.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ks={init:function(){this.setColour(xs),this.appendDummyInput().appendField(ut.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Hs={init:function(){this.setColour(xs),this.appendDummyInput().appendField(ut.Msg.HTML_FORM_CONTENT).appendField(new ut.FieldDropdown([[ut.Msg.HTML_TEXT,"text"],[ut.Msg.HTML_EMAIL,"email"],[ut.Msg.HTML_NUMBER,"number"],[ut.Msg.HTML_PASSWORD,"password"],[ut.Msg.HTML_CHECKBOX,"checkbox"],[ut.Msg.HTML_RADIOBUTTON,"radiobutton"],[ut.Msg.HTML_BUTTON,"button"],[ut.Msg.HTML_COLOUR,"colour"],[ut.Msg.HTML_DATE,"date"],[ut.Msg.HTML_LOCALTIME,"local time"],[ut.Msg.HTML_FILE,"file"],[ut.Msg.HTML_HIDDEN,"hidden"],[ut.Msg.HTML_IMAGE,"image"],[ut.Msg.HTML_MONTH,"month"],[ut.Msg.HTML_RANGE,"range"],[ut.Msg.HTML_RESET,"reset"],[ut.Msg.HTML_SEARCH,"search"],[ut.Msg.HTML_SUBMIT,"submit"],[ut.Msg.HTML_TELEPHONENUMBER,"telephone number"],[ut.Msg.HTML_TIME,"time"],[ut.Msg.HTML_URL,"url"],[ut.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(ut.Msg.HTML_NAME).appendField(new ut.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(ut.Msg.HTML_VALUE).appendField(new ut.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(ut.Msg.MIXLY_AIP_ATTR).setAlign(ut.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ws={init:function(){this.setColour(xs),this.appendDummyInput().appendField(new ut.FieldTextInput("property"),"KEY").appendField(":").appendField(new ut.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ks={init:function(){this.setColour(xs),this.appendDummyInput().appendField(new ut.FieldTextInput("property"),"KEY").appendField(":").appendField(new ut.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Js={init:function(){this.setColour(xs),this.appendDummyInput().appendField(ut.Msg.HTML_TEXT).appendField(new ut.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qs=160,Qs={init:function(){this.setColour(qs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new ut.FieldTable(""),"TEXT")}},zs={init:function(){this.setColour(qs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new ut.FieldMultilineInput(""),"TEXT")}},js={init:function(){this.setColour(qs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new ut.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},$s={init:function(){this.setColour(qs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Zs={init:function(){this.setColour(qs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new ut.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},to={init:function(){this.setColour(qs),this.appendValueInput("VALUE").appendField(ut.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},eo={init:function(){this.setColour(qs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new ut.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(ut.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=ut.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+a()+"("+t+", "+e+", "+i+") or "+u()+"("+t+", "+e+", "+i+")"},ut.isNumber(n)&&ut.isNumber(s)&&ut.isNumber(o))n=parseFloat(n),s=parseFloat(s),o=Math.abs(parseFloat(o)),0==n%1&&0==s%1&&0==o%1?(n<=s?(s++,t=0==n&&1==o?s:n+", "+s,1!=o&&(t+=", "+o)):t=n+", "+--s+", -"+o,t="range("+t+")"):(t=n",GTE:">="};const zp=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",o=e.valueToCode(this,"B",n)||"False";if("AND"==i)var _=s+" and "+o;else if("OR"==i)_=s+" or "+o;else if("NOR"==i)_="not("+s+"^"+o+")";else _=s+"^"+o;return[_,n]},jp=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},$p=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Zp=function(t,e){return["None",e.ORDER_ATOMIC]},ta=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},ea=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},ia=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},na=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},sa=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},oa=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},_a=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},pa=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},aa=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},ua=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},ra=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},da=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},la=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Ia=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},Ta=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Ma=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},ha=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ma=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ea=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Oa=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},Ra=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ca=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},ga=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Ca=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},Sa=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},Aa=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},La=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},Na=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),ut.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var o=[],_=0;_\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},au=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},uu=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},ru=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},du=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},lu=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Iu=function(t,e){return'"},Tu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Mu=function(){return this.getFieldValue("TEXT")+"\n"},hu=function(t){return t.getFieldValue("TEXT")+"\n"},mu=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Eu=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Ou=function(){return""},Ru=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},cu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+u.join("\n")},Au.scrubNakedValue=function(t){return t+"\n"},Au.quote_=function(t){var e="'";return-1!==t.indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},Au.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Au.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=ut.utils.string.wrap(o,Au.COMMENT_WRAP-3),n+=Au.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const Lu="#74A55B",Nu={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MIDI),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(ut.Msg.MIXLY_RGB_PIN_COUNT)}},Du={init:function(){this.setColour(Lu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ut.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},fu={init:function(){this.setColour(Lu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ut.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},Fu={init:function(){this.setColour(Lu),this.appendValueInput("SUB"),this.appendValueInput("LIST").appendField(ut.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},Pu={init:function(){this.setColour(Lu),this.appendValueInput("SUB"),this.appendValueInput("TICKS").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(ut.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(ut.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},vu={init:function(){this.setColour(Lu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},Yu={init:function(){this.setColour(Lu),this.appendValueInput("SUB"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_RESET)}},Xu={init:function(){this.setColour(Lu),this.appendValueInput("SUB"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bu={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING).appendField(ut.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_EXTERN_LED_SETONOFF)}},yu={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ut.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},xu={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ut.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_EXTERN_LED_GETONOFF)}},Vu={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING).appendField(ut.Msg.MIXLY_EXTERN_LED),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_EXTERN_LED_SETBRIGHT)}},Bu={init:function(){this.setColour(Lu),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_SETUP+ut.Msg.MIXLY_SERVO),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Gu={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_SERVO).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("DEGREE",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_DEGREE_0_180),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SERVO_MOVE)}},Uu={init:function(){this.setColour(Lu),this.appendValueInput("VAR").appendField("360°"+ut.Msg.MIXLY_SERVO),this.appendValueInput("SPEED",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_SETTING+ut.Msg.blockpy_turtle_rotate+ut.Msg.MIXLY_SPEED+" (-10~10)"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SERVO_360_TOOLTIP)}},wu={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).appendField("180°"+ut.Msg.MIXLY_SERVO).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SERVO_MOVE)}},ku={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).appendField("360°"+ut.Msg.MIXLY_SERVO).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendValueInput("NUM",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SERVO_SPEED_TOOLIPS)}},Hu={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).appendField("180°"+ut.Msg.MIXLY_SERVO).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},Wu={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).appendField("360°"+ut.Msg.MIXLY_SERVO).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET+ut.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Ku={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField("初始化").setCheck("var"),this.appendDummyInput().appendField("电机驱动"),this.appendDummyInput().appendField("地址").appendField(new ut.FieldDropdown([["A","ms32006.ADDRESS_A"],["B","ms32006.ADDRESS_B"]]),"mode"),this.appendValueInput("SUB1").setCheck("var").setAlign(ut.inputs.Align.RIGHT).appendField("通信"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("初始化MS32006电机驱动,使用I2C通信")}},Ju={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField("直流电机").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Direction).appendField(new ut.FieldDropdown([[ut.Msg.CLOCKWISE,"ms32006.MOT_CW"],[ut.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"],[ut.Msg.MOTOR_N,"ms32006.MOT_N"],[ut.Msg.MOTOR_P,"ms32006.MOT_P"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_STEPPER_SET_SPEED),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置直流电机的状态及转速(0-100)")}},qu={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField("步进电机").setCheck("var"),this.appendDummyInput().appendField("选择").appendField(new ut.FieldDropdown([["A","ms32006.MOT_A"],["B","ms32006.MOT_B"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Direction).appendField(new ut.FieldDropdown([[ut.Msg.CLOCKWISE,"ms32006.MOT_CW"],[ut.Msg.ANTI_CLOCKWISE,"ms32006.MOT_CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField("转速"),this.appendValueInput("steps").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField("步数"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip("设置步进电机的状态、转速、步数(0-2047)")}},Qu={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_SETUP).setCheck("var"),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_PIN),this.appendValueInput("LEDCOUNT").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_COUNT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(ut.Msg.MIXLY_RGB_PIN_COUNT)}},zu={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("_LED_").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_RGB_NUM_R_G_B_MP)}},ju={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},$u={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_WRI)}},Zu={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.MIXLY_DURATION).appendField(ut.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},tr={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.PYTHON_RANGE_STEP).appendField(ut.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},er={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(ut.Msg.CONTROLS_FOR_INPUT_WITH+"uart").appendField(new ut.FieldDropdown([["uart1","uart1"],["uart2","uart2"]]),"key"),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_SETUP+ut.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new ut.FieldDropdown([["SYN6288"+ut.Msg.MIXLY_AipSpeech_synthesis,"SYN6288"],["NS9300"+ut.Msg.MIXLY_MUSIC_PLAYER,"NS9300"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ir={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_GET+ut.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_WHETHER).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_STOPPED,"0"],[ut.Msg.MIXLY_PLAYING,"1"],[ut.Msg.MIXLY_PAUSED,"2"]]),"key"),this.setInputsInline(!0),this.setOutput(!0)}},nr={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_STAT).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MP3_PLAY,"1"],[ut.Msg.MIXLY_MP3_PAUSE,"2"],[ut.Msg.MIXLY_STOP,"3"],[ut.Msg.MIXLY_MP3_PREV,"4"],[ut.Msg.MIXLY_MP3_NEXT,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sr={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendValueInput("volume").appendField(ut.Msg.MIXLY_MP3_VOL+ut.Msg.MIXLY_STAT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_PLAYER_SET_VOLUME_TOOLTIP)}},or={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MODE+ut.Msg.MIXLY_STAT).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MP3_LOOP_ALL,"0"],[ut.Msg.MIXLY_MP3_LOOP_ONE,"1"],[ut.Msg.MIXLY_PLAYER_DIRECTORY_LOOP,"2"],[ut.Msg.MIXLY_MP3_LOOP_RAM,"3"],[ut.Msg.MIXLY_PLAYER_SINGLE_STOP,"4"],[ut.Msg.MIXLY_PLAYER_SEQUENTIAL_PLAY,"5"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_r={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MUSIC_PLAYER).setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_START_MELODY,"play"],[ut.Msg.MIXLY_PLAYER_INSERT_MUSIC,"insert"]]),"key"),this.appendValueInput("song"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_PLAYER_PLAY_MUSIC_TOOTIP)}},pr={},ar={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(ut.Msg.MIXLY_SET_VOLUME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},ur={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_VOLUME),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_SET_VOLUME_TOOLTIP)}},rr={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("VOICE").setCheck(Number).appendField(ut.Msg.MIXLY_PLAY_HINTS),this.appendDummyInput().appendField(ut.Msg.MIXLY_PROGRAM_BLOCK).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_PLAY_HINTS_TOOLTIP)}},dr={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField("SYN6288"),this.appendValueInput("data").setCheck(String).appendField(ut.Msg.MIXLY_AipSpeech_synthesis),this.appendValueInput("VOICE").setCheck(Number).appendField(ut.Msg.MIXLY_BACKGROUND_MUSIC),this.appendDummyInput().appendField(ut.Msg.MIXLY_PROGRAM_BLOCK).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"mode"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_PLAY_TTS_TOOLTIP)}},lr={init:function(){this.setColour(Lu),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.extern_addr),"PIN"),this.setOutput(!0,Number)}},Ir={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_MOTOR).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},Tr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_MOTOR).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_GET+ut.Msg.MIXLY_SPEED),this.setOutput(!0,Number),this.setInputsInline(!0)}},Mr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_TRAFFIC_LIGHT).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.LISTS_SET_INDEX_SET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_Turn_off_display,"0"],[ut.Msg.MIXLY_TRAFFIC_LIGHT_RED_ON,"1"],[ut.Msg.MIXLY_TRAFFIC_LIGHT_RED_BLINK,"2"],[ut.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_ON,"3"],[ut.Msg.MIXLY_TRAFFIC_LIGHT_YELLOW_BLINK,"4"],[ut.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_ON,"5"],[ut.Msg.MIXLY_TRAFFIC_LIGHT_GREEN_BLINK,"6"]]),"light"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},hr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN).appendField(new ut.FieldDropdown([[ut.Msg.COLOUR_RGB_WHITE,"W"],[ut.Msg.COLOUR_RGB_RED,"R"],[ut.Msg.COLOUR_RGB_YELLOW,"Y"],[ut.Msg.COLOUR_RGB_GREEN,"G"],[ut.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendValueInput("value").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.BRIGHTNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},mr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN).appendField(new ut.FieldDropdown([[ut.Msg.COLOUR_RGB_WHITE,"W"],[ut.Msg.COLOUR_RGB_RED,"R"],[ut.Msg.COLOUR_RGB_YELLOW,"Y"],[ut.Msg.COLOUR_RGB_GREEN,"G"],[ut.Msg.COLOUR_RGB_BLUE,"B"]]),"color").appendField("LED").appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET+ut.Msg.BRIGHTNESS),this.setOutput(!0,Number),this.setInputsInline(!0)}},Er={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_SERVO_MOTOR).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"[0]"],[ut.Msg.MIXLY_SPEED,"[1]"],[ut.Msg.MATH_SINGLE_OP_ABSOLUTE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[2]"],[ut.Msg.MIXLY_RELATIVE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"[3]"],[ut.Msg.MIXLY_MIXBOT_SERVO_BLOCK_OR_NOT,"[4]"],[ut.Msg.MIXLY_MIXBOT_SERVO_FINISH_OR_NOT,"[5]"],[ut.Msg.MIXLY_ALL,""]]),"status"),this.setOutput(!0,Number),this.setInputsInline(!0)}},Or={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_SERVO_MOTOR).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_SERVO_SET_STOP_MODE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_KEEP,"0"],[ut.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_COAST,"1"],[ut.Msg.MIXLY_MIXBOT_SERVO_STOP_MODE_BRAKE,"2"]]),"status"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Rr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_SERVO_MOTOR).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_STOP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},cr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_SERVO_MOTOR).appendField(ut.Msg.MATH_SINGLE_OP_ABSOLUTE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+ut.Msg.MSG.run).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MODE).setAlign(ut.inputs.Align.RIGHT).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_SPEED+ut.Msg.MIXLY_MODE,"0"],[ut.Msg.MIXLY_MICROBIT_JS_BLE_POWER+ut.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(ut.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(ut.inputs.Align.RIGHT).appendField(new ut.FieldDropdown([[ut.Msg.CLOCKWISE,"0"],[ut.Msg.MIXLY_MIXBOT_SERVO_NEAREST_PATH,"1"],[ut.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.appendValueInput("angle").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_SERVO_ABSOLUTE_ANGLE_TOOLTIP)}},gr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_SERVO_MOTOR).appendField(ut.Msg.MIXLY_RELATIVE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+ut.Msg.MSG.run).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ORIGIN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Cr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_SERVO_MOTOR).appendField(ut.Msg.MIXLY_RELATIVE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+ut.Msg.MSG.run).appendField("("+ut.Msg.MIXLY_MIXBOT_SERVO_LIKE_ENCODING_MOTOR+")").appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MODE).setAlign(ut.inputs.Align.RIGHT).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_SPEED+ut.Msg.MIXLY_MODE,"0"],[ut.Msg.MIXLY_MICROBIT_JS_BLE_POWER+ut.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(ut.inputs.Align.RIGHT).appendField("%"),this.appendValueInput("angle").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_SERVO_RELATIVE_ANGLE_TOOLTIP)}},Sr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.ME_GO_MOTOR_EXTERN+ut.Msg.MIXLY_SERVO_MOTOR).appendField(ut.Msg.MIXLY_RELATIVE+ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE+ut.Msg.MSG.run).appendField("("+ut.Msg.MIXLY_MIXBOT_SERVO_LIKE_ORDINARY_MOTOR+")").appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LEFT,"0"],[ut.Msg.MIXLY_RIGHT,"1"]]),"mode"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MODE).setAlign(ut.inputs.Align.RIGHT).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_SPEED+ut.Msg.MIXLY_MODE,"0"],[ut.Msg.MIXLY_MICROBIT_JS_BLE_POWER+ut.Msg.MIXLY_MODE,"1"]]),"status"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_PARAMS),this.appendDummyInput().setAlign(ut.inputs.Align.RIGHT).appendField("%"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_SERVO_TURN_DIRECTION).setAlign(ut.inputs.Align.RIGHT).appendField(new ut.FieldDropdown([[ut.Msg.CLOCKWISE,"0"],[ut.Msg.ANTI_CLOCKWISE,"2"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ar={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.MIXBOT).appendField(ut.Msg.ME_GO_MOTOR_EXTERN).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MOTOR,"ext_motor"],[ut.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[ut.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[ut.Msg.COLOUR_RGB_RED+"LED","R_LED"],[ut.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[ut.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[ut.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[ut.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_EXTERN_GET_ADDR),this.setOutput(!0),this.setInputsInline(!0)}},Lr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.MIXBOT).appendField(ut.Msg.ME_GO_MOTOR_EXTERN).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MOTOR,"ext_motor"],[ut.Msg.MIXLY_TRAFFIC_LIGHT,"ext_traffic"],[ut.Msg.COLOUR_RGB_WHITE+"LED","W_LED"],[ut.Msg.COLOUR_RGB_RED+"LED","R_LED"],[ut.Msg.COLOUR_RGB_YELLOW+"LED","Y_LED"],[ut.Msg.COLOUR_RGB_GREEN+"LED","G_LED"],[ut.Msg.COLOUR_RGB_BLUE+"LED","B_LED"],[ut.Msg.MIXLY_SERVO_MOTOR,"ext_servo"]]),"name"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_EXTERN_SET_ADDR),this.appendValueInput("old").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE),this.appendValueInput("new").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_UPDATE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Nr={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_SETUP+ut.Msg.MIXLY_AT).appendField(ut.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Dr={init:function(){this.setColour(Lu),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING),this.appendValueInput("pin").appendField("LED"),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},fr={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_SERVO+ut.Msg.MIXLY_SETUP+ut.Msg.MIXLY_AT).appendField(ut.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},Fr={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_SERVO),this.appendValueInput("angle").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_DISPLAY_MATRIX_ROTATE),this.appendDummyInput().appendField(ut.Msg.DRAW_POINTER_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pr={init:function(){this.setColour(Lu),this.appendValueInput("PIN",Number).setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_MOTOR+ut.Msg.MIXLY_SETUP+ut.Msg.MIXLY_AT).appendField(ut.Msg.MIXLY_PIN),this.setInputsInline(!0),this.setOutput(!0)}},vr={init:function(){this.setColour(Lu),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MOTOR),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_DISPLAY_MATRIX_ROTATE+ut.Msg.MIXLY_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yr="#6C9858",Xr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(new ut.FieldDropdown([["L1","1"],["L2","2"]]),"op"),this.setOutput(!0)}},br={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_ESP32_ON,"1"],[ut.Msg.MIXLY_ESP32_OFF,"0"],[ut.Msg.MIXLY_ESP32_TOGGLE,"-1"]]),"flag"),this.setOutput(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_INOUT_HIGHLOW)}},yr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(ut.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_SETONOFF)}},xr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(ut.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(ut.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_GETONOFF)}},Vr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("led").appendField(ut.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput().appendField(ut.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_GETONOFF)}},Br={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(ut.Msg.MIXLY_BUILDIN_LED),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_SETTING+ut.Msg.MIXLY_BUILDIN_LED+ut.Msg.MIXLY_BRIGHTNESS+"(0-100%)")}},Gr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING),this.appendValueInput("led").appendField(ut.Msg.MIXLY_BUILDIN_LED),this.appendDummyInput("").appendField(ut.Msg.MIXLY_LCD_SETCOLOR).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_LIGHT_RED,"1"],[ut.Msg.MIXLY_LIGHT_GREEN,"2"],[ut.Msg.MIXLY_LIGHT_BLUE,"3"],[ut.Msg.MIXLY_LIGHT_YELLOW,"4"],[ut.Msg.MIXLY_LIGHT_CYAN,"5"],[ut.Msg.MIXLY_LIGHT_PURPLE,"6"],[ut.Msg.MIXLY_LIGHT_WHITE,"7"]]),"colorvalue"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Ur={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING).appendField(ut.Msg.MIXLY_BUILDIN_LED).appendField(new ut.FieldDropdown([[ut.Msg.COLOUR_RGB_RED,"r"],[ut.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_PULSEIN_STAT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_SETONOFF)}},wr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ut.Msg.MIXLY_BUILDIN_LED).appendField(new ut.FieldDropdown([[ut.Msg.COLOUR_RGB_RED,"r"],[ut.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(ut.Msg.MIXLY_BRIGHTNESS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_GETONOFF)}},kr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(ut.Msg.MIXLY_BUILDIN_LED).appendField(new ut.FieldDropdown([[ut.Msg.COLOUR_RGB_RED,"r"],[ut.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendDummyInput().appendField(ut.Msg.MIXLY_PULSEIN_STAT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_GETONOFF)}},Hr={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_SETTING).appendField(ut.Msg.MIXLY_BUILDIN_LED).appendField(new ut.FieldDropdown([[ut.Msg.COLOUR_RGB_RED,"r"],[ut.Msg.COLOUR_RGB_GREEN,"g"]]),"color"),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_BRIGHTNESS),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_SETTING+ut.Msg.MIXLY_BUILDIN_LED+ut.Msg.MIXLY_BRIGHTNESS+"(0-10)")}},Wr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(new ut.FieldDropdown([["L1","20"],["L2","21"]]),"op"),this.setOutput(!0)}},Kr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(rt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgo_cc":case"micropython:esp32s2:mixgo_ce":this.setTooltip(ut.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgo_me":default:this.setTooltip(ut.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(ut.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},Jr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},qr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RAINBOW),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.MIXLY_DURATION).appendField(ut.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},Qr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(ut.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.PYTHON_RANGE_STEP).appendField(ut.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},zr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_RGB_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_WRI)}},jr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("_LED_").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_NUM),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null);switch(rt.Boards.getSelectedBoardKey()){case"micropython:esp32c3:mixgocc":this.setTooltip(ut.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOCC);break;case"micropython:esp32c3:mixgome":default:this.setTooltip(ut.Msg.MIXLY_RGB_NUM_R_G_B_MIXGOME);break;case"micropython:esp32:mPython":this.setTooltip(ut.Msg.MIXLY_RGB_NUM_R_G_B_MPYTHON)}}},$r={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_RGB_ALL_R_G_B_MIXGOCC)}},Zr={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RGB),this.appendDummyInput("").appendField(ut.Msg.MIXLY_CHASE),this.appendValueInput("RVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_R),this.appendValueInput("GVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_G),this.appendValueInput("BVALUE").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_RGB_B),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.PYTHON_RANGE_STEP).appendField(ut.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},td={init:function(){this.setColour(Yr),this.appendValueInput("TICKS").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_SET_TEMPO).appendField(ut.Msg.MICROBIT_ACTUATOR_ticks),this.appendValueInput("BPM").setCheck(Number).appendField(ut.Msg.MIXLY_SPEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_SET_TEMPO)}},ed={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Get_current_tempo),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_GET_TEMPO)}},id={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Reset_music),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_RESET)}},nd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ut.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},sd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ut.Msg.MIXLY_FREQUENCY),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.MIXLY_DURATION),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE2)}},od={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_d={init:function(){this.setColour(Yr),this.appendValueInput("LIST").appendField(ut.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_MUSIC_PLAY_LISTS)}},pd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MOTOR_DC).appendField(new ut.FieldDropdown([["1","1"],["2","2"],["3","3"]]),"wheel"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Direction).appendField(new ut.FieldDropdown([[ut.Msg.CLOCKWISE,"CW"],[ut.Msg.ANTI_CLOCKWISE,"CCW"],[ut.Msg.MOTOR_P,"P"],[ut.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ad={init:function(){this.setColour(Yr),this.appendDummyInput().appendField("MixGo Car").appendField(new ut.FieldDropdown([[ut.Msg.blockpy_forward,"F"],[ut.Msg.blockpy_backward,"B"],[ut.Msg.blockpy_left,"L"],[ut.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ud={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField("MixGo Car").appendField(new ut.FieldDropdown([[ut.Msg.MOTOR_P,"P"],[ut.Msg.MOTOR_N,"N"]]),"VAR"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("")}},rd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MOTOR_DC).appendField(new ut.FieldDropdown([[ut.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[ut.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Direction).appendField(new ut.FieldDropdown([[ut.Msg.CLOCKWISE,"CW"],[ut.Msg.ANTI_CLOCKWISE,"CCW"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_STEPPER_SET_SPEED),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},dd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MOTOR_DC).appendField(new ut.FieldDropdown([[ut.Msg.MIXLYCAR_WHEEL_LEFT,"L"],[ut.Msg.MIXLYCAR_WHEEL_RIGHT,"R"]]),"wheel"),this.appendDummyInput().appendField(ut.Msg.MIXLY_STOP).appendField(new ut.FieldDropdown([[ut.Msg.MOTOR_P,"P"],[ut.Msg.MOTOR_N,"N"]]),"direction"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},ld={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_MOTOR_STATUS),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_MOTOR_STATUS_TOOLTIP)}},Id={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXBOT).appendField(new ut.FieldDropdown([[ut.Msg.blockpy_forward,"F"],[ut.Msg.blockpy_backward,"B"],[ut.Msg.blockpy_left,"L"],[ut.Msg.blockpy_right,"R"]]),"VAR"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[ut.Msg.MIXLY_SPEED,"SPEED"],[ut.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},Td={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXBOT).appendField(new ut.FieldDropdown([[ut.Msg.MOTOR_P,"P"],[ut.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Md={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXBOT).appendField(ut.Msg.MIXLY_MOTOR).appendField(new ut.FieldDropdown([[ut.Msg.TEXT_TRIM_LEFT,"1"],[ut.Msg.TEXT_TRIM_RIGHT,"2"],[ut.Msg.TEXT_TRIM_BOTH,"0"]]),"wheel"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_BLE_POWER,"PWR"],[ut.Msg.MIXLY_SPEED,"SPEED"],[ut.Msg.MIXLY_MIXBOT_MOTOR_TURNS,"TURNS"]]),"mode"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_MOVE_TOOLTIP)}},hd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_BUZZER),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_ON,"0"],[ut.Msg.MIXLY_MICROBIT_PY_COMMUNICATE_OFF,"1"]]),"on_off"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},md={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.BITBOT).appendField(new ut.FieldDropdown([[ut.Msg.blockpy_forward,"F"],[ut.Msg.blockpy_backward,"B"],[ut.Msg.blockpy_left,"L"],[ut.Msg.blockpy_right,"R"]]),"VAR"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Ed={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.BITBOT).appendField(new ut.FieldDropdown([[ut.Msg.MOTOR_P,"P"],[ut.Msg.MOTOR_N,"N"]]),"VAR"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Od={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.BITBOT).appendField(ut.Msg.MIXLY_MOTOR).appendField(new ut.FieldDropdown([[ut.Msg.TEXT_TRIM_LEFT,"0"],[ut.Msg.TEXT_TRIM_RIGHT,"1"]]),"wheel"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Direction).appendField(new ut.FieldDropdown([[ut.Msg.CLOCKWISE,"CW"],[ut.Msg.ANTI_CLOCKWISE,"CCW"],[ut.Msg.MOTOR_P,"P"],[ut.Msg.MOTOR_N,"N"]]),"direction"),this.appendValueInput("speed").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.MIXLY_SPEED),this.appendDummyInput("").appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Rd={init:function(){this.setColour(Yr),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_MIXBOT_SOUND_SET_LOUDNESS),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_SETONOFF)}},cd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_SOUND_LOUDNESS+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_GETONOFF)}},gd={init:function(){this.setColour(Yr),this.appendValueInput("bright").appendField(ut.Msg.MIXLY_SETTING+ut.Msg.MIXLY_MIXBOT_BUZZER+ut.Msg.MIXLY_MP3_VOL),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_SETONOFF)}},Cd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET+ut.Msg.MIXLY_MIXBOT_BUZZER+ut.Msg.MIXLY_MP3_VOL+"(%)"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_LED_GETONOFF)}},Sd={init:function(){this.setColour(Yr),this.appendValueInput("PATH").appendField(ut.Msg.MIXLY_RECORD_AUDIO).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendValueInput("TIME").setCheck(Number).appendField(ut.Msg.MIXLY_GET_PRESSES_TIME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Ad={init:function(){this.setColour(Yr),this.appendValueInput("PATH").appendField(ut.Msg.MIXLY_PLAY_AUDIO).appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Ld={init:function(){this.setColour(Yr),this.appendValueInput("PATH").appendField(ut.Msg.MIXLY_PLAY_ONLINE_AUDIO).appendField("URL"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Nd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_TONE),this.appendValueInput("pitch").setCheck(Number).appendField(ut.Msg.MIXLY_FREQUENCY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_TONE)}},Dd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_NOTONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},fd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.LISTS_SET_INDEX_SET+ut.Msg.ME_GO_MOTOR_EXTERN).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([["1","1"],["2","2"],["3","3"],["4","4"]]),"index"),this.appendValueInput("duty").setCheck(Number).setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.blynk_IOT_IR_POWER+ut.Msg.MIXLY_PINMODEOUT),this.appendDummyInput().appendField("%"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip()}},Fd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET+ut.Msg.ME_GO_MOTOR_EXTERN).appendField(ut.Msg.PIN_NUMBERING).appendField(new ut.FieldDropdown([["1","1"],["2","2"]]),"index"),this.appendDummyInput().setAlign(ut.inputs.Align.RIGHT).appendField(ut.Msg.blynk_IOT_IR_POWER+ut.Msg.MIXLY_PINMODEOUT+ut.Msg.MIXLY_DUTY_RATIO),this.setOutput(!0,Number),this.setInputsInline(!0)}},Pd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.LISTS_SET_INDEX_SET+ut.Msg.ME_GO_MOTOR_EXTERN).appendField(ut.Msg.MIXLY_ALL+ut.Msg.PIN_NUMBERING),this.appendValueInput("duty").setCheck(Number).setAlign(ut.ALIGN_RIGHT).appendField(ut.Msg.blynk_IOT_IR_POWER+ut.Msg.MIXLY_PINMODEOUT+ut.Msg.MIXLY_FREQUENCY),this.appendDummyInput().appendField("Hz"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP)}},vd={init:function(){this.setColour(Yr),this.appendDummyInput().appendField(ut.Msg.ANALOG+ut.Msg.MIXLY_KEYBOARD_INPUT),this.appendValueInput("special"),this.appendValueInput("general"),this.appendDummyInput().appendField(ut.Msg.MIXLY_RELEASE).appendField(new ut.FieldDropdown([[ut.Msg.MICROPYTHON_DISPLAY_YES,"True"],[ut.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"release"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.ANALOG+ut.Msg.MIXLY_KEYBOARD_INPUT)}},Yd={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_SPECIAL_KEY).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_SPECIAL_KEY0,"0x00"],[ut.Msg.MIXLY_SPECIAL_KEY1,"0x01"],[ut.Msg.MIXLY_SPECIAL_KEY2,"0x02"],[ut.Msg.MIXLY_SPECIAL_KEY4,"0x04"],[ut.Msg.MIXLY_SPECIAL_KEY8,"0x08"],[ut.Msg.MIXLY_SPECIAL_KEY16,"0x10"],[ut.Msg.MIXLY_SPECIAL_KEY32,"0x20"],[ut.Msg.MIXLY_SPECIAL_KEY64,"0x40"],[ut.Msg.MIXLY_SPECIAL_KEY128,"0x80"]]),"op"),this.setOutput(!0)}},Xd={init:function(){this.setColour(Yr),this.appendDummyInput("").appendField(ut.Msg.MIXLY_GENERAL_KEY).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_SPECIAL_KEY0,"0x00"],["A","0x04"],["B","0x05"],["C","0x06"],["D","0x07"],["E","0x08"],["F","0x09"],["G","0x0A"],["H","0x0B"],["I","0x0C"],["J","0x0D"],["K","0x0E"],["L","0x0F"],["M","0x10"],["N","0x11"],["O","0x12"],["P","0x13"],["Q","0x14"],["R","0x15"],["S","0x16"],["T","0x17"],["U","0x18"],["V","0x19"],["W","0x1A"],["X","0x1B"],["Y","0x1C"],["Z","0x1D"],["1 !","0x1E"],["2 @","0x1F"],["3 #","0x20"],["4 $","0x21"],["5 %","0x22"],["6 ^","0x23"],["7 &","0x24"],["8 *","0x25"],["9 (","0x26"],["0 )","0x27"],["ENTER","0x28"],["ESC","0x29"],["BACKSPACE","0x2A"],["TAB","0x2B"],["SPACE","0x2C"],["- _","0x2D"],["= +","0x2E"],["[ {","0x2F"],["] }","0x30"],["\\ |","0x31"],["; :","0x33"],["' \"","0x34"],["` ~","0x35"],[", <","0x36"],[". >","0x37"],["/ ?","0x38"],["CAPS_LOCK","0x39"],["F1","0x3A"],["F2","0x3B"],["F3","0x3C"],["F4","0x3D"],["F5","0x3E"],["F6","0x3F"],["F7","0x40"],["F8","0x41"],["F9","0x42"],["F10","0x43"],["F11","0x44"],["F12","0x45"],["PRINTSCREEN","0x46"],["SCROLL_LOCK","0x47"],["PAUSE","0x48"],["INSERT","0x49"],["HOME","0x4A"],["PAGE_UP","0x4B"],["DELETE","0x4C"],["END","0x4D"],["PAGE_DOWN","0x4E"],["RIGHT","0x4F"],["LEFT","0x50"],["DOWN","0x51"],["UP","0x52"],["NUM_LOCK","0x53"],["/","0x54"],["*","0x55"],["-","0x56"],["+","0x57"],["ENTER","0x58"],["1","0x59"],["2","0x5A"],["3","0x5B"],["4","0x5C"],["5","0x5D"],["6","0x5E"],["7","0x5F"],["8","0x60"],["9","0x61"],["0","0x62"],[".","0x63"]]),"op"),this.setOutput(!0)}},bd={init:function(){this.setColour(Yr),this.itemCount_=2,this.updateShape_(),this.setOutput(!0),this.setMutator(new ut.icons.MutatorIcon(["generalkey_create_with_item"],this)),this.setTooltip(ut.Msg.GENERALKEY_TUPLE_CREATE_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("generalkey_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;nnew Array(32).fill(0)))},ch={init:function(){this.jsonInit({colour:dh,args0:[{name:"image",options:[["HEART","HEART"],["HEART_SMALL","HEART_SMALL"],["HAPPY","HAPPY"],["SAD","SAD"],["SMILE","SMILE"],["SILLY","SILLY"],["FABULOUS","FABULOUS"],["SURPRISED","SURPRISED"],["ASLEEP","ASLEEP"],["ANGRY","ANGRY"],["CONFUSED","CONFUSED"],["NO","NO"],["YES","YES"]],type:"field_dropdown"}],output:["esp32_image","List"],helpUrl:"https://microbit-micropython.readthedocs.io/en/latest/image.html#attributes",tooltip:ut.Msg.MIXLY_MICROBIT_Built_in_image1,message0:ut.Msg.MIXLY_MICROBIT_Built_in_image})}},gh={init:function(){this.setColour(dh),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new ut.FieldDropdown(rt.Profile.default.builtinimg),"image"),this.setOutput(!0,["esp32_image","List"])}},Ch={init:function(){this.setColour(dh),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(ut.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new ut.FieldDropdown(Ch.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":ut.Msg.MIXLY_MICROBIT_image_add,"-":ut.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[ut.Msg.MICROBIT_DISPLAY_UNION,"add"],[ut.Msg.MICROBIT_DISPLAY_MINUS,"sub"]]},Sh={init:function(){this.setColour(dh),this.appendValueInput("A").setCheck("esp32_image").appendField(ut.Msg.MIXLY_MICROBIT_Invert_image1),this.setInputsInline(!0),this.setOutput(!0,"esp32_image")}},Ah={init:function(){this.setColour(dh),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.appendDummyInput("").appendField(ut.Msg.DISPLAY_IMAGE_LET),this.appendDummyInput("").appendField(ut.Msg.DISPLAY_IMAGE_LET2).appendField(new ut.FieldDropdown(Ah.OPERATORS),"OP"),this.appendValueInput("val").appendField(ut.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(ut.Msg.DISPLAY_IMAGE_UNIT);rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(ut.Msg.MIXLY_synchronize+":");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=ut.Msg.DISPLAY_IMAGE_LET,n=ut.Msg.DISPLAY_IMAGE_LET2,s=ut.Msg.DISPLAY_IMAGE_LET3;return i+n+{shift_up:ut.Msg.MIXLY_UP,shift_down:ut.Msg.MIXLY_DOWN,shift_left:ut.Msg.MIXLY_LEFT,shift_right:ut.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[ut.Msg.MIXLY_UP,"shift_up"],[ut.Msg.MIXLY_DOWN,"shift_down"],[ut.Msg.MIXLY_LEFT,"shift_left"],[ut.Msg.MIXLY_RIGHT,"shift_right"]]},Lh={init:function(){this.setColour(dh),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_JS_MONITOR_GET_POINT),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},Nh={init:function(){this.setColour(dh),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Dh={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},fh={init:function(){this.setColour(dh),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},Fh={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Clear_display);rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(ut.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Clear_display)}},Ph={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.MIXLY_SHOW+ut.Msg.MIXLY_DISPLAY_MATRIX_WRITE_NOW),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},vh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<8;i++)e.appendField(new ut.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Yh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(ut.inputs.Align.CENTRE).appendField(new ut.FieldBitmap(Yh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(8).fill(0)))},Xh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new ut.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},bh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(ut.inputs.Align.CENTRE).appendField(new ut.FieldBitmap(bh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(12).fill(0)))},yh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<8;t++){let e=this.appendDummyInput();for(let i=0;i<16;i++)e.appendField(new ut.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0,"esp32_image"),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},xh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(ut.inputs.Align.CENTRE).appendField(new ut.FieldBitmap(xh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:8},(()=>new Array(16).fill(0)))},Vh={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.OLED_SET_FONT).appendField(new ut.FieldDropdown(Vh.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[["4x5"+ut.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'4x5'"],["5x5"+ut.Msg.MIXGO_ME_DISPLAY_HORIZONTAL,"'5x5'"],["5x8"+ut.Msg.MIXGO_ME_DISPLAY_VERTICAL,"'5x8'"]]},Bh={init:function(){this.setColour(dh),this.appendValueInput("data").appendField(ut.Msg.OLED_BITMAP),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.OLED_BITMAP_OR_STRING)}},Gh={init:function(){this.setColour(dh),this.appendValueInput("data").appendField(ut.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.OLED_BITMAP_OR_STRING)}},Uh={init:function(){this.setColour(dh),this.appendValueInput("data").setCheck([String,"esp32_image","List","Tuple"]).appendField(ut.Msg.OLED_DRAWSTR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.OLED_BITMAP_OR_STRING)}},wh={init:function(){this.setColour(dh),this.appendValueInput("data").setCheck(String).appendField(ut.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(ut.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(ut.Msg.TEXT_CENTER).appendField(new ut.FieldDropdown([[ut.Msg.MICROPYTHON_DISPLAY_YES,"True"],[ut.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},kh={init:function(){this.setColour(dh),this.appendValueInput("data").setCheck(String).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_STRING),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(ut.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SCROLL_IMAGE_OR_STRING_DELAY)}},Hh={init:function(){this.setColour(dh),this.appendValueInput("data").setCheck(String).appendField(ut.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Wh={init:function(){this.setColour(dh),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.MIXLY_ESP32_JS_MONITOR_SET_BRIGHTNESS).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("STAT").setCheck([Number,Boolean]),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Kh={init:function(){this.jsonInit({colour:dh,args0:[{name:"state",options:[[ut.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[ut.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"shape",options:[[ut.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[ut.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"}],inputsInline:!0,helpUrl:ut.Msg.mpython_HELPURL,tooltip:ut.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:ut.Msg.MPYTHON_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},Jh={init:function(){this.jsonInit({colour:dh,args0:[{name:"state",options:[[ut.Msg.MPYTHON_DISPLAY_MODE_1,"1"],[ut.Msg.MPYTHON_DISPLAY_MODE_0,"0"]],type:"field_dropdown"},{name:"dir_h_v",options:[[ut.Msg.mpython_vertical,"0"],[ut.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"}],inputsInline:!0,helpUrl:ut.Msg.mpython_HELPURL,tooltip:ut.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:ut.Msg.MPYTHON_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},qh={init:function(){this.jsonInit({colour:dh,args0:[{name:"state",options:[[ut.Msg.mpython_display_hline_1,"1"],[ut.Msg.mpython_display_hline_0,"0"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"}],inputsInline:!0,helpUrl:ut.Msg.mpython_HELPURL,tooltip:ut.Msg.mpython_display_line_TOOLTIP,message0:ut.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},Qh={init:function(){this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Built_in_image1).appendField(new ut.FieldDropdown(Qh.IMAGES),"path"),this.setColour(dh),this.setOutput(!0)},IMAGES:[["Heart","expression_picture.Heart"],["Angry","expression_picture.Angry"],["Bored","expression_picture.Bored"],["Confused","expression_picture.Confused"],["Happy","expression_picture.Happy"],["Paper","expression_picture.Paper"],["Rock","expression_picture.Rock"],["Sad","expression_picture.Sad"],["Scissors","expression_picture.Scissors"],["Silly","expression_picture.Silly"],["Sleep","expression_picture.Sleep"],["Small_heart","expression_picture.Small_heart"],["Small_paper","expression_picture.Small_paper"],["Small_rock","expression_picture.Small_rock"],["Small_scissors","expression_picture.Small_scissors"],["Smile","expression_picture.Smile"],["Surprise","expression_picture.Surprise"],["Wonderful","expression_picture.Wonderful"],["Eyes_Angry","eye_picture.Eyes_Angry"],["Awake","eye_picture.Awake"],["Black_eye","eye_picture.Black_eye"],["Bottom_left","eye_picture.Bottom_left"],["Bottom_right","eye_picture.Bottom_right"],["Crazy_1","eye_picture.Crazy_1"],["Crazy_2","eye_picture.Crazy_2"],["Disappointed","eye_picture.Disappointed"],["Dizzy","eye_picture.Dizzy"],["Down","eye_picture.Down"],["Evil","eye_picture.Evil"],["Hurt","eye_picture.Hurt"],["Knocked_out","eye_picture.Knocked_out"],["Love","eye_picture.Love"],["Middle_left","eye_picture.Middle_left"],["Middle_right","eye_picture.Middle_right"],["Neutral","eye_picture.Neutral"],["Nuclear","eye_picture.Nuclear"],["Pinch_left","eye_picture.Pinch_left"],["Pinch_middle","eye_picture.Pinch_middle"],["Pinch_right","eye_picture.Pinch_right"],["Tear","eye_picture.Tear"],["Tired_left","eye_picture.Tired_left"],["Tired_middle","eye_picture.Tired_middle"],["Tired_right","eye_picture.Tired_right"],["Toxic","eye_picture.Toxic"],["Up","eye_picture.Up"],["Winking","eye_picture.Winking"],["Accept","informatio_picture.Accept"],["Backward","informatio_picture.Backward"],["Decline","informatio_picture.Decline"],["Forward","informatio_picture.Forward"],["Left","informatio_picture.Left"],["No_go","informatio_picture.No_go"],["Question_mark","informatio_picture.Question_mark"],["Right","informatio_picture.Right"],["Stop_1","informatio_picture.Stop_1"],["Stop_2","informatio_picture.Stop_2"],["Thumbs_down","informatio_picture.Thumbs_down"],["Thumbs_up","informatio_picture.Thumbs_up"],["Warning","informatio_picture.Warning"],["Bomb","object_picture.Bomb"],["Boom","object_picture.Boom"],["Fire","object_picture.Fire"],["Flowers","object_picture.Flowers"],["Forest","object_picture.Forest"],["Lightning","object_picture.Lightning"],["Light_off","object_picture.Light_off"],["Light_on","object_picture.Light_on"],["Night","object_picture.Night"],["Pirate","object_picture.Pirate"],["Snow","object_picture.Snow"],["Target","object_picture.Target"],["Bar_0","progres_picture.Bar_0"],["Bar_1","progres_picture.Bar_1"],["Bar_2","progres_picture.Bar_2"],["Bar_3","progres_picture.Bar_3"],["Bar_4","progres_picture.Bar_4"],["Dial_0","progres_picture.Dial_0"],["Dial_1","progres_picture.Dial_1"],["Dial_2","progres_picture.Dial_2"],["Dial_3","progres_picture.Dial_3"],["Dial_4","progres_picture.Dial_4"],["Dots_0","progres_picture.Dots_0"],["Dots_1","progres_picture.Dots_1"],["Dots_2","progres_picture.Dots_2"],["Dots_3","progres_picture.Dots_3"],["Hourglass_0","progres_picture.Hourglass_0"],["Hourglass_1","progres_picture.Hourglass_1"],["Hourglass_2","progres_picture.Hourglass_2"],["Timer_0","progres_picture.Timer_0"],["Timer_1","progres_picture.Timer_1"],["Timer_2","progres_picture.Timer_2"],["Timer_3","progres_picture.Timer_3"],["Timer_4","progres_picture.Timer_4"],["Water_level_0","progres_picture.Water_level_0"],["Water_level_1","progres_picture.Water_level_1"],["Water_level_2","progres_picture.Water_level_2"],["Water_level_3","progres_picture.Water_level_3"],["YES","informatio_picture.YES"],["NO","informatio_picture.NO"]]},zh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<5;t++){let e=this.appendDummyInput();for(let i=0;i<5;i++)e.appendField(new ut.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},jh={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(ut.inputs.Align.CENTRE).appendField(new ut.FieldBitmap(jh.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:5},(()=>new Array(5).fill(0)))},$h={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_ESP32_JS_MONITOR_GET_SCREEN_BRIGHTNESS)}},Zh={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_AMBIENTBRIGHT),this.setInputsInline(!0),this.setOutput(!0,Number)}},tm={init:function(){this.setColour(dh),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_JS_MONITOR_SET_SCREEN_BRIGHTNESS+" 0.0-1.0")}},em={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.MIXLY_MIXBOT_SCREEN_ROTATE).appendField(new ut.FieldDropdown(em.OPERATORS),"OP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)},OPERATORS:[[ut.Msg.mixpy_PL_PIE_SHADOW_N,"0"],[ut.Msg.CLOCKWISE+"90"+ut.Msg.blockpy_setheading_degree,"1"],[ut.Msg.CLOCKWISE+"180"+ut.Msg.blockpy_setheading_degree,"2"],[ut.Msg.CLOCKWISE+"270"+ut.Msg.blockpy_setheading_degree,"3"]]},im={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE);for(let t=0;t<12;t++){let e=this.appendDummyInput();for(let i=0;i<12;i++)e.appendField(new ut.FieldColour("#000",null,{colourOptions:["#f00","#000"],columns:2}),t+"-"+i)}this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},nm={init:function(){this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_CREATE_IMAGE),this.appendDummyInput("").setAlign(ut.inputs.Align.CENTRE).appendField(new ut.FieldBitmap(nm.BITMAP,null,{filledColor:"#000",emptyColor:"#5ba5a5",bgColor:"#e5e7f1"}),"BITMAP"),this.setOutput(!0),this.setColour(dh),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Create_image1)},BITMAP:Array.from({length:12},(()=>new Array(12).fill(0)))},sm={init:function(){this.setColour(dh),this.appendValueInput("data").appendField(ut.Msg.OLED_BITMAP),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(ut.Msg.HTML_COLOUR);rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(ut.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},om={init:function(){this.setColour(dh),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.OLED_BITMAP).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("direct").setCheck(String).appendField(ut.Msg.MIXLY_AipImageClassify_Image+ut.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},_m={init:function(){this.setColour(dh),this.appendValueInput("data").setCheck(String).appendField(ut.Msg.OLED_DRAWSTR),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("space").setCheck(Number).appendField(ut.Msg.MICROPYTHON_DISPLAY_FONT_SPACE),this.appendDummyInput("").appendField(ut.Msg.TEXT_CENTER).appendField(new ut.FieldDropdown([[ut.Msg.MICROPYTHON_DISPLAY_YES,"True"],[ut.Msg.MICROPYTHON_DISPLAY_NO,"False"]]),"center"),this.appendValueInput("VAR").appendField(ut.Msg.HTML_COLOUR);rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(ut.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SHOW_IMAGE_OR_STRING_DELAY)}},pm={init:function(){this.setColour(dh),this.appendValueInput("data").setCheck(String).appendField(ut.Msg.MIXLY_ESP32_MONITOR_SHOW_FRAME),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendValueInput("time").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.appendValueInput("VAR").appendField(ut.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},am={init:function(){this.jsonInit({colour:dh,args0:[{name:"shape",options:[[ut.Msg.MPYTHON_DISPLAY_HOLLOW,"rect"],[ut.Msg.MPYTHON_DISPLAY_SOLID,"fill_rect"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"w",type:"input_value"},{name:"h",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:ut.Msg.mpython_HELPURL,tooltip:ut.Msg.MPYTHON_DISPLAY_SHAPE_RECT_TOOLTIP,message0:ut.Msg.ONBOARD_TFT_DISPLAY_SHAPE_RECT_MESSAGE0,nextStatement:null,previousStatement:null})}},um={init:function(){this.jsonInit({colour:dh,args0:[{name:"dir_h_v",options:[[ut.Msg.mpython_vertical,"0"],[ut.Msg.mpython_horizontal,"1"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"length",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:ut.Msg.mpython_HELPURL,tooltip:ut.Msg.MPYTHON_DISPLAY_HVLINE_TOOLTIP,message0:ut.Msg.ONBOARD_TFT_DISPLAY_HVLINE_MESSAGE0,nextStatement:null,previousStatement:null})}},rm={init:function(){this.jsonInit({colour:dh,args0:[{type:"input_dummy"},{name:"x1",type:"input_value"},{name:"y1",type:"input_value"},{name:"x2",type:"input_value"},{name:"y2",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:ut.Msg.mpython_HELPURL,tooltip:ut.Msg.mpython_display_line_TOOLTIP,message0:ut.Msg.mpython_display_line_MESSAGE0,nextStatement:null,previousStatement:null})}},dm={init:function(){this.setColour(dh),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendDummyInput().appendField(ut.Msg.HTML_COLOUR),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_ESP32_JS_MONITOR_BRIGHTNESS)}},lm={init:function(){this.setColour(dh),this.appendValueInput("x").setCheck(Number).appendField(ut.Msg.MIXLY_LCD_SETCOLOR).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_GET_POINT_X),this.appendValueInput("y").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_MONITOR_PLOT_POINT_Y),this.appendValueInput("VAR").appendField(ut.Msg.HTML_COLOUR);rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(ut.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_DISPLAY_SETPIXEL)}},Im={init:function(){this.setColour(dh),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_SCREEN_FILL);rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(ut.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Tm={init:function(){this.setColour(dh),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_INIT_CLOCK),this.appendDummyInput().appendField(ut.Msg.MIXLY_CENTER_POS),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.OLED_CIRCLE_RADIUS),this.appendValueInput("VAR").appendField(ut.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Mm={init:function(){this.setColour(dh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(ut.Msg.GET_RTCTIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},hm={init:function(){this.setColour(dh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(ut.Msg.SET_TIME),this.appendValueInput("h").setCheck(Number).appendField(ut.Msg.MIXLY_HOUR),this.appendValueInput("m").setCheck(Number).appendField(ut.Msg.MIXLY_MINUTE),this.appendValueInput("s").setCheck(Number).appendField(ut.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},mm={init:function(){this.setColour(dh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(ut.Msg.DRAW_CLOCK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Em={init:function(){this.setColour(dh),this.appendValueInput("SUB"),this.appendDummyInput().appendField(ut.Msg.CLEAR_CLOCK),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_STM32_TFT_BACKGROUND_COLOR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Om={init:function(){this.jsonInit({colour:dh,args0:[{name:"shape",options:[[ut.Msg.MPYTHON_DISPLAY_HOLLOW,"False"],[ut.Msg.MPYTHON_DISPLAY_SOLID,"True"]],type:"field_dropdown"},{type:"input_dummy"},{name:"x",type:"input_value"},{name:"y",type:"input_value"},{name:"r",type:"input_value"},{name:"VAR",type:"input_value"},{name:"boolean",type:"input_value"}],inputsInline:!0,helpUrl:ut.Msg.mpython_HELPURL,message0:ut.Msg.ONBOARD_TFT_DISPLAY_SHAPE_CIRCLE_MESSAGE0,nextStatement:null,previousStatement:null})}},Rm={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.DRAW_POINTER).appendField(ut.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(ut.Msg.MIXLY_DRAW_POINTER_DU),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.DRAW_POINTER_TOOLTIP)}},cm={init:function(){this.setColour(dh),this.appendDummyInput().appendField(ut.Msg.DRAW_POINTER).appendField(ut.Msg.DRAW_POINTER_ANGLE),this.appendValueInput("angle"),this.appendDummyInput().appendField(ut.Msg.MIXLY_DRAW_POINTER_DU),this.appendValueInput("VAR").appendField(ut.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.DRAW_POINTER_TOOLTIP)}},gm={init:function(){this.setColour(dh),this.appendValueInput("data").appendField(ut.Msg.MIXLY_Display_long_text),this.appendValueInput("x").setCheck(Number).appendField("x"),this.appendValueInput("y").setCheck(Number).appendField("y"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendValueInput("VAR").appendField(ut.Msg.HTML_COLOUR);rt.Boards.getSelectedBoardKey();"Python ESP32-S3"===rt.JSFuncs.getPlatform()&&this.appendValueInput("boolean").appendField(ut.Msg.MIXLY_synchronize+":"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0)}},Cm={init:function(){this.setColour(dh),this.appendValueInput("data").appendField(ut.Msg.OLED_BITMAP),this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.OLED_BITMAP_OR_STRING),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Sm={init:function(){Th.init.call(this),this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Am={init:function(){mh.init.call(this),this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Lm={init:function(){Ah.init.call(this),this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Nm={init:function(){Dh.init.call(this),this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Dm={init:function(){fh.init.call(this),this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},fm={init:function(){Fh.init.call(this),this.appendDummyInput().appendField(`(${ut.Msg.MIXLY_DEPRECATED})`),this.setWarningText(ut.Msg.MIXLY_DEPRECATED_WARNING_TEXT)}},Fm=180,Pm={init:function(){this.setColour(Fm),this.setOutput(!0),this.setInputsInline(!0),this.appendValueInput("img").appendField(ut.Msg.DISPLAY_IMAGE_LET).setCheck(["esp32_image","List",String]),this.appendDummyInput("").appendField(ut.Msg.DISPLAY_IMAGE_LET2).appendField(new ut.FieldDropdown(Pm.OPERATORS),"OP"),this.appendValueInput("val").appendField(ut.Msg.DISPLAY_IMAGE_SHIFT).setCheck(Number),this.appendDummyInput("").appendField(ut.Msg.DISPLAY_IMAGE_UNIT);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),i=ut.Msg.DISPLAY_IMAGE_LET,n=ut.Msg.DISPLAY_IMAGE_LET2,s=ut.Msg.DISPLAY_IMAGE_LET3;return i+n+{up:ut.Msg.MIXLY_UP,down:ut.Msg.MIXLY_DOWN,left:ut.Msg.MIXLY_LEFT,right:ut.Msg.MIXLY_RIGHT}[e]+s}))},OPERATORS:[[ut.Msg.MIXLY_UP,"up"],[ut.Msg.MIXLY_DOWN,"down"],[ut.Msg.MIXLY_LEFT,"left"],[ut.Msg.MIXLY_RIGHT,"right"]]},vm={init:function(){this.setColour(Fm),this.setOutput(!0,"esp32_image"),this.appendValueInput("A").appendField(ut.Msg.MICROBIT_DISPLAY_MERGE_SHAPE),this.appendValueInput("B").appendField(new ut.FieldDropdown(vm.OPERATORS),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{"+":ut.Msg.MIXLY_MICROBIT_image_add,"-":ut.Msg.MIXLY_MICROBIT_image_reduce}[e]}))},OPERATORS:[[ut.Msg.MICROBIT_DISPLAY_UNION,"+"],[ut.Msg.MICROBIT_DISPLAY_MINUS,"-"]]},Ym={init:function(){this.setColour(Fm),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+ut.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("VAR").setCheck("esp32_image"),this.appendDummyInput("").appendField(new ut.FieldDropdown(Ym.OPERATORS),"OP"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+ut.Msg.MIXLY_MICROBIT_IMAGE+{height:ut.Msg.MIXLY_HEIGHT,width:ut.Msg.MIXLY_WIDTH}[e]}))},OPERATORS:[[ut.Msg.MIXLY_HEIGHT,"height"],[ut.Msg.MIXLY_WIDTH,"width"]]},Xm={init:function(){this.setColour(Fm),this.appendValueInput("VAR").appendField(ut.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RECT).appendField(new ut.FieldDropdown(Xm.STATUS),"OP"),this.jsonInit({message0:ut.Msg.MIXLY_MICROBIT_SHOW_RECT,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"width"},{check:Number,type:"input_value",name:"height"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_OLED_RECT)},STATUS:[[ut.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[ut.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},bm={init:function(){this.setColour(Fm),this.appendValueInput("VAR").appendField(ut.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(new ut.FieldDropdown(bm.STATUS),"OP"),this.jsonInit({message0:ut.Msg.MIXLY_HANBIT_SHOW_CIRCLE,args0:[{check:Number,type:"input_value",name:"x"},{check:Number,type:"input_value",name:"y"},{check:Number,type:"input_value",name:"r"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE)},STATUS:[[ut.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[ut.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},ym={init:function(){this.setColour(Fm),this.appendValueInput("VAR").appendField(ut.Msg.OLED).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_DISPLAY_DRAW+ut.Msg.MIXLY_HANBIT_DRAW_TRIANGLE).appendField(new ut.FieldDropdown(ym.STATUS),"OP"),this.jsonInit({message0:ut.Msg.MIXLY_HANBIT_SHOW_triangle,args0:[{check:Number,type:"input_value",name:"x0"},{check:Number,type:"input_value",name:"y0"},{check:Number,type:"input_value",name:"x1"},{check:Number,type:"input_value",name:"y1"},{check:Number,type:"input_value",name:"x2"},{check:Number,type:"input_value",name:"y2"},{type:"input_dummy"},{checked:!1,type:"field_checkbox",name:"fill"}]}),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(""),this.setTooltip(ut.Msg.MIXLY_DISPLAY_DRAW+ut.Msg.MIXLY_HANBIT_DRAW_TRIANGLE)},STATUS:[[ut.Msg.MIXLY_4DIGITDISPLAY_ON,"1"],[ut.Msg.MIXLY_4DIGITDISPLAY_OFF,"0"]]},xm="#777777",Vm={init:function(){this.setColour(xm),this.appendDummyInput("").appendField("from ").appendField(new ut.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new ut.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bm={init:function(){this.setColour(xm),this.appendDummyInput("").appendField("import ").appendField(new ut.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Gm={init:function(){this.setColour(xm),this.appendDummyInput("").appendField(new ut.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new ut.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},NE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},DE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},fE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},FE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(ut.Msg.MIXLY_EMQX_SERVER).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(ut.Msg.MIXLY_WIFI_USERNAME).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(ut.Msg.MIXLY_IOT_PASSWORD).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(ut.Msg.MIXLY_EMQX_PROJECT).setAlign(ut.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},PE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(ut.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(ut.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(ut.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},vE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(ut.Msg.MIXLY_EMQX_SUBSCRIBE+ut.Msg.MIXLY_MICROBIT_MSG).appendField(ut.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(ut.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},YE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},XE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ut.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(ut.Msg.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},xE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(ut.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},VE={init:function(){this.setColour(RE),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},BE={init:function(){this.setColour(RE),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},GE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(ut.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},UE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO").appendField(ut.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(ut.Msg.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},wE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(ut.Msg.MIXLY_EMQX_SERVER).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(ut.Msg.CONTROLS_FOR_INPUT_WITH+ut.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(ut.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},kE={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(ut.Msg.MIXLY_EMQX_SERVER).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(ut.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(ut.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},HE={init:function(){this.VISITOR_ID=rt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(RE),this.appendDummyInput("").appendField(new ut.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},WE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MixIO").appendField(ut.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},KE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("HTTP"+ut.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(ut.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(ut.Msg.MIXLY_REQUESTS_GET).appendField(ut.Msg.MIXLY_GET_CURRENT_TIME).appendField(ut.Msg.MIXLY_OPEN_DEBUG).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},JE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("HTTP"+ut.Msg.MIXLY_Client).appendField(ut.Msg.MIXLY_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_REQUESTS_LEN,"client_len"],[ut.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[ut.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},qE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MQTT"+ut.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(ut.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(ut.Msg.MIXLY_INIT_SUBSCRIBE).appendField(ut.Msg.MQTT_Topic).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(ut.Msg.MIXLY_OPEN_DEBUG).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[ut.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},QE={init:function(){this.setColour(RE),this.appendDummyInput().appendField("MQTT"+ut.Msg.MIXLY_Client).appendField(ut.Msg.MIXLY_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_REQUESTS_LEN,"client_len"],[ut.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[ut.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},zE=cE,jE=gE,$E=CE,ZE=SE,tO=LE,eO={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_CONNECT_OLLAMA),this.appendValueInput("SERVER").appendField(ut.Msg.MIXLY_EMQX_SERVER).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(ut.Msg.MODEL_NAME).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(ut.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iO=eO,nO={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_CONNECT_OPENAI),this.appendValueInput("SERVER").appendField(ut.Msg.MIXLY_EMQX_SERVER).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(ut.Msg.MIXLY_API_PRIVATE_KEY).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("NAME").appendField(ut.Msg.MODEL_NAME).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("NUMBER").appendField(ut.Msg.MIXLY_SET_MAXIMUM_HISTORICAL_SESSIONS_NUM),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sO={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(ut.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendValueInput("METHOD").appendField(ut.Msg.MIXLY_LLM_CONTENT_CALLBACK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},oO={init:function(){this.setColour(RE),this.appendDummyInput().appendField(ut.Msg.MIXLY_LLM_CHAT),this.appendValueInput("TOPIC").appendField(ut.Msg.MIXLY_MIXGO_ESPNOW_SEND),this.appendDummyInput().appendField(ut.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0)}},_O={init:function(){this.setColour(RE),this.appendDummyInput().appendField("Ollama "+ut.Msg.MIXLY_EMPTY_HISTORY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pO=225,aO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_NETWORK_INIT),this.appendDummyInput().appendField(ut.Msg.MIXLY_NETWORK_MODE).appendField(new ut.FieldDropdown([["STA","STA"],["AP","AP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_INIT_TOOLTIP)}},uO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_NETWORK_WIFI_OPEN,"True"],[ut.Msg.MIXLY_NETWORK_WIFI_CLOSE,"False"]]),"op"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_NETWORK_WIFI_FLAG),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("op"),i=ut.Msg.MIXLY_ESP32_NETWORK_OPEN_TOOLTIP;return{True:ut.Msg.MIXLY_NETWORK_WIFI_OPEN,False:ut.Msg.MIXLY_NETWORK_WIFI_CLOSE}[e]+i}))}},rO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_NETWORK_WIFI_IS_ACTIVE)}},dO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_NETWORK_WIFI_SCAN),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip((function(){return ut.Msg.MIXLY_ESP32_NETWORK_SCAN_TOOLTIP+{0:"ssid",1:"bssid",2:"channel",3:"RSSI",4:"authmode",5:"hidden",all:ut.Msg.MIXLY_NETWORK_WIFI_SCAN_ATTRIBUTE}.all}))}},lO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_ESP32_NETWORK_CONNECT),this.appendValueInput("id").setCheck(String).appendField(ut.Msg.HTML_NAME),this.appendValueInput("password").setCheck(String).appendField(ut.Msg.HTML_PASSWORD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_CONNECT_TOOLTIP)}},IO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_NETWORK_WIFI_CONNECT+ut.Msg.MIXLY_SYMBOL_QUESTION),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_WIFI_CONNECT_TOOLTIP)}},TO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_ESP32_NETWORK_IP,"0"],[ut.Msg.MIXLY_ESP32_NETWORK_MASK,"1"],[ut.Msg.MIXLY_ESP32_NETWORK_GATEWAY,"2"],["DNS","3"]]),"mode"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return ut.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP+{0:ut.Msg.MIXLY_ESP32_NETWORK_IP,1:ut.Msg.MIXLY_ESP32_NETWORK_MASK,2:ut.Msg.MIXLY_ESP32_NETWORK_GATEWAY,3:"DNS"}[e]}))}},MO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_ESP32_NETWORK_STOP_CONNECT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_STOP_TOOLTIP)}},hO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_ESP32_NETWORK_GET_WIFI),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_NETWORK_WIFI_ESSID,"essid"],[ut.Msg.MIXLY_NETWORK_WIFI_CHANNEL,"channel"]]),"op"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_GET_WIFI_TOOLTIP)}},mO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.LISTS_SET_INDEX_SET),this.appendValueInput("essid").setCheck(String).appendField(ut.Msg.MIXLY_NETWORK_WIFI_ESSID),this.appendValueInput("channel").setCheck(Number).appendField(ut.Msg.MIXLY_NETWORK_WIFI_CHANNEL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_AP_CONNECT_TOOLTIP)}},EO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_ESP32_NETWORK_SERVER1),this.appendDummyInput("").appendField(ut.Msg.MIXLY_ESP32_NETWORK_SERVER2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},OO={init:function(){this.setColour(pO),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_INIT).setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_TYPE).appendField(new ut.FieldDropdown([["TCP","TCP"],["UDP","UDP"]]),"mode"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("mode");return ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_INIT_TOOLTIP+{TCP:"TCP",UDP:"UDP"}[e]}))}},RO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_BIND_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_BIND_TOOLTIP)}},cO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_LET_SOCKET),this.appendValueInput("address").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_CONNECT_TO_ADDRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_CONNECT_TOOLTIP)}},gO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendValueInput("queue").setCheck(Number).appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_LISTEN).appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_QUEUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_LISTEN_TOOLTIP)}},CO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_ACCEPT),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_ACCEPT_TOOLTIP)}},SO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_TOOLTIP)}},AO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var").appendField("TCP"),this.appendValueInput("content").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TOOLTIP)}},LO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("size").setCheck(Number).appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_RECEIVE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_RECEIVE_FROM_TOOLTIP)}},NO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var").appendField("UDP"),this.appendValueInput("content").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_SEND),this.appendValueInput("address").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_TO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_SEND_TO_TOOLTIP)}},DO={init:function(){this.setColour(pO),this.appendValueInput("VAR").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_CLOSE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_NETWORK_SOCKET_CLOSE_TOOLTIP)}},fO={init:function(){this.setColour(pO),this.appendValueInput("DOMAIN").appendField(ut.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(ut.Msg.blockpy_REQUESTS_GET).appendField(new ut.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){ut.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},FO={init:function(){this.appendValueInput("VAL"),this.setColour(pO),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ut.FieldDropdown(FO.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:ut.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:ut.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:ut.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))},ATTR:[[ut.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[ut.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[ut.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[ut.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"]]},PO={init:function(){this.appendValueInput("VAR").appendField(ut.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.setColour(pO),this.appendDummyInput("").appendField(ut.Msg.blockpy_CONDUCT).appendField(new ut.FieldDropdown(PO.METHOD),"DIR"),this.appendDummyInput("").appendField(ut.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:ut.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:ut.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))},METHOD:[["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]},vO={init:function(){this.setColour(pO),this.appendDummyInput("").appendField(ut.Msg.MIXLY_GET_NTP+"(NTP)"),this.appendValueInput("data").appendField(ut.Msg.blynk_SERVER_ADD),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},YO={init:function(){this.setColour(pO),this.appendDummyInput("").appendField(new ut.FieldDropdown([["ntp.aliyun.com","ntp.aliyun.com"],["ntp1.aliyun.com","ntp1.aliyun.com"],["ntp2.aliyun.com","ntp2.aliyun.com"],["ntp3.aliyun.com","ntp3.aliyun.com"],["ntp4.aliyun.com","ntp4.aliyun.com"],["ntp5.aliyun.com","ntp5.aliyun.com"],["ntp6.aliyun.com","ntp6.aliyun.com"],["ntp7.aliyun.com","ntp7.aliyun.com"],["time1.cloud.tencent.com","time1.cloud.tencent.com"],["time2.cloud.tencent.com","time2.cloud.tencent.com"],["time3.cloud.tencent.com","time3.cloud.tencent.com"],["time4.cloud.tencent.com","time4.cloud.tencent.com"],["time5.cloud.tencent.com","time5.cloud.tencent.com"]]),"op"),this.setOutput(!0)}},XO="#3288dd",bO={init:function(){this.setColour(XO),this.appendValueInput("URL").appendField(ut.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(ut.Msg.blockpy_CONDUCT).appendField(new ut.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(ut.Msg.blockpy_REQUESTS).appendField(ut.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},yO={init:function(){this.setColour(XO),this.appendValueInput("URL").appendField(ut.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(ut.Msg.blockpy_CONDUCT).appendField(new ut.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(ut.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(ut.Msg.blockpy_REQUESTS+ut.Msg.OLED_STRING),this.appendDummyInput("").appendField(ut.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},xO={init:function(){this.appendValueInput("VAL"),this.setColour(XO),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ut.FieldDropdown(xO.ATTR),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)},ATTR:[[ut.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[ut.Msg.blockpy_REQUESTS_GET_ATTR_JSON,"json()"],[ut.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[ut.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[ut.Msg.MIXPY_TEXT_ENCODE,"encoding"]]},VO={init:function(){this.setColour(XO),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_IOT_CONNECT_WIFI),this.appendValueInput("WIFINAME").setCheck(String).appendField(ut.Msg.HTML_NAME),this.appendValueInput("PASSWORD").setCheck(String).appendField(ut.Msg.HTML_PASSWORD),this.appendValueInput("TIMEOUT").setCheck(Number).appendField(ut.Msg.MIXLY_IR_TIMEOUT),this.appendDummyInput().appendField(ut.Msg.MIXLY_MILLIS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_IOT_WIFI_CONNECT_TOOLTIP)}},BO={init:function(){this.setColour(XO),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_IOT_EMQX_CONNECT_TOOLTIP),this.appendValueInput("SERVER").setCheck(String).appendField(ut.Msg.MIXLY_EMQX_SERVER).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("PORT").setCheck(Number).appendField(ut.Msg.MIXLY_EMQX_PORT).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("CLIENT_ID").setCheck(String).appendField(ut.Msg.MIXLY_EMQX_CLIENT_ID).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(ut.Msg.MIXLY_WIFI_USERNAME).setAlign(ut.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(ut.Msg.MIXLY_IOT_PASSWORD).setAlign(ut.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},GO={init:function(){this.setColour(XO),this.appendValueInput("TOPIC").appendField(ut.Msg.MIXLY_EMQX_SUBSCRIBE+ut.Msg.MIXLY_MICROBIT_MSG).appendField(ut.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MESSAGE").appendField(ut.Msg.blockpy_set_of),this.setInputsInline(!0),this.setOutput(!0)}},UO={init:function(){this.setColour(XO),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(ut.Msg.MIXLY_EMQX_SUBSCRIBE+ut.Msg.MIXLY_MICROBIT_MSG).appendField(ut.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(ut.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wO={init:function(){this.setColour(XO),this.appendDummyInput().appendField("mqtt"),this.appendValueInput("TOPIC").appendField(ut.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(ut.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(ut.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},kO={init:function(){this.setColour(XO),this.appendDummyInput().appendField("mqtt"+ut.Msg.MIXLY_EMQX_IS_CONNECT),this.setInputsInline(!0),this.setOutput(!0)}},HO="#A58C5B",WO={init:function(){this.setColour(HO),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_BUTTON).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_IS_PRESSED),this.appendValueInput("STAT").appendField(ut.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_SENOR_IS_PRESSED)}},KO={init:function(){this.setColour(HO),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_BUTTON).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_WAS_PRESSED),this.appendValueInput("STAT").appendField(ut.Msg.MIXLY_ELECLEVEL),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_SENOR_WAS_PRESSED)}},JO={init:function(){this.setColour(HO),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_BUTTON).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_PRESSES),this.appendValueInput("VAR").setCheck(Number).appendField(ut.Msg.MIXLY_GET_PRESSES_TIME),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.PROCEDURES_DEFRETURN_RETURN+ut.Msg.MIXLY_BUTTON+ut.Msg.MIXLY_GET_PRESSES)}},qO={init:function(){this.setColour(HO),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_BUTTON).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MODE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_RISING,"machine.Pin.IRQ_RISING"],[ut.Msg.MIXLY_FALLING,"machine.Pin.IRQ_FALLING"],[ut.Msg.MIXLY_CHANGE,"(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]),"mode"),this.appendValueInput("DO").appendField(ut.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_INOUT_ATTACHINTERRUPT)}},QO={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_shake,"shake"],[ut.Msg.MIXLY_UP,"up"],[ut.Msg.MIXLY_DOWN,"down"],[ut.Msg.MIXLY_LEFT,"left"],[ut.Msg.MIXLY_RIGHT,"right"],[ut.Msg.MIXLY_MICROBIT_face_up,"face up"],[ut.Msg.MIXLY_MICROBIT_face_down,"face down"],[ut.Msg.MIXLY_MICROBIT_freefall,"freefall"],["3g","3g"],["6g","6g"],["8g","8g"]]),"gesture"),this.appendStatementInput("DO").appendField(ut.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=ut.Msg.MIXLY_MICROBIT_JS_CURRENT,n=ut.Msg.MSG.catSensor,s=ut.Msg.MIXLY_MICROBIT_JS_STATE,o=ut.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:ut.Msg.MIXLY_MICROBIT_shake,up:ut.Msg.MIXLY_UP,down:ut.Msg.MIXLY_DOWN,left:ut.Msg.MIXLY_LEFT,right:ut.Msg.MIXLY_RIGHT,"face up":ut.Msg.MIXLY_MICROBIT_face_up,"face down":ut.Msg.MIXLY_MICROBIT_face_down,freefall:ut.Msg.MIXLY_MICROBIT_freefall,"3g":"3g","6g":"6g","8g":"8g"}[e]+o}))}},zO={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_ADXL345).setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new ut.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=ut.Msg.MIXLY_MICROBIT_Direction,s=ut.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":ut.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},jO={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_JS_LIGHT_LEVEL),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_ESP32_SENSOR_LIGHT_LEVEL_TOOLTIP)}},$O={init:function(){this.setColour(HO),this.appendValueInput("PIN",Number).appendField(new ut.FieldDropdown([["DHT11","DHT11"],["DHT22","DHT22"]]),"TYPE").appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(new ut.FieldDropdown($O.METHOD),"WHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHAT");return{temperature:ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM,relative_humidity:ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_HUM,tempandhum:ut.Msg.MIXLY_TOOLTIP_BLOCKGROUP_GET_TEM_HUM}[e]}))},METHOD:[[ut.Msg.MIXLY_GETTEMPERATUE,"temperature"],[ut.Msg.MIXLY_GETHUMIDITY,"humidity"]]},ZO={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_EXTERN_LIGHT),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.ESP32_SENSOR_NIXGO_LIGHT_TOOLTIP)}},tR={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_EXTERN_SOUND),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_EXTERN_VALUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.ESP32_SENSOR_NIXGO_SOUND_TOOLTIP)}},eR={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new ut.FieldDropdown([[ut.Msg.TEXT_TRIM_LEFT,"left"],[ut.Msg.TEXT_TRIM_RIGHT,"right"]]),"direction").appendField(ut.Msg.MIXLY_ESP32_NEAR),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("direction"),i=ut.Msg.MIXLY_ESP32_SENSOR_MIXGO_PIN_NEAR_TOOLTIP,n=ut.Msg.MIXLY_ESP32_NEAR;return i+{left:ut.Msg.TEXT_TRIM_LEFT,right:ut.Msg.TEXT_TRIM_RIGHT}[e]+n}))}},iR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_ALTITUDE_SENSOR+" BMP280").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GETTEMPERATUE,"get_BMP_temperature()"],[ut.Msg.MIXLY_GETPRESSURE,"get_BMP_pressure()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_BMP_temperature()":ut.Msg.MIXLY_MICROBIT_SENSOR_BMP_temperature_TOOLTIP,"get_BMP_pressure()":ut.Msg.MIXLY_MICROBIT_SENSOR_BMP_press_TOOLTIP}[e]}))}},nR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+" SHT20").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GETTEMPERATUE,"get_SHT_temperature()"],[ut.Msg.MIXLY_GETHUMIDITY,"get_SHT_relative_humidity()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{"get_SHT_temperature()":ut.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,"get_SHT_relative_humidity()":ut.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},sR={init:function(){this.setColour(HO),this.appendValueInput("PIN",Number).appendField("DS18X20 "+ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(ut.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_MICROBIT_SENSOR_DS18X20_TOOLTIP)}},oR={init:function(){this.setColour(HO),this.appendDummyInput("").appendField("LM35"+ut.Msg.MIXLY_TEMP),this.appendValueInput("PIN",Number).appendField(ut.Msg.MIXLY_PIN).setCheck(Number),this.appendDummyInput("").appendField(ut.Msg.MIXLY_GETTEMPERATUE),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(ut.Msg.MIXLY_TOOLTIP_LM35)}},_R={init:function(){this.setColour(HO),this.appendValueInput("I2CSUB").appendField(ut.Msg.CONTROLS_FOR_INPUT_WITH+"I2C").setCheck("var"),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_SETUP+ut.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_ESP32_EXTERN_LIGHT+"(LTR308ALS)","LTR308"],[ut.Msg.MIXLY_COLOR_SENSOR+"(LTR381RGB)","LTR381RGB"],[ut.Msg.MIXLY_COLOR_SENSOR+"(UCS12071)","UCS12071"],[ut.Msg.MIXLY_EXTERN_LIGHTUV+"(LTR390UV)","LTR390UV"],[ut.Msg.MIXLY_ALTITUDE_SENSOR+"(HP203X)","HP203X"],[ut.Msg.MIXLY_ALTITUDE_SENSOR+"(SPL06_001)","SPL06_001"],[ut.Msg.MIXLY_ALTITUDE_SENSOR+"(MS5611)","MS5611"],[ut.Msg.MIXLY_ALTITUDE_SENSOR+"(BMP280)","BMP280"],[ut.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHTC3)","SHTC3"],[ut.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(AHT21)","AHT21"],[ut.Msg.MIXLY_TEMP_AND_HUMIDITY_SENSOR+"(SHT20)","SHT20"],[ut.Msg.MIXLY_LASER_RANGE_SENSOR+"(VL53L0X)","VL53L0X"],[ut.Msg.MIXLY_GEOMAGNETIC_SENSOR+"(QMC5883L)","QMC5883L"],[ut.Msg.MIXLY_ESP32_MAX30102+"(MAX30102)","MAX30102"],[ut.Msg.HTML_COLOUR+"、"+ut.Msg.MIXLY_ENVIRONMENT_LIGHT+"、"+ut.Msg.MIXLY_NEXT+"、"+ut.Msg.MIXLY_ESP32_APDS9960+"(APDS9960)","APDS9960"],[ut.Msg.MIXLY_NINE_AXIS_SENSOR+"(MPU9250)","MPU9250"],[ut.Msg.MixGo_MPU9250+"(ADXL345)","ADXL345"],["RFID","RFID"],[ut.Msg.MIXLY_RADAR_SENSOR+"(CBR817)","CBR817"],[ut.Msg.MIXLY_AipSpeech_asr+"(CI130X)","CI130X"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("LTR308","key")}},pR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.LISTS_SET_INDEX_SET+ut.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(ut.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+ut.Msg.MIXLY_DELAY_TIME_RANGE)}},aR={init:function(){this.setColour(HO),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RADAR).appendField(ut.Msg.LISTS_SET_INDEX_SET+ut.Msg.MIXlY_INTERACTION),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_DETECTION_THRESHOLD),this.appendValueInput("VAR2").appendField(ut.Msg.MIXLY_DELAY_TIME),this.appendDummyInput().appendField("ms"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_THRESHOLD_TOOLTIP+" ; "+ut.Msg.MIXLY_DELAY_TIME_RANGE)}},uR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_RADAR+"CBR817").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},rR={init:function(){this.setColour(HO),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RADAR).appendField(ut.Msg.MIXLY_GET_TO_INTERACTION),this.setOutput(!0),this.setInputsInline(!0)}},dR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_IDENTIFY_ONCE_AND_SAVE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},lR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_HELLO_XIAOZHI,"1"],[ut.Msg.MIXLY_XIAOZHIXIAOZHI,"2"],[ut.Msg.MIXLY_THE_FIRST,"3"],[ut.Msg.MIXLY_THE_SECOND,"4"],[ut.Msg.MIXLY_THE_THIRD,"5"],[ut.Msg.MIXLY_THE_FOURTH,"6"],[ut.Msg.MIXLY_THE_FIFTH,"7"],[ut.Msg.MIXLY_THE_SIXTH,"8"],[ut.Msg.MIXLY_THE_SEVENTH,"9"],[ut.Msg.MIXLY_THE_EIGHTH,"10"],[ut.Msg.MIXLY_THE_NINTH,"11"],[ut.Msg.MIXLY_THE_TENTH,"12"],[ut.Msg.MIXLY_THE_ELEVENTH,"13"],[ut.Msg.MIXLY_THE_TWELFTH,"14"],[ut.Msg.MIXLY_THE_13TH,"15"],[ut.Msg.MIXLY_THE_14TH,"16"],[ut.Msg.MIXLY_THE_15TH,"17"],[ut.Msg.MIXLY_THE_16TH,"18"],[ut.Msg.MIXLY_THE_17TH,"19"],[ut.Msg.MIXLY_THE_18TH,"20"],[ut.Msg.MIXLY_THE_19TH,"21"],[ut.Msg.MIXLY_THE_20TH,"22"],[ut.Msg.MIXLY_Turn_on_the_lights,"23"],[ut.Msg.MIXLY_Turn_off_the_lights,"24"],[ut.Msg.MIXLY_Turn_up_the_brightness,"25"],[ut.Msg.MIXLY_Turn_down_the_brightness,"26"],[ut.Msg.MIXLY_Set_it_to_red,"27"],[ut.Msg.MIXLY_Set_it_to_orange,"28"],[ut.Msg.MIXLY_Set_it_to_yellow,"29"],[ut.Msg.MIXLY_Set_it_to_green,"30"],[ut.Msg.MIXLY_Set_it_to_cyan,"31"],[ut.Msg.MIXLY_Set_it_to_blue,"32"],[ut.Msg.MIXLY_Set_it_to_purple,"33"],[ut.Msg.MIXLY_Set_it_to_white,"34"],[ut.Msg.MIXLY_Turn_on_the_fan,"35"],[ut.Msg.MIXLY_Turn_off_the_fan,"36"],[ut.Msg.MIXLY_First_gear,"37"],[ut.Msg.MIXLY_Wind_speed_second,"38"],[ut.Msg.MIXLY_Third_gear,"39"],[ut.Msg.MIXLY_Previous,"40"],[ut.Msg.MIXLY_Next_page,"41"],[ut.Msg.MIXLY_Show_smiley_face,"42"],[ut.Msg.MIXLY_Show_crying_face,"43"],[ut.Msg.MIXLY_Show_love,"44"],[ut.Msg.MIXLY_Close_display,"45"],[ut.Msg.MIXLY_Start_execution,"46"],[ut.Msg.MIXLY_FORWARD,"47"],[ut.Msg.MIXLY_BACKWARD,"48"],[ut.Msg.MIXLY_TURNLEFT,"49"],[ut.Msg.MIXLY_TURNRIGHT,"50"],[ut.Msg.MIXLY_STOP,"51"],[ut.Msg.MIXLY_Accelerate,"52"],[ut.Msg.MIXLY_retard,"53"],[ut.Msg.ROTATION_FORWARD,"54"],[ut.Msg.ROTATION_BACKWARD,"55"],[ut.Msg.MIXLY_Query_temperature,"56"],[ut.Msg.MIXLY_Query_humidity,"57"],[ut.Msg.MIXLY_Query_brightness,"58"],[ut.Msg.MIXLY_Query_sound,"59"],[ut.Msg.MIXLY_Query_time,"60"],[ut.Msg.MIXLY_Query_distance,"61"],[ut.Msg.MIXLY_Query_pressure,"62"],[ut.Msg.MIXLY_Query_key,"63"],[ut.Msg.MIXLY_Query_touch,"64"],[ut.Msg.MIXLY_Query_color,"65"]]),"cmd").appendField(ut.Msg.MIXLY_WHETHER+ut.Msg.MIXLY_BE_IDENTIFIED),this.setOutput(!0),this.setInputsInline(!0)}},IR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_RECOGNIZED_STATE,"status1"],[ut.Msg.MIXLY_WHETHER_BROADCAST,"status2"],[ut.Msg.MIXLY_THE_RECOGNIZED_CMD,"result"]]),"key"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_CI130X_GET_THE_RECOGNIZED_STATE_TOOLTIP)}},TR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MP3_PLAY).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[ut.Msg.MIXLY_WIND_SPEED,"154"],[ut.Msg.MIXLY_HYETAL,"155"],[ut.Msg.MIXLY_TEMPERATURE,"156"],[ut.Msg.MIXLY_Humidity,"157"],[ut.Msg.MIXLY_Altitude,"158"],[ut.Msg.MIXLY_SOUND,"159"],[ut.Msg.MIXLY_BRIGHTNESS,"160"],[ut.Msg.ME_GO_HALL_SENSOR_DISTANCE,"161"],[ut.Msg.MIXLY_SERVO,"162"],[ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"163"],[ut.Msg.MIXLY_BUTTON2,"164"],[ut.Msg.MIXLY_ESP32_TOUCH,"165"],[ut.Msg.MIXLY_PAY,"166"],[ut.Msg.MIXLY_CARSH_CHANGE,"167"],[ut.Msg.MIXLY_COUNTDOWN,"168"],[ut.Msg.MIXLY_TIMING,"169"],[ut.Msg.MIXLY_AT_THE_MOMENT,"170"],[ut.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE,"171"],[ut.Msg.MIXLY_FORWARD,"172"],[ut.Msg.MIXLY_BACKWARD,"173"],[ut.Msg.MIXLY_TURNLEFT,"174"],[ut.Msg.MIXLY_TURNRIGHT,"175"],[ut.Msg.MIXLY_STOP,"176"],[ut.Msg.MIXLY_Accelerate,"177"],[ut.Msg.MIXLY_retard,"178"],[ut.Msg.ROTATION_FORWARD,"179"],[ut.Msg.ROTATION_BACKWARD,"180"],[ut.Msg.TUPLE_JOIN,"181"],[ut.Msg.MIXLY_SHOW,"182"],[ut.Msg.MIXLY_LAMPLIGHT,"183"],[ut.Msg.MIXLY_ACCELERATION,"184"]]),"star"),this.appendValueInput("NUM").appendField(ut.Msg.MIXLY_NUMBER),this.appendDummyInput("").appendField(ut.Msg.MIXLY_UNIT).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,"None"],[ut.Msg.MIXLY_YEAR,"117"],[ut.Msg.MIXLY_MONTH,"118"],[ut.Msg.MIXLY_DAY,"119"],[ut.Msg.MIXLY_HOUR,"120"],[ut.Msg.MIXLY_MINUTE,"121"],[ut.Msg.MIXLY_SECOND,"122"],[ut.Msg.MIXLY_WEEK2,"123"],[ut.Msg.MIXLY_RMB_UNIT,"124"],[ut.Msg.blockpy_setheading_degree,"125"],[ut.Msg.MIXLY_GEAR,"126"],[ut.Msg.MIXLY_LAYER,"127"],[ut.Msg.MIXLY_GRAM,"128"],[ut.Msg.MIXLY_METER,"129"],[ut.Msg.MIXLY_CENTIMETER,"130"],[ut.Msg.MIXLY_MILLIMETER,"131"],[ut.Msg.MIXLY_LUMEN,"132"],[ut.Msg.MIXLY_DECIBEL,"133"],[ut.Msg.MIXLY_hectopascal,"134"],[ut.Msg.MIXLY_PERCENT,"135"],[ut.Msg.MIXLY_CELSIUS,"136"],[ut.Msg.MIXLY_METER_PER_SEC,"137"],[ut.Msg.MIXLY_MICROBIT_Turn_on_display,"138"],[ut.Msg.MIXLY_MICROBIT_Turn_off_display,"139"],[ut.Msg.MIXLY_SUCCESS,"140"],[ut.Msg.MIXLY_FAILED,"141"],[ut.Msg.MIXLY_WRONG,"142"],[ut.Msg.MIXLY_GOOD,"143"],[ut.Msg.MIXLY_blockpy_set_add,"144"],[ut.Msg.MIXLY_DECREASE,"145"],[ut.Msg.COLOUR_RGB_RED,"146"],[ut.Msg.COLOUR_RGB_ORANGE,"147"],[ut.Msg.COLOUR_YELLOW,"148"],[ut.Msg.COLOUR_RGB_GREEN,"149"],[ut.Msg.COLOUR_CYAN,"150"],[ut.Msg.COLOUR_RGB_BLUE,"151"],[ut.Msg.COLOUR_RGB_PURPLE,"152"],[ut.Msg.COLOUR_RGB_WHITE,"153"]]),"end"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},MR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_AipSpeech_asr+"CI130X").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.LISTS_SET_INDEX_SET+ut.Msg.MIXLY_SYSTEM+ut.Msg.MIXLY_CMD).appendField(new ut.FieldDropdown([[ut.Msg.MILXY_ENTER_WAKE_UP,"1"],[ut.Msg.MIXLY_INCREASE_VOLUME,"202"],[ut.Msg.MIXLY_REDUCE_VOLUME,"203"],[ut.Msg.MIXLY_MAX_VOLUME,"204"],[ut.Msg.MIXLY_MINIMUM,"205"],[ut.Msg.MIXLY_OPEN_RESPONSE,"206"],[ut.Msg.MIXLY_CLOSE_RESPONSE,"207"],[ut.Msg.MIXLY_QUIT_WAKE_UP,"208"]]),"cmd"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},hR={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_MAX30102+" MAX30102"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_ESP32_MAX30102_IR,"[0]"],[ut.Msg.MIXLY_ESP32_MAX30102_RED,"[1]"],[ut.Msg.MIXLY_ESP32_MAX30102_IR+","+ut.Msg.MIXLY_ESP32_MAX30102_RED,""]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},mR={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_APDS9960+" APDS9960"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_ESP32_APDS9960_COLOR,"color"],[ut.Msg.MIXLY_ESP32_APDS9960_GESTURE,"gesture"],[ut.Msg.MIXLY_ESP32_APDS9960_APPROACH,"proximity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},ER={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_ESP32_EXTERN_LIGHT+" LTR308ALS"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_LIGHT_INTENSITY),this.setOutput(!0,Number),this.setInputsInline(!0)}},OR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.HTML_COLOUR+ut.Msg.MSG.catSensor+" LTR381RGB").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GET+ut.Msg.HTML_COLOUR,"[2]"],[ut.Msg.MIXLY_GET+ut.Msg.MIXLY_IR_STRENGTH,"[1]"],[ut.Msg.MIXLY_GET+ut.Msg.MIXLY_LIGHT_STRENGTH,"[0]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},RR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.HTML_COLOUR+ut.Msg.MSG.catSensor+" UCS12071").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GET+"RGB"+ut.Msg.HTML_COLOUR,"0"],[ut.Msg.MIXLY_GET+ut.Msg.MIXLY_RGB_RAW,"1"],[ut.Msg.MIXLY_GET_ENV_LIGHT+ut.Msg.MIXLY_BRIGHTNESS,"2"],[ut.Msg.GET_IR_STRENGTH+ut.Msg.MIXLY_BRIGHTNESS,"3"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},cR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_EXTERN_LIGHTUV+" LTR390UV").setCheck("var"),this.appendDummyInput().appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GET_ENV_LIGHT,"E"],[ut.Msg.MIXLY_GET_ULTRAVIOLET,"U"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},gR={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_LASER_RANGE+" VL53L0X"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GET_DISTANCE+"(mm)"),this.setOutput(!0,Number),this.setInputsInline(!0)}},CR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_TEM_HUM+" SHTC3").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GETTEMPERATUE,"temperature"],[ut.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:ut.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,humidity:ut.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},SR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_TEM_HUM+" AHT21").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GETTEMPERATUE,"temperature"],[ut.Msg.MIXLY_GETHUMIDITY,"humidity"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key");return{temperature:ut.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,relative_humidity:ut.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP}[e]}))}},AR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_Altitude+ut.Msg.MSG.catSensor+" HP203X").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GETPRESSURE,"pressure()"],[ut.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[ut.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},LR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_Altitude+ut.Msg.MSG.catSensor+" SPL06_001").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GETPRESSURE,"pressure()"],[ut.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[ut.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},NR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_Altitude+ut.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_GETPRESSURE,"pressure()"],[ut.Msg.MIXLY_GETTEMPERATUE,"temperature()"],[ut.Msg.MIXLY_GET_ALTITUDE,"altitude()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},DR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_Altitude+ut.Msg.MSG.catSensor+" MS5611").setCheck("var"),this.appendValueInput("VAR").appendField(ut.Msg.MIXLY_REF_TO_PRESSURE),this.appendDummyInput().appendField(ut.Msg.MIXLY_CAL_TO_ALTITUDE),this.setOutput(!0,Number),this.setInputsInline(!0)}},fR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MIXGOPE_FIELD+ut.Msg.MSG.catSensor+" QMC5883L").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"get_bearing()"],[ut.Msg.MIXLY_TEMPERATURE,"get_temp()"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},FR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_CURRENT_GESTURE).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_shake,"shake"],[ut.Msg.MIXLY_UP,"up"],[ut.Msg.MIXLY_DOWN,"down"],[ut.Msg.MIXLY_LEFT,"left"],[ut.Msg.MIXLY_RIGHT,"right"],[ut.Msg.MIXLY_MICROBIT_face_up,"face up"],[ut.Msg.MIXLY_MICROBIT_face_down,"face down"]]),"gesture"),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("gesture"),i=ut.Msg.MIXLY_MICROBIT_JS_CURRENT,n=ut.Msg.MSG.catSensor,s=ut.Msg.MIXLY_MICROBIT_JS_STATE,o=ut.Msg.MIXLY_MICROBIT_PERFORMANCE;return i+n+s+{shake:ut.Msg.MIXLY_MICROBIT_shake,up:ut.Msg.MIXLY_UP,down:ut.Msg.MIXLY_DOWN,left:ut.Msg.MIXLY_LEFT,right:ut.Msg.MIXLY_RIGHT,"face up":ut.Msg.MIXLY_MICROBIT_face_up,"face down":ut.Msg.MIXLY_MICROBIT_face_down}[e]+o}))}},PR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_JS_ACCELERATION).appendField(new ut.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MICROBIT_JS_ACCELERATION);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=ut.Msg.MIXLY_MICROBIT_Direction,s=ut.Msg.MIXLY_MICROBIT_JS_ACCELERATION1;return i+{x:"x",y:"y",z:"z","(x,y,z)":ut.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},vR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_JS_GET+ut.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH).appendField(new ut.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=ut.Msg.MIXLY_MICROBIT_Direction,s=ut.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH;return i+{x:"x",y:"y",z:"z","(x,y,z)":ut.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},YR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET+ut.Msg.MIXLY_ESP32_SENOR_GYRO).appendField(new ut.FieldDropdown([["x","x"],["y","y"],["z","z"],["(x,y,z)","values"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("key"),i=ut.Msg.MIXLY_MICROBIT_PY_STORAGE_GET,n=ut.Msg.MIXLY_MICROBIT_Direction,s=ut.Msg.MIXLY_ESP32_SENOR_GYRO;return i+{x:"x",y:"y",z:"z","(x,y,z)":ut.Msg.MIXLY_MICROBIT_Shiliang_Direction}[e]+n+s}))}},XR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MICROBIT_JS_CALIBRATE_COMPASS)}},bR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_NINE_AXIS_SENSOR+" MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_GETTEMPERATUE),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_GETTEMPERATUE)}},yR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_JS_GET_COMPASS).appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,"strength"],[ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE,"heading"]]),"compass"),this.setOutput(!0,Number),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("compass");return ut.Msg.MIXLY_MICROBIT_JS_GET_COMPASS+{strength:ut.Msg.MIXLY_MICROBIT_JS_FIELD_STRENGTH,heading:ut.Msg.MIXLY_MICROBIT_JS_BY_ANGLE}[e]}))}},xR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("MPU9250").setCheck("var"),this.appendDummyInput().appendField(ut.Msg.MIXLY_MICROBIT_Reset_COMPASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(ut.Msg.MIXLY_MICROBIT_Reset_COMPASS)}},VR={init:function(){this.setColour(HO),this.appendValueInput("SPISUB").appendField(ut.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(ut.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_SETUP+ut.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(new ut.FieldDropdown([["RFID","RFID"],["WS-LoRa","Weather"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setFieldValue("RFID","key")}},BR={init:function(){this.setColour(HO),this.appendDummyInput().appendField("RFID"+ut.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(ut.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_RFID_READ_CARD_UID,"id"],[ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"content"],[ut.Msg.MIXLY_ALL,"ALL"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},GR={init:function(){this.setColour(HO),this.appendDummyInput().appendField("RFID"+ut.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_RFID_READ_CARD_UID),this.setOutput(!0,Number),this.setInputsInline(!0)}},UR={init:function(){this.setColour(HO),this.appendDummyInput().appendField("RFID"+ut.Msg.MIXLY_RFID_READ_CARD),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(ut.Msg.MIXLY_LIST_INDEX),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL),this.setOutput(!0,"Tuple"),this.setInputsInline(!0)}},wR={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(ut.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(ut.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},kR={init:function(){this.setColour(HO),this.appendDummyInput().appendField(ut.Msg.MIXLY_COMMUNICATION_RFID_WRITE),this.appendValueInput("SUB").setCheck("var"),this.appendValueInput("SECTOR").appendField(ut.Msg.MIXLY_LIST_INDEX),this.appendValueInput("CONTENT").appendField(ut.Msg.MIXLY_COMMUNICATION_WRITE_NUM),this.appendDummyInput().appendField(ut.Msg.RETURN_SUCCESS_OR_NOT),this.setInputsInline(!0),this.setOutput(!0,Boolean)}},HR={init:function(){this.setColour(HO),this.appendDummyInput().appendField("RFID"),this.appendValueInput("SUB").setCheck("var"),this.appendDummyInput("").appendField(new ut.FieldDropdown([[ut.Msg.MIXLY_RFID_SCAN_OK,"0"],[ut.Msg.MIXLY_RFID_SCAN_NOTAGERR,"1"],[ut.Msg.MIXLY_RFID_SCAN_ERROR,"2"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0)}},WR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_MICROBIT_JS_GET).appendField(new ut.FieldDropdown([["全部(元组)","data()[0]"],["全部(json)","data()[1]"],["全部(json,附带位置信息)","data()[2]"],["编号","data()[0][0]"],["电量","data()[0][1]"],["风速","data()[0][2]"],["阵风","data()[0][3]"],["风向","data()[0][4]"],["雨量","data()[0][5]"],["温度","data()[0][6]"],["湿度","data()[0][7]"],["光照","data()[0][8]"],["紫外线","data()[0][9]"],["大气压","data()[0][10]"],["信号强度","data()[0][11]"],["信噪比","data()[0][12]"]]),"key"),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip("返回气象数据元组 data= (设备id,电池状态,风速m/s,阵风m/s,风向°,雨量mm,温度℃,湿度%,光照Lux,UVI,大气压Pa,信号强度dB,信噪比dB)")}},KR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendDummyInput("").appendField(ut.Msg.MIXLY_SERIAL_AVAILABLE),this.setOutput(!0,Number),this.setInputsInline(!0)}},JR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.appendValueInput("BASE").appendField("以主题"),this.appendDummyInput("").appendField("串口发送至MixIO"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},qR={init:function(){this.setColour(HO),this.appendValueInput("SUB").appendField("无线气象站 WS-LoRa").setCheck("var"),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new ut.icons.MutatorIcon(["weather_set_label_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("weather_set_label_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n>6),i.push(128|63&o)):(2048<=o&&o<=55295||57344<=o&&o<=65535)&&(n+=3,i.push(224|15&o>>12),i.push(128|63&o>>6),i.push(128|63&o))}for(s=0;s>8,255&n].concat(i)}(t,!0),i="",n=0;n=0?"0x700000":["mixgo_sant"].indexOf(n)>=0?"0xE00000":"0x3A0000","32x12 Matrix"==_?(e.definitions_.import_matrix32x12="import matrix32x12",i=s+" = matrix32x12.Matrix("+o+", font_address="+p+")\n"):"16x8 Matrix"==_&&(e.definitions_.import_matrix16x8="import matrix16x8",i=s+" = matrix16x8.Matrix("+o+")\n"),i},zf=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},jf=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},$f=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},Zf=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},tF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},eF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},iF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},nF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},sF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},oF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},_F=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".get_brightness()",e.ORDER_ATOMIC]},pF=function(t,e){return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".set_brightness("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+")\n"},aF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("image"),e.ORDER_ATOMIC]},uF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_"+t.getFieldValue("OP")+"("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"B",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},rF=function(t,e){return[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".map_invert("+e.valueToCode(t,"A",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},dF=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC);return e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = ssd1306.SSD1306_I2C("+e.valueToCode(this,"row",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"column",e.ORDER_ATOMIC)+", "+i+")\n"},lF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_str("+(e.valueToCode(this,"Text_line1",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line2",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line3",e.ORDER_ASSIGNMENT)||"''")+", "+(e.valueToCode(this,"Text_line4",e.ORDER_ASSIGNMENT)||"''")+")\n"},IF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_line("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+", 1)\n"},TF=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"width",e.ORDER_ATOMIC),_=e.valueToCode(this,"height",e.ORDER_ATOMIC),p="TRUE"==this.getFieldValue("fill")?"True":"False",a=this.getFieldValue("OP");switch(p){case"True":return i+".show_fill_rect("+n+", "+s+", "+o+", "+_+", "+a+")\n";case"False":return i+".show_rect("+n+", "+s+", "+o+", "+_+", "+a+")\n"}},MF=function(t,e){e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"length",e.ORDER_ATOMIC);return i+".show_"+this.getFieldValue("direction")+"("+n+", "+s+", "+o+", 1)\n"},hF=function(t,e){return["ON"==this.getFieldValue("ONOFF")?"1":"0",e.ORDER_ATOMIC]},mF=function(t,e){e.definitions_.import_matrix="import matrix";var i=t.getFieldValue("OP");return[e.valueToCode(t,"img",e.ORDER_ATOMIC)+".shift_"+i+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},EF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_ssd1306="import ssd1306",e.definitions_.import_machine="import machine",i+".show_fill("+this.getFieldValue("key")+")\n"},OF=function(t,e){return["matrix.Image."+this.getFieldValue("ANIMATION"),e.ORDER_ATOMIC]},RF=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x",e.ORDER_ATOMIC),s=e.valueToCode(this,"y",e.ORDER_ATOMIC),o=e.valueToCode(this,"r",e.ORDER_ATOMIC),_="TRUE"==this.getFieldValue("fill")?"True":"False",p=this.getFieldValue("OP");switch(_){case"True":return i+".show_fill_circle("+n+", "+s+", "+o+", "+p+")\n";case"False":return i+".show_circle("+n+", "+s+", "+o+", "+p+")\n"}},cF=function(t,e){var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306";var n=e.valueToCode(this,"x0",e.ORDER_ATOMIC),s=e.valueToCode(this,"y0",e.ORDER_ATOMIC),o=e.valueToCode(this,"x1",e.ORDER_ATOMIC),_=e.valueToCode(this,"y1",e.ORDER_ATOMIC),p=e.valueToCode(this,"x2",e.ORDER_ATOMIC),a=e.valueToCode(this,"y2",e.ORDER_ATOMIC),u="TRUE"==this.getFieldValue("fill")?"True":"False",r=this.getFieldValue("OP");switch(u){case"True":return i+".show_fill_triangle("+n+", "+s+", "+o+", "+_+", "+p+", "+a+", "+r+")\n";case"False":return i+".show_triangle("+n+", "+s+", "+o+", "+_+", "+p+", "+a+", "+r+")\n"}},gF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_bitmap("+e.valueToCode(this,"START_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"START_Y",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"bitmap_name",e.ORDER_ATOMIC)+","+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+","+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+")\n"},CF=function(t,e){return e.definitions_.import_machine="import machine",e.definitions_.import_ssd1306="import ssd1306",e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".show_pixel("+e.valueToCode(this,"POS_X",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"POS_Y",e.ORDER_ATOMIC)+")\n"},SF=function(t,e){var i,n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),o=this.getFieldValue("key");return"TM1650"==o?(e.definitions_.import_tm1650="import tm1650",i=n+" = tm1650."+o+"("+s+")\n"):"TM1637"==o&&(e.definitions_.import_tm1637="import tm1637",i=n+" = tm1637."+o+"("+s+")\n"),i},AF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+"."+this.getFieldValue("STAT")+"()\n"},LF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".shownum("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},NF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".showDP("+e.valueToCode(this,"NO",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"},DF=function(t,e){return e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+".intensity("+e.valueToCode(this,"VALUE",e.ORDER_ATOMIC)+")\n"},fF=function(t,e){e.definitions_.import_st7789="import st7789";var i=rt.Boards.getSelectedBoardKey().split(":")[2],n="";n=["mpython","mixgo_pe","mixgo_nova"].indexOf(i)>=0?"0x700000":["mixgo_sant"].indexOf(i)>=0?"0xE00000":"0x3A0000";var s=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),o=e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC),_=e.valueToCode(this,"PINCS",e.ORDER_ATOMIC),p=e.valueToCode(this,"PINDC",e.ORDER_ATOMIC);return s+" = st7789.ST7789("+o+", "+e.valueToCode(this,"WIDTH",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"HEIGHT",e.ORDER_ATOMIC)+", dc_pin="+p+", cs_pin="+_+", rotation="+this.getFieldValue("rotate")+", font_address="+n+")\n"},FF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".image("+n+", x="+s+", y="+o+", size="+_+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".image("+n+", x= "+s+",y="+o+", size="+_+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},PF=function(t,e){var i="0x"+this.getFieldValue("COLOR").slice(1);return["0x"+((16252928&i)>>8|(64512&i)>>5|(255&i)>>3).toString(16),e.ORDER_ATOMIC]},vF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),u=this.getFieldValue("center");if("0x"==a.slice(0,2))var r=i+".shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+u+", color="+a+")\n";else{const t=a.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r=i+".shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+u+", color=0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+")\n"}return r},YF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==_.slice(0,2))var p=i+".frame("+n+", size="+s+", delay="+o+", color="+_+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p=i+".frame("+n+", size="+s+", delay="+o+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},XF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u=i+".scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u=i+".scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},bF=function(t,e){return e.definitions_.import_st7789="import st7789",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".fill(st7789."+this.getFieldValue("key")+")\n"},yF=function(t,e){e.definitions_.import_st7789="import st7789";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"x1",e.ORDER_ATOMIC),s=e.valueToCode(this,"y1",e.ORDER_ATOMIC),o=e.valueToCode(this,"x2",e.ORDER_ATOMIC),_=e.valueToCode(this,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=i+".line("+n+", "+s+", "+o+", "+_+", color="+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=i+".line("+n+", "+s+", "+o+", "+_+", color=0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},xF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=this.getFieldValue("key"),o=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return e.definitions_.import_i2clcd="import i2clcd",i+" = i2clcd.LCD("+n+", lcd_width="+s+", i2c_addr="+o+")\n"},VF=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+",center = "+this.getFieldValue("center")+")\n"},BF=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".print("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", column="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", line="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},GF=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".backlight("+this.getFieldValue("key")+")\n"},UF=function(t,e){return e.definitions_.import_i2clcd="import i2clcd",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".clear()\n"},wF=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"I2CSUB",e.ORDER_ATOMIC),s=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC),o=this.getFieldValue("driver"),_=rt.Boards.getSelectedBoardKey().split(":")[2],p="";return p=["mpython","mixgo_pe","mixgo_nova"].indexOf(_)>=0?"0x700000":["mixgo_sant"].indexOf(_)>=0?"0xE00000":"0x3A0000",e.definitions_.import_oled128x64="import oled128x64",i+" = oled128x64.OLED("+n+", address="+s+", font_address="+p+", types="+o+")\n"},kF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},HF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".image("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+")\n"},WF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},KF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".shows("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", x="+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+", center="+this.getFieldValue("center")+")\n"},JF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},qF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".frame("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", delay="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+")\n"},QF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"},zF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", y="+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+", size="+e.valueToCode(this,"size",e.ORDER_ASSIGNMENT)+", speed="+e.valueToCode(this,"time",e.ORDER_ASSIGNMENT)+", space="+e.valueToCode(this,"space",e.ORDER_ASSIGNMENT)+")\n"},jF=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".fill(0)\n"+i+".show()\n"},$F=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+"."+t.getFieldValue("OP")+"("+e.valueToCode(t,"val",e.ORDER_ATOMIC)+")\n"},ZF=function(t,e){return e.definitions_.import_oled128x64="import oled128x64",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},tP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".pixel(int("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+"), int("+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+"), "+e.valueToCode(this,"STAT",e.ORDER_ATOMIC)+")\n"+i+".show()\n"},eP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"w",e.ORDER_ATOMIC),_=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=t.getFieldValue("state");return i+"."+t.getFieldValue("shape")+"("+n+", "+s+", "+o+", "+_+", "+p+")\n"+i+".show()\n"},iP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"length",e.ORDER_ATOMIC),_=t.getFieldValue("state");return i+"."+("0"==t.getFieldValue("dir_h_v")?"v":"h")+"line("+n+", "+s+", "+o+", "+_+")\n"+i+".show()\n"},nP=function(t,e){e.definitions_.import_oled128x64="import oled128x64";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return i+".line("+e.valueToCode(t,"x1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y1",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"x2",e.ORDER_ATOMIC)+", "+e.valueToCode(t,"y2",e.ORDER_ATOMIC)+", "+t.getFieldValue("state")+")\n"+i+".show()\n"},sP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("Python ESP32-S3"===rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var s="onboard_tft.image("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff,sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n"}else if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled";s="oled.print("+n+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.shows("+n+")\n"}return s},oP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),o=this.getFieldValue("center");if("mixgo_sant"==i||"mixgo_nova"==i)return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.shows("+n+", space="+s+", center="+o+",sync="+(e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True")+")\n";if("educore"==i){e.definitions_["import_"+i+"_oled"]="from "+i+" import oled"}return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix","onboard_matrix.shows("+n+", space="+s+", center="+o+")\n"},_P=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var s="onboard_oled.frame("+n+")\n"}else if("Python ESP32-S3"===rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";s="onboard_tft.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";s="onboard_matrix.frame("+n+")\n"}return s},pP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var o="onboard_oled.frame("+(n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT))+", delay="+s+")\n"}else if("Python ESP32-S3"===rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";o="onboard_tft.frame("+n+", size=5 , delay="+s+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";o="onboard_matrix.frame("+n+", delay="+s+")\n"}return o},aP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var n="onboard_oled.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}else if("Python ESP32-S3"===rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";n="onboard_tft.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.scroll("+e.valueToCode(this,"data",e.ORDER_ASSIGNMENT)+")\n"}return n},uP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2],n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT);if("mpython"==i||"educore"==i){e.definitions_["import_"+i+"_onboard_oled"]="from "+i+" import onboard_oled";var _="onboard_oled.scroll("+n+", speed="+s+", space="+o+")\n"}else if("Python ESP32-S3"===rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";_="onboard_tft.scroll("+n+", y=0, size=5, speed="+s+", space="+o+", color=0xffff)\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";_="onboard_matrix.scroll("+n+", speed="+s+", space="+o+")\n"}return _},rP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==a.slice(0,2))var u="onboard_tft.scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color="+a+")\n";else{const t=a.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.scroll("+n+", y="+s+", size="+o+", speed="+_+", space="+p+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+")\n"}return u},dP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix",["onboard_matrix."+t.getFieldValue("image"),e.ORDER_ATOMIC]},lP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===rt.JSFuncs.getPlatform()){const i=t.getFieldValue("image").split(".");if(2!==i.length)throw Error("pin value error");e.definitions_[`import_${i[0]}_${i[1]}`]=`from ${i[0]} import ${i[1]}`;var n=i[1]}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix."+t.getFieldValue("image")}return[n,e.ORDER_ATOMIC]},IP=function(t,e){var i={"#000000":"0","#ff0000":"1"};function n(t){let e="";if(t.length%2==1&&(t="0"+t),t.length<8){let e=8-t.length;for(let i=1;i<=e;i++)t="0"+t}for(let i=1;i<=t.length;i++)i%2==0&&i!==t.length?e=e+t[i-1]+",0x":e+=t[i-1];return"0x"+e}let s=[];for(let e=0;e<12;e++){let o="",_=0,p=0;for(let n=0;n<32;n++)n<8?p=7-n:n<16?p=23-n:n<24?p=39-n:n<32&&(p=55-n),_+=Number(i[t.getFieldValue(e+"-"+n)])*Math.pow(2,31-p);o+=n(_.toString(16)),s.unshift(o)}let o=[];for(let t=0;t>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},jP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft","onboard_tft.picture("+e.valueToCode(this,"x",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"y",e.ORDER_ASSIGNMENT)+","+e.valueToCode(this,"direct",e.ORDER_ASSIGNMENT)+")\n"},$P=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"space",e.ORDER_ASSIGNMENT),a=this.getFieldValue("center"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True",r=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==r.slice(0,2))var d="onboard_tft.shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+a+", color="+r+",sync="+u+")\n";else{const t=r.match(/\d+/g);var l="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");d="onboard_tft.shows("+n+", x="+s+", y="+o+", size="+_+", space="+p+", center="+a+", color=0x"+((16252928&l)>>8|(64512&l)>>5|(255&l)>>3).toString(16)+",sync="+u+")\n"}return d},ZP=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"time",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==_.slice(0,2))var p="onboard_tft.frame("+n+", size="+s+", delay="+o+", color="+_+")\n";else{const t=_.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.frame("+n+", size="+s+", delay="+o+", color=0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+")\n"}return p},tv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"w",e.ORDER_ATOMIC),_=e.valueToCode(t,"h",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=t.getFieldValue("shape"),u=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var r="onboard_tft."+a+"("+n+", "+s+", "+o+", "+_+", "+p+",sync="+u+")\n";else{const t=p.match(/\d+/g);var d="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");r="onboard_tft."+a+"("+n+", "+s+", "+o+", "+_+", 0x"+((16252928&d)>>8|(64512&d)>>5|(255&d)>>3).toString(16)+",sync="+u+")\n"}return r},ev=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"length",e.ORDER_ATOMIC),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("dir_h_v"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+o+", "+_+",sync="+a+")\n";else{const t=_.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft."+("0"==p?"v":"h")+"line("+n+", "+s+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},iv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x1",e.ORDER_ATOMIC),s=e.valueToCode(t,"y1",e.ORDER_ATOMIC),o=e.valueToCode(t,"x2",e.ORDER_ATOMIC),_=e.valueToCode(t,"y2",e.ORDER_ATOMIC),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.line("+n+", "+s+", "+o+", "+_+", "+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.line("+n+", "+s+", "+o+", "+_+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},nv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft",["onboard_tft.pixel(int("+e.valueToCode(t,"x",e.ORDER_ATOMIC)+"), int("+e.valueToCode(t,"y",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]},sv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),_=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==o.slice(0,2))var p="onboard_tft.pixel(int("+n+"), int("+s+"), "+o+",sync="+_+")\n";else{const t=o.match(/\d+/g);var a="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");p="onboard_tft.pixel(int("+n+"), int("+s+"), 0x"+((16252928&a)>>8|(64512&a)>>5|(255&a)>>3).toString(16)+",sync="+_+")\n"}return p},ov=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"VAR",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==n.slice(0,2))var o="onboard_tft.fill("+n+",sync="+s+")\n";else{const t=n.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o="onboard_tft.fill(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+",sync="+s+")\n"}return o},_v=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==p.slice(0,2))var a=_+"=Clock("+n+", "+s+", "+o+", "+p+")\n";else{const t=p.match(/\d+/g);var u="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");a=_+"=Clock("+n+", "+s+", "+o+", 0x"+((16252928&u)>>8|(64512&u)>>5|(255&u)>>3).toString(16)+")\n"}return a},pv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_rtctime()\n"},av=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".set_time("+e.valueToCode(this,"h",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"m",e.ORDER_ASSIGNMENT)+", "+e.valueToCode(this,"s",e.ORDER_ASSIGNMENT)+")\n"},uv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];return e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock",e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT)+".draw_clock()\n"},rv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_Clock"]="from "+i+" import Clock";var n=e.valueToCode(this,"SUB",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2))var o=n+".clear("+s+")\n";else{const t=s.match(/\d+/g);var _="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");o=n+".clear(0x"+((16252928&_)>>8|(64512&_)>>5|(255&_)>>3).toString(16)+")\n"}return o},dv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(t,"x",e.ORDER_ATOMIC),s=e.valueToCode(t,"y",e.ORDER_ATOMIC),o=e.valueToCode(t,"r",e.ORDER_ATOMIC),_=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),p=t.getFieldValue("shape"),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==_.slice(0,2))var u="onboard_tft.ellipse("+n+", "+s+", "+o+", "+o+", "+_+", "+p+",sync="+a+")\n";else{const t=_.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.ellipse("+n+", "+s+", "+o+", "+o+", 0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+", "+p+",sync="+a+")\n"}return u},lv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];if("Python ESP32-S3"===rt.JSFuncs.getPlatform()){e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n="onboard_tft.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}else{e.definitions_["import_"+i+"_onboard_matrix"]="from "+i+" import onboard_matrix";n="onboard_matrix.pointern(angle="+e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT)+")\n"}return n},Iv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"angle",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"VAR",e.ORDER_ATOMIC);if("0x"==s.slice(0,2));else{const t=s.match(/\d+/g);var o="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");((16252928&o)>>8|(64512&o)>>5|(255&o)>>3).toString(16)}return"onboard_tft.pointern(angle="+n+")\n"},Tv=function(t,e){var i=rt.Boards.getSelectedBoardKey().split(":")[2];e.definitions_["import_"+i+"_onboard_tft"]="from "+i+" import onboard_tft";var n=e.valueToCode(this,"data",e.ORDER_ASSIGNMENT),s=e.valueToCode(this,"x",e.ORDER_ASSIGNMENT),o=e.valueToCode(this,"y",e.ORDER_ASSIGNMENT),_=e.valueToCode(this,"size",e.ORDER_ASSIGNMENT),p=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),a=e.valueToCode(this,"boolean",e.ORDER_ATOMIC)||"True";if("0x"==p.slice(0,2))var u="onboard_tft.texts("+n+", x="+s+", y="+o+", size="+_+", color="+p+",sync="+a+")\n";else{const t=p.match(/\d+/g);var r="0x"+((parseInt(t[0])<<16)+(parseInt(t[1])<<8)+parseInt(t[2])).toString(16).padStart(4,"0");u="onboard_tft.texts("+n+", x="+s+", y="+o+", size="+_+", color=0x"+((16252928&r)>>8|(64512&r)>>5|(255&r)>>3).toString(16)+",sync="+a+")\n"}return u},Mv=sP,hv=gP,mv=OP,Ev=gP,Ov=CP,Rv=MP,cv=function(t,e){var i=this.getFieldValue("path"),n=this.getFieldValue("module");return e.definitions_["import_"+i+"_"+n]="from "+i+" import "+n,""},gv=function(t,e){var i=this.getFieldValue("module");return e.definitions_["import_"+i]="import "+i,""},Cv=function(t,e){for(var i=this.getFieldValue("NAME"),n=new Array(this.itemCount_),s=0;s {\n"+e.statementToCode(this,"do")+"})\n"},gV=function(){return"control.reset()\n"},CV=function(t,e){return"control.waitMicros("+(e.valueToCode(this,"data",e.ORDER_ATOMIC)||rt.Profile.default.serial)+")\n"},SV=function(t,e){return"control.raiseEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||rt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||rt.Profile.default.serial)+")\n"},AV=function(t,e){return"control.onEvent("+(e.valueToCode(this,"system_event_bus_source",e.ORDER_ATOMIC)||rt.Profile.default.serial)+", "+(e.valueToCode(this,"system_event_bus_value",e.ORDER_ATOMIC)||rt.Profile.default.serial)+", () => {\n"+e.statementToCode(this,"do")+")\n"},LV=function(t,e){return["control.eventTimestamp()",e.ORDER_ATOMIC]},NV=function(t,e){return["control.eventValue()",e.ORDER_ATOMIC]},DV=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},fV=function(t,e){return[this.getFieldValue("key"),e.ORDER_ATOMIC]},FV=function(t,e){return["control.deviceName()",e.ORDER_ATOMIC]},PV=function(t,e){return["control.deviceSerialNumber()",e.ORDER_ATOMIC]},vV=function(t,e){return"panic("+(e.valueToCode(this,"STATUS_CODE",e.ORDER_ATOMIC)||"1000")+")\n"},YV=function(t,e){switch(e.definitions_.import_time="import time",this.getFieldValue("Time")){case"ms":return["time.ticks_ms()",e.ORDER_ATOMIC];case"us":return["time.ticks_us()",e.ORDER_ATOMIC]}},XV=function(){return"while True:\n pass\n"},bV=function(t,e){return e.definitions_.import_mixgo="import mixgo","reset()\n"},yV=function(t,e){return e.definitions_.import_os="import os","os.uname()"},xV=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},VV=function(t,e){e.definitions_.import_time="import time";var i=e.valueToCode(this,"DELAY_TIME",e.ORDER_ATOMIC)||"1000";switch(this.getFieldValue("Time")){case"s":return"time.sleep("+i+")\n";case"ms":return"time.sleep_ms("+i+")\n";case"us":return"time.sleep_us("+i+")\n"}},BV=function(t,e){return e.definitions_.import_mixgo="import mixgo",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period="+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=Timer."+(e.valueToCode(this,"mode",e.ORDER_NONE)||"None")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},GV=function(t,e){return e.definitions_.import_machine="import machine",(e.valueToCode(this,"VAR",e.ORDER_NONE)||"None")+".init(period = "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+", mode=machine.Timer."+this.getFieldValue("mode")+", callback="+(e.valueToCode(this,"callback",e.ORDER_NONE)||"None")+")\n"},UV=function(t,e){return e.definitions_.import_time="import time",["time.ticks_diff("+(e.valueToCode(this,"END",e.ORDER_NONE)||"0")+", "+(e.valueToCode(this,"START",e.ORDER_NONE)||"0")+")",e.ORDER_ATOMIC]},wV=function(t,e){var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC);return e.definitions_.import_machine="import machine",i+" = machine.Timer(0)\n"},kV=function(t,e){return e.definitions_.import_machine="import machine","wdt = machine.WDT(timeout= "+(e.valueToCode(this,"period",e.ORDER_NONE)||"0")+")\n"},HV=function(t,e){e.definitions_.import_machine="import machine";return"wdt.feed()\n"},WV=function(t,e){e.definitions_.import_machine="import machine";return"machine.reset()\n"},KV=function(t,e){e.definitions_.import_bitbot_onboard_bot51="from bitbot import onboard_bot51";return"onboard_bot51.shutdown()\n"},JV=wV,qV=GV,QV=UV,zV=xV,jV=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},$V=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api."+this.getFieldValue("mode")+"("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ZV=function(t,e){return e.definitions_.import_seniverse_api="import seniverse_api",["seniverse_api.weather_hourly("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"hour",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},tB=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+")\n"},eB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_now.analysis()";else n='Weather_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},iB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Air_now.analysis()";else n='Air_now.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},nB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Weather_alarm.analysis()";else n='Weather_alarm.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},sB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Life_suggestion.analysis()";else n='Life_suggestion.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},oB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Tide_daily.analysis()";else n='Tide_daily.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},_B=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content");if("none"==i)var n="Location_search.analysis()";else n='Location_search.analysis("'+i+'")';return[n,e.ORDER_ATOMIC]},pB=function(t,e){return e.definitions_["import_seniverse_api*"]="from seniverse_api import *",this.getFieldValue("mode")+".request("+e.valueToCode(this,"key",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"addr",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"day",e.ORDER_ATOMIC)+")\n"},aB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Weather_daily.analysis("+n+")";else s="Weather_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},uB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Air_daily.analysis("+n+")";else s="Air_daily.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},rB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_sun.analysis("+n+")";else s="Geo_sun.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},dB=function(t,e){e.definitions_["import_seniverse_api*"]="from seniverse_api import *";var i=this.getFieldValue("content"),n=e.valueToCode(this,"day",e.ORDER_ATOMIC);if("none"==i)var s="Geo_moon.analysis("+n+")";else s="Geo_moon.analysis("+n+', "'+i+'")';return[s,e.ORDER_ATOMIC]},lB=new ut.Generator("Python");lB.INDENT=" ",lB.addReservedWords("False,None,True,and,as,assert,break,class,continue,def,del,elif,else,except,exec,finally,for,from,global,if,import,in,is,lambda,nonlocal,not,or,pass,print,raise,return,try,while,with,yield,NotImplemented,Ellipsis,__debug__,quit,exit,copyright,license,credits,ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EnvironmentError,Exception,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StandardError,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,ZeroDivisionError,_,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,all,any,apply,ascii,basestring,bin,bool,buffer,bytearray,bytes,callable,chr,classmethod,cmp,coerce,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,execfile,exit,file,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,intern,isinstance,issubclass,iter,len,license,list,locals,long,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,raw_input,reduce,reload,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,unichr,unicode,vars,xrange,zip"),lB.ORDER_ATOMIC=0,lB.ORDER_COLLECTION=1,lB.ORDER_STRING_CONVERSION=1,lB.ORDER_UNARY_POSTFIX=1,lB.ORDER_UNARY_PREFIX=2,lB.ORDER_MEMBER=2.1,lB.ORDER_FUNCTION_CALL=2.2,lB.ORDER_EXPONENTIATION=3,lB.ORDER_UNARY_SIGN=4,lB.ORDER_BITWISE_NOT=4,lB.ORDER_MULTIPLICATIVE=5,lB.ORDER_ADDITIVE=6,lB.ORDER_BITWISE_SHIFT=7,lB.ORDER_BITWISE_AND=8,lB.ORDER_BITWISE_XOR=9,lB.ORDER_BITWISE_OR=10,lB.ORDER_RELATIONAL=11,lB.ORDER_EQUALITY=11,lB.ORDER_LOGICAL_NOT=12,lB.ORDER_LOGICAL_AND=13,lB.ORDER_LOGICAL_OR=14,lB.ORDER_ASSIGNMENT=14,lB.ORDER_CONDITIONAL=15,lB.ORDER_LAMBDA=16,lB.ORDER_NONE=99,lB.ORDER_OVERRIDES=[[lB.ORDER_FUNCTION_CALL,lB.ORDER_MEMBER],[lB.ORDER_FUNCTION_CALL,lB.ORDER_FUNCTION_CALL],[lB.ORDER_MEMBER,lB.ORDER_MEMBER],[lB.ORDER_MEMBER,lB.ORDER_FUNCTION_CALL]],lB.init=function(){lB.PASS=this.INDENT+"pass\n",lB.definitions_=Object.create(null),lB.functionNames_=Object.create(null),lB.setups_=Object.create(null),lB.loops_=Object.create(null),lB.codeEnd_=Object.create(null),lB.variableDB_?lB.variableDB_.reset():lB.variableDB_=new Tt(lB.RESERVED_WORDS_)},lB.finish=function(t){""!==t&&(t=(t=t.replace(/\n/g,"\n")).replace(/\n\s+$/,"\n"));var e=[],i=[],n=[];for(var s in this.definitions_){var o=this.definitions_[s];0===s.indexOf("import")?e.push(o):0===s.indexOf("var_declare")?i.push(o):n.push(o)}e.length&&e.push("\n"),i.length&&i.push("\n"),n.length&&n.push("\n");var _=[];for(var s in lB.functions_)_.push(lB.functions_[s]);_.length&&_.push("\n");var p=[];for(var s in lB.setups_)p.push(lB.setups_[s]);p.length&&p.push("\n");var a=[];for(var s in lB.loops_)a.push(lB.loops_[s]);var u=[];for(var s in lB.codeEnd_)u.push(lB.codeEnd_[s]);0!==u.length&&u.push("\n");let r="";return r=a.length>0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+"while True:\n"+a.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+u.join("\n"),r},lB.scrubNakedValue=function(t){return t+"\n"},lB.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},lB.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},lB.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=ut.utils.string.wrap(o,lB.COMMENT_WRAP-3),n+=lB.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const IB={};IB["飞乙"]={description:"MicroPython[ESP32C3 Bitbot]",digital_pin:rt.Profile.generate(["0-11","18-21"]),input_pin:rt.Profile.generate(["0-11","18-21"]),output_pin:rt.Profile.generate(["0-11","18-21"]),pwm_input:rt.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_input:rt.Profile.generate(["0-5"],"adc","adc"),pwm_output:rt.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_output:rt.Profile.generate(["0-5"],"adc","adc"),espnow_channel:rt.Profile.generate(["1-13"]),haskylens_model:rt.Profile.generate(["0-4"]),digital:rt.Profile.generate(["0-11","18-21"],"pin","pin"),pwm_pin:rt.Profile.generate(["0-11","18-21"]),pwm:rt.Profile.generate(["0-11","18-21"],"pwm","pwm"),analog_pin:rt.Profile.generate(["0-5"]),analog:rt.Profile.generate(["0-5"],"adc","adc"),button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],tts_voice:rt.Profile.generate(["0-16"]),tts_builtin_music:rt.Profile.generate(["0-47"]),tts_bgmusic:rt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["MUSIC_QUAVERS","onboard_matrix.MUSIC_QUAVERS"],["MUSIC_QUAVER","onboard_matrix.MUSIC_QUAVER"],["MUSIC_CROTCHET","onboard_matrix.MUSIC_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]],extern_addr:rt.Profile.generate(["0-1"]),als_num:rt.Profile.generate(["0-3"])},IB["超霸大师"]={description:"MicroPython[ESP32 Mixbot]",digital_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["39","39"]],digital:[["pin0","pin0"],["pin2","pin2"],["pin4","pin4"],["pin5","pin5"],["pin12","pin12"],["pin13","pin13"],["pin14","pin14"],["pin15","pin15"],["pin16","pin16"],["pin17","pin17"],["pin18","pin18"],["pin19","pin19"],["pin21","pin21"],["pin22","pin22"],["pin23","pin23"],["pin25","pin25"],["pin26","pin26"],["pin27","pin27"],["pin32","pin32"],["pin33","pin33"],["pin34","pin34"],["pin35","pin35"],["pin36","pin36"],["pin39","pin39"]],input_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["39","39"]],output_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"]],pwm:[["pwm0","pwm0"],["pwm2","pwm2"],["pwm4","pwm4"],["pwm5","pwm5"],["pwm12","pwm12"],["pwm13","pwm13"],["pwm14","pwm14"],["pwm15","pwm15"],["pwm16","pwm16"],["pwm17","pwm17"],["pwm18","pwm18"],["pwm19","pwm19"],["pwm20","pwm20"],["pwm21","pwm21"],["pwm22","pwm22"],["pwm23","pwm23"],["pwm25","pwm25"],["pwm26","pwm26"],["pwm27","pwm27"],["pwm32","pwm32"]],analog_pin:[["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],analog:[["adc32","adc32"],["adc33","adc33"],["adc34","adc34"],["adc35","adc35"],["adc36","adc36"],["adc37","adc37"],["adc38","adc38"],["adc39","adc39"]],espnow_channel:rt.Profile.generate(["1-13"]),haskylens_model:rt.Profile.generate(["0-4"]),dac_pin:[["25","25"],["26","26"]],dac:[["dac25","dac25"],["dac26","dac26"]],touch:[["tc0","tc0"],["tc2","tc2"],["tc4","tc4"],["tc12","tc12"],["tc13","tc13"],["tc14","tc14"],["tc15","tc15"],["tc27","tc27"],["tc32","tc32"],["tc33","tc33"]],touch_pin:[["0","0"],["2","2"],["4","4"],["12","12"],["13","13"],["14","14"],["15","15"],["27","27"],["32","32"],["33","33"]],button:[["P","button_p"],["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],tts_voice:rt.Profile.generate(["0-16"]),tts_builtin_music:rt.Profile.generate(["0-47"]),tts_bgmusic:rt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["MUSIC_QUAVERS","onboard_matrix.MUSIC_QUAVERS"],["MUSIC_QUAVER","onboard_matrix.MUSIC_QUAVER"],["MUSIC_CROTCHET","onboard_matrix.MUSIC_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]],extern_addr:rt.Profile.generate(["0-3"])},IB["ESP32 Generic"]={description:"MicroPython[ESP32 Generic]",digital_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],digital:[["pin0","pin0"],["pin2","pin2"],["pin4","pin4"],["pin5","pin5"],["pin6","pin6"],["pin7","pin7"],["pin8","pin8"],["pin9","pin9"],["pin10","pin10"],["pin11","pin11"],["pin12","pin12"],["pin13","pin13"],["pin14","pin14"],["pin15","pin15"],["pin16","pin16"],["pin17","pin17"],["pin18","pin18"],["pin19","pin19"],["pin20","pin20"],["pin21","pin21"],["pin22","pin22"],["pin23","pin23"],["pin25","pin25"],["pin26","pin26"],["pin27","pin27"],["pin32","pin32"],["pin33","pin33"],["pin34","pin34"],["pin35","pin35"],["pin36","pin36"],["pin37","pin37"],["pin38","pin38"],["pin39","pin39"]],input_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],output_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["7","7"],["8","8"],["12","12"],["13","13"],["14","14"],["15","15"],["19","19"],["20","20"],["21","21"],["22","22"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"]],pwm:[["pwm0","pwm0"],["pwm2","pwm2"],["pwm4","pwm4"],["pwm5","pwm5"],["pwm12","pwm12"],["pwm13","pwm13"],["pwm14","pwm14"],["pwm15","pwm15"],["pwm16","pwm16"],["pwm17","pwm17"],["pwm18","pwm18"],["pwm19","pwm19"],["pwm20","pwm20"],["pwm21","pwm21"],["pwm22","pwm22"],["pwm23","pwm23"],["pwm25","pwm25"],["pwm26","pwm26"],["pwm27","pwm27"],["pwm32","pwm32"]],analog_pin:[["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],analog:[["adc32","adc32"],["adc33","adc33"],["adc34","adc34"],["adc35","adc35"],["adc36","adc36"],["adc37","adc37"],["adc38","adc38"],["adc39","adc39"]],espnow_channel:rt.Profile.generate(["1-13"]),haskylens_model:rt.Profile.generate(["0-4"]),dac_pin:[["25","25"],["26","26"]],dac:[["dac25","dac25"],["dac26","dac26"]],touch:[["tc0","tc0"],["tc2","tc2"],["tc4","tc4"],["tc12","tc12"],["tc13","tc13"],["tc14","tc14"],["tc15","tc15"],["tc27","tc27"],["tc32","tc32"],["tc33","tc33"]],touch_pin:[["0","0"],["2","2"],["4","4"],["12","12"],["13","13"],["14","14"],["15","15"],["27","27"],["32","32"],["33","33"]],button:[["A","button_a"],["B","button_b"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],tts_voice:rt.Profile.generate(["0-16"]),tts_builtin_music:rt.Profile.generate(["0-47"]),tts_bgmusic:rt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["onboard_music_QUAVERS","onboard_matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","onboard_matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","onboard_matrix.onboard_music_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]]},IB["机器人大师"]={description:"MicroPython[ESP32 Generic]",digital_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],digital:[["pin0","pin0"],["pin2","pin2"],["pin4","pin4"],["pin5","pin5"],["pin12","pin12"],["pin13","pin13"],["pin14","pin14"],["pin15","pin15"],["pin16","pin16"],["pin17","pin17"],["pin18","pin18"],["pin19","pin19"],["pin20","pin20"],["pin21","pin21"],["pin22","pin22"],["pin23","pin23"],["pin25","pin25"],["pin26","pin26"],["pin27","pin27"],["pin32","pin32"],["pin33","pin33"],["pin34","pin34"],["pin35","pin35"],["pin36","pin36"],["pin37","pin37"],["pin38","pin38"],["pin39","pin39"]],input_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],output_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["18","18"],["19","19"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"],["33","33"]],pwm_pin:[["0","0"],["2","2"],["4","4"],["5","5"],["12","12"],["13","13"],["14","14"],["15","15"],["16","16"],["17","17"],["18","18"],["19","19"],["20","20"],["21","21"],["22","22"],["23","23"],["25","25"],["26","26"],["27","27"],["32","32"]],pwm:[["pwm0","pwm0"],["pwm2","pwm2"],["pwm4","pwm4"],["pwm5","pwm5"],["pwm12","pwm12"],["pwm13","pwm13"],["pwm14","pwm14"],["pwm15","pwm15"],["pwm16","pwm16"],["pwm17","pwm17"],["pwm18","pwm18"],["pwm19","pwm19"],["pwm20","pwm20"],["pwm21","pwm21"],["pwm22","pwm22"],["pwm23","pwm23"],["pwm25","pwm25"],["pwm26","pwm26"],["pwm27","pwm27"],["pwm32","pwm32"]],espnow_channel:rt.Profile.generate(["1-13"]),haskylens_model:rt.Profile.generate(["0-4"]),analog_pin:[["32","32"],["33","33"],["34","34"],["35","35"],["36","36"],["37","37"],["38","38"],["39","39"]],analog:[["adc32","adc32"],["adc33","adc33"],["adc34","adc34"],["adc35","adc35"],["adc36","adc36"],["adc37","adc37"],["adc38","adc38"],["adc39","adc39"]],dac_pin:[["25","25"],["26","26"]],dac:[["dac25","dac25"],["dac26","dac26"]],touch:[["tc0","tc0"],["tc2","tc2"],["tc4","tc4"],["tc12","tc12"],["tc13","tc13"],["tc14","tc14"],["tc15","tc15"],["tc27","tc27"],["tc32","tc32"],["tc33","tc33"]],touch_pin:[["0","0"],["2","2"],["4","4"],["12","12"],["13","13"],["14","14"],["15","15"],["27","27"],["32","32"],["33","33"]],button:[["p","button_p"],["cw","button_cw"],["ccw","button_ccw"]],axis:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"]],exlcdh:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"],["10","10"],["11","11"],["12","12"],["13","13"],["14","14"],["15","15"]],exlcdv:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],brightness:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"],["8","8"],["9","9"]],tts_voice:rt.Profile.generate(["0-16"]),tts_builtin_music:rt.Profile.generate(["0-47"]),tts_bgmusic:rt.Profile.generate(["0-15"]),builtinimg:[["HEART","onboard_matrix.HEART"],["HEART_SMALL","onboard_matrix.HEART_SMALL"],["HAPPY","onboard_matrix.HAPPY"],["SAD","onboard_matrix.SAD"],["SMILE","onboard_matrix.SMILE"],["SILLY","onboard_matrix.SILLY"],["FABULOUS","onboard_matrix.FABULOUS"],["SURPRISED","onboard_matrix.SURPRISED"],["ASLEEP","onboard_matrix.ASLEEP"],["ANGRY","onboard_matrix.ANGRY"],["CONFUSED","onboard_matrix.CONFUSED"],["NO","onboard_matrix.NO"],["YES","onboard_matrix.YES"],["LEFT_ARROW","onboard_matrix.LEFT_ARROW"],["RIGHT_ARROW","onboard_matrix.RIGHT_ARROW"],["DRESS","onboard_matrix.DRESS"],["TRANSFORMERS","onboard_matrix.TRANSFORMERS"],["SCISSORS","onboard_matrix.SCISSORS"],["EXIT","onboard_matrix.EXIT"],["TREE","onboard_matrix.TREE"],["PACMAN","onboard_matrix.PACMAN"],["TARGET","onboard_matrix.TARGET"],["TSHIRT","onboard_matrix.TSHIRT"],["ROLLERSKATE","onboard_matrix.ROLLERSKATE"],["DUCK","onboard_matrix.DUCK"],["HOUSE","onboard_matrix.HOUSE"],["TORTOISE","onboard_matrix.TORTOISE"],["BUTTERFLY","onboard_matrix.BUTTERFLY"],["STICKFIGURE","onboard_matrix.STICKFIGURE"],["GHOST","onboard_matrix.GHOST"],["PITCHFORK","onboard_matrix.PITCHFORK"],["onboard_music_QUAVERS","onboard_matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","onboard_matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","onboard_matrix.onboard_music_CROTCHET"],["COW","onboard_matrix.COW"],["RABBIT","onboard_matrix.RABBIT"],["SQUARE_SMALL","onboard_matrix.SQUARE_SMALL"],["SQUARE","onboard_matrix.SQUARE"],["DIAMOND_SMALL","onboard_matrix.DIAMOND_SMALL"],["DIAMOND","onboard_matrix.DIAMOND"],["CHESSBOARD","onboard_matrix.CHESSBOARD"],["TRIANGLE_LEFT","onboard_matrix.TRIANGLE_LEFT"],["TRIANGLE","onboard_matrix.TRIANGLE"],["SNAKE","onboard_matrix.SNAKE"],["UMBRELLA","onboard_matrix.UMBRELLA"],["SKULL","onboard_matrix.SKULL"],["GIRAFFE","onboard_matrix.GIRAFFE"],["SWORD","onboard_matrix.SWORD"]],builtinimg_extern:[["HEART","matrix32x12.Matrix.HEART"],["HEART_SMALL","matrix32x12.Matrix.HEART_SMALL"],["HAPPY","matrix32x12.Matrix.HAPPY"],["SAD","matrix32x12.Matrix.SAD"],["SMILE","matrix32x12.Matrix.SMILE"],["SILLY","matrix32x12.Matrix.SILLY"],["FABULOUS","matrix32x12.Matrix.FABULOUS"],["SURPRISED","matrix32x12.Matrix.SURPRISED"],["ASLEEP","matrix32x12.Matrix.ASLEEP"],["ANGRY","matrix32x12.Matrix.ANGRY"],["CONFUSED","matrix32x12.Matrix.CONFUSED"],["NO","matrix32x12.Matrix.NO"],["YES","matrix32x12.Matrix.YES"],["LEFT_ARROW","matrix32x12.Matrix.LEFT_ARROW"],["RIGHT_ARROW","matrix32x12.Matrix.RIGHT_ARROW"],["DRESS","matrix32x12.Matrix.DRESS"],["TRANSFORMERS","matrix32x12.Matrix.TRANSFORMERS"],["SCISSORS","matrix32x12.Matrix.SCISSORS"],["EXIT","matrix32x12.Matrix.EXIT"],["TREE","matrix32x12.Matrix.TREE"],["PACMAN","matrix32x12.Matrix.PACMAN"],["TARGET","matrix32x12.Matrix.TARGET"],["TSHIRT","matrix32x12.Matrix.TSHIRT"],["ROLLERSKATE","matrix32x12.Matrix.ROLLERSKATE"],["DUCK","matrix32x12.Matrix.DUCK"],["HOUSE","matrix32x12.Matrix.HOUSE"],["TORTOISE","matrix32x12.Matrix.TORTOISE"],["BUTTERFLY","matrix32x12.Matrix.BUTTERFLY"],["STICKFIGURE","matrix32x12.Matrix.STICKFIGURE"],["GHOST","matrix32x12.Matrix.GHOST"],["PITCHFORK","matrix32x12.Matrix.PITCHFORK"],["onboard_music_QUAVERS","matrix32x12.Matrix.onboard_music_QUAVERS"],["onboard_music_QUAVER","matrix32x12.Matrix.onboard_music_QUAVER"],["onboard_music_CROTCHET","matrix32x12.Matrix.onboard_music_CROTCHET"],["COW","matrix32x12.Matrix.COW"],["RABBIT","matrix32x12.Matrix.RABBIT"],["SQUARE_SMALL","matrix32x12.Matrix.SQUARE_SMALL"],["SQUARE","matrix32x12.Matrix.SQUARE"],["DIAMOND_SMALL","matrix32x12.Matrix.DIAMOND_SMALL"],["DIAMOND","matrix32x12.Matrix.DIAMOND"],["CHESSBOARD","matrix32x12.Matrix.CHESSBOARD"],["TRIANGLE_LEFT","matrix32x12.Matrix.TRIANGLE_LEFT"],["TRIANGLE","matrix32x12.Matrix.TRIANGLE"],["SNAKE","matrix32x12.Matrix.SNAKE"],["UMBRELLA","matrix32x12.Matrix.UMBRELLA"],["SKULL","matrix32x12.Matrix.SKULL"],["GIRAFFE","matrix32x12.Matrix.GIRAFFE"],["SWORD","matrix32x12.Matrix.SWORD"]],imglist:[["ALL_CLOCKS","onboard_matrix.ALL_CLOCKS"],["ALL_ARROWS","onboard_matrix.ALL_ARROWS"]],playlist:[["DADADADUM","onboard_music.DADADADUM"],["ENTERTAINER","onboard_music.ENTERTAINER"],["PRELUDE","onboard_music.PRELUDE"],["ODE","onboard_music.ODE"],["NYAN","onboard_music.NYAN"],["RINGTONE","onboard_music.RINGTONE"],["FUNK","onboard_music.FUNK"],["BLUES","onboard_music.BLUES"],["BIRTHDAY","onboard_music.BIRTHDAY"],["WEDDING","onboard_music.WEDDING"],["FUNERAL","onboard_music.FUNERAL"],["PUNCHLINE","onboard_music.PUNCHLINE"],["PYTHON","onboard_music.PYTHON"],["BADDY","onboard_music.BADDY"],["CHASE","onboard_music.CHASE"],["BA_DING","onboard_music.BA_DING"],["WAWAWAWAA","onboard_music.WAWAWAWAA"],["JUMP_UP","onboard_music.JUMP_UP"],["JUMP_DOWN","onboard_music.JUMP_DOWN"],["POWER_UP","onboard_music.POWER_UP"],["POWER_DOWN","onboard_music.POWER_DOWN"]],playlist_extern:[["DADADADUM","DADADADUM"],["ENTERTAINER","ENTERTAINER"],["PRELUDE","PRELUDE"],["ODE","ODE"],["NYAN","NYAN"],["RINGTONE","RINGTONE"],["FUNK","FUNK"],["BLUES","BLUES"],["BIRTHDAY","BIRTHDAY"],["WEDDING","WEDDING"],["FUNERAL","FUNERAL"],["PUNCHLINE","PUNCHLINE"],["PYTHON","PYTHON"],["BADDY","BADDY"],["CHASE","CHASE"],["BA_DING","BA_DING"],["WAWAWAWAA","WAWAWAWAA"],["JUMP_UP","JUMP_UP"],["JUMP_DOWN","JUMP_DOWN"],["POWER_UP","POWER_UP"],["POWER_DOWN","POWER_DOWN"]],tone_notes:[["NOTE_C3","131"],["NOTE_D3","147"],["NOTE_E3","165"],["NOTE_F3","175"],["NOTE_G3","196"],["NOTE_A3","220"],["NOTE_B3","247"],["NOTE_C4","262"],["NOTE_D4","294"],["NOTE_E4","330"],["NOTE_F4","349"],["NOTE_G4","392"],["NOTE_A4","440"],["NOTE_B4","494"],["NOTE_C5","523"],["NOTE_D5","587"],["NOTE_E5","659"],["NOTE_F5","698"],["NOTE_G5","784"],["NOTE_A5","880"],["NOTE_B5","988"]],serial_pin:[["pin0","0"],["pin1","1"],["pin2","2"],["pin8","8"],["pin12","12"],["pin13","13"],["pin14","14"],["pin15","15"],["pin16","16"]],radio_power:[["0","0"],["1","1"],["2","2"],["3","3"],["4","4"],["5","5"],["6","6"],["7","7"]],radio_datarate:[["1Mbit","RATE_1MBIT"],["250Kbit","RATE_250KBIT"],["2Mbit","RATE_2MBIT"]],one_more:[["ONE_SHOT","ONE_SHOT"],["PERIODIC","PERIODIC"]],digital_dot:[["0","0"],["1","1"],["2","2"],["3","3"]]};const TB=IB,MB=230,hB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.digital),"PIN"),this.setOutput(!0)}},mB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.digital_pin),"PIN"),this.setOutput(!0,Number)}},EB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.input_pin),"PIN"),this.setOutput(!0,Number)}},OB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.output_pin),"PIN"),this.setOutput(!0,Number)}},RB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.touch_mpython),"PIN"),this.setOutput(!0,Number)}},cB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.espnow_channel),"PIN"),this.setOutput(!0,Number)}},gB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.haskylens_model),"PIN"),this.setOutput(!0,Number)}},CB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm_input),"PIN"),this.setOutput(!0)}},SB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog_input),"PIN"),this.setOutput(!0)}},AB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm_output),"PIN"),this.setOutput(!0)}},LB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog_output),"PIN"),this.setOutput(!0)}},NB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.i2c_A_pin),"PIN"),this.setOutput(!0,Number)}},DB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.i2c_B_pin),"PIN"),this.setOutput(!0,Number)}},fB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_A_pin),"PIN"),this.setOutput(!0,Number)}},FB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_B_pin),"PIN"),this.setOutput(!0,Number)}},PB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_C_pin),"PIN"),this.setOutput(!0,Number)}},vB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.spi_D_pin),"PIN"),this.setOutput(!0,Number)}},YB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog),"PIN"),this.setOutput(!0)}},XB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.analog_pin),"PIN"),this.setOutput(!0,Number)}},bB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.dac),"PIN"),this.setOutput(!0)}},yB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.dac_pin),"PIN"),this.setOutput(!0,Number)}},xB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.button),"PIN"),this.setOutput(!0,Number)}},VB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm),"PIN"),this.setOutput(!0)}},BB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.pwm_pin),"PIN"),this.setOutput(!0,Number)}},GB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.touch_pin),"PIN"),this.setOutput(!0,Number)}},UB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.touch),"PIN"),this.setOutput(!0)}},wB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.serial_pin),"PIN"),this.setOutput(!0,Number)}},kB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.builtinimg),"PIN"),this.setOutput(!0,"esp32_image")}},HB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.builtinimg_extern),"PIN"),this.setOutput(!0,"esp32_image")}},WB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.imglist),"PIN"),this.setOutput(!0)}},KB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.playlist),"PIN"),this.setOutput(!0)}},JB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.playlist_extern),"PIN"),this.setOutput(!0)}},qB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.exlcdh),"PIN"),this.setOutput(!0,Number)}},QB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.exlcdv),"PIN"),this.setOutput(!0,Number)}},zB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.axis),"PIN"),this.setOutput(!0,Number)}},jB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.brightness),"PIN"),this.setOutput(!0,Number)}},$B={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tts_voice),"PIN"),this.setOutput(!0,Number)}},ZB={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tts_builtin_music),"PIN"),this.setOutput(!0,Number)}},tG={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tts_bgmusic),"PIN"),this.setOutput(!0,Number)}},eG={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.tone_notes),"PIN"),this.setOutput(!0,Number)}},iG={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.radio_power),"PIN"),this.setOutput(!0,Number)}},nG={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.radio_datarate),"PIN"),this.setOutput(!0,Number)}},sG={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.one_more),"PIN"),this.setOutput(!0)}},oG={init:function(){this.setColour(MB),this.appendDummyInput("").appendField(new ut.FieldDropdown(rt.Profile.default.digital_dot),"PIN"),this.setOutput(!0,Number)}},_G=function(t,e){return[this.getFieldValue("PIN"),e.ORDER_ATOMIC]},pG=_G,aG=_G,uG=_G,rG=_G,dG=_G,lG=_G,IG=_G,TG=_G,MG=_G,hG=_G,mG=_G,EG=_G,OG=_G,RG=_G,cG=_G,gG=_G,CG=_G,SG=_G,AG=_G,LG=_G,NG=_G,DG=_G,fG=_G,FG=_G,PG=_G,vG=_G,YG=_G,XG=_G,bG=_G,yG=_G,xG=_G,VG=_G,BG=_G,GG=_G;Object.assign(ut.Variables,lt),Object.assign(ut.Procedures,Su),ut.Python=Au,ut.generator=Au,rt.Profile.default={},Object.assign(rt.Profile,TB),Object.assign(rt.Profile.default,TB["ESP32 Generic"]),Object.assign(ut.Blocks,e,i,n,s,o,_,p,a,u,r,d,l,I,y,w,U,v,x,k,f,G,B,V,F,D,N,X,Y,b,P,pt),Object.assign(ut.Python.forBlock,T,M,h,m,E,O,R,c,g,C,S,A,L,Z,ot,st,Q,tt,_t,K,nt,it,et,J,W,H,j,z,$,q,at)})(); \ No newline at end of file diff --git a/boards/default/python_mixpy/index.xml b/boards/default/python_mixpy/index.xml index 483b1551..13aa6cac 100644 --- a/boards/default/python_mixpy/index.xml +++ b/boards/default/python_mixpy/index.xml @@ -1 +1 @@ -promptHelloHelloHello,HelloMixly2100,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!101802990x151100a10.998124.821100101010001100501100110002110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')dirmylist1,2,3,4,5mylist0mylist02mylist00mylist0101mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmylist0mytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}mydictresults0locationnames11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xreadme.txtffilename.txtfffilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtfilename.txtpathff0reponsehttps://mixio.mixly.cnreponsehttps://mixio.mixly.cnreponsemixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodtopicmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012tina20tina90tina0tina2020tina50tinatinatinatinatinatina5tinatina225tina5#ff0000#FF0000tina#ff0000#FF0000tina#ff0000#FF0000tina#ff0000#FF0000#ff0000#FF0000tina#FF0000tina#FF0000tina#FF0000tina50tina50360tinascreenkeyfuncUpkeyfunctina100tina90screenclickfuncclickfunctinax20y20screentimerfunc3000timerfunctina100tina90screenscreenturtle.epstina10tinaMixly!tinaMixly!Arial8NUMInput a number:100100Input your nameWhat's your name?d:\\1.wav3d:\\1.jpgqclientEnter Your API_KEYEnter Your SECRET_KEYclient今天天气真好clientclientclientC:/mixly.jpgC:/mixpy.jpgclientclient我爱米思齐client米思齐米思皮client米思齐团队米思齐团队由一群具有共同理想的学生和老师组成,他们始终致力于为开展更好的创客教育而努力。client米思齐团队由一群具有共同理想的学生和老师组成,他们始终致力于为开展更好的创客教育而努力。20df1data.csvdfdfarrayNonearrayNonearrayarrayarraydfvalueFalsedfdf'a','b','c','d'x1.55.50.511array1array2myMatrixmyMatrixmyMatrixarraymatrix1matrix2array1array20,1,2,3xmyArraymyArraymyDimensionsmyArraymyArraymyFeatures0imagetemplatesmyArray0myArray0myArraymylistmylist0,1,2,3mydictmydict'a','b','c','d'mydict'ABCD''a','b','c','d'ser1ser10df1tagdf1tagdf11df1GTcolumndf1tag1df1tagmindf1columndf1tagser1ser11,2,3,45,6,7,81,2,3,45,6,7,820,20,20,20tag1,2,3,45,6,7,8tag1,2,3,45,6,7,80.5tag0.25,0.35,0.1,0.3'a','b','c','d'0.2,0,0,011,21,31,41,51,61,71,81,910,20,40,60,80,100211Titleaxis1,2,3,41,2,3,415581.pngimg1.jpgfacehaarcascade_frontalface_default.xmlfaceRectsimgface1.15faceRectsimgface1.15100100200200Mixlyimg2.jpgimg0img001001003imgMixly02004310020220221001001010.00.010021.0-10.0,10.0TRUEirisiris_Xiris_y0.3modelTRUEFALSEmodel1.0TRUEFALSE300modelmodel100pca2pcaXmodel5modelmodel8300modelXmodelX_trainy_trainmodelX_testy_testmodelX_testmodelmodelmodelD:/mixly/test.pkl \ No newline at end of file +promptHelloHelloHello,HelloMixly2100,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!101802990x151100a10.998124.821100101010001100501100110002110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')dirmylist1,2,3,4,5mylist0mylist02mylist00mylist0101mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmylist0mytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}mydictresults0locationnames11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xreadme.txtffilename.txtfffilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtfilename.txtpathff0reponsehttps://mixio.mixly.cnreponsehttps://mixio.mixly.cnreponsemixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodtopicmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012tina20tina90tina0tina2020tina50tinatinatinatinatinatina5tinatina225tina5#ff0000#FF0000tina#ff0000#FF0000tina#ff0000#FF0000tina#ff0000#FF0000#ff0000#FF0000tina#FF0000tina#FF0000tina#FF0000tina50tina50360tinascreenkeyfuncUpkeyfunctina100tina90screenclickfuncclickfunctinax20y20screentimerfunc3000timerfunctina100tina90screenscreenturtle.epstina10tinaMixly!tinaMixly!Arial8NUMInput a number:100100Input your nameWhat's your name?d:\\1.wav3d:\\1.jpgqclientEnter Your API_KEYEnter Your SECRET_KEYclient今天天气真好clientclientclientC:/mixly.jpgC:/mixpy.jpgclientclient我爱米思齐client米思齐米思皮client米思齐团队米思齐团队由一群具有共同理想的学生和老师组成,他们始终致力于为开展更好的创客教育而努力。client米思齐团队由一群具有共同理想的学生和老师组成,他们始终致力于为开展更好的创客教育而努力。20df1data.csvdfdfarrayNonearrayNonearrayarrayarraydfvalueFalsedfdf'a','b','c','d'x1.55.50.511array1array2myMatrixmyMatrixmyMatrixarraymatrix1matrix2array1array20,1,2,3xmyArraymyArraymyDimensionsmyArraymyArraymyFeatures0imagetemplatesmyArray0myArray0myArraymylistmylist0,1,2,3mydictmydict'a','b','c','d'mydict'ABCD''a','b','c','d'ser1ser10df1tagdf1tagdf11df1GTcolumndf1tag1df1tagmindf1columndf1tagser1ser11,2,3,45,6,7,81,2,3,45,6,7,820,20,20,20tag1,2,3,45,6,7,8tag1,2,3,45,6,7,80.5tag0.25,0.35,0.1,0.3'a','b','c','d'0.2,0,0,011,21,31,41,51,61,71,81,910,20,40,60,80,100211Titleaxis1,2,3,41,2,3,415581.pngimg1.jpgfacehaarcascade_frontalface_default.xmlfaceRectsimgface1.15faceRectsimgface1.15100100200200Mixlyimg2.jpgimg0img001001003imgMixly02004310020220221001001010.00.010021.0-10.0,10.0TRUEirisiris_Xiris_y0.3modelTRUEFALSEmodel1.0TRUEFALSE300modelmodel100pca2pcaXmodel5modelmodel8300modelXmodelX_trainy_trainmodelX_testy_testmodelX_testmodelmodelmodelD:/mixly/test.pkl \ No newline at end of file diff --git a/boards/default/python_mixpy/main.bundle.a1302b5b.js b/boards/default/python_mixpy/main.bundle.061dee34.js similarity index 55% rename from boards/default/python_mixpy/main.bundle.a1302b5b.js rename to boards/default/python_mixpy/main.bundle.061dee34.js index 8faaff40..a93bfac4 100644 --- a/boards/default/python_mixpy/main.bundle.a1302b5b.js +++ b/boards/default/python_mixpy/main.bundle.061dee34.js @@ -18,4 +18,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -class Names{constructor(e,t){if(this.variablePrefix_=t||"",this.reservedDict_=Object.create(null),e)for(var n=e.split(","),a=0;a0;_--)t.getInputTargetBlock("IF"+_)&&t.getInputTargetBlock("IF"+_).previousConnection?n[_]=t.getInputTargetBlock("IF"+_).previousConnection:n[_]=null,this.removeInput("IF"+_),t.getInputTargetBlock("DO"+_)&&t.getInputTargetBlock("DO"+_).previousConnection?a[_]=t.getInputTargetBlock("DO"+_).previousConnection:a[_]=null,this.removeInput("DO"+_);this.elseifCount_=parseInt(e.getAttribute("elseif"),10),this.elseCount_=parseInt(e.getAttribute("else"),10);for(_=1;_<=this.elseifCount_;_++)this.appendValueInput("IF"+_).setCheck([Boolean,Number]).appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+_).appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_MSG_ELSE);for(_=n.length-2;_>0;_--)n[_]&&n[_].reconnect(this,"IF"+_);for(_=a.length-2;_>0;_--)a[_]&&a[_].reconnect(this,"DO"+_)},decompose:function(e){var t=e.newBlock("controls_if_if");t.initSvg();for(var n=t.getInput("STACK").connection,a=1;a<=this.elseifCount_;a++){var _=e.newBlock("controls_if_elseif");_.initSvg(),n.connect(_.previousConnection),n=_.nextConnection}if(this.elseCount_){var l=e.newBlock("controls_if_else");l.initSvg(),n.connect(l.previousConnection)}return t},compose:function(e){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var t=this.elseifCount_;t>0;t--)this.removeInput("IF"+t),this.removeInput("DO"+t);this.elseifCount_=0;for(var n=e.getInputTargetBlock("STACK"),a=[null],_=[null],l=null;n;){switch(n.type){case"controls_if_elseif":this.elseifCount_++,a.push(n.valueConnection_),_.push(n.statementConnection_);break;case"controls_if_else":this.elseCount_++,l=n.statementConnection_;break;default:throw Error("Unknown block type: "+n.type)}n=n.nextConnection&&n.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(a,_,l)},saveConnections:function(e){for(var t=e.getInputTargetBlock("STACK"),n=1;t;){switch(t.type){case"controls_if_elseif":var a=this.getInput("IF"+n),_=this.getInput("DO"+n);t.valueConnection_=a&&a.connection.targetConnection,t.statementConnection_=_&&_.connection.targetConnection,n++;break;case"controls_if_else":_=this.getInput("ELSE");t.statementConnection_=_&&_.connection.targetConnection;break;default:throw"Unknown block type."}t=t.nextConnection&&t.nextConnection.targetBlock()}},rebuildShape_:function(){var e=[null],t=[null],n=null;this.getInput("ELSE")&&(n=this.getInput("ELSE").connection.targetConnection);for(var a=1;this.getInput("IF"+a);){var _=this.getInput("IF"+a),l=this.getInput("DO"+a);console.log(_.connection.targetConnection),e.push(_.connection.targetConnection),t.push(l.connection.targetConnection),a++}this.updateShape_(),this.reconnectChildBlocks_(e,t,n)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var e=1;this.getInput("IF"+e);)this.removeInput("IF"+e),this.removeInput("DO"+e),e++;for(e=1;e<=this.elseifCount_;e++)this.appendValueInput("IF"+e).setCheck([Number,Boolean]).appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+e).appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(e,t,n){for(var a=1;a<=this.elseifCount_;a++)e[a]&&e[a].reconnect(this,"IF"+a),t[a]&&t[a].reconnect(this,"DO"+a);n&&n.reconnect(this,"ELSE")}},controls_range={init:function(){this.setColour(LOOPS_HUE),this.appendValueInput("FROM").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.PYTHON_RANGE).appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},controls_forEach={init:function(){this.setColour(LOOPS_HUE),this.appendValueInput("LIST").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(external_Blockly_namespaceObject.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return external_Blockly_namespaceObject.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},controls_whileUntil={init:function(){this.setColour(LOOPS_HUE),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new external_Blockly_namespaceObject.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+external_Blockly_namespaceObject.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return{WHILE:external_Blockly_namespaceObject.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:external_Blockly_namespaceObject.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[t]}))}},controls_try_finally={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var e=document.createElement("mutation");return this.elseifCount_&&e.setAttribute("elseif",this.elseifCount_),this.elseCount_&&e.setAttribute("else",1),e},domToMutation:function(e){var t=this,n=[],a=[];this.elseCount_&&this.removeInput("ELSE");for(var _=this.elseifCount_;_>0;_--)t.getInputTargetBlock("IF"+_)&&t.getInputTargetBlock("IF"+_).previousConnection?n[_]=t.getInputTargetBlock("IF"+_).previousConnection:n[_]=null,this.removeInput("IF"+_),t.getInputTargetBlock("DO"+_)&&t.getInputTargetBlock("DO"+_).previousConnection?a[_]=t.getInputTargetBlock("DO"+_).previousConnection:a[_]=null,this.removeInput("DO"+_);this.elseifCount_=parseInt(e.getAttribute("elseif"),10),this.elseCount_=parseInt(e.getAttribute("else"),10);for(_=1;_<=this.elseifCount_;_++)this.appendValueInput("IF"+_).setCheck([Boolean,Number]).appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+_).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_FINALLY);for(_=n.length-2;_>0;_--)n[_]&&n[_].reconnect(this,"IF"+_);for(_=a.length-2;_>0;_--)a[_]&&a[_].reconnect(this,"DO"+_)},decompose:function(e){var t=e.newBlock("controls_try");t.initSvg();for(var n=t.getInput("STACK").connection,a=1;a<=this.elseifCount_;a++){var _=e.newBlock("controls_except");_.initSvg(),n.connect(_.previousConnection),n=_.nextConnection}if(this.elseCount_){var l=e.newBlock("controls_finally");l.initSvg(),n.connect(l.previousConnection)}return t},compose:function(e){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var t=this.elseifCount_;t>0;t--)this.removeInput("IF"+t),this.removeInput("DO"+t);this.elseifCount_=0;for(var n=e.getInputTargetBlock("STACK"),a=[null],_=[null],l=null;n;){switch(n.type){case"controls_except":this.elseifCount_++,a.push(n.valueConnection_),_.push(n.statementConnection_);break;case"controls_finally":this.elseCount_++,l=n.statementConnection_;break;default:throw Error("Unknown block type: "+n.type)}n=n.nextConnection&&n.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(a,_,l)},saveConnections:function(e){for(var t=e.getInputTargetBlock("STACK"),n=1;t;){switch(t.type){case"controls_except":var a=this.getInput("IF"+n),_=this.getInput("DO"+n);t.valueConnection_=a&&a.connection.targetConnection,t.statementConnection_=_&&_.connection.targetConnection,n++;break;case"controls_finally":_=this.getInput("ELSE");t.statementConnection_=_&&_.connection.targetConnection;break;default:throw"Unknown block type."}t=t.nextConnection&&t.nextConnection.targetBlock()}},rebuildShape_:function(){var e=[null],t=[null],n=null;this.getInput("ELSE")&&(n=this.getInput("ELSE").connection.targetConnection);for(var a=1;this.getInput("IF"+a);){var _=this.getInput("IF"+a),l=this.getInput("DO"+a);console.log(_.connection.targetConnection),e.push(_.connection.targetConnection),t.push(l.connection.targetConnection),a++}this.updateShape_(),this.reconnectChildBlocks_(e,t,n)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var e=1;this.getInput("IF"+e);)this.removeInput("IF"+e),this.removeInput("DO"+e),e++;for(e=1;e<=this.elseifCount_;e++)this.appendValueInput("IF"+e).setCheck([Number,Boolean]).appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+e).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(e,t,n){for(var a=1;a<=this.elseifCount_;a++)e[a]&&e[a].reconnect(this,"IF"+a),t[a]&&t[a].reconnect(this,"DO"+a);n&&n.reconnect(this,"ELSE")}},controls_flow_statements={init:function(){this.setColour(LOOPS_HUE);var e=new external_Blockly_namespaceObject.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(e,"FLOW").appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var t=this;this.setTooltip((function(){var e=t.getFieldValue("FLOW");return{BREAK:external_Blockly_namespaceObject.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:external_Blockly_namespaceObject.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[e]}))},onchange:function(){if(this.workspace){var e=!1,t=this;do{if("controls_repeat"==t.type||"controls_for"==t.type||"controls_forEach"==t.type||"controls_repeat_ext"==t.type||"controls_whileUntil"==t.type||"do_while"==t.type){e=!0;break}t=t.getSurroundParent()}while(t);e?this.setWarningText(null):this.setWarningText(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},controls_for={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new external_Blockly_namespaceObject.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(external_Blockly_namespaceObject.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){return external_Blockly_namespaceObject.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",e.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},controls_for_range={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new external_Blockly_namespaceObject.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(external_Blockly_namespaceObject.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){return external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",e.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}};controls_whileUntil.OPERATORS=[[external_Blockly_namespaceObject.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[external_Blockly_namespaceObject.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],controls_flow_statements.OPERATORS=[[external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const controls_if_if={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(external_Blockly_namespaceObject.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},controls_if_elseif={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},controls_if_else={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},controls_try={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},controls_except={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},controls_finally={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},controls_repeat_ext={init:function(){this.jsonInit({message0:external_Blockly_namespaceObject.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:LOOPS_HUE,tooltip:external_Blockly_namespaceObject.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:external_Blockly_namespaceObject.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},controls_lambda={init:function(){this.setColour(LOOPS_HUE),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(external_Blockly_namespaceObject.Msg.MIXLY_STAT),this.setOutput(!0)}},controls_pass={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},controls_thread={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},do_while={init:function(){this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.CONTROLS_REPEAT_TITLE_REPEAT+external_Blockly_namespaceObject.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(external_Blockly_namespaceObject.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[external_Blockly_namespaceObject.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(LOOPS_HUE),this.setTooltip("do-while loop"),this.setHelpUrl("")}},garbage_collection={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},get_mem_alloc={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},get_mem_free={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},get_unique_identifier={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET+external_Blockly_namespaceObject.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.PROCEDURES_DEFRETURN_RETURN+external_Blockly_namespaceObject.Msg.MIXLY_GET_UNIQUE_IDEN)}},datetime_fromtimestamp={init:function(){this.setColour(LOOPS_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},gene_unique_identifier={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},MATH_HUE=230;external_Blockly_namespaceObject.FieldTextInput.math_number_validator=function(e){return String(e)},external_Blockly_namespaceObject.FieldTextInput.math_number_validator_include_blank=function(e){if(""===e)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(e)?String(e):null};const math_number={init:function(){this.setColour(MATH_HUE),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldTextInput("0",external_Blockly_namespaceObject.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.MATH_NUMBER_TOOLTIP)}},math_constant={init:function(){this.setColour(MATH_HUE);this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new external_Blockly_namespaceObject.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CONSTANT");return{pi:external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[t]}))}},math_constant_mp={init:function(){this.setColour(MATH_HUE);this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new external_Blockly_namespaceObject.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CONSTANT");return{pi:external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[t]}))}},math_arithmetic={init:function(){this.setColour(MATH_HUE),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new external_Blockly_namespaceObject.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{ADD:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:external_Blockly_namespaceObject.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[t]}))}},math_selfcalcu={init:function(){this.setColour(MATH_HUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new external_Blockly_namespaceObject.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{ADD:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:external_Blockly_namespaceObject.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[t]}))}},math_bit={init:function(){this.setColour(MATH_HUE),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new external_Blockly_namespaceObject.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},math_trig={init:function(){this.setColour(MATH_HUE),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new external_Blockly_namespaceObject.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{SIN:external_Blockly_namespaceObject.Msg.MATH_TRIG_TOOLTIP_SIN,COS:external_Blockly_namespaceObject.Msg.MATH_TRIG_TOOLTIP_COS,TAN:external_Blockly_namespaceObject.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:external_Blockly_namespaceObject.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:external_Blockly_namespaceObject.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:external_Blockly_namespaceObject.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:external_Blockly_namespaceObject.Msg.MATH_SINGLE_TOOLTIP_LN}[t]}))}},math_dec={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MATH_BIN,"bin"],[external_Blockly_namespaceObject.Msg.MATH_OCT,"oct"],[external_Blockly_namespaceObject.Msg.MATH_HEX,"hex"]];this.setColour(MATH_HUE),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{bin:external_Blockly_namespaceObject.Msg.MATH_DEC_TOOLTIP_BIN,oct:external_Blockly_namespaceObject.Msg.MATH_DEC_TOOLTIP_OCT,hex:external_Blockly_namespaceObject.Msg.MATH_DEC_TOOLTIP_HEX}[e]}))}},math_to_int={init:function(){var e=[[external_Blockly_namespaceObject.Msg.LANG_MATH_TO_ROUND,"round"],[external_Blockly_namespaceObject.Msg.LANG_MATH_TO_CEIL,"ceil"],[external_Blockly_namespaceObject.Msg.LANG_MATH_TO_FLOOR,"floor"],[external_Blockly_namespaceObject.Msg.MATH_ABS,"fabs"],[external_Blockly_namespaceObject.Msg.MATH_SQRT,"sqrt"]];this.setColour(MATH_HUE),this.appendValueInput("A").setCheck(Number).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{sqrt:external_Blockly_namespaceObject.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:external_Blockly_namespaceObject.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:external_Blockly_namespaceObject.Msg.MATH_SINGLE_TOOLTIP_SQ,round:external_Blockly_namespaceObject.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:external_Blockly_namespaceObject.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:external_Blockly_namespaceObject.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[e]}))}},math_max_min={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MIXLY_MAX,"max"],[external_Blockly_namespaceObject.Msg.MIXLY_MIN,"min"]];this.setColour(MATH_HUE),this.appendValueInput("A").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{max:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_MATH_MAX,min:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_MATH_MIN}[e]}))}},math_number_base_conversion={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MATH_TWO,"two"],[external_Blockly_namespaceObject.Msg.MATH_EIGHT,"eight"],[external_Blockly_namespaceObject.Msg.MATH_TEN,"ten"],[external_Blockly_namespaceObject.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(MATH_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP").appendField(external_Blockly_namespaceObject.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MATH_ZHW).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP2").appendField(external_Blockly_namespaceObject.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),n={two:external_Blockly_namespaceObject.Msg.MATH_Before_two,eight:external_Blockly_namespaceObject.Msg.MATH_Before_eight,ten:external_Blockly_namespaceObject.Msg.MATH_Before_ten,sixteen:external_Blockly_namespaceObject.Msg.MATH_Before_sixteen},a=t.getFieldValue("OP2"),_={two:external_Blockly_namespaceObject.Msg.MATH_Behind_two,eight:external_Blockly_namespaceObject.Msg.MATH_Behind_eight,ten:external_Blockly_namespaceObject.Msg.MATH_Behind_ten,sixteen:external_Blockly_namespaceObject.Msg.MATH_Behind_sixteen};return n[e]+_[a]}))}},math_random={init:function(){var e=[[external_Blockly_namespaceObject.Msg.LANG_MATH_INT,"int"],[external_Blockly_namespaceObject.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(MATH_HUE),this.setOutput(!0,Number),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_RANDOM).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TYPE"),n={int:external_Blockly_namespaceObject.Msg.LANG_MATH_INT,float:external_Blockly_namespaceObject.Msg.LANG_MATH_FLOAT_RANDOM};return external_Blockly_namespaceObject.Msg.MATH_RANDOM_INT_TOOLTIP+n[e]}))}},math_constrain={init:function(){this.setColour(MATH_HUE),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MATH_CONSTRAIN_TOOLTIP)}},math_map={init:function(){this.setColour(MATH_HUE),this.appendValueInput("NUM",Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_MATH_MAP)}},math_indexer_number={init:function(){this.setColour(MATH_HUE),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldTextInput("0",external_Blockly_namespaceObject.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MATH_NUMBER_TOOLTIP)}},math_random_seed={init:function(){this.setColour(MATH_HUE),this.appendValueInput("NUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},math_round={init:function(){this.setColour(MATH_HUE),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MATH_ROUND).appendField(external_Blockly_namespaceObject.Msg.TEXT_KEEP),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MATH_ROUND_NEW_TOOLTIP)}},text_to_number={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MIXLY_TO_INT,"int"],[external_Blockly_namespaceObject.Msg.MIXLY_TO_FLOAT,"float"],[external_Blockly_namespaceObject.Msg.MIXLY_TO_BITES,"b"],[external_Blockly_namespaceObject.Msg.LANG_MATH_BYTE+external_Blockly_namespaceObject.Msg.MIXLY_TO_INT,"bti"]];this.setColour(MATH_HUE),this.appendValueInput("VAR").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"TOWHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{int:external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[e]}))}},text_to_number_skulpt={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MIXLY_TO_INT,"int"],[external_Blockly_namespaceObject.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(MATH_HUE),this.appendValueInput("VAR").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"TOWHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{int:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[e]}))}},base_map=math_map,turn_to_int={init:function(){this.setColour(MATH_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.LANG_MATH_BYTE+external_Blockly_namespaceObject.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},generate_cartesian_product={init:function(){this.setColour(MATH_HUE),this.itemCount_=1,this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PRODUCT+external_Blockly_namespaceObject.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(external_Blockly_namespaceObject.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("lists_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,a=0;a1&&"\\"===e.charAt(0)){var t=e.charAt(1);if("0"===t||"b"===t||"f"===t||"n"===t||"r"===t||"t"===t||"\\"===t||"'"===t)return String(e).substring(0,2);if("x"===t&&"0"===e.charAt(2)&&"B"===e.charAt(3))return String(e).substring(0,4)}return String(e).substring(0,1)};const text_char={init:function(){this.setColour(TEXTS_HUE),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new external_Blockly_namespaceObject.FieldTextInput("",external_Blockly_namespaceObject.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(e){if(1==e)var t="../../media/quote2.png";else t="../../media/quote3.png";return new external_Blockly_namespaceObject.FieldImage(t,7,12,'"')}},text_join={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},ascii_to_char={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},char_to_ascii={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},number_to_text={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},text_length={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},text_char_at2={init:function(){this.WHERE_OPTIONS=[[external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[external_Blockly_namespaceObject.Msg.TEXT_GET_INDEX_RANDOM+1+external_Blockly_namespaceObject.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_GET,"MODE"),external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=e.getFieldValue("WHERE"),a="";switch(t+" "+n){case"GET FROM_START":case"GET FROM_END":a=external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":a=external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":a=external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":a=external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=n&&"FROM_END"!=n||(a+=" "+external_Blockly_namespaceObject.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",external_Blockly_namespaceObject.Msg.ONE_BASED_INDEXING?"#1":"#0")),a}));var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHERE"),n={FROM_START:external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:external_Blockly_namespaceObject.Msg.TEXT_GET_INDEX_RANDOM};return external_Blockly_namespaceObject.Msg.PROCEDURES_DEFRETURN_RETURN+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_TYPE_STRING+n[e]+"n"+external_Blockly_namespaceObject.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var e=document.createElement("mutation");e.setAttribute("statement",!this.outputConnection);var t=this.getInput("AT").type==external_Blockly_namespaceObject.INPUT_VALUE;return e.setAttribute("at",t),e},domToMutation:function(e){var t="true"==e.getAttribute("statement");this.updateStatement_(t),e="false"!=e.getAttribute("at"),this.updateAt_(e)},updateStatement_:function(e){e!=!this.outputConnection&&(this.unplug(!0,!0),e?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(e){this.removeInput("AT"),this.removeInput("ORDINAL",!0),e?(this.appendValueInput("AT").setCheck(Number),external_Blockly_namespaceObject.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(external_Blockly_namespaceObject.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var t=new external_Blockly_namespaceObject.FieldDropdown(this.WHERE_OPTIONS,(function(t){var n="FROM_START"==t||"FROM_END"==t;if(n!=e){var a=this.sourceBlock_;return a.updateAt_(n),a.setFieldValue(t,"WHERE"),null}}));this.getInput("AT").appendField(t,"WHERE"),external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},text_char_at={init:function(){this.setHelpUrl(external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_GET+" "+external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.PROCEDURES_DEFRETURN_RETURN+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_TYPE_STRING+external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_START+"n"+external_Blockly_namespaceObject.Msg.TEXT_CHARAT2)}},text_random_char={init:function(){this.setHelpUrl(external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},text_substring2={init:function(){this.WHERE_OPTIONS_1=[[external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(external_Blockly_namespaceObject.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT1").type==external_Blockly_namespaceObject.INPUT_VALUE;e.setAttribute("at1",t);var n=this.getInput("AT2").type==external_Blockly_namespaceObject.INPUT_VALUE;return e.setAttribute("at2",n),e},domToMutation:function(e){var t="true"==e.getAttribute("at1"),n="true"==e.getAttribute("at2");this.updateAt_(1,t),this.updateAt_(2,n)},updateAt_:function(e,t){this.removeInput("AT"+e),this.removeInput("ORDINAL"+e,!0),t?(this.appendValueInput("AT"+e).setCheck(Number),external_Blockly_namespaceObject.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+e).appendField(external_Blockly_namespaceObject.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+e);var n=new external_Blockly_namespaceObject.FieldDropdown(this["WHERE_OPTIONS_"+e],(function(n){var a="FROM_START"==n||"FROM_END"==n;if(a!=t){var _=this.sourceBlock_;return _.updateAt_(e,a),_.setFieldValue(n,"WHERE"+e),null}}));this.getInput("AT"+e).appendField(n,"WHERE"+e),1==e&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},text_substring={init:function(){this.setHelpUrl(external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_GET+" "+external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(external_Blockly_namespaceObject.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},text_equals_starts_ends={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MIXLY_EQUALS,"==="],[external_Blockly_namespaceObject.Msg.MIXLY_STARTSWITH,"startswith"],[external_Blockly_namespaceObject.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(TEXTS_HUE),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},text_compare_to={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(external_Blockly_namespaceObject.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_COMPARETO_HELP)}},text_capital={init:function(){var e=[[external_Blockly_namespaceObject.Msg.TEXT_UPPER,"upper"],[external_Blockly_namespaceObject.Msg.TEXT_TITLE,"title"],[external_Blockly_namespaceObject.Msg.TEXT_CAPITALIZE,"capitalize"],[external_Blockly_namespaceObject.Msg.TEXT_SWAPCASE,"swapcase"],[external_Blockly_namespaceObject.Msg.TEXT_LOWER,"lower"]];this.setColour(TEXTS_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"CAPITAL").setCheck(String),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CAPITAL");return{upper:external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[e]}))}},text_center={init:function(){var e=[[external_Blockly_namespaceObject.Msg.TEXT_LJUST,"ljust"],[external_Blockly_namespaceObject.Msg.TEXT_CENTER,"center"],[external_Blockly_namespaceObject.Msg.TEXT_RJUST,"rjust"]];this.setColour(TEXTS_HUE),this.appendValueInput("VAR").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(external_Blockly_namespaceObject.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(external_Blockly_namespaceObject.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},text_find={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MID+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},text_join_seq={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},text_replace={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(external_Blockly_namespaceObject.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},text_split={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(external_Blockly_namespaceObject.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},text_strip={init:function(){var e=[[external_Blockly_namespaceObject.Msg.TEXT_TRIM_BOTH,"strip"],[external_Blockly_namespaceObject.Msg.TEXT_TRIM_LEFT,"lstrip"],[external_Blockly_namespaceObject.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(TEXTS_HUE),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"TOWHAT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{strip:external_Blockly_namespaceObject.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:external_Blockly_namespaceObject.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:external_Blockly_namespaceObject.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[e]}))}},text_format={init:function(){this.setColour(TEXTS_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("text_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,a=0;at?e[t]:0==t?'"key"':'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},dicts_create_with_container={init:function(){this.setColour(DICTS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},dicts_create_with_item={init:function(){this.setColour(DICTS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},dicts_keys={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICT_KEYS),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},dicts_get={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_GET_TOOLTIP)}},dicts_get_default={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},dicts_add_or_change={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},dicts_delete={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_DELETE_TOOLTIP)}},dicts_update={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT2").setCheck("Dict").appendField(external_Blockly_namespaceObject.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(external_Blockly_namespaceObject.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MID),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dicts_clear={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICT_CLEAR),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dicts_items={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICT_ITEMS),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},dicts_values={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICT_VALUES),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},dicts_length={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_LENGTH),this.setTooltip(external_Blockly_namespaceObject.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},dicts_deldict={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICT_DELDICT),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dicts_add_change_del={init:function(){this.MODE=[[external_Blockly_namespaceObject.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(external_Blockly_namespaceObject.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t="";switch(e.getFieldValue("WHERE")){case"INSERT":t=external_Blockly_namespaceObject.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":t=external_Blockly_namespaceObject.Msg.DICTS_DELETE_TOOLTIP}return t}))},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT2").type==external_Blockly_namespaceObject.INPUT_VALUE;return e.setAttribute("at2",t),e},domToMutation:function(e){var t="true"==e.getAttribute("at2");this.updateAt_(t)},updateAt_:function(e){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),e?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var t=new external_Blockly_namespaceObject.FieldDropdown(this.MODE,(function(t){var n="INSERT"==t;if(n!=e){var a=this.sourceBlock_;return a.updateAt_(n),a.setFieldValue(t,"WHERE"),null}}));this.getInput("AT2").appendField(t,"WHERE")}},dicts_pop={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICTS_ADD_VALUE),this.setTooltip(external_Blockly_namespaceObject.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},dicts_setdefault={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_SETDEFAULT_TOOLTIP)}},dicts_create_with_noreturn={init:function(){this.setColour(DICTS_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldLabel(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("dicts_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,a=0;at?e[t]:0==t?'"key"':'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},dicts_todict={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},dicts_to_json={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TO_JSON),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},json_to_dicts={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},dicts_to_to={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},dicts_to_json2={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TO_JSON),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},LOGIC_HUE=210,logic_compare={init:function(){var e=external_Blockly_namespaceObject.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(LOGIC_HUE),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{EQ:external_Blockly_namespaceObject.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:external_Blockly_namespaceObject.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:external_Blockly_namespaceObject.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:external_Blockly_namespaceObject.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:external_Blockly_namespaceObject.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:external_Blockly_namespaceObject.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[e]})),this.prevBlocks_=[null,null]}},logic_compare_continous={init:function(){var e=external_Blockly_namespaceObject.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],t=external_Blockly_namespaceObject.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(LOGIC_HUE),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP1"),this.appendValueInput("C").appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"OP2"),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},logic_operation={init:function(){var e=[[external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_AND,"AND"],[external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_OR,"OR"],[external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_NOR,"NOR"],[external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(LOGIC_HUE),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{AND:external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[e]}))}},logic_negate={init:function(){this.setColour(LOGIC_HUE),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(external_Blockly_namespaceObject.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(external_Blockly_namespaceObject.Msg.LOGIC_NEGATE_TOOLTIP)}},logic_boolean={init:function(){var e=[[external_Blockly_namespaceObject.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[external_Blockly_namespaceObject.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(LOGIC_HUE),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"BOOL"),this.setTooltip(external_Blockly_namespaceObject.Msg.LOGIC_BOOLEAN_TOOLTIP)}},logic_null={init:function(){this.setColour(LOGIC_HUE),this.setOutput(!0),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.LOGIC_NULL),this.setTooltip(external_Blockly_namespaceObject.Msg.LOGIC_NULL_TOOLTIP)}},logic_true_or_false={init:function(){this.setColour(LOGIC_HUE),this.appendValueInput("A"),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(external_Blockly_namespaceObject.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},logic_is_in={init:function(){var e=[[external_Blockly_namespaceObject.Msg.TEXT_APPEND_TO,"in"],[external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(LOGIC_HUE),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"BOOL"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.IN)}},logic_is={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(LOGIC_HUE),this.appendValueInput("A"),this.appendValueInput("B").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},logic_tobool={init:function(){this.setColour(LOGIC_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},STORAGE_HUE=0,storage_open_file_with_os={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("fn").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},storage_fileopen={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILENAME").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=external_Blockly_namespaceObject.Msg.MIXLY_USE,a=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,_=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,l=external_Blockly_namespaceObject.Msg.MIXLY_BELONG;return n+{r:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+l+a+_}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},storage_fileopen_new={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILENAME").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=external_Blockly_namespaceObject.Msg.MIXLY_USE,a=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,_=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,l=external_Blockly_namespaceObject.Msg.MIXLY_BELONG,s=external_Blockly_namespaceObject.Msg.PY_STORAGE_FILE_OBJECT;return n+{r:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+l+a+_+s}))}},storage_fileopen_new_encoding={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILENAME").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXPY_TEXT_ENCODE).appendField(new external_Blockly_namespaceObject.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=external_Blockly_namespaceObject.Msg.MIXLY_USE,a=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,_=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,l=external_Blockly_namespaceObject.Msg.MIXLY_BELONG,s=external_Blockly_namespaceObject.Msg.PY_STORAGE_FILE_OBJECT;return n+{r:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+l+a+_+s}))}},storage_file_write={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("data").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_TYPE_STRING+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},storage_get_contents_without_para={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck("Variable").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},storage_get_contents={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck("Variable").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,a=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return n+{read:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[t]+"x"+a}))}},storage_get_a_line={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MICROBIT_PYTHON_TYPE)}},storage_can_write_ornot={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.HTML_FILE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},storage_get_filename={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},storage_close_file={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},storage_list_all_files={init:function(){this.setColour(STORAGE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const storage_delete_file={init:function(){this.setColour(STORAGE_HUE),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},storage_get_file_size={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},storage_file_tell={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},storage_file_seek={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck("Variable").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,a=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,_=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return n+" "+{start:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[t]+_+"x"+a}))}},storage_get_current_dir={init:function(){this.setColour(STORAGE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},storage_make_dir={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("PATH").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+external_Blockly_namespaceObject.Msg.MIXLY_ESP32_SET+{mkdir:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[t]}))}},storage_rename={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},storage_change_dir={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},storage_is_file={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.HTML_FILE,"isfile"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[t]}))}},sdcard_use_spi_init={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("SPISUB").appendField(external_Blockly_namespaceObject.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_SETUP+external_Blockly_namespaceObject.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(external_Blockly_namespaceObject.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},sdcard_mount={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},procedures_defnoreturn={init:function(){var e=external_Blockly_namespaceObject.Procedures.findLegalName("",this),t=new external_Blockly_namespaceObject.FieldTextInput(e,external_Blockly_namespaceObject.Procedures.rename);t.setSpellcheck(!1),this.appendDummyInput().appendField(t,"NAME").appendField("","PARAMS"),this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&external_Blockly_namespaceObject.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(external_Blockly_namespaceObject.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(external_Blockly_namespaceObject.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(external_Blockly_namespaceObject.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(e){this.hasStatements_!==e&&(e?(this.appendStatementInput("STACK").appendField(external_Blockly_namespaceObject.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=e)},updateParams_:function(){var e="";this.arguments_.length&&(e=external_Blockly_namespaceObject.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),external_Blockly_namespaceObject.Events.disable();try{this.setFieldValue(e,"PARAMS")}finally{external_Blockly_namespaceObject.Events.enable()}},mutationToDom:function(e){var t=external_Blockly_namespaceObject.utils.xml.createElement("mutation");e&&t.setAttribute("name",this.getFieldValue("NAME"));for(var n=0;n"),this.appendValueInput("style").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},html_style={init:function(){this.setColour(HTML_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},html_form={init:function(){this.setColour(HTML_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.HTML_FORM_CONTENT).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.HTML_TEXT,"text"],[external_Blockly_namespaceObject.Msg.HTML_EMAIL,"email"],[external_Blockly_namespaceObject.Msg.HTML_NUMBER,"number"],[external_Blockly_namespaceObject.Msg.HTML_PASSWORD,"password"],[external_Blockly_namespaceObject.Msg.HTML_CHECKBOX,"checkbox"],[external_Blockly_namespaceObject.Msg.HTML_RADIOBUTTON,"radiobutton"],[external_Blockly_namespaceObject.Msg.HTML_BUTTON,"button"],[external_Blockly_namespaceObject.Msg.HTML_COLOUR,"colour"],[external_Blockly_namespaceObject.Msg.HTML_DATE,"date"],[external_Blockly_namespaceObject.Msg.HTML_LOCALTIME,"local time"],[external_Blockly_namespaceObject.Msg.HTML_FILE,"file"],[external_Blockly_namespaceObject.Msg.HTML_HIDDEN,"hidden"],[external_Blockly_namespaceObject.Msg.HTML_IMAGE,"image"],[external_Blockly_namespaceObject.Msg.HTML_MONTH,"month"],[external_Blockly_namespaceObject.Msg.HTML_RANGE,"range"],[external_Blockly_namespaceObject.Msg.HTML_RESET,"reset"],[external_Blockly_namespaceObject.Msg.HTML_SEARCH,"search"],[external_Blockly_namespaceObject.Msg.HTML_SUBMIT,"submit"],[external_Blockly_namespaceObject.Msg.HTML_TELEPHONENUMBER,"telephone number"],[external_Blockly_namespaceObject.Msg.HTML_TIME,"time"],[external_Blockly_namespaceObject.Msg.HTML_URL,"url"],[external_Blockly_namespaceObject.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.HTML_NAME).appendField(new external_Blockly_namespaceObject.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.HTML_VALUE).appendField(new external_Blockly_namespaceObject.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},html_style_content={init:function(){this.setColour(HTML_HUE),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldTextInput("property"),"KEY").appendField(":").appendField(new external_Blockly_namespaceObject.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},html_style_color={init:function(){this.setColour(HTML_HUE),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldTextInput("property"),"KEY").appendField(":").appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},html_text={init:function(){this.setColour(HTML_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.HTML_TEXT).appendField(new external_Blockly_namespaceObject.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},UTILITY_HUE=160,raw_table={init:function(){this.setColour(UTILITY_HUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldTable(""),"TEXT")}},raw_block={init:function(){this.setColour(UTILITY_HUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldMultilineInput(""),"TEXT")}},raw_expression={init:function(){this.setColour(UTILITY_HUE),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},raw_empty={init:function(){this.setColour(UTILITY_HUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},text_comment={init:function(){this.setColour(UTILITY_HUE),this.appendDummyInput().appendTitle("Comment:").appendTitle(new external_Blockly_namespaceObject.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},type_check={init:function(){this.setColour(UTILITY_HUE),this.appendValueInput("VALUE").appendField(external_Blockly_namespaceObject.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},text_print_multiple={init:function(){this.setColour(UTILITY_HUE),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(external_Blockly_namespaceObject.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=external_Blockly_namespaceObject.Block.obtain(e,"text_print_multiple_container");t.initSvg();for(var n=t.getInput("STACK").connection,a=0;a= stop:"," yield start"," start -= abs(step)"])};if(e=function(e,t,n){return"("+e+" <= "+t+") and "+o()+"("+e+", "+t+", "+n+") or "+p()+"("+e+", "+t+", "+n+")"},external_Blockly_namespaceObject.isNumber(a)&&external_Blockly_namespaceObject.isNumber(_)&&external_Blockly_namespaceObject.isNumber(l))a=parseFloat(a),_=parseFloat(_),l=Math.abs(parseFloat(l)),0==a%1&&0==_%1&&0==l%1?(a<=_?(_++,e=0==a&&1==l?_:a+", "+_,1!=l&&(e+=", "+l)):e=a+", "+--_+", -"+l,e="range("+e+")"):(e=a<_?o():p(),e+="("+a+", "+_+", "+l+")");else{var r=function(e,a){if(external_Blockly_namespaceObject.isNumber(e))e=parseFloat(e);else{var _=t.variableDB_.getDistinctName(n+a,external_Blockly_namespaceObject.Variables.NAME_TYPE);i+=_+" = "+e+"\n",e=_}return e};a=r(a,"_start"),_=r(_,"_end");r(l,"_inc"),e="number"==typeof a&&"number"==typeof _?a<_?o(0,_):p(0,_):e(a,_,l)}return i+="for "+n+" in "+e+":\n"+s},control_controls_for_range=function(e,t){var n=t.variableDB_.getName(e.getFieldValue("VAR"),external_Blockly_namespaceObject.Variables.NAME_TYPE),a=t.valueToCode(e,"FROM",t.ORDER_NONE)||"0",_=t.valueToCode(e,"TO",t.ORDER_NONE)||"0",l=t.valueToCode(e,"STEP",t.ORDER_NONE)||"1",s=t.statementToCode(e,"DO"),i=t.addLoopTrap(s,e.id)||t.PASS;return t.setups_.mixly_range="def mixly_range(start, stop, step):\n for i in range(start, stop + 1, step):\n yield i\n\n","for "+n+" in mixly_range("+a+", "+_+", "+l+"):\n"+i},control_controls_whileUntil=function(e,t){var n="UNTIL"==e.getFieldValue("MODE"),a=t.valueToCode(e,"BOOL",t.ORDER_NONE)||"False",_=t.statementToCode(e,"DO");return n&&(a="not "+a),"while "+a+":\n"+(_=t.addLoopTrap(_,e.id)||t.PASS)},control_controls_flow_statements=function(e){switch(e.getFieldValue("FLOW")){case"BREAK":return"break\n";case"CONTINUE":return"continue\n"}throw"Unknown flow statement."},control_controls_delay=function(e,t){return"sleep("+(t.valueToCode(this,"DELAY_TIME",t.ORDER_ATOMIC)||"1000")+")\n"},Panic_with_status_code=function(e,t){return"panic("+(t.valueToCode(this,"STATUS_CODE",t.ORDER_ATOMIC)||"1000")+")\n"},controls_millis=function(e,t){t.definitions_.import_time="import time";return["time.time()",t.ORDER_ATOMIC]},control_reset=function(e,t){return t.definitions_.import_microbit="from microbit import *","reset()\n"},controls_interrupts=function(){return"interrupts();\n"},controls_nointerrupts=function(){return"noInterrupts();\n"},control_controls_forEach=function(e,t){var n=t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"''",a=t.valueToCode(e,"LIST",t.ORDER_RELATIONAL)||"[]",_=t.statementToCode(e,"DO");return"for "+n+" in "+a+":\n"+(_=t.addLoopTrap(_,e.id)||t.PASS)},control_controls_range=function(e,t){return["range("+(t.valueToCode(this,"FROM",t.ORDER_NONE)||"0")+", "+(t.valueToCode(this,"TO",t.ORDER_NONE)||"0")+", "+(t.valueToCode(this,"STEP",t.ORDER_NONE)||"1")+")",t.ORDER_ATOMIC]},control_controls_lambda=function(e,t){var n="lambda "+(t.valueToCode(e,"BOOL",t.ORDER_NONE)||"None")+": "+(t.statementToCode(e,"DO")||"pass");return[n=n.replace("\n","").replace(" ",""),t.ORDER_ATOMIC]},time_sleep=function(e,t){return t.definitions_.import_time="import time","time.sleep("+(t.valueToCode(this,"DELAY_TIME",t.ORDER_ATOMIC)||"1000")+")\n"},control_controls_pass=function(){return"pass\n"},control_controls_thread=function(e,t){t.definitions_.import__thread="import _thread";var n=t.valueToCode(this,"VAR",t.ORDER_NONE)||"None";return"_thread.start_new_thread("+t.variableDB_.getName(t.valueToCode(this,"callback",t.ORDER_NONE)||"None",external_Blockly_namespaceObject.Procedures.NAME_TYPE)+", "+n+")\n"},control_do_while=function(e,t){var n=t.valueToCode(this,"select_data",t.ORDER_NONE)||"False",a=t.statementToCode(this,"input_data");return a="true"==this.getFieldValue("type")?a+" if ("+n+"):\n break\n":a+" if not ("+n+"):\n break\n","while True:\n"+(a=t.addLoopTrap(a,this.id)||t.PASS)},control_controls_repeat_ext=function(e,t){var n=t.valueToCode(this,"TIMES",t.ORDER_ATOMIC),a=t.statementToCode(e,"DO");return"for _my_variable in range("+n+"):\n"+(a=t.addLoopTrap(a,e.id)||t.PASS)},control_garbage_collection=function(e,t){t.definitions_.import_gc="import gc";return"gc.collect()\n"},control_get_mem_alloc=function(e,t){t.definitions_.import_gc="import gc";return["gc.mem_alloc()",t.ORDER_ATOMIC]},control_get_mem_free=function(e,t){t.definitions_.import_gc="import gc";return["gc.mem_free()",t.ORDER_ATOMIC]},control_get_unique_identifier=function(e,t){t.definitions_.import_machine="import machine";return["machine.unique_id()",t.ORDER_ATOMIC]},controls_repeat=control_controls_repeat_ext,control_datetime_fromtimestamp=function(e,t){return t.definitions_.import_datetime="import datetime",["datetime.datetime.fromtimestamp("+t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},control_gene_unique_identifier=function(e,t){var n=external_Mixly_namespaceObject.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+n+"uuid"]="from "+n+" import uuid";return["uuid()",t.ORDER_ATOMIC]},math_math_number=function(e,t){var n=this.getFieldValue("NUM");return[n,n<0?t.ORDER_UNARY_PREFIX:t.ORDER_ATOMIC]},math_math_constant=function(e,t){return t.definitions_.import_math="import math",["math."+this.getFieldValue("CONSTANT"),t.ORDER_ATOMIC]},math_math_constant_mp=function(e,t){return t.definitions_.import_math="import math",["math."+this.getFieldValue("CONSTANT"),t.ORDER_ATOMIC]},math_math_bit=function(e,t){var n=this.getFieldValue("OP"),a=t.ORDER_ATOMIC;return["("+(t.valueToCode(this,"A",a)||"0")+n+(t.valueToCode(this,"B",a)||"0")+")",a]},math_math_arithmetic=function(e,t){var n=(a={ADD:[" + ",t.ORDER_ADDITIVE],MINUS:[" - ",t.ORDER_ADDITIVE],MULTIPLY:[" * ",t.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",t.ORDER_MULTIPLICATIVE],QUYU:[" % ",t.ORDER_MULTIPLICATIVE],ZHENGCHU:[" // ",t.ORDER_MULTIPLICATIVE],POWER:[" ** ",t.ORDER_EXPONENTIATION]}[e.getFieldValue("OP")])[0],a=a[1];return[(t.valueToCode(e,"A",a)||"0")+n+(e=t.valueToCode(e,"B",a)||"0"),a]},math_math_selfcalcu=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_RELATIONAL)||"0",a=t.valueToCode(this,"B",t.ORDER_RELATIONAL)||"0";switch(this.getFieldValue("OP")){case"ADD":var _="+=";break;case"MINUS":_="-=";break;case"MULTIPLY":_="*=";break;case"DIVIDE":_="/=";break;case"QUYU":_="%=";break;case"ZHENGCHU":_="//=";break;case"POWER":_="**="}return n+" "+_+" "+a+"\n"},math_single=function(e,t){var n,a=e.getFieldValue("OP");if("NEG"==a)return["-"+(n=t.valueToCode(e,"NUM",t.ORDER_UNARY_SIGN)||"0"),t.ORDER_UNARY_SIGN];switch(t.definitions_.import_math="import math",e="SIN"==a||"COS"==a||"TAN"==a?t.valueToCode(e,"NUM",t.ORDER_MULTIPLICATIVE)||"0":t.valueToCode(e,"NUM",t.ORDER_NONE)||"0",a){case"ABS":n="math.fabs("+e+")";break;case"ROOT":n="math.sqrt("+e+")";break;case"LN":n="math.log("+e+")";break;case"LOG10":n="math.log10("+e+")";break;case"EXP":n="math.exp("+e+")";break;case"POW10":n="math.pow(10,"+e+")";break;case"ROUND":n="round("+e+")";break;case"ROUNDUP":n="math.ceil("+e+")";break;case"ROUNDDOWN":n="math.floor("+e+")";break;case"SIN":n="math.sin("+e+")";break;case"COS":n="math.cos("+e+")";break;case"TAN":n="math.tan("+e+")";break;case"++":n="++("+e+")";break;case"--":n="--("+e+")";break;case"-":n="-("+e+")"}if(n)return[n,t.ORDER_EXPONENTIATION];switch(a){case"ASIN":n="math.degrees(math.asin("+e+"))";break;case"ACOS":n="math.degrees(math.acos("+e+"))";break;case"ATAN":n="math.degrees(math.atan("+e+"))"}return[n,t.ORDER_MULTIPLICATIVE]},math_math_trig=math_single,math_math_dec=function(e,t){var n=t.valueToCode(this,"NUM",t.ORDER_NONE)||"0";return[this.getFieldValue("OP")+"("+n+")",t.ORDER_ATOMIC]},math_math_to_int=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_NONE)||"0",a=this.getFieldValue("OP"),_="";return"round"===a?_=a+"("+n+")":(_="math."+a+"("+n+")",t.definitions_.import_math="import math"),[_,t.ORDER_ATOMIC]},math_math_max_min=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_NONE)||"0",a=t.valueToCode(this,"B",t.ORDER_NONE)||"0";return[this.getFieldValue("OP")+"("+n+", "+a+")",t.ORDER_ATOMIC]},math_math_random=function(e,t){t.definitions_.import_random="import random";var n=this.getFieldValue("TYPE"),a=t.valueToCode(this,"FROM",t.ORDER_NONE)||"0",_=t.valueToCode(this,"TO",t.ORDER_NONE)||"0";if("int"==n)var l="random.randint("+a+", "+_+")";else if("float"==n)l="random.uniform("+a+", "+_+")";return[l,t.ORDER_UNARY_POSTFIX]},math_math_map=function(e,t){var n=t.valueToCode(this,"NUM",t.ORDER_NONE),a=t.valueToCode(this,"fromLow",t.ORDER_ATOMIC),_=t.valueToCode(this,"fromHigh",t.ORDER_ATOMIC),l=t.valueToCode(this,"toLow",t.ORDER_ATOMIC),s=t.valueToCode(this,"toHigh",t.ORDER_ATOMIC);return t.definitions_.import_mixpy_math_map="from mixpy import math_map",["math_map("+n+", "+a+", "+_+", "+l+", "+s+")",t.ORDER_NONE]},math_math_constrain=function(e,t){return["min(max("+(t.valueToCode(this,"VALUE",t.ORDER_NONE)||"0")+", "+(t.valueToCode(this,"LOW",t.ORDER_NONE)||"0")+"), "+(t.valueToCode(this,"HIGH",t.ORDER_NONE)||"0")+")",t.ORDER_UNARY_POSTFIX]},math_math_number_base_conversion=function(e,t){var n=e.getFieldValue("OP"),a=t.valueToCode(this,"NUM",t.ORDER_NONE)||"0",_=e.getFieldValue("OP2");t.definitions_.import_math="import math";var l="",s="10";if("two"==n?s="2":"eight"==n?s="8":"ten"==n?s="10":"sixteen"==n&&(s="16"),"two"==_?l="bin":"eight"==_?l="oct":"ten"==_?l="":"sixteen"==_&&(l="hex"),""==l)var i="int(str("+a+"), "+s+")";else i=l+"(int(str("+a+"), "+s+"))";return[i,t.ORDER_ATOMIC]},math_math_random_seed=function(e,t){return t.definitions_.import_random="import random","random.seed("+(t.valueToCode(this,"NUM",t.ORDER_NONE)||"0")+");\n"},math_math_indexer_number=function(e,t){var n=this.getFieldValue("NUM");return[n,n<0?t.ORDER_UNARY_PREFIX:t.ORDER_ATOMIC]},math_math_round=function(e,t){return["round("+(t.valueToCode(this,"VALUE",t.ORDER_NONE)||"0")+", "+(t.valueToCode(this,"VAR",t.ORDER_NONE)||"0")+")",t.ORDER_ATOMIC]},math_text_to_number=function(e,t){var n=this.getFieldValue("TOWHAT"),a=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);return"b"==n?[a+'.encode("utf-8")',t.ORDER_ATOMIC]:"bti"==n?["int.from_bytes("+a+',"big")',t.ORDER_ATOMIC]:[n+"("+a+")",t.ORDER_ATOMIC]},math_text_to_number_skulpt=function(e,t){var n=this.getFieldValue("TOWHAT"),a=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);return"b"==n?[a+'.encode("utf-8")',t.ORDER_ATOMIC]:[n+"("+a+")",t.ORDER_ATOMIC]},math_base_map=math_math_map,math_turn_to_int=function(e,t){return t.definitions_.import_hexlify="from ubinascii import hexlify",["hexlify("+t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+").decode()",t.ORDER_ATOMIC]},math_generate_cartesian_product=function(e,t){t.definitions_.import_itertools="import itertools";let n=t.valueToCode(this,"REPEAT",t.ORDER_ATOMIC),a=new Array(this.itemCount_);for(let e=0;e",GTE:">="};const logic_logic_operation=function(e,t){var n=this.getFieldValue("OP"),a="&&"==n?t.ORDER_LOGICAL_AND:t.ORDER_LOGICAL_OR,_=t.valueToCode(this,"A",a)||"False",l=t.valueToCode(this,"B",a)||"False";if("AND"==n)var s=_+" and "+l;else if("OR"==n)s=_+" or "+l;else if("NOR"==n)s="not("+_+"^"+l+")";else s=_+"^"+l;return[s,a]},logic_logic_negate=function(e,t){var n=t.ORDER_UNARY_PREFIX;return["not "+(t.valueToCode(this,"BOOL",n)||"False"),n]},logic_logic_boolean=function(e,t){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",t.ORDER_ATOMIC]},logic_logic_null=function(e,t){return["None",t.ORDER_ATOMIC]},logic_logic_true_or_false=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"False";return["("+(t.valueToCode(this,"B",t.ORDER_ATOMIC)||"False")+" if "+n+" else "+(t.valueToCode(this,"C",t.ORDER_ATOMIC)||"False")+")",t.ORDER_ATOMIC]},logic_logic_is_in=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"''",a=t.valueToCode(this,"B",t.ORDER_ATOMIC)||"''";return[n+" "+this.getFieldValue("BOOL")+" "+a,t.ORDER_ATOMIC]},logic_logic_is=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"''",a=t.valueToCode(this,"B",t.ORDER_ATOMIC)||"''";return[n+" "+this.getFieldValue("BOOL")+" "+a,t.ORDER_ATOMIC]},logic_logic_tobool=function(e,t){return["bool("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"0")+")",t.ORDER_ATOMIC]},storage_storage_open_file_with_os=function(e,t){return t.definitions_.import_os="import os","os.startfile("+t.valueToCode(this,"fn",t.ORDER_ATOMIC)+")\n"},storage_storage_fileopen=function(e,t){return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+" = open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},storage_storage_fileopen_new=function(e,t){return["open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",t.ORDER_ATOMIC]},storage_storage_fileopen_new_encoding=function(e,t){return["open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',t.ORDER_ATOMIC]},storage_storage_file_write=function(e,t){var n=t.valueToCode(this,"data",t.ORDER_ATOMIC);return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".write("+n+")\n"},storage_storage_get_contents_without_para=function(e,t){var n=this.getFieldValue("MODE");return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+"."+n+"()",t.ORDER_ATOMIC]},storage_storage_get_contents=function(e,t){var n=this.getFieldValue("MODE");return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+"."+n+"("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},storage_storage_get_a_line=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".readline("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},storage_storage_can_write_ornot=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".writable()",t.ORDER_ATOMIC]},storage_storage_get_filename=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".name()",t.ORDER_ATOMIC]},storage_storage_close_file=function(e,t){return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".close()\n"},storage_storage_list_all_files=function(e,t){t.definitions_.import_os="import os";return["os.listdir()",t.ORDER_ATOMIC]},storage_storage_delete_file=function(e,t){return t.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},storage_storage_get_file_size=function(e,t){return t.definitions_.import_os="import os",["os.path.getsize("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},storage_storage_file_tell=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".tell()",t.ORDER_ATOMIC]},storage_storage_file_seek=function(e,t){var n=this.getFieldValue("MODE"),a=0;return a="start"==n?0:"current"==n?1:2,t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".seek("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+","+a+")\n"},storage_storage_change_dir=function(e,t){return t.definitions_.import_os="import os","os.chdir("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},storage_storage_get_current_dir=function(e,t){t.definitions_.import_os="import os";return["os.getcwd()",t.ORDER_ATOMIC]},storage_storage_make_dir=function(e,t){return t.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+t.valueToCode(this,"PATH",t.ORDER_ATOMIC)+")\n"},storage_storage_rename=function(e,t){return t.definitions_.import_os="import os","os.rename("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+","+t.valueToCode(this,"NEWFILE",t.ORDER_ATOMIC)+")\n"},storage_storage_is_file=function(e,t){t.definitions_.import_os="import os";var n=t.valueToCode(this,"FILE",t.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+n+")",t.ORDER_ATOMIC]},storage_sdcard_use_spi_init=function(e,t){return t.definitions_.import_os="import os",t.definitions_.import_sdcard="import sdcard",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+" = sdcard.SDCard("+t.valueToCode(this,"SPISUB",t.ORDER_ATOMIC)+","+t.valueToCode(this,"PINSUB",t.ORDER_ATOMIC)+")\n"},storage_sdcard_mount=function(e,t){return t.definitions_.import_os="import os",t.definitions_.import_sdcard="import sdcard","os.mount("+t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+","+t.valueToCode(this,"DIR",t.ORDER_ATOMIC)+")\n"},procedures_procedures_defreturn=function(e,t){var n=t.variableDB_.getName(this.getFieldValue("NAME"),external_Blockly_namespaceObject.Procedures.NAME_TYPE),a=(this.getInput("STACK")&&t.statementToCode(this,"STACK"))??" pass\n";t.INFINITE_LOOP_TRAP&&(a=t.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+a);var _=t.valueToCode(this,"RETURN",t.ORDER_NONE)||"";_&&(_=" return "+_+"\n");for(var l=[],s=0;s\n\n\n\t\n"+t.statementToCode(this,"HEAD")+"\n\n"+t.statementToCode(this,"BODY")+"\n\n'''",t.ORDER_ATOMIC]},html_html_title=function(e,t){var n=t.statementToCode(this,"DO"),a=this.getFieldValue("LEVEL");return"\n"+n+"\n"},html_html_head_body=function(e,t){var n=t.statementToCode(this,"DO"),a=this.getFieldValue("LEVEL");if("head"==a)var _="<"+a+'>\n\t\n'+n+"\n";else _="<"+a+">\n"+n+"\n";return _},html_html_content=function(e,t){var n=t.statementToCode(this,"DO"),a=this.getFieldValue("LEVEL");return"<"+a+">\n"+n+"\n"},html_html_content_more=function(e,t){var n=t.statementToCode(this,"DO"),a=t.valueToCode(this,"style"),_=this.getFieldValue("LEVEL");return"<"+_+" "+a+" >\n"+n+"\n"},html_html_style=function(e,t){return['style="'+t.statementToCode(this,"STYLE")+'"',t.ORDER_ATOMIC]},html_html_form=function(e,t){return'"},html_html_style_content=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},html_html_text=function(){return this.getFieldValue("TEXT")+"\n"},utility_raw_block=function(e){return e.getFieldValue("TEXT")+"\n"},utility_raw_expression=function(e,t){return[e.getFieldValue("TEXT"),t.ORDER_ATOMIC]},utility_raw_empty=function(e,t){return(t.valueToCode(e,"VALUE",t.ORDER_ATOMIC)||"")+"\n"},utility_raw_table=function(){return""},utility_type_check=function(e,t){return["type("+(t.valueToCode(e,"VALUE",t.ORDER_MEMBER)||"___")+")",t.ORDER_ATOMIC]},utility_function_call=function(e,t){for(var n=e.getFieldValue("NAME"),a=e.hasReturn_,_=new Array(e.itemCount_),l=0;l0?t.join("\n")+n.join("\n")+a.join("\n")+s.join("\n")+i.join("")+e+"while True:\n"+o.join("")+p.join("\n"):t.join("\n")+n.join("\n")+a.join("\n")+s.join("\n")+i.join("")+e+p.join("\n")},Python.scrubNakedValue=function(e){return e+"\n"},Python.quote_=function(e){var t="'";return-1!==(e=e.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===e.indexOf('"')?t='"':e=e.replace(/'/g,"\\'")),t+e+t},Python.multiline_quote_=function(e){return"'''"+(e=e.replace(/'''/g,"\\'\\'\\'"))+"'''"},Python.scrub_=function(e,t,n){var a="";if(!e.outputConnection||!e.outputConnection.targetConnection){(l=e.getCommentText())&&(l=external_Blockly_namespaceObject.utils.string.wrap(l,Python.COMMENT_WRAP-3),a+=Python.prefixLines(l+"\n","# "));for(var _=0;_0?"int("+i+" + "+_+")":_<0?"int("+i+" - "+-_+")":"int("+i+")",a&&(i="-"+i)),i};const AI_HUE=205,AI_ChooseAndGet={init:function(){this.setColour(AI_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_CHOOSE_AND_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_CHOOSE_AND_GET_ONE_FILE_NAME,"getOneFile"],[external_Blockly_namespaceObject.Msg.MIXLY_CHOOSE_AND_GET_MANY_FILE_NAMES,"getManyFiles"],[external_Blockly_namespaceObject.Msg.MIXLY_CHOOSE_AND_GET_DIR,"getDirectory"]]),"TYPE"),this.setInputsInline(!0),this.setOutput(!0)}},AI_client={init:function(){this.setColour(AI_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_SETUP).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify,"AipImageClassify"],[external_Blockly_namespaceObject.Msg.MIXLY_AipSpeech,"AipSpeech"],[external_Blockly_namespaceObject.Msg.MIXLY_AipImageCensor,"AipImageCensor"],[external_Blockly_namespaceObject.Msg.MIXLY_AipFace,"AipFace"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr,"AipOcr"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp,"AipNlp"]]),"CTYPE"),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("API_KEY").appendField("API_KEY").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("SECRET_KEY").appendField("SECRET_KEY").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},AI_Speech_synthesis={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipSpeech_synthesis).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("STR").appendField(external_Blockly_namespaceObject.Msg.OLED_STRING).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipSpeech_synthesis_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_Speech_asr={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipSpeech_asr).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipSpeech_File).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipSpeech_ASR_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_ImageClassify={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_FUNC).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ADDR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_Image).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_advancedGeneral_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_ImageClassify_Func={init:function(){this.setColour(AI_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_advancedGeneral,"advancedGeneral"],[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_dishDetect,"dishDetect"],[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_carDetect,"carDetect"],[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_animalDetect,"animalDetect"],[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_plantDetect,"plantDetect"],[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_logoSearch,"logoSearch"]]),"TYPE"),this.setOutput(!0)}},AI_Face_match={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipFace_match).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_Image+"1"+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("VAR2").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_Image+"2"+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipFace_match_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_Ocr={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipOcr).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_FUNC).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ADDR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_Image).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_Ocr_Func={init:function(){this.setColour(AI_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_basicGeneral,"basicGeneral"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_webImage,"webImage"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_idcard,"idcard"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_bankcard,"bankcard"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_drivingLicense,"drivingLicense"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_vehicleLicense,"vehicleLicense"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_licensePlate,"licensePlate"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_businessLicense,"businessLicense"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_receipt,"receipt"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_trainTicket,"trainTicket"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_taxiReceipt,"taxiReceipt"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_form,"tableRecognition"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_vatInvoice,"vatInvoice"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_passport,"passport"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_handwriting,"handwriting"]]),"TYPE"),this.setOutput(!0)}},AI_Nlp={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_FUNC).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("STR").appendField(external_Blockly_namespaceObject.Msg.OLED_STRING).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_Nlp_Sim={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Sim).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_FUNC).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("STR1").appendField(external_Blockly_namespaceObject.Msg.OLED_STRING+"1").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("STR2").appendField(external_Blockly_namespaceObject.Msg.OLED_STRING+"2").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Sim_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_Nlp_Func={init:function(){this.setColour(AI_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_lexer,"lexer"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_depParser,"depParser"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_wordEmbedding,"wordEmbedding"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_dnnlm,"dnnlm"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_commentTag,"commentTag"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_sentimentClassify,"sentimentClassify"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_keyword,"keyword"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_topic,"topic"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_ecnet,"ecnet"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_emotion,"emotion"]]),"TYPE"),this.setOutput(!0)}},AI_Nlp_Func_sim={init:function(){this.setColour(AI_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_wordSimEmbedding,"wordSimEmbedding"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_simnet,"simnet"]]),"TYPE"),this.setOutput(!0)}},AI_Nlp_Topic={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_topic).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("STR1").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Topic_Title).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("STR2").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Topic_Content).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Topic_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_Nlp_newsSummary={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_summary).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("STR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Topic_Content).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("LEN").appendField(external_Blockly_namespaceObject.Msg.MIXLY_LIST_LEN).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Summary_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_audio={init:function(){this.setColour(AI_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXPY_AI_AUDIO),this.appendValueInput("TIME").appendField(external_Blockly_namespaceObject.Msg.MIXPY_AI_AUDIO_TIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXPY_AI_AUDIO_TOOLTIP)}},AI_photo={init:function(){this.setColour(AI_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXPY_AI_PHOTO),this.appendValueInput("BUT").appendField(external_Blockly_namespaceObject.Msg.MIXPY_AI_PHOTO_BUTTON),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXPY_AI_PHOTO_TOOLTIP)}},AI_result={init:function(){this.setColour(AI_HUE),this.appendValueInput("AI").appendField(external_Blockly_namespaceObject.Msg.MIXPY_AI_RESULT).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify,"Image"],[external_Blockly_namespaceObject.Msg.MIXLY_AipSpeech_asr,"Speech"],[external_Blockly_namespaceObject.Msg.MIXLY_AipFace_match,"Face"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr,"Ocr"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_simnet,"OcrSimilarity"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_sentimentClassify,"Emotion"]]),"CTYPE"),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.LOGIC_NEGATE_TOOLTIP)}},ALGORITHM_HUE="#526FC3",algorithm_prepare={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_add_school={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_ADD_SCHOOL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_find_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_FIND_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_new_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NEW_PATH),this.setOutput(!0)}},algorithm_set_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_SET_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_add_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_ADD_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_del_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_DEL_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_return_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_RETURN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_no_left={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NO_LEFT),this.setOutput(!0)}},algorithm_print_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_prepare2={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_current_school={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_CURRENT_SCHOOL),this.setOutput(!0)}},algorithm_no_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NO_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_prepare_2_1={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE_2_1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_prepare_2_2={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE_2_2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_move_recent={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_MOVE_RECENT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_not_home={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NOT_HOME),this.setOutput(!0)}},algorithm_not_school={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NOT_SCHOOL),this.setOutput(!0)}},algorithm_print_path2={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_PATH2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},hanoi_init={init:function(){this.appendDummyInput().appendField("准备").appendField(new external_Blockly_namespaceObject.FieldNumber(3,0,100,1),"NUM").appendField("层汉诺塔"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},hanoi_move={init:function(){this.appendDummyInput().appendField("移动圆盘从"),this.appendValueInput("FROM_NUM").setCheck(null).appendField("柱"),this.appendDummyInput().appendField("到"),this.appendValueInput("TO_NUM").setCheck(null).appendField("柱"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_all_books={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_ALL_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_all_books_sequence={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_ALL_BOOKS2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_first_book={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_FIRST_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_no_ring2={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NO_RING),this.setOutput(!0)}},algorithm_yes_ring2={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_YES_RING),this.setOutput(!0)}},algorithm_next_book={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NEXT_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_two_left={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_TWO_LEFT),this.setOutput(!0)}},algorithm_divide_books={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_DIVIDE_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_get_half_books={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_GET_HALF_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_delete_book={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_DELETE_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_delete_books={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_DELETE_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_delete_books2={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_DELETE_BOOKS2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_print_book2={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_book_scale={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("设置待查书总数 N=").appendField(new external_Blockly_namespaceObject.FieldDropdown([["5","5"],["10","10"],["20","20"],["50","50"]]),"NUM"),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_number_zero={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NUMBER_ZERO),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_number_add={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NUMBER_ADD),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_print_number={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_get_book_num={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField("n"+external_Blockly_namespaceObject.Msg.MIXLY_VALUE2).appendField(new external_Blockly_namespaceObject.FieldTextInput("50"),"NUM"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_print_sequence={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_SEQUENCE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_print_divide={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_DIVIDE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_init_jttl={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("初始化鸡兔同笼问题:"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("有若干只鸡、兔在同一个笼子里。"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("从上面数鸡兔有10个头,"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("从下面数鸡兔有32只脚。"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("问笼中有多少只鸡和多少只兔?"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_rabbit_zero={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("假设兔子的数量为0只"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_rabbit_number_in_range={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("兔子的数量在范围之内"),this.setOutput(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_chick_calculate={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("根据(头数-兔子数)计算出鸡的数量"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_check_feet={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("计算得到脚的数量正确"),this.setOutput(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_print_jttl_answer={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("输出鸡、兔的数量"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_rabbit_add={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("假设兔子数量要更多一只"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_init_fzsf={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("加载路线图"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_fz_calc={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("计算").appendField(new external_Blockly_namespaceObject.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME").appendField("长度"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_fz_calc_first_min={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("设置S1为Smin"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_fz_compare={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField(new external_Blockly_namespaceObject.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME").appendField("的长度比").appendField(new external_Blockly_namespaceObject.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME2").appendField("短"),this.setOutput(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_fz_set_min={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("设置").appendField(new external_Blockly_namespaceObject.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME").appendField("为Smin"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_fz_move={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("按照Smin移动"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_init_hxdb={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("初始化韩信点兵问题:"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("有未知数量的若干士兵。"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("若3人一排列队,多1人;"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("若5人一排列队,多2人;"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("若7人一排列队,多2人;"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("问士兵的数量最少是多少人?"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_hxdb_init_soldier={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("初始化士兵为").appendField(new external_Blockly_namespaceObject.FieldTextInput("7"),"NUM").appendField("个"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_hxdb_stand_in_line={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("使士兵").appendField(new external_Blockly_namespaceObject.FieldDropdown([["3","3"],["5","5"],["7","7"]]),"NUM").appendField("人一排列队"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_hxdb_last_line={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("剩余").appendField(new external_Blockly_namespaceObject.FieldTextInput("1"),"NUM").appendField("个士兵"),this.setOutput(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_hxdb_add={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("增加1个士兵"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_hxdb_result={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("输出士兵数量"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},hanoi_init_offline={init:function(){this.appendDummyInput().appendField("准备").appendField(new external_Blockly_namespaceObject.FieldNumber(3,0,100,1),"NUM").appendField("层汉诺塔"),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setInputsInline(!0),this.setTooltip(""),this.setHelpUrl("")}},algorithm_get_current_location={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_GET_CURRENT_LOCATION),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_void_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_VOID_PATH),this.setOutput(!0)}},algorithm_color_seclet={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput("").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(new external_Blockly_namespaceObject.FieldColour("ff0000"),"COLOR"),this.setInputsInline(!0),this.setOutput(!0,String)}},COMMUNICATE_HUE="#3288dd",requests_get_old={init:function(){this.setColour(COMMUNICATE_HUE),this.appendValueInput("DOMAIN").appendField(external_Blockly_namespaceObject.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_REQUESTS_GET).appendField(new external_Blockly_namespaceObject.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},requests_get={init:function(){this.setColour(COMMUNICATE_HUE),this.appendValueInput("URL").appendField(external_Blockly_namespaceObject.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_CONDUCT).appendField(new external_Blockly_namespaceObject.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(external_Blockly_namespaceObject.Msg.blockpy_REQUESTS).appendField(external_Blockly_namespaceObject.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},requests_post={init:function(){this.setColour(COMMUNICATE_HUE),this.appendValueInput("URL").appendField(external_Blockly_namespaceObject.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_CONDUCT).appendField(new external_Blockly_namespaceObject.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(external_Blockly_namespaceObject.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(external_Blockly_namespaceObject.Msg.blockpy_REQUESTS+external_Blockly_namespaceObject.Msg.OLED_STRING),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},requests_attribute={init:function(){this.appendValueInput("VAL");var e=[[external_Blockly_namespaceObject.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[external_Blockly_namespaceObject.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[external_Blockly_namespaceObject.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[external_Blockly_namespaceObject.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[external_Blockly_namespaceObject.Msg.MIXPY_TEXT_ENCODE,"encoding"]];this.setColour(COMMUNICATE_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},requests_method={init:function(){this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(COMMUNICATE_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_CONDUCT).appendField(new external_Blockly_namespaceObject.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"DIR"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{forward:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[t]}))}},CV_HUE="f0a559",cv_read_image={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_IMREAD),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},cv_show_image={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.OLED_BITMAP),this.appendValueInput("data").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Topic_Title),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},cv_write_image={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_IMWRITE),this.appendValueInput("data").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.HTML_NAME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},cv_waitkey={init:function(){this.setColour(CV_HUE),this.appendValueInput("data").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_DELAY),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MILLIS+external_Blockly_namespaceObject.Msg.MIXLY_CV_OR_PRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_CV_WAITKEY_TOOLTIP)}},cv_destroy_all={init:function(){this.setColour(CV_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_DESTROY_ALL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},cv_line_rect={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_IMAGE);var e=[[external_Blockly_namespaceObject.Msg.MIXLY_CV_RECT,"rectangle"],[external_Blockly_namespaceObject.Msg.MIXLY_CV_LINE,"line"]];this.appendValueInput("x1").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_DISPLAY_DRAW).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_BEGIN+"(x1"),this.appendValueInput("y1").setCheck(Number).appendField(",y1"),this.appendValueInput("x2").setCheck(Number).appendField(") "+external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_END+"(x2"),this.appendValueInput("y2").setCheck(Number).appendField(",y2"),this.appendDummyInput().appendField(") "+external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_COLOR).appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"FIELDNAME"),this.appendValueInput("thick").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_THICKNESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_RECT_TOOLTIP)}},cv_text={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_IMAGE);this.appendValueInput("data").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWTEXT),this.appendValueInput("x1").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_BEGIN+"(x1"),this.appendValueInput("y1").setCheck(Number).appendField(",y1"),this.appendDummyInput().appendField(") "+external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NAME).appendField(new external_Blockly_namespaceObject.FieldDropdown([["SIMPLEX","SIMPLEX"],["PLAIN","PLAIN"],["DUPLEX","DUPLEX"],["COMPLEX","COMPLEX"],["COMPLEX_SMALL","COMPLEX_SMALL"],["TRIPLEX","TRIPLEX"],["SCRIPT_SIMPLEX","SCRIPT_SIMPLEX"],["SCRIPT_COMPLEX","SCRIPT_COMPLEX"]]),"font"),this.appendValueInput("size").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendDummyInput().appendField(") "+external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_COLOR).appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"FIELDNAME"),this.appendValueInput("thick").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_THICKNESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_RECT_TOOLTIP)}},cv_face_classifier={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_CLASSIFIER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},cv_face_detect={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("FACE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_DETECT),this.appendValueInput("SCALE").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_DETECT_SCALE),this.appendValueInput("NEIGHBOR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_DETECT_NEIGHBOR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},cv_face_detect_all={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("FACE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_DETECT),this.appendValueInput("SCALE").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_DETECT_SCALE),this.appendValueInput("NEIGHBOR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_DETECT_NEIGHBOR),this.appendValueInput("x1").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_DETECT_RANGE).appendField(external_Blockly_namespaceObject.Msg.blockpy_TUPLE_MIN),this.appendValueInput("y1").setCheck(Number).appendField("×"),this.appendValueInput("x2").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.blockpy_TUPLE_MAX),this.appendValueInput("y2").setCheck(Number).appendField("×"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},DATA_HUE=170,series_create={init:function(){this.setColour(DATA_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_series_create).appendField(new external_Blockly_namespaceObject.FieldTextInput("ser1"),"VAR"),this.appendValueInput("SER").appendField(external_Blockly_namespaceObject.Msg.blockpy_series_via),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.blockpy_series_create_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},series_create_from_index={init:function(){this.setColour(DATA_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_series_create).appendField(new external_Blockly_namespaceObject.FieldTextInput("ser1"),"VAR"),this.appendValueInput("SER").appendField(external_Blockly_namespaceObject.Msg.blockpy_series_via),this.appendValueInput("INDEX").setCheck([String,"List"]).appendField(external_Blockly_namespaceObject.Msg.blockpy_series_set_index),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.blockpy_series_create_index_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},dataframe_create={init:function(){this.setColour(DATA_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_dataframe_create).appendField(new external_Blockly_namespaceObject.FieldTextInput("df1"),"VAR"),this.appendValueInput("SER").appendField(external_Blockly_namespaceObject.Msg.blockpy_series_via),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.blockpy_dataframe_create_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},dataframe_create_from_one_index={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.DATAFRAME_RAW,"index"],[external_Blockly_namespaceObject.Msg.DATAFRAME_COLUMN,"columns"]];this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_dataframe_create).appendField(new external_Blockly_namespaceObject.FieldTextInput("df1"),"VAR"),this.appendValueInput("SER").appendField(external_Blockly_namespaceObject.Msg.blockpy_series_via),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"COLUMN_RAW"),this.appendValueInput("INDEX").setCheck([String,"List"]).appendField(external_Blockly_namespaceObject.Msg.blockpy_series_set_index),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.blockpy_dataframe_create_index_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},dataframe_create_from_index={init:function(){this.setColour(DATA_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_dataframe_create).appendField(new external_Blockly_namespaceObject.FieldTextInput("df1"),"VAR"),this.appendValueInput("SER").appendField(external_Blockly_namespaceObject.Msg.blockpy_series_via),this.appendValueInput("INDEX_COLUMN").setCheck([String,"List"]).appendField(external_Blockly_namespaceObject.Msg.blockpy_dataframe_set_index_column),this.appendValueInput("INDEX_RAW").setCheck([String,"List"]).appendField(external_Blockly_namespaceObject.Msg.blockpy_dataframe_set_index_raw),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.blockpy_dataframe_create_index_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},series_create_from_text={init:function(){this.setColour(DATA_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldTextInput("ser1"),"VAR").appendField(" = [").appendField(new external_Blockly_namespaceObject.FieldTextInput("1,2,3"),"TEXT").appendField("]"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_SERIES_CREATE_FROM_TEXT)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},series_index_value={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.SERIES_INDEX,"index"],[external_Blockly_namespaceObject.Msg.HTML_VALUE,"value"]];this.appendValueInput("SERIES").setCheck("Series"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.SERIES_INDEX_VALUE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"INDEX_VALUE"),this.setOutput(!0,"List");var t=this;this.setTooltip((function(){var e=t.getFieldValue("INDEX_VALUE");return{index:external_Blockly_namespaceObject.Msg.SERIES_INDEX_TOOLTIP,value:external_Blockly_namespaceObject.Msg.HTML_VALUE_TOOLTIP}[e]}))}},series_get_num={init:function(){this.setColour(DATA_HUE),this.setOutput(!0),this.appendValueInput("SER").setCheck("Series"),this.appendValueInput("AT").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.LANG_LISTS_GET_INDEX1),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.LANG_LISTS_GET_INDEX2),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.TUPLE_GET_INDEX_TOOLTIP)}},pl_plot_easy={init:function(){this.setColour(DATA_HUE),this.appendValueInput("SER").setCheck("Series").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl_plot={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],t=[[external_Blockly_namespaceObject.Msg.COLOUR_RGB_BLUE,"b"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_GREEN,"g"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_RED,"r"],[external_Blockly_namespaceObject.Msg.COLOUR_CYAN,"c"],[external_Blockly_namespaceObject.Msg.COLOUR_MAGENTA,"m"],[external_Blockly_namespaceObject.Msg.COLOUR_YELLOW,"y"],[external_Blockly_namespaceObject.Msg.COLOUR_BLACK,"k"],[external_Blockly_namespaceObject.Msg.COLOUR_WHITE,"w"]],n=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("SER").setCheck("Series").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new external_Blockly_namespaceObject.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl_show={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl_axes={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl_legend={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl_title={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl_label={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_X,"x"],[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_SET_LABEL).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.appendValueInput("LABEL").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},array_create={init:function(){this.setColour(DATA_HUE),this.appendValueInput("FROM").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_SPLITBYDOU).appendField(external_Blockly_namespaceObject.Msg.MIXPY_DATA_ARRAY_CREATE_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXPY_DATA_ARRAY_CREATE_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},pl_plot_bar={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_DISPLAY_DRAW).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{plot:external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[e]}))}},pl_plot_scatter={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.COLOUR_RGB_BLUE,"b"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_GREEN,"g"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_RED,"r"],[external_Blockly_namespaceObject.Msg.COLOUR_CYAN,"c"],[external_Blockly_namespaceObject.Msg.COLOUR_MAGENTA,"m"],[external_Blockly_namespaceObject.Msg.COLOUR_YELLOW,"y"],[external_Blockly_namespaceObject.Msg.COLOUR_BLACK,"k"],[external_Blockly_namespaceObject.Msg.COLOUR_WHITE,"w"]],t=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_SCATTER).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"DOT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},pl_plot_xy={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],t=[[external_Blockly_namespaceObject.Msg.COLOUR_RGB_BLUE,"b"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_GREEN,"g"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_RED,"r"],[external_Blockly_namespaceObject.Msg.COLOUR_CYAN,"c"],[external_Blockly_namespaceObject.Msg.COLOUR_MAGENTA,"m"],[external_Blockly_namespaceObject.Msg.COLOUR_YELLOW,"y"],[external_Blockly_namespaceObject.Msg.COLOUR_BLACK,"k"],[external_Blockly_namespaceObject.Msg.COLOUR_WHITE,"w"]],n=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new external_Blockly_namespaceObject.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},pl_bar={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[external_Blockly_namespaceObject.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_BAR).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"ALIGN"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},pl_pie={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[external_Blockly_namespaceObject.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],t=[[external_Blockly_namespaceObject.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE).appendField(external_Blockly_namespaceObject.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"autopct"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},pl_hist={init:function(){this.setColour(DATA_HUE),this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_HIST).appendField(external_Blockly_namespaceObject.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl_ticks={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_X,"x"],[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_SETTING).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},numpy_trig={init:function(){var e=[["sin","sin"],["cos","cos"],["tan","tan"],["arcsin","arcsin"],["arccos","arccos"],["arctan","arctan"],[external_Blockly_namespaceObject.Msg.LANG_MATH_TO_ROUND,"round"],[external_Blockly_namespaceObject.Msg.LANG_MATH_TO_CEIL,"ceil"],[external_Blockly_namespaceObject.Msg.LANG_MATH_TO_FLOOR,"floor"]];this.setColour(DATA_HUE),this.setOutput(!0),this.setInputsInline(!0),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.mixpy_NUMPY_TRIG),this.appendValueInput("NUM").setCheck(Number).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP"),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_NUMPY_TRIG_TOOLTIP)}},pl_subplot={init:function(){this.setColour(DATA_HUE),this.appendValueInput("VET").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},pandas_readcsv={init:function(){this.setColour(DATA_HUE),this.appendValueInput("FILENAME").appendField(external_Blockly_namespaceObject.Msg.MIXPY_PANDAS_READ_CSV),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.mixpy_PANDAS_READCSV_HEADER_Y,"0"],[external_Blockly_namespaceObject.Msg.mixpy_PANDAS_READCSV_HEADER_N,"None"]]),"MODE"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.mixpy_PANDAS_READCSV_TITLE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PANDAS_READCSV_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},dataframe_get={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.mixpy_DATAFRAME_GET),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_DATAFRAME_GET_INDEX).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.DATAFRAME_COLUMN,"column"],[external_Blockly_namespaceObject.Msg.DATAFRAME_RAW,"raw"]]),"MODE"),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_DATAFRAME_GET_TOOLTIP)}},pl_savefig={init:function(){this.setColour(DATA_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},pl_text={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.TEXT_TRIM_LEFT,"right"],[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_CENTER,"center"],[external_Blockly_namespaceObject.Msg.TEXT_TRIM_RIGHT,"left"]],t=[[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_TOP,"bottom"],[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_CENTER,"center"],[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_SETTING).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_HOR).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"HALIGN"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_VER).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_TOOLTIP)}},array_toarray={init:function(){this.setColour(DATA_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TOARRAY),this.setOutput(!0,"List"),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TOOLTIP_TOARRAY)}},plot_plot_easy={init:function(){this.setColour(DATA_HUE),this.appendValueInput("SER").setCheck("Series").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_plot={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],t=[[external_Blockly_namespaceObject.Msg.COLOUR_RGB_BLUE,"b"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_GREEN,"g"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_RED,"r"],[external_Blockly_namespaceObject.Msg.COLOUR_CYAN,"c"],[external_Blockly_namespaceObject.Msg.COLOUR_MAGENTA,"m"],[external_Blockly_namespaceObject.Msg.COLOUR_YELLOW,"y"],[external_Blockly_namespaceObject.Msg.COLOUR_BLACK,"k"],[external_Blockly_namespaceObject.Msg.COLOUR_WHITE,"w"]],n=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("SER").setCheck("Series").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new external_Blockly_namespaceObject.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_show={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_axes={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_legend={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_title={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_label={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_X,"x"],[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_SET_LABEL).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.appendValueInput("LABEL").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_plot_bar={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_DISPLAY_DRAW).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{plot:external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[e]}))}},plot_plot_scatter={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.COLOUR_RGB_BLUE,"b"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_GREEN,"g"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_RED,"r"],[external_Blockly_namespaceObject.Msg.COLOUR_CYAN,"c"],[external_Blockly_namespaceObject.Msg.COLOUR_MAGENTA,"m"],[external_Blockly_namespaceObject.Msg.COLOUR_YELLOW,"y"],[external_Blockly_namespaceObject.Msg.COLOUR_BLACK,"k"],[external_Blockly_namespaceObject.Msg.COLOUR_WHITE,"w"]],t=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_SCATTER).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"DOT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},plot_plot_xy={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],t=[[external_Blockly_namespaceObject.Msg.COLOUR_RGB_BLUE,"b"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_GREEN,"g"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_RED,"r"],[external_Blockly_namespaceObject.Msg.COLOUR_CYAN,"c"],[external_Blockly_namespaceObject.Msg.COLOUR_MAGENTA,"m"],[external_Blockly_namespaceObject.Msg.COLOUR_YELLOW,"y"],[external_Blockly_namespaceObject.Msg.COLOUR_BLACK,"k"],[external_Blockly_namespaceObject.Msg.COLOUR_WHITE,"w"]],n=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new external_Blockly_namespaceObject.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},plot_bar={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[external_Blockly_namespaceObject.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_BAR).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"ALIGN"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},plot_pie={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[external_Blockly_namespaceObject.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],t=[[external_Blockly_namespaceObject.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE).appendField(external_Blockly_namespaceObject.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"autopct"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},plot_hist={init:function(){this.setColour(DATA_HUE),this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_HIST).appendField(external_Blockly_namespaceObject.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_ticks={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_X,"x"],[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_SETTING).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},plot_subplot={init:function(){this.setColour(DATA_HUE),this.appendValueInput("VET").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},plot_savefig={init:function(){this.setColour(DATA_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},plot_text={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.TEXT_TRIM_LEFT,"right"],[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_CENTER,"center"],[external_Blockly_namespaceObject.Msg.TEXT_TRIM_RIGHT,"left"]],t=[[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_TOP,"bottom"],[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_CENTER,"center"],[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_SETTING).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_HOR).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"HALIGN"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_VER).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_TOOLTIP)}},numpy_shape={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取维度"),this.setOutput(!0),this.setTooltip("Returns the shape of the array.")}},numpy_reshape={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("变形"),this.appendValueInput("DIMENSIONS").appendField("后维度为"),this.setOutput(!0),this.setTooltip("Reshapes the array to the specified dimensions.")}},numpy_astype={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("把"),this.appendDummyInput().appendField("转换为").appendField(new external_Blockly_namespaceObject.FieldDropdown([["uint8","numpy.uint8"],["int32","numpy.int32"],["float32","numpy.float32"],["float64","numpy.float64"]]),"TYPE"),this.setOutput(!0),this.setTooltip("Converts array to specified type.")}},pylab_imshow={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("创建二维图"),this.appendDummyInput().appendField("颜色").appendField(new external_Blockly_namespaceObject.FieldDropdown([["gray","gray"],["viridis","viridis"],["plasma","plasma"],["inferno","inferno"],["magma","magma"],["cividis","cividis"],["hot","hot"],["cool","cool"],["spring","spring"],["summer","summer"],["autumn","autumn"],["winter","winter"],["jet","jet"]]),"COLORMAP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("Displays an image with the specified colormap.")}},numpy_mean_digit={init:function(){this.setColour(DATA_HUE),this.appendValueInput("X").appendField("从数据集"),this.appendValueInput("Y").appendField("获取平均图像,标签"),this.appendValueInput("DIGIT").appendField("为"),this.setOutput(!0),this.setTooltip("Computes the mean of X where y equals the specified digit.")}},numpy_argmin_template_match={init:function(){this.setColour(DATA_HUE),this.appendValueInput("IMAGE").appendField("获取模板匹配结果,图片:"),this.appendValueInput("TEMPLATES").appendField("模板:"),this.setOutput(!0),this.setTooltip("Finds the index of the template that minimizes the sum of absolute differences with the image.")}},numpy_mean={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取平均值"),this.appendDummyInput().appendField("沿着axis").appendField(new external_Blockly_namespaceObject.FieldDropdown([["None","NONE"],["0","0"],["1","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Computes the mean of the array along the specified axis.")}},numpy_std={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取标准差"),this.appendDummyInput().appendField("沿着axis").appendField(new external_Blockly_namespaceObject.FieldDropdown([["None","NONE"],["0","0"],["1","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Computes the standard deviation of the array along the specified axis.")}},pandas_dropna={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DF").appendField("丢弃缺省值"),this.setOutput(!0),this.setTooltip("Drops rows with NaN values from the dataframe.")}},pandas_drop_columns={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DATAFRAME").appendField("从数据集"),this.appendValueInput("COLUMNS").appendField("中删除列").setCheck(String),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("从数据框中删除指定的列。用逗号分隔多个列名。")}},numpy_ones={init:function(){this.setColour(DATA_HUE),this.appendValueInput("NUM").appendField("生成单位行向量"),this.setOutput(!0),this.setTooltip("Creates an array of ones with the specified length.")}},numpy_c_={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY1").appendField("列拼接:数组1"),this.appendValueInput("ARRAY2").appendField("数组2"),this.setOutput(!0),this.setTooltip("Concatenates two arrays along the second axis using numpy.c_.")}},numpy_linalg_det={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取行列式"),this.setOutput(!0),this.setTooltip("Computes the determinant of an array using numpy.linalg.det.")}},matrix_transpose={init:function(){this.setColour(DATA_HUE),this.appendValueInput("MATRIX").appendField("获取转置"),this.setOutput(!0),this.setTooltip("Computes the transpose of the given matrix.")}},matrix_multiplication={init:function(){this.setColour(DATA_HUE),this.appendValueInput("MATRIX1"),this.appendValueInput("MATRIX2").appendField("@"),this.setOutput(!0),this.setTooltip("Multiplies two matrices.")}},numpy_linalg_inv={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取逆矩阵"),this.setOutput(!0),this.setTooltip("Computes the inverse of the given matrix using numpy.linalg.inv.")}},dataframe_median={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DATAFRAME").appendField("获取中位数"),this.setOutput(!0),this.setTooltip("Computes the median of the given dataframe.")}},dataframe_fillna={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DATAFRAME").appendField("填充缺失值"),this.appendValueInput("VALUE").appendField("填充值"),this.appendDummyInput().appendField("是否修改原数据").appendField(new external_Blockly_namespaceObject.FieldDropdown([["True","True"],["False","False"]]),"INPLACE"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("Fills NaN values in the dataframe with the specified value.")}},dataframe_info={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DATAFRAME").appendField("获取DataFrame信息"),this.setOutput(!0),this.setTooltip("Displays information about the DataFrame.")}},numpy_min={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取最小值"),this.appendDummyInput().appendField("沿着axis").appendField(new external_Blockly_namespaceObject.FieldDropdown([["None","None"],["行","0"],["列","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Returns the minimum value along the specified axis.")}},numpy_max={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取最大值"),this.appendDummyInput().appendField("沿着axis").appendField(new external_Blockly_namespaceObject.FieldDropdown([["None","None"],["行","0"],["列","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Returns the maximum value along the specified axis.")}},numpy_size={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取数组大小"),this.setOutput(!0),this.setTooltip("Returns the size of the array.")}},numpy_dot={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY1").appendField("点乘数组1"),this.appendValueInput("ARRAY2").appendField("点乘数组2"),this.setOutput(!0),this.setTooltip("Returns the dot product of two arrays.")}},numpy_square={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取平方数组"),this.setOutput(!0),this.setTooltip("Returns the element-wise square of the array.")}},numpy_sum={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取数组元素和"),this.setOutput(!0),this.setTooltip("Returns the sum of the array.")}},numpy_random_random={init:function(){this.setColour(DATA_HUE),this.appendValueInput("SIZE").appendField("生成随机数组"),this.setOutput(!0),this.setTooltip("Returns a random array of the specified size.")}},py_sum={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("Python求和"),this.setOutput(!0),this.setTooltip("Returns the sum of the iterable.")}},dataframe_sort_values={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DICT").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).setCheck("Dict"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("值排序"),this.appendValueInput("KEY").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("标签"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("排序方式").appendField(new external_Blockly_namespaceObject.FieldDropdown([["升序","True"],["降序","False"]]),"AS_CENDING"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},dataframe_head_tail={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DICT").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).setCheck("Dict"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("获取").appendField(new external_Blockly_namespaceObject.FieldDropdown([["前几行","head"],["最后几行","tail"]]),"TYPE"),this.appendValueInput("LINES").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("行数"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},dataframe_select={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DICT").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).setCheck("Dict"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("筛选数据"),this.appendValueInput("KEY").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("满足条件"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},dataframe_groupby={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DICT").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).setCheck("Dict"),this.appendValueInput("KEY").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("通过标签"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("分组"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},dataframe_aggregate_func={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(new external_Blockly_namespaceObject.FieldDropdown([["求最小值","min"],["求最大值","max"],["求和","sum"],["求平均值","mean"],["求中位数","median"],["求标准差","std"]]),"TYPE"),this.appendValueInput("DICT").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).setCheck("Dict"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},plot_cla={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField("清除已有图像"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},DS_HUE=80,ds_create_linkedlist={init:function(){this.setColour(DS_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldLabel(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_NEW)),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldLabel(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_HEAD)).appendField(new external_Blockly_namespaceObject.FieldTextInput("head"),"VAR"),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldLabel(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_TYPE)).appendField(new external_Blockly_namespaceObject.FieldTextInput("tag"),"TYPE"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_ATTRIBUTE),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["ds_create_linkedlist_item"],this)),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("ds_create_linkedlist_container");t.initSvg();for(var n=t.getInput("STACK").connection,a=0;at?e[t]:"name"),"KEY"+t).appendField("=")},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},ds_create_linkedlist_container={init:function(){this.setColour(DS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_CONTAINER_TITLE),this.appendStatementInput("STACK"),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_CONTAINER_TOOLTIP),this.contextMenu=!1}},ds_create_linkedlist_item={init:function(){this.setColour(DS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_ITEM_TOOLTIP),this.contextMenu=!1}},ds_create_node={init:function(){this.setColour(DS_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_CREATE_NODE_USE).appendField(new external_Blockly_namespaceObject.FieldTextInput("tag"),"TYPE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_CREATE_NODE_NEW),this.appendValueInput("NODE"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_CREATE_NODE_TOOLTIP)}},ds_get_node_attr={init:function(){this.setColour(DS_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_GET_NODE_ATTR_NODE),this.appendValueInput("NODE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).appendField(new external_Blockly_namespaceObject.FieldTextInput("name"),"TYPE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_GET_NODE_ATTR_TOOLTIP)}},ds_set_node_attr={init:function(){this.setColour(DS_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_SET_NODE_ATTR_NODE),this.appendValueInput("NODE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).appendField(new external_Blockly_namespaceObject.FieldTextInput("name"),"TYPE"),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.DS_SET_NODE_ATTR_SET),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_SET_NODE_ATTR_TOOLTIP)}},ds_add_node_by_name={init:function(){this.setColour(DS_HUE),this.appendValueInput("NODE").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_HEAD_NODE);var e=[[external_Blockly_namespaceObject.Msg.DS_ADD_NODE_BEFORE,"before"],[external_Blockly_namespaceObject.Msg.DS_ADD_NODE_AFTER,"after"]];this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_LINKEDLIST),this.appendValueInput("NODE2").appendField(external_Blockly_namespaceObject.Msg.DS_SET_NODE_ATTR_NODE),this.appendValueInput("NODE3").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_TOOLTIP)}},ds_add_node_by_attr={init:function(){this.setColour(DS_HUE),this.appendValueInput("NODE").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_HEAD_NODE);var e=[[external_Blockly_namespaceObject.Msg.DS_ADD_NODE_BEFORE,"before"],[external_Blockly_namespaceObject.Msg.DS_ADD_NODE_AFTER,"after"]];this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_LINKEDLIST),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_ITEM_TITLE).appendField(new external_Blockly_namespaceObject.FieldTextInput("name"),"TYPE"),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AS),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_ATTR),this.appendValueInput("NODE3").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_TOOLTIP)}},ds_del_node_by_name={init:function(){this.setColour(DS_HUE),this.appendValueInput("NODE").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_HEAD_NODE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_LINKEDLIST),this.appendValueInput("NODE2").appendField(external_Blockly_namespaceObject.Msg.DS_DEL_NODE_NAME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_DEL_NODE_TOOLTIP)}},ds_del_node_by_attr={init:function(){this.setColour(DS_HUE),this.appendValueInput("NODE").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_HEAD_NODE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_LINKEDLIST),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_DEL_NODE_ATTR).appendField(new external_Blockly_namespaceObject.FieldTextInput("name"),"TYPE"),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AS),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_ATTR),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_DEL_NODE_TOOLTIP)}},ds_reverse_linkedlist={init:function(){this.setColour(DS_HUE),this.appendValueInput("NODE").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_HEAD_NODE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_REVERSE_LINKEDLIST),this.appendValueInput("NODE2").appendField(external_Blockly_namespaceObject.Msg.DS_REVERSE_LINKEDLIST_NEW_HEAD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_DEL_NODE_TOOLTIP)}},FACTORY_HUE="#777777",factory_from_import={init:function(){this.setColour(FACTORY_HUE),this.appendDummyInput("").appendField("from ").appendField(new external_Blockly_namespaceObject.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new external_Blockly_namespaceObject.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},factory_import={init:function(){this.setColour(FACTORY_HUE),this.appendDummyInput("").appendField("import ").appendField(new external_Blockly_namespaceObject.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},factory_function_noreturn={init:function(){this.setColour(FACTORY_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var e=document.createElement("mutation");e.setAttribute("items",this.itemCount_);for(var t=0;tt?e[t]:'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},iot_publish_container={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},iot_publish_item={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},iot_create_with_item={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},iot_mixio_connect={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_SERVER).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_WIFI_USERNAME).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_IOT_PASSWORD).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_PROJECT).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},IOT_MIXIO_PUBLISH={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(external_Blockly_namespaceObject.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},IOT_MIXIO_SUBSCRIBE={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_SUBSCRIBE+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_MSG).appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},IOT_MIXIO_UNSUBSCRIBE={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(external_Blockly_namespaceObject.Msg.MSG.stop+external_Blockly_namespaceObject.Msg.MIXLY_EMQX_SUBSCRIBE).appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},iot_mixio_disconnect={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iot_mixio_connect_only={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iot_mixio_check={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iot_mixio_format_topic={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(external_Blockly_namespaceObject.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},iot_mixio_format_msg={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},IOT_FORMATTING={init:function(){this.setColour(IOT_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},IOT_FORMAT_STRING={init:function(){this.setColour(IOT_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},IOT_EMQX_PING={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},IOT_MIXIO_NTP={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO").appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(external_Blockly_namespaceObject.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_SERVER).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.CONTROLS_FOR_INPUT_WITH+external_Blockly_namespaceObject.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_SERVER).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iot_mixly_key_py={init:function(){this.VISITOR_ID=external_Mixly_namespaceObject.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(IOT_HUE),this.appendDummyInput("").appendField(this.newQuote_(!0)).appendField(new external_Blockly_namespaceObject.FieldTextInput(this.visitorId),"VISITOR_ID").appendField(this.newQuote_(!1)),this.setOutput(!0,null)},onchange:function(){const e=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==e&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")},newQuote_:function(e){if(e==this.RTL)var t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAqUlEQVQI1z3KvUpCcRiA8ef9E4JNHhI0aFEacm1o0BsI0Slx8wa8gLauoDnoBhq7DcfWhggONDmJJgqCPA7neJ7p934EOOKOnM8Q7PDElo/4x4lFb2DmuUjcUzS3URnGib9qaPNbuXvBO3sGPHJDRG6fGVdMSeWDP2q99FQdFrz26Gu5Tq7dFMzUvbXy8KXeAj57cOklgA+u1B5AoslLtGIHQMaCVnwDnADZIFIrXsoXrgAAAABJRU5ErkJggg==";else t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAn0lEQVQI1z3OMa5BURSF4f/cQhAKjUQhuQmFNwGJEUi0RKN5rU7FHKhpjEH3TEMtkdBSCY1EIv8r7nFX9e29V7EBAOvu7RPjwmWGH/VuF8CyN9/OAdvqIXYLvtRaNjx9mMTDyo+NjAN1HNcl9ZQ5oQMM3dgDUqDo1l8DzvwmtZN7mnD+PkmLa+4mhrxVA9fRowBWmVBhFy5gYEjKMfz9AylsaRRgGzvZAAAAAElFTkSuQmCC";return new external_Blockly_namespaceObject.FieldImage(t,12,12,'"')}},iot_mixly_key={init:function(){this.VISITOR_ID=external_Mixly_namespaceObject.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(IOT_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const e=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==e&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},iot_client_onboard={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO").appendField(external_Blockly_namespaceObject.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},iot_http_client={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("HTTP"+external_Blockly_namespaceObject.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(external_Blockly_namespaceObject.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_REQUESTS_GET).appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET_CURRENT_TIME).appendField(external_Blockly_namespaceObject.Msg.MIXLY_OPEN_DEBUG).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iot_http_data={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("HTTP"+external_Blockly_namespaceObject.Msg.MIXLY_Client).appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_REQUESTS_LEN,"client_len"],[external_Blockly_namespaceObject.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[external_Blockly_namespaceObject.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},iot_mqtt_client={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MQTT"+external_Blockly_namespaceObject.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(external_Blockly_namespaceObject.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_INIT_SUBSCRIBE).appendField(external_Blockly_namespaceObject.MQTT_Topic).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(external_Blockly_namespaceObject.Msg.MIXLY_OPEN_DEBUG).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iot_mqtt_data={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MQTT"+external_Blockly_namespaceObject.Msg.MIXLY_Client).appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_REQUESTS_LEN,"client_len"],[external_Blockly_namespaceObject.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[external_Blockly_namespaceObject.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},iot_onenetconnect=iot_onenet_connect,iot_onenetdisconnect=iot_onenet_disconnect,iot_checkonenet=iot_onenet_check,iot_publish=iot_onenet_publish,PINS_HUE=230,pins_digital_write={init:function(){this.setColour(PINS_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(external_Mixly_namespaceObject.Profile.default.digital_write),"PIN"),this.setOutput(!0)}},pins_digital_read={init:function(){this.setColour(PINS_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(external_Mixly_namespaceObject.Profile.default.digital_read),"PIN"),this.setOutput(!0)}},pins_analog_write={init:function(){this.setColour(PINS_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(external_Mixly_namespaceObject.Profile.default.analog_write),"PIN"),this.setOutput(!0)}},pins_analog_read={init:function(){this.setColour(PINS_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(external_Mixly_namespaceObject.Profile.default.analog_read),"PIN"),this.setOutput(!0)}},SERIAL_HUE=40,serial_open={init:function(){this.setColour(SERIAL_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldLabel(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_OPEN)).appendField(new external_Blockly_namespaceObject.FieldTextInput("ser"),"SER"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_SERIAL_BEGIN).appendField(new external_Blockly_namespaceObject.FieldDropdown([["115200","115200"],["256000","256000"],["128000","128000"],["57600","57600"],["56000","56000"],["43000","43000"],["38400","38400"],["28800","28800"],["19200","19200"],["9600","9600"],["4800","4800"],["2400","2400"],["1200","1200"],["600","600"],["300","300"],["110","110"]]),"BPS"),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_OPEN_TIMEOUT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_OPEN_TOOLTIP)}},serial_write={init:function(){this.setColour(SERIAL_HUE),this.appendValueInput("SER"),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_WRITE_TOOLTIP)}},serial_read_b={init:function(){this.setColour(SERIAL_HUE),this.appendValueInput("SER"),this.appendValueInput("VAR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_READ),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_READ_TOOLTIP)}},serial_close={init:function(){this.setColour(SERIAL_HUE),this.appendValueInput("SER"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_CLOSE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_CLOSE_TOOLTIP)}},SKLEARN_HUE=80,sklearn_make_classification={init:function(){this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.SKLEARN_CLASSIFICATION_GENERATION),this.appendValueInput("n_samples").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_SAMPLES),this.appendValueInput("n_features").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_FEATURES),this.appendValueInput("n_informative").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_EFFECTIVE_FEATURES),this.appendValueInput("n_redundant").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_REDUNDANT_FEATURES),this.appendValueInput("n_repeated").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_REPEATED_FEATURES),this.appendValueInput("n_classes").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_CLASSES),this.appendValueInput("n_clusters_per_class").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_CLUSTERS_PER_CLASSES),this.appendValueInput("random_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_make_regression={init:function(){this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.SKLEARN_REGRESSION_GENERATION),this.appendValueInput("n_samples").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_SAMPLES),this.appendValueInput("n_features").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_FEATURES),this.appendValueInput("n_informative").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_EFFECTIVE_FEATURES),this.appendValueInput("n_targets").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_LABELS),this.appendValueInput("bias").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.DEVIATION),this.appendValueInput("noise").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NOISE),this.appendValueInput("random_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_make_blobs={init:function(){this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.SKLEARN_CLUSTERING_GENERATION),this.appendValueInput("n_samples").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_SAMPLES),this.appendValueInput("n_features").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_FEATURES),this.appendValueInput("centers").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_CLUSTERS),this.appendValueInput("cluster_std").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.STANDARD_DEVIATION_OF_CLUSTER),this.appendValueInput("center_box").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.CLUSTER_BOUNDING_BOX),this.appendValueInput("shuffle").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SHUFFLE_SAMPLES),this.appendValueInput("random_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_load={init:function(){var e=[[external_Blockly_namespaceObject.Msg.SKLEARN_LOAD_IRIS,"load_iris"],[external_Blockly_namespaceObject.Msg.SKLEARN_LOAD_BOSTON,"load_boston"],[external_Blockly_namespaceObject.Msg.SKLEARN_LOAD_DIABETES,"load_diabetes"],[external_Blockly_namespaceObject.Msg.SKLEARN_LOAD_BREAST_CANCER,"load_breast_cancer"],[external_Blockly_namespaceObject.Msg.SKLEARN_LOAD_LINNERUD,"load_linnerud"],[external_Blockly_namespaceObject.Msg.SKLEARN_LOAD_DIGITS,"load_digits"]];this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.LOAD).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"type").appendField(new external_Blockly_namespaceObject.FieldTextInput("iris"),"name"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")},getVars:function(){return[this.getFieldValue("name")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("name"))&&this.setTitleValue(t,"name")}},sklearn_data_target={init:function(){this.appendValueInput("name").setCheck(null).appendField("sklearn "+external_Blockly_namespaceObject.Msg.DATA_SET),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.EIGENVALUES,"data"],[external_Blockly_namespaceObject.Msg.LABEL_VALUE,"target"],[external_Blockly_namespaceObject.Msg.FEATURE,"feature_names"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG,"target_names"]]),"type"),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_train_test_split={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.DATA_SEGMENTATION),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.appendValueInput("train_target").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LABEL_VALUE),this.appendValueInput("test_size").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.TEST_SET_PROPORTION),this.appendValueInput("rondom_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_train_test_split_no_target={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.DATA_SEGMENTATION),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.appendValueInput("test_size").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.TEST_SET_PROPORTION),this.appendValueInput("rondom_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_LinearRegression={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_LINEARREGRESSION_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("fit_intercept").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_CALCULATE_MODEL_INTERRUPT),this.appendValueInput("normalize").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_REGRESSION_NORMIALIZATION),this.appendValueInput("n_jobs").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_THREADS),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_Ridge={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_RIDGE_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("alpha").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_REGULA_INTENSITY),this.appendValueInput("fit_intercept").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_CALCULATE_MODEL_INTERRUPT),this.appendValueInput("normalize").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_REGRESSION_NORMIALIZATION),this.appendValueInput("max_iter").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_MAX_ITER),this.appendValueInput("random_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_DecisionTreeClassifier_Regressor={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_DECISIONTREE_INIT).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.SKLEARN_CLASSIFICATION_ALGORITHM,"DecisionTreeClassifier"],[external_Blockly_namespaceObject.Msg.SKLEARN_REGRESSION_ALGORITHM,"DecisionTreeRegressor"]]),"type"),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("max_depth").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_MAXIMUM_TREE_DEPTH),this.appendValueInput("random_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_RandomForestClassifier_Regressor={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_RANDOMFOREST_INIT).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.SKLEARN_CLASSIFICATION_ALGORITHM,"RandomForestClassifier"],[external_Blockly_namespaceObject.Msg.SKLEARN_REGRESSION_ALGORITHM,"RandomForestRegressor"]]),"type"),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("n_estimators").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_TREES),this.appendValueInput("max_depth").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_MAXIMUM_TREE_DEPTH),this.appendValueInput("n_jobs").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_THREADS),this.appendValueInput("random_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_KNeighborsClassifier_Regressor={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_KNN_INIT).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.SKLEARN_CLASSIFICATION_ALGORITHM,"KNeighborsClassifier"],[external_Blockly_namespaceObject.Msg.SKLEARN_REGRESSION_ALGORITHM,"KNeighborsRegressor"]]),"type"),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("K").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("K"),this.appendValueInput("n_jobs").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_THREADS),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_GaussianNB={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_GAUSSINNB_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_pca={init:function(){this.appendDummyInput().appendField("sklearn 初始化 PCA 算法"),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("n_components").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_PCA_N_COMPONENTS),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_pca_fit_transform={init:function(){this.appendDummyInput().appendField("sklearn PCA 降维"),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_KMeans={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_KMEANS_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("n_clusters").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_CLUSTERS_JUST),this.appendValueInput("max_iter").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_MAX_ITER),this.appendValueInput("random_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_KMeans_fit={init:function(){this.appendDummyInput().appendField("sklearn K-均值聚类"),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_fit={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.TRAINING_MODEL),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.appendValueInput("train_target").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LABEL_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_fit_no_target={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.TRAINING_MODEL),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_predict={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.MODEL_PRODICTION),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_score={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.CALCULATE_THE_SCORE),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.appendValueInput("train_target").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LABEL_VALUE),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_score_no_target={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.CALCULATE_THE_SCORE),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_coef_intercept={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_GENERALIZED_LINEAR_REGRESSION),this.appendValueInput("model_name").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).setCheck(null).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.SKLEARN_COEF,"coef_"],[external_Blockly_namespaceObject.Msg.SKLEARN_INTERCEPT,"intercept_"]]),"type"),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_cluster_centers_labels_inertia={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_CLUSTERING),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.SKLEARN_CLUSTER_CENTER,"cluster_centers_"],[external_Blockly_namespaceObject.Msg.SKLEARN_LABELS_AFTER_CLUSTERING,"labels_"],[external_Blockly_namespaceObject.Msg.SKLEARN_CLUSTERING_SUM_OF_SQUARED_DISTANCES,"inertia_"]]),"type"),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_save_load_model={init:function(){this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("sklearn").appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.SKLEARN_SAVE_MODEL,"dump"],[external_Blockly_namespaceObject.Msg.SKLEARN_LOAD_MODEL,"load"]]),"type").appendField(" "+external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("address").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},SYSTEM_HUE=120,base_delay={init:function(){this.setColour(SYSTEM_HUE),this.appendValueInput("DELAY_TIME",Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_DELAY+"("+external_Blockly_namespaceObject.Msg.MIXLY_MILLIS+")").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_CONTROL_DELAY)}},system_controls_millis={init:function(){this.setColour(SYSTEM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_time_time),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_CONTROL_MILLIS)}},time_localtime={init:function(){this.setColour(SYSTEM_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_ALL,"all"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_YEAR,"0"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_MONTH,"1"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_DATE,"2"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_HOUR,"3"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_MINUTE,"4"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_SECOND,"5"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_INWEEK,"6"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_INYEAR,"7"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_DST,"8"]]),"op"),this.setOutput(!0),this.setInputsInline(!0)}},system_Panic_with_status_code={init:function(){this.setColour(SYSTEM_HUE),this.appendValueInput("STATUS_CODE",Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_Panic_with_status_code).setCheck(Number),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_CONTROL_DELAY)}},system_reset={init:function(){this.setColour(SYSTEM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_Reset_micro),this.setPreviousStatement(!0)}},controls_mstimer2={init:function(){this.setColour(SYSTEM_HUE),this.appendValueInput("TIME").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("MsTimer2").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MSTIMER2_EVERY),this.appendDummyInput().appendField("ms"),this.appendStatementInput("DO").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MSTIMER2_DO),this.setPreviousStatement(!0),this.setNextStatement(!0)}},controls_mstimer2_start={init:function(){this.setColour(SYSTEM_HUE),this.appendDummyInput().appendField("MsTimer2").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MSTIMER2_START),this.setPreviousStatement(!0),this.setNextStatement(!0)}},controls_mstimer2_stop={init:function(){this.setColour(SYSTEM_HUE),this.appendDummyInput().appendField("MsTimer2").appendField(external_Blockly_namespaceObject.Msg.MIXLY_STOP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},system_time_sleep={init:function(){this.setColour(SYSTEM_HUE),this.appendValueInput("DELAY_TIME",Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_DELAY).setCheck(Number),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_CONTROL_DELAY)}},TURTLE_HUE=180,turtle_create={init:function(){this.setColour(TURTLE_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_create).appendField(new external_Blockly_namespaceObject.FieldTextInput("tina"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.blockpy_turtle_create_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},turtle_done={init:function(){this.setColour(TURTLE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_TURTLE_DONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_exitonclick={init:function(){this.setColour(TURTLE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TURTLE_EXITONCLICK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_move={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.blockpy_forward,"forward"],[external_Blockly_namespaceObject.Msg.blockpy_backward,"backward"]];this.setColour(TURTLE_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_MOVE_BY).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_MOVE_BY_num),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))}},turtle_rotate={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.blockpy_left,"left"],[external_Blockly_namespaceObject.Msg.blockpy_right,"right"]];this.setColour(TURTLE_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_rotate).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{left:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_LEFT,right:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_RIGHT}[e]}))}},turtle_setheading={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.blockpy_setheading),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_setheading_degree),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_screen_delay={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_SCREEN_DELAY),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MILLIS),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_SCREEN_DELAY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_goto={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_goto),this.appendValueInput("val").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_goto_y),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_goto_position),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_setxy={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_X,"x"],[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_Y,"y"]];this.setColour(TURTLE_HUE),this.appendValueInput("VAR").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_SETXY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_SETXY_TOOLTIP)}},turtle_pos_shape={init:function(){this.setColour(TURTLE_HUE);var e=[[external_Blockly_namespaceObject.Msg.TURTLE_POS,"pos"],[external_Blockly_namespaceObject.Msg.TURTLE_SHAPE,"shape"],[external_Blockly_namespaceObject.Msg.TURTLE_HEADING,"heading"],[external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_WIDTH,"width"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_GET_SHAPESIZE,"shapesize"],[external_Blockly_namespaceObject.Msg.MIXLY_SPEED,"speed"]];this.appendValueInput("TUR").setCheck("Turtle"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.TURTLE_POS_SHAPE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR");var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{pos:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_POS,shape:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_SHAPE,heading:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_HEADING,width:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_WIDTH,speed:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_GET_SPEED,shapesize:external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_GET_SHAPESIZE_TOOLTIP}[e]})),this.setOutput(!0),this.setInputsInline(!0)}},turtle_clear={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.MIXLY_LCD_STAT_CLEAR,"clear"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_reset,"reset"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_home,"home"]];this.setColour(TURTLE_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))}},turtle_penup={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.blockpy_turtle_penup,"penup"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_pendown,"pendown"]];this.setColour(TURTLE_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{penup:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_PENUP,pendown:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_PENDOWN}[e]}))}},turtle_fill={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.blockpy_turtle_beginfill,"begin"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_endfill,"end"]];this.setColour(TURTLE_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{begin:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_BEGINFILL,end:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_ENDFILL}[e]}))}},turtle_size_speed={init:function(){this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldTextInput("tina"),"TUR");var e=[[external_Blockly_namespaceObject.Msg.blockpy_turtle_size,"pensize"],[external_Blockly_namespaceObject.Msg.MIXLY_SPEED,"speed"]];this.setColour(TURTLE_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_set).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_set_num),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{pensize:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_SIZE,speed:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_SPEED}[e]}))}},turtle_size={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_set_size),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_speed={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_set_speed),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_circle={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.blockpy_turtle_circle,"circle"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_dot,"dot"]];this.setColour(TURTLE_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_draw).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_radius),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{circle:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_CIRCLE,dot:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_DOT}[e]}))}},turtle_circle_advanced={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_radius),this.appendValueInput("data").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_angle),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_CIRCLE)}},turtle_visible={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.blockpy_turtle_hide,"hideturtle"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_show,"showturtle"]];this.setColour(TURTLE_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{hideturtle:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_HIDE,showturtle:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_SHOW}[e]}))}},turtle_bgcolor={init:function(){this.setColour(TURTLE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_bgcolor).appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_pencolor={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_pencolor).appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_fillcolor={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_fillcolor).appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_clone={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR").setCheck("Turtle"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.TURTLE_CLONE),this.setTooltip(external_Blockly_namespaceObject.Msg.TURTLE_CLONE_TOOLTIP),this.setOutput(!0)}},turtle_bgcolor_hex_new={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_bgcolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_pencolor_hex_new={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_pencolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_fillcolor_hex_new={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_fillcolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_color={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_pencolor).appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"FIELDNAME"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_fillcolor).appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"FIELDNAME2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_color_hex={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR1").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_pencolor),this.appendValueInput("VAR2").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_fillcolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_bgcolor_hex={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_bgcolor_hex),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_pencolor_hex={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_pencolor_hex),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_fillcolor_hex={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_fillcolor_hex),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_shape={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.blockpy_turtle_shape_arrow,"arrow"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_shape_turtle,"turtle"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_shape_circle,"circle"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_shape_square,"square"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_shape_triangle,"triangle"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_shape_classic,"classic"]];this.setColour(TURTLE_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_shape).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.TURTLE_SHAPE_TOOLTIP)}},turtle_shapesize={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_SHAPESIZE),this.appendValueInput("WID").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_SHAPESIZE_WID),this.appendValueInput("LEN").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_SHAPESIZE_LEN),this.appendValueInput("OUTLINE").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_SHAPESIZE_OUTLINE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_SHAPESIZE)}},turtle_numinput={init:function(){this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_NUMINPUT),this.setColour(TURTLE_HUE),this.appendValueInput("TITLE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_TITLE),this.appendValueInput("PROMPT").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_PROMPT),this.appendValueInput("DEFAULT").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("MIN").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MATH_ONLIST_OPERATOR_MIN),this.appendValueInput("MAX").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MATH_ONLIST_OPERATOR_MAX),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.TURTLE_NUMINPUT_TOOLTIP)}},turtle_textinput={init:function(){this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT),this.setColour(TURTLE_HUE),this.appendValueInput("TITLE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_TITLE),this.appendValueInput("PROMPT").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_PROMPT),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.TURTLE_TEXTINPUT_TOOLTIP)}},turtle_write={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_write),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.TURTLE_WRITE_TOOLTIP)}},turtle_write_format={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"]],t=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_LEFT,"left"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_RIGHT,"right"]],n=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_NORMAL,"normal"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_BOLD,"bold"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_ITALIC,"italic"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_BOLD_ITALIC,'bold","italic']];this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_write),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"MOVE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"ALIGN"),this.appendValueInput("FONTNAME").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NAME),this.appendValueInput("FONTNUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE).appendField(new external_Blockly_namespaceObject.FieldDropdown(n),"FONTTYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.TURTLE_WRITE_TOOLTIP)}},turtle_write_format_skulpt={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"]],t=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_LEFT,"left"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_RIGHT,"right"]],n=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_NORMAL,"normal"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_BOLD,"bold"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_ITALIC,"italic"]];this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_write),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"MOVE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"ALIGN"),this.appendValueInput("FONTNAME").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NAME),this.appendValueInput("FONTNUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE).appendField(new external_Blockly_namespaceObject.FieldDropdown(n),"FONTTYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.TURTLE_WRITE_TOOLTIP)}},turtle_color_seclet={init:function(){this.setColour(TURTLE_HUE),this.appendDummyInput("").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(new external_Blockly_namespaceObject.FieldColour("ff0000"),"COLOR"),this.setInputsInline(!0),this.setOutput(!0,String)}},turtle_getscreen={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR").setCheck("Turtle"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_GETSCREEN).appendField(new external_Blockly_namespaceObject.FieldTextInput("screen"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_GETSCREEN_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},turtle_onkey={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR"),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_EVENT_ONKEY),this.appendValueInput("callback").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_EVENT_ONKEY_TOOLTIP)}},turtle_onclick={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_EVENT_ONCLICK),this.appendValueInput("callback").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_EVENT_ONCLICK_TOOLTIP)}},turtle_ontimer={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR"),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_EVENT_ONTIMER),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_mSecond),this.appendValueInput("callback").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_EVENT_ONTIMER_TOOLTIP)}},turtle_listen={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_SCREEN_LISTEN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_screen_savefig={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR"),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_TURTLE_SAVEFIG_TOOLTIP)}},ai_AI_ChooseAndGet=function(e,t){var n=this.getFieldValue("TYPE");return t.definitions_.import_FileDialog="import FileDialog",["FileDialog."+n+"()",t.ORDER_ATOMIC]},ai_AI_client=function(e,t){var n=this.getFieldValue("CTYPE");return t.definitions_.import_aip="import aip",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+" = aip."+n+"("+t.valueToCode(this,"API_KEY",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"SECRET_KEY",t.ORDER_ATOMIC)+")\n"},ai_AI_Speech_synthesis=function(e,t){return t.definitions_.import_aip="import aip",[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".synthesis("+t.valueToCode(this,"STR",t.ORDER_ATOMIC)+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_Speech_asr=function(e,t){return t.definitions_.import_aip="import aip",[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".asr("+(t.valueToCode(this,"FILE",t.ORDER_ATOMIC)||'""')+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_ImageClassify=function(e,t){t.definitions_.import_aip="import aip";var n=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),a=t.valueToCode(this,"ADDR",t.ORDER_ATOMIC);return[n+"."+t.valueToCode(this,"FUNC",t.ORDER_ATOMIC)+"("+a+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_Face_match=function(e,t){return t.definitions_.import_aip="import aip",[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".match("+t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+","+t.valueToCode(this,"VAR2",t.ORDER_ATOMIC)+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_Ocr=function(e,t){t.definitions_.import_aip="import aip";var n=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),a=t.valueToCode(this,"ADDR",t.ORDER_ATOMIC);return[n+"."+t.valueToCode(this,"FUNC",t.ORDER_ATOMIC)+"("+a+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_Nlp=function(e,t){t.definitions_.import_aip="import aip";var n=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),a=t.valueToCode(this,"STR",t.ORDER_ATOMIC);return[n+"."+t.valueToCode(this,"FUNC",t.ORDER_ATOMIC)+"("+a+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_Nlp_Sim=function(e,t){t.definitions_.import_aip="import aip";var n=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),a=t.valueToCode(this,"STR1",t.ORDER_ATOMIC),_=t.valueToCode(this,"STR2",t.ORDER_ATOMIC);return[n+"."+t.valueToCode(this,"FUNC",t.ORDER_ATOMIC)+"("+a+","+_+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_Nlp_Topic=function(e,t){return t.definitions_.import_aip="import aip",[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".topic("+t.valueToCode(this,"STR1",t.ORDER_ATOMIC)+","+t.valueToCode(this,"STR2",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},ai_AI_Nlp_newsSummary=function(e,t){return t.definitions_.import_aip="import aip",[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".newsSummary("+t.valueToCode(this,"STR",t.ORDER_ATOMIC)+","+t.valueToCode(this,"LEN",t.ORDER_ATOMIC)+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_ImageClassify_Func=function(e,t){return[this.getFieldValue("TYPE"),t.ORDER_ATOMIC]},ai_AI_Ocr_Func=function(e,t){return[this.getFieldValue("TYPE"),t.ORDER_ATOMIC]},ai_AI_Nlp_Func=function(e,t){return[this.getFieldValue("TYPE"),t.ORDER_ATOMIC]},ai_AI_Nlp_Func_sim=function(e,t){return[this.getFieldValue("TYPE"),t.ORDER_ATOMIC]},ai_AI_audio=function(e,t){return t.definitions_.import_audio="import audio","audio.audio_record("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+","+(t.valueToCode(this,"TIME",t.ORDER_ATOMIC)||"0")+")\n"},ai_AI_photo=function(e,t){return t.definitions_.import_audio="import cam","cam.photo_capture("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+","+(t.valueToCode(this,"BUT",t.ORDER_ATOMIC)||'""')+")\n"},ai_AI_result=function(e,t){var n=t.valueToCode(this,"AI",t.ORDER_ASSIGNMENT)||"0",a=this.getFieldValue("CTYPE");if("Image"==a)var _=n+'["result"][0]["keyword"]';if("Speech"==a)_=n+'["result"][0]';if("Face"==a||"OcrSimilarity"==a)_=n+'["score"]';if("Ocr"==a)_=n+'["words_result"]';return[_,t.ORDER_ATOMIC]},algorithm_algorithm_prepare=function(e,t){t.definitions_.import_sprite="import sprite";return"g = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,1,0,0,0,0,0,0], [0,0,0,1,0,0,1,0,0,0], [0,1,1,0,1,1,0,0,0,0], [0,0,0,1,0,0,0,1,0,0], [0,0,0,1,0,0,1,1,0,0], [0,0,1,0,0,1,0,1,0,0], [0,0,0,0,1,1,1,0,0,0]]\nmark = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0]]\nvis = [0,1,0,0,0,0,0,0,0]\nposition = [[0, 0], [200, 200], [250, 60], [320, 200], [280, 380], [470, 250], [670, 90], [650, 340]]\nsprite.clearAllSprites()\nsprite.createBackground('ditu')\nmask = sprite.Sprite('white', 96, 354)\nmask.hide()\nhouse = [\n sprite.Sprite('mark', 150, 380),\n sprite.Sprite('xtxn', 96, 170),\n sprite.Sprite('xnvijx', 270, 45),\n sprite.Sprite('xnxbjx', 310, 182),\n sprite.Sprite('xnsijx', 300, 370),\n sprite.Sprite('xnkejx', 495, 220),\n sprite.Sprite('bwbwjx', 716, 85),\n sprite.Sprite('lelejx', 686, 314)\n]\nfor i in house:\n i.filterBrighter()\n i.hide()\n"},algorithm_algorithm_add_school=function(){return"path = [1]\nmask.show()\ncar = sprite.Sprite('xnie', position[1][0], position[1][1])\nhouse[1].show()\ncar.nowPos = 1\ndef drive(n):\n if g[car.nowPos][n]==1:\n car.slideTo(position[n][0], position[n][1], 1)\n car.nowPos = n\n else:\n print('移动失败!程序有误!')\n exit()\n"},algorithm_algorithm_find_path=function(e,t){t.definitions_.import_random="import random";return"f = path[(len(path) - 1)]\nflag = 0\nfor _my_variable in [6,5,4,3,2,1,0]:\n if vis[_my_variable+1] == 0 and g[f][_my_variable+1] == 1:\n if mark[f][_my_variable+1] == 0:\n flag = 1\n break\n"},algorithm_algorithm_new_path=function(e,t){return["flag == 1",t.ORDER_ATOMIC]},algorithm_algorithm_set_path=function(){return"mark[f][_my_variable+1] = 1\nvis[_my_variable+1] = 1\n"},algorithm_algorithm_add_path=function(){return"path.append(_my_variable+1)\ndrive(path[len(path) - 1])\nhouse[_my_variable+1].show()\n"},algorithm_algorithm_del_path=function(e,t){t.definitions_.import_time="import time";return"del path[len(path) - 1]\nhouse[0].show()\ntime.sleep(0.5)\nhouse[0].hide()\n"},algorithm_algorithm_return_path=function(){var e="for i in range(7):\n mark[f][i+1] = 0\n vis[f] = 0\n";return e="house[f].hide()\ndrive(path[len(path) - 1])\n"+e},algorithm_algorithm_no_left=function(e,t){return["len(path) == 7",t.ORDER_ATOMIC]},algorithm_algorithm_print_path=function(){return'name = ["","学校","小智家","小欣家","小思家","小科家","贝贝家","乐乐家"]\nres = ""\nfor i in path:\n res = res + name[i] + "-"\nprint(res[:-1])\n'},algorithm_algorithm_prepare2=function(e,t){t.definitions_.import_sprite="import sprite";return"g = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,1,0,0,0,0,0,0], [0,0,0,1,0,0,1,0,0,0], [0,1,1,0,1,0,0,0,0,0], [0,0,0,1,0,0,0,1,0,0], [0,0,0,1,0,0,0,1,0,0], [0,0,1,0,0,0,0,1,0,0], [0,0,0,0,1,1,1,0,0,0]]\nmark = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0]]\nvis = [0,1,0,0,0,0,0,0,0]\nposition = [[0, 0], [200, 200], [250, 60], [320, 200], [280, 380], [470, 250], [670, 90], [650, 340]]\nsprite.clearAllSprites()\nsprite.createBackground('ditu')\nmask = sprite.Sprite('white', 96, 354)\nmask.hide()\nhouse = [\n sprite.Sprite('mark', 150, 380),\n sprite.Sprite('xtxn', 96, 170),\n sprite.Sprite('xnvijx', 270, 45),\n sprite.Sprite('xnxbjx', 310, 182),\n sprite.Sprite('xnsijx', 300, 370),\n sprite.Sprite('xnkejx', 495, 220),\n sprite.Sprite('bwbwjx', 716, 85),\n sprite.Sprite('lelejx', 686, 314)\n]\nbarricade = sprite.Sprite('barricade', 610, 170)\nbarricade.enlargeTo(100)\nfor i in house:\n i.filterBrighter()\n i.hide()\n"},algorithm_algorithm_current_school=function(e,t){return["f == 1",t.ORDER_ATOMIC]},algorithm_algorithm_no_path=function(){return"print('没有符合条件的路线')\n"},algorithm_algorithm_prepare_2_1=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return'g = [[10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000],[10000,10000,500,300,10000,10000,10000,10000,10000,10000,10000],[10000,500,10000,10000,100,10000,10000,10000,10000,10000,10000],[10000,300,10000,10000,400,300,10000,10000,10000,10000,10000],[10000,10000,100,400,10000,10000,200,10000,10000,10000,10000],[10000,10000,10000,300,10000,10000,100,200,10000,10000,10000],[10000,10000,10000,10000,200,100,10000,10000,100,10000,10000],[10000,10000,10000,10000,10000,200,10000,10000,100,10000,10000],[10000,10000,10000,10000,10000,10000,100,100,10000,10000,10000]]\nnow=1\nlast=1\npath=[]\npath.append(1)\nname = ["","小思家","银行","邮局","餐厅","书店","医院","超市","小科家"]\nposition = [[0, 0], [60, 320], [510, 390], [240, 200], [750, 330], [410, 90], [540, 190], [550, 30], [720, 120]]\nsprite.clearAllSprites()\nsprite.createBackground(\'map_si_ke\')\nstu = sprite.Sprite(\'girl\', 60, 320)\nstu.enlargeTo(100)\ntime.sleep(1)\n\n'},algorithm_algorithm_prepare_2_2=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return'g =[[10000,10000,10000,10000,10000,10000,10000],[10000,10000,300,500,10000,10000,10000],[10000,300,10000,10000,300,700,10000],[10000,500,10000,10000,10000,100,10000],[10000,10000,300,10000,10000,10000,200],[10000,10000,700,100,10000,10000,100],[10000,10000,10000,10000,200,100,10000]]\nnow=1\nlast=1\npath=[]\npath.append(1)\nname = ["","小智家","邮局","银行","书店","餐厅","学校"]\nposition = [[0, 0], [70, 340], [70, 90], [550, 310], [420, 70], [730, 250], [650, 130]]\nsprite.clearAllSprites()\nsprite.createBackground(\'map_zhi_xue\')\nstu = sprite.Sprite(\'boy\', 70, 340)\nstu.enlargeTo(100)\ntime.sleep(1)\n\n'},algorithm_algorithm_move_recent=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return'tmp=10000\nfor i in range(0, len(g), 1):\n if g[now][i]6:\n print("路线错乱!程序有误!")\n exit()\n'},algorithm_algorithm_not_home=function(e,t){return["name[now] != '小科家'",t.ORDER_ATOMIC]},algorithm_algorithm_not_school=function(e,t){return["name[now] != '学校'",t.ORDER_ATOMIC]},algorithm_algorithm_print_path2=function(){return'res = ""\nfor i in path:\n res = res + name[i] + "→"\nprint(res[:-1])\n'},algorithm_hanoi_init=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";var n=this.getFieldValue("NUM");if(n>=7)var a="print('层数过高!不得高于6层!')\nexit()\n";else a="sprite.clearAllSprites()\n_Hanoicolor = ['blue', 'red', 'yellow', 'green', 'purple', 'black']\n_Hanoi = [[], [], []]\nA = 0\nB = 1\nC = 2\n_n = "+n+"\n_HanoiColumn = [\n sprite.Sprite('HanoiColumn', 200, 320),\n sprite.Sprite('HanoiColumn', 400, 320),\n sprite.Sprite('HanoiColumn', 600, 320)\n]\n_HanoiColumnNumber = [\n sprite.Text('A', 190, 120),\n sprite.Text('B', 390, 120),\n sprite.Text('C', 590, 120)\n]\n_HanoiBlock = []\nfor i in range(0, _n, 1):\n _HanoiBlock.append(sprite.Sprite(_Hanoicolor[i], 200, 400-(_n-i-1)*27))\n _HanoiBlock[i].setScale(25, 30*i+30)\n _Hanoi[0].insert(0, _HanoiBlock[i])\n_steptext = sprite.Text('步数:0', 30, 30)\n_steps = {'steps' : 0}\ntime.sleep(1)\n";return a},algorithm_hanoi_move=function(e,t){var n=t.valueToCode(this,"FROM_NUM",t.ORDER_ATOMIC)||"0",a=t.valueToCode(this,"TO_NUM",t.ORDER_ATOMIC)||"0";return`if len(_Hanoi[${n}])>0 :\n _HanoiBlockMoved = _Hanoi[${n}].pop()\n if len(_Hanoi[${a}]) > 0 :\n _HanoiBlockSuppressed = _Hanoi[${a}].pop()\n if _HanoiBlock.index(_HanoiBlockMoved) > _HanoiBlock.index(_HanoiBlockSuppressed):\n print('非法移动!程序有误!')\n exit()\n else:\n _Hanoi[${a}].append(_HanoiBlockSuppressed)\n _HanoiBlockMoved.slideTo(${n}*200+200, 180, 0.2)\n _HanoiBlockMoved.slideTo(${a}*200+200, 180, 0.5)\n _HanoiBlockMoved.slideTo(${a}*200+200, 400-len(_Hanoi[${a}])*27, 0.2)\n _Hanoi[${a}].append(_HanoiBlockMoved)\n _steps['steps'] += 1\n _steptext.changeText('步数:'+str(_steps['steps']))\nelse :\n print('非法移动!程序有误!')\n exit()\n`},algorithm_algorithm_all_books_sequence=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"if 'mode' not in globals() or mode == 0:\n sprite.clearAllSprites()\n ring=[0,0,0,0,0,0,0,0,0,0]\n mode=1\n n=5\n ring[5]=1\n name=['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\n Books = []\n for i in range(1, 11, 1):\n Books.append(sprite.Sprite('books/book'+str(i), (130*i-650) if i>5 else 130*i, 320 if i>5 else 120))\nelse:\n mode=2\n n=len(ring)-1\nring[n]=1\ntime.sleep(1)\n"},algorithm_algorithm_all_books=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"if 'mode' not in globals() or mode == 0:\n sprite.clearAllSprites()\n ring=[0,0,0,0,0,0,0,0,0,0]\n mode=2\n n=5\n name=['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\n Books = []\n for i in range(1, 11, 1):\n Books.append(sprite.Sprite('books/book'+str(i), (130*i-650) if i>5 else 130*i, 320 if i>5 else 120))\nelse:\n mode=1\n n=len(ring)-1\nring[n]=n\nlist=ring\ntemp=Books\ntime.sleep(1)\n"},algorithm_algorithm_first_book=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"res=0\nflag=ring[res]\nBooks[res].filterBrighter()\ntime.sleep(0.1)\nBooks[res].filterOrigin()\n"},algorithm_algorithm_no_ring2=function(e,t){return["(('mode' not in globals())or(mode==1 and flag==0)or(mode==2 and not any(value > 0 for value in qian))or(mode==0))",t.ORDER_ATOMIC]},algorithm_algorithm_yes_ring2=function(e,t){return["(('mode' in globals())and((mode==1 and flag!=0)or(mode==2 and any(value > 0 for value in qian))))",t.ORDER_ATOMIC]},algorithm_algorithm_next_book=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";var n="res+=1\nflag=ring[res]\n";return n="Books[res].filterGray()\ntime.sleep(0.3)\n"+(n+="Books[res].filterBrighter()\ntime.sleep(0.1)\nBooks[res].filterOrigin()\n")},algorithm_algorithm_two_left=function(e,t){return["len(list)>=2",t.ORDER_ATOMIC]},algorithm_algorithm_divide_books=function(){return"mid = int(len(list)/2)\nqian = list[0:mid]\nhou = list[mid:]\nqiantemp = temp[0:mid]\nhoutemp = temp[mid:]\n"},algorithm_algorithm_get_half_books=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"quchu = qian\nlist = hou\nquchutemp = qiantemp\ntemp = houtemp\nfor i in qiantemp:\n i.filterBrighter()\ntime.sleep(0.5)\nfor i in qiantemp:\n i.filterGray()\ntime.sleep(0.5)\n"},algorithm_algorithm_delete_book=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"list = quchu\ntemp = quchutemp\nfor i in qiantemp:\n i.filterBrighter()\ntime.sleep(0.5)\nfor i in qiantemp:\n i.filterOrigin()\nfor i in houtemp:\n\ti.filterBrighter()\ntime.sleep(0.5)\nfor i in houtemp:\n i.filterGray()\ntime.sleep(0.5)\n"},algorithm_algorithm_print_book2=function(){return"if 'list' in globals():\n res = list[0]\nBooks[res].filterBrighter()\nprint('未消磁的书籍是第'+str(res+1)+'本《'+name[res%10]+'》。')\nif res!=n:\n print('答案错误!请检查程序!')\nmode=0\n"},algorithm_algorithm_book_scale=function(e,t){var n=this.getFieldValue("NUM");return t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite",`sprite.clearAllSprites()\nring = []\nname = ['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\nBooks = []\nfor i in range(${n}):\n ring.append(0)\nfor i in range(1, ${n}+1, 1):\n Books.append(sprite.Sprite('books/book'+str(i%10 if i%10!=0 else 10), ${{5:"130*i, 120",10:"(130*i-650) if i>5 else 130*i, 320 if i>5 else 120",20:"(65*i-650)+30 if i>10 else 65*i+30, 320 if i>10 else 120",50:"(26*i-650)+50 if i>25 else 26*i+50, 320 if i>25 else 120"}[n]}))\ntime.sleep(1)\nmode=3\n`},algorithm_algorithm_number_zero=function(e,t){t.definitions_.import_sprite="import sprite";return"cnt=0\ncntText = sprite.Text('计数器:0', 30, 200)\n"},algorithm_algorithm_number_add=function(e,t){t.definitions_.import_sprite="import sprite";return"cnt+=1\ncntText.changeText('计数器:'+str(cnt))\n"},algorithm_algorithm_print_number=function(e,t){t.definitions_.import_sprite="import sprite";return"print('计数器大小:'+str(cnt))\n"},algorithm_algorithm_init_jttl=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\n_head = 10\n_foot = 32\n_footText = sprite.Text('脚的数量:', 20, 10)\n_sprite = []\n"},algorithm_algorithm_rabbit_zero=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"_rabbit = 0\ntime.sleep(1)\n"},algorithm_algorithm_rabbit_number_in_range=function(e,t){return["_rabbit < _head",t.ORDER_ATOMIC]},algorithm_algorithm_chick_calculate=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"_chick = _head - _rabbit\nfor i in range(0, _chick, 1):\n _sprite.append(sprite.Sprite('jttl/chick', len(_sprite)*130+130 if len(_sprite)<5 else len(_sprite)*130+130-650, 120 if len(_sprite)<5 else 320))\n\ntime.sleep(0.5)\n_footText.changeText('脚的数量:'+str(_rabbit*4 + _chick*2))\ntime.sleep(1)\n"},algorithm_algorithm_check_feet=function(e,t){return["_rabbit*4 + _chick*2 == _foot",t.ORDER_ATOMIC]},algorithm_algorithm_print_jttl_answer=function(e,t){t.definitions_.import_sprite="import sprite";return"print('鸡的数量:'+str(_chick)+'只;\\n兔的数量:'+str(_rabbit)+'只。')\n"},algorithm_algorithm_rabbit_add=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"_rabbit += 1\nsprite.clearAllSprites()\n_sprite = []\n_footText = sprite.Text('脚的数量:', 20, 10)\nfor i in range(0, _rabbit, 1):\n _sprite.append(sprite.Sprite('jttl/rabbit', len(_sprite)*130+130 if len(_sprite)<5 else len(_sprite)*130+130-650, 120 if len(_sprite)<5 else 320))\ntime.sleep(0.5)\n"},algorithm_algorithm_init_fzsf=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\nsprite.createBackground('/fzsf/map_ck_xxjsjs')\n_S1 = sprite.Sprite('/fzsf/S1',400,225,'S1')\n_S2 = sprite.Sprite('/fzsf/S2',400,225,'S2')\n_S3 = sprite.Sprite('/fzsf/S3',400,225,'S3')\n_S4 = sprite.Sprite('/fzsf/S4',400,225,'S4')\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\n_text_1 = sprite.Text('S1:',0,0,'text')\n_text_2 = sprite.Text('S2:',0,30,'text2')\n_text_3 = sprite.Text('S3:',0,60,'text3')\n_text_4 = sprite.Text('S4:',0,90,'text4')\n_position = [[60, 270], [240, 50], [260, 380], [440, 190], [730, 60], [700, 400]]\n_Llen = [0, 170, 230, 100, 150, 10, 30, 50]\n_Slen = [0, 0, 0, 0, 0]\n_tag = [0, [0, 1, 3], [0, 2, 3], [3, 4, 5], [3, 5]]\nbear = sprite.Sprite('mixbear',60,270,'bear')\nbear.enlargeTo(80)\n_pos = 0\ntime.sleep(1)\n"},algorithm_algorithm_fz_calc=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";var n=this.getFieldValue("PATHNAME");const a=[0,[1,3],[2,4],[5,7],[6]];var _="";return _+=`_S${n}.show()\ntime.sleep(1)\n`,_+=4!=n?`_Slen[${n}] = _Llen[${a[n][0]}] + _Llen[${a[n][1]}]\n_text_${n}.changeText('S${n}:'+str(_Slen[${n}])+'m')\ntime.sleep(1)\n_S${n}.hide()\ntime.sleep(1)\n`:"_Slen[4] = _Llen[6]\n_text_4.changeText('S4:'+str(_Slen[4])+'m')\ntime.sleep(1)\n_S4.hide()\ntime.sleep(1)\n"},algorithm_algorithm_fz_compare=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";var n="";return[n+=`_Slen[${this.getFieldValue("PATHNAME")}] < _Slen[${this.getFieldValue("PATHNAME2")}]`,t.ORDER_ATOMIC]},algorithm_algorithm_fz_set_min=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";var n=this.getFieldValue("PATHNAME"),a="";return a+=`\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\n_Smin = ${n}\n_S${n}.show()\ntime.sleep(0.5)\n_S${n}.hide()\ntime.sleep(0.5)\n_S${n}.show()\ntime.sleep(1)\n`},algorithm_algorithm_fz_move=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"if(_pos == _tag[_Smin][0]):\n for i in range(1, len(_tag[_Smin]), 1):\n bear.slideTo(_position[_tag[_Smin][i]][0], _position[_tag[_Smin][i]][1], 1)\n _pos = _tag[_Smin][len(_tag[_Smin])-1]\nelse:\n print('移动错误!程序有误!')\n exit()\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\nif(_pos == 5):\n print('成功抵达信息科技教室!')\n"},algorithm_algorithm_init_hxdb=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\nsprite.createBackground('/hxdb/hxdbbg')\n_soldier = []\n_num = sprite.Text('目前士兵数量:0',0,0,'num')\n_last = sprite.Text('剩余:0',500,0,'last')\n_line = 3\n"},algorithm_algorithm_hxdb_init_soldier=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";var n="";return n+=`for i in range(0, ${this.getFieldValue("NUM")}, 1):\n _soldier.append(sprite.Sprite('/hxdb/soldier', 30 + (len(_soldier)%_line)*50 + (len(_soldier)//(4*_line))*(_line+1)*50 +(len(_soldier)%3-2), 80+(len(_soldier)//_line)*100-(len(_soldier)//(4*_line))*4*100+(len(_soldier)%2)))\n_num.changeText('目前士兵数量:'+str(len(_soldier)))\n`},algorithm_algorithm_hxdb_stand_in_line=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";var n=this.getFieldValue("NUM");return`for i in range(0, len(_soldier), 1):\n _soldier[i].slideTo(30 + (i%${n})*50 + (i//(4*${n}))*(${n}+1)*50 +(i%3-2), 80+(i//${n})*100-(i//(4*${n}))*4*100+(i%2), 0.05)\n_line = ${n}\n_last.changeText('剩余:'+str(len(_soldier)%_line))\ntime.sleep(2)\n`},algorithm_algorithm_hxdb_last_line=function(e,t){return t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite",[`len(_soldier)%_line == ${this.getFieldValue("NUM")}`,t.ORDER_ATOMIC]},algorithm_algorithm_hxdb_add=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"_num.changeText('目前士兵数量:'+str(len(_soldier)+1))\n_last.changeText('剩余:')\ntime.sleep(0.5)\n_soldier.append(sprite.Sprite('/hxdb/soldier', 30 + (len(_soldier)%_line)*50 + (len(_soldier)//(4*_line))*(_line+1)*50 +(len(_soldier)%3-2), 80+(len(_soldier)//_line)*100-(len(_soldier)//(4*_line))*4*100+(len(_soldier)%2)))\ntime.sleep(1)\n"},algorithm_algorithm_hxdb_result=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"print('符合要求的士兵数量为:'+str(len(_soldier)))\n"},algorithm_hanoi_init_offline=function(e,t){t.definitions_.import_turtle="import turtle",t.definitions_.import_time="import time",t.definitions_.import_math="import math";var n=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),a=this.getFieldValue("NUM");return t.setups_.init_Hanoi="\ndef init_Hanoi():\n pen = turtle.Turtle()\n pen.hideturtle()\n pen.speed(0)\n for i in range(0, 3, 1):\n pen.penup()\n pen.setheading(0)\n pen.goto(150 * i - 200,-100)\n pen.pendown()\n pen.pensize(5)\n pen.forward(100)\n pen.goto(150 * i - 150,-100)\n pen.setheading(90)\n pen.forward(200)",t.setups_.begin="\ndef begin(): \n s = turtle.Turtle()\n s.hideturtle()\n s.penup()\n s.speed(0)\n s.goto(0,-150)\n s.write('3')\n time.sleep(1)\n s.clear()\n s.write('2')\n time.sleep(1)\n s.clear()\n s.write('1')\n time.sleep(1)\n s.clear()\n s.write('Start!')\n time.sleep(1)\n s.clear()\n",t.setups_.move="\ndef move(x, y):\n try:\n t = tower[x].pop(-1)\n a = tower_num[x].pop(-1)\n if tower_num[y]!=[]:\n b = tower_num[y][-1]\n if a 1"}]`,t.ORDER_ATOMIC]},data_dataframe_groupby=function(e,t){return[`${t.valueToCode(e,"DICT",t.ORDER_ATOMIC)||"df"}.groupby(by=${t.valueToCode(e,"KEY",t.ORDER_ATOMIC)||"'tag'"})`,t.ORDER_ATOMIC]},data_dataframe_aggregate_func=function(e,t){return[`${t.valueToCode(e,"DICT",t.ORDER_ATOMIC)||"df"}.${e.getFieldValue("TYPE")}()`,t.ORDER_ATOMIC]},data_plot_cla=function(e,t){t.definitions_.import_matplotlib_pyplot="import matplotlib.pyplot as plt";return"plt.cla()\n"},datastructure_ds_create_linkedlist=function(e,t){var n=t.variableDB_.getName(this.getFieldValue("VAR"),external_Blockly_namespaceObject.Variables.NAME_TYPE),a=t.variableDB_.getName(this.getFieldValue("TYPE"),external_Blockly_namespaceObject.Variables.NAME_TYPE),_="class "+a+":\n";_+=" def __init__(self):\n";for(var l=new Array(this.itemCount_),s=0;s0;_--)t.getInputTargetBlock("IF"+_)&&t.getInputTargetBlock("IF"+_).previousConnection?n[_]=t.getInputTargetBlock("IF"+_).previousConnection:n[_]=null,this.removeInput("IF"+_),t.getInputTargetBlock("DO"+_)&&t.getInputTargetBlock("DO"+_).previousConnection?a[_]=t.getInputTargetBlock("DO"+_).previousConnection:a[_]=null,this.removeInput("DO"+_);this.elseifCount_=parseInt(e.getAttribute("elseif"),10),this.elseCount_=parseInt(e.getAttribute("else"),10);for(_=1;_<=this.elseifCount_;_++)this.appendValueInput("IF"+_).setCheck([Boolean,Number]).appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+_).appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_MSG_ELSE);for(_=n.length-2;_>0;_--)n[_]&&n[_].reconnect(this,"IF"+_);for(_=a.length-2;_>0;_--)a[_]&&a[_].reconnect(this,"DO"+_)},decompose:function(e){var t=e.newBlock("controls_if_if");t.initSvg();for(var n=t.getInput("STACK").connection,a=1;a<=this.elseifCount_;a++){var _=e.newBlock("controls_if_elseif");_.initSvg(),n.connect(_.previousConnection),n=_.nextConnection}if(this.elseCount_){var l=e.newBlock("controls_if_else");l.initSvg(),n.connect(l.previousConnection)}return t},compose:function(e){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var t=this.elseifCount_;t>0;t--)this.removeInput("IF"+t),this.removeInput("DO"+t);this.elseifCount_=0;for(var n=e.getInputTargetBlock("STACK"),a=[null],_=[null],l=null;n;){switch(n.type){case"controls_if_elseif":this.elseifCount_++,a.push(n.valueConnection_),_.push(n.statementConnection_);break;case"controls_if_else":this.elseCount_++,l=n.statementConnection_;break;default:throw Error("Unknown block type: "+n.type)}n=n.nextConnection&&n.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(a,_,l)},saveConnections:function(e){for(var t=e.getInputTargetBlock("STACK"),n=1;t;){switch(t.type){case"controls_if_elseif":var a=this.getInput("IF"+n),_=this.getInput("DO"+n);t.valueConnection_=a&&a.connection.targetConnection,t.statementConnection_=_&&_.connection.targetConnection,n++;break;case"controls_if_else":_=this.getInput("ELSE");t.statementConnection_=_&&_.connection.targetConnection;break;default:throw"Unknown block type."}t=t.nextConnection&&t.nextConnection.targetBlock()}},rebuildShape_:function(){var e=[null],t=[null],n=null;this.getInput("ELSE")&&(n=this.getInput("ELSE").connection.targetConnection);for(var a=1;this.getInput("IF"+a);){var _=this.getInput("IF"+a),l=this.getInput("DO"+a);console.log(_.connection.targetConnection),e.push(_.connection.targetConnection),t.push(l.connection.targetConnection),a++}this.updateShape_(),this.reconnectChildBlocks_(e,t,n)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var e=1;this.getInput("IF"+e);)this.removeInput("IF"+e),this.removeInput("DO"+e),e++;for(e=1;e<=this.elseifCount_;e++)this.appendValueInput("IF"+e).setCheck([Number,Boolean]).appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+e).appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(e,t,n){for(var a=1;a<=this.elseifCount_;a++)e[a]&&e[a].reconnect(this,"IF"+a),t[a]&&t[a].reconnect(this,"DO"+a);n&&n.reconnect(this,"ELSE")}},controls_range={init:function(){this.setColour(LOOPS_HUE),this.appendValueInput("FROM").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.PYTHON_RANGE).appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},controls_forEach={init:function(){this.setColour(LOOPS_HUE),this.appendValueInput("LIST").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(external_Blockly_namespaceObject.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return external_Blockly_namespaceObject.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},controls_whileUntil={init:function(){this.setColour(LOOPS_HUE),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new external_Blockly_namespaceObject.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+external_Blockly_namespaceObject.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return{WHILE:external_Blockly_namespaceObject.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:external_Blockly_namespaceObject.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[t]}))}},controls_try_finally={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var e=document.createElement("mutation");return this.elseifCount_&&e.setAttribute("elseif",this.elseifCount_),this.elseCount_&&e.setAttribute("else",1),e},domToMutation:function(e){var t=this,n=[],a=[];this.elseCount_&&this.removeInput("ELSE");for(var _=this.elseifCount_;_>0;_--)t.getInputTargetBlock("IF"+_)&&t.getInputTargetBlock("IF"+_).previousConnection?n[_]=t.getInputTargetBlock("IF"+_).previousConnection:n[_]=null,this.removeInput("IF"+_),t.getInputTargetBlock("DO"+_)&&t.getInputTargetBlock("DO"+_).previousConnection?a[_]=t.getInputTargetBlock("DO"+_).previousConnection:a[_]=null,this.removeInput("DO"+_);this.elseifCount_=parseInt(e.getAttribute("elseif"),10),this.elseCount_=parseInt(e.getAttribute("else"),10);for(_=1;_<=this.elseifCount_;_++)this.appendValueInput("IF"+_).setCheck([Boolean,Number]).appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+_).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_FINALLY);for(_=n.length-2;_>0;_--)n[_]&&n[_].reconnect(this,"IF"+_);for(_=a.length-2;_>0;_--)a[_]&&a[_].reconnect(this,"DO"+_)},decompose:function(e){var t=e.newBlock("controls_try");t.initSvg();for(var n=t.getInput("STACK").connection,a=1;a<=this.elseifCount_;a++){var _=e.newBlock("controls_except");_.initSvg(),n.connect(_.previousConnection),n=_.nextConnection}if(this.elseCount_){var l=e.newBlock("controls_finally");l.initSvg(),n.connect(l.previousConnection)}return t},compose:function(e){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var t=this.elseifCount_;t>0;t--)this.removeInput("IF"+t),this.removeInput("DO"+t);this.elseifCount_=0;for(var n=e.getInputTargetBlock("STACK"),a=[null],_=[null],l=null;n;){switch(n.type){case"controls_except":this.elseifCount_++,a.push(n.valueConnection_),_.push(n.statementConnection_);break;case"controls_finally":this.elseCount_++,l=n.statementConnection_;break;default:throw Error("Unknown block type: "+n.type)}n=n.nextConnection&&n.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(a,_,l)},saveConnections:function(e){for(var t=e.getInputTargetBlock("STACK"),n=1;t;){switch(t.type){case"controls_except":var a=this.getInput("IF"+n),_=this.getInput("DO"+n);t.valueConnection_=a&&a.connection.targetConnection,t.statementConnection_=_&&_.connection.targetConnection,n++;break;case"controls_finally":_=this.getInput("ELSE");t.statementConnection_=_&&_.connection.targetConnection;break;default:throw"Unknown block type."}t=t.nextConnection&&t.nextConnection.targetBlock()}},rebuildShape_:function(){var e=[null],t=[null],n=null;this.getInput("ELSE")&&(n=this.getInput("ELSE").connection.targetConnection);for(var a=1;this.getInput("IF"+a);){var _=this.getInput("IF"+a),l=this.getInput("DO"+a);console.log(_.connection.targetConnection),e.push(_.connection.targetConnection),t.push(l.connection.targetConnection),a++}this.updateShape_(),this.reconnectChildBlocks_(e,t,n)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var e=1;this.getInput("IF"+e);)this.removeInput("IF"+e),this.removeInput("DO"+e),e++;for(e=1;e<=this.elseifCount_;e++)this.appendValueInput("IF"+e).setCheck([Number,Boolean]).appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+e).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(e,t,n){for(var a=1;a<=this.elseifCount_;a++)e[a]&&e[a].reconnect(this,"IF"+a),t[a]&&t[a].reconnect(this,"DO"+a);n&&n.reconnect(this,"ELSE")}},controls_flow_statements={init:function(){this.setColour(LOOPS_HUE);var e=new external_Blockly_namespaceObject.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(e,"FLOW").appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var t=this;this.setTooltip((function(){var e=t.getFieldValue("FLOW");return{BREAK:external_Blockly_namespaceObject.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:external_Blockly_namespaceObject.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[e]}))},onchange:function(){if(this.workspace){var e=!1,t=this;do{if("controls_repeat"==t.type||"controls_for"==t.type||"controls_forEach"==t.type||"controls_repeat_ext"==t.type||"controls_whileUntil"==t.type||"do_while"==t.type){e=!0;break}t=t.getSurroundParent()}while(t);e?this.setWarningText(null):this.setWarningText(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},controls_for={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new external_Blockly_namespaceObject.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(external_Blockly_namespaceObject.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){return external_Blockly_namespaceObject.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",e.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},controls_for_range={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new external_Blockly_namespaceObject.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(external_Blockly_namespaceObject.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){return external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",e.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}};controls_whileUntil.OPERATORS=[[external_Blockly_namespaceObject.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[external_Blockly_namespaceObject.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],controls_flow_statements.OPERATORS=[[external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const controls_if_if={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(external_Blockly_namespaceObject.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},controls_if_elseif={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},controls_if_else={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},controls_try={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},controls_except={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},controls_finally={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},controls_repeat_ext={init:function(){this.jsonInit({message0:external_Blockly_namespaceObject.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:LOOPS_HUE,tooltip:external_Blockly_namespaceObject.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:external_Blockly_namespaceObject.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},controls_lambda={init:function(){this.setColour(LOOPS_HUE),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(external_Blockly_namespaceObject.Msg.MIXLY_STAT),this.setOutput(!0)}},controls_pass={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},controls_thread={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},do_while={init:function(){this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.CONTROLS_REPEAT_TITLE_REPEAT+external_Blockly_namespaceObject.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(external_Blockly_namespaceObject.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[external_Blockly_namespaceObject.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(LOOPS_HUE),this.setTooltip("do-while loop"),this.setHelpUrl("")}},garbage_collection={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},get_mem_alloc={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},get_mem_free={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},get_unique_identifier={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET+external_Blockly_namespaceObject.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.PROCEDURES_DEFRETURN_RETURN+external_Blockly_namespaceObject.Msg.MIXLY_GET_UNIQUE_IDEN)}},datetime_fromtimestamp={init:function(){this.setColour(LOOPS_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},gene_unique_identifier={init:function(){this.setColour(LOOPS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},MATH_HUE=230;external_Blockly_namespaceObject.FieldTextInput.math_number_validator=function(e){return String(e)},external_Blockly_namespaceObject.FieldTextInput.math_number_validator_include_blank=function(e){if(""===e)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(e)?String(e):null};const math_number={init:function(){this.setColour(MATH_HUE),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldTextInput("0",external_Blockly_namespaceObject.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.MATH_NUMBER_TOOLTIP)}},math_constant={init:function(){this.setColour(MATH_HUE);this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new external_Blockly_namespaceObject.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CONSTANT");return{pi:external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[t]}))}},math_constant_mp={init:function(){this.setColour(MATH_HUE);this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new external_Blockly_namespaceObject.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CONSTANT");return{pi:external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[t]}))}},math_arithmetic={init:function(){this.setColour(MATH_HUE),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new external_Blockly_namespaceObject.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{ADD:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:external_Blockly_namespaceObject.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[t]}))}},math_selfcalcu={init:function(){this.setColour(MATH_HUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new external_Blockly_namespaceObject.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{ADD:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:external_Blockly_namespaceObject.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:external_Blockly_namespaceObject.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[t]}))}},math_bit={init:function(){this.setColour(MATH_HUE),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new external_Blockly_namespaceObject.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},math_trig={init:function(){this.setColour(MATH_HUE),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new external_Blockly_namespaceObject.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{SIN:external_Blockly_namespaceObject.Msg.MATH_TRIG_TOOLTIP_SIN,COS:external_Blockly_namespaceObject.Msg.MATH_TRIG_TOOLTIP_COS,TAN:external_Blockly_namespaceObject.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:external_Blockly_namespaceObject.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:external_Blockly_namespaceObject.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:external_Blockly_namespaceObject.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:external_Blockly_namespaceObject.Msg.MATH_SINGLE_TOOLTIP_LN}[t]}))}},math_dec={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MATH_BIN,"bin"],[external_Blockly_namespaceObject.Msg.MATH_OCT,"oct"],[external_Blockly_namespaceObject.Msg.MATH_HEX,"hex"]];this.setColour(MATH_HUE),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{bin:external_Blockly_namespaceObject.Msg.MATH_DEC_TOOLTIP_BIN,oct:external_Blockly_namespaceObject.Msg.MATH_DEC_TOOLTIP_OCT,hex:external_Blockly_namespaceObject.Msg.MATH_DEC_TOOLTIP_HEX}[e]}))}},math_to_int={init:function(){var e=[[external_Blockly_namespaceObject.Msg.LANG_MATH_TO_ROUND,"round"],[external_Blockly_namespaceObject.Msg.LANG_MATH_TO_CEIL,"ceil"],[external_Blockly_namespaceObject.Msg.LANG_MATH_TO_FLOOR,"floor"],[external_Blockly_namespaceObject.Msg.MATH_ABS,"fabs"],[external_Blockly_namespaceObject.Msg.MATH_SQRT,"sqrt"]];this.setColour(MATH_HUE),this.appendValueInput("A").setCheck(Number).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{sqrt:external_Blockly_namespaceObject.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:external_Blockly_namespaceObject.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:external_Blockly_namespaceObject.Msg.MATH_SINGLE_TOOLTIP_SQ,round:external_Blockly_namespaceObject.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:external_Blockly_namespaceObject.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:external_Blockly_namespaceObject.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[e]}))}},math_max_min={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MIXLY_MAX,"max"],[external_Blockly_namespaceObject.Msg.MIXLY_MIN,"min"]];this.setColour(MATH_HUE),this.appendValueInput("A").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{max:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_MATH_MAX,min:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_MATH_MIN}[e]}))}},math_number_base_conversion={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MATH_TWO,"two"],[external_Blockly_namespaceObject.Msg.MATH_EIGHT,"eight"],[external_Blockly_namespaceObject.Msg.MATH_TEN,"ten"],[external_Blockly_namespaceObject.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(MATH_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP").appendField(external_Blockly_namespaceObject.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MATH_ZHW).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP2").appendField(external_Blockly_namespaceObject.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),n={two:external_Blockly_namespaceObject.Msg.MATH_Before_two,eight:external_Blockly_namespaceObject.Msg.MATH_Before_eight,ten:external_Blockly_namespaceObject.Msg.MATH_Before_ten,sixteen:external_Blockly_namespaceObject.Msg.MATH_Before_sixteen},a=t.getFieldValue("OP2"),_={two:external_Blockly_namespaceObject.Msg.MATH_Behind_two,eight:external_Blockly_namespaceObject.Msg.MATH_Behind_eight,ten:external_Blockly_namespaceObject.Msg.MATH_Behind_ten,sixteen:external_Blockly_namespaceObject.Msg.MATH_Behind_sixteen};return n[e]+_[a]}))}},math_random={init:function(){var e=[[external_Blockly_namespaceObject.Msg.LANG_MATH_INT,"int"],[external_Blockly_namespaceObject.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(MATH_HUE),this.setOutput(!0,Number),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_RANDOM).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TYPE"),n={int:external_Blockly_namespaceObject.Msg.LANG_MATH_INT,float:external_Blockly_namespaceObject.Msg.LANG_MATH_FLOAT_RANDOM};return external_Blockly_namespaceObject.Msg.MATH_RANDOM_INT_TOOLTIP+n[e]}))}},math_constrain={init:function(){this.setColour(MATH_HUE),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MATH_CONSTRAIN_TOOLTIP)}},math_map={init:function(){this.setColour(MATH_HUE),this.appendValueInput("NUM",Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_MATH_MAP)}},math_indexer_number={init:function(){this.setColour(MATH_HUE),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldTextInput("0",external_Blockly_namespaceObject.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MATH_NUMBER_TOOLTIP)}},math_random_seed={init:function(){this.setColour(MATH_HUE),this.appendValueInput("NUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},math_round={init:function(){this.setColour(MATH_HUE),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MATH_ROUND).appendField(external_Blockly_namespaceObject.Msg.TEXT_KEEP),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MATH_ROUND_NEW_TOOLTIP)}},text_to_number={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MIXLY_TO_INT,"int"],[external_Blockly_namespaceObject.Msg.MIXLY_TO_FLOAT,"float"],[external_Blockly_namespaceObject.Msg.MIXLY_TO_BITES,"b"],[external_Blockly_namespaceObject.Msg.LANG_MATH_BYTE+external_Blockly_namespaceObject.Msg.MIXLY_TO_INT,"bti"]];this.setColour(MATH_HUE),this.appendValueInput("VAR").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"TOWHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{int:external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[e]}))}},text_to_number_skulpt={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MIXLY_TO_INT,"int"],[external_Blockly_namespaceObject.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(MATH_HUE),this.appendValueInput("VAR").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"TOWHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{int:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[e]}))}},base_map=math_map,turn_to_int={init:function(){this.setColour(MATH_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.LANG_MATH_BYTE+external_Blockly_namespaceObject.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},generate_cartesian_product={init:function(){this.setColour(MATH_HUE),this.itemCount_=1,this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PRODUCT+external_Blockly_namespaceObject.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(external_Blockly_namespaceObject.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("lists_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,a=0;a1&&"\\"===e.charAt(0)){var t=e.charAt(1);if("0"===t||"b"===t||"f"===t||"n"===t||"r"===t||"t"===t||"\\"===t||"'"===t)return String(e).substring(0,2);if("x"===t&&"0"===e.charAt(2)&&"B"===e.charAt(3))return String(e).substring(0,4)}return String(e).substring(0,1)};const text_char={init:function(){this.setColour(TEXTS_HUE),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new external_Blockly_namespaceObject.FieldTextInput("",external_Blockly_namespaceObject.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(e){if(1==e)var t="../../media/quote2.png";else t="../../media/quote3.png";return new external_Blockly_namespaceObject.FieldImage(t,7,12,'"')}},text_join={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},ascii_to_char={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},char_to_ascii={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},number_to_text={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},text_length={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},text_char_at2={init:function(){this.WHERE_OPTIONS=[[external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[external_Blockly_namespaceObject.Msg.TEXT_GET_INDEX_RANDOM+1+external_Blockly_namespaceObject.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_GET,"MODE"),external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=e.getFieldValue("WHERE"),a="";switch(t+" "+n){case"GET FROM_START":case"GET FROM_END":a=external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":a=external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":a=external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":a=external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=n&&"FROM_END"!=n||(a+=" "+external_Blockly_namespaceObject.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",external_Blockly_namespaceObject.Msg.ONE_BASED_INDEXING?"#1":"#0")),a}));var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHERE"),n={FROM_START:external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:external_Blockly_namespaceObject.Msg.TEXT_GET_INDEX_RANDOM};return external_Blockly_namespaceObject.Msg.PROCEDURES_DEFRETURN_RETURN+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_TYPE_STRING+n[e]+"n"+external_Blockly_namespaceObject.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var e=document.createElement("mutation");e.setAttribute("statement",!this.outputConnection);var t=this.getInput("AT").type==external_Blockly_namespaceObject.INPUT_VALUE;return e.setAttribute("at",t),e},domToMutation:function(e){var t="true"==e.getAttribute("statement");this.updateStatement_(t),e="false"!=e.getAttribute("at"),this.updateAt_(e)},updateStatement_:function(e){e!=!this.outputConnection&&(this.unplug(!0,!0),e?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(e){this.removeInput("AT"),this.removeInput("ORDINAL",!0),e?(this.appendValueInput("AT").setCheck(Number),external_Blockly_namespaceObject.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(external_Blockly_namespaceObject.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var t=new external_Blockly_namespaceObject.FieldDropdown(this.WHERE_OPTIONS,(function(t){var n="FROM_START"==t||"FROM_END"==t;if(n!=e){var a=this.sourceBlock_;return a.updateAt_(n),a.setFieldValue(t,"WHERE"),null}}));this.getInput("AT").appendField(t,"WHERE"),external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},text_char_at={init:function(){this.setHelpUrl(external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_GET+" "+external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.PROCEDURES_DEFRETURN_RETURN+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_TYPE_STRING+external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_START+"n"+external_Blockly_namespaceObject.Msg.TEXT_CHARAT2)}},text_random_char={init:function(){this.setHelpUrl(external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},text_substring2={init:function(){this.WHERE_OPTIONS_1=[[external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(external_Blockly_namespaceObject.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT1").type==external_Blockly_namespaceObject.INPUT_VALUE;e.setAttribute("at1",t);var n=this.getInput("AT2").type==external_Blockly_namespaceObject.INPUT_VALUE;return e.setAttribute("at2",n),e},domToMutation:function(e){var t="true"==e.getAttribute("at1"),n="true"==e.getAttribute("at2");this.updateAt_(1,t),this.updateAt_(2,n)},updateAt_:function(e,t){this.removeInput("AT"+e),this.removeInput("ORDINAL"+e,!0),t?(this.appendValueInput("AT"+e).setCheck(Number),external_Blockly_namespaceObject.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+e).appendField(external_Blockly_namespaceObject.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+e);var n=new external_Blockly_namespaceObject.FieldDropdown(this["WHERE_OPTIONS_"+e],(function(n){var a="FROM_START"==n||"FROM_END"==n;if(a!=t){var _=this.sourceBlock_;return _.updateAt_(e,a),_.setFieldValue(n,"WHERE"+e),null}}));this.getInput("AT"+e).appendField(n,"WHERE"+e),1==e&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},text_substring={init:function(){this.setHelpUrl(external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_GET+" "+external_Blockly_namespaceObject.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(external_Blockly_namespaceObject.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},text_equals_starts_ends={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MIXLY_EQUALS,"==="],[external_Blockly_namespaceObject.Msg.MIXLY_STARTSWITH,"startswith"],[external_Blockly_namespaceObject.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(TEXTS_HUE),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},text_compare_to={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(external_Blockly_namespaceObject.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_COMPARETO_HELP)}},text_capital={init:function(){var e=[[external_Blockly_namespaceObject.Msg.TEXT_UPPER,"upper"],[external_Blockly_namespaceObject.Msg.TEXT_TITLE,"title"],[external_Blockly_namespaceObject.Msg.TEXT_CAPITALIZE,"capitalize"],[external_Blockly_namespaceObject.Msg.TEXT_SWAPCASE,"swapcase"],[external_Blockly_namespaceObject.Msg.TEXT_LOWER,"lower"]];this.setColour(TEXTS_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"CAPITAL").setCheck(String),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CAPITAL");return{upper:external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[e]}))}},text_center={init:function(){var e=[[external_Blockly_namespaceObject.Msg.TEXT_LJUST,"ljust"],[external_Blockly_namespaceObject.Msg.TEXT_CENTER,"center"],[external_Blockly_namespaceObject.Msg.TEXT_RJUST,"rjust"]];this.setColour(TEXTS_HUE),this.appendValueInput("VAR").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(external_Blockly_namespaceObject.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(external_Blockly_namespaceObject.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},text_find={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MID+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},text_join_seq={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},text_replace={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(external_Blockly_namespaceObject.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},text_split={init:function(){this.setColour(TEXTS_HUE),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(external_Blockly_namespaceObject.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},text_strip={init:function(){var e=[[external_Blockly_namespaceObject.Msg.TEXT_TRIM_BOTH,"strip"],[external_Blockly_namespaceObject.Msg.TEXT_TRIM_LEFT,"lstrip"],[external_Blockly_namespaceObject.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(TEXTS_HUE),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"TOWHAT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{strip:external_Blockly_namespaceObject.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:external_Blockly_namespaceObject.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:external_Blockly_namespaceObject.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[e]}))}},text_format={init:function(){this.setColour(TEXTS_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("text_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,a=0;at?e[t]:0==t?'"key"':'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},dicts_create_with_container={init:function(){this.setColour(DICTS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},dicts_create_with_item={init:function(){this.setColour(DICTS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},dicts_keys={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICT_KEYS),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},dicts_get={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_GET_TOOLTIP)}},dicts_get_default={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},dicts_add_or_change={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},dicts_delete={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_DELETE_TOOLTIP)}},dicts_update={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT2").setCheck("Dict").appendField(external_Blockly_namespaceObject.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(external_Blockly_namespaceObject.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MID),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dicts_clear={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICT_CLEAR),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dicts_items={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICT_ITEMS),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},dicts_values={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICT_VALUES),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},dicts_length={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_LENGTH),this.setTooltip(external_Blockly_namespaceObject.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},dicts_deldict={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICT_DELDICT),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dicts_add_change_del={init:function(){this.MODE=[[external_Blockly_namespaceObject.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(external_Blockly_namespaceObject.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(external_Blockly_namespaceObject.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t="";switch(e.getFieldValue("WHERE")){case"INSERT":t=external_Blockly_namespaceObject.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":t=external_Blockly_namespaceObject.Msg.DICTS_DELETE_TOOLTIP}return t}))},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT2").type==external_Blockly_namespaceObject.INPUT_VALUE;return e.setAttribute("at2",t),e},domToMutation:function(e){var t="true"==e.getAttribute("at2");this.updateAt_(t)},updateAt_:function(e){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),e?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var t=new external_Blockly_namespaceObject.FieldDropdown(this.MODE,(function(t){var n="INSERT"==t;if(n!=e){var a=this.sourceBlock_;return a.updateAt_(n),a.setFieldValue(t,"WHERE"),null}}));this.getInput("AT2").appendField(t,"WHERE")}},dicts_pop={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICTS_ADD_VALUE),this.setTooltip(external_Blockly_namespaceObject.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},dicts_setdefault={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_SETDEFAULT_TOOLTIP)}},dicts_create_with_noreturn={init:function(){this.setColour(DICTS_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldLabel(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("dicts_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,a=0;at?e[t]:0==t?'"key"':'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},dicts_todict={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},dicts_to_json={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TO_JSON),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},json_to_dicts={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},dicts_to_to={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},dicts_to_json2={init:function(){this.setColour(DICTS_HUE),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TO_JSON),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},LOGIC_HUE=210,logic_compare={init:function(){var e=external_Blockly_namespaceObject.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(LOGIC_HUE),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{EQ:external_Blockly_namespaceObject.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:external_Blockly_namespaceObject.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:external_Blockly_namespaceObject.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:external_Blockly_namespaceObject.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:external_Blockly_namespaceObject.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:external_Blockly_namespaceObject.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[e]})),this.prevBlocks_=[null,null]}},logic_compare_continous={init:function(){var e=external_Blockly_namespaceObject.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],t=external_Blockly_namespaceObject.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(LOGIC_HUE),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP1"),this.appendValueInput("C").appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"OP2"),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},logic_operation={init:function(){var e=[[external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_AND,"AND"],[external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_OR,"OR"],[external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_NOR,"NOR"],[external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(LOGIC_HUE),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{AND:external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:external_Blockly_namespaceObject.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[e]}))}},logic_negate={init:function(){this.setColour(LOGIC_HUE),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(external_Blockly_namespaceObject.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(external_Blockly_namespaceObject.Msg.LOGIC_NEGATE_TOOLTIP)}},logic_boolean={init:function(){var e=[[external_Blockly_namespaceObject.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[external_Blockly_namespaceObject.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(LOGIC_HUE),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"BOOL"),this.setTooltip(external_Blockly_namespaceObject.Msg.LOGIC_BOOLEAN_TOOLTIP)}},logic_null={init:function(){this.setColour(LOGIC_HUE),this.setOutput(!0),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.LOGIC_NULL),this.setTooltip(external_Blockly_namespaceObject.Msg.LOGIC_NULL_TOOLTIP)}},logic_true_or_false={init:function(){this.setColour(LOGIC_HUE),this.appendValueInput("A"),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(external_Blockly_namespaceObject.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},logic_is_in={init:function(){var e=[[external_Blockly_namespaceObject.Msg.TEXT_APPEND_TO,"in"],[external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(LOGIC_HUE),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"BOOL"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.IN)}},logic_is={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(LOGIC_HUE),this.appendValueInput("A"),this.appendValueInput("B").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},logic_tobool={init:function(){this.setColour(LOGIC_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},STORAGE_HUE=0,storage_open_file_with_os={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("fn").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},storage_fileopen={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILENAME").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=external_Blockly_namespaceObject.Msg.MIXLY_USE,a=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,_=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,l=external_Blockly_namespaceObject.Msg.MIXLY_BELONG;return n+{r:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+l+a+_}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},storage_fileopen_new={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILENAME").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=external_Blockly_namespaceObject.Msg.MIXLY_USE,a=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,_=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,l=external_Blockly_namespaceObject.Msg.MIXLY_BELONG,s=external_Blockly_namespaceObject.Msg.PY_STORAGE_FILE_OBJECT;return n+{r:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+l+a+_+s}))}},storage_fileopen_new_encoding={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILENAME").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXPY_TEXT_ENCODE).appendField(new external_Blockly_namespaceObject.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=external_Blockly_namespaceObject.Msg.MIXLY_USE,a=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,_=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,l=external_Blockly_namespaceObject.Msg.MIXLY_BELONG,s=external_Blockly_namespaceObject.Msg.PY_STORAGE_FILE_OBJECT;return n+{r:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+l+a+_+s}))}},storage_file_write={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("data").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_TYPE_STRING+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},storage_get_contents_without_para={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck("Variable").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},storage_get_contents={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck("Variable").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,a=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return n+{read:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[t]+"x"+a}))}},storage_get_a_line={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MICROBIT_PYTHON_TYPE)}},storage_can_write_ornot={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.HTML_FILE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},storage_get_filename={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},storage_close_file={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},storage_list_all_files={init:function(){this.setColour(STORAGE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const storage_delete_file={init:function(){this.setColour(STORAGE_HUE),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},storage_get_file_size={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},storage_file_tell={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},storage_file_seek={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck("Variable").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,a=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,_=external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return n+" "+{start:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[t]+_+"x"+a}))}},storage_get_current_dir={init:function(){this.setColour(STORAGE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},storage_make_dir={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("PATH").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+external_Blockly_namespaceObject.Msg.MIXLY_ESP32_SET+{mkdir:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[t]}))}},storage_rename={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},storage_change_dir={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},storage_is_file={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.HTML_FILE,"isfile"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[t]}))}},sdcard_use_spi_init={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("SPISUB").appendField(external_Blockly_namespaceObject.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_SETUP+external_Blockly_namespaceObject.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(external_Blockly_namespaceObject.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},sdcard_mount={init:function(){this.setColour(STORAGE_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},procedures_defnoreturn={init:function(){var e=external_Blockly_namespaceObject.Procedures.findLegalName("",this),t=new external_Blockly_namespaceObject.FieldTextInput(e,external_Blockly_namespaceObject.Procedures.rename);t.setSpellcheck(!1),this.appendDummyInput().appendField(t,"NAME").appendField("","PARAMS"),this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&external_Blockly_namespaceObject.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(external_Blockly_namespaceObject.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(external_Blockly_namespaceObject.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(external_Blockly_namespaceObject.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(e){this.hasStatements_!==e&&(e?(this.appendStatementInput("STACK").appendField(external_Blockly_namespaceObject.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=e)},updateParams_:function(){var e="";this.arguments_.length&&(e=external_Blockly_namespaceObject.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),external_Blockly_namespaceObject.Events.disable();try{this.setFieldValue(e,"PARAMS")}finally{external_Blockly_namespaceObject.Events.enable()}},mutationToDom:function(e){var t=external_Blockly_namespaceObject.utils.xml.createElement("mutation");e&&t.setAttribute("name",this.getFieldValue("NAME"));for(var n=0;n"),this.appendValueInput("style").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},html_style={init:function(){this.setColour(HTML_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},html_form={init:function(){this.setColour(HTML_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.HTML_FORM_CONTENT).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.HTML_TEXT,"text"],[external_Blockly_namespaceObject.Msg.HTML_EMAIL,"email"],[external_Blockly_namespaceObject.Msg.HTML_NUMBER,"number"],[external_Blockly_namespaceObject.Msg.HTML_PASSWORD,"password"],[external_Blockly_namespaceObject.Msg.HTML_CHECKBOX,"checkbox"],[external_Blockly_namespaceObject.Msg.HTML_RADIOBUTTON,"radiobutton"],[external_Blockly_namespaceObject.Msg.HTML_BUTTON,"button"],[external_Blockly_namespaceObject.Msg.HTML_COLOUR,"colour"],[external_Blockly_namespaceObject.Msg.HTML_DATE,"date"],[external_Blockly_namespaceObject.Msg.HTML_LOCALTIME,"local time"],[external_Blockly_namespaceObject.Msg.HTML_FILE,"file"],[external_Blockly_namespaceObject.Msg.HTML_HIDDEN,"hidden"],[external_Blockly_namespaceObject.Msg.HTML_IMAGE,"image"],[external_Blockly_namespaceObject.Msg.HTML_MONTH,"month"],[external_Blockly_namespaceObject.Msg.HTML_RANGE,"range"],[external_Blockly_namespaceObject.Msg.HTML_RESET,"reset"],[external_Blockly_namespaceObject.Msg.HTML_SEARCH,"search"],[external_Blockly_namespaceObject.Msg.HTML_SUBMIT,"submit"],[external_Blockly_namespaceObject.Msg.HTML_TELEPHONENUMBER,"telephone number"],[external_Blockly_namespaceObject.Msg.HTML_TIME,"time"],[external_Blockly_namespaceObject.Msg.HTML_URL,"url"],[external_Blockly_namespaceObject.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.HTML_NAME).appendField(new external_Blockly_namespaceObject.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.HTML_VALUE).appendField(new external_Blockly_namespaceObject.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},html_style_content={init:function(){this.setColour(HTML_HUE),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldTextInput("property"),"KEY").appendField(":").appendField(new external_Blockly_namespaceObject.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},html_style_color={init:function(){this.setColour(HTML_HUE),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldTextInput("property"),"KEY").appendField(":").appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},html_text={init:function(){this.setColour(HTML_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.HTML_TEXT).appendField(new external_Blockly_namespaceObject.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},UTILITY_HUE=160,raw_table={init:function(){this.setColour(UTILITY_HUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldTable(""),"TEXT")}},raw_block={init:function(){this.setColour(UTILITY_HUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldMultilineInput(""),"TEXT")}},raw_expression={init:function(){this.setColour(UTILITY_HUE),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},raw_empty={init:function(){this.setColour(UTILITY_HUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},text_comment={init:function(){this.setColour(UTILITY_HUE),this.appendDummyInput().appendTitle("Comment:").appendTitle(new external_Blockly_namespaceObject.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},type_check={init:function(){this.setColour(UTILITY_HUE),this.appendValueInput("VALUE").appendField(external_Blockly_namespaceObject.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},text_print_multiple={init:function(){this.setColour(UTILITY_HUE),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(external_Blockly_namespaceObject.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=external_Blockly_namespaceObject.Block.obtain(e,"text_print_multiple_container");t.initSvg();for(var n=t.getInput("STACK").connection,a=0;a= stop:"," yield start"," start -= abs(step)"])};if(e=function(e,t,n){return"("+e+" <= "+t+") and "+o()+"("+e+", "+t+", "+n+") or "+p()+"("+e+", "+t+", "+n+")"},external_Blockly_namespaceObject.isNumber(a)&&external_Blockly_namespaceObject.isNumber(_)&&external_Blockly_namespaceObject.isNumber(l))a=parseFloat(a),_=parseFloat(_),l=Math.abs(parseFloat(l)),0==a%1&&0==_%1&&0==l%1?(a<=_?(_++,e=0==a&&1==l?_:a+", "+_,1!=l&&(e+=", "+l)):e=a+", "+--_+", -"+l,e="range("+e+")"):(e=a<_?o():p(),e+="("+a+", "+_+", "+l+")");else{var r=function(e,a){if(external_Blockly_namespaceObject.isNumber(e))e=parseFloat(e);else{var _=t.variableDB_.getDistinctName(n+a,external_Blockly_namespaceObject.Variables.NAME_TYPE);i+=_+" = "+e+"\n",e=_}return e};a=r(a,"_start"),_=r(_,"_end");r(l,"_inc"),e="number"==typeof a&&"number"==typeof _?a<_?o(0,_):p(0,_):e(a,_,l)}return i+="for "+n+" in "+e+":\n"+s},control_controls_for_range=function(e,t){var n=t.variableDB_.getName(e.getFieldValue("VAR"),external_Blockly_namespaceObject.Variables.NAME_TYPE),a=t.valueToCode(e,"FROM",t.ORDER_NONE)||"0",_=t.valueToCode(e,"TO",t.ORDER_NONE)||"0",l=t.valueToCode(e,"STEP",t.ORDER_NONE)||"1",s=t.statementToCode(e,"DO"),i=t.addLoopTrap(s,e.id)||t.PASS;return t.setups_.mixly_range="def mixly_range(start, stop, step):\n for i in range(start, stop + 1, step):\n yield i\n\n","for "+n+" in mixly_range("+a+", "+_+", "+l+"):\n"+i},control_controls_whileUntil=function(e,t){var n="UNTIL"==e.getFieldValue("MODE"),a=t.valueToCode(e,"BOOL",t.ORDER_NONE)||"False",_=t.statementToCode(e,"DO");return n&&(a="not "+a),"while "+a+":\n"+(_=t.addLoopTrap(_,e.id)||t.PASS)},control_controls_flow_statements=function(e){switch(e.getFieldValue("FLOW")){case"BREAK":return"break\n";case"CONTINUE":return"continue\n"}throw"Unknown flow statement."},control_controls_delay=function(e,t){return"sleep("+(t.valueToCode(this,"DELAY_TIME",t.ORDER_ATOMIC)||"1000")+")\n"},Panic_with_status_code=function(e,t){return"panic("+(t.valueToCode(this,"STATUS_CODE",t.ORDER_ATOMIC)||"1000")+")\n"},controls_millis=function(e,t){t.definitions_.import_time="import time";return["time.time()",t.ORDER_ATOMIC]},control_reset=function(e,t){return t.definitions_.import_microbit="from microbit import *","reset()\n"},controls_interrupts=function(){return"interrupts();\n"},controls_nointerrupts=function(){return"noInterrupts();\n"},control_controls_forEach=function(e,t){var n=t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"''",a=t.valueToCode(e,"LIST",t.ORDER_RELATIONAL)||"[]",_=t.statementToCode(e,"DO");return"for "+n+" in "+a+":\n"+(_=t.addLoopTrap(_,e.id)||t.PASS)},control_controls_range=function(e,t){return["range("+(t.valueToCode(this,"FROM",t.ORDER_NONE)||"0")+", "+(t.valueToCode(this,"TO",t.ORDER_NONE)||"0")+", "+(t.valueToCode(this,"STEP",t.ORDER_NONE)||"1")+")",t.ORDER_ATOMIC]},control_controls_lambda=function(e,t){var n="lambda "+(t.valueToCode(e,"BOOL",t.ORDER_NONE)||"None")+": "+(t.statementToCode(e,"DO")||"pass");return[n=n.replace("\n","").replace(" ",""),t.ORDER_ATOMIC]},time_sleep=function(e,t){return t.definitions_.import_time="import time","time.sleep("+(t.valueToCode(this,"DELAY_TIME",t.ORDER_ATOMIC)||"1000")+")\n"},control_controls_pass=function(){return"pass\n"},control_controls_thread=function(e,t){t.definitions_.import__thread="import _thread";var n=t.valueToCode(this,"VAR",t.ORDER_NONE)||"None";return"_thread.start_new_thread("+t.variableDB_.getName(t.valueToCode(this,"callback",t.ORDER_NONE)||"None",external_Blockly_namespaceObject.Procedures.NAME_TYPE)+", "+n+")\n"},control_do_while=function(e,t){var n=t.valueToCode(this,"select_data",t.ORDER_NONE)||"False",a=t.statementToCode(this,"input_data");return a="true"==this.getFieldValue("type")?a+" if ("+n+"):\n break\n":a+" if not ("+n+"):\n break\n","while True:\n"+(a=t.addLoopTrap(a,this.id)||t.PASS)},control_controls_repeat_ext=function(e,t){var n=t.valueToCode(this,"TIMES",t.ORDER_ATOMIC),a=t.statementToCode(e,"DO");return"for _my_variable in range("+n+"):\n"+(a=t.addLoopTrap(a,e.id)||t.PASS)},control_garbage_collection=function(e,t){t.definitions_.import_gc="import gc";return"gc.collect()\n"},control_get_mem_alloc=function(e,t){t.definitions_.import_gc="import gc";return["gc.mem_alloc()",t.ORDER_ATOMIC]},control_get_mem_free=function(e,t){t.definitions_.import_gc="import gc";return["gc.mem_free()",t.ORDER_ATOMIC]},control_get_unique_identifier=function(e,t){t.definitions_.import_machine="import machine";return["machine.unique_id()",t.ORDER_ATOMIC]},controls_repeat=control_controls_repeat_ext,control_datetime_fromtimestamp=function(e,t){return t.definitions_.import_datetime="import datetime",["datetime.datetime.fromtimestamp("+t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},control_gene_unique_identifier=function(e,t){var n=external_Mixly_namespaceObject.Boards.getSelectedBoardKey().split(":")[2];t.definitions_["import_"+n+"uuid"]="from "+n+" import uuid";return["uuid()",t.ORDER_ATOMIC]},math_math_number=function(e,t){var n=this.getFieldValue("NUM");return[n,n<0?t.ORDER_UNARY_PREFIX:t.ORDER_ATOMIC]},math_math_constant=function(e,t){return t.definitions_.import_math="import math",["math."+this.getFieldValue("CONSTANT"),t.ORDER_ATOMIC]},math_math_constant_mp=function(e,t){return t.definitions_.import_math="import math",["math."+this.getFieldValue("CONSTANT"),t.ORDER_ATOMIC]},math_math_bit=function(e,t){var n=this.getFieldValue("OP"),a=t.ORDER_ATOMIC;return["("+(t.valueToCode(this,"A",a)||"0")+n+(t.valueToCode(this,"B",a)||"0")+")",a]},math_math_arithmetic=function(e,t){var n=(a={ADD:[" + ",t.ORDER_ADDITIVE],MINUS:[" - ",t.ORDER_ADDITIVE],MULTIPLY:[" * ",t.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",t.ORDER_MULTIPLICATIVE],QUYU:[" % ",t.ORDER_MULTIPLICATIVE],ZHENGCHU:[" // ",t.ORDER_MULTIPLICATIVE],POWER:[" ** ",t.ORDER_EXPONENTIATION]}[e.getFieldValue("OP")])[0],a=a[1];return[(t.valueToCode(e,"A",a)||"0")+n+(e=t.valueToCode(e,"B",a)||"0"),a]},math_math_selfcalcu=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_RELATIONAL)||"0",a=t.valueToCode(this,"B",t.ORDER_RELATIONAL)||"0";switch(this.getFieldValue("OP")){case"ADD":var _="+=";break;case"MINUS":_="-=";break;case"MULTIPLY":_="*=";break;case"DIVIDE":_="/=";break;case"QUYU":_="%=";break;case"ZHENGCHU":_="//=";break;case"POWER":_="**="}return n+" "+_+" "+a+"\n"},math_single=function(e,t){var n,a=e.getFieldValue("OP");if("NEG"==a)return["-"+(n=t.valueToCode(e,"NUM",t.ORDER_UNARY_SIGN)||"0"),t.ORDER_UNARY_SIGN];switch(t.definitions_.import_math="import math",e="SIN"==a||"COS"==a||"TAN"==a?t.valueToCode(e,"NUM",t.ORDER_MULTIPLICATIVE)||"0":t.valueToCode(e,"NUM",t.ORDER_NONE)||"0",a){case"ABS":n="math.fabs("+e+")";break;case"ROOT":n="math.sqrt("+e+")";break;case"LN":n="math.log("+e+")";break;case"LOG10":n="math.log10("+e+")";break;case"EXP":n="math.exp("+e+")";break;case"POW10":n="math.pow(10,"+e+")";break;case"ROUND":n="round("+e+")";break;case"ROUNDUP":n="math.ceil("+e+")";break;case"ROUNDDOWN":n="math.floor("+e+")";break;case"SIN":n="math.sin("+e+")";break;case"COS":n="math.cos("+e+")";break;case"TAN":n="math.tan("+e+")";break;case"++":n="++("+e+")";break;case"--":n="--("+e+")";break;case"-":n="-("+e+")"}if(n)return[n,t.ORDER_EXPONENTIATION];switch(a){case"ASIN":n="math.degrees(math.asin("+e+"))";break;case"ACOS":n="math.degrees(math.acos("+e+"))";break;case"ATAN":n="math.degrees(math.atan("+e+"))"}return[n,t.ORDER_MULTIPLICATIVE]},math_math_trig=math_single,math_math_dec=function(e,t){var n=t.valueToCode(this,"NUM",t.ORDER_NONE)||"0";return[this.getFieldValue("OP")+"("+n+")",t.ORDER_ATOMIC]},math_math_to_int=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_NONE)||"0",a=this.getFieldValue("OP"),_="";return"round"===a?_=a+"("+n+")":(_="math."+a+"("+n+")",t.definitions_.import_math="import math"),[_,t.ORDER_ATOMIC]},math_math_max_min=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_NONE)||"0",a=t.valueToCode(this,"B",t.ORDER_NONE)||"0";return[this.getFieldValue("OP")+"("+n+", "+a+")",t.ORDER_ATOMIC]},math_math_random=function(e,t){t.definitions_.import_random="import random";var n=this.getFieldValue("TYPE"),a=t.valueToCode(this,"FROM",t.ORDER_NONE)||"0",_=t.valueToCode(this,"TO",t.ORDER_NONE)||"0";if("int"==n)var l="random.randint("+a+", "+_+")";else if("float"==n)l="random.uniform("+a+", "+_+")";return[l,t.ORDER_UNARY_POSTFIX]},math_math_map=function(e,t){var n=t.valueToCode(this,"NUM",t.ORDER_NONE),a=t.valueToCode(this,"fromLow",t.ORDER_ATOMIC),_=t.valueToCode(this,"fromHigh",t.ORDER_ATOMIC),l=t.valueToCode(this,"toLow",t.ORDER_ATOMIC),s=t.valueToCode(this,"toHigh",t.ORDER_ATOMIC);return t.definitions_.import_mixpy_math_map="from mixpy import math_map",["math_map("+n+", "+a+", "+_+", "+l+", "+s+")",t.ORDER_NONE]},math_math_constrain=function(e,t){return["min(max("+(t.valueToCode(this,"VALUE",t.ORDER_NONE)||"0")+", "+(t.valueToCode(this,"LOW",t.ORDER_NONE)||"0")+"), "+(t.valueToCode(this,"HIGH",t.ORDER_NONE)||"0")+")",t.ORDER_UNARY_POSTFIX]},math_math_number_base_conversion=function(e,t){var n=e.getFieldValue("OP"),a=t.valueToCode(this,"NUM",t.ORDER_NONE)||"0",_=e.getFieldValue("OP2");t.definitions_.import_math="import math";var l="",s="10";if("two"==n?s="2":"eight"==n?s="8":"ten"==n?s="10":"sixteen"==n&&(s="16"),"two"==_?l="bin":"eight"==_?l="oct":"ten"==_?l="":"sixteen"==_&&(l="hex"),""==l)var i="int(str("+a+"), "+s+")";else i=l+"(int(str("+a+"), "+s+"))";return[i,t.ORDER_ATOMIC]},math_math_random_seed=function(e,t){return t.definitions_.import_random="import random","random.seed("+(t.valueToCode(this,"NUM",t.ORDER_NONE)||"0")+");\n"},math_math_indexer_number=function(e,t){var n=this.getFieldValue("NUM");return[n,n<0?t.ORDER_UNARY_PREFIX:t.ORDER_ATOMIC]},math_math_round=function(e,t){return["round("+(t.valueToCode(this,"VALUE",t.ORDER_NONE)||"0")+", "+(t.valueToCode(this,"VAR",t.ORDER_NONE)||"0")+")",t.ORDER_ATOMIC]},math_text_to_number=function(e,t){var n=this.getFieldValue("TOWHAT"),a=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);return"b"==n?[a+'.encode("utf-8")',t.ORDER_ATOMIC]:"bti"==n?["int.from_bytes("+a+',"big")',t.ORDER_ATOMIC]:[n+"("+a+")",t.ORDER_ATOMIC]},math_text_to_number_skulpt=function(e,t){var n=this.getFieldValue("TOWHAT"),a=t.valueToCode(this,"VAR",t.ORDER_ATOMIC);return"b"==n?[a+'.encode("utf-8")',t.ORDER_ATOMIC]:[n+"("+a+")",t.ORDER_ATOMIC]},math_base_map=math_math_map,math_turn_to_int=function(e,t){return t.definitions_.import_hexlify="from ubinascii import hexlify",["hexlify("+t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+").decode()",t.ORDER_ATOMIC]},math_generate_cartesian_product=function(e,t){t.definitions_.import_itertools="import itertools";let n=t.valueToCode(this,"REPEAT",t.ORDER_ATOMIC),a=new Array(this.itemCount_);for(let e=0;e",GTE:">="};const logic_logic_operation=function(e,t){var n=this.getFieldValue("OP"),a="&&"==n?t.ORDER_LOGICAL_AND:t.ORDER_LOGICAL_OR,_=t.valueToCode(this,"A",a)||"False",l=t.valueToCode(this,"B",a)||"False";if("AND"==n)var s=_+" and "+l;else if("OR"==n)s=_+" or "+l;else if("NOR"==n)s="not("+_+"^"+l+")";else s=_+"^"+l;return[s,a]},logic_logic_negate=function(e,t){var n=t.ORDER_UNARY_PREFIX;return["not "+(t.valueToCode(this,"BOOL",n)||"False"),n]},logic_logic_boolean=function(e,t){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",t.ORDER_ATOMIC]},logic_logic_null=function(e,t){return["None",t.ORDER_ATOMIC]},logic_logic_true_or_false=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"False";return["("+(t.valueToCode(this,"B",t.ORDER_ATOMIC)||"False")+" if "+n+" else "+(t.valueToCode(this,"C",t.ORDER_ATOMIC)||"False")+")",t.ORDER_ATOMIC]},logic_logic_is_in=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"''",a=t.valueToCode(this,"B",t.ORDER_ATOMIC)||"''";return[n+" "+this.getFieldValue("BOOL")+" "+a,t.ORDER_ATOMIC]},logic_logic_is=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"''",a=t.valueToCode(this,"B",t.ORDER_ATOMIC)||"''";return[n+" "+this.getFieldValue("BOOL")+" "+a,t.ORDER_ATOMIC]},logic_logic_tobool=function(e,t){return["bool("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"0")+")",t.ORDER_ATOMIC]},storage_storage_open_file_with_os=function(e,t){return t.definitions_.import_os="import os","os.startfile("+t.valueToCode(this,"fn",t.ORDER_ATOMIC)+")\n"},storage_storage_fileopen=function(e,t){return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+" = open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},storage_storage_fileopen_new=function(e,t){return["open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",t.ORDER_ATOMIC]},storage_storage_fileopen_new_encoding=function(e,t){return["open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',t.ORDER_ATOMIC]},storage_storage_file_write=function(e,t){var n=t.valueToCode(this,"data",t.ORDER_ATOMIC);return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".write("+n+")\n"},storage_storage_get_contents_without_para=function(e,t){var n=this.getFieldValue("MODE");return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+"."+n+"()",t.ORDER_ATOMIC]},storage_storage_get_contents=function(e,t){var n=this.getFieldValue("MODE");return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+"."+n+"("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},storage_storage_get_a_line=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".readline("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},storage_storage_can_write_ornot=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".writable()",t.ORDER_ATOMIC]},storage_storage_get_filename=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".name()",t.ORDER_ATOMIC]},storage_storage_close_file=function(e,t){return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".close()\n"},storage_storage_list_all_files=function(e,t){t.definitions_.import_os="import os";return["os.listdir()",t.ORDER_ATOMIC]},storage_storage_delete_file=function(e,t){return t.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},storage_storage_get_file_size=function(e,t){return t.definitions_.import_os="import os",["os.path.getsize("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},storage_storage_file_tell=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".tell()",t.ORDER_ATOMIC]},storage_storage_file_seek=function(e,t){var n=this.getFieldValue("MODE"),a=0;return a="start"==n?0:"current"==n?1:2,t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".seek("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+","+a+")\n"},storage_storage_change_dir=function(e,t){return t.definitions_.import_os="import os","os.chdir("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},storage_storage_get_current_dir=function(e,t){t.definitions_.import_os="import os";return["os.getcwd()",t.ORDER_ATOMIC]},storage_storage_make_dir=function(e,t){return t.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+t.valueToCode(this,"PATH",t.ORDER_ATOMIC)+")\n"},storage_storage_rename=function(e,t){return t.definitions_.import_os="import os","os.rename("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+","+t.valueToCode(this,"NEWFILE",t.ORDER_ATOMIC)+")\n"},storage_storage_is_file=function(e,t){t.definitions_.import_os="import os";var n=t.valueToCode(this,"FILE",t.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+n+")",t.ORDER_ATOMIC]},storage_sdcard_use_spi_init=function(e,t){return t.definitions_.import_os="import os",t.definitions_.import_sdcard="import sdcard",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+" = sdcard.SDCard("+t.valueToCode(this,"SPISUB",t.ORDER_ATOMIC)+","+t.valueToCode(this,"PINSUB",t.ORDER_ATOMIC)+")\n"},storage_sdcard_mount=function(e,t){return t.definitions_.import_os="import os",t.definitions_.import_sdcard="import sdcard","os.mount("+t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+","+t.valueToCode(this,"DIR",t.ORDER_ATOMIC)+")\n"},procedures_procedures_defreturn=function(e,t){var n=t.variableDB_.getName(this.getFieldValue("NAME"),external_Blockly_namespaceObject.Procedures.NAME_TYPE),a=(this.getInput("STACK")&&t.statementToCode(this,"STACK"))??" pass\n";t.INFINITE_LOOP_TRAP&&(a=t.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+a);var _=t.valueToCode(this,"RETURN",t.ORDER_NONE)||"";_&&(_=" return "+_+"\n");for(var l=[],s=0;s\n\n\n\t\n"+t.statementToCode(this,"HEAD")+"\n\n"+t.statementToCode(this,"BODY")+"\n\n'''",t.ORDER_ATOMIC]},html_html_title=function(e,t){var n=t.statementToCode(this,"DO"),a=this.getFieldValue("LEVEL");return"\n"+n+"\n"},html_html_head_body=function(e,t){var n=t.statementToCode(this,"DO"),a=this.getFieldValue("LEVEL");if("head"==a)var _="<"+a+'>\n\t\n'+n+"\n";else _="<"+a+">\n"+n+"\n";return _},html_html_content=function(e,t){var n=t.statementToCode(this,"DO"),a=this.getFieldValue("LEVEL");return"<"+a+">\n"+n+"\n"},html_html_content_more=function(e,t){var n=t.statementToCode(this,"DO"),a=t.valueToCode(this,"style"),_=this.getFieldValue("LEVEL");return"<"+_+" "+a+" >\n"+n+"\n"},html_html_style=function(e,t){return['style="'+t.statementToCode(this,"STYLE")+'"',t.ORDER_ATOMIC]},html_html_form=function(e,t){return'"},html_html_style_content=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},html_html_text=function(){return this.getFieldValue("TEXT")+"\n"},utility_raw_block=function(e){return e.getFieldValue("TEXT")+"\n"},utility_raw_expression=function(e,t){return[e.getFieldValue("TEXT"),t.ORDER_ATOMIC]},utility_raw_empty=function(e,t){return(t.valueToCode(e,"VALUE",t.ORDER_ATOMIC)||"")+"\n"},utility_raw_table=function(){return""},utility_type_check=function(e,t){return["type("+(t.valueToCode(e,"VALUE",t.ORDER_MEMBER)||"___")+")",t.ORDER_ATOMIC]},utility_function_call=function(e,t){for(var n=e.getFieldValue("NAME"),a=e.hasReturn_,_=new Array(e.itemCount_),l=0;l0?t.join("\n")+n.join("\n")+a.join("\n")+s.join("\n")+i.join("")+e+"while True:\n"+o.join("")+p.join("\n"):t.join("\n")+n.join("\n")+a.join("\n")+s.join("\n")+i.join("")+e+p.join("\n")},Python.scrubNakedValue=function(e){return e+"\n"},Python.quote_=function(e){var t="'";return-1!==e.indexOf("'")&&(-1===e.indexOf('"')?t='"':e=e.replace(/'/g,"\\'")),t+e+t},Python.multiline_quote_=function(e){return"'''"+(e=e.replace(/'''/g,"\\'\\'\\'"))+"'''"},Python.scrub_=function(e,t,n){var a="";if(!e.outputConnection||!e.outputConnection.targetConnection){(l=e.getCommentText())&&(l=external_Blockly_namespaceObject.utils.string.wrap(l,Python.COMMENT_WRAP-3),a+=Python.prefixLines(l+"\n","# "));for(var _=0;_0?"int("+i+" + "+_+")":_<0?"int("+i+" - "+-_+")":"int("+i+")",a&&(i="-"+i)),i};const AI_HUE=205,AI_ChooseAndGet={init:function(){this.setColour(AI_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_CHOOSE_AND_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_CHOOSE_AND_GET_ONE_FILE_NAME,"getOneFile"],[external_Blockly_namespaceObject.Msg.MIXLY_CHOOSE_AND_GET_MANY_FILE_NAMES,"getManyFiles"],[external_Blockly_namespaceObject.Msg.MIXLY_CHOOSE_AND_GET_DIR,"getDirectory"]]),"TYPE"),this.setInputsInline(!0),this.setOutput(!0)}},AI_client={init:function(){this.setColour(AI_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_SETUP).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify,"AipImageClassify"],[external_Blockly_namespaceObject.Msg.MIXLY_AipSpeech,"AipSpeech"],[external_Blockly_namespaceObject.Msg.MIXLY_AipImageCensor,"AipImageCensor"],[external_Blockly_namespaceObject.Msg.MIXLY_AipFace,"AipFace"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr,"AipOcr"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp,"AipNlp"]]),"CTYPE"),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("API_KEY").appendField("API_KEY").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("SECRET_KEY").appendField("SECRET_KEY").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},AI_Speech_synthesis={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipSpeech_synthesis).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("STR").appendField(external_Blockly_namespaceObject.Msg.OLED_STRING).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipSpeech_synthesis_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_Speech_asr={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipSpeech_asr).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipSpeech_File).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipSpeech_ASR_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_ImageClassify={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_FUNC).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ADDR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_Image).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_advancedGeneral_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_ImageClassify_Func={init:function(){this.setColour(AI_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_advancedGeneral,"advancedGeneral"],[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_dishDetect,"dishDetect"],[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_carDetect,"carDetect"],[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_animalDetect,"animalDetect"],[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_plantDetect,"plantDetect"],[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_logoSearch,"logoSearch"]]),"TYPE"),this.setOutput(!0)}},AI_Face_match={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipFace_match).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_Image+"1"+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("VAR2").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_Image+"2"+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipFace_match_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_Ocr={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipOcr).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_FUNC).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ADDR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify_Image).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_Ocr_Func={init:function(){this.setColour(AI_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_basicGeneral,"basicGeneral"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_webImage,"webImage"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_idcard,"idcard"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_bankcard,"bankcard"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_drivingLicense,"drivingLicense"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_vehicleLicense,"vehicleLicense"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_licensePlate,"licensePlate"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_businessLicense,"businessLicense"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_receipt,"receipt"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_trainTicket,"trainTicket"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_taxiReceipt,"taxiReceipt"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_form,"tableRecognition"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_vatInvoice,"vatInvoice"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_passport,"passport"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr_handwriting,"handwriting"]]),"TYPE"),this.setOutput(!0)}},AI_Nlp={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_FUNC).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("STR").appendField(external_Blockly_namespaceObject.Msg.OLED_STRING).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_Nlp_Sim={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Sim).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_FUNC).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("STR1").appendField(external_Blockly_namespaceObject.Msg.OLED_STRING+"1").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("STR2").appendField(external_Blockly_namespaceObject.Msg.OLED_STRING+"2").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Sim_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_Nlp_Func={init:function(){this.setColour(AI_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_lexer,"lexer"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_depParser,"depParser"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_wordEmbedding,"wordEmbedding"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_dnnlm,"dnnlm"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_commentTag,"commentTag"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_sentimentClassify,"sentimentClassify"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_keyword,"keyword"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_topic,"topic"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_ecnet,"ecnet"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_emotion,"emotion"]]),"TYPE"),this.setOutput(!0)}},AI_Nlp_Func_sim={init:function(){this.setColour(AI_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_wordSimEmbedding,"wordSimEmbedding"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_simnet,"simnet"]]),"TYPE"),this.setOutput(!0)}},AI_Nlp_Topic={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_topic).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("STR1").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Topic_Title).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("STR2").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Topic_Content).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Topic_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_Nlp_newsSummary={init:function(){this.setColour(AI_HUE),this.appendValueInput("SUB").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_summary).appendField(external_Blockly_namespaceObject.Msg.MIXLY_Client).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("STR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Topic_Content).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("LEN").appendField(external_Blockly_namespaceObject.Msg.MIXLY_LIST_LEN).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Summary_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},AI_audio={init:function(){this.setColour(AI_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXPY_AI_AUDIO),this.appendValueInput("TIME").appendField(external_Blockly_namespaceObject.Msg.MIXPY_AI_AUDIO_TIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXPY_AI_AUDIO_TOOLTIP)}},AI_photo={init:function(){this.setColour(AI_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXPY_AI_PHOTO),this.appendValueInput("BUT").appendField(external_Blockly_namespaceObject.Msg.MIXPY_AI_PHOTO_BUTTON),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXPY_AI_PHOTO_TOOLTIP)}},AI_result={init:function(){this.setColour(AI_HUE),this.appendValueInput("AI").appendField(external_Blockly_namespaceObject.Msg.MIXPY_AI_RESULT).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_AipImageClassify,"Image"],[external_Blockly_namespaceObject.Msg.MIXLY_AipSpeech_asr,"Speech"],[external_Blockly_namespaceObject.Msg.MIXLY_AipFace_match,"Face"],[external_Blockly_namespaceObject.Msg.MIXLY_AipOcr,"Ocr"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_simnet,"OcrSimilarity"],[external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_sentimentClassify,"Emotion"]]),"CTYPE"),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.LOGIC_NEGATE_TOOLTIP)}},ALGORITHM_HUE="#526FC3",algorithm_prepare={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_add_school={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_ADD_SCHOOL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_find_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_FIND_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_new_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NEW_PATH),this.setOutput(!0)}},algorithm_set_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_SET_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_add_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_ADD_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_del_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_DEL_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_return_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_RETURN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_no_left={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NO_LEFT),this.setOutput(!0)}},algorithm_print_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_prepare2={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_current_school={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_CURRENT_SCHOOL),this.setOutput(!0)}},algorithm_no_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NO_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_prepare_2_1={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE_2_1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_prepare_2_2={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE_2_2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_move_recent={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_MOVE_RECENT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_not_home={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NOT_HOME),this.setOutput(!0)}},algorithm_not_school={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NOT_SCHOOL),this.setOutput(!0)}},algorithm_print_path2={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_PATH2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},hanoi_init={init:function(){this.appendDummyInput().appendField("准备").appendField(new external_Blockly_namespaceObject.FieldNumber(3,0,100,1),"NUM").appendField("层汉诺塔"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},hanoi_move={init:function(){this.appendDummyInput().appendField("移动圆盘从"),this.appendValueInput("FROM_NUM").setCheck(null).appendField("柱"),this.appendDummyInput().appendField("到"),this.appendValueInput("TO_NUM").setCheck(null).appendField("柱"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_all_books={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_ALL_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_all_books_sequence={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_ALL_BOOKS2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_first_book={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_FIRST_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_no_ring2={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NO_RING),this.setOutput(!0)}},algorithm_yes_ring2={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_YES_RING),this.setOutput(!0)}},algorithm_next_book={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NEXT_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_two_left={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_TWO_LEFT),this.setOutput(!0)}},algorithm_divide_books={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_DIVIDE_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_get_half_books={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_GET_HALF_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_delete_book={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_DELETE_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_delete_books={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_DELETE_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_delete_books2={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_DELETE_BOOKS2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_print_book2={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_book_scale={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("设置待查书总数 N=").appendField(new external_Blockly_namespaceObject.FieldDropdown([["5","5"],["10","10"],["20","20"],["50","50"]]),"NUM"),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_number_zero={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NUMBER_ZERO),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_number_add={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_NUMBER_ADD),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_print_number={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_get_book_num={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField("n"+external_Blockly_namespaceObject.Msg.MIXLY_VALUE2).appendField(new external_Blockly_namespaceObject.FieldTextInput("50"),"NUM"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_print_sequence={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_SEQUENCE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_print_divide={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_DIVIDE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_init_jttl={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("初始化鸡兔同笼问题:"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("有若干只鸡、兔在同一个笼子里。"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("从上面数鸡兔有10个头,"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("从下面数鸡兔有32只脚。"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("问笼中有多少只鸡和多少只兔?"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_rabbit_zero={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("假设兔子的数量为0只"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_rabbit_number_in_range={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("兔子的数量在范围之内"),this.setOutput(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_chick_calculate={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("根据(头数-兔子数)计算出鸡的数量"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_check_feet={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("计算得到脚的数量正确"),this.setOutput(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_print_jttl_answer={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("输出鸡、兔的数量"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_rabbit_add={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("假设兔子数量要更多一只"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_init_fzsf={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("加载路线图"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_fz_calc={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("计算").appendField(new external_Blockly_namespaceObject.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME").appendField("长度"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_fz_calc_first_min={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("设置S1为Smin"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_fz_compare={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField(new external_Blockly_namespaceObject.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME").appendField("的长度比").appendField(new external_Blockly_namespaceObject.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME2").appendField("短"),this.setOutput(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_fz_set_min={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("设置").appendField(new external_Blockly_namespaceObject.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME").appendField("为Smin"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_fz_move={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("按照Smin移动"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_init_hxdb={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("初始化韩信点兵问题:"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("有未知数量的若干士兵。"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("若3人一排列队,多1人;"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("若5人一排列队,多2人;"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("若7人一排列队,多2人;"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("问士兵的数量最少是多少人?"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_hxdb_init_soldier={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("初始化士兵为").appendField(new external_Blockly_namespaceObject.FieldTextInput("7"),"NUM").appendField("个"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_hxdb_stand_in_line={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("使士兵").appendField(new external_Blockly_namespaceObject.FieldDropdown([["3","3"],["5","5"],["7","7"]]),"NUM").appendField("人一排列队"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_hxdb_last_line={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("剩余").appendField(new external_Blockly_namespaceObject.FieldTextInput("1"),"NUM").appendField("个士兵"),this.setOutput(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_hxdb_add={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("增加1个士兵"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},algorithm_hxdb_result={init:function(){this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.LEFT).appendField("输出士兵数量"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setTooltip(""),this.setHelpUrl("")}},hanoi_init_offline={init:function(){this.appendDummyInput().appendField("准备").appendField(new external_Blockly_namespaceObject.FieldNumber(3,0,100,1),"NUM").appendField("层汉诺塔"),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(ALGORITHM_HUE),this.setInputsInline(!0),this.setTooltip(""),this.setHelpUrl("")}},algorithm_get_current_location={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_GET_CURRENT_LOCATION),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},algorithm_void_path={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_ALGORITHM_VOID_PATH),this.setOutput(!0)}},algorithm_color_seclet={init:function(){this.setColour(ALGORITHM_HUE),this.appendDummyInput("").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(new external_Blockly_namespaceObject.FieldColour("ff0000"),"COLOR"),this.setInputsInline(!0),this.setOutput(!0,String)}},COMMUNICATE_HUE="#3288dd",requests_get_old={init:function(){this.setColour(COMMUNICATE_HUE),this.appendValueInput("DOMAIN").appendField(external_Blockly_namespaceObject.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_REQUESTS_GET).appendField(new external_Blockly_namespaceObject.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},requests_get={init:function(){this.setColour(COMMUNICATE_HUE),this.appendValueInput("URL").appendField(external_Blockly_namespaceObject.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_CONDUCT).appendField(new external_Blockly_namespaceObject.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(external_Blockly_namespaceObject.Msg.blockpy_REQUESTS).appendField(external_Blockly_namespaceObject.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},requests_post={init:function(){this.setColour(COMMUNICATE_HUE),this.appendValueInput("URL").appendField(external_Blockly_namespaceObject.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_CONDUCT).appendField(new external_Blockly_namespaceObject.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(external_Blockly_namespaceObject.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(external_Blockly_namespaceObject.Msg.blockpy_REQUESTS+external_Blockly_namespaceObject.Msg.OLED_STRING),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},requests_attribute={init:function(){this.appendValueInput("VAL");var e=[[external_Blockly_namespaceObject.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[external_Blockly_namespaceObject.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[external_Blockly_namespaceObject.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[external_Blockly_namespaceObject.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[external_Blockly_namespaceObject.Msg.MIXPY_TEXT_ENCODE,"encoding"]];this.setColour(COMMUNICATE_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},requests_method={init:function(){this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(COMMUNICATE_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_CONDUCT).appendField(new external_Blockly_namespaceObject.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"DIR"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{forward:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[t]}))}},CV_HUE="f0a559",cv_read_image={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_IMREAD),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},cv_show_image={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.OLED_BITMAP),this.appendValueInput("data").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_AipNlp_Topic_Title),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},cv_write_image={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_IMWRITE),this.appendValueInput("data").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.HTML_NAME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},cv_waitkey={init:function(){this.setColour(CV_HUE),this.appendValueInput("data").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_DELAY),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MILLIS+external_Blockly_namespaceObject.Msg.MIXLY_CV_OR_PRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_CV_WAITKEY_TOOLTIP)}},cv_destroy_all={init:function(){this.setColour(CV_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_DESTROY_ALL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},cv_line_rect={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_IMAGE);var e=[[external_Blockly_namespaceObject.Msg.MIXLY_CV_RECT,"rectangle"],[external_Blockly_namespaceObject.Msg.MIXLY_CV_LINE,"line"]];this.appendValueInput("x1").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_DISPLAY_DRAW).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_BEGIN+"(x1"),this.appendValueInput("y1").setCheck(Number).appendField(",y1"),this.appendValueInput("x2").setCheck(Number).appendField(") "+external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_END+"(x2"),this.appendValueInput("y2").setCheck(Number).appendField(",y2"),this.appendDummyInput().appendField(") "+external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_COLOR).appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"FIELDNAME"),this.appendValueInput("thick").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_THICKNESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_RECT_TOOLTIP)}},cv_text={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_IMAGE);this.appendValueInput("data").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWTEXT),this.appendValueInput("x1").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_BEGIN+"(x1"),this.appendValueInput("y1").setCheck(Number).appendField(",y1"),this.appendDummyInput().appendField(") "+external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NAME).appendField(new external_Blockly_namespaceObject.FieldDropdown([["SIMPLEX","SIMPLEX"],["PLAIN","PLAIN"],["DUPLEX","DUPLEX"],["COMPLEX","COMPLEX"],["COMPLEX_SMALL","COMPLEX_SMALL"],["TRIPLEX","TRIPLEX"],["SCRIPT_SIMPLEX","SCRIPT_SIMPLEX"],["SCRIPT_COMPLEX","SCRIPT_COMPLEX"]]),"font"),this.appendValueInput("size").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendDummyInput().appendField(") "+external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_COLOR).appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"FIELDNAME"),this.appendValueInput("thick").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_THICKNESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_CV_DRAWLINE_RECT_TOOLTIP)}},cv_face_classifier={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_CLASSIFIER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},cv_face_detect={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("FACE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_DETECT),this.appendValueInput("SCALE").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_DETECT_SCALE),this.appendValueInput("NEIGHBOR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_DETECT_NEIGHBOR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},cv_face_detect_all={init:function(){this.setColour(CV_HUE),this.appendValueInput("FILE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("FACE").appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_DETECT),this.appendValueInput("SCALE").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_DETECT_SCALE),this.appendValueInput("NEIGHBOR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_DETECT_NEIGHBOR),this.appendValueInput("x1").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_CV_FACE_DETECT_RANGE).appendField(external_Blockly_namespaceObject.Msg.blockpy_TUPLE_MIN),this.appendValueInput("y1").setCheck(Number).appendField("×"),this.appendValueInput("x2").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.blockpy_TUPLE_MAX),this.appendValueInput("y2").setCheck(Number).appendField("×"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},DATA_HUE=170,series_create={init:function(){this.setColour(DATA_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_series_create).appendField(new external_Blockly_namespaceObject.FieldTextInput("ser1"),"VAR"),this.appendValueInput("SER").appendField(external_Blockly_namespaceObject.Msg.blockpy_series_via),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.blockpy_series_create_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},series_create_from_index={init:function(){this.setColour(DATA_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_series_create).appendField(new external_Blockly_namespaceObject.FieldTextInput("ser1"),"VAR"),this.appendValueInput("SER").appendField(external_Blockly_namespaceObject.Msg.blockpy_series_via),this.appendValueInput("INDEX").setCheck([String,"List"]).appendField(external_Blockly_namespaceObject.Msg.blockpy_series_set_index),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.blockpy_series_create_index_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},dataframe_create={init:function(){this.setColour(DATA_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_dataframe_create).appendField(new external_Blockly_namespaceObject.FieldTextInput("df1"),"VAR"),this.appendValueInput("SER").appendField(external_Blockly_namespaceObject.Msg.blockpy_series_via),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.blockpy_dataframe_create_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},dataframe_create_from_one_index={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.DATAFRAME_RAW,"index"],[external_Blockly_namespaceObject.Msg.DATAFRAME_COLUMN,"columns"]];this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_dataframe_create).appendField(new external_Blockly_namespaceObject.FieldTextInput("df1"),"VAR"),this.appendValueInput("SER").appendField(external_Blockly_namespaceObject.Msg.blockpy_series_via),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"COLUMN_RAW"),this.appendValueInput("INDEX").setCheck([String,"List"]).appendField(external_Blockly_namespaceObject.Msg.blockpy_series_set_index),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.blockpy_dataframe_create_index_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},dataframe_create_from_index={init:function(){this.setColour(DATA_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_dataframe_create).appendField(new external_Blockly_namespaceObject.FieldTextInput("df1"),"VAR"),this.appendValueInput("SER").appendField(external_Blockly_namespaceObject.Msg.blockpy_series_via),this.appendValueInput("INDEX_COLUMN").setCheck([String,"List"]).appendField(external_Blockly_namespaceObject.Msg.blockpy_dataframe_set_index_column),this.appendValueInput("INDEX_RAW").setCheck([String,"List"]).appendField(external_Blockly_namespaceObject.Msg.blockpy_dataframe_set_index_raw),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.blockpy_dataframe_create_index_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},series_create_from_text={init:function(){this.setColour(DATA_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldTextInput("ser1"),"VAR").appendField(" = [").appendField(new external_Blockly_namespaceObject.FieldTextInput("1,2,3"),"TEXT").appendField("]"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_SERIES_CREATE_FROM_TEXT)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},series_index_value={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.SERIES_INDEX,"index"],[external_Blockly_namespaceObject.Msg.HTML_VALUE,"value"]];this.appendValueInput("SERIES").setCheck("Series"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.SERIES_INDEX_VALUE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"INDEX_VALUE"),this.setOutput(!0,"List");var t=this;this.setTooltip((function(){var e=t.getFieldValue("INDEX_VALUE");return{index:external_Blockly_namespaceObject.Msg.SERIES_INDEX_TOOLTIP,value:external_Blockly_namespaceObject.Msg.HTML_VALUE_TOOLTIP}[e]}))}},series_get_num={init:function(){this.setColour(DATA_HUE),this.setOutput(!0),this.appendValueInput("SER").setCheck("Series"),this.appendValueInput("AT").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.LANG_LISTS_GET_INDEX1),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.LANG_LISTS_GET_INDEX2),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.TUPLE_GET_INDEX_TOOLTIP)}},pl_plot_easy={init:function(){this.setColour(DATA_HUE),this.appendValueInput("SER").setCheck("Series").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl_plot={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],t=[[external_Blockly_namespaceObject.Msg.COLOUR_RGB_BLUE,"b"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_GREEN,"g"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_RED,"r"],[external_Blockly_namespaceObject.Msg.COLOUR_CYAN,"c"],[external_Blockly_namespaceObject.Msg.COLOUR_MAGENTA,"m"],[external_Blockly_namespaceObject.Msg.COLOUR_YELLOW,"y"],[external_Blockly_namespaceObject.Msg.COLOUR_BLACK,"k"],[external_Blockly_namespaceObject.Msg.COLOUR_WHITE,"w"]],n=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("SER").setCheck("Series").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new external_Blockly_namespaceObject.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl_show={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl_axes={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl_legend={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl_title={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl_label={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_X,"x"],[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_SET_LABEL).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.appendValueInput("LABEL").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},array_create={init:function(){this.setColour(DATA_HUE),this.appendValueInput("FROM").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_SPLITBYDOU).appendField(external_Blockly_namespaceObject.Msg.MIXPY_DATA_ARRAY_CREATE_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXPY_DATA_ARRAY_CREATE_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},pl_plot_bar={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_DISPLAY_DRAW).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{plot:external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[e]}))}},pl_plot_scatter={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.COLOUR_RGB_BLUE,"b"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_GREEN,"g"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_RED,"r"],[external_Blockly_namespaceObject.Msg.COLOUR_CYAN,"c"],[external_Blockly_namespaceObject.Msg.COLOUR_MAGENTA,"m"],[external_Blockly_namespaceObject.Msg.COLOUR_YELLOW,"y"],[external_Blockly_namespaceObject.Msg.COLOUR_BLACK,"k"],[external_Blockly_namespaceObject.Msg.COLOUR_WHITE,"w"]],t=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_SCATTER).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"DOT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},pl_plot_xy={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],t=[[external_Blockly_namespaceObject.Msg.COLOUR_RGB_BLUE,"b"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_GREEN,"g"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_RED,"r"],[external_Blockly_namespaceObject.Msg.COLOUR_CYAN,"c"],[external_Blockly_namespaceObject.Msg.COLOUR_MAGENTA,"m"],[external_Blockly_namespaceObject.Msg.COLOUR_YELLOW,"y"],[external_Blockly_namespaceObject.Msg.COLOUR_BLACK,"k"],[external_Blockly_namespaceObject.Msg.COLOUR_WHITE,"w"]],n=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new external_Blockly_namespaceObject.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},pl_bar={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[external_Blockly_namespaceObject.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_BAR).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"ALIGN"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},pl_pie={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[external_Blockly_namespaceObject.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],t=[[external_Blockly_namespaceObject.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE).appendField(external_Blockly_namespaceObject.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"autopct"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},pl_hist={init:function(){this.setColour(DATA_HUE),this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_HIST).appendField(external_Blockly_namespaceObject.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pl_ticks={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_X,"x"],[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_SETTING).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},numpy_trig={init:function(){var e=[["sin","sin"],["cos","cos"],["tan","tan"],["arcsin","arcsin"],["arccos","arccos"],["arctan","arctan"],[external_Blockly_namespaceObject.Msg.LANG_MATH_TO_ROUND,"round"],[external_Blockly_namespaceObject.Msg.LANG_MATH_TO_CEIL,"ceil"],[external_Blockly_namespaceObject.Msg.LANG_MATH_TO_FLOOR,"floor"]];this.setColour(DATA_HUE),this.setOutput(!0),this.setInputsInline(!0),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.mixpy_NUMPY_TRIG),this.appendValueInput("NUM").setCheck(Number).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"OP"),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_NUMPY_TRIG_TOOLTIP)}},pl_subplot={init:function(){this.setColour(DATA_HUE),this.appendValueInput("VET").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},pandas_readcsv={init:function(){this.setColour(DATA_HUE),this.appendValueInput("FILENAME").appendField(external_Blockly_namespaceObject.Msg.MIXPY_PANDAS_READ_CSV),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.mixpy_PANDAS_READCSV_HEADER_Y,"0"],[external_Blockly_namespaceObject.Msg.mixpy_PANDAS_READCSV_HEADER_N,"None"]]),"MODE"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.mixpy_PANDAS_READCSV_TITLE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PANDAS_READCSV_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},dataframe_get={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.mixpy_DATAFRAME_GET),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_DATAFRAME_GET_INDEX).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.DATAFRAME_COLUMN,"column"],[external_Blockly_namespaceObject.Msg.DATAFRAME_RAW,"raw"]]),"MODE"),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_DATAFRAME_GET_TOOLTIP)}},pl_savefig={init:function(){this.setColour(DATA_HUE),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},pl_text={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.TEXT_TRIM_LEFT,"right"],[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_CENTER,"center"],[external_Blockly_namespaceObject.Msg.TEXT_TRIM_RIGHT,"left"]],t=[[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_TOP,"bottom"],[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_CENTER,"center"],[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_SETTING).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_HOR).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"HALIGN"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_VER).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_TOOLTIP)}},array_toarray={init:function(){this.setColour(DATA_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TOARRAY),this.setOutput(!0,"List"),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TOOLTIP_TOARRAY)}},plot_plot_easy={init:function(){this.setColour(DATA_HUE),this.appendValueInput("SER").setCheck("Series").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_plot={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],t=[[external_Blockly_namespaceObject.Msg.COLOUR_RGB_BLUE,"b"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_GREEN,"g"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_RED,"r"],[external_Blockly_namespaceObject.Msg.COLOUR_CYAN,"c"],[external_Blockly_namespaceObject.Msg.COLOUR_MAGENTA,"m"],[external_Blockly_namespaceObject.Msg.COLOUR_YELLOW,"y"],[external_Blockly_namespaceObject.Msg.COLOUR_BLACK,"k"],[external_Blockly_namespaceObject.Msg.COLOUR_WHITE,"w"]],n=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("SER").setCheck("Series").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new external_Blockly_namespaceObject.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_show={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_axes={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_legend={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_title={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_label={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_X,"x"],[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_SET_LABEL).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.appendValueInput("LABEL").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_plot_bar={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_DISPLAY_DRAW).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{plot:external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[e]}))}},plot_plot_scatter={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.COLOUR_RGB_BLUE,"b"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_GREEN,"g"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_RED,"r"],[external_Blockly_namespaceObject.Msg.COLOUR_CYAN,"c"],[external_Blockly_namespaceObject.Msg.COLOUR_MAGENTA,"m"],[external_Blockly_namespaceObject.Msg.COLOUR_YELLOW,"y"],[external_Blockly_namespaceObject.Msg.COLOUR_BLACK,"k"],[external_Blockly_namespaceObject.Msg.COLOUR_WHITE,"w"]],t=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_SCATTER).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"DOT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},plot_plot_xy={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],t=[[external_Blockly_namespaceObject.Msg.COLOUR_RGB_BLUE,"b"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_GREEN,"g"],[external_Blockly_namespaceObject.Msg.COLOUR_RGB_RED,"r"],[external_Blockly_namespaceObject.Msg.COLOUR_CYAN,"c"],[external_Blockly_namespaceObject.Msg.COLOUR_MAGENTA,"m"],[external_Blockly_namespaceObject.Msg.COLOUR_YELLOW,"y"],[external_Blockly_namespaceObject.Msg.COLOUR_BLACK,"k"],[external_Blockly_namespaceObject.Msg.COLOUR_WHITE,"w"]],n=[[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new external_Blockly_namespaceObject.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},plot_bar={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[external_Blockly_namespaceObject.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_BAR).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"ALIGN"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.HTML_COLOUR).appendField(new external_Blockly_namespaceObject.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},plot_pie={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[external_Blockly_namespaceObject.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],t=[[external_Blockly_namespaceObject.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE).appendField(external_Blockly_namespaceObject.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"autopct"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},plot_hist={init:function(){this.setColour(DATA_HUE),this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_HIST).appendField(external_Blockly_namespaceObject.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},plot_ticks={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_X,"x"],[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_SETTING).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},plot_subplot={init:function(){this.setColour(DATA_HUE),this.appendValueInput("VET").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},plot_savefig={init:function(){this.setColour(DATA_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},plot_text={init:function(){this.setColour(DATA_HUE);var e=[[external_Blockly_namespaceObject.Msg.TEXT_TRIM_LEFT,"right"],[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_CENTER,"center"],[external_Blockly_namespaceObject.Msg.TEXT_TRIM_RIGHT,"left"]],t=[[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_TOP,"bottom"],[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_CENTER,"center"],[external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_SETTING).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_HOR).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"HALIGN"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_VER).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_PL_TEXT_TOOLTIP)}},numpy_shape={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取维度"),this.setOutput(!0),this.setTooltip("Returns the shape of the array.")}},numpy_reshape={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("变形"),this.appendValueInput("DIMENSIONS").appendField("后维度为"),this.setOutput(!0),this.setTooltip("Reshapes the array to the specified dimensions.")}},numpy_astype={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("把"),this.appendDummyInput().appendField("转换为").appendField(new external_Blockly_namespaceObject.FieldDropdown([["uint8","numpy.uint8"],["int32","numpy.int32"],["float32","numpy.float32"],["float64","numpy.float64"]]),"TYPE"),this.setOutput(!0),this.setTooltip("Converts array to specified type.")}},pylab_imshow={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("创建二维图"),this.appendDummyInput().appendField("颜色").appendField(new external_Blockly_namespaceObject.FieldDropdown([["gray","gray"],["viridis","viridis"],["plasma","plasma"],["inferno","inferno"],["magma","magma"],["cividis","cividis"],["hot","hot"],["cool","cool"],["spring","spring"],["summer","summer"],["autumn","autumn"],["winter","winter"],["jet","jet"]]),"COLORMAP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("Displays an image with the specified colormap.")}},numpy_mean_digit={init:function(){this.setColour(DATA_HUE),this.appendValueInput("X").appendField("从数据集"),this.appendValueInput("Y").appendField("获取平均图像,标签"),this.appendValueInput("DIGIT").appendField("为"),this.setOutput(!0),this.setTooltip("Computes the mean of X where y equals the specified digit.")}},numpy_argmin_template_match={init:function(){this.setColour(DATA_HUE),this.appendValueInput("IMAGE").appendField("获取模板匹配结果,图片:"),this.appendValueInput("TEMPLATES").appendField("模板:"),this.setOutput(!0),this.setTooltip("Finds the index of the template that minimizes the sum of absolute differences with the image.")}},numpy_mean={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取平均值"),this.appendDummyInput().appendField("沿着axis").appendField(new external_Blockly_namespaceObject.FieldDropdown([["None","NONE"],["0","0"],["1","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Computes the mean of the array along the specified axis.")}},numpy_std={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取标准差"),this.appendDummyInput().appendField("沿着axis").appendField(new external_Blockly_namespaceObject.FieldDropdown([["None","NONE"],["0","0"],["1","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Computes the standard deviation of the array along the specified axis.")}},pandas_dropna={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DF").appendField("丢弃缺省值"),this.setOutput(!0),this.setTooltip("Drops rows with NaN values from the dataframe.")}},pandas_drop_columns={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DATAFRAME").appendField("从数据集"),this.appendValueInput("COLUMNS").appendField("中删除列").setCheck(String),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("从数据框中删除指定的列。用逗号分隔多个列名。")}},numpy_ones={init:function(){this.setColour(DATA_HUE),this.appendValueInput("NUM").appendField("生成单位行向量"),this.setOutput(!0),this.setTooltip("Creates an array of ones with the specified length.")}},numpy_c_={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY1").appendField("列拼接:数组1"),this.appendValueInput("ARRAY2").appendField("数组2"),this.setOutput(!0),this.setTooltip("Concatenates two arrays along the second axis using numpy.c_.")}},numpy_linalg_det={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取行列式"),this.setOutput(!0),this.setTooltip("Computes the determinant of an array using numpy.linalg.det.")}},matrix_transpose={init:function(){this.setColour(DATA_HUE),this.appendValueInput("MATRIX").appendField("获取转置"),this.setOutput(!0),this.setTooltip("Computes the transpose of the given matrix.")}},matrix_multiplication={init:function(){this.setColour(DATA_HUE),this.appendValueInput("MATRIX1"),this.appendValueInput("MATRIX2").appendField("@"),this.setOutput(!0),this.setTooltip("Multiplies two matrices.")}},numpy_linalg_inv={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取逆矩阵"),this.setOutput(!0),this.setTooltip("Computes the inverse of the given matrix using numpy.linalg.inv.")}},dataframe_median={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DATAFRAME").appendField("获取中位数"),this.setOutput(!0),this.setTooltip("Computes the median of the given dataframe.")}},dataframe_fillna={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DATAFRAME").appendField("填充缺失值"),this.appendValueInput("VALUE").appendField("填充值"),this.appendDummyInput().appendField("是否修改原数据").appendField(new external_Blockly_namespaceObject.FieldDropdown([["True","True"],["False","False"]]),"INPLACE"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("Fills NaN values in the dataframe with the specified value.")}},dataframe_info={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DATAFRAME").appendField("获取DataFrame信息"),this.setOutput(!0),this.setTooltip("Displays information about the DataFrame.")}},numpy_min={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取最小值"),this.appendDummyInput().appendField("沿着axis").appendField(new external_Blockly_namespaceObject.FieldDropdown([["None","None"],["行","0"],["列","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Returns the minimum value along the specified axis.")}},numpy_max={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取最大值"),this.appendDummyInput().appendField("沿着axis").appendField(new external_Blockly_namespaceObject.FieldDropdown([["None","None"],["行","0"],["列","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Returns the maximum value along the specified axis.")}},numpy_size={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取数组大小"),this.setOutput(!0),this.setTooltip("Returns the size of the array.")}},numpy_dot={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY1").appendField("点乘数组1"),this.appendValueInput("ARRAY2").appendField("点乘数组2"),this.setOutput(!0),this.setTooltip("Returns the dot product of two arrays.")}},numpy_square={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取平方数组"),this.setOutput(!0),this.setTooltip("Returns the element-wise square of the array.")}},numpy_sum={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("获取数组元素和"),this.setOutput(!0),this.setTooltip("Returns the sum of the array.")}},numpy_random_random={init:function(){this.setColour(DATA_HUE),this.appendValueInput("SIZE").appendField("生成随机数组"),this.setOutput(!0),this.setTooltip("Returns a random array of the specified size.")}},py_sum={init:function(){this.setColour(DATA_HUE),this.appendValueInput("ARRAY").appendField("Python求和"),this.setOutput(!0),this.setTooltip("Returns the sum of the iterable.")}},dataframe_sort_values={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DICT").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).setCheck("Dict"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("值排序"),this.appendValueInput("KEY").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("标签"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("排序方式").appendField(new external_Blockly_namespaceObject.FieldDropdown([["升序","True"],["降序","False"]]),"AS_CENDING"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},dataframe_head_tail={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DICT").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).setCheck("Dict"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("获取").appendField(new external_Blockly_namespaceObject.FieldDropdown([["前几行","head"],["最后几行","tail"]]),"TYPE"),this.appendValueInput("LINES").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("行数"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},dataframe_select={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DICT").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).setCheck("Dict"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("筛选数据"),this.appendValueInput("KEY").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("满足条件"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},dataframe_groupby={init:function(){this.setColour(DATA_HUE),this.appendValueInput("DICT").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).setCheck("Dict"),this.appendValueInput("KEY").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("通过标签"),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("分组"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},dataframe_aggregate_func={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(new external_Blockly_namespaceObject.FieldDropdown([["求最小值","min"],["求最大值","max"],["求和","sum"],["求平均值","mean"],["求中位数","median"],["求标准差","std"]]),"TYPE"),this.appendValueInput("DICT").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).setCheck("Dict"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},plot_cla={init:function(){this.setColour(DATA_HUE),this.appendDummyInput().appendField("清除已有图像"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},DS_HUE=80,ds_create_linkedlist={init:function(){this.setColour(DS_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldLabel(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_NEW)),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldLabel(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_HEAD)).appendField(new external_Blockly_namespaceObject.FieldTextInput("head"),"VAR"),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldLabel(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_TYPE)).appendField(new external_Blockly_namespaceObject.FieldTextInput("tag"),"TYPE"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_ATTRIBUTE),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["ds_create_linkedlist_item"],this)),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("ds_create_linkedlist_container");t.initSvg();for(var n=t.getInput("STACK").connection,a=0;at?e[t]:"name"),"KEY"+t).appendField("=")},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},ds_create_linkedlist_container={init:function(){this.setColour(DS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_CONTAINER_TITLE),this.appendStatementInput("STACK"),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_CONTAINER_TOOLTIP),this.contextMenu=!1}},ds_create_linkedlist_item={init:function(){this.setColour(DS_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_ITEM_TOOLTIP),this.contextMenu=!1}},ds_create_node={init:function(){this.setColour(DS_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_CREATE_NODE_USE).appendField(new external_Blockly_namespaceObject.FieldTextInput("tag"),"TYPE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_CREATE_NODE_NEW),this.appendValueInput("NODE"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_CREATE_NODE_TOOLTIP)}},ds_get_node_attr={init:function(){this.setColour(DS_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_GET_NODE_ATTR_NODE),this.appendValueInput("NODE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).appendField(new external_Blockly_namespaceObject.FieldTextInput("name"),"TYPE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_GET_NODE_ATTR_TOOLTIP)}},ds_set_node_attr={init:function(){this.setColour(DS_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_SET_NODE_ATTR_NODE),this.appendValueInput("NODE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AIP_ATTR).appendField(new external_Blockly_namespaceObject.FieldTextInput("name"),"TYPE"),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.DS_SET_NODE_ATTR_SET),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_SET_NODE_ATTR_TOOLTIP)}},ds_add_node_by_name={init:function(){this.setColour(DS_HUE),this.appendValueInput("NODE").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_HEAD_NODE);var e=[[external_Blockly_namespaceObject.Msg.DS_ADD_NODE_BEFORE,"before"],[external_Blockly_namespaceObject.Msg.DS_ADD_NODE_AFTER,"after"]];this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_LINKEDLIST),this.appendValueInput("NODE2").appendField(external_Blockly_namespaceObject.Msg.DS_SET_NODE_ATTR_NODE),this.appendValueInput("NODE3").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_TOOLTIP)}},ds_add_node_by_attr={init:function(){this.setColour(DS_HUE),this.appendValueInput("NODE").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_HEAD_NODE);var e=[[external_Blockly_namespaceObject.Msg.DS_ADD_NODE_BEFORE,"before"],[external_Blockly_namespaceObject.Msg.DS_ADD_NODE_AFTER,"after"]];this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_LINKEDLIST),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_CREATE_LINKEDLIST_ITEM_TITLE).appendField(new external_Blockly_namespaceObject.FieldTextInput("name"),"TYPE"),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AS),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_ATTR),this.appendValueInput("NODE3").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_TOOLTIP)}},ds_del_node_by_name={init:function(){this.setColour(DS_HUE),this.appendValueInput("NODE").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_HEAD_NODE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_LINKEDLIST),this.appendValueInput("NODE2").appendField(external_Blockly_namespaceObject.Msg.DS_DEL_NODE_NAME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_DEL_NODE_TOOLTIP)}},ds_del_node_by_attr={init:function(){this.setColour(DS_HUE),this.appendValueInput("NODE").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_HEAD_NODE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_LINKEDLIST),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_DEL_NODE_ATTR).appendField(new external_Blockly_namespaceObject.FieldTextInput("name"),"TYPE"),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_AS),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_ATTR),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_DEL_NODE_TOOLTIP)}},ds_reverse_linkedlist={init:function(){this.setColour(DS_HUE),this.appendValueInput("NODE").appendField(external_Blockly_namespaceObject.Msg.DS_ADD_NODE_HEAD_NODE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.DS_REVERSE_LINKEDLIST),this.appendValueInput("NODE2").appendField(external_Blockly_namespaceObject.Msg.DS_REVERSE_LINKEDLIST_NEW_HEAD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DS_DEL_NODE_TOOLTIP)}},FACTORY_HUE="#777777",factory_from_import={init:function(){this.setColour(FACTORY_HUE),this.appendDummyInput("").appendField("from ").appendField(new external_Blockly_namespaceObject.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new external_Blockly_namespaceObject.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},factory_import={init:function(){this.setColour(FACTORY_HUE),this.appendDummyInput("").appendField("import ").appendField(new external_Blockly_namespaceObject.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},factory_function_noreturn={init:function(){this.setColour(FACTORY_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new external_Blockly_namespaceObject.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var e=document.createElement("mutation");e.setAttribute("items",this.itemCount_);for(var t=0;tt?e[t]:'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},iot_publish_container={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},iot_publish_item={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},iot_create_with_item={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},iot_mixio_connect={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_SERVER).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_WIFI_USERNAME).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_IOT_PASSWORD).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_PROJECT).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},IOT_MIXIO_PUBLISH={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(external_Blockly_namespaceObject.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},IOT_MIXIO_SUBSCRIBE={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_SUBSCRIBE+external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_MSG).appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},IOT_MIXIO_UNSUBSCRIBE={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(external_Blockly_namespaceObject.Msg.MSG.stop+external_Blockly_namespaceObject.Msg.MIXLY_EMQX_SUBSCRIBE).appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},iot_mixio_disconnect={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iot_mixio_connect_only={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iot_mixio_check={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iot_mixio_format_topic={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(external_Blockly_namespaceObject.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},iot_mixio_format_msg={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},IOT_FORMATTING={init:function(){this.setColour(IOT_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},IOT_FORMAT_STRING={init:function(){this.setColour(IOT_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},IOT_EMQX_PING={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},IOT_MIXIO_NTP={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO").appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(external_Blockly_namespaceObject.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_SERVER).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.CONTROLS_FOR_INPUT_WITH+external_Blockly_namespaceObject.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(external_Blockly_namespaceObject.Msg.MIXLY_EMQX_SERVER).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(external_Blockly_namespaceObject.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iot_mixly_key_py={init:function(){this.VISITOR_ID=external_Mixly_namespaceObject.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(IOT_HUE),this.appendDummyInput("").appendField(this.newQuote_(!0)).appendField(new external_Blockly_namespaceObject.FieldTextInput(this.visitorId),"VISITOR_ID").appendField(this.newQuote_(!1)),this.setOutput(!0,null)},onchange:function(){const e=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==e&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")},newQuote_:function(e){if(e==this.RTL)var t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAqUlEQVQI1z3KvUpCcRiA8ef9E4JNHhI0aFEacm1o0BsI0Slx8wa8gLauoDnoBhq7DcfWhggONDmJJgqCPA7neJ7p934EOOKOnM8Q7PDElo/4x4lFb2DmuUjcUzS3URnGib9qaPNbuXvBO3sGPHJDRG6fGVdMSeWDP2q99FQdFrz26Gu5Tq7dFMzUvbXy8KXeAj57cOklgA+u1B5AoslLtGIHQMaCVnwDnADZIFIrXsoXrgAAAABJRU5ErkJggg==";else t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAn0lEQVQI1z3OMa5BURSF4f/cQhAKjUQhuQmFNwGJEUi0RKN5rU7FHKhpjEH3TEMtkdBSCY1EIv8r7nFX9e29V7EBAOvu7RPjwmWGH/VuF8CyN9/OAdvqIXYLvtRaNjx9mMTDyo+NjAN1HNcl9ZQ5oQMM3dgDUqDo1l8DzvwmtZN7mnD+PkmLa+4mhrxVA9fRowBWmVBhFy5gYEjKMfz9AylsaRRgGzvZAAAAAElFTkSuQmCC";return new external_Blockly_namespaceObject.FieldImage(t,12,12,'"')}},iot_mixly_key={init:function(){this.VISITOR_ID=external_Mixly_namespaceObject.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(IOT_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const e=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==e&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},iot_client_onboard={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MixIO").appendField(external_Blockly_namespaceObject.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},iot_http_client={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("HTTP"+external_Blockly_namespaceObject.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(external_Blockly_namespaceObject.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_REQUESTS_GET).appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET_CURRENT_TIME).appendField(external_Blockly_namespaceObject.Msg.MIXLY_OPEN_DEBUG).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iot_http_data={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("HTTP"+external_Blockly_namespaceObject.Msg.MIXLY_Client).appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_REQUESTS_LEN,"client_len"],[external_Blockly_namespaceObject.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[external_Blockly_namespaceObject.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},iot_mqtt_client={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MQTT"+external_Blockly_namespaceObject.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(external_Blockly_namespaceObject.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_INIT_SUBSCRIBE).appendField(external_Blockly_namespaceObject.MQTT_Topic).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(external_Blockly_namespaceObject.Msg.MIXLY_OPEN_DEBUG).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},iot_mqtt_data={init:function(){this.setColour(IOT_HUE),this.appendDummyInput().appendField("MQTT"+external_Blockly_namespaceObject.Msg.MIXLY_Client).appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_REQUESTS_LEN,"client_len"],[external_Blockly_namespaceObject.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[external_Blockly_namespaceObject.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},iot_onenetconnect=iot_onenet_connect,iot_onenetdisconnect=iot_onenet_disconnect,iot_checkonenet=iot_onenet_check,iot_publish=iot_onenet_publish,PINS_HUE=230,pins_digital_write={init:function(){this.setColour(PINS_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(external_Mixly_namespaceObject.Profile.default.digital_write),"PIN"),this.setOutput(!0)}},pins_digital_read={init:function(){this.setColour(PINS_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(external_Mixly_namespaceObject.Profile.default.digital_read),"PIN"),this.setOutput(!0)}},pins_analog_write={init:function(){this.setColour(PINS_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(external_Mixly_namespaceObject.Profile.default.analog_write),"PIN"),this.setOutput(!0)}},pins_analog_read={init:function(){this.setColour(PINS_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(external_Mixly_namespaceObject.Profile.default.analog_read),"PIN"),this.setOutput(!0)}},SERIAL_HUE=40,serial_open={init:function(){this.setColour(SERIAL_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldLabel(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_OPEN)).appendField(new external_Blockly_namespaceObject.FieldTextInput("ser"),"SER"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_SERIAL_BEGIN).appendField(new external_Blockly_namespaceObject.FieldDropdown([["115200","115200"],["256000","256000"],["128000","128000"],["57600","57600"],["56000","56000"],["43000","43000"],["38400","38400"],["28800","28800"],["19200","19200"],["9600","9600"],["4800","4800"],["2400","2400"],["1200","1200"],["600","600"],["300","300"],["110","110"]]),"BPS"),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_OPEN_TIMEOUT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_OPEN_TOOLTIP)}},serial_write={init:function(){this.setColour(SERIAL_HUE),this.appendValueInput("SER"),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_WRITE_TOOLTIP)}},serial_read_b={init:function(){this.setColour(SERIAL_HUE),this.appendValueInput("SER"),this.appendValueInput("VAR").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_READ),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_READ_TOOLTIP)}},serial_close={init:function(){this.setColour(SERIAL_HUE),this.appendValueInput("SER"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_CLOSE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXPY_SERIAL_CLOSE_TOOLTIP)}},SKLEARN_HUE=80,sklearn_make_classification={init:function(){this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.SKLEARN_CLASSIFICATION_GENERATION),this.appendValueInput("n_samples").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_SAMPLES),this.appendValueInput("n_features").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_FEATURES),this.appendValueInput("n_informative").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_EFFECTIVE_FEATURES),this.appendValueInput("n_redundant").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_REDUNDANT_FEATURES),this.appendValueInput("n_repeated").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_REPEATED_FEATURES),this.appendValueInput("n_classes").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_CLASSES),this.appendValueInput("n_clusters_per_class").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_CLUSTERS_PER_CLASSES),this.appendValueInput("random_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_make_regression={init:function(){this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.SKLEARN_REGRESSION_GENERATION),this.appendValueInput("n_samples").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_SAMPLES),this.appendValueInput("n_features").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_FEATURES),this.appendValueInput("n_informative").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_EFFECTIVE_FEATURES),this.appendValueInput("n_targets").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_LABELS),this.appendValueInput("bias").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.DEVIATION),this.appendValueInput("noise").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NOISE),this.appendValueInput("random_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_make_blobs={init:function(){this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.SKLEARN_CLUSTERING_GENERATION),this.appendValueInput("n_samples").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_SAMPLES),this.appendValueInput("n_features").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_FEATURES),this.appendValueInput("centers").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_CLUSTERS),this.appendValueInput("cluster_std").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.STANDARD_DEVIATION_OF_CLUSTER),this.appendValueInput("center_box").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.CLUSTER_BOUNDING_BOX),this.appendValueInput("shuffle").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SHUFFLE_SAMPLES),this.appendValueInput("random_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_load={init:function(){var e=[[external_Blockly_namespaceObject.Msg.SKLEARN_LOAD_IRIS,"load_iris"],[external_Blockly_namespaceObject.Msg.SKLEARN_LOAD_BOSTON,"load_boston"],[external_Blockly_namespaceObject.Msg.SKLEARN_LOAD_DIABETES,"load_diabetes"],[external_Blockly_namespaceObject.Msg.SKLEARN_LOAD_BREAST_CANCER,"load_breast_cancer"],[external_Blockly_namespaceObject.Msg.SKLEARN_LOAD_LINNERUD,"load_linnerud"],[external_Blockly_namespaceObject.Msg.SKLEARN_LOAD_DIGITS,"load_digits"]];this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.LOAD).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"type").appendField(new external_Blockly_namespaceObject.FieldTextInput("iris"),"name"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")},getVars:function(){return[this.getFieldValue("name")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("name"))&&this.setTitleValue(t,"name")}},sklearn_data_target={init:function(){this.appendValueInput("name").setCheck(null).appendField("sklearn "+external_Blockly_namespaceObject.Msg.DATA_SET),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.EIGENVALUES,"data"],[external_Blockly_namespaceObject.Msg.LABEL_VALUE,"target"],[external_Blockly_namespaceObject.Msg.FEATURE,"feature_names"],[external_Blockly_namespaceObject.Msg.mixpy_PYLAB_TICKS_TAG,"target_names"]]),"type"),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_train_test_split={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.DATA_SEGMENTATION),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.appendValueInput("train_target").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LABEL_VALUE),this.appendValueInput("test_size").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.TEST_SET_PROPORTION),this.appendValueInput("rondom_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_train_test_split_no_target={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.DATA_SEGMENTATION),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.appendValueInput("test_size").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.TEST_SET_PROPORTION),this.appendValueInput("rondom_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_LinearRegression={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_LINEARREGRESSION_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("fit_intercept").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_CALCULATE_MODEL_INTERRUPT),this.appendValueInput("normalize").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_REGRESSION_NORMIALIZATION),this.appendValueInput("n_jobs").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_THREADS),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_Ridge={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_RIDGE_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("alpha").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_REGULA_INTENSITY),this.appendValueInput("fit_intercept").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_CALCULATE_MODEL_INTERRUPT),this.appendValueInput("normalize").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_REGRESSION_NORMIALIZATION),this.appendValueInput("max_iter").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_MAX_ITER),this.appendValueInput("random_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_DecisionTreeClassifier_Regressor={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_DECISIONTREE_INIT).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.SKLEARN_CLASSIFICATION_ALGORITHM,"DecisionTreeClassifier"],[external_Blockly_namespaceObject.Msg.SKLEARN_REGRESSION_ALGORITHM,"DecisionTreeRegressor"]]),"type"),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("max_depth").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_MAXIMUM_TREE_DEPTH),this.appendValueInput("random_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_RandomForestClassifier_Regressor={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_RANDOMFOREST_INIT).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.SKLEARN_CLASSIFICATION_ALGORITHM,"RandomForestClassifier"],[external_Blockly_namespaceObject.Msg.SKLEARN_REGRESSION_ALGORITHM,"RandomForestRegressor"]]),"type"),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("n_estimators").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_TREES),this.appendValueInput("max_depth").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_MAXIMUM_TREE_DEPTH),this.appendValueInput("n_jobs").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_THREADS),this.appendValueInput("random_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_KNeighborsClassifier_Regressor={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_KNN_INIT).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.SKLEARN_CLASSIFICATION_ALGORITHM,"KNeighborsClassifier"],[external_Blockly_namespaceObject.Msg.SKLEARN_REGRESSION_ALGORITHM,"KNeighborsRegressor"]]),"type"),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("K").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("K"),this.appendValueInput("n_jobs").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_THREADS),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_GaussianNB={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_GAUSSINNB_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_pca={init:function(){this.appendDummyInput().appendField("sklearn 初始化 PCA 算法"),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("n_components").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_PCA_N_COMPONENTS),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_pca_fit_transform={init:function(){this.appendDummyInput().appendField("sklearn PCA 降维"),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_KMeans={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_KMEANS_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("n_clusters").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.NUMBER_OF_CLUSTERS_JUST),this.appendValueInput("max_iter").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.SKLEARN_MAX_ITER),this.appendValueInput("random_state").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_KMeans_fit={init:function(){this.appendDummyInput().appendField("sklearn K-均值聚类"),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_fit={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.TRAINING_MODEL),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.appendValueInput("train_target").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LABEL_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_fit_no_target={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.TRAINING_MODEL),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_predict={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.MODEL_PRODICTION),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_score={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.CALCULATE_THE_SCORE),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.appendValueInput("train_target").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.LABEL_VALUE),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_score_no_target={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.CALCULATE_THE_SCORE),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.EIGENVALUES),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_coef_intercept={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_GENERALIZED_LINEAR_REGRESSION),this.appendValueInput("model_name").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).setCheck(null).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendDummyInput().setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.SKLEARN_COEF,"coef_"],[external_Blockly_namespaceObject.Msg.SKLEARN_INTERCEPT,"intercept_"]]),"type"),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_cluster_centers_labels_inertia={init:function(){this.appendDummyInput().appendField("sklearn "+external_Blockly_namespaceObject.Msg.SKLEARN_CLUSTERING),this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_GET).appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.SKLEARN_CLUSTER_CENTER,"cluster_centers_"],[external_Blockly_namespaceObject.Msg.SKLEARN_LABELS_AFTER_CLUSTERING,"labels_"],[external_Blockly_namespaceObject.Msg.SKLEARN_CLUSTERING_SUM_OF_SQUARED_DISTANCES,"inertia_"]]),"type"),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},sklearn_save_load_model={init:function(){this.appendValueInput("model_name").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("sklearn").appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.SKLEARN_SAVE_MODEL,"dump"],[external_Blockly_namespaceObject.Msg.SKLEARN_LOAD_MODEL,"load"]]),"type").appendField(" "+external_Blockly_namespaceObject.Msg.MODEL_NAME),this.appendValueInput("address").setCheck(null).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(SKLEARN_HUE),this.setTooltip(""),this.setHelpUrl("")}},SYSTEM_HUE=120,base_delay={init:function(){this.setColour(SYSTEM_HUE),this.appendValueInput("DELAY_TIME",Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_DELAY+"("+external_Blockly_namespaceObject.Msg.MIXLY_MILLIS+")").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_CONTROL_DELAY)}},system_controls_millis={init:function(){this.setColour(SYSTEM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_time_time),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_CONTROL_MILLIS)}},time_localtime={init:function(){this.setColour(SYSTEM_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME),this.appendDummyInput().appendField(new external_Blockly_namespaceObject.FieldDropdown([[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_ALL,"all"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_YEAR,"0"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_MONTH,"1"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_DATE,"2"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_HOUR,"3"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_MINUTE,"4"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_SECOND,"5"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_INWEEK,"6"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_INYEAR,"7"],[external_Blockly_namespaceObject.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_DST,"8"]]),"op"),this.setOutput(!0),this.setInputsInline(!0)}},system_Panic_with_status_code={init:function(){this.setColour(SYSTEM_HUE),this.appendValueInput("STATUS_CODE",Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_Panic_with_status_code).setCheck(Number),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_CONTROL_DELAY)}},system_reset={init:function(){this.setColour(SYSTEM_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_Reset_micro),this.setPreviousStatement(!0)}},controls_mstimer2={init:function(){this.setColour(SYSTEM_HUE),this.appendValueInput("TIME").setCheck(Number).setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField("MsTimer2").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MSTIMER2_EVERY),this.appendDummyInput().appendField("ms"),this.appendStatementInput("DO").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MSTIMER2_DO),this.setPreviousStatement(!0),this.setNextStatement(!0)}},controls_mstimer2_start={init:function(){this.setColour(SYSTEM_HUE),this.appendDummyInput().appendField("MsTimer2").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MSTIMER2_START),this.setPreviousStatement(!0),this.setNextStatement(!0)}},controls_mstimer2_stop={init:function(){this.setColour(SYSTEM_HUE),this.appendDummyInput().appendField("MsTimer2").appendField(external_Blockly_namespaceObject.Msg.MIXLY_STOP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},system_time_sleep={init:function(){this.setColour(SYSTEM_HUE),this.appendValueInput("DELAY_TIME",Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_DELAY).setCheck(Number),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_CONTROL_DELAY)}},TURTLE_HUE=180,turtle_create={init:function(){this.setColour(TURTLE_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_create).appendField(new external_Blockly_namespaceObject.FieldTextInput("tina"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.blockpy_turtle_create_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},turtle_done={init:function(){this.setColour(TURTLE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_TURTLE_DONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_exitonclick={init:function(){this.setColour(TURTLE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_TURTLE_EXITONCLICK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_move={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.blockpy_forward,"forward"],[external_Blockly_namespaceObject.Msg.blockpy_backward,"backward"]];this.setColour(TURTLE_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_MOVE_BY).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_MOVE_BY_num),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))}},turtle_rotate={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.blockpy_left,"left"],[external_Blockly_namespaceObject.Msg.blockpy_right,"right"]];this.setColour(TURTLE_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_rotate).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{left:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_LEFT,right:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_RIGHT}[e]}))}},turtle_setheading={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.blockpy_setheading),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_setheading_degree),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_screen_delay={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_SCREEN_DELAY),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_MILLIS),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_SCREEN_DELAY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_goto={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_goto),this.appendValueInput("val").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_goto_y),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_goto_position),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_setxy={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_X,"x"],[external_Blockly_namespaceObject.Msg.PYLAB_LABEL_Y,"y"]];this.setColour(TURTLE_HUE),this.appendValueInput("VAR").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_SETXY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_SETXY_TOOLTIP)}},turtle_pos_shape={init:function(){this.setColour(TURTLE_HUE);var e=[[external_Blockly_namespaceObject.Msg.TURTLE_POS,"pos"],[external_Blockly_namespaceObject.Msg.TURTLE_SHAPE,"shape"],[external_Blockly_namespaceObject.Msg.TURTLE_HEADING,"heading"],[external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_WIDTH,"width"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_GET_SHAPESIZE,"shapesize"],[external_Blockly_namespaceObject.Msg.MIXLY_SPEED,"speed"]];this.appendValueInput("TUR").setCheck("Turtle"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.TURTLE_POS_SHAPE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR");var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{pos:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_POS,shape:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_SHAPE,heading:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_HEADING,width:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_WIDTH,speed:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_GET_SPEED,shapesize:external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_GET_SHAPESIZE_TOOLTIP}[e]})),this.setOutput(!0),this.setInputsInline(!0)}},turtle_clear={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.MIXLY_LCD_STAT_CLEAR,"clear"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_reset,"reset"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_home,"home"]];this.setColour(TURTLE_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{clear:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[e]}))}},turtle_penup={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.blockpy_turtle_penup,"penup"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_pendown,"pendown"]];this.setColour(TURTLE_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{penup:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_PENUP,pendown:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_PENDOWN}[e]}))}},turtle_fill={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.blockpy_turtle_beginfill,"begin"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_endfill,"end"]];this.setColour(TURTLE_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{begin:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_BEGINFILL,end:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_ENDFILL}[e]}))}},turtle_size_speed={init:function(){this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldTextInput("tina"),"TUR");var e=[[external_Blockly_namespaceObject.Msg.blockpy_turtle_size,"pensize"],[external_Blockly_namespaceObject.Msg.MIXLY_SPEED,"speed"]];this.setColour(TURTLE_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_set).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_set_num),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{pensize:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_SIZE,speed:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_SPEED}[e]}))}},turtle_size={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_set_size),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_speed={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_set_speed),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_circle={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.blockpy_turtle_circle,"circle"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_dot,"dot"]];this.setColour(TURTLE_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_draw).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR").appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_radius),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{circle:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_CIRCLE,dot:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_DOT}[e]}))}},turtle_circle_advanced={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_radius),this.appendValueInput("data").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_angle),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_CIRCLE)}},turtle_visible={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.blockpy_turtle_hide,"hideturtle"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_show,"showturtle"]];this.setColour(TURTLE_HUE),this.appendDummyInput("").appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{hideturtle:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_HIDE,showturtle:external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_TURTEL_SHOW}[e]}))}},turtle_bgcolor={init:function(){this.setColour(TURTLE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_bgcolor).appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_pencolor={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_pencolor).appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_fillcolor={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_fillcolor).appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_clone={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR").setCheck("Turtle"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.TURTLE_CLONE),this.setTooltip(external_Blockly_namespaceObject.Msg.TURTLE_CLONE_TOOLTIP),this.setOutput(!0)}},turtle_bgcolor_hex_new={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_bgcolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_pencolor_hex_new={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_pencolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_fillcolor_hex_new={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_fillcolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_color={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_pencolor).appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"FIELDNAME"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_fillcolor).appendField(new external_Blockly_namespaceObject.FieldColour("#ff0000"),"FIELDNAME2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_color_hex={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR1").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_pencolor),this.appendValueInput("VAR2").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_fillcolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_bgcolor_hex={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_bgcolor_hex),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_pencolor_hex={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_pencolor_hex),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_fillcolor_hex={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_fillcolor_hex),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_shape={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var e=[[external_Blockly_namespaceObject.Msg.blockpy_turtle_shape_arrow,"arrow"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_shape_turtle,"turtle"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_shape_circle,"circle"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_shape_square,"square"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_shape_triangle,"triangle"],[external_Blockly_namespaceObject.Msg.blockpy_turtle_shape_classic,"classic"]];this.setColour(TURTLE_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_shape).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.TURTLE_SHAPE_TOOLTIP)}},turtle_shapesize={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_SHAPESIZE),this.appendValueInput("WID").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_SHAPESIZE_WID),this.appendValueInput("LEN").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_SHAPESIZE_LEN),this.appendValueInput("OUTLINE").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_SHAPESIZE_OUTLINE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TOOLTIP_SHAPESIZE)}},turtle_numinput={init:function(){this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_NUMINPUT),this.setColour(TURTLE_HUE),this.appendValueInput("TITLE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_TITLE),this.appendValueInput("PROMPT").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_PROMPT),this.appendValueInput("DEFAULT").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("MIN").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MATH_ONLIST_OPERATOR_MIN),this.appendValueInput("MAX").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MATH_ONLIST_OPERATOR_MAX),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(external_Blockly_namespaceObject.Msg.TURTLE_NUMINPUT_TOOLTIP)}},turtle_textinput={init:function(){this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT),this.setColour(TURTLE_HUE),this.appendValueInput("TITLE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_TITLE),this.appendValueInput("PROMPT").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_PROMPT),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(external_Blockly_namespaceObject.Msg.TURTLE_TEXTINPUT_TOOLTIP)}},turtle_write={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_write),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.TURTLE_WRITE_TOOLTIP)}},turtle_write_format={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"]],t=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_LEFT,"left"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_RIGHT,"right"]],n=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_NORMAL,"normal"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_BOLD,"bold"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_ITALIC,"italic"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_BOLD_ITALIC,'bold","italic']];this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_write),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"MOVE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"ALIGN"),this.appendValueInput("FONTNAME").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NAME),this.appendValueInput("FONTNUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE).appendField(new external_Blockly_namespaceObject.FieldDropdown(n),"FONTTYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.TURTLE_WRITE_TOOLTIP)}},turtle_write_format_skulpt={init:function(){var e=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"]],t=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_LEFT,"left"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN_RIGHT,"right"]],n=[[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_NORMAL,"normal"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_BOLD,"bold"],[external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_ITALIC,"italic"]];this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(TURTLE_HUE),this.appendValueInput("VAR").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.blockpy_turtle_write),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_MOVE).appendField(new external_Blockly_namespaceObject.FieldDropdown(e),"MOVE"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_ALIGN).appendField(new external_Blockly_namespaceObject.FieldDropdown(t),"ALIGN"),this.appendValueInput("FONTNAME").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NAME),this.appendValueInput("FONTNUM").setCheck(Number).appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE).appendField(new external_Blockly_namespaceObject.FieldDropdown(n),"FONTTYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.TURTLE_WRITE_TOOLTIP)}},turtle_color_seclet={init:function(){this.setColour(TURTLE_HUE),this.appendDummyInput("").setAlign(external_Blockly_namespaceObject.inputs.Align.RIGHT).appendField(new external_Blockly_namespaceObject.FieldColour("ff0000"),"COLOR"),this.setInputsInline(!0),this.setOutput(!0,String)}},turtle_getscreen={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR").setCheck("Turtle"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_GETSCREEN).appendField(new external_Blockly_namespaceObject.FieldTextInput("screen"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_GETSCREEN_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){external_Blockly_namespaceObject.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},turtle_onkey={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR"),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_EVENT_ONKEY),this.appendValueInput("callback").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_EVENT_ONKEY_TOOLTIP)}},turtle_onclick={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR"),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_EVENT_ONCLICK),this.appendValueInput("callback").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_EVENT_ONCLICK_TOOLTIP)}},turtle_ontimer={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR"),this.appendValueInput("VAR").appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_EVENT_ONTIMER),this.appendDummyInput("").appendField(external_Blockly_namespaceObject.Msg.MIXLY_mSecond),this.appendValueInput("callback").appendField(external_Blockly_namespaceObject.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_EVENT_ONTIMER_TOOLTIP)}},turtle_listen={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR"),this.appendDummyInput().appendField(external_Blockly_namespaceObject.Msg.MIXLY_TURTEL_SCREEN_LISTEN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},turtle_screen_savefig={init:function(){this.setColour(TURTLE_HUE),this.appendValueInput("TUR"),this.appendValueInput("FILE").setCheck(String).appendField(external_Blockly_namespaceObject.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(external_Blockly_namespaceObject.Msg.mixpy_TURTLE_SAVEFIG_TOOLTIP)}},ai_AI_ChooseAndGet=function(e,t){var n=this.getFieldValue("TYPE");return t.definitions_.import_FileDialog="import FileDialog",["FileDialog."+n+"()",t.ORDER_ATOMIC]},ai_AI_client=function(e,t){var n=this.getFieldValue("CTYPE");return t.definitions_.import_aip="import aip",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+" = aip."+n+"("+t.valueToCode(this,"API_KEY",t.ORDER_ATOMIC)+", "+t.valueToCode(this,"SECRET_KEY",t.ORDER_ATOMIC)+")\n"},ai_AI_Speech_synthesis=function(e,t){return t.definitions_.import_aip="import aip",[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".synthesis("+t.valueToCode(this,"STR",t.ORDER_ATOMIC)+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_Speech_asr=function(e,t){return t.definitions_.import_aip="import aip",[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".asr("+(t.valueToCode(this,"FILE",t.ORDER_ATOMIC)||'""')+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_ImageClassify=function(e,t){t.definitions_.import_aip="import aip";var n=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),a=t.valueToCode(this,"ADDR",t.ORDER_ATOMIC);return[n+"."+t.valueToCode(this,"FUNC",t.ORDER_ATOMIC)+"("+a+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_Face_match=function(e,t){return t.definitions_.import_aip="import aip",[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".match("+t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+","+t.valueToCode(this,"VAR2",t.ORDER_ATOMIC)+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_Ocr=function(e,t){t.definitions_.import_aip="import aip";var n=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),a=t.valueToCode(this,"ADDR",t.ORDER_ATOMIC);return[n+"."+t.valueToCode(this,"FUNC",t.ORDER_ATOMIC)+"("+a+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_Nlp=function(e,t){t.definitions_.import_aip="import aip";var n=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),a=t.valueToCode(this,"STR",t.ORDER_ATOMIC);return[n+"."+t.valueToCode(this,"FUNC",t.ORDER_ATOMIC)+"("+a+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_Nlp_Sim=function(e,t){t.definitions_.import_aip="import aip";var n=t.valueToCode(this,"SUB",t.ORDER_ATOMIC),a=t.valueToCode(this,"STR1",t.ORDER_ATOMIC),_=t.valueToCode(this,"STR2",t.ORDER_ATOMIC);return[n+"."+t.valueToCode(this,"FUNC",t.ORDER_ATOMIC)+"("+a+","+_+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_Nlp_Topic=function(e,t){return t.definitions_.import_aip="import aip",[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".topic("+t.valueToCode(this,"STR1",t.ORDER_ATOMIC)+","+t.valueToCode(this,"STR2",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},ai_AI_Nlp_newsSummary=function(e,t){return t.definitions_.import_aip="import aip",[t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+".newsSummary("+t.valueToCode(this,"STR",t.ORDER_ATOMIC)+","+t.valueToCode(this,"LEN",t.ORDER_ATOMIC)+", options="+(t.valueToCode(this,"ATTR",t.ORDER_ATOMIC)||"{}")+")",t.ORDER_ATOMIC]},ai_AI_ImageClassify_Func=function(e,t){return[this.getFieldValue("TYPE"),t.ORDER_ATOMIC]},ai_AI_Ocr_Func=function(e,t){return[this.getFieldValue("TYPE"),t.ORDER_ATOMIC]},ai_AI_Nlp_Func=function(e,t){return[this.getFieldValue("TYPE"),t.ORDER_ATOMIC]},ai_AI_Nlp_Func_sim=function(e,t){return[this.getFieldValue("TYPE"),t.ORDER_ATOMIC]},ai_AI_audio=function(e,t){return t.definitions_.import_audio="import audio","audio.audio_record("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+","+(t.valueToCode(this,"TIME",t.ORDER_ATOMIC)||"0")+")\n"},ai_AI_photo=function(e,t){return t.definitions_.import_audio="import cam","cam.photo_capture("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||'""')+","+(t.valueToCode(this,"BUT",t.ORDER_ATOMIC)||'""')+")\n"},ai_AI_result=function(e,t){var n=t.valueToCode(this,"AI",t.ORDER_ASSIGNMENT)||"0",a=this.getFieldValue("CTYPE");if("Image"==a)var _=n+'["result"][0]["keyword"]';if("Speech"==a)_=n+'["result"][0]';if("Face"==a||"OcrSimilarity"==a)_=n+'["score"]';if("Ocr"==a)_=n+'["words_result"]';return[_,t.ORDER_ATOMIC]},algorithm_algorithm_prepare=function(e,t){t.definitions_.import_sprite="import sprite";return"g = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,1,0,0,0,0,0,0], [0,0,0,1,0,0,1,0,0,0], [0,1,1,0,1,1,0,0,0,0], [0,0,0,1,0,0,0,1,0,0], [0,0,0,1,0,0,1,1,0,0], [0,0,1,0,0,1,0,1,0,0], [0,0,0,0,1,1,1,0,0,0]]\nmark = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0]]\nvis = [0,1,0,0,0,0,0,0,0]\nposition = [[0, 0], [200, 200], [250, 60], [320, 200], [280, 380], [470, 250], [670, 90], [650, 340]]\nsprite.clearAllSprites()\nsprite.createBackground('ditu')\nmask = sprite.Sprite('white', 96, 354)\nmask.hide()\nhouse = [\n sprite.Sprite('mark', 150, 380),\n sprite.Sprite('xtxn', 96, 170),\n sprite.Sprite('xnvijx', 270, 45),\n sprite.Sprite('xnxbjx', 310, 182),\n sprite.Sprite('xnsijx', 300, 370),\n sprite.Sprite('xnkejx', 495, 220),\n sprite.Sprite('bwbwjx', 716, 85),\n sprite.Sprite('lelejx', 686, 314)\n]\nfor i in house:\n i.filterBrighter()\n i.hide()\n"},algorithm_algorithm_add_school=function(){return"path = [1]\nmask.show()\ncar = sprite.Sprite('xnie', position[1][0], position[1][1])\nhouse[1].show()\ncar.nowPos = 1\ndef drive(n):\n if g[car.nowPos][n]==1:\n car.slideTo(position[n][0], position[n][1], 1)\n car.nowPos = n\n else:\n print('移动失败!程序有误!')\n exit()\n"},algorithm_algorithm_find_path=function(e,t){t.definitions_.import_random="import random";return"f = path[(len(path) - 1)]\nflag = 0\nfor _my_variable in [6,5,4,3,2,1,0]:\n if vis[_my_variable+1] == 0 and g[f][_my_variable+1] == 1:\n if mark[f][_my_variable+1] == 0:\n flag = 1\n break\n"},algorithm_algorithm_new_path=function(e,t){return["flag == 1",t.ORDER_ATOMIC]},algorithm_algorithm_set_path=function(){return"mark[f][_my_variable+1] = 1\nvis[_my_variable+1] = 1\n"},algorithm_algorithm_add_path=function(){return"path.append(_my_variable+1)\ndrive(path[len(path) - 1])\nhouse[_my_variable+1].show()\n"},algorithm_algorithm_del_path=function(e,t){t.definitions_.import_time="import time";return"del path[len(path) - 1]\nhouse[0].show()\ntime.sleep(0.5)\nhouse[0].hide()\n"},algorithm_algorithm_return_path=function(){var e="for i in range(7):\n mark[f][i+1] = 0\n vis[f] = 0\n";return e="house[f].hide()\ndrive(path[len(path) - 1])\n"+e},algorithm_algorithm_no_left=function(e,t){return["len(path) == 7",t.ORDER_ATOMIC]},algorithm_algorithm_print_path=function(){return'name = ["","学校","小智家","小欣家","小思家","小科家","贝贝家","乐乐家"]\nres = ""\nfor i in path:\n res = res + name[i] + "-"\nprint(res[:-1])\n'},algorithm_algorithm_prepare2=function(e,t){t.definitions_.import_sprite="import sprite";return"g = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,1,0,0,0,0,0,0], [0,0,0,1,0,0,1,0,0,0], [0,1,1,0,1,0,0,0,0,0], [0,0,0,1,0,0,0,1,0,0], [0,0,0,1,0,0,0,1,0,0], [0,0,1,0,0,0,0,1,0,0], [0,0,0,0,1,1,1,0,0,0]]\nmark = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0]]\nvis = [0,1,0,0,0,0,0,0,0]\nposition = [[0, 0], [200, 200], [250, 60], [320, 200], [280, 380], [470, 250], [670, 90], [650, 340]]\nsprite.clearAllSprites()\nsprite.createBackground('ditu')\nmask = sprite.Sprite('white', 96, 354)\nmask.hide()\nhouse = [\n sprite.Sprite('mark', 150, 380),\n sprite.Sprite('xtxn', 96, 170),\n sprite.Sprite('xnvijx', 270, 45),\n sprite.Sprite('xnxbjx', 310, 182),\n sprite.Sprite('xnsijx', 300, 370),\n sprite.Sprite('xnkejx', 495, 220),\n sprite.Sprite('bwbwjx', 716, 85),\n sprite.Sprite('lelejx', 686, 314)\n]\nbarricade = sprite.Sprite('barricade', 610, 170)\nbarricade.enlargeTo(100)\nfor i in house:\n i.filterBrighter()\n i.hide()\n"},algorithm_algorithm_current_school=function(e,t){return["f == 1",t.ORDER_ATOMIC]},algorithm_algorithm_no_path=function(){return"print('没有符合条件的路线')\n"},algorithm_algorithm_prepare_2_1=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return'g = [[10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000],[10000,10000,500,300,10000,10000,10000,10000,10000,10000,10000],[10000,500,10000,10000,100,10000,10000,10000,10000,10000,10000],[10000,300,10000,10000,400,300,10000,10000,10000,10000,10000],[10000,10000,100,400,10000,10000,200,10000,10000,10000,10000],[10000,10000,10000,300,10000,10000,100,200,10000,10000,10000],[10000,10000,10000,10000,200,100,10000,10000,100,10000,10000],[10000,10000,10000,10000,10000,200,10000,10000,100,10000,10000],[10000,10000,10000,10000,10000,10000,100,100,10000,10000,10000]]\nnow=1\nlast=1\npath=[]\npath.append(1)\nname = ["","小思家","银行","邮局","餐厅","书店","医院","超市","小科家"]\nposition = [[0, 0], [60, 320], [510, 390], [240, 200], [750, 330], [410, 90], [540, 190], [550, 30], [720, 120]]\nsprite.clearAllSprites()\nsprite.createBackground(\'map_si_ke\')\nstu = sprite.Sprite(\'girl\', 60, 320)\nstu.enlargeTo(100)\ntime.sleep(1)\n\n'},algorithm_algorithm_prepare_2_2=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return'g =[[10000,10000,10000,10000,10000,10000,10000],[10000,10000,300,500,10000,10000,10000],[10000,300,10000,10000,300,700,10000],[10000,500,10000,10000,10000,100,10000],[10000,10000,300,10000,10000,10000,200],[10000,10000,700,100,10000,10000,100],[10000,10000,10000,10000,200,100,10000]]\nnow=1\nlast=1\npath=[]\npath.append(1)\nname = ["","小智家","邮局","银行","书店","餐厅","学校"]\nposition = [[0, 0], [70, 340], [70, 90], [550, 310], [420, 70], [730, 250], [650, 130]]\nsprite.clearAllSprites()\nsprite.createBackground(\'map_zhi_xue\')\nstu = sprite.Sprite(\'boy\', 70, 340)\nstu.enlargeTo(100)\ntime.sleep(1)\n\n'},algorithm_algorithm_move_recent=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return'tmp=10000\nfor i in range(0, len(g), 1):\n if g[now][i]6:\n print("路线错乱!程序有误!")\n exit()\n'},algorithm_algorithm_not_home=function(e,t){return["name[now] != '小科家'",t.ORDER_ATOMIC]},algorithm_algorithm_not_school=function(e,t){return["name[now] != '学校'",t.ORDER_ATOMIC]},algorithm_algorithm_print_path2=function(){return'res = ""\nfor i in path:\n res = res + name[i] + "→"\nprint(res[:-1])\n'},algorithm_hanoi_init=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";var n=this.getFieldValue("NUM");if(n>=7)var a="print('层数过高!不得高于6层!')\nexit()\n";else a="sprite.clearAllSprites()\n_Hanoicolor = ['blue', 'red', 'yellow', 'green', 'purple', 'black']\n_Hanoi = [[], [], []]\nA = 0\nB = 1\nC = 2\n_n = "+n+"\n_HanoiColumn = [\n sprite.Sprite('HanoiColumn', 200, 320),\n sprite.Sprite('HanoiColumn', 400, 320),\n sprite.Sprite('HanoiColumn', 600, 320)\n]\n_HanoiColumnNumber = [\n sprite.Text('A', 190, 120),\n sprite.Text('B', 390, 120),\n sprite.Text('C', 590, 120)\n]\n_HanoiBlock = []\nfor i in range(0, _n, 1):\n _HanoiBlock.append(sprite.Sprite(_Hanoicolor[i], 200, 400-(_n-i-1)*27))\n _HanoiBlock[i].setScale(25, 30*i+30)\n _Hanoi[0].insert(0, _HanoiBlock[i])\n_steptext = sprite.Text('步数:0', 30, 30)\n_steps = {'steps' : 0}\ntime.sleep(1)\n";return a},algorithm_hanoi_move=function(e,t){var n=t.valueToCode(this,"FROM_NUM",t.ORDER_ATOMIC)||"0",a=t.valueToCode(this,"TO_NUM",t.ORDER_ATOMIC)||"0";return`if len(_Hanoi[${n}])>0 :\n _HanoiBlockMoved = _Hanoi[${n}].pop()\n if len(_Hanoi[${a}]) > 0 :\n _HanoiBlockSuppressed = _Hanoi[${a}].pop()\n if _HanoiBlock.index(_HanoiBlockMoved) > _HanoiBlock.index(_HanoiBlockSuppressed):\n print('非法移动!程序有误!')\n exit()\n else:\n _Hanoi[${a}].append(_HanoiBlockSuppressed)\n _HanoiBlockMoved.slideTo(${n}*200+200, 180, 0.2)\n _HanoiBlockMoved.slideTo(${a}*200+200, 180, 0.5)\n _HanoiBlockMoved.slideTo(${a}*200+200, 400-len(_Hanoi[${a}])*27, 0.2)\n _Hanoi[${a}].append(_HanoiBlockMoved)\n _steps['steps'] += 1\n _steptext.changeText('步数:'+str(_steps['steps']))\nelse :\n print('非法移动!程序有误!')\n exit()\n`},algorithm_algorithm_all_books_sequence=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"if 'mode' not in globals() or mode == 0:\n sprite.clearAllSprites()\n ring=[0,0,0,0,0,0,0,0,0,0]\n mode=1\n n=5\n ring[5]=1\n name=['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\n Books = []\n for i in range(1, 11, 1):\n Books.append(sprite.Sprite('books/book'+str(i), (130*i-650) if i>5 else 130*i, 320 if i>5 else 120))\nelse:\n mode=2\n n=len(ring)-1\nring[n]=1\ntime.sleep(1)\n"},algorithm_algorithm_all_books=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"if 'mode' not in globals() or mode == 0:\n sprite.clearAllSprites()\n ring=[0,0,0,0,0,0,0,0,0,0]\n mode=2\n n=5\n name=['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\n Books = []\n for i in range(1, 11, 1):\n Books.append(sprite.Sprite('books/book'+str(i), (130*i-650) if i>5 else 130*i, 320 if i>5 else 120))\nelse:\n mode=1\n n=len(ring)-1\nring[n]=n\nlist=ring\ntemp=Books\ntime.sleep(1)\n"},algorithm_algorithm_first_book=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"res=0\nflag=ring[res]\nBooks[res].filterBrighter()\ntime.sleep(0.1)\nBooks[res].filterOrigin()\n"},algorithm_algorithm_no_ring2=function(e,t){return["(('mode' not in globals())or(mode==1 and flag==0)or(mode==2 and not any(value > 0 for value in qian))or(mode==0))",t.ORDER_ATOMIC]},algorithm_algorithm_yes_ring2=function(e,t){return["(('mode' in globals())and((mode==1 and flag!=0)or(mode==2 and any(value > 0 for value in qian))))",t.ORDER_ATOMIC]},algorithm_algorithm_next_book=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";var n="res+=1\nflag=ring[res]\n";return n="Books[res].filterGray()\ntime.sleep(0.3)\n"+(n+="Books[res].filterBrighter()\ntime.sleep(0.1)\nBooks[res].filterOrigin()\n")},algorithm_algorithm_two_left=function(e,t){return["len(list)>=2",t.ORDER_ATOMIC]},algorithm_algorithm_divide_books=function(){return"mid = int(len(list)/2)\nqian = list[0:mid]\nhou = list[mid:]\nqiantemp = temp[0:mid]\nhoutemp = temp[mid:]\n"},algorithm_algorithm_get_half_books=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"quchu = qian\nlist = hou\nquchutemp = qiantemp\ntemp = houtemp\nfor i in qiantemp:\n i.filterBrighter()\ntime.sleep(0.5)\nfor i in qiantemp:\n i.filterGray()\ntime.sleep(0.5)\n"},algorithm_algorithm_delete_book=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"list = quchu\ntemp = quchutemp\nfor i in qiantemp:\n i.filterBrighter()\ntime.sleep(0.5)\nfor i in qiantemp:\n i.filterOrigin()\nfor i in houtemp:\n\ti.filterBrighter()\ntime.sleep(0.5)\nfor i in houtemp:\n i.filterGray()\ntime.sleep(0.5)\n"},algorithm_algorithm_print_book2=function(){return"if 'list' in globals():\n res = list[0]\nBooks[res].filterBrighter()\nprint('未消磁的书籍是第'+str(res+1)+'本《'+name[res%10]+'》。')\nif res!=n:\n print('答案错误!请检查程序!')\nmode=0\n"},algorithm_algorithm_book_scale=function(e,t){var n=this.getFieldValue("NUM");return t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite",`sprite.clearAllSprites()\nring = []\nname = ['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\nBooks = []\nfor i in range(${n}):\n ring.append(0)\nfor i in range(1, ${n}+1, 1):\n Books.append(sprite.Sprite('books/book'+str(i%10 if i%10!=0 else 10), ${{5:"130*i, 120",10:"(130*i-650) if i>5 else 130*i, 320 if i>5 else 120",20:"(65*i-650)+30 if i>10 else 65*i+30, 320 if i>10 else 120",50:"(26*i-650)+50 if i>25 else 26*i+50, 320 if i>25 else 120"}[n]}))\ntime.sleep(1)\nmode=3\n`},algorithm_algorithm_number_zero=function(e,t){t.definitions_.import_sprite="import sprite";return"cnt=0\ncntText = sprite.Text('计数器:0', 30, 200)\n"},algorithm_algorithm_number_add=function(e,t){t.definitions_.import_sprite="import sprite";return"cnt+=1\ncntText.changeText('计数器:'+str(cnt))\n"},algorithm_algorithm_print_number=function(e,t){t.definitions_.import_sprite="import sprite";return"print('计数器大小:'+str(cnt))\n"},algorithm_algorithm_init_jttl=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\n_head = 10\n_foot = 32\n_footText = sprite.Text('脚的数量:', 20, 10)\n_sprite = []\n"},algorithm_algorithm_rabbit_zero=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"_rabbit = 0\ntime.sleep(1)\n"},algorithm_algorithm_rabbit_number_in_range=function(e,t){return["_rabbit < _head",t.ORDER_ATOMIC]},algorithm_algorithm_chick_calculate=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"_chick = _head - _rabbit\nfor i in range(0, _chick, 1):\n _sprite.append(sprite.Sprite('jttl/chick', len(_sprite)*130+130 if len(_sprite)<5 else len(_sprite)*130+130-650, 120 if len(_sprite)<5 else 320))\n\ntime.sleep(0.5)\n_footText.changeText('脚的数量:'+str(_rabbit*4 + _chick*2))\ntime.sleep(1)\n"},algorithm_algorithm_check_feet=function(e,t){return["_rabbit*4 + _chick*2 == _foot",t.ORDER_ATOMIC]},algorithm_algorithm_print_jttl_answer=function(e,t){t.definitions_.import_sprite="import sprite";return"print('鸡的数量:'+str(_chick)+'只;\\n兔的数量:'+str(_rabbit)+'只。')\n"},algorithm_algorithm_rabbit_add=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"_rabbit += 1\nsprite.clearAllSprites()\n_sprite = []\n_footText = sprite.Text('脚的数量:', 20, 10)\nfor i in range(0, _rabbit, 1):\n _sprite.append(sprite.Sprite('jttl/rabbit', len(_sprite)*130+130 if len(_sprite)<5 else len(_sprite)*130+130-650, 120 if len(_sprite)<5 else 320))\ntime.sleep(0.5)\n"},algorithm_algorithm_init_fzsf=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\nsprite.createBackground('/fzsf/map_ck_xxjsjs')\n_S1 = sprite.Sprite('/fzsf/S1',400,225,'S1')\n_S2 = sprite.Sprite('/fzsf/S2',400,225,'S2')\n_S3 = sprite.Sprite('/fzsf/S3',400,225,'S3')\n_S4 = sprite.Sprite('/fzsf/S4',400,225,'S4')\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\n_text_1 = sprite.Text('S1:',0,0,'text')\n_text_2 = sprite.Text('S2:',0,30,'text2')\n_text_3 = sprite.Text('S3:',0,60,'text3')\n_text_4 = sprite.Text('S4:',0,90,'text4')\n_position = [[60, 270], [240, 50], [260, 380], [440, 190], [730, 60], [700, 400]]\n_Llen = [0, 170, 230, 100, 150, 10, 30, 50]\n_Slen = [0, 0, 0, 0, 0]\n_tag = [0, [0, 1, 3], [0, 2, 3], [3, 4, 5], [3, 5]]\nbear = sprite.Sprite('mixbear',60,270,'bear')\nbear.enlargeTo(80)\n_pos = 0\ntime.sleep(1)\n"},algorithm_algorithm_fz_calc=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";var n=this.getFieldValue("PATHNAME");const a=[0,[1,3],[2,4],[5,7],[6]];var _="";return _+=`_S${n}.show()\ntime.sleep(1)\n`,_+=4!=n?`_Slen[${n}] = _Llen[${a[n][0]}] + _Llen[${a[n][1]}]\n_text_${n}.changeText('S${n}:'+str(_Slen[${n}])+'m')\ntime.sleep(1)\n_S${n}.hide()\ntime.sleep(1)\n`:"_Slen[4] = _Llen[6]\n_text_4.changeText('S4:'+str(_Slen[4])+'m')\ntime.sleep(1)\n_S4.hide()\ntime.sleep(1)\n"},algorithm_algorithm_fz_compare=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";var n="";return[n+=`_Slen[${this.getFieldValue("PATHNAME")}] < _Slen[${this.getFieldValue("PATHNAME2")}]`,t.ORDER_ATOMIC]},algorithm_algorithm_fz_set_min=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";var n=this.getFieldValue("PATHNAME"),a="";return a+=`\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\n_Smin = ${n}\n_S${n}.show()\ntime.sleep(0.5)\n_S${n}.hide()\ntime.sleep(0.5)\n_S${n}.show()\ntime.sleep(1)\n`},algorithm_algorithm_fz_move=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"if(_pos == _tag[_Smin][0]):\n for i in range(1, len(_tag[_Smin]), 1):\n bear.slideTo(_position[_tag[_Smin][i]][0], _position[_tag[_Smin][i]][1], 1)\n _pos = _tag[_Smin][len(_tag[_Smin])-1]\nelse:\n print('移动错误!程序有误!')\n exit()\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\nif(_pos == 5):\n print('成功抵达信息科技教室!')\n"},algorithm_algorithm_init_hxdb=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\nsprite.createBackground('/hxdb/hxdbbg')\n_soldier = []\n_num = sprite.Text('目前士兵数量:0',0,0,'num')\n_last = sprite.Text('剩余:0',500,0,'last')\n_line = 3\n"},algorithm_algorithm_hxdb_init_soldier=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";var n="";return n+=`for i in range(0, ${this.getFieldValue("NUM")}, 1):\n _soldier.append(sprite.Sprite('/hxdb/soldier', 30 + (len(_soldier)%_line)*50 + (len(_soldier)//(4*_line))*(_line+1)*50 +(len(_soldier)%3-2), 80+(len(_soldier)//_line)*100-(len(_soldier)//(4*_line))*4*100+(len(_soldier)%2)))\n_num.changeText('目前士兵数量:'+str(len(_soldier)))\n`},algorithm_algorithm_hxdb_stand_in_line=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";var n=this.getFieldValue("NUM");return`for i in range(0, len(_soldier), 1):\n _soldier[i].slideTo(30 + (i%${n})*50 + (i//(4*${n}))*(${n}+1)*50 +(i%3-2), 80+(i//${n})*100-(i//(4*${n}))*4*100+(i%2), 0.05)\n_line = ${n}\n_last.changeText('剩余:'+str(len(_soldier)%_line))\ntime.sleep(2)\n`},algorithm_algorithm_hxdb_last_line=function(e,t){return t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite",[`len(_soldier)%_line == ${this.getFieldValue("NUM")}`,t.ORDER_ATOMIC]},algorithm_algorithm_hxdb_add=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"_num.changeText('目前士兵数量:'+str(len(_soldier)+1))\n_last.changeText('剩余:')\ntime.sleep(0.5)\n_soldier.append(sprite.Sprite('/hxdb/soldier', 30 + (len(_soldier)%_line)*50 + (len(_soldier)//(4*_line))*(_line+1)*50 +(len(_soldier)%3-2), 80+(len(_soldier)//_line)*100-(len(_soldier)//(4*_line))*4*100+(len(_soldier)%2)))\ntime.sleep(1)\n"},algorithm_algorithm_hxdb_result=function(e,t){t.definitions_.import_time="import time",t.definitions_.import_sprite="import sprite";return"print('符合要求的士兵数量为:'+str(len(_soldier)))\n"},algorithm_hanoi_init_offline=function(e,t){t.definitions_.import_turtle="import turtle",t.definitions_.import_time="import time",t.definitions_.import_math="import math";var n=t.valueToCode(this,"VAR",t.ORDER_ATOMIC),a=this.getFieldValue("NUM");return t.setups_.init_Hanoi="\ndef init_Hanoi():\n pen = turtle.Turtle()\n pen.hideturtle()\n pen.speed(0)\n for i in range(0, 3, 1):\n pen.penup()\n pen.setheading(0)\n pen.goto(150 * i - 200,-100)\n pen.pendown()\n pen.pensize(5)\n pen.forward(100)\n pen.goto(150 * i - 150,-100)\n pen.setheading(90)\n pen.forward(200)",t.setups_.begin="\ndef begin(): \n s = turtle.Turtle()\n s.hideturtle()\n s.penup()\n s.speed(0)\n s.goto(0,-150)\n s.write('3')\n time.sleep(1)\n s.clear()\n s.write('2')\n time.sleep(1)\n s.clear()\n s.write('1')\n time.sleep(1)\n s.clear()\n s.write('Start!')\n time.sleep(1)\n s.clear()\n",t.setups_.move="\ndef move(x, y):\n try:\n t = tower[x].pop(-1)\n a = tower_num[x].pop(-1)\n if tower_num[y]!=[]:\n b = tower_num[y][-1]\n if a 1"}]`,t.ORDER_ATOMIC]},data_dataframe_groupby=function(e,t){return[`${t.valueToCode(e,"DICT",t.ORDER_ATOMIC)||"df"}.groupby(by=${t.valueToCode(e,"KEY",t.ORDER_ATOMIC)||"'tag'"})`,t.ORDER_ATOMIC]},data_dataframe_aggregate_func=function(e,t){return[`${t.valueToCode(e,"DICT",t.ORDER_ATOMIC)||"df"}.${e.getFieldValue("TYPE")}()`,t.ORDER_ATOMIC]},data_plot_cla=function(e,t){t.definitions_.import_matplotlib_pyplot="import matplotlib.pyplot as plt";return"plt.cla()\n"},datastructure_ds_create_linkedlist=function(e,t){var n=t.variableDB_.getName(this.getFieldValue("VAR"),external_Blockly_namespaceObject.Variables.NAME_TYPE),a=t.variableDB_.getName(this.getFieldValue("TYPE"),external_Blockly_namespaceObject.Variables.NAME_TYPE),_="class "+a+":\n";_+=" def __init__(self):\n";for(var l=new Array(this.itemCount_),s=0;spromptHelloHelloHello,HelloMixly2100,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!101802990x151100a10.998124.821100101010001100501100110002110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')dirmylist1,2,3,4,5mylist0mylist02mylist00mylist0101mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmylist0mytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}mydictresults0locationnames11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xreadme.txtffilename.txtfffilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtfilename.txtpathff0reponsehttps://mixio.mixly.cnreponsehttps://mixio.mixly.cnreponsetina20tina90tina0tina2020tina50tinatinatinatinatinatina5tinatina225tina5#ff0000#FF0000tina#ff0000#FF0000tina#ff0000#FF0000tina#ff0000#FF0000#ff0000#FF0000tina#FF0000tina#FF0000tina#FF0000tina50tina50360tinascreenturtle.epstina10tinaMixly!tinaMixly!Arial8NUMInput a number:100100Input your nameWhat's your name?df1data.csvdfdfarrayNonearrayNonearrayarrayarraydfvalueFalsedfdf'a','b','c','d'x1.55.50.511array1array2myMatrixmyMatrixmyMatrixarraymatrix1matrix2array1array20,1,2,3xmyArraymyArraymyDimensionsmyArraymyArraymyFeatures0imagetemplatesmyArray0myArray0myArraymylistmylist0,1,2,3mydictmydict'a','b','c','d'mydict'ABCD''a','b','c','d'ser1ser10df1tagdf1tagdf11df1GTcolumndf1tag1df1tagmindf1columndf1tagser1ser11,2,3,45,6,7,81,2,3,45,6,7,820,20,20,20tag1,2,3,45,6,7,8tag1,2,3,45,6,7,80.5tag0.25,0.35,0.1,0.3'a','b','c','d'0.2,0,0,011,21,31,41,51,61,71,81,910,20,40,60,80,100211Titleaxis1,2,3,41,2,3,415581.pngimg1.jpgfacehaarcascade_frontalface_default.xmlfaceRectsimgface1.15faceRectsimgface1.15100100200200Mixlyimg2.jpgimg0img001001003imgMixly02004310020220221001001010.00.010021.0-10.0,10.0TRUEirisiris_Xiris_y0.3modelTRUEFALSEmodel1.0TRUEFALSE300modelmodel100pca2pcaXmodel5modelmodel8300modelXmodelX_trainy_trainmodelX_testy_testmodelX_testmodelmodelmodelD:/mixly/test.pkl \ No newline at end of file +promptHelloHelloHello,HelloMixly2100,1,2,3051iDIVIDE10Exception as eetestThreadtestThreadWHILETRUEHello Mixly from Thread!101802990x151100a10.998124.821100101010001100501100110002110x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')dirmylist1,2,3,4,5mylist0mylist02mylist00mylist0101mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmylist0mytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}mydictresults0locationnames11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xreadme.txtffilename.txtfffilename.txtfMixlyfff0fffpathpathfilename.txtsrcname.txtdstname.txtfilename.txtpathff0reponsehttps://mixio.mixly.cnreponsehttps://mixio.mixly.cnreponsetina20tina90tina0tina2020tina50tinatinatinatinatinatina5tinatina225tina5#ff0000#FF0000tina#ff0000#FF0000tina#ff0000#FF0000tina#ff0000#FF0000#ff0000#FF0000tina#FF0000tina#FF0000tina#FF0000tina50tina50360tinascreenturtle.epstina10tinaMixly!tinaMixly!Arial8NUMInput a number:100100Input your nameWhat's your name?df1data.csvdfdfarrayNonearrayNonearrayarrayarraydfvalueFalsedfdf'a','b','c','d'x1.55.50.511array1array2myMatrixmyMatrixmyMatrixarraymatrix1matrix2array1array20,1,2,3xmyArraymyArraymyDimensionsmyArraymyArraymyFeatures0imagetemplatesmyArray0myArray0myArraymylistmylist0,1,2,3mydictmydict'a','b','c','d'mydict'ABCD''a','b','c','d'ser1ser10df1tagdf1tagdf11df1GTcolumndf1tag1df1tagmindf1columndf1tagser1ser11,2,3,45,6,7,81,2,3,45,6,7,820,20,20,20tag1,2,3,45,6,7,8tag1,2,3,45,6,7,80.5tag0.25,0.35,0.1,0.3'a','b','c','d'0.2,0,0,011,21,31,41,51,61,71,81,910,20,40,60,80,100211Titleaxis1,2,3,41,2,3,415581.pngimg1.jpgfacehaarcascade_frontalface_default.xmlfaceRectsimgface1.15faceRectsimgface1.15100100200200Mixlyimg2.jpgimg0img001001003imgMixly02004310020220221001001010.00.010021.0-10.0,10.0TRUEirisiris_Xiris_y0.3modelTRUEFALSEmodel1.0TRUEFALSE300modelmodel100pca2pcaXmodel5modelmodel8300modelXmodelX_trainy_trainmodelX_testy_testmodelX_testmodelmodelmodelD:/mixly/test.pkl \ No newline at end of file diff --git a/boards/default/python_pyodide/main.bundle.2f838b4c.js b/boards/default/python_pyodide/main.bundle.2f838b4c.js deleted file mode 100644 index f23a1460..00000000 --- a/boards/default/python_pyodide/main.bundle.2f838b4c.js +++ /dev/null @@ -1,86 +0,0 @@ -(()=>{var __webpack_modules__={936:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{cv_destroy_all:()=>cv_destroy_all,cv_face_classifier:()=>cv_face_classifier,cv_face_detect:()=>cv_face_detect,cv_face_detect_all:()=>cv_face_detect_all,cv_line_rect:()=>cv_line_rect,cv_read_image:()=>cv_read_image,cv_show_image:()=>cv_show_image,cv_text:()=>cv_text,cv_waitkey:()=>cv_waitkey,cv_write_image:()=>cv_write_image});const cv_read_image=function(t,e){return e.definitions_.import_cv2="import cv2",["cv2.imread("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},cv_show_image=function(t,e){return e.definitions_.import_cv2="import cv2","cv2.imshow("+e.valueToCode(this,"data",e.ORDER_ATOMIC)+","+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},cv_write_image=function(t,e){return e.definitions_.import_cv2="import cv2","cv2.imwrite("+e.valueToCode(this,"data",e.ORDER_ATOMIC)+","+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},cv_waitkey=function(t,e){return e.definitions_.import_cv2="import cv2","cv2.waitKey("+e.valueToCode(this,"data",e.ORDER_ATOMIC)+")\n"},cv_destroy_all=function(t,e){e.definitions_.import_cv2="import cv2";return"cv2.destroyAllWindows()\n"},cv_line_rect=function(_,generator){generator.definitions_.import_cv2="import cv2";var file=generator.valueToCode(this,"FILE",generator.ORDER_ATOMIC),x1=generator.valueToCode(this,"x1",generator.ORDER_ATOMIC),y1=generator.valueToCode(this,"y1",generator.ORDER_ATOMIC),x2=generator.valueToCode(this,"x2",generator.ORDER_ATOMIC),y2=generator.valueToCode(this,"y2",generator.ORDER_ATOMIC),thick=generator.valueToCode(this,"thick",generator.ORDER_ATOMIC),color=this.getFieldValue("FIELDNAME"),color1=eval("0x"+color[1]+color[2]),color2=eval("0x"+color[3]+color[4]),color3=eval("0x"+color[5]+color[6]),direction=this.getFieldValue("DIR"),code="cv2."+direction+"("+file+",("+x1+","+y1+"),("+x2+","+y2+"),("+color3+","+color2+","+color1+"),"+thick+")\n";return code},cv_text=function(_,generator){generator.definitions_.import_cv2="import cv2";var file=generator.valueToCode(this,"FILE",generator.ORDER_ATOMIC),x1=generator.valueToCode(this,"x1",generator.ORDER_ATOMIC),y1=generator.valueToCode(this,"y1",generator.ORDER_ATOMIC),data=generator.valueToCode(this,"data",generator.ORDER_ATOMIC),size=generator.valueToCode(this,"size",generator.ORDER_ATOMIC),thick=generator.valueToCode(this,"thick",generator.ORDER_ATOMIC),color=this.getFieldValue("FIELDNAME"),color1=eval("0x"+color[1]+color[2]),color2=eval("0x"+color[3]+color[4]),color3=eval("0x"+color[5]+color[6]),font=this.getFieldValue("font"),code="cv2.putText("+file+","+data+",("+x1+","+y1+"),cv2.FONT_HERSHEY_"+font+","+size+",("+color3+","+color2+","+color1+"),"+thick+")\n";return code},cv_face_classifier=function(t,e){return e.definitions_.import_cv2="import cv2",["cv2.CascadeClassifier("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},cv_face_detect=function(t,e){e.definitions_.import_cv2="import cv2";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return[e.valueToCode(this,"FACE",e.ORDER_ATOMIC)+".detectMultiScale("+i+",scaleFactor="+e.valueToCode(this,"SCALE",e.ORDER_ATOMIC)+",minNeighbors="+e.valueToCode(this,"NEIGHBOR",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},cv_face_detect_all=function(t,e){e.definitions_.import_cv2="import cv2";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return[e.valueToCode(this,"FACE",e.ORDER_ATOMIC)+".detectMultiScale("+i+",scaleFactor="+e.valueToCode(this,"SCALE",e.ORDER_ATOMIC)+",minNeighbors="+e.valueToCode(this,"NEIGHBOR",e.ORDER_ATOMIC)+",minSize=("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+","+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+"),maxSize=("+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+","+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]}},153:(t,e,i)=>{"use strict";const{SymbolDispose:n}=i(4184),{AbortError:s,codes:r}=i(6605),{isNodeStream:o,isWebStream:a,kControllerErrorFunction:l}=i(6569),u=i(9700),{ERR_INVALID_ARG_TYPE:p}=r;let h;t.exports.addAbortSignal=function(e,i){if(((t,e)=>{if("object"!=typeof t||!("aborted"in t))throw new p(e,"AbortSignal",t)})(e,"signal"),!o(i)&&!a(i))throw new p("stream",["ReadableStream","WritableStream","Stream"],i);return t.exports.addAbortSignalNoValidate(e,i)},t.exports.addAbortSignalNoValidate=function(t,e){if("object"!=typeof t||!("aborted"in t))return e;const r=o(e)?()=>{e.destroy(new s(void 0,{cause:t.reason}))}:()=>{e[l](new s(void 0,{cause:t.reason}))};if(t.aborted)r();else{h=h||i(798).addAbortListener;const s=h(t,r);u(e,s[n])}return e}},1515:(t,e,i)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:s,TypedArrayPrototypeSet:r,Uint8Array:o}=i(4184),{Buffer:a}=i(8287),{inspect:l}=i(798);t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}unshift(t){const e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}shift(){if(0===this.length)return;const t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(0===this.length)return"";let e=this.head,i=""+e.data;for(;null!==(e=e.next);)i+=t+e.data;return i}concat(t){if(0===this.length)return a.alloc(0);const e=a.allocUnsafe(t>>>0);let i=this.head,n=0;for(;i;)r(e,i.data,n),n+=i.data.length,i=i.next;return e}consume(t,e){const i=this.head.data;if(tr.length)){t===r.length?(e+=r,++s,i.next?this.head=i.next:this.head=this.tail=null):(e+=n(r,0,t),this.head=i,i.data=n(r,t));break}e+=r,t-=r.length,++s}while(null!==(i=i.next));return this.length-=s,e}_getBuffer(t){const e=a.allocUnsafe(t),i=t;let n=this.head,s=0;do{const a=n.data;if(!(t>a.length)){t===a.length?(r(e,a,i-t),++s,n.next?this.head=n.next:this.head=this.tail=null):(r(e,new o(a.buffer,a.byteOffset,t),i-t),this.head=n,n.data=a.slice(t));break}r(e,a,i-t),t-=a.length,++s}while(null!==(n=n.next));return this.length-=s,e}[Symbol.for("nodejs.util.inspect.custom")](t,e){return l(this,{...e,depth:0,customInspect:!1})}}},6864:(t,e,i)=>{"use strict";const{pipeline:n}=i(872),s=i(4992),{destroyer:r}=i(2430),{isNodeStream:o,isReadable:a,isWritable:l,isWebStream:u,isTransformStream:p,isWritableStream:h,isReadableStream:d}=i(6569),{AbortError:c,codes:{ERR_INVALID_ARG_VALUE:_,ERR_MISSING_ARGS:f}}=i(6605),T=i(9700);t.exports=function(...t){if(0===t.length)throw new f("streams");if(1===t.length)return s.from(t[0]);const e=[...t];if("function"==typeof t[0]&&(t[0]=s.from(t[0])),"function"==typeof t[t.length-1]){const e=t.length-1;t[e]=s.from(t[e])}for(let i=0;i0&&!(l(t[i])||h(t[i])||p(t[i])))throw new _(`streams[${i}]`,e[i],"must be writable")}let i,m,g,I,E;const O=t[0],M=n(t,(function(t){const e=I;I=null,e?e(t):t?E.destroy(t):A||R||E.destroy()})),R=!!(l(O)||h(O)||p(O)),A=!!(a(M)||d(M)||p(M));if(E=new s({writableObjectMode:!(null==O||!O.writableObjectMode),readableObjectMode:!(null==M||!M.readableObjectMode),writable:R,readable:A}),R){if(o(O))E._write=function(t,e,n){O.write(t,e)?n():i=n},E._final=function(t){O.end(),m=t},O.on("drain",(function(){if(i){const t=i;i=null,t()}}));else if(u(O)){const t=(p(O)?O.writable:O).getWriter();E._write=async function(e,i,n){try{await t.ready,t.write(e).catch((()=>{})),n()}catch(t){n(t)}},E._final=async function(e){try{await t.ready,t.close().catch((()=>{})),m=e}catch(t){e(t)}}}const t=p(M)?M.readable:M;T(t,(()=>{if(m){const t=m;m=null,t()}}))}if(A)if(o(M))M.on("readable",(function(){if(g){const t=g;g=null,t()}})),M.on("end",(function(){E.push(null)})),E._read=function(){for(;;){const t=M.read();if(null===t)return void(g=E._read);if(!E.push(t))return}};else if(u(M)){const t=(p(M)?M.readable:M).getReader();E._read=async function(){for(;;)try{const{value:e,done:i}=await t.read();if(!E.push(e))return;if(i)return void E.push(null)}catch{return}}}return E._destroy=function(t,e){t||null===I||(t=new c),g=null,i=null,m=null,null===I?e(t):(I=e,o(M)&&r(M,t))},E}},2430:(t,e,i)=>{"use strict";const n=i(5606),{aggregateTwoErrors:s,codes:{ERR_MULTIPLE_CALLBACK:r},AbortError:o}=i(6605),{Symbol:a}=i(4184),{kIsDestroyed:l,isDestroyed:u,isFinished:p,isServerRequest:h}=i(6569),d=a("kDestroy"),c=a("kConstruct");function _(t,e,i){t&&(t.stack,e&&!e.errored&&(e.errored=t),i&&!i.errored&&(i.errored=t))}function f(t,e,i){let s=!1;function r(e){if(s)return;s=!0;const r=t._readableState,o=t._writableState;_(e,o,r),o&&(o.closed=!0),r&&(r.closed=!0),"function"==typeof i&&i(e),e?n.nextTick(T,t,e):n.nextTick(m,t)}try{t._destroy(e||null,r)}catch(e){r(e)}}function T(t,e){g(t,e),m(t)}function m(t){const e=t._readableState,i=t._writableState;i&&(i.closeEmitted=!0),e&&(e.closeEmitted=!0),(null!=i&&i.emitClose||null!=e&&e.emitClose)&&t.emit("close")}function g(t,e){const i=t._readableState,n=t._writableState;null!=n&&n.errorEmitted||null!=i&&i.errorEmitted||(n&&(n.errorEmitted=!0),i&&(i.errorEmitted=!0),t.emit("error",e))}function I(t,e,i){const s=t._readableState,r=t._writableState;if(null!=r&&r.destroyed||null!=s&&s.destroyed)return this;null!=s&&s.autoDestroy||null!=r&&r.autoDestroy?t.destroy(e):e&&(e.stack,r&&!r.errored&&(r.errored=e),s&&!s.errored&&(s.errored=e),i?n.nextTick(g,t,e):g(t,e))}function E(t){let e=!1;function i(i){if(e)return void I(t,null!=i?i:new r);e=!0;const s=t._readableState,o=t._writableState,a=o||s;s&&(s.constructed=!0),o&&(o.constructed=!0),a.destroyed?t.emit(d,i):i?I(t,i,!0):n.nextTick(O,t)}try{t._construct((t=>{n.nextTick(i,t)}))}catch(t){n.nextTick(i,t)}}function O(t){t.emit(c)}function M(t){return(null==t?void 0:t.setHeader)&&"function"==typeof t.abort}function R(t){t.emit("close")}function A(t,e){t.emit("error",e),n.nextTick(R,t)}t.exports={construct:function(t,e){if("function"!=typeof t._construct)return;const i=t._readableState,s=t._writableState;i&&(i.constructed=!1),s&&(s.constructed=!1),t.once(c,e),t.listenerCount(c)>1||n.nextTick(E,t)},destroyer:function(t,e){t&&!u(t)&&(e||p(t)||(e=new o),h(t)?(t.socket=null,t.destroy(e)):M(t)?t.abort():M(t.req)?t.req.abort():"function"==typeof t.destroy?t.destroy(e):"function"==typeof t.close?t.close():e?n.nextTick(A,t,e):n.nextTick(R,t),t.destroyed||(t[l]=!0))},destroy:function(t,e){const i=this._readableState,n=this._writableState,r=n||i;return null!=n&&n.destroyed||null!=i&&i.destroyed?("function"==typeof e&&e(),this):(_(t,n,i),n&&(n.destroyed=!0),i&&(i.destroyed=!0),r.constructed?f(this,t,e):this.once(d,(function(i){f(this,s(i,t),e)})),this)},undestroy:function(){const t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=!1===t.readable,t.endEmitted=!1===t.readable),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=!1===e.writable,e.ending=!1===e.writable,e.finished=!1===e.writable)},errorOrDestroy:I}},4992:(t,e,i)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:s,ObjectKeys:r,ObjectSetPrototypeOf:o}=i(4184);t.exports=u;const a=i(6566),l=i(394);o(u.prototype,a.prototype),o(u,a);{const t=r(l.prototype);for(let e=0;e{const n=i(5606),s=i(8287),{isReadable:r,isWritable:o,isIterable:a,isNodeStream:l,isReadableNodeStream:u,isWritableNodeStream:p,isDuplexNodeStream:h,isReadableStream:d,isWritableStream:c}=i(6569),_=i(9700),{AbortError:f,codes:{ERR_INVALID_ARG_TYPE:T,ERR_INVALID_RETURN_VALUE:m}}=i(6605),{destroyer:g}=i(2430),I=i(4992),E=i(6566),O=i(394),{createDeferredPromise:M}=i(798),R=i(3182),A=globalThis.Blob||s.Blob,y=void 0!==A?function(t){return t instanceof A}:function(t){return!1},S=globalThis.AbortController||i(5568).AbortController,{FunctionPrototypeCall:v}=i(4184);class C extends I{constructor(t){super(t),!1===(null==t?void 0:t.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==t?void 0:t.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function L(t){const e=t.readable&&"function"!=typeof t.readable.read?E.wrap(t.readable):t.readable,i=t.writable;let n,s,a,l,u,p=!!r(e),h=!!o(i);function d(t){const e=l;l=null,e?e(t):t&&u.destroy(t)}return u=new C({readableObjectMode:!(null==e||!e.readableObjectMode),writableObjectMode:!(null==i||!i.writableObjectMode),readable:p,writable:h}),h&&(_(i,(t=>{h=!1,t&&g(e,t),d(t)})),u._write=function(t,e,s){i.write(t,e)?s():n=s},u._final=function(t){i.end(),s=t},i.on("drain",(function(){if(n){const t=n;n=null,t()}})),i.on("finish",(function(){if(s){const t=s;s=null,t()}}))),p&&(_(e,(t=>{p=!1,t&&g(e,t),d(t)})),e.on("readable",(function(){if(a){const t=a;a=null,t()}})),e.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const t=e.read();if(null===t)return void(a=u._read);if(!u.push(t))return}}),u._destroy=function(t,r){t||null===l||(t=new f),a=null,n=null,s=null,null===l?r(t):(l=r,g(i,t),g(e,t))},u}t.exports=function t(e,i){if(h(e))return e;if(u(e))return L({readable:e});if(p(e))return L({writable:e});if(l(e))return L({writable:!1,readable:!1});if(d(e))return L({readable:E.fromWeb(e)});if(c(e))return L({writable:O.fromWeb(e)});if("function"==typeof e){const{value:t,write:s,final:r,destroy:o}=function(t){let{promise:e,resolve:i}=M();const s=new S,r=s.signal,o=t(async function*(){for(;;){const t=e;e=null;const{chunk:s,done:o,cb:a}=await t;if(n.nextTick(a),o)return;if(r.aborted)throw new f(void 0,{cause:r.reason});({promise:e,resolve:i}=M()),yield s}}(),{signal:r});return{value:o,write(t,e,n){const s=i;i=null,s({chunk:t,done:!1,cb:n})},final(t){const e=i;i=null,e({done:!0,cb:t})},destroy(t,e){s.abort(),e(t)}}}(e);if(a(t))return R(C,t,{objectMode:!0,write:s,final:r,destroy:o});const l=null==t?void 0:t.then;if("function"==typeof l){let e;const i=v(l,t,(t=>{if(null!=t)throw new m("nully","body",t)}),(t=>{g(e,t)}));return e=new C({objectMode:!0,readable:!1,write:s,final(t){r((async()=>{try{await i,n.nextTick(t,null)}catch(e){n.nextTick(t,e)}}))},destroy:o})}throw new m("Iterable, AsyncIterable or AsyncFunction",i,t)}if(y(e))return t(e.arrayBuffer());if(a(e))return R(C,e,{objectMode:!0,writable:!1});if(d(null==e?void 0:e.readable)&&c(null==e?void 0:e.writable))return C.fromWeb(e);if("object"==typeof(null==e?void 0:e.writable)||"object"==typeof(null==e?void 0:e.readable)){return L({readable:null!=e&&e.readable?u(null==e?void 0:e.readable)?null==e?void 0:e.readable:t(e.readable):void 0,writable:null!=e&&e.writable?p(null==e?void 0:e.writable)?null==e?void 0:e.writable:t(e.writable):void 0})}const s=null==e?void 0:e.then;if("function"==typeof s){let t;return v(s,e,(e=>{null!=e&&t.push(e),t.push(null)}),(e=>{g(t,e)})),t=new C({objectMode:!0,writable:!1,read(){}})}throw new T(i,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],e)}},9700:(t,e,i)=>{const n=i(5606),{AbortError:s,codes:r}=i(6605),{ERR_INVALID_ARG_TYPE:o,ERR_STREAM_PREMATURE_CLOSE:a}=r,{kEmptyObject:l,once:u}=i(798),{validateAbortSignal:p,validateFunction:h,validateObject:d,validateBoolean:c}=i(6283),{Promise:_,PromisePrototypeThen:f,SymbolDispose:T}=i(4184),{isClosed:m,isReadable:g,isReadableNodeStream:I,isReadableStream:E,isReadableFinished:O,isReadableErrored:M,isWritable:R,isWritableNodeStream:A,isWritableStream:y,isWritableFinished:S,isWritableErrored:v,isNodeStream:C,willEmitClose:L,kIsClosedPromise:b}=i(6569);let D;const w=()=>{};function N(t,e,r){var c,_;if(2===arguments.length?(r=e,e=l):null==e?e=l:d(e,"options"),h(r,"callback"),p(e.signal,"options.signal"),r=u(r),E(t)||y(t))return function(t,e,r){let o=!1,a=w;if(e.signal)if(a=()=>{o=!0,r.call(t,new s(void 0,{cause:e.signal.reason}))},e.signal.aborted)n.nextTick(a);else{D=D||i(798).addAbortListener;const n=D(e.signal,a),s=r;r=u(((...e)=>{n[T](),s.apply(t,e)}))}const l=(...e)=>{o||n.nextTick((()=>r.apply(t,e)))};return f(t[b].promise,l,l),w}(t,e,r);if(!C(t))throw new o("stream",["ReadableStream","WritableStream","Stream"],t);const N=null!==(c=e.readable)&&void 0!==c?c:I(t),F=null!==(_=e.writable)&&void 0!==_?_:A(t),P=t._writableState,x=t._readableState,k=()=>{t.writable||B()};let V=L(t)&&I(t)===N&&A(t)===F,Y=S(t,!1);const B=()=>{Y=!0,t.destroyed&&(V=!1),(!V||t.readable&&!N)&&(N&&!U||r.call(t))};let U=O(t,!1);const X=()=>{U=!0,t.destroyed&&(V=!1),(!V||t.writable&&!F)&&(F&&!Y||r.call(t))},G=e=>{r.call(t,e)};let H=m(t);const W=()=>{H=!0;const e=v(t)||M(t);return e&&"boolean"!=typeof e?r.call(t,e):N&&!U&&I(t,!0)&&!O(t,!1)?r.call(t,new a):!F||Y||S(t,!1)?void r.call(t):r.call(t,new a)},j=()=>{H=!0;const e=v(t)||M(t);if(e&&"boolean"!=typeof e)return r.call(t,e);r.call(t)},q=()=>{t.req.on("finish",B)};!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?F&&!P&&(t.on("end",k),t.on("close",k)):(t.on("complete",B),V||t.on("abort",W),t.req?q():t.on("request",q)),V||"boolean"!=typeof t.aborted||t.on("aborted",W),t.on("end",X),t.on("finish",B),!1!==e.error&&t.on("error",G),t.on("close",W),H?n.nextTick(W):null!=P&&P.errorEmitted||null!=x&&x.errorEmitted?V||n.nextTick(j):(N||V&&!g(t)||!Y&&!1!==R(t))&&(F||V&&!R(t)||!U&&!1!==g(t))?x&&t.req&&t.aborted&&n.nextTick(j):n.nextTick(j);const K=()=>{r=w,t.removeListener("aborted",W),t.removeListener("complete",B),t.removeListener("abort",W),t.removeListener("request",q),t.req&&t.req.removeListener("finish",B),t.removeListener("end",k),t.removeListener("close",k),t.removeListener("finish",B),t.removeListener("end",X),t.removeListener("error",G),t.removeListener("close",W)};if(e.signal&&!H){const o=()=>{const i=r;K(),i.call(t,new s(void 0,{cause:e.signal.reason}))};if(e.signal.aborted)n.nextTick(o);else{D=D||i(798).addAbortListener;const n=D(e.signal,o),s=r;r=u(((...e)=>{n[T](),s.apply(t,e)}))}}return K}t.exports=N,t.exports.finished=function(t,e){var i;let n=!1;return null===e&&(e=l),null!==(i=e)&&void 0!==i&&i.cleanup&&(c(e.cleanup,"cleanup"),n=e.cleanup),new _(((i,s)=>{const r=N(t,e,(t=>{n&&r(),t?s(t):i()}))}))}},3182:(t,e,i)=>{"use strict";const n=i(5606),{PromisePrototypeThen:s,SymbolAsyncIterator:r,SymbolIterator:o}=i(4184),{Buffer:a}=i(8287),{ERR_INVALID_ARG_TYPE:l,ERR_STREAM_NULL_VALUES:u}=i(6605).codes;t.exports=function(t,e,i){let p,h;if("string"==typeof e||e instanceof a)return new t({objectMode:!0,...i,read(){this.push(e),this.push(null)}});if(e&&e[r])h=!0,p=e[r]();else{if(!e||!e[o])throw new l("iterable",["Iterable"],e);h=!1,p=e[o]()}const d=new t({objectMode:!0,highWaterMark:1,...i});let c=!1;return d._read=function(){c||(c=!0,async function(){for(;;){try{const{value:t,done:e}=h?await p.next():p.next();if(e)d.push(null);else{const e=t&&"function"==typeof t.then?await t:t;if(null===e)throw c=!1,new u;if(d.push(e))continue;c=!1}}catch(t){d.destroy(t)}break}}())},d._destroy=function(t,e){s(async function(t){const e=null!=t,i="function"==typeof p.throw;if(e&&i){const{value:e,done:i}=await p.throw(t);if(await e,i)return}if("function"==typeof p.return){const{value:t}=await p.return();await t}}(t),(()=>n.nextTick(e,t)),(i=>n.nextTick(e,i||t)))},d}},2913:(t,e,i)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:s}=i(4184),{EventEmitter:r}=i(7007);function o(t){r.call(this,t)}function a(t,e,i){if("function"==typeof t.prependListener)return t.prependListener(e,i);t._events&&t._events[e]?n(t._events[e])?t._events[e].unshift(i):t._events[e]=[i,t._events[e]]:t.on(e,i)}s(o.prototype,r.prototype),s(o,r),o.prototype.pipe=function(t,e){const i=this;function n(e){t.writable&&!1===t.write(e)&&i.pause&&i.pause()}function s(){i.readable&&i.resume&&i.resume()}i.on("data",n),t.on("drain",s),t._isStdio||e&&!1===e.end||(i.on("end",l),i.on("close",u));let o=!1;function l(){o||(o=!0,t.end())}function u(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function p(t){h(),0===r.listenerCount(this,"error")&&this.emit("error",t)}function h(){i.removeListener("data",n),t.removeListener("drain",s),i.removeListener("end",l),i.removeListener("close",u),i.removeListener("error",p),t.removeListener("error",p),i.removeListener("end",h),i.removeListener("close",h),t.removeListener("close",h)}return a(i,"error",p),a(t,"error",p),i.on("end",h),i.on("close",h),t.on("close",h),t.emit("pipe",i),t},t.exports={Stream:o,prependListener:a}},5589:(t,e,i)=>{"use strict";const n=globalThis.AbortController||i(5568).AbortController,{codes:{ERR_INVALID_ARG_VALUE:s,ERR_INVALID_ARG_TYPE:r,ERR_MISSING_ARGS:o,ERR_OUT_OF_RANGE:a},AbortError:l}=i(6605),{validateAbortSignal:u,validateInteger:p,validateObject:h}=i(6283),d=i(4184).Symbol("kWeak"),c=i(4184).Symbol("kResistStopPropagation"),{finished:_}=i(9700),f=i(6864),{addAbortSignalNoValidate:T}=i(153),{isWritable:m,isNodeStream:g}=i(6569),{deprecate:I}=i(798),{ArrayPrototypePush:E,Boolean:O,MathFloor:M,Number:R,NumberIsNaN:A,Promise:y,PromiseReject:S,PromiseResolve:v,PromisePrototypeThen:C,Symbol:L}=i(4184),b=L("kEmpty"),D=L("kEof");function w(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);null!=e&&h(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");let n=1;null!=(null==e?void 0:e.concurrency)&&(n=M(e.concurrency));let s=n-1;return null!=(null==e?void 0:e.highWaterMark)&&(s=M(e.highWaterMark)),p(n,"options.concurrency",1),p(s,"options.highWaterMark",0),s+=n,async function*(){const r=i(798).AbortSignalAny([null==e?void 0:e.signal].filter(O)),o=this,a=[],u={signal:r};let p,h,d=!1,c=0;function _(){d=!0,f()}function f(){c-=1,T()}function T(){h&&!d&&c=s||c>=n)&&await new y((t=>{h=t}))}a.push(D)}catch(t){const e=S(t);C(e,f,_),a.push(e)}finally{d=!0,p&&(p(),p=null)}}();try{for(;;){for(;a.length>0;){const t=await a[0];if(t===D)return;if(r.aborted)throw new l;t!==b&&(yield t),a.shift(),T()}await new y((t=>{p=t}))}}finally{d=!0,h&&(h(),h=null)}}.call(this)}async function N(t,e=void 0){for await(const i of F.call(this,t,e))return!0;return!1}function F(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);return w.call(this,(async function(e,i){return await t(e,i)?e:b}),e)}class P extends o{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function x(t){if(t=R(t),A(t))return 0;if(t<0)throw new a("number",">= 0",t);return t}t.exports.streamReturningOperators={asIndexedPairs:I((function(t=void 0){return null!=t&&h(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),async function*(){let e=0;for await(const n of this){var i;if(null!=t&&null!==(i=t.signal)&&void 0!==i&&i.aborted)throw new l({cause:t.signal.reason});yield[e++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(t,e=void 0){return null!=e&&h(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),t=x(t),async function*(){var i;if(null!=e&&null!==(i=e.signal)&&void 0!==i&&i.aborted)throw new l;for await(const i of this){var n;if(null!=e&&null!==(n=e.signal)&&void 0!==n&&n.aborted)throw new l;t--<=0&&(yield i)}}.call(this)},filter:F,flatMap:function(t,e){const i=w.call(this,t,e);return async function*(){for await(const t of i)yield*t}.call(this)},map:w,take:function(t,e=void 0){return null!=e&&h(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),t=x(t),async function*(){var i;if(null!=e&&null!==(i=e.signal)&&void 0!==i&&i.aborted)throw new l;for await(const i of this){var n;if(null!=e&&null!==(n=e.signal)&&void 0!==n&&n.aborted)throw new l;if(t-- >0&&(yield i),t<=0)return}}.call(this)},compose:function(t,e){if(null!=e&&h(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),g(t)&&!m(t))throw new s("stream",t,"must be writable");const i=f(this,t);return null!=e&&e.signal&&T(e.signal,i),i}},t.exports.promiseReturningOperators={every:async function(t,e=void 0){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);return!await N.call(this,(async(...e)=>!await t(...e)),e)},forEach:async function(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);for await(const i of w.call(this,(async function(e,i){return await t(e,i),b}),e));},reduce:async function(t,e,i){var s;if("function"!=typeof t)throw new r("reducer",["Function","AsyncFunction"],t);null!=i&&h(i,"options"),null!=(null==i?void 0:i.signal)&&u(i.signal,"options.signal");let o=arguments.length>1;if(null!=i&&null!==(s=i.signal)&&void 0!==s&&s.aborted){const t=new l(void 0,{cause:i.signal.reason});throw this.once("error",(()=>{})),await _(this.destroy(t)),t}const a=new n,p=a.signal;if(null!=i&&i.signal){const t={once:!0,[d]:this,[c]:!0};i.signal.addEventListener("abort",(()=>a.abort()),t)}let f=!1;try{for await(const n of this){var T;if(f=!0,null!=i&&null!==(T=i.signal)&&void 0!==T&&T.aborted)throw new l;o?e=await t(e,n,{signal:p}):(e=n,o=!0)}if(!f&&!o)throw new P}finally{a.abort()}return e},toArray:async function(t){null!=t&&h(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal");const e=[];for await(const n of this){var i;if(null!=t&&null!==(i=t.signal)&&void 0!==i&&i.aborted)throw new l(void 0,{cause:t.signal.reason});E(e,n)}return e},some:N,find:async function(t,e){for await(const i of F.call(this,t,e))return i}}},6898:(t,e,i)=>{"use strict";const{ObjectSetPrototypeOf:n}=i(4184);t.exports=r;const s=i(208);function r(t){if(!(this instanceof r))return new r(t);s.call(this,t)}n(r.prototype,s.prototype),n(r,s),r.prototype._transform=function(t,e,i){i(null,t)}},872:(t,e,i)=>{const n=i(5606),{ArrayIsArray:s,Promise:r,SymbolAsyncIterator:o,SymbolDispose:a}=i(4184),l=i(9700),{once:u}=i(798),p=i(2430),h=i(4992),{aggregateTwoErrors:d,codes:{ERR_INVALID_ARG_TYPE:c,ERR_INVALID_RETURN_VALUE:_,ERR_MISSING_ARGS:f,ERR_STREAM_DESTROYED:T,ERR_STREAM_PREMATURE_CLOSE:m},AbortError:g}=i(6605),{validateFunction:I,validateAbortSignal:E}=i(6283),{isIterable:O,isReadable:M,isReadableNodeStream:R,isNodeStream:A,isTransformStream:y,isWebStream:S,isReadableStream:v,isReadableFinished:C}=i(6569),L=globalThis.AbortController||i(5568).AbortController;let b,D,w;function N(t,e,i){let n=!1;t.on("close",(()=>{n=!0}));return{destroy:e=>{n||(n=!0,p.destroyer(t,e||new T("pipe")))},cleanup:l(t,{readable:e,writable:i},(t=>{n=!t}))}}function F(t){if(O(t))return t;if(R(t))return async function*(t){D||(D=i(6566));yield*D.prototype[o].call(t)}(t);throw new c("val",["Readable","Iterable","AsyncIterable"],t)}async function P(t,e,i,{end:n}){let s,o=null;const a=t=>{if(t&&(s=t),o){const t=o;o=null,t()}},u=()=>new r(((t,e)=>{s?e(s):o=()=>{s?e(s):t()}}));e.on("drain",a);const p=l(e,{readable:!1},a);try{e.writableNeedDrain&&await u();for await(const i of t)e.write(i)||await u();n&&(e.end(),await u()),i()}catch(t){i(s!==t?d(s,t):t)}finally{p(),e.off("drain",a)}}async function x(t,e,i,{end:n}){y(e)&&(e=e.writable);const s=e.getWriter();try{for await(const e of t)await s.ready,s.write(e).catch((()=>{}));await s.ready,n&&await s.close(),i()}catch(t){try{await s.abort(t),i(t)}catch(t){i(t)}}}function k(t,e,r){if(1===t.length&&s(t[0])&&(t=t[0]),t.length<2)throw new f("streams");const o=new L,l=o.signal,u=null==r?void 0:r.signal,p=[];function d(){B(new g)}let T,m,I;E(u,"options.signal"),w=w||i(798).addAbortListener,u&&(T=w(u,d));const C=[];let D,k=0;function Y(t){B(t,0==--k)}function B(t,i){var s;if(!t||m&&"ERR_STREAM_PREMATURE_CLOSE"!==m.code||(m=t),m||i){for(;C.length;)C.shift()(m);null===(s=T)||void 0===s||s[a](),o.abort(),i&&(m||p.forEach((t=>t())),n.nextTick(e,m,I))}}for(let H=0;H0,K=j||!1!==(null==r?void 0:r.end),z=H===t.length-1;if(A(W)){if(K){const{destroy:$,cleanup:Q}=N(W,j,q);C.push($),M(W)&&z&&p.push(Q)}function U(t){t&&"AbortError"!==t.name&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code&&Y(t)}W.on("error",U),M(W)&&z&&p.push((()=>{W.removeListener("error",U)}))}if(0===H)if("function"==typeof W){if(D=W({signal:l}),!O(D))throw new _("Iterable, AsyncIterable or Stream","source",D)}else D=O(W)||R(W)||y(W)?W:h.from(W);else if("function"==typeof W){var X;if(y(D))D=F(null===(X=D)||void 0===X?void 0:X.readable);else D=F(D);if(D=W(D,{signal:l}),j){if(!O(D,!0))throw new _("AsyncIterable",`transform[${H-1}]`,D)}else{var G;b||(b=i(6898));const J=new b({objectMode:!0}),Z=null===(G=D)||void 0===G?void 0:G.then;if("function"==typeof Z)k++,Z.call(D,(t=>{I=t,null!=t&&J.write(t),K&&J.end(),n.nextTick(Y)}),(t=>{J.destroy(t),n.nextTick(Y,t)}));else if(O(D,!0))k++,P(D,J,Y,{end:K});else{if(!v(D)&&!y(D))throw new _("AsyncIterable or Promise","destination",D);{const it=D.readable||D;k++,P(it,J,Y,{end:K})}}D=J;const{destroy:tt,cleanup:et}=N(D,!1,!0);C.push(tt),z&&p.push(et)}}else if(A(W)){if(R(D)){k+=2;const nt=V(D,W,Y,{end:K});M(W)&&z&&p.push(nt)}else if(y(D)||v(D)){const st=D.readable||D;k++,P(st,W,Y,{end:K})}else{if(!O(D))throw new c("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],D);k++,P(D,W,Y,{end:K})}D=W}else if(S(W)){if(R(D))k++,x(F(D),W,Y,{end:K});else if(v(D)||O(D))k++,x(D,W,Y,{end:K});else{if(!y(D))throw new c("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],D);k++,x(D.readable,W,Y,{end:K})}D=W}else D=h.from(W)}return(null!=l&&l.aborted||null!=u&&u.aborted)&&n.nextTick(d),D}function V(t,e,i,{end:s}){let r=!1;if(e.on("close",(()=>{r||i(new m)})),t.pipe(e,{end:!1}),s){function o(){r=!0,e.end()}C(t)?n.nextTick(o):t.once("end",o)}else i();return l(t,{readable:!0,writable:!1},(e=>{const n=t._readableState;e&&"ERR_STREAM_PREMATURE_CLOSE"===e.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?t.once("end",i).once("error",i):i(e)})),l(e,{readable:!1,writable:!0},i)}t.exports={pipelineImpl:k,pipeline:function(...t){return k(t,u(function(t){return I(t[t.length-1],"streams[stream.length - 1]"),t.pop()}(t)))}}},6566:(t,e,i)=>{const n=i(5606),{ArrayPrototypeIndexOf:s,NumberIsInteger:r,NumberIsNaN:o,NumberParseInt:a,ObjectDefineProperties:l,ObjectKeys:u,ObjectSetPrototypeOf:p,Promise:h,SafeSet:d,SymbolAsyncDispose:c,SymbolAsyncIterator:_,Symbol:f}=i(4184);t.exports=z,z.ReadableState=K;const{EventEmitter:T}=i(7007),{Stream:m,prependListener:g}=i(2913),{Buffer:I}=i(8287),{addAbortSignal:E}=i(153),O=i(9700);let M=i(798).debuglog("stream",(t=>{M=t}));const R=i(1515),A=i(2430),{getHighWaterMark:y,getDefaultHighWaterMark:S}=i(9153),{aggregateTwoErrors:v,codes:{ERR_INVALID_ARG_TYPE:C,ERR_METHOD_NOT_IMPLEMENTED:L,ERR_OUT_OF_RANGE:b,ERR_STREAM_PUSH_AFTER_EOF:D,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:w},AbortError:N}=i(6605),{validateObject:F}=i(6283),P=f("kPaused"),{StringDecoder:x}=i(8707),k=i(3182);p(z.prototype,m.prototype),p(z,m);const V=()=>{},{errorOrDestroy:Y}=A,B=1,U=16,X=32,G=64,H=2048,W=4096,j=65536;function q(t){return{enumerable:!1,get(){return!!(this.state&t)},set(e){e?this.state|=t:this.state&=~t}}}function K(t,e,n){"boolean"!=typeof n&&(n=e instanceof i(4992)),this.state=H|W|U|X,t&&t.objectMode&&(this.state|=B),n&&t&&t.readableObjectMode&&(this.state|=B),this.highWaterMark=t?y(this,t,"readableHighWaterMark",n):S(!1),this.buffer=new R,this.length=0,this.pipes=[],this.flowing=null,this[P]=null,t&&!1===t.emitClose&&(this.state&=~H),t&&!1===t.autoDestroy&&(this.state&=~W),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new x(t.encoding),this.encoding=t.encoding)}function z(t){if(!(this instanceof z))return new z(t);const e=this instanceof i(4992);this._readableState=new K(t,this,e),t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&!e&&E(t.signal,this)),m.call(this,t),A.construct(this,(()=>{this._readableState.needReadable&&et(this,this._readableState)}))}function $(t,e,i,n){M("readableAddChunk",e);const s=t._readableState;let r;if(s.state&B||("string"==typeof e?(i=i||s.defaultEncoding,s.encoding!==i&&(n&&s.encoding?e=I.from(e,i).toString(s.encoding):(e=I.from(e,i),i=""))):e instanceof I?i="":m._isUint8Array(e)?(e=m._uint8ArrayToBuffer(e),i=""):null!=e&&(r=new C("chunk",["string","Buffer","Uint8Array"],e))),r)Y(t,r);else if(null===e)s.state&=-9,function(t,e){if(M("onEofChunk"),e.ended)return;if(e.decoder){const t=e.decoder.end();t&&t.length&&(e.buffer.push(t),e.length+=e.objectMode?1:t.length)}e.ended=!0,e.sync?Z(t):(e.needReadable=!1,e.emittedReadable=!0,tt(t))}(t,s);else if(s.state&B||e&&e.length>0)if(n)if(4&s.state)Y(t,new w);else{if(s.destroyed||s.errored)return!1;Q(t,s,e,!0)}else if(s.ended)Y(t,new D);else{if(s.destroyed||s.errored)return!1;s.state&=-9,s.decoder&&!i?(e=s.decoder.write(e),s.objectMode||0!==e.length?Q(t,s,e,!1):et(t,s)):Q(t,s,e,!1)}else n||(s.state&=-9,et(t,s));return!s.ended&&(s.length0?(e.state&j?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit("data",i)):(e.length+=e.objectMode?1:i.length,n?e.buffer.unshift(i):e.buffer.push(i),e.state&G&&Z(t)),et(t,e)}l(K.prototype,{objectMode:q(B),ended:q(2),endEmitted:q(4),reading:q(8),constructed:q(U),sync:q(X),needReadable:q(G),emittedReadable:q(128),readableListening:q(256),resumeScheduled:q(512),errorEmitted:q(1024),emitClose:q(H),autoDestroy:q(W),destroyed:q(8192),closed:q(16384),closeEmitted:q(32768),multiAwaitDrain:q(j),readingMore:q(1<<17),dataEmitted:q(1<<18)}),z.prototype.destroy=A.destroy,z.prototype._undestroy=A.undestroy,z.prototype._destroy=function(t,e){e(t)},z.prototype[T.captureRejectionSymbol]=function(t){this.destroy(t)},z.prototype[c]=function(){let t;return this.destroyed||(t=this.readableEnded?null:new N,this.destroy(t)),new h(((e,i)=>O(this,(n=>n&&n!==t?i(n):e(null)))))},z.prototype.push=function(t,e){return $(this,t,e,!1)},z.prototype.unshift=function(t,e){return $(this,t,e,!0)},z.prototype.isPaused=function(){const t=this._readableState;return!0===t[P]||!1===t.flowing},z.prototype.setEncoding=function(t){const e=new x(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;const i=this._readableState.buffer;let n="";for(const t of i)n+=e.write(t);return i.clear(),""!==n&&i.push(n),this._readableState.length=n.length,this};function J(t,e){return t<=0||0===e.length&&e.ended?0:e.state&B?1:o(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}function Z(t){const e=t._readableState;M("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(M("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(tt,t))}function tt(t){const e=t._readableState;M("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||e.errored||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,ot(t)}function et(t,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,n.nextTick(it,t,e))}function it(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!1===e[P]?e.flowing=!0:t.listenerCount("data")>0?t.resume():e.readableListening||(e.flowing=null)}function st(t){M("readable nexttick read 0"),t.read(0)}function rt(t,e){M("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),ot(t),e.flowing&&!e.reading&&t.read(0)}function ot(t){const e=t._readableState;for(M("flow",e.flowing);e.flowing&&null!==t.read(););}function at(t,e){"function"!=typeof t.read&&(t=z.wrap(t,{objectMode:!0}));const i=async function*(t,e){let i,n=V;function s(e){this===t?(n(),n=V):n=e}t.on("readable",s);const r=O(t,{writable:!1},(t=>{i=t?v(i,t):null,n(),n=V}));try{for(;;){const e=t.destroyed?null:t.read();if(null!==e)yield e;else{if(i)throw i;if(null===i)return;await new h(s)}}}catch(t){throw i=v(i,t),i}finally{!i&&!1===(null==e?void 0:e.destroyOnReturn)||void 0!==i&&!t._readableState.autoDestroy?(t.off("readable",s),r()):A.destroyer(t,null)}}(t,e);return i.stream=t,i}function lt(t,e){if(0===e.length)return null;let i;return e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):i=e.buffer.consume(t,e.decoder),i}function ut(t){const e=t._readableState;M("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(pt,e,t))}function pt(t,e){if(M("endReadableNT",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&0===t.length)if(t.endEmitted=!0,e.emit("end"),e.writable&&!1===e.allowHalfOpen)n.nextTick(ht,e);else if(t.autoDestroy){const t=e._writableState;(!t||t.autoDestroy&&(t.finished||!1===t.writable))&&e.destroy()}}function ht(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end()}let dt;function ct(){return void 0===dt&&(dt={}),dt}z.prototype.read=function(t){M("read",t),void 0===t?t=NaN:r(t)||(t=a(t,10));const e=this._readableState,i=t;if(t>e.highWaterMark&&(e.highWaterMark=function(t){if(t>1073741824)throw new b("size","<= 1GiB",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,++t}(t)),0!==t&&(e.state&=-129),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return M("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?ut(this):Z(this),null;if(0===(t=J(t,e))&&e.ended)return 0===e.length&&ut(this),null;let n,s=!!(e.state&G);if(M("need readable",s),(0===e.length||e.length-t0?lt(t,e):null,null===n?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&ut(this)),null===n||e.errorEmitted||e.closeEmitted||(e.dataEmitted=!0,this.emit("data",n)),n},z.prototype._read=function(t){throw new L("_read()")},z.prototype.pipe=function(t,e){const i=this,s=this._readableState;1===s.pipes.length&&(s.multiAwaitDrain||(s.multiAwaitDrain=!0,s.awaitDrainWriters=new d(s.awaitDrainWriters?[s.awaitDrainWriters]:[]))),s.pipes.push(t),M("pipe count=%d opts=%j",s.pipes.length,e);const r=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?a:T;function o(e,n){M("onunpipe"),e===i&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,function(){M("cleanup"),t.removeListener("close",_),t.removeListener("finish",f),l&&t.removeListener("drain",l);t.removeListener("error",c),t.removeListener("unpipe",o),i.removeListener("end",a),i.removeListener("end",T),i.removeListener("data",h),u=!0,l&&s.awaitDrainWriters&&(!t._writableState||t._writableState.needDrain)&&l()}())}function a(){M("onend"),t.end()}let l;s.endEmitted?n.nextTick(r):i.once("end",r),t.on("unpipe",o);let u=!1;function p(){u||(1===s.pipes.length&&s.pipes[0]===t?(M("false write response, pause",0),s.awaitDrainWriters=t,s.multiAwaitDrain=!1):s.pipes.length>1&&s.pipes.includes(t)&&(M("false write response, pause",s.awaitDrainWriters.size),s.awaitDrainWriters.add(t)),i.pause()),l||(l=function(t,e){return function(){const i=t._readableState;i.awaitDrainWriters===e?(M("pipeOnDrain",1),i.awaitDrainWriters=null):i.multiAwaitDrain&&(M("pipeOnDrain",i.awaitDrainWriters.size),i.awaitDrainWriters.delete(e)),i.awaitDrainWriters&&0!==i.awaitDrainWriters.size||!t.listenerCount("data")||t.resume()}}(i,t),t.on("drain",l))}function h(e){M("ondata");const i=t.write(e);M("dest.write",i),!1===i&&p()}function c(e){if(M("onerror",e),T(),t.removeListener("error",c),0===t.listenerCount("error")){const i=t._writableState||t._readableState;i&&!i.errorEmitted?Y(t,e):t.emit("error",e)}}function _(){t.removeListener("finish",f),T()}function f(){M("onfinish"),t.removeListener("close",_),T()}function T(){M("unpipe"),i.unpipe(t)}return i.on("data",h),g(t,"error",c),t.once("close",_),t.once("finish",f),t.emit("pipe",i),!0===t.writableNeedDrain?p():s.flowing||(M("pipe resume"),i.resume()),t},z.prototype.unpipe=function(t){const e=this._readableState;if(0===e.pipes.length)return this;if(!t){const t=e.pipes;e.pipes=[],this.pause();for(let e=0;e0,!1!==s.flowing&&this.resume()):"readable"===t&&(s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.flowing=!1,s.emittedReadable=!1,M("on readable",s.length,s.reading),s.length?Z(this):s.reading||n.nextTick(st,this))),i},z.prototype.addListener=z.prototype.on,z.prototype.removeListener=function(t,e){const i=m.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(nt,this),i},z.prototype.off=z.prototype.removeListener,z.prototype.removeAllListeners=function(t){const e=m.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(nt,this),e},z.prototype.resume=function(){const t=this._readableState;return t.flowing||(M("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(rt,t,e))}(this,t)),t[P]=!1,this},z.prototype.pause=function(){return M("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(M("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[P]=!0,this},z.prototype.wrap=function(t){let e=!1;t.on("data",(i=>{!this.push(i)&&t.pause&&(e=!0,t.pause())})),t.on("end",(()=>{this.push(null)})),t.on("error",(t=>{Y(this,t)})),t.on("close",(()=>{this.destroy()})),t.on("destroy",(()=>{this.destroy()})),this._read=()=>{e&&t.resume&&(e=!1,t.resume())};const i=u(t);for(let e=1;e{"use strict";const{MathFloor:n,NumberIsInteger:s}=i(4184),{validateInteger:r}=i(6283),{ERR_INVALID_ARG_VALUE:o}=i(6605).codes;let a=16384,l=16;function u(t){return t?l:a}t.exports={getHighWaterMark:function(t,e,i,r){const a=function(t,e,i){return null!=t.highWaterMark?t.highWaterMark:e?t[i]:null}(e,r,i);if(null!=a){if(!s(a)||a<0){throw new o(r?`options.${i}`:"options.highWaterMark",a)}return n(a)}return u(t.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(t,e){r(e,"value",0),t?l=e:a=e}}},208:(t,e,i)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:s}=i(4184);t.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:r}=i(6605).codes,o=i(4992),{getHighWaterMark:a}=i(9153);n(u.prototype,o.prototype),n(u,o);const l=s("kCallback");function u(t){if(!(this instanceof u))return new u(t);const e=t?a(this,t,"readableHighWaterMark",!0):null;0===e&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),o.call(this,t),this._readableState.sync=!1,this[l]=null,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function p(t){"function"!=typeof this._flush||this.destroyed?(this.push(null),t&&t()):this._flush(((e,i)=>{e?t?t(e):this.destroy(e):(null!=i&&this.push(i),this.push(null),t&&t())}))}function h(){this._final!==p&&p.call(this)}u.prototype._final=p,u.prototype._transform=function(t,e,i){throw new r("_transform()")},u.prototype._write=function(t,e,i){const n=this._readableState,s=this._writableState,r=n.length;this._transform(t,e,((t,e)=>{t?i(t):(null!=e&&this.push(e),s.ended||r===n.length||n.length{"use strict";const{SymbolAsyncIterator:n,SymbolIterator:s,SymbolFor:r}=i(4184),o=r("nodejs.stream.destroyed"),a=r("nodejs.stream.errored"),l=r("nodejs.stream.readable"),u=r("nodejs.stream.writable"),p=r("nodejs.stream.disturbed"),h=r("nodejs.webstream.isClosedPromise"),d=r("nodejs.webstream.controllerErrorFunction");function c(t,e=!1){var i;return!(!t||"function"!=typeof t.pipe||"function"!=typeof t.on||e&&("function"!=typeof t.pause||"function"!=typeof t.resume)||t._writableState&&!1===(null===(i=t._readableState)||void 0===i?void 0:i.readable)||t._writableState&&!t._readableState)}function _(t){var e;return!(!t||"function"!=typeof t.write||"function"!=typeof t.on||t._readableState&&!1===(null===(e=t._writableState)||void 0===e?void 0:e.writable))}function f(t){return t&&(t._readableState||t._writableState||"function"==typeof t.write&&"function"==typeof t.on||"function"==typeof t.pipe&&"function"==typeof t.on)}function T(t){return!(!t||f(t)||"function"!=typeof t.pipeThrough||"function"!=typeof t.getReader||"function"!=typeof t.cancel)}function m(t){return!(!t||f(t)||"function"!=typeof t.getWriter||"function"!=typeof t.abort)}function g(t){return!(!t||f(t)||"object"!=typeof t.readable||"object"!=typeof t.writable)}function I(t){if(!f(t))return null;const e=t._writableState,i=t._readableState,n=e||i;return!!(t.destroyed||t[o]||null!=n&&n.destroyed)}function E(t){if(!_(t))return null;if(!0===t.writableEnded)return!0;const e=t._writableState;return(null==e||!e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)}function O(t,e){if(!c(t))return null;const i=t._readableState;return(null==i||!i.errored)&&("boolean"!=typeof(null==i?void 0:i.endEmitted)?null:!!(i.endEmitted||!1===e&&!0===i.ended&&0===i.length))}function M(t){return t&&null!=t[l]?t[l]:"boolean"!=typeof(null==t?void 0:t.readable)?null:!I(t)&&(c(t)&&t.readable&&!O(t))}function R(t){return t&&null!=t[u]?t[u]:"boolean"!=typeof(null==t?void 0:t.writable)?null:!I(t)&&(_(t)&&t.writable&&!E(t))}function A(t){return"boolean"==typeof t._closed&&"boolean"==typeof t._defaultKeepAlive&&"boolean"==typeof t._removedConnection&&"boolean"==typeof t._removedContLen}function y(t){return"boolean"==typeof t._sent100&&A(t)}t.exports={isDestroyed:I,kIsDestroyed:o,isDisturbed:function(t){var e;return!(!t||!(null!==(e=t[p])&&void 0!==e?e:t.readableDidRead||t.readableAborted))},kIsDisturbed:p,isErrored:function(t){var e,i,n,s,r,o,l,u,p,h;return!(!t||!(null!==(e=null!==(i=null!==(n=null!==(s=null!==(r=null!==(o=t[a])&&void 0!==o?o:t.readableErrored)&&void 0!==r?r:t.writableErrored)&&void 0!==s?s:null===(l=t._readableState)||void 0===l?void 0:l.errorEmitted)&&void 0!==n?n:null===(u=t._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==i?i:null===(p=t._readableState)||void 0===p?void 0:p.errored)&&void 0!==e?e:null===(h=t._writableState)||void 0===h?void 0:h.errored))},kIsErrored:a,isReadable:M,kIsReadable:l,kIsClosedPromise:h,kControllerErrorFunction:d,kIsWritable:u,isClosed:function(t){if(!f(t))return null;if("boolean"==typeof t.closed)return t.closed;const e=t._writableState,i=t._readableState;return"boolean"==typeof(null==e?void 0:e.closed)||"boolean"==typeof(null==i?void 0:i.closed)?(null==e?void 0:e.closed)||(null==i?void 0:i.closed):"boolean"==typeof t._closed&&A(t)?t._closed:null},isDuplexNodeStream:function(t){return!(!t||"function"!=typeof t.pipe||!t._readableState||"function"!=typeof t.on||"function"!=typeof t.write)},isFinished:function(t,e){return f(t)?!!I(t)||(!1===(null==e?void 0:e.readable)||!M(t))&&(!1===(null==e?void 0:e.writable)||!R(t)):null},isIterable:function(t,e){return null!=t&&(!0===e?"function"==typeof t[n]:!1===e?"function"==typeof t[s]:"function"==typeof t[n]||"function"==typeof t[s])},isReadableNodeStream:c,isReadableStream:T,isReadableEnded:function(t){if(!c(t))return null;if(!0===t.readableEnded)return!0;const e=t._readableState;return!(!e||e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)},isReadableFinished:O,isReadableErrored:function(t){var e,i;return f(t)?t.readableErrored?t.readableErrored:null!==(e=null===(i=t._readableState)||void 0===i?void 0:i.errored)&&void 0!==e?e:null:null},isNodeStream:f,isWebStream:function(t){return T(t)||m(t)||g(t)},isWritable:R,isWritableNodeStream:_,isWritableStream:m,isWritableEnded:E,isWritableFinished:function(t,e){if(!_(t))return null;if(!0===t.writableFinished)return!0;const i=t._writableState;return(null==i||!i.errored)&&("boolean"!=typeof(null==i?void 0:i.finished)?null:!!(i.finished||!1===e&&!0===i.ended&&0===i.length))},isWritableErrored:function(t){var e,i;return f(t)?t.writableErrored?t.writableErrored:null!==(e=null===(i=t._writableState)||void 0===i?void 0:i.errored)&&void 0!==e?e:null:null},isServerRequest:function(t){var e;return"boolean"==typeof t._consuming&&"boolean"==typeof t._dumped&&void 0===(null===(e=t.req)||void 0===e?void 0:e.upgradeOrConnect)},isServerResponse:y,willEmitClose:function(t){if(!f(t))return null;const e=t._writableState,i=t._readableState,n=e||i;return!n&&y(t)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:g}},394:(t,e,i)=>{const n=i(5606),{ArrayPrototypeSlice:s,Error:r,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:a,ObjectDefineProperties:l,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:p,Symbol:h,SymbolHasInstance:d}=i(4184);t.exports=F,F.WritableState=w;const{EventEmitter:c}=i(7007),_=i(2913).Stream,{Buffer:f}=i(8287),T=i(2430),{addAbortSignal:m}=i(153),{getHighWaterMark:g,getDefaultHighWaterMark:I}=i(9153),{ERR_INVALID_ARG_TYPE:E,ERR_METHOD_NOT_IMPLEMENTED:O,ERR_MULTIPLE_CALLBACK:M,ERR_STREAM_CANNOT_PIPE:R,ERR_STREAM_DESTROYED:A,ERR_STREAM_ALREADY_FINISHED:y,ERR_STREAM_NULL_VALUES:S,ERR_STREAM_WRITE_AFTER_END:v,ERR_UNKNOWN_ENCODING:C}=i(6605).codes,{errorOrDestroy:L}=T;function b(){}u(F.prototype,_.prototype),u(F,_);const D=h("kOnFinished");function w(t,e,n){"boolean"!=typeof n&&(n=e instanceof i(4992)),this.objectMode=!(!t||!t.objectMode),n&&(this.objectMode=this.objectMode||!(!t||!t.writableObjectMode)),this.highWaterMark=t?g(this,t,"writableHighWaterMark",n):I(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const s=!(!t||!1!==t.decodeStrings);this.decodeStrings=!s,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=V.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,N(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||!1!==t.emitClose,this.autoDestroy=!t||!1!==t.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[D]=[]}function N(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0}function F(t){const e=this instanceof i(4992);if(!e&&!o(F,this))return new F(t);this._writableState=new w(t,this,e),t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&m(t.signal,this)),_.call(this,t),T.construct(this,(()=>{const t=this._writableState;t.writing||X(this,t),W(this,t)}))}function P(t,e,i,s){const r=t._writableState;if("function"==typeof i)s=i,i=r.defaultEncoding;else{if(i){if("buffer"!==i&&!f.isEncoding(i))throw new C(i)}else i=r.defaultEncoding;"function"!=typeof s&&(s=b)}if(null===e)throw new S;if(!r.objectMode)if("string"==typeof e)!1!==r.decodeStrings&&(e=f.from(e,i),i="buffer");else if(e instanceof f)i="buffer";else{if(!_._isUint8Array(e))throw new E("chunk",["string","Buffer","Uint8Array"],e);e=_._uint8ArrayToBuffer(e),i="buffer"}let o;return r.ending?o=new v:r.destroyed&&(o=new A("write")),o?(n.nextTick(s,o),L(t,o,!0),o):(r.pendingcb++,function(t,e,i,n,s){const r=e.objectMode?1:i.length;e.length+=r;const o=e.lengthi.bufferedIndex&&X(t,i),s?null!==i.afterWriteTickInfo&&i.afterWriteTickInfo.cb===r?i.afterWriteTickInfo.count++:(i.afterWriteTickInfo={count:1,cb:r,stream:t,state:i},n.nextTick(Y,i.afterWriteTickInfo)):B(t,i,1,r))):L(t,new M)}function Y({stream:t,state:e,count:i,cb:n}){return e.afterWriteTickInfo=null,B(t,e,i,n)}function B(t,e,i,n){for(!e.ending&&!t.destroyed&&0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));i-- >0;)e.pendingcb--,n();e.destroyed&&U(e),W(t,e)}function U(t){if(t.writing)return;for(let i=t.bufferedIndex;i1&&t._writev){e.pendingcb-=o-1;const n=e.allNoop?b:t=>{for(let e=a;e256?(i.splice(0,a),e.bufferedIndex=0):e.bufferedIndex=a}e.bufferProcessing=!1}function G(t){return t.ending&&!t.destroyed&&t.constructed&&0===t.length&&!t.errored&&0===t.buffered.length&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function H(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.finalCalled=!0,function(t,e){let i=!1;function s(s){if(i)L(t,null!=s?s:M());else if(i=!0,e.pendingcb--,s){const i=e[D].splice(0);for(let t=0;t{G(e)?j(t,e):e.pendingcb--}),t,e)):G(e)&&(e.pendingcb++,j(t,e))))}function j(t,e){e.pendingcb--,e.finished=!0;const i=e[D].splice(0);for(let t=0;t{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:s,ArrayPrototypeJoin:r,ArrayPrototypeMap:o,NumberIsInteger:a,NumberIsNaN:l,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:p,NumberParseInt:h,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:c,String:_,StringPrototypeToUpperCase:f,StringPrototypeTrim:T}=i(4184),{hideStackFrames:m,codes:{ERR_SOCKET_BAD_PORT:g,ERR_INVALID_ARG_TYPE:I,ERR_INVALID_ARG_VALUE:E,ERR_OUT_OF_RANGE:O,ERR_UNKNOWN_SIGNAL:M}}=i(6605),{normalizeEncoding:R}=i(798),{isAsyncFunction:A,isArrayBufferView:y}=i(798).types,S={};const v=/^[0-7]+$/;const C=m(((t,e,i=p,n=u)=>{if("number"!=typeof t)throw new I(e,"number",t);if(!a(t))throw new O(e,"an integer",t);if(tn)throw new O(e,`>= ${i} && <= ${n}`,t)})),L=m(((t,e,i=-2147483648,n=2147483647)=>{if("number"!=typeof t)throw new I(e,"number",t);if(!a(t))throw new O(e,"an integer",t);if(tn)throw new O(e,`>= ${i} && <= ${n}`,t)})),b=m(((t,e,i=!1)=>{if("number"!=typeof t)throw new I(e,"number",t);if(!a(t))throw new O(e,"an integer",t);const n=i?1:0,s=4294967295;if(ts)throw new O(e,`>= ${n} && <= ${s}`,t)}));function D(t,e){if("string"!=typeof t)throw new I(e,"string",t)}const w=m(((t,e,i)=>{if(!s(i,t)){const n=r(o(i,(t=>"string"==typeof t?`'${t}'`:_(t))),", ");throw new E(e,t,"must be one of: "+n)}}));function N(t,e){if("boolean"!=typeof t)throw new I(e,"boolean",t)}function F(t,e,i){return null!=t&&d(t,e)?t[e]:i}const P=m(((t,e,i=null)=>{const s=F(i,"allowArray",!1),r=F(i,"allowFunction",!1);if(!F(i,"nullable",!1)&&null===t||!s&&n(t)||"object"!=typeof t&&(!r||"function"!=typeof t))throw new I(e,"Object",t)})),x=m(((t,e)=>{if(null!=t&&"object"!=typeof t&&"function"!=typeof t)throw new I(e,"a dictionary",t)})),k=m(((t,e,i=0)=>{if(!n(t))throw new I(e,"Array",t);if(t.length{if(!y(t))throw new I(e,["Buffer","TypedArray","DataView"],t)}));const Y=m(((t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new I(e,"AbortSignal",t)})),B=m(((t,e)=>{if("function"!=typeof t)throw new I(e,"Function",t)})),U=m(((t,e)=>{if("function"!=typeof t||A(t))throw new I(e,"Function",t)})),X=m(((t,e)=>{if(void 0!==t)throw new I(e,"undefined",t)}));const G=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function H(t,e){if(void 0===t||!c(G,t))throw new E(e,t,'must be an array or string of format "; rel=preload; as=style"')}t.exports={isInt32:function(t){return t===(0|t)},isUint32:function(t){return t===t>>>0},parseFileMode:function(t,e,i){if(void 0===t&&(t=i),"string"==typeof t){if(null===c(v,t))throw new E(e,t,"must be a 32-bit unsigned integer or an octal string");t=h(t,8)}return b(t,e),t},validateArray:k,validateStringArray:function(t,e){k(t,e);for(let i=0;in||(null!=i||null!=n)&&l(t))throw new O(e,`${null!=i?`>= ${i}`:""}${null!=i&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,t)},validateObject:P,validateOneOf:w,validatePlainFunction:U,validatePort:function(t,e="Port",i=!0){if("number"!=typeof t&&"string"!=typeof t||"string"==typeof t&&0===T(t).length||+t!=+t>>>0||t>65535||0===t&&!i)throw new g(e,t,i);return 0|t},validateSignalName:function(t,e="signal"){if(D(t,e),void 0===S[t]){if(void 0!==S[f(t)])throw new M(t+" (signals must use all capital letters)");throw new M(t)}},validateString:D,validateUint32:b,validateUndefined:X,validateUnion:function(t,e,i){if(!s(i,t))throw new I(e,`('${r(i,"|")}')`,t)},validateAbortSignal:Y,validateLinkHeaderValue:function(t){if("string"==typeof t)return H(t,"hints"),t;if(n(t)){const e=t.length;let i="";if(0===e)return i;for(let n=0;n; rel=preload; as=style"')}}},6248:(t,e,i)=>{"use strict";const n=i(4612),s=i(105),r=n.Readable.destroy;t.exports=n.Readable,t.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,t.exports._isUint8Array=n._isUint8Array,t.exports.isDisturbed=n.isDisturbed,t.exports.isErrored=n.isErrored,t.exports.isReadable=n.isReadable,t.exports.Readable=n.Readable,t.exports.Writable=n.Writable,t.exports.Duplex=n.Duplex,t.exports.Transform=n.Transform,t.exports.PassThrough=n.PassThrough,t.exports.addAbortSignal=n.addAbortSignal,t.exports.finished=n.finished,t.exports.destroy=n.destroy,t.exports.destroy=r,t.exports.pipeline=n.pipeline,t.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>s}),t.exports.Stream=n.Stream,t.exports.default=t.exports},6605:(t,e,i)=>{"use strict";const{format:n,inspect:s,AggregateError:r}=i(798),o=globalThis.AggregateError||r,a=Symbol("kIsNodeError"),l=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,p={};function h(t,e){if(!t)throw new p.ERR_INTERNAL_ASSERTION(e)}function d(t){let e="",i=t.length;const n="-"===t[0]?1:0;for(;i>=n+4;i-=3)e=`_${t.slice(i-3,i)}${e}`;return`${t.slice(0,i)}${e}`}function c(t,e,i){i||(i=Error);class s extends i{constructor(...i){super(function(t,e,i){if("function"==typeof e)return h(e.length<=i.length,`Code: ${t}; The provided arguments length (${i.length}) does not match the required ones (${e.length}).`),e(...i);const s=(e.match(/%[dfijoOs]/g)||[]).length;return h(s===i.length,`Code: ${t}; The provided arguments length (${i.length}) does not match the required ones (${s}).`),0===i.length?e:n(e,...i)}(t,e,i))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(s.prototype,{name:{value:i.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),s.prototype.code=t,s.prototype[a]=!0,p[t]=s}function _(t){const e="__node_internal_"+t.name;return Object.defineProperty(t,"name",{value:e}),t}class f extends Error{constructor(t="The operation was aborted",e=void 0){if(void 0!==e&&"object"!=typeof e)throw new p.ERR_INVALID_ARG_TYPE("options","Object",e);super(t,e),this.code="ABORT_ERR",this.name="AbortError"}}c("ERR_ASSERTION","%s",Error),c("ERR_INVALID_ARG_TYPE",((t,e,i)=>{h("string"==typeof t,"'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";const r=[],o=[],a=[];for(const t of e)h("string"==typeof t,"All expected entries have to be of type string"),l.includes(t)?r.push(t.toLowerCase()):u.test(t)?o.push(t):(h("object"!==t,'The value "object" should be written as "Object"'),a.push(t));if(o.length>0){const t=r.indexOf("object");-1!==t&&(r.splice(r,t,1),o.push("Object"))}if(r.length>0){switch(r.length){case 1:n+=`of type ${r[0]}`;break;case 2:n+=`one of type ${r[0]} or ${r[1]}`;break;default:{const t=r.pop();n+=`one of type ${r.join(", ")}, or ${t}`}}(o.length>0||a.length>0)&&(n+=" or ")}if(o.length>0){switch(o.length){case 1:n+=`an instance of ${o[0]}`;break;case 2:n+=`an instance of ${o[0]} or ${o[1]}`;break;default:{const t=o.pop();n+=`an instance of ${o.join(", ")}, or ${t}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const t=a.pop();n+=`one of ${a.join(", ")}, or ${t}`}}if(null==i)n+=`. Received ${i}`;else if("function"==typeof i&&i.name)n+=`. Received function ${i.name}`;else if("object"==typeof i){var p;if(null!==(p=i.constructor)&&void 0!==p&&p.name)n+=`. Received an instance of ${i.constructor.name}`;else{n+=`. Received ${s(i,{depth:-1})}`}}else{let t=s(i,{colors:!1});t.length>25&&(t=`${t.slice(0,25)}...`),n+=`. Received type ${typeof i} (${t})`}return n}),TypeError),c("ERR_INVALID_ARG_VALUE",((t,e,i="is invalid")=>{let n=s(e);n.length>128&&(n=n.slice(0,128)+"...");return`The ${t.includes(".")?"property":"argument"} '${t}' ${i}. Received ${n}`}),TypeError),c("ERR_INVALID_RETURN_VALUE",((t,e,i)=>{var n;return`Expected ${t} to be returned from the "${e}" function but got ${null!=i&&null!==(n=i.constructor)&&void 0!==n&&n.name?`instance of ${i.constructor.name}`:"type "+typeof i}.`}),TypeError),c("ERR_MISSING_ARGS",((...t)=>{let e;h(t.length>0,"At least one arg needs to be specified");const i=t.length;switch(t=(Array.isArray(t)?t:[t]).map((t=>`"${t}"`)).join(" or "),i){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{const i=t.pop();e+=`The ${t.join(", ")}, and ${i} arguments`}}return`${e} must be specified`}),TypeError),c("ERR_OUT_OF_RANGE",((t,e,i)=>{let n;return h(e,'Missing "range" argument'),Number.isInteger(i)&&Math.abs(i)>2**32?n=d(String(i)):"bigint"==typeof i?(n=String(i),(i>2n**32n||i<-(2n**32n))&&(n=d(n)),n+="n"):n=s(i),`The value of "${t}" is out of range. It must be ${e}. Received ${n}`}),RangeError),c("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),c("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),c("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),c("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),c("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),c("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),c("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),c("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),c("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),c("ERR_STREAM_WRITE_AFTER_END","write after end",Error),c("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),t.exports={AbortError:f,aggregateTwoErrors:_((function(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;const i=new o([e,t],e.message);return i.code=e.code,i}return t||e})),hideStackFrames:_,codes:p}},4184:t=>{"use strict";t.exports={ArrayIsArray:t=>Array.isArray(t),ArrayPrototypeIncludes:(t,e)=>t.includes(e),ArrayPrototypeIndexOf:(t,e)=>t.indexOf(e),ArrayPrototypeJoin:(t,e)=>t.join(e),ArrayPrototypeMap:(t,e)=>t.map(e),ArrayPrototypePop:(t,e)=>t.pop(e),ArrayPrototypePush:(t,e)=>t.push(e),ArrayPrototypeSlice:(t,e,i)=>t.slice(e,i),Error,FunctionPrototypeCall:(t,e,...i)=>t.call(e,...i),FunctionPrototypeSymbolHasInstance:(t,e)=>Function.prototype[Symbol.hasInstance].call(t,e),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(t,e)=>Object.defineProperties(t,e),ObjectDefineProperty:(t,e,i)=>Object.defineProperty(t,e,i),ObjectGetOwnPropertyDescriptor:(t,e)=>Object.getOwnPropertyDescriptor(t,e),ObjectKeys:t=>Object.keys(t),ObjectSetPrototypeOf:(t,e)=>Object.setPrototypeOf(t,e),Promise,PromisePrototypeCatch:(t,e)=>t.catch(e),PromisePrototypeThen:(t,e,i)=>t.then(e,i),PromiseReject:t=>Promise.reject(t),PromiseResolve:t=>Promise.resolve(t),ReflectApply:Reflect.apply,RegExpPrototypeTest:(t,e)=>t.test(e),SafeSet:Set,String,StringPrototypeSlice:(t,e,i)=>t.slice(e,i),StringPrototypeToLowerCase:t=>t.toLowerCase(),StringPrototypeToUpperCase:t=>t.toUpperCase(),StringPrototypeTrim:t=>t.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(t,e,i)=>t.set(e,i),Boolean,Uint8Array}},798:(t,e,i)=>{"use strict";const n=i(8287),{kResistStopPropagation:s,SymbolDispose:r}=i(4184),o=globalThis.AbortSignal||i(5568).AbortSignal,a=globalThis.AbortController||i(5568).AbortController,l=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||n.Blob,p=void 0!==u?function(t){return t instanceof u}:function(t){return!1},h=(t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new ERR_INVALID_ARG_TYPE(e,"AbortSignal",t)};class d extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError("Expected input to be an Array, got "+typeof t);let e="";for(let i=0;i{t=i,e=n})),resolve:t,reject:e}},promisify:t=>new Promise(((e,i)=>{t(((t,...n)=>t?i(t):e(...n)))})),debuglog:()=>function(){},format:(t,...e)=>t.replace(/%([sdifj])/g,(function(...[t,i]){const n=e.shift();if("f"===i)return n.toFixed(6);if("j"===i)return JSON.stringify(n);if("s"===i&&"object"==typeof n){return`${n.constructor!==Object?n.constructor.name:""} {}`.trim()}return n.toString()})),inspect(t){switch(typeof t){case"string":if(t.includes("'")){if(!t.includes('"'))return`"${t}"`;if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}},types:{isAsyncFunction:t=>t instanceof l,isArrayBufferView:t=>ArrayBuffer.isView(t)},isBlob:p,deprecate:(t,e)=>t,addAbortListener:i(7007).addAbortListener||function(t,e){if(void 0===t)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",t);let i;return h(t,"signal"),((t,e)=>{if("function"!=typeof t)throw new ERR_INVALID_ARG_TYPE(e,"Function",t)})(e,"listener"),t.aborted?queueMicrotask((()=>e())):(t.addEventListener("abort",e,{__proto__:null,once:!0,[s]:!0}),i=()=>{t.removeEventListener("abort",e)}),{__proto__:null,[r](){var t;null===(t=i)||void 0===t||t()}}},AbortSignalAny:o.any||function(t){if(1===t.length)return t[0];const e=new a,i=()=>e.abort();return t.forEach((t=>{h(t,"signals"),t.addEventListener("abort",i,{once:!0})})),e.signal.addEventListener("abort",(()=>{t.forEach((t=>t.removeEventListener("abort",i)))}),{once:!0}),e.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},4612:(t,e,i)=>{const{Buffer:n}=i(8287),{ObjectDefineProperty:s,ObjectKeys:r,ReflectApply:o}=i(4184),{promisify:{custom:a}}=i(798),{streamReturningOperators:l,promiseReturningOperators:u}=i(5589),{codes:{ERR_ILLEGAL_CONSTRUCTOR:p}}=i(6605),h=i(6864),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:c}=i(9153),{pipeline:_}=i(872),{destroyer:f}=i(2430),T=i(9700),m=i(105),g=i(6569),I=t.exports=i(2913).Stream;I.isDestroyed=g.isDestroyed,I.isDisturbed=g.isDisturbed,I.isErrored=g.isErrored,I.isReadable=g.isReadable,I.isWritable=g.isWritable,I.Readable=i(6566);for(const M of r(l)){const R=l[M];function E(...t){if(new.target)throw p();return I.Readable.from(o(R,this,t))}s(E,"name",{__proto__:null,value:R.name}),s(E,"length",{__proto__:null,value:R.length}),s(I.Readable.prototype,M,{__proto__:null,value:E,enumerable:!1,configurable:!0,writable:!0})}for(const A of r(u)){const y=u[A];function E(...t){if(new.target)throw p();return o(y,this,t)}s(E,"name",{__proto__:null,value:y.name}),s(E,"length",{__proto__:null,value:y.length}),s(I.Readable.prototype,A,{__proto__:null,value:E,enumerable:!1,configurable:!0,writable:!0})}I.Writable=i(394),I.Duplex=i(4992),I.Transform=i(208),I.PassThrough=i(6898),I.pipeline=_;const{addAbortSignal:O}=i(153);I.addAbortSignal=O,I.finished=T,I.destroy=f,I.compose=h,I.setDefaultHighWaterMark=d,I.getDefaultHighWaterMark=c,s(I,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>m}),s(_,a,{__proto__:null,enumerable:!0,get:()=>m.pipeline}),s(T,a,{__proto__:null,enumerable:!0,get:()=>m.finished}),I.Stream=I,I._isUint8Array=function(t){return t instanceof Uint8Array},I._uint8ArrayToBuffer=function(t){return n.from(t.buffer,t.byteOffset,t.byteLength)}},105:(t,e,i)=>{"use strict";const{ArrayPrototypePop:n,Promise:s}=i(4184),{isIterable:r,isNodeStream:o,isWebStream:a}=i(6569),{pipelineImpl:l}=i(872),{finished:u}=i(9700);i(4612),t.exports={finished:u,pipeline:function(...t){return new s(((e,i)=>{let s,u;const p=t[t.length-1];if(p&&"object"==typeof p&&!o(p)&&!r(p)&&!a(p)){const e=n(t);s=e.signal,u=e.end}l(t,((t,n)=>{t?i(t):e(n)}),{signal:s,end:u})}))}}},8707:(t,e,i)=>{"use strict";var n=i(5242).Buffer,s=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===s||!s(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=l,this.end=u,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=p,this.end=h,e=3;break;default:return this.write=d,void(this.end=c)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,i=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==i?i:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var i=t.toString("utf16le",e);if(i){var n=i.charCodeAt(i.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,i)}return e}function p(t,e){var i=(t.length-e)%3;return 0===i?t.toString("base64",e):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-i))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function c(t){return t&&t.length?this.write(t):""}e.StringDecoder=r,r.prototype.write=function(t){if(0===t.length)return"";var e,i;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i=0)return s>0&&(t.lastNeed=s-1),s;if(--n=0)return s>0&&(t.lastNeed=s-2),s;if(--n=0)return s>0&&(2===s?s=0:t.lastNeed=s-3),s;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=i;var n=t.length-(i-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},r.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},5568:t=>{"use strict";const{AbortController:e,AbortSignal:i}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;t.exports=e,t.exports.AbortSignal=i,t.exports.default=e},4083:(t,e,i)=>{var n; -/*! - * async - * https://github.com/caolan/async - * - * Copyright 2010-2014 Caolan McMahon - * Released under the MIT license - */!function(){var s,r={};function o(){}function a(t){return t}function l(t){return!!t}function u(t){return!t}var p="object"==typeof self&&self.self===self&&self||"object"==typeof i.g&&i.g.global===i.g&&i.g||this;function h(t){return function(){if(null===t)throw new Error("Callback was already called.");t.apply(this,arguments),t=null}}function d(t){return function(){null!==t&&(t.apply(this,arguments),t=null)}}null!=p&&(s=p.async),r.noConflict=function(){return p.async=s,r};var c=Object.prototype.toString,_=Array.isArray||function(t){return"[object Array]"===c.call(t)};function f(t){return _(t)||"number"==typeof t.length&&t.length>=0&&t.length%1==0}function T(t,e){for(var i=-1,n=t.length;++i3?t(n,s,l,a):(o=r,r=s,t(n,l,a))}}function F(t,e){return e}function P(t,e,i){i=i||o;var n=f(e)?[]:{};t(e,(function(t,e,i){t(M((function(t,s){s.length<=1&&(s=s[0]),n[e]=s,i(t)})))}),(function(t){i(t,n)}))}function x(t,e,i,n){var s=[];t(e,(function(t,e,n){i(t,(function(t,e){s=s.concat(e||[]),n(t)}))}),(function(t){n(t,s)}))}function k(t,e,i){if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");function n(t,e,i,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");if(t.started=!0,_(e)||(e=[e]),0===e.length&&t.idle())return r.setImmediate((function(){t.drain()}));T(e,(function(e){var s={data:e,callback:n||o};i?t.tasks.unshift(s):t.tasks.push(s),t.tasks.length===t.concurrency&&t.saturated()})),r.setImmediate(t.process)}function s(t,e){return function(){a-=1;var i=!1,n=arguments;T(e,(function(t){T(l,(function(e,n){e!==t||i||(l.splice(n,1),i=!0)})),t.callback.apply(t,n)})),t.tasks.length+a===0&&t.drain(),t.process()}}var a=0,l=[],u={tasks:[],concurrency:e,payload:i,saturated:o,empty:o,drain:o,started:!1,paused:!1,push:function(t,e){n(u,t,!1,e)},kill:function(){u.drain=o,u.tasks=[]},unshift:function(t,e){n(u,t,!0,e)},process:function(){for(;!u.paused&&an?1:0}r.map(t,(function(t,i){e(t,(function(e,n){e?i(e):i(null,{value:t,criteria:n})}))}),(function(t,e){if(t)return i(t);i(null,m(e.sort(n),(function(t){return t.value})))}))},r.auto=function(t,e,i){"function"==typeof arguments[1]&&(i=e,e=null),i=d(i||o);var n=E(t),s=n.length;if(!s)return i(null);e||(e=s);var a={},l=0,u=!1,p=[];function h(t){p.unshift(t)}function c(){s--,T(p.slice(0),(function(t){t()}))}h((function(){s||i(null,a)})),T(n,(function(n){if(!u){for(var s,o=_(t[n])?t[n]:[t[n]],d=M((function(t,e){if(l--,e.length<=1&&(e=e[0]),t){var s={};p=function(t,e){s[e]=t},T(E(o=a),(function(t){p(o[t],t)})),s[n]=e,u=!0,i(t,s)}else a[n]=e,r.setImmediate(c);var o,p})),f=o.slice(0,o.length-1),m=f.length;m--;){if(!(s=t[f[m]]))throw new Error("Has nonexistent dependency in "+f.join(", "));if(_(s)&&I(s,n)>=0)throw new Error("Has cyclic dependencies")}g()?(l++,o[o.length-1](d,a)):h((function t(){g()&&(l++,(e=I(p,t))>=0&&p.splice(e,1),o[o.length-1](d,a));var e}))}function g(){return l3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");function a(t,e){function i(t,i){return function(n){t((function(t,e){n(!t||i,{err:t,result:e})}),e)}}function o(t){return function(e){setTimeout((function(){e(null)}),t)}}for(;s.times;){var a=!(s.times-=1);n.push(i(s.task,a)),!a&&s.interval>0&&n.push(o(s.interval))}r.series(n,(function(e,i){i=i[i.length-1],(t||s.callback)(i.err,i.result)}))}return o<=2&&"function"==typeof t&&(i=e,e=t),"function"!=typeof t&&function(t,e){if("number"==typeof e)t.times=parseInt(e,10)||5;else{if("object"!=typeof e)throw new Error("Unsupported argument type for 'times': "+typeof e);t.times=parseInt(e.times,10)||5,t.interval=parseInt(e.interval,10)||0}}(s,t),s.callback=i,s.task=e,s.callback?a():a},r.waterfall=function(t,e){if(e=d(e||o),!_(t)){var i=new Error("First argument to waterfall must be an array of functions");return e(i)}if(!t.length)return e();!function t(i){return M((function(n,s){if(n)e.apply(null,[n].concat(s));else{var r=i.next();r?s.push(t(r)):s.push(e),U(i).apply(null,s)}}))}(r.iterator(t))()},r.parallel=function(t,e){P(r.eachOf,t,e)},r.parallelLimit=function(t,e,i){P(S(e),t,i)},r.series=function(t,e){P(r.eachOfSeries,t,e)},r.iterator=function(t){return function e(i){function n(){return t.length&&t[i].apply(null,arguments),n.next()}return n.next=function(){return i>>1);i(e,t[r])>=0?n=r:s=r-1}return n}(t.tasks,a,i)+1,0,a),t.tasks.length===t.concurrency&&t.saturated(),r.setImmediate(t.process)}))}(n,t,e,s)},delete n.unshift,n},r.cargo=function(t,e){return k(t,1,e)},r.log=V("log"),r.dir=V("dir"),r.memoize=function(t,e){var i={},n={},s=Object.prototype.hasOwnProperty;e=e||a;var o=M((function(o){var a=o.pop(),l=e.apply(null,o);s.call(i,l)?r.setImmediate((function(){a.apply(null,i[l])})):s.call(n,l)?n[l].push(a):(n[l]=[a],t.apply(null,o.concat([M((function(t){i[l]=t;var e=n[l];delete n[l];for(var s=0,r=e.length;s{"use strict";e.byteLength=function(t){var e=a(t),i=e[0],n=e[1];return 3*(i+n)/4-n},e.toByteArray=function(t){var e,i,r=a(t),o=r[0],l=r[1],u=new s(function(t,e,i){return 3*(e+i)/4-i}(0,o,l)),p=0,h=l>0?o-4:o;for(i=0;i>16&255,u[p++]=e>>8&255,u[p++]=255&e;2===l&&(e=n[t.charCodeAt(i)]<<2|n[t.charCodeAt(i+1)]>>4,u[p++]=255&e);1===l&&(e=n[t.charCodeAt(i)]<<10|n[t.charCodeAt(i+1)]<<4|n[t.charCodeAt(i+2)]>>2,u[p++]=e>>8&255,u[p++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,s=n%3,r=[],o=16383,a=0,u=n-s;au?u:a+o));1===s?(e=t[n-1],r.push(i[e>>2]+i[e<<4&63]+"==")):2===s&&(e=(t[n-2]<<8)+t[n-1],r.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"="));return r.join("")};for(var i=[],n=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)i[o]=r[o],n[r.charCodeAt(o)]=o;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");return-1===i&&(i=e),[i,i===e?0:4-i%4]}function l(t,e,n){for(var s,r,o=[],a=e;a>18&63]+i[r>>12&63]+i[r>>6&63]+i[63&r]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(t,e,i)=>{"use strict"; -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */const n=i(7526),s=i(251),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=function(t){+t!=t&&(t=0);return l.alloc(+t)},e.INSPECT_MAX_BYTES=50;const o=2147483647;function a(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,i){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return u(t,e,i)}function u(t,e,i){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const i=0|f(t,e);let n=a(i);const s=n.write(t,e);s!==i&&(n=n.slice(0,s));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(z(t,Uint8Array)){const e=new Uint8Array(t);return c(e.buffer,e.byteOffset,e.byteLength)}return d(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(z(t,ArrayBuffer)||t&&z(t.buffer,ArrayBuffer))return c(t,e,i);if("undefined"!=typeof SharedArrayBuffer&&(z(t,SharedArrayBuffer)||t&&z(t.buffer,SharedArrayBuffer)))return c(t,e,i);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return l.from(n,e,i);const s=function(t){if(l.isBuffer(t)){const e=0|_(t.length),i=a(e);return 0===i.length||t.copy(i,0,0,e),i}if(void 0!==t.length)return"number"!=typeof t.length||$(t.length)?a(0):d(t);if("Buffer"===t.type&&Array.isArray(t.data))return d(t.data)}(t);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function p(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return p(t),a(t<0?0:0|_(t))}function d(t){const e=t.length<0?0:0|_(t.length),i=a(e);for(let n=0;n=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function f(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||z(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const i=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===i)return 0;let s=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return q(t).length;default:if(s)return n?-1:j(t).length;e=(""+e).toLowerCase(),s=!0}}function T(t,e,i){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return b(this,e,i);case"utf8":case"utf-8":return S(this,e,i);case"ascii":return C(this,e,i);case"latin1":case"binary":return L(this,e,i);case"base64":return y(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,i);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,i){const n=t[e];t[e]=t[i],t[i]=n}function g(t,e,i,n,s){if(0===t.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),$(i=+i)&&(i=s?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(s)return-1;i=t.length-1}else if(i<0){if(!s)return-1;i=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:I(t,e,i,n,s);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):I(t,[e],i,n,s);throw new TypeError("val must be string, number or Buffer")}function I(t,e,i,n,s){let r,o=1,a=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,a/=2,l/=2,i/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(s){let n=-1;for(r=i;ra&&(i=a-l),r=i;r>=0;r--){let i=!0;for(let n=0;ns&&(n=s):n=s;const r=e.length;let o;for(n>r/2&&(n=r/2),o=0;o>8,s=i%256,r.push(s),r.push(n);return r}(e,t.length-i),t,i,n)}function y(t,e,i){return 0===e&&i===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,i))}function S(t,e,i){i=Math.min(t.length,i);const n=[];let s=e;for(;s239?4:e>223?3:e>191?2:1;if(s+o<=i){let i,n,a,l;switch(o){case 1:e<128&&(r=e);break;case 2:i=t[s+1],128==(192&i)&&(l=(31&e)<<6|63&i,l>127&&(r=l));break;case 3:i=t[s+1],n=t[s+2],128==(192&i)&&128==(192&n)&&(l=(15&e)<<12|(63&i)<<6|63&n,l>2047&&(l<55296||l>57343)&&(r=l));break;case 4:i=t[s+1],n=t[s+2],a=t[s+3],128==(192&i)&&128==(192&n)&&128==(192&a)&&(l=(15&e)<<18|(63&i)<<12|(63&n)<<6|63&a,l>65535&&l<1114112&&(r=l))}}null===r?(r=65533,o=1):r>65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r),s+=o}return function(t){const e=t.length;if(e<=v)return String.fromCharCode.apply(String,t);let i="",n=0;for(;nn.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(n,s)):Uint8Array.prototype.set.call(n,e,s);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,s)}s+=e.length}return n},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;ei&&(t+=" ... "),""},r&&(l.prototype[r]=l.prototype.inspect),l.prototype.compare=function(t,e,i,n,s){if(z(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),e<0||i>t.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&e>=i)return 0;if(n>=s)return-1;if(e>=i)return 1;if(this===t)return 0;let r=(s>>>=0)-(n>>>=0),o=(i>>>=0)-(e>>>=0);const a=Math.min(r,o),u=this.slice(n,s),p=t.slice(e,i);for(let t=0;t>>=0,isFinite(i)?(i>>>=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}const s=this.length-e;if((void 0===i||i>s)&&(i=s),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let r=!1;for(;;)switch(n){case"hex":return E(this,t,e,i);case"utf8":case"utf-8":return O(this,t,e,i);case"ascii":case"latin1":case"binary":return M(this,t,e,i);case"base64":return R(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,i);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const v=4096;function C(t,e,i){let n="";i=Math.min(t.length,i);for(let s=e;sn)&&(i=n);let s="";for(let n=e;ni)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,i,n,s,r){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>s||et.length)throw new RangeError("Index out of range")}function F(t,e,i,n,s){X(e,n,s,t,i,7);let r=Number(e&BigInt(4294967295));t[i++]=r,r>>=8,t[i++]=r,r>>=8,t[i++]=r,r>>=8,t[i++]=r;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[i++]=o,o>>=8,t[i++]=o,o>>=8,t[i++]=o,o>>=8,t[i++]=o,i}function P(t,e,i,n,s){X(e,n,s,t,i,7);let r=Number(e&BigInt(4294967295));t[i+7]=r,r>>=8,t[i+6]=r,r>>=8,t[i+5]=r,r>>=8,t[i+4]=r;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[i+3]=o,o>>=8,t[i+2]=o,o>>=8,t[i+1]=o,o>>=8,t[i]=o,i+8}function x(t,e,i,n,s,r){if(i+n>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function k(t,e,i,n,r){return e=+e,i>>>=0,r||x(t,0,i,4),s.write(t,e,i,n,23,4),i+4}function V(t,e,i,n,r){return e=+e,i>>>=0,r||x(t,0,i,8),s.write(t,e,i,n,52,8),i+8}l.prototype.slice=function(t,e){const i=this.length;(t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e>>=0,e>>>=0,i||w(t,e,this.length);let n=this[t],s=1,r=0;for(;++r>>=0,e>>>=0,i||w(t,e,this.length);let n=this[t+--e],s=1;for(;e>0&&(s*=256);)n+=this[t+--e]*s;return n},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||w(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||w(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||w(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=J((function(t){G(t>>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||H(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,s=this[++t]+256*this[++t]+65536*this[++t]+i*2**24;return BigInt(n)+(BigInt(s)<>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||H(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],s=this[++t]*2**24+65536*this[++t]+256*this[++t]+i;return(BigInt(n)<>>=0,e>>>=0,i||w(t,e,this.length);let n=this[t],s=1,r=0;for(;++r=s&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,i){t>>>=0,e>>>=0,i||w(t,e,this.length);let n=e,s=1,r=this[t+--n];for(;n>0&&(s*=256);)r+=this[t+--n]*s;return s*=128,r>=s&&(r-=Math.pow(2,8*e)),r},l.prototype.readInt8=function(t,e){return t>>>=0,e||w(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||w(t,2,this.length);const i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(t,e){t>>>=0,e||w(t,2,this.length);const i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||w(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||w(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=J((function(t){G(t>>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||H(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(i<<24);return(BigInt(n)<>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||H(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||w(t,4,this.length),s.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||w(t,4,this.length),s.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||w(t,8,this.length),s.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||w(t,8,this.length),s.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,i,n){if(t=+t,e>>>=0,i>>>=0,!n){N(this,t,e,i,Math.pow(2,8*i)-1,0)}let s=1,r=0;for(this[e]=255&t;++r>>=0,i>>>=0,!n){N(this,t,e,i,Math.pow(2,8*i)-1,0)}let s=i-1,r=1;for(this[e+s]=255&t;--s>=0&&(r*=256);)this[e+s]=t/r&255;return e+i},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,i){return t=+t,e>>>=0,i||N(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,i){return t=+t,e>>>=0,i||N(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,i){return t=+t,e>>>=0,i||N(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,i){return t=+t,e>>>=0,i||N(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,i){return t=+t,e>>>=0,i||N(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=J((function(t,e=0){return F(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=J((function(t,e=0){return P(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(t,e,i,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*i-1);N(this,t,e,i,n-1,-n)}let s=0,r=1,o=0;for(this[e]=255&t;++s>>=0,!n){const n=Math.pow(2,8*i-1);N(this,t,e,i,n-1,-n)}let s=i-1,r=1,o=0;for(this[e+s]=255&t;--s>=0&&(r*=256);)t<0&&0===o&&0!==this[e+s+1]&&(o=1),this[e+s]=(t/r|0)-o&255;return e+i},l.prototype.writeInt8=function(t,e,i){return t=+t,e>>>=0,i||N(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,i){return t=+t,e>>>=0,i||N(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,i){return t=+t,e>>>=0,i||N(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,i){return t=+t,e>>>=0,i||N(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,i){return t=+t,e>>>=0,i||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=J((function(t,e=0){return F(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=J((function(t,e=0){return P(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(t,e,i){return k(this,t,e,!0,i)},l.prototype.writeFloatBE=function(t,e,i){return k(this,t,e,!1,i)},l.prototype.writeDoubleLE=function(t,e,i){return V(this,t,e,!0,i)},l.prototype.writeDoubleBE=function(t,e,i){return V(this,t,e,!1,i)},l.prototype.copy=function(t,e,i,n){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(i||(i=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(s=e;s=n+4;i-=3)e=`_${t.slice(i-3,i)}${e}`;return`${t.slice(0,i)}${e}`}function X(t,e,i,n,s,r){if(t>i||t3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(r+1)}${n}`:`>= -(2${n} ** ${8*(r+1)-1}${n}) and < 2 ** ${8*(r+1)-1}${n}`:`>= ${e}${n} and <= ${i}${n}`,new Y.ERR_OUT_OF_RANGE("value",s,t)}!function(t,e,i){G(e,"offset"),void 0!==t[e]&&void 0!==t[e+i]||H(e,t.length-(i+1))}(n,s,r)}function G(t,e){if("number"!=typeof t)throw new Y.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,i){if(Math.floor(t)!==t)throw G(t,i),new Y.ERR_OUT_OF_RANGE(i||"offset","an integer",t);if(e<0)throw new Y.ERR_BUFFER_OUT_OF_BOUNDS;throw new Y.ERR_OUT_OF_RANGE(i||"offset",`>= ${i?1:0} and <= ${e}`,t)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),B("ERR_OUT_OF_RANGE",(function(t,e,i){let n=`The value of "${t}" is out of range.`,s=i;return Number.isInteger(i)&&Math.abs(i)>2**32?s=U(String(i)):"bigint"==typeof i&&(s=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(s=U(s)),s+="n"),n+=` It must be ${e}. Received ${s}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function j(t,e){let i;e=e||1/0;const n=t.length;let s=null;const r=[];for(let o=0;o55295&&i<57344){if(!s){if(i>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&r.push(239,191,189);continue}s=i;continue}if(i<56320){(e-=3)>-1&&r.push(239,191,189),s=i;continue}i=65536+(s-55296<<10|i-56320)}else s&&(e-=3)>-1&&r.push(239,191,189);if(s=null,i<128){if((e-=1)<0)break;r.push(i)}else if(i<2048){if((e-=2)<0)break;r.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;r.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return r}function q(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function K(t,e,i,n){let s;for(s=0;s=e.length||s>=t.length);++s)e[s+i]=t[s];return s}function z(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function $(t){return t!=t}const Q=function(){const t="0123456789abcdef",e=new Array(256);for(let i=0;i<16;++i){const n=16*i;for(let s=0;s<16;++s)e[n+s]=t[i]+t[s]}return e}();function J(t){return"undefined"==typeof BigInt?Z:t}function Z(){throw new Error("BigInt not supported")}},6570:t=>{"use strict";function e(t,e,n){n=n||2;var r,o,a,l,h,d,_,f=e&&e.length,T=f?e[0]*n:t.length,m=i(t,0,T,n,!0),g=[];if(!m||m.next===m.prev)return g;if(f&&(m=function(t,e,n,s){var r,o,a,l=[];for(r=0,o=e.length;r80*n){r=a=t[0],o=l=t[1];for(var I=n;Ia&&(a=h),d>l&&(l=d);_=0!==(_=Math.max(a-r,l-o))?32767/_:0}return s(m,g,n,r,o,_,0),g}function i(t,e,i,n,s){var r,o;if(s===S(t,e,i,n)>0)for(r=e;r=e;r-=n)o=R(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(A(o),o=o.next),o}function n(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!m(n,n.next)&&0!==T(n.prev,n,n.next))n=n.next;else{if(A(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function s(t,e,i,u,p,h,c){if(t){!c&&h&&function(t,e,i,n){var s=t;do{0===s.z&&(s.z=d(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,l,u=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||l>0&&n;)0!==a&&(0===l||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,l--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,u*=2}while(o>1)}(s)}(t,u,p,h);for(var _,f,T=t;t.prev!==t.next;)if(_=t.prev,f=t.next,h?o(t,u,p,h):r(t))e.push(_.i/i|0),e.push(t.i/i|0),e.push(f.i/i|0),A(t),t=f.next,T=f.next;else if((t=f)===T){c?1===c?s(t=a(n(t),e,i),e,i,u,p,h,2):2===c&&l(t,e,i,u,p,h):s(n(t),e,i,u,p,h,1);break}}}function r(t){var e=t.prev,i=t,n=t.next;if(T(e,i,n)>=0)return!1;for(var s=e.x,r=i.x,o=n.x,a=e.y,l=i.y,u=n.y,p=sr?s>o?s:o:r>o?r:o,c=a>l?a>u?a:u:l>u?l:u,f=n.next;f!==e;){if(f.x>=p&&f.x<=d&&f.y>=h&&f.y<=c&&_(s,a,r,l,o,u,f.x,f.y)&&T(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function o(t,e,i,n){var s=t.prev,r=t,o=t.next;if(T(s,r,o)>=0)return!1;for(var a=s.x,l=r.x,u=o.x,p=s.y,h=r.y,c=o.y,f=al?a>u?a:u:l>u?l:u,I=p>h?p>c?p:c:h>c?h:c,E=d(f,m,e,i,n),O=d(g,I,e,i,n),M=t.prevZ,R=t.nextZ;M&&M.z>=E&&R&&R.z<=O;){if(M.x>=f&&M.x<=g&&M.y>=m&&M.y<=I&&M!==s&&M!==o&&_(a,p,l,h,u,c,M.x,M.y)&&T(M.prev,M,M.next)>=0)return!1;if(M=M.prevZ,R.x>=f&&R.x<=g&&R.y>=m&&R.y<=I&&R!==s&&R!==o&&_(a,p,l,h,u,c,R.x,R.y)&&T(R.prev,R,R.next)>=0)return!1;R=R.nextZ}for(;M&&M.z>=E;){if(M.x>=f&&M.x<=g&&M.y>=m&&M.y<=I&&M!==s&&M!==o&&_(a,p,l,h,u,c,M.x,M.y)&&T(M.prev,M,M.next)>=0)return!1;M=M.prevZ}for(;R&&R.z<=O;){if(R.x>=f&&R.x<=g&&R.y>=m&&R.y<=I&&R!==s&&R!==o&&_(a,p,l,h,u,c,R.x,R.y)&&T(R.prev,R,R.next)>=0)return!1;R=R.nextZ}return!0}function a(t,e,i){var s=t;do{var r=s.prev,o=s.next.next;!m(r,o)&&g(r,s,s.next,o)&&O(r,o)&&O(o,r)&&(e.push(r.i/i|0),e.push(s.i/i|0),e.push(o.i/i|0),A(s),A(s.next),s=t=o),s=s.next}while(s!==t);return n(s)}function l(t,e,i,r,o,a){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&f(l,u)){var p=M(l,u);return l=n(l,l.next),p=n(p,p.next),s(l,e,i,r,o,a,0),void s(p,e,i,r,o,a,0)}u=u.next}l=l.next}while(l!==t)}function u(t,e){return t.x-e.x}function p(t,e){var i=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o&&(o=a,i=n.x=n.x&&n.x>=p&&s!==n.x&&_(ri.x||n.x===i.x&&h(i,n)))&&(i=n,c=l)),n=n.next}while(n!==u);return i}(t,e);if(!i)return e;var s=M(i,t);return n(s,s.next),n(i,i.next)}function h(t,e){return T(t.prev,t,e.prev)<0&&T(e.next,t,t.next)<0}function d(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*s|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*s|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function c(t){var e=t,i=t;do{(e.x=(t-o)*(r-a)&&(t-o)*(n-a)>=(i-o)*(e-a)&&(i-o)*(r-a)>=(s-o)*(n-a)}function f(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&g(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(O(t,e)&&O(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)&&(T(t.prev,t,e.prev)||T(t,e.prev,e))||m(t,e)&&T(t.prev,t,t.next)>0&&T(e.prev,e,e.next)>0)}function T(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function g(t,e,i,n){var s=E(T(t,e,i)),r=E(T(t,e,n)),o=E(T(i,n,t)),a=E(T(i,n,e));return s!==r&&o!==a||(!(0!==s||!I(t,i,e))||(!(0!==r||!I(t,n,e))||(!(0!==o||!I(i,t,n))||!(0!==a||!I(i,e,n)))))}function I(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function E(t){return t>0?1:t<0?-1:0}function O(t,e){return T(t.prev,t,t.next)<0?T(t,e,t.next)>=0&&T(t,t.prev,e)>=0:T(t,e,t.prev)<0||T(t,t.next,e)<0}function M(t,e){var i=new y(t.i,t.x,t.y),n=new y(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function R(t,e,i,n){var s=new y(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function y(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},228:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function n(){}function s(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function r(t,e,n,r,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new s(n,r||t,o),l=i?i+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],a]:t._events[l].push(a):(t._events[l]=a,t._eventsCount++),t}function o(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),a.prototype.eventNames=function(){var t,n,s=[];if(0===this._eventsCount)return s;for(n in t=this._events)e.call(t,n)&&s.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(t)):s},a.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var s=0,r=n.length,o=new Array(r);s{"use strict";var e,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(t,e,i){return Function.prototype.apply.call(t,e,i)};e=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function r(){r.init.call(this)}t.exports=r,t.exports.once=function(t,e){return new Promise((function(i,n){function s(i){t.removeListener(e,r),n(i)}function r(){"function"==typeof t.removeListener&&t.removeListener("error",s),i([].slice.call(arguments))}f(t,e,r,{once:!0}),"error"!==e&&function(t,e,i){"function"==typeof t.on&&f(t,"error",e,i)}(t,s,{once:!0})}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var o=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?r.defaultMaxListeners:t._maxListeners}function u(t,e,i,n){var s,r,o,u;if(a(i),void 0===(r=t._events)?(r=t._events=Object.create(null),t._eventsCount=0):(void 0!==r.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),r=t._events),o=r[e]),void 0===o)o=r[e]=i,++t._eventsCount;else if("function"==typeof o?o=r[e]=n?[i,o]:[o,i]:n?o.unshift(i):o.push(i),(s=l(t))>0&&o.length>s&&!o.warned){o.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=t,p.type=e,p.count=o.length,u=p,console&&console.warn&&console.warn(u)}return t}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(t,e,i){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:i},s=p.bind(n);return s.listener=i,n.wrapFn=s,s}function d(t,e,i){var n=t._events;if(void 0===n)return[];var s=n[e];return void 0===s?[]:"function"==typeof s?i?[s.listener||s]:[s]:i?function(t){for(var e=new Array(t.length),i=0;i0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=r[t];if(void 0===l)return!1;if("function"==typeof l)n(l,this,e);else{var u=l.length,p=_(l,u);for(i=0;i=0;r--)if(i[r]===e||i[r].listener===e){o=i[r].listener,s=r;break}if(s<0)return this;0===s?i.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},r.prototype.listeners=function(t){return d(this,t,!0)},r.prototype.rawListeners=function(t){return d(this,t,!1)},r.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):c.call(t,e)},r.prototype.listenerCount=c,r.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},251:(t,e)=>{ -/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -e.read=function(t,e,i,n,s){var r,o,a=8*s-n-1,l=(1<>1,p=-7,h=i?s-1:0,d=i?-1:1,c=t[e+h];for(h+=d,r=c&(1<<-p)-1,c>>=-p,p+=a;p>0;r=256*r+t[e+h],h+=d,p-=8);for(o=r&(1<<-p)-1,r>>=-p,p+=n;p>0;o=256*o+t[e+h],h+=d,p-=8);if(0===r)r=1-u;else{if(r===l)return o?NaN:1/0*(c?-1:1);o+=Math.pow(2,n),r-=u}return(c?-1:1)*o*Math.pow(2,r-n)},e.write=function(t,e,i,n,s,r){var o,a,l,u=8*r-s-1,p=(1<>1,d=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,c=n?0:r-1,_=n?1:-1,f=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=p):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=p?(a=0,o=p):o+h>=1?(a=(e*l-1)*Math.pow(2,s),o+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,s),o=0));s>=8;t[i+c]=255&a,c+=_,a/=256,s-=8);for(o=o<0;t[i+c]=255&o,c+=_,o/=256,u-=8);t[i+c-_]|=128*f}},5228:t=>{"use strict"; -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/var e=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},i=0;i<10;i++)e["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,s){for(var r,o,a=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l{"use strict";t.exports=(t,e={})=>{if(!t)return;const i={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:/?#]+):)?(?:\/\/([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/,loose:/^(?:(?![^:@]+:[^:@/]*@)([^:/?#.]+):)?(?:\/\/)?([^/?#]*)([^?#]*)(?:\?([^#]*))?(?:#(.*))?/}},n=(e.strictMode?i.parser.strict:i.parser.loose).exec(t);if(!n)return;const s={};if(s[i.key[0]]=t,s[i.key[1]]=n[1]||"",s[i.key[2]]=n[2]||"",s[i.key[8]]=n[3]||"",s[i.key[12]]=n[4]||"",s[i.key[13]]=n[5]||"",s[i.key[2]]){const t=/^(?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?/.exec(s[i.key[2]]);t&&(s[i.key[3]]=t[1]||"",s[i.key[4]]=t[2]||"",s[i.key[5]]=t[3]||"",s[i.key[6]]=t[4]||"",s[i.key[7]]=t[5]||"")}return s[i.q.name]={},s[i.key[12]].replace(i.q.parser,(function(t,e,n){e&&(s[i.q.name][e]=n)})),s}},5585:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="function"!=typeof Object.create&&"~";function n(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function s(){}s.prototype._events=void 0,s.prototype.eventNames=function(){var t,n=this._events,s=[];if(!n)return s;for(t in n)e.call(n,t)&&s.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(n)):s},s.prototype.listeners=function(t,e){var n=i?i+t:t,s=this._events&&this._events[n];if(e)return!!s;if(!s)return[];if(s.fn)return[s.fn];for(var r=0,o=s.length,a=new Array(o);r{var n={VERSION:i(1045).rE,PI_2:2*Math.PI,RAD_TO_DEG:180/Math.PI,DEG_TO_RAD:Math.PI/180,TARGET_FPMS:.06,RENDERER_TYPE:{UNKNOWN:0,WEBGL:1,CANVAS:2},BLEND_MODES:{NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16},DRAW_MODES:{POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},SCALE_MODES:{DEFAULT:0,LINEAR:0,NEAREST:1},RETINA_PREFIX:/@(.+)x/,RESOLUTION:1,FILTER_RESOLUTION:1,DEFAULT_RENDER_OPTIONS:{view:null,resolution:1,antialias:!1,forceFXAA:!1,autoResize:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,roundPixels:!1},SHAPES:{POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},SPRITE_BATCH_SIZE:2e3};t.exports=n},7673:(t,e,i)=>{var n=i(4650),s=i(2295),r=i(7443),o=new n.Matrix;function a(){s.call(this),this.children=[]}a.prototype=Object.create(s.prototype),a.prototype.constructor=a,t.exports=a,Object.defineProperties(a.prototype,{width:{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t}},height:{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t}}}),a.prototype.onChildrenChange=function(){},a.prototype.addChild=function(t){return this.addChildAt(t,this.children.length)},a.prototype.addChildAt=function(t,e){if(t===this)return t;if(e>=0&&e<=this.children.length)return t.parent&&t.parent.removeChild(t),t.parent=this,this.children.splice(e,0,t),this.onChildrenChange(e),t.emit("added",this),t;throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length)},a.prototype.swapChildren=function(t,e){if(t!==e){var i=this.getChildIndex(t),n=this.getChildIndex(e);if(i<0||n<0)throw new Error("swapChildren: Both the supplied DisplayObjects must be children of the caller.");this.children[i]=e,this.children[n]=t,this.onChildrenChange(i=this.children.length)throw new Error("The supplied index is out of bounds");var i=this.getChildIndex(t);this.children.splice(i,1),this.children.splice(e,0,t),this.onChildrenChange(e)},a.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Supplied index "+t+" does not exist in the child list, or the supplied DisplayObject is not a child of the caller");return this.children[t]},a.prototype.removeChild=function(t){var e=this.children.indexOf(t);if(-1!==e)return this.removeChildAt(e)},a.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,this.children.splice(t,1),this.onChildrenChange(t),e.emit("removed",this),e},a.prototype.removeChildren=function(t,e){var i,n,s=t||0,r="number"==typeof e?e:this.children.length,o=r-s;if(o>0&&o<=r){for(i=this.children.splice(s,o),n=0;n(e=t.width+t.x)?o:e,a=a>(i=t.height+t.y)?a:i)}if(!l)return n.Rectangle.EMPTY;var h=this._bounds;h.x=s,h.y=r,h.width=o-s,h.height=a-r,this._currentBounds=h}return this._currentBounds},a.prototype.containerGetBounds=a.prototype.getBounds,a.prototype.getLocalBounds=function(){var t=this.worldTransform;this.worldTransform=n.Matrix.IDENTITY;for(var e=0,i=this.children.length;e{var n=i(4650),s=i(7443),r=i(5585),o=i(6192),a=new n.Matrix,l={worldTransform:new n.Matrix,worldAlpha:1,children:[]};function u(){r.call(this),this.position=new n.Point,this.scale=new n.Point(1,1),this.pivot=new n.Point(0,0),this.rotation=0,this.alpha=1,this.visible=!0,this.renderable=!0,this.parent=null,this.worldAlpha=1,this.worldTransform=new n.Matrix,this.filterArea=null,this._sr=0,this._cr=1,this._bounds=new n.Rectangle(0,0,1,1),this._currentBounds=null,this._mask=null}u.prototype=Object.create(r.prototype),u.prototype.constructor=u,t.exports=u,Object.defineProperties(u.prototype,{x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},worldVisible:{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}},mask:{get:function(){return this._mask},set:function(t){this._mask&&(this._mask.renderable=!0),this._mask=t,this._mask&&(this._mask.renderable=!1)}},filters:{get:function(){return this._filters&&this._filters.slice()},set:function(t){this._filters=t&&t.slice()}}}),u.prototype.updateTransform=function(){var t,e,i,n,s,r,a=this.parent.worldTransform,l=this.worldTransform;this.rotation%o.PI_2?(this.rotation!==this.rotationCache&&(this.rotationCache=this.rotation,this._sr=Math.sin(this.rotation),this._cr=Math.cos(this.rotation)),t=this._cr*this.scale.x,e=this._sr*this.scale.x,i=-this._sr*this.scale.y,n=this._cr*this.scale.y,s=this.position.x,r=this.position.y,(this.pivot.x||this.pivot.y)&&(s-=this.pivot.x*t+this.pivot.y*i,r-=this.pivot.x*e+this.pivot.y*n),l.a=t*a.a+e*a.c,l.b=t*a.b+e*a.d,l.c=i*a.a+n*a.c,l.d=i*a.b+n*a.d,l.tx=s*a.a+r*a.c+a.tx,l.ty=s*a.b+r*a.d+a.ty):(t=this.scale.x,n=this.scale.y,s=this.position.x-this.pivot.x*t,r=this.position.y-this.pivot.y*n,l.a=t*a.a,l.b=t*a.b,l.c=n*a.c,l.d=n*a.d,l.tx=s*a.a+r*a.c+a.tx,l.ty=s*a.b+r*a.d+a.ty),this.worldAlpha=this.alpha*this.parent.worldAlpha,this._currentBounds=null},u.prototype.displayObjectUpdateTransform=u.prototype.updateTransform,u.prototype.getBounds=function(t){return n.Rectangle.EMPTY},u.prototype.getLocalBounds=function(){return this.getBounds(n.Matrix.IDENTITY)},u.prototype.toGlobal=function(t){return this.parent?this.displayObjectUpdateTransform():(this.parent=l,this.displayObjectUpdateTransform(),this.parent=null),this.worldTransform.apply(t)},u.prototype.toLocal=function(t,e){return e&&(t=e.toGlobal(t)),this.parent?this.displayObjectUpdateTransform():(this.parent=l,this.displayObjectUpdateTransform(),this.parent=null),this.worldTransform.applyInverse(t)},u.prototype.renderWebGL=function(t){},u.prototype.renderCanvas=function(t){},u.prototype.generateTexture=function(t,e,i){var n=this.getLocalBounds(),r=new s(t,0|n.width,0|n.height,e,i);return a.tx=-n.x,a.ty=-n.y,r.render(this,a),r},u.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},u.prototype.destroy=function(){this.position=null,this.scale=null,this.pivot=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.worldTransform=null,this.filterArea=null}},6720:(t,e,i)=>{var n=i(7673),s=i(2699),r=i(1549),o=i(4694),a=i(7240),l=i(4650),u=i(6192),p=new l.Point;function h(){n.call(this),this.fillAlpha=1,this.lineWidth=0,this.lineColor=0,this.graphicsData=[],this.tint=16777215,this._prevTint=16777215,this.blendMode=u.BLEND_MODES.NORMAL,this.currentPath=null,this._webGL={},this.isMask=!1,this.boundsPadding=0,this._localBounds=new l.Rectangle(0,0,1,1),this.dirty=!0,this.glDirty=!1,this.boundsDirty=!0,this.cachedSpriteDirty=!1}h.prototype=Object.create(n.prototype),h.prototype.constructor=h,t.exports=h,h.prototype.clone=function(){var t=new h;t.renderable=this.renderable,t.fillAlpha=this.fillAlpha,t.lineWidth=this.lineWidth,t.lineColor=this.lineColor,t.tint=this.tint,t.blendMode=this.blendMode,t.isMask=this.isMask,t.boundsPadding=this.boundsPadding,t.dirty=!0,t.glDirty=!0,t.cachedSpriteDirty=this.cachedSpriteDirty;for(var e=0;ep*a)}return this.dirty=this.boundsDirty=!0,this},h.prototype.arc=function(t,e,i,n,s,r){if(n===s)return this;!(r=r||!1)&&s<=n?s+=2*Math.PI:r&&n<=s&&(n+=2*Math.PI);var o=r?-1*(n-s):s-n,a=40*Math.ceil(Math.abs(o)/(2*Math.PI));if(0===o)return this;var l=t+Math.cos(n)*i,u=e+Math.sin(n)*i;this.currentPath?this.currentPath.shape.points.push(l,u):this.moveTo(l,u);for(var p=this.currentPath.shape.points,h=o/(2*a),d=2*h,c=Math.cos(h),_=Math.sin(h),f=a-1,T=f%1/f,m=0;m<=f;m++){var g=h+n+d*(m+T*m),I=Math.cos(g),E=-Math.sin(g);p.push((c*I+_*E)*i+t,(c*-E+_*I)*i+e)}return this.dirty=this.boundsDirty=!0,this},h.prototype.beginFill=function(t,e){return this.filling=!0,this.fillColor=t||0,this.fillAlpha=void 0===e?1:e,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},h.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},h.prototype.drawRect=function(t,e,i,n){return this.drawShape(new l.Rectangle(t,e,i,n)),this},h.prototype.drawRoundedRect=function(t,e,i,n,s){return this.drawShape(new l.RoundedRectangle(t,e,i,n,s)),this},h.prototype.drawCircle=function(t,e,i){return this.drawShape(new l.Circle(t,e,i)),this},h.prototype.drawEllipse=function(t,e,i,n){return this.drawShape(new l.Ellipse(t,e,i,n)),this},h.prototype.drawPolygon=function(t){var e=t,i=!0;if(e instanceof l.Polygon&&(i=e.closed,e=e.points),!Array.isArray(e)){e=new Array(arguments.length);for(var n=0;n(M=g>(M=T>M?T:M)?g:M)?E:M,R=O>(R=I>(R=m>R?m:R)?I:R)?O:R,this._bounds.x=A,this._bounds.width=M-A,this._bounds.y=y,this._bounds.height=R-y,this._currentBounds=this._bounds}return this._currentBounds},h.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,p);for(var e=this.graphicsData,i=0;ie?o+l:e,i=an?a+p:n;else if(c===u.SHAPES.CIRC)o=s.x,a=s.y,t=o-(l=s.radius+_/2)e?o+l:e,i=a-(p=s.radius+_/2)n?a+p:n;else if(c===u.SHAPES.ELIP)o=s.x,a=s.y,t=o-(l=s.width+_/2)e?o+l:e,i=a-(p=s.height+_/2)n?a+p:n;else{r=s.points;for(var f=0;fe?o+_:e,i=(a=r[f+1])-_n?a+_:n}}else t=0,e=0,i=0,n=0;var T=this.boundsPadding;this._localBounds.x=t-T,this._localBounds.width=e-t+2*T,this._localBounds.y=i-T,this._localBounds.height=n-i+2*T},h.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var e=new a(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,t);return this.graphicsData.push(e),e.type===u.SHAPES.POLY&&(e.shape.closed=e.shape.closed||this.filling,this.currentPath=e),this.dirty=this.boundsDirty=!0,e},h.prototype.destroy=function(){n.prototype.destroy.apply(this,arguments);for(var t=0;t{function e(t,e,i,n,s,r,o){this.lineWidth=t,this.lineColor=e,this.lineAlpha=i,this._lineTint=e,this.fillColor=n,this.fillAlpha=s,this._fillTint=n,this.fill=r,this.shape=o,this.type=o.type}e.prototype.constructor=e,t.exports=e,e.prototype.clone=function(){return new e(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.shape)},e.prototype.destroy=function(){this.shape=null}},4237:(t,e,i)=>{var n=i(501),s=i(4650),r=i(6192),o=i(1830),a=i(5092),l=i(5075),u=i(6570);function p(t){o.call(this,t),this.graphicsDataPool=[],this.primitiveShader=null,this.complexPrimitiveShader=null,this.maximumSimplePolySize=200}p.prototype=Object.create(o.prototype),p.prototype.constructor=p,t.exports=p,a.registerPlugin("graphics",p),p.prototype.onContextChange=function(){},p.prototype.destroy=function(){o.prototype.destroy.call(this);for(var t=0;t=6)if(a.points.length<2*this.maximumSimplePolySize)i=this.switchMode(s,0),this.buildPoly(a,i)||(i=this.switchMode(s,1),this.buildComplexPoly(a,i));else i=this.switchMode(s,1),this.buildComplexPoly(a,i);a.lineWidth>0&&(i=this.switchMode(s,0),this.buildLine(a,i))}else i=this.switchMode(s,0),a.type===r.SHAPES.RECT?this.buildRectangle(a,i):a.type===r.SHAPES.CIRC||a.type===r.SHAPES.ELIP?this.buildCircle(a,i):a.type===r.SHAPES.RREC&&this.buildRoundedRectangle(a,i);s.lastIndex++}for(e=0;e32e4||i.mode!==e||1===e)&&((i=this.graphicsDataPool.pop()||new l(t.gl)).mode=e,t.data.push(i)):((i=this.graphicsDataPool.pop()||new l(t.gl)).mode=e,t.data.push(i)),i.dirty=!0,i},p.prototype.buildRectangle=function(t,e){var i=t.shape,s=i.x,r=i.y,o=i.width,a=i.height;if(t.fill){var l=n.hex2rgb(t.fillColor),u=t.fillAlpha,p=l[0]*u,h=l[1]*u,d=l[2]*u,c=e.points,_=e.indices,f=c.length/6;c.push(s,r),c.push(p,h,d,u),c.push(s+o,r),c.push(p,h,d,u),c.push(s,r+a),c.push(p,h,d,u),c.push(s+o,r+a),c.push(p,h,d,u),_.push(f,f,f+1,f+2,f+3,f+3)}if(t.lineWidth){var T=t.points;t.points=[s,r,s+o,r,s+o,r+a,s,r+a,s,r],this.buildLine(t,e),t.points=T}},p.prototype.buildRoundedRectangle=function(t,e){var i=t.shape,s=i.x,r=i.y,o=i.width,a=i.height,l=i.radius,p=[];if(p.push(s,r+l),this.quadraticBezierCurve(s,r+a-l,s,r+a,s+l,r+a,p),this.quadraticBezierCurve(s+o-l,r+a,s+o,r+a,s+o,r+a-l,p),this.quadraticBezierCurve(s+o,r+l,s+o,r,s+o-l,r,p),this.quadraticBezierCurve(s+l,r,s,r,s,r+l+1e-10,p),t.fill){var h=n.hex2rgb(t.fillColor),d=t.fillAlpha,c=h[0]*d,_=h[1]*d,f=h[2]*d,T=e.points,m=e.indices,g=T.length/6,I=u(p,null,2),E=0;for(E=0;E19600?(M=g-E,R=I-O,M/=D=Math.sqrt(M*M+R*R),R/=D,M*=k,R*=k,w.push(_-M,f-R),w.push(B,U,X,Y),w.push(_+M,f+R),w.push(B,U,X,Y),w.push(_-M,f-R),w.push(B,U,X,Y),P++):(w.push(p,h),w.push(B,U,X,Y),w.push(_-(p-_),f-(h-f)),w.push(B,U,X,Y));for(d=r[2*(F-2)],c=r[2*(F-2)+1],_=r[2*(F-1)],g=-(c-(f=r[2*(F-1)+1])),I=d-_,g/=D=Math.sqrt(g*g+I*I),I/=D,g*=k,I*=k,w.push(_-g,f-I),w.push(B,U,X,Y),w.push(_+g,f+I),w.push(B,U,X,Y),N.push(x),i=0;il?r:l,u=(o=i[h+1])p?o:p;i.push(a,u,l,u,l,p,a,p);var d=i.length/2;for(h=0;h{function e(t){this.gl=t,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=t.createBuffer(),this.indexBuffer=t.createBuffer(),this.mode=1,this.alpha=1,this.dirty=!0,this.glPoints=null,this.glIndices=null}e.prototype.constructor=e,t.exports=e,e.prototype.reset=function(){this.points.length=0,this.indices.length=0},e.prototype.upload=function(){var t=this.gl;this.glPoints=new Float32Array(this.points),t.bindBuffer(t.ARRAY_BUFFER,this.buffer),t.bufferData(t.ARRAY_BUFFER,this.glPoints,t.STATIC_DRAW),this.glIndices=new Uint16Array(this.indices),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.glIndices,t.STATIC_DRAW),this.dirty=!1},e.prototype.destroy=function(){this.color=null,this.points=null,this.indices=null,this.gl.deleteBuffer(this.buffer),this.gl.deleteBuffer(this.indexBuffer),this.gl=null,this.buffer=null,this.indexBuffer=null,this.glPoints=null,this.glIndices=null}},4651:(t,e,i)=>{ -/** - * @file Main export of the PIXI core library - * @author Mat Groves - * @copyright 2013-2015 GoodBoyDigital - * @license {@link https://github.com/pixijs/pixi.js/blob/master/LICENSE|MIT License} - */ -var n=t.exports=Object.assign(i(6192),i(4650),{utils:i(501),ticker:i(2410),DisplayObject:i(2295),Container:i(7673),Sprite:i(2861),ParticleContainer:i(3326),SpriteRenderer:i(7920),ParticleRenderer:i(2952),Text:i(9252),Graphics:i(6720),GraphicsData:i(7240),GraphicsRenderer:i(4237),Texture:i(2699),BaseTexture:i(1936),RenderTexture:i(7443),VideoBaseTexture:i(3367),TextureUvs:i(1507),CanvasRenderer:i(8010),CanvasGraphics:i(4694),CanvasBuffer:i(1549),WebGLRenderer:i(5092),ShaderManager:i(3779),Shader:i(8306),ObjectRenderer:i(1830),RenderTarget:i(7955),AbstractFilter:i(580),FXAAFilter:i(1438),SpriteMaskFilter:i(5207),autoDetectRenderer:function(t,e,i,s){return t=t||800,e=e||600,!s&&n.utils.isWebGLSupported()?new n.WebGLRenderer(t,e,i):new n.CanvasRenderer(t,e,i)}})},2825:(t,e,i)=>{var n=i(8840);function s(){this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0}s.prototype.constructor=s,t.exports=s,s.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},s.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var i=e||this.array;return t?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i},s.prototype.apply=function(t,e){e=e||new n;var i=t.x,s=t.y;return e.x=this.a*i+this.c*s+this.tx,e.y=this.b*i+this.d*s+this.ty,e},s.prototype.applyInverse=function(t,e){e=e||new n;var i=1/(this.a*this.d+this.c*-this.b),s=t.x,r=t.y;return e.x=this.d*i*s+-this.c*i*r+(this.ty*this.c-this.tx*this.d)*i,e.y=this.a*i*r+-this.b*i*s+(-this.ty*this.a+this.tx*this.b)*i,e},s.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},s.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},s.prototype.rotate=function(t){var e=Math.cos(t),i=Math.sin(t),n=this.a,s=this.c,r=this.tx;return this.a=n*e-this.b*i,this.b=n*i+this.b*e,this.c=s*e-this.d*i,this.d=s*i+this.d*e,this.tx=r*e-this.ty*i,this.ty=r*i+this.ty*e,this},s.prototype.append=function(t){var e=this.a,i=this.b,n=this.c,s=this.d;return this.a=t.a*e+t.b*n,this.b=t.a*i+t.b*s,this.c=t.c*e+t.d*n,this.d=t.c*i+t.d*s,this.tx=t.tx*e+t.ty*n+this.tx,this.ty=t.tx*i+t.ty*s+this.ty,this},s.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var i=this.a,n=this.c;this.a=i*t.a+this.b*t.c,this.b=i*t.b+this.b*t.d,this.c=n*t.a+this.d*t.c,this.d=n*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},s.prototype.invert=function(){var t=this.a,e=this.b,i=this.c,n=this.d,s=this.tx,r=t*n-e*i;return this.a=n/r,this.b=-e/r,this.c=-i/r,this.d=t/r,this.tx=(i*this.ty-n*s)/r,this.ty=-(t*this.ty-e*s)/r,this},s.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},s.prototype.clone=function(){var t=new s;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},s.prototype.copy=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},s.IDENTITY=new s,s.TEMP_MATRIX=new s},8840:t=>{function e(t,e){this.x=t||0,this.y=e||0}e.prototype.constructor=e,t.exports=e,e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.copy=function(t){this.set(t.x,t.y)},e.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},e.prototype.set=function(t,e){this.x=t||0,this.y=e||(0!==e?this.x:0)}},4650:(t,e,i)=>{t.exports={Point:i(8840),Matrix:i(2825),Circle:i(5385),Ellipse:i(8419),Polygon:i(3671),Rectangle:i(2068),RoundedRectangle:i(1347)}},5385:(t,e,i)=>{var n=i(2068),s=i(6192);function r(t,e,i){this.x=t||0,this.y=e||0,this.radius=i||0,this.type=s.SHAPES.CIRC}r.prototype.constructor=r,t.exports=r,r.prototype.clone=function(){return new r(this.x,this.y,this.radius)},r.prototype.contains=function(t,e){if(this.radius<=0)return!1;var i=this.x-t,n=this.y-e;return(i*=i)+(n*=n)<=this.radius*this.radius},r.prototype.getBounds=function(){return new n(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)}},8419:(t,e,i)=>{var n=i(2068),s=i(6192);function r(t,e,i,n){this.x=t||0,this.y=e||0,this.width=i||0,this.height=n||0,this.type=s.SHAPES.ELIP}r.prototype.constructor=r,t.exports=r,r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var i=(t-this.x)/this.width,n=(e-this.y)/this.height;return(i*=i)+(n*=n)<=1},r.prototype.getBounds=function(){return new n(this.x-this.width,this.y-this.height,this.width,this.height)}},3671:(t,e,i)=>{var n=i(8840),s=i(6192);function r(t){var e=t;if(!Array.isArray(e)){e=new Array(arguments.length);for(var i=0;ie!=u>e&&t<(l-o)*(e-a)/(u-a)+o&&(i=!i)}return i}},2068:(t,e,i)=>{var n=i(6192);function s(t,e,i,s){this.x=t||0,this.y=e||0,this.width=i||0,this.height=s||0,this.type=n.SHAPES.RECT}s.prototype.constructor=s,t.exports=s,s.EMPTY=new s(0,0,0,0),s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height)},s.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t=this.y&&e{var n=i(6192);function s(t,e,i,s,r){this.x=t||0,this.y=e||0,this.width=i||0,this.height=s||0,this.radius=r||20,this.type=n.SHAPES.RREC}s.prototype.constructor=s,t.exports=s,s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.radius)},s.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height)}},3326:(t,e,i)=>{var n=i(7673),s=i(6192);function r(t,e,i){n.call(this);(i=i||15e3)>16384&&(i=16384),i>(t=t||15e3)&&(i=t),this._properties=[!1,!0,!1,!1,!1],this._maxSize=t,this._batchSize=i,this._buffers=null,this._bufferToUpdate=0,this.interactiveChildren=!1,this.blendMode=s.BLEND_MODES.NORMAL,this.roundPixels=!0,this.setProperties(e)}r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.setProperties=function(t){t&&(this._properties[0]="scale"in t?!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="alpha"in t?!!t.alpha:this._properties[4])},r.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},r.prototype.renderWebGL=function(t){this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(t.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},r.prototype.onChildrenChange=function(t){var e=Math.floor(t/this._batchSize);e{function e(t,e,i,n){this.gl=t,this.vertSize=2,this.vertByteSize=4*this.vertSize,this.size=n,this.dynamicProperties=[],this.staticProperties=[];for(var s=0;s{var n=i(1830),s=i(5092),r=i(3646),o=i(3361),a=i(4650);function l(t){n.call(this,t);this.indices=new Uint16Array(98304);for(var e=0,i=0;e<98304;e+=6,i+=4)this.indices[e+0]=i+0,this.indices[e+1]=i+1,this.indices[e+2]=i+2,this.indices[e+3]=i+0,this.indices[e+4]=i+2,this.indices[e+5]=i+3;this.shader=null,this.indexBuffer=null,this.properties=null,this.tempMatrix=new a.Matrix}l.prototype=Object.create(n.prototype),l.prototype.constructor=l,t.exports=l,s.registerPlugin("particle",l),l.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new r(this.renderer.shaderManager),this.indexBuffer=t.createBuffer(),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices,t.STATIC_DRAW),this.properties=[{attribute:this.shader.attributes.aVertexPosition,size:2,uploadFunction:this.uploadVertices,offset:0},{attribute:this.shader.attributes.aPositionCoord,size:2,uploadFunction:this.uploadPosition,offset:0},{attribute:this.shader.attributes.aRotation,size:1,uploadFunction:this.uploadRotation,offset:0},{attribute:this.shader.attributes.aTextureCoord,size:2,uploadFunction:this.uploadUvs,offset:0},{attribute:this.shader.attributes.aColor,size:1,uploadFunction:this.uploadAlpha,offset:0}]},l.prototype.start=function(){var t=this.renderer.gl;t.activeTexture(t.TEXTURE0),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indexBuffer);var e=this.shader;this.renderer.shaderManager.setShader(e)},l.prototype.render=function(t){var e=t.children,i=e.length,n=t._maxSize,s=t._batchSize;if(0!==i){i>n&&(i=n),t._buffers||(t._buffers=this.generateBuffers(t)),this.renderer.blendModeManager.setBlendMode(t.blendMode);var r=this.renderer.gl,o=t.worldTransform.copy(this.tempMatrix);o.prepend(this.renderer.currentRenderTarget.projectionMatrix),r.uniformMatrix3fv(this.shader.uniforms.projectionMatrix._location,!1,o.toArray(!0)),r.uniform1f(this.shader.uniforms.uAlpha._location,t.worldAlpha);var a=e[0]._texture.baseTexture;if(a._glTextures[r.id])r.bindTexture(r.TEXTURE_2D,a._glTextures[r.id]);else{if(!this.renderer.updateTexture(a))return;t._properties[0]&&t._properties[3]||(t._bufferToUpdate=0)}for(var l=0,u=0;ls&&(p=s);var h=t._buffers[u];h.uploadDynamic(e,l,p),t._bufferToUpdate===u&&(h.uploadStatic(e,l,p),t._bufferToUpdate=u+1),h.bind(this.shader),r.drawElements(r.TRIANGLES,6*p,r.UNSIGNED_SHORT,0),this.renderer.drawCount++}}},l.prototype.generateBuffers=function(t){var e,i=this.renderer.gl,n=[],s=t._maxSize,r=t._batchSize,a=t._properties;for(e=0;e{var n=i(8297);function s(t){n.call(this,t,["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute float aColor;","attribute vec2 aPositionCoord;","attribute vec2 aScale;","attribute float aRotation;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","varying float vColor;","void main(void){"," vec2 v = aVertexPosition;"," v.x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);"," v.y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);"," v = v + aPositionCoord;"," gl_Position = vec4((projectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;"," vColor = aColor;","}"].join("\n"),["precision lowp float;","varying vec2 vTextureCoord;","varying float vColor;","uniform sampler2D uSampler;","uniform float uAlpha;","void main(void){"," vec4 color = texture2D(uSampler, vTextureCoord) * vColor * uAlpha;"," if (color.a == 0.0) discard;"," gl_FragColor = color;","}"].join("\n"),{uAlpha:{type:"1f",value:1}},{aPositionCoord:0,aRotation:0})}s.prototype=Object.create(n.prototype),s.prototype.constructor=s,t.exports=s},6820:(t,e,i)=>{var n=i(501),s=i(4650),r=i(6192),o=i(5585);function a(t,e,i,a){if(o.call(this),n.sayHello(t),a)for(var l in r.DEFAULT_RENDER_OPTIONS)void 0===a[l]&&(a[l]=r.DEFAULT_RENDER_OPTIONS[l]);else a=r.DEFAULT_RENDER_OPTIONS;this.type=r.RENDERER_TYPE.UNKNOWN,this.width=e||800,this.height=i||600,this.view=a.view||document.createElement("canvas"),this.resolution=a.resolution,this.transparent=a.transparent,this.autoResize=a.autoResize||!1,this.blendModes=null,this.preserveDrawingBuffer=a.preserveDrawingBuffer,this.clearBeforeRender=a.clearBeforeRender,this.roundPixels=a.roundPixels,this._backgroundColor=0,this._backgroundColorRgb=[0,0,0],this._backgroundColorString="#000000",this.backgroundColor=a.backgroundColor||this._backgroundColor,this._tempDisplayObjectParent={worldTransform:new s.Matrix,worldAlpha:1,children:[]},this._lastObjectRendered=this._tempDisplayObjectParent}a.prototype=Object.create(o.prototype),a.prototype.constructor=a,t.exports=a,Object.defineProperties(a.prototype,{backgroundColor:{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=n.hex2string(t),n.hex2rgb(t,this._backgroundColorRgb)}}}),a.prototype.resize=function(t,e){this.width=t*this.resolution,this.height=e*this.resolution,this.view.width=this.width,this.view.height=this.height,this.autoResize&&(this.view.style.width=this.width/this.resolution+"px",this.view.style.height=this.height/this.resolution+"px")},a.prototype.destroy=function(t){t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.type=r.RENDERER_TYPE.UNKNOWN,this.width=0,this.height=0,this.view=null,this.resolution=0,this.transparent=!1,this.autoResize=!1,this.blendModes=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this.roundPixels=!1,this._backgroundColor=0,this._backgroundColorRgb=null,this._backgroundColorString=null}},8010:(t,e,i)=>{var n=i(6820),s=i(6871),r=i(501),o=i(4650),a=i(6192);function l(t,e,i){i=i||{},n.call(this,"Canvas",t,e,i),this.type=a.RENDERER_TYPE.CANVAS,this.context=this.view.getContext("2d",{alpha:this.transparent}),this.refresh=!0,this.maskManager=new s,this.smoothProperty="imageSmoothingEnabled",this.context.imageSmoothingEnabled||(this.context.webkitImageSmoothingEnabled?this.smoothProperty="webkitImageSmoothingEnabled":this.context.mozImageSmoothingEnabled?this.smoothProperty="mozImageSmoothingEnabled":this.context.oImageSmoothingEnabled?this.smoothProperty="oImageSmoothingEnabled":this.context.msImageSmoothingEnabled&&(this.smoothProperty="msImageSmoothingEnabled")),this.initPlugins(),this._mapBlendModes(),this._tempDisplayObjectParent={worldTransform:new o.Matrix,worldAlpha:1},this.resize(t,e)}l.prototype=Object.create(n.prototype),l.prototype.constructor=l,t.exports=l,r.pluginTarget.mixin(l),l.prototype.render=function(t){var e=t.parent;this._lastObjectRendered=t,t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=e,this.context.setTransform(1,0,0,1,0,0),this.context.globalAlpha=1,this.context.globalCompositeOperation=this.blendModes[a.BLEND_MODES.NORMAL],navigator.isCocoonJS&&this.view.screencanvas&&(this.context.fillStyle="black",this.context.clear()),this.clearBeforeRender&&(this.transparent?this.context.clearRect(0,0,this.width,this.height):(this.context.fillStyle=this._backgroundColorString,this.context.fillRect(0,0,this.width,this.height))),this.renderDisplayObject(t,this.context)},l.prototype.destroy=function(t){this.destroyPlugins(),n.prototype.destroy.call(this,t),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},l.prototype.renderDisplayObject=function(t,e){var i=this.context;this.context=e,t.renderCanvas(this),this.context=i},l.prototype.resize=function(t,e){n.prototype.resize.call(this,t,e),this.smoothProperty&&(this.context[this.smoothProperty]=a.SCALE_MODES.DEFAULT===a.SCALE_MODES.LINEAR)},l.prototype._mapBlendModes=function(){this.blendModes||(this.blendModes={},r.canUseNewCanvasBlendModes()?(this.blendModes[a.BLEND_MODES.NORMAL]="source-over",this.blendModes[a.BLEND_MODES.ADD]="lighter",this.blendModes[a.BLEND_MODES.MULTIPLY]="multiply",this.blendModes[a.BLEND_MODES.SCREEN]="screen",this.blendModes[a.BLEND_MODES.OVERLAY]="overlay",this.blendModes[a.BLEND_MODES.DARKEN]="darken",this.blendModes[a.BLEND_MODES.LIGHTEN]="lighten",this.blendModes[a.BLEND_MODES.COLOR_DODGE]="color-dodge",this.blendModes[a.BLEND_MODES.COLOR_BURN]="color-burn",this.blendModes[a.BLEND_MODES.HARD_LIGHT]="hard-light",this.blendModes[a.BLEND_MODES.SOFT_LIGHT]="soft-light",this.blendModes[a.BLEND_MODES.DIFFERENCE]="difference",this.blendModes[a.BLEND_MODES.EXCLUSION]="exclusion",this.blendModes[a.BLEND_MODES.HUE]="hue",this.blendModes[a.BLEND_MODES.SATURATION]="saturate",this.blendModes[a.BLEND_MODES.COLOR]="color",this.blendModes[a.BLEND_MODES.LUMINOSITY]="luminosity"):(this.blendModes[a.BLEND_MODES.NORMAL]="source-over",this.blendModes[a.BLEND_MODES.ADD]="lighter",this.blendModes[a.BLEND_MODES.MULTIPLY]="source-over",this.blendModes[a.BLEND_MODES.SCREEN]="source-over",this.blendModes[a.BLEND_MODES.OVERLAY]="source-over",this.blendModes[a.BLEND_MODES.DARKEN]="source-over",this.blendModes[a.BLEND_MODES.LIGHTEN]="source-over",this.blendModes[a.BLEND_MODES.COLOR_DODGE]="source-over",this.blendModes[a.BLEND_MODES.COLOR_BURN]="source-over",this.blendModes[a.BLEND_MODES.HARD_LIGHT]="source-over",this.blendModes[a.BLEND_MODES.SOFT_LIGHT]="source-over",this.blendModes[a.BLEND_MODES.DIFFERENCE]="source-over",this.blendModes[a.BLEND_MODES.EXCLUSION]="source-over",this.blendModes[a.BLEND_MODES.HUE]="source-over",this.blendModes[a.BLEND_MODES.SATURATION]="source-over",this.blendModes[a.BLEND_MODES.COLOR]="source-over",this.blendModes[a.BLEND_MODES.LUMINOSITY]="source-over"))}},1549:t=>{function e(t,e){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.canvas.width=t,this.canvas.height=e}e.prototype.constructor=e,t.exports=e,Object.defineProperties(e.prototype,{width:{get:function(){return this.canvas.width},set:function(t){this.canvas.width=t}},height:{get:function(){return this.canvas.height},set:function(t){this.canvas.height=t}}}),e.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},e.prototype.resize=function(t,e){this.canvas.width=t,this.canvas.height=e},e.prototype.destroy=function(){this.context=null,this.canvas=null}},4694:(t,e,i)=>{var n=i(6192),s={};t.exports=s,s.renderGraphics=function(t,e){var i=t.worldAlpha;t.dirty&&(this.updateGraphicsTint(t),t.dirty=!1);for(var s=0;sv?v:S,e.beginPath(),e.moveTo(M,R+S),e.lineTo(M,R+y-S),e.quadraticCurveTo(M,R+y,M+S,R+y),e.lineTo(M+A-S,R+y),e.quadraticCurveTo(M+A,R+y,M+A,R+y-S),e.lineTo(M+A,R+S),e.quadraticCurveTo(M+A,R,M+A-S,R),e.lineTo(M+S,R),e.quadraticCurveTo(M,R,M,R+S),e.closePath(),(r.fillColor||0===r.fillColor)&&(e.globalAlpha=r.fillAlpha*i,e.fillStyle="#"+("00000"+(0|a).toString(16)).substr(-6),e.fill()),r.lineWidth&&(e.globalAlpha=r.lineAlpha*i,e.strokeStyle="#"+("00000"+(0|l).toString(16)).substr(-6),e.stroke())}}},s.renderGraphicsMask=function(t,e){var i=t.graphicsData.length;if(0!==i){e.beginPath();for(var s=0;sy?y:A,e.moveTo(E,O+A),e.lineTo(E,O+R-A),e.quadraticCurveTo(E,O+R,E+A,O+R),e.lineTo(E+M-A,O+R),e.quadraticCurveTo(E+M,O+R,E+M,O+R-A),e.lineTo(E+M,O+A),e.quadraticCurveTo(E+M,O,E+M-A,O),e.lineTo(E+A,O),e.quadraticCurveTo(E,O,E,O+A),e.closePath()}}}},s.updateGraphicsTint=function(t){if(16777215!==t.tint||t._prevTint!==t.tint){t._prevTint=t.tint;for(var e=(t.tint>>16&255)/255,i=(t.tint>>8&255)/255,n=(255&t.tint)/255,s=0;s>16&255)/255*e*255<<16)+((o>>8&255)/255*i*255<<8)+(255&o)/255*n*255,r._lineTint=((a>>16&255)/255*e*255<<16)+((a>>8&255)/255*i*255<<8)+(255&a)/255*n*255}}}},6871:(t,e,i)=>{var n=i(4694);function s(){}s.prototype.constructor=s,t.exports=s,s.prototype.pushMask=function(t,e){e.context.save();var i=t.alpha,s=t.worldTransform,r=e.resolution;e.context.setTransform(s.a*r,s.b*r,s.c*r,s.d*r,s.tx*r,s.ty*r),t.texture||(n.renderGraphicsMask(t,e.context),e.context.clip()),t.worldAlpha=i},s.prototype.popMask=function(t){t.context.restore()},s.prototype.destroy=function(){}},7809:(t,e,i)=>{var n=i(501),s={};t.exports=s,s.getTintedTexture=function(t,e){var i=t.texture,n="#"+("00000"+(0|(e=s.roundColor(e))).toString(16)).substr(-6);if(i.tintCache=i.tintCache||{},i.tintCache[n])return i.tintCache[n];var r=s.canvas||document.createElement("canvas");if(s.tintMethod(i,e,r),s.convertTintToImage){var o=new Image;o.src=r.toDataURL(),i.tintCache[n]=o}else i.tintCache[n]=r,s.canvas=null;return r},s.tintWithMultiply=function(t,e,i){var n=i.getContext("2d"),s=t.baseTexture.resolution,r=t.crop.clone();r.x*=s,r.y*=s,r.width*=s,r.height*=s,i.width=r.width,i.height=r.height,n.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),n.fillRect(0,0,r.width,r.height),n.globalCompositeOperation="multiply",n.drawImage(t.baseTexture.source,r.x,r.y,r.width,r.height,0,0,r.width,r.height),n.globalCompositeOperation="destination-atop",n.drawImage(t.baseTexture.source,r.x,r.y,r.width,r.height,0,0,r.width,r.height)},s.tintWithOverlay=function(t,e,i){var n=i.getContext("2d"),s=t.baseTexture.resolution,r=t.crop.clone();r.x*=s,r.y*=s,r.width*=s,r.height*=s,i.width=r.width,i.height=r.height,n.globalCompositeOperation="copy",n.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),n.fillRect(0,0,r.width,r.height),n.globalCompositeOperation="destination-atop",n.drawImage(t.baseTexture.source,r.x,r.y,r.width,r.height,0,0,r.width,r.height)},s.tintWithPerPixel=function(t,e,i){var s=i.getContext("2d"),r=t.baseTexture.resolution,o=t.crop.clone();o.x*=r,o.y*=r,o.width*=r,o.height*=r,i.width=o.width,i.height=o.height,s.globalCompositeOperation="copy",s.drawImage(t.baseTexture.source,o.x,o.y,o.width,o.height,0,0,o.width,o.height);for(var a=n.hex2rgb(e),l=a[0],u=a[1],p=a[2],h=s.getImageData(0,0,o.width,o.height),d=h.data,c=0;c{var n=i(6820),s=i(3779),r=i(9240),o=i(5468),a=i(4598),l=i(5396),u=i(7955),p=i(1830),h=i(1438),d=i(501),c=i(6192);function _(t,e,i){i=i||{},n.call(this,"WebGL",t,e,i),this.type=c.RENDERER_TYPE.WEBGL,this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this),this.view.addEventListener("webglcontextlost",this.handleContextLost,!1),this.view.addEventListener("webglcontextrestored",this.handleContextRestored,!1),this._useFXAA=!!i.forceFXAA&&i.antialias,this._FXAAFilter=null,this._contextOptions={alpha:this.transparent,antialias:i.antialias,premultipliedAlpha:this.transparent&&"notMultiplied"!==this.transparent,stencil:!0,preserveDrawingBuffer:i.preserveDrawingBuffer},this.drawCount=0,this.shaderManager=new s(this),this.maskManager=new r(this),this.stencilManager=new o(this),this.filterManager=new a(this),this.blendModeManager=new l(this),this.currentRenderTarget=null,this.currentRenderer=new p(this),this.initPlugins(),this._createContext(),this._initContext(),this._mapGlModes(),this._renderTargetStack=[]}_.prototype=Object.create(n.prototype),_.prototype.constructor=_,t.exports=_,d.pluginTarget.mixin(_),_.glContextId=0,_.prototype._createContext=function(){var t=this.view.getContext("webgl",this._contextOptions)||this.view.getContext("experimental-webgl",this._contextOptions);if(this.gl=t,!t)throw new Error("This browser does not support webGL. Try using the canvas renderer");this.glContextId=_.glContextId++,t.id=this.glContextId,t.renderer=this},_.prototype._initContext=function(){var t=this.gl;t.disable(t.DEPTH_TEST),t.disable(t.CULL_FACE),t.enable(t.BLEND),this.renderTarget=new u(t,this.width,this.height,null,this.resolution,!0),this.setRenderTarget(this.renderTarget),this.emit("context",t),this.resize(this.width,this.height),this._useFXAA||(this._useFXAA=this._contextOptions.antialias&&!t.getContextAttributes().antialias),this._useFXAA&&(window.console.warn("FXAA antialiasing being used instead of native antialiasing"),this._FXAAFilter=[new h])},_.prototype.render=function(t){if(!this.gl.isContextLost()){this.drawCount=0,this._lastObjectRendered=t,this._useFXAA&&(this._FXAAFilter[0].uniforms.resolution.value.x=this.width,this._FXAAFilter[0].uniforms.resolution.value.y=this.height,t.filterArea=this.renderTarget.size,t.filters=this._FXAAFilter);var e=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=e;var i=this.gl;this.setRenderTarget(this.renderTarget),this.clearBeforeRender&&(this.transparent?i.clearColor(0,0,0,0):i.clearColor(this._backgroundColorRgb[0],this._backgroundColorRgb[1],this._backgroundColorRgb[2],1),i.clear(i.COLOR_BUFFER_BIT)),this.renderDisplayObject(t,this.renderTarget)}},_.prototype.renderDisplayObject=function(t,e,i){this.setRenderTarget(e),i&&e.clear(),this.filterManager.setFilterStack(e.filterStack),t.renderWebGL(this),this.currentRenderer.flush()},_.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},_.prototype.setRenderTarget=function(t){this.currentRenderTarget!==t&&(this.currentRenderTarget=t,this.currentRenderTarget.activate(),this.stencilManager.setMaskStack(t.stencilMaskStack))},_.prototype.resize=function(t,e){n.prototype.resize.call(this,t,e),this.filterManager.resize(t,e),this.renderTarget.resize(t,e),this.currentRenderTarget===this.renderTarget&&(this.renderTarget.activate(),this.gl.viewport(0,0,this.width,this.height))},_.prototype.updateTexture=function(t){if((t=t.baseTexture||t).hasLoaded){var e=this.gl;return t._glTextures[e.id]||(t._glTextures[e.id]=e.createTexture(),t.on("update",this.updateTexture,this),t.on("dispose",this.destroyTexture,this)),e.bindTexture(e.TEXTURE_2D,t._glTextures[e.id]),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultipliedAlpha),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.source),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t.scaleMode===c.SCALE_MODES.LINEAR?e.LINEAR:e.NEAREST),t.mipmap&&t.isPowerOfTwo?(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t.scaleMode===c.SCALE_MODES.LINEAR?e.LINEAR_MIPMAP_LINEAR:e.NEAREST_MIPMAP_NEAREST),e.generateMipmap(e.TEXTURE_2D)):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t.scaleMode===c.SCALE_MODES.LINEAR?e.LINEAR:e.NEAREST),t.isPowerOfTwo?(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT)):(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)),t._glTextures[e.id]}},_.prototype.destroyTexture=function(t){(t=t.baseTexture||t).hasLoaded&&t._glTextures[this.gl.id]&&this.gl.deleteTexture(t._glTextures[this.gl.id])},_.prototype.handleContextLost=function(t){t.preventDefault()},_.prototype.handleContextRestored=function(){for(var t in this._initContext(),d.BaseTextureCache)d.BaseTextureCache[t]._glTextures.length=0},_.prototype.destroy=function(t){for(var e in this.destroyPlugins(),this.view.removeEventListener("webglcontextlost",this.handleContextLost),this.view.removeEventListener("webglcontextrestored",this.handleContextRestored),d.BaseTextureCache){var i=d.BaseTextureCache[e];i.off("update",this.updateTexture,this),i.off("dispose",this.destroyTexture,this)}n.prototype.destroy.call(this,t),this.uid=0,this.shaderManager.destroy(),this.maskManager.destroy(),this.stencilManager.destroy(),this.filterManager.destroy(),this.blendModeManager.destroy(),this.shaderManager=null,this.maskManager=null,this.filterManager=null,this.blendModeManager=null,this.currentRenderer=null,this.handleContextLost=null,this.handleContextRestored=null,this._contextOptions=null,this.drawCount=0,this.gl.useProgram(null),this.gl=null},_.prototype._mapGlModes=function(){var t=this.gl;this.blendModes||(this.blendModes={},this.blendModes[c.BLEND_MODES.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[c.BLEND_MODES.ADD]=[t.SRC_ALPHA,t.DST_ALPHA],this.blendModes[c.BLEND_MODES.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA],this.blendModes[c.BLEND_MODES.SCREEN]=[t.SRC_ALPHA,t.ONE],this.blendModes[c.BLEND_MODES.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[c.BLEND_MODES.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[c.BLEND_MODES.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[c.BLEND_MODES.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[c.BLEND_MODES.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[c.BLEND_MODES.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[c.BLEND_MODES.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[c.BLEND_MODES.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[c.BLEND_MODES.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[c.BLEND_MODES.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[c.BLEND_MODES.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[c.BLEND_MODES.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[c.BLEND_MODES.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA]),this.drawModes||(this.drawModes={},this.drawModes[c.DRAW_MODES.POINTS]=t.POINTS,this.drawModes[c.DRAW_MODES.LINES]=t.LINES,this.drawModes[c.DRAW_MODES.LINE_LOOP]=t.LINE_LOOP,this.drawModes[c.DRAW_MODES.LINE_STRIP]=t.LINE_STRIP,this.drawModes[c.DRAW_MODES.TRIANGLES]=t.TRIANGLES,this.drawModes[c.DRAW_MODES.TRIANGLE_STRIP]=t.TRIANGLE_STRIP,this.drawModes[c.DRAW_MODES.TRIANGLE_FAN]=t.TRIANGLE_FAN)}},580:(t,e,i)=>{var n=i(8297);function s(t,e,i){this.shaders=[],this.padding=0,this.uniforms=i||{},this.vertexSrc=t||n.defaultVertexSrc,this.fragmentSrc=e||n.defaultFragmentSrc}s.prototype.constructor=s,t.exports=s,s.prototype.getShader=function(t){var e=t.gl,i=this.shaders[e.id];return i||(i=new n(t.shaderManager,this.vertexSrc,this.fragmentSrc,this.uniforms,this.attributes),this.shaders[e.id]=i),i},s.prototype.applyFilter=function(t,e,i,n){var s=this.getShader(t);t.filterManager.applyFilter(s,e,i,n)},s.prototype.syncUniform=function(t){for(var e=0,i=this.shaders.length;e{var n=i(580),s=i(7425);function r(){n.call(this,s.readFileSync("//FXAA.vert","utf8"),s.readFileSync("//FXAA.frag","utf8"),{resolution:{type:"v2",value:{x:1,y:1}}})}r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.applyFilter=function(t,e,i){var n=t.filterManager,s=this.getShader(t);n.applyFilter(s,e,i)}},5207:(t,e,i)=>{var n=i(580),s=i(4650),r=i(7425);function o(t){var e=new s.Matrix;n.call(this,r.readFileSync("//spriteMaskFilter.vert","utf8"),r.readFileSync("//spriteMaskFilter.frag","utf8"),{mask:{type:"sampler2D",value:t._texture},alpha:{type:"f",value:1},otherMatrix:{type:"mat3",value:e.toArray(!0)}}),this.maskSprite=t,this.maskMatrix=e}o.prototype=Object.create(n.prototype),o.prototype.constructor=o,t.exports=o,o.prototype.applyFilter=function(t,e,i){var n=t.filterManager;this.uniforms.mask.value=this.maskSprite._texture,n.calculateMappedMatrix(e.frame,this.maskSprite,this.maskMatrix),this.uniforms.otherMatrix.value=this.maskMatrix.toArray(!0),this.uniforms.alpha.value=this.maskSprite.worldAlpha;var s=this.getShader(t);n.applyFilter(s,e,i)},Object.defineProperties(o.prototype,{map:{get:function(){return this.uniforms.mask.value},set:function(t){this.uniforms.mask.value=t}},offset:{get:function(){return this.uniforms.offset.value},set:function(t){this.uniforms.offset.value=t}}})},5396:(t,e,i)=>{var n=i(1103);function s(t){n.call(this,t),this.currentBlendMode=99999}s.prototype=Object.create(n.prototype),s.prototype.constructor=s,t.exports=s,s.prototype.setBlendMode=function(t){if(this.currentBlendMode===t)return!1;this.currentBlendMode=t;var e=this.renderer.blendModes[this.currentBlendMode];return this.renderer.gl.blendFunc(e[0],e[1]),!0}},4598:(t,e,i)=>{var n=i(1103),s=i(7955),r=i(6192),o=i(3885),a=i(4650);function l(t){n.call(this,t),this.filterStack=[],this.filterStack.push({renderTarget:t.currentRenderTarget,filter:[],bounds:null}),this.texturePool=[],this.textureSize=new a.Rectangle(0,0,t.width,t.height),this.currentFrame=null}l.prototype=Object.create(n.prototype),l.prototype.constructor=l,t.exports=l,l.prototype.onContextChange=function(){this.texturePool.length=0;var t=this.renderer.gl;this.quad=new o(t)},l.prototype.setFilterStack=function(t){this.filterStack=t},l.prototype.pushFilter=function(t,e){var i=t.filterArea?t.filterArea.clone():t.getBounds();i.x=0|i.x,i.y=0|i.y,i.width=0|i.width,i.height=0|i.height;var n=0|e[0].padding;if(i.x-=n,i.y-=n,i.width+=2*n,i.height+=2*n,this.renderer.currentRenderTarget.transform){var s=this.renderer.currentRenderTarget.transform;i.x+=s.tx,i.y+=s.ty,this.capFilterArea(i),i.x-=s.tx,i.y-=s.ty}else this.capFilterArea(i);if(i.width>0&&i.height>0){this.currentFrame=i;var r=this.getRenderTarget();this.renderer.setRenderTarget(r),r.clear(),this.filterStack.push({renderTarget:r,filter:e})}else this.filterStack.push({renderTarget:null,filter:e})},l.prototype.popFilter=function(){var t=this.filterStack.pop(),e=this.filterStack[this.filterStack.length-1],i=t.renderTarget;if(t.renderTarget){var n=e.renderTarget,s=this.renderer.gl;this.currentFrame=i.frame,this.quad.map(this.textureSize,i.frame),s.bindBuffer(s.ARRAY_BUFFER,this.quad.vertexBuffer),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,this.quad.indexBuffer);var o=t.filter;if(s.vertexAttribPointer(this.renderer.shaderManager.defaultShader.attributes.aVertexPosition,2,s.FLOAT,!1,0,0),s.vertexAttribPointer(this.renderer.shaderManager.defaultShader.attributes.aTextureCoord,2,s.FLOAT,!1,0,32),s.vertexAttribPointer(this.renderer.shaderManager.defaultShader.attributes.aColor,4,s.FLOAT,!1,0,64),this.renderer.blendModeManager.setBlendMode(r.BLEND_MODES.NORMAL),1===o.length)o[0].uniforms.dimensions&&(o[0].uniforms.dimensions.value[0]=this.renderer.width,o[0].uniforms.dimensions.value[1]=this.renderer.height,o[0].uniforms.dimensions.value[2]=this.quad.vertices[0],o[0].uniforms.dimensions.value[3]=this.quad.vertices[5]),o[0].applyFilter(this.renderer,i,n),this.returnRenderTarget(i);else{for(var a=i,l=this.getRenderTarget(!0),u=0;uthis.textureSize.width&&(t.width=this.textureSize.width-t.x),t.y+t.height>this.textureSize.height&&(t.height=this.textureSize.height-t.y)},l.prototype.resize=function(t,e){this.textureSize.width=t,this.textureSize.height=e;for(var i=0;i{var n=i(1103),s=i(5207);function r(t){n.call(this,t),this.stencilStack=[],this.reverse=!0,this.count=0,this.alphaMaskPool=[]}r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.pushMask=function(t,e){e.texture?this.pushSpriteMask(t,e):this.pushStencilMask(t,e)},r.prototype.popMask=function(t,e){e.texture?this.popSpriteMask(t,e):this.popStencilMask(t,e)},r.prototype.pushSpriteMask=function(t,e){var i=this.alphaMaskPool.pop();i||(i=[new s(e)]),i[0].maskSprite=e,this.renderer.filterManager.pushFilter(t,i)},r.prototype.popSpriteMask=function(){var t=this.renderer.filterManager.popFilter();this.alphaMaskPool.push(t)},r.prototype.pushStencilMask=function(t,e){this.renderer.stencilManager.pushMask(e)},r.prototype.popStencilMask=function(t,e){this.renderer.stencilManager.popMask(e)}},3779:(t,e,i)=>{var n=i(1103),s=i(8297),r=i(7151),o=i(9691),a=i(501);function l(t){n.call(this,t),this.maxAttibs=10,this.attribState=[],this.tempAttribState=[];for(var e=0;e{var n=i(1103),s=i(501);function r(t){n.call(this,t),this.stencilMaskStack=null}r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.setMaskStack=function(t){this.stencilMaskStack=t;var e=this.renderer.gl;0===t.stencilStack.length?e.disable(e.STENCIL_TEST):e.enable(e.STENCIL_TEST)},r.prototype.pushStencil=function(t,e){this.renderer.currentRenderTarget.attachStencilBuffer();var i=this.renderer.gl,n=this.stencilMaskStack;this.bindGraphics(t,e),0===n.stencilStack.length&&(i.enable(i.STENCIL_TEST),i.clear(i.STENCIL_BUFFER_BIT),n.reverse=!0,n.count=0),n.stencilStack.push(e);var s=n.count;i.colorMask(!1,!1,!1,!1),i.stencilFunc(i.ALWAYS,0,255),i.stencilOp(i.KEEP,i.KEEP,i.INVERT),1===e.mode?(i.drawElements(i.TRIANGLE_FAN,e.indices.length-4,i.UNSIGNED_SHORT,0),n.reverse?(i.stencilFunc(i.EQUAL,255-s,255),i.stencilOp(i.KEEP,i.KEEP,i.DECR)):(i.stencilFunc(i.EQUAL,s,255),i.stencilOp(i.KEEP,i.KEEP,i.INCR)),i.drawElements(i.TRIANGLE_FAN,4,i.UNSIGNED_SHORT,2*(e.indices.length-4)),n.reverse?i.stencilFunc(i.EQUAL,255-(s+1),255):i.stencilFunc(i.EQUAL,s+1,255),n.reverse=!n.reverse):(n.reverse?(i.stencilFunc(i.EQUAL,s,255),i.stencilOp(i.KEEP,i.KEEP,i.INCR)):(i.stencilFunc(i.EQUAL,255-s,255),i.stencilOp(i.KEEP,i.KEEP,i.DECR)),i.drawElements(i.TRIANGLE_STRIP,e.indices.length,i.UNSIGNED_SHORT,0),n.reverse?i.stencilFunc(i.EQUAL,s+1,255):i.stencilFunc(i.EQUAL,255-(s+1),255)),i.colorMask(!0,!0,!0,!0),i.stencilOp(i.KEEP,i.KEEP,i.KEEP),n.count++},r.prototype.bindGraphics=function(t,e){var i,n=this.renderer.gl;1===e.mode?(i=this.renderer.shaderManager.complexPrimitiveShader,this.renderer.shaderManager.setShader(i),n.uniformMatrix3fv(i.uniforms.translationMatrix._location,!1,t.worldTransform.toArray(!0)),n.uniformMatrix3fv(i.uniforms.projectionMatrix._location,!1,this.renderer.currentRenderTarget.projectionMatrix.toArray(!0)),n.uniform3fv(i.uniforms.tint._location,s.hex2rgb(t.tint)),n.uniform3fv(i.uniforms.color._location,e.color),n.uniform1f(i.uniforms.alpha._location,t.worldAlpha),n.bindBuffer(n.ARRAY_BUFFER,e.buffer),n.vertexAttribPointer(i.attributes.aVertexPosition,2,n.FLOAT,!1,8,0),n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.indexBuffer)):(i=this.renderer.shaderManager.primitiveShader,this.renderer.shaderManager.setShader(i),n.uniformMatrix3fv(i.uniforms.translationMatrix._location,!1,t.worldTransform.toArray(!0)),n.uniformMatrix3fv(i.uniforms.projectionMatrix._location,!1,this.renderer.currentRenderTarget.projectionMatrix.toArray(!0)),n.uniform3fv(i.uniforms.tint._location,s.hex2rgb(t.tint)),n.uniform1f(i.uniforms.alpha._location,t.worldAlpha),n.bindBuffer(n.ARRAY_BUFFER,e.buffer),n.vertexAttribPointer(i.attributes.aVertexPosition,2,n.FLOAT,!1,24,0),n.vertexAttribPointer(i.attributes.aColor,4,n.FLOAT,!1,24,8),n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.indexBuffer))},r.prototype.popStencil=function(t,e){var i=this.renderer.gl,n=this.stencilMaskStack;if(n.stencilStack.pop(),n.count--,0===n.stencilStack.length)i.disable(i.STENCIL_TEST);else{var s=n.count;this.bindGraphics(t,e),i.colorMask(!1,!1,!1,!1),1===e.mode?(n.reverse=!n.reverse,n.reverse?(i.stencilFunc(i.EQUAL,255-(s+1),255),i.stencilOp(i.KEEP,i.KEEP,i.INCR)):(i.stencilFunc(i.EQUAL,s+1,255),i.stencilOp(i.KEEP,i.KEEP,i.DECR)),i.drawElements(i.TRIANGLE_FAN,4,i.UNSIGNED_SHORT,2*(e.indices.length-4)),i.stencilFunc(i.ALWAYS,0,255),i.stencilOp(i.KEEP,i.KEEP,i.INVERT),i.drawElements(i.TRIANGLE_FAN,e.indices.length-4,i.UNSIGNED_SHORT,0),this.renderer.drawCount+=2,n.reverse?i.stencilFunc(i.EQUAL,s,255):i.stencilFunc(i.EQUAL,255-s,255)):(n.reverse?(i.stencilFunc(i.EQUAL,s+1,255),i.stencilOp(i.KEEP,i.KEEP,i.DECR)):(i.stencilFunc(i.EQUAL,255-(s+1),255),i.stencilOp(i.KEEP,i.KEEP,i.INCR)),i.drawElements(i.TRIANGLE_STRIP,e.indices.length,i.UNSIGNED_SHORT,0),this.renderer.drawCount++,n.reverse?i.stencilFunc(i.EQUAL,s,255):i.stencilFunc(i.EQUAL,255-s,255)),i.colorMask(!0,!0,!0,!0),i.stencilOp(i.KEEP,i.KEEP,i.KEEP)}},r.prototype.destroy=function(){n.prototype.destroy.call(this),this.stencilMaskStack.stencilStack=null},r.prototype.pushMask=function(t){this.renderer.setObjectRenderer(this.renderer.plugins.graphics),t.dirty&&this.renderer.plugins.graphics.updateGraphics(t,this.renderer.gl),t._webGL[this.renderer.gl.id].data.length&&this.pushStencil(t,t._webGL[this.renderer.gl.id].data[0])},r.prototype.popMask=function(t){this.renderer.setObjectRenderer(this.renderer.plugins.graphics),this.popStencil(t,t._webGL[this.renderer.gl.id].data[0])}},1103:t=>{function e(t){this.renderer=t,this.renderer.on("context",this.onContextChange,this)}e.prototype.constructor=e,t.exports=e,e.prototype.onContextChange=function(){},e.prototype.destroy=function(){this.renderer.off("context",this.onContextChange,this),this.renderer=null}},7151:(t,e,i)=>{var n=i(8306);function s(t){n.call(this,t,["attribute vec2 aVertexPosition;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform vec3 tint;","uniform float alpha;","uniform vec3 color;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vColor = vec4(color * alpha * tint, alpha);","}"].join("\n"),["precision mediump float;","varying vec4 vColor;","void main(void){"," gl_FragColor = vColor;","}"].join("\n"),{tint:{type:"3f",value:[0,0,0]},alpha:{type:"1f",value:0},color:{type:"3f",value:[0,0,0]},translationMatrix:{type:"mat3",value:new Float32Array(9)},projectionMatrix:{type:"mat3",value:new Float32Array(9)}},{aVertexPosition:0})}s.prototype=Object.create(n.prototype),s.prototype.constructor=s,t.exports=s},9691:(t,e,i)=>{var n=i(8306);function s(t){n.call(this,t,["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform float alpha;","uniform float flipY;","uniform vec3 tint;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vColor = aColor * vec4(tint * alpha, alpha);","}"].join("\n"),["precision mediump float;","varying vec4 vColor;","void main(void){"," gl_FragColor = vColor;","}"].join("\n"),{tint:{type:"3f",value:[0,0,0]},alpha:{type:"1f",value:0},translationMatrix:{type:"mat3",value:new Float32Array(9)},projectionMatrix:{type:"mat3",value:new Float32Array(9)}},{aVertexPosition:0,aColor:0})}s.prototype=Object.create(n.prototype),s.prototype.constructor=s,t.exports=s},8306:(t,e,i)=>{var n=i(501);function s(t,e,i,s,r){if(!e||!i)throw new Error("Pixi.js Error. Shader requires vertexSrc and fragmentSrc");this.uid=n.uid(),this.gl=t.renderer.gl,this.shaderManager=t,this.program=null,this.uniforms=s||{},this.attributes=r||{},this.textureCount=1,this.vertexSrc=e,this.fragmentSrc=i,this.init()}s.prototype.constructor=s,t.exports=s,s.prototype.init=function(){this.compile(),this.gl.useProgram(this.program),this.cacheUniformLocations(Object.keys(this.uniforms)),this.cacheAttributeLocations(Object.keys(this.attributes))},s.prototype.cacheUniformLocations=function(t){for(var e=0;e{var n=i(8306);function s(t,e,i,r,o){var a={uSampler:{type:"sampler2D",value:0},projectionMatrix:{type:"mat3",value:new Float32Array([1,0,0,0,1,0,0,0,1])}};if(r)for(var l in r)a[l]=r[l];var u={aVertexPosition:0,aTextureCoord:0,aColor:0};if(o)for(var p in o)u[p]=o[p];e=e||s.defaultVertexSrc,i=i||s.defaultFragmentSrc,n.call(this,t,e,i,a,u)}s.prototype=Object.create(n.prototype),s.prototype.constructor=s,t.exports=s,s.defaultVertexSrc=["precision lowp float;","attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute vec4 aColor;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;"," vColor = vec4(aColor.rgb * aColor.a, aColor.a);","}"].join("\n"),s.defaultFragmentSrc=["precision lowp float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D uSampler;","void main(void){"," gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor ;","}"].join("\n")},1830:(t,e,i)=>{var n=i(1103);function s(t){n.call(this,t)}s.prototype=Object.create(n.prototype),s.prototype.constructor=s,t.exports=s,s.prototype.start=function(){},s.prototype.stop=function(){this.flush()},s.prototype.flush=function(){},s.prototype.render=function(t){}},3885:t=>{function e(t){this.gl=t,this.vertices=new Float32Array([0,0,200,0,200,200,0,200]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.colors=new Float32Array([1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.indices=new Uint16Array([0,1,2,0,3,2]),this.vertexBuffer=t.createBuffer(),this.indexBuffer=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this.vertexBuffer),t.bufferData(t.ARRAY_BUFFER,128,t.DYNAMIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices,t.STATIC_DRAW),this.upload()}e.prototype.constructor=e,e.prototype.map=function(t,e){var i=0,n=0;this.uvs[0]=i,this.uvs[1]=n,this.uvs[2]=i+e.width/t.width,this.uvs[3]=n,this.uvs[4]=i+e.width/t.width,this.uvs[5]=n+e.height/t.height,this.uvs[6]=i,this.uvs[7]=n+e.height/t.height,i=e.x,n=e.y,this.vertices[0]=i,this.vertices[1]=n,this.vertices[2]=i+e.width,this.vertices[3]=n,this.vertices[4]=i+e.width,this.vertices[5]=n+e.height,this.vertices[6]=i,this.vertices[7]=n+e.height,this.upload()},e.prototype.upload=function(){var t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,this.vertexBuffer),t.bufferSubData(t.ARRAY_BUFFER,0,this.vertices),t.bufferSubData(t.ARRAY_BUFFER,32,this.uvs),t.bufferSubData(t.ARRAY_BUFFER,64,this.colors)},e.prototype.destroy=function(){var t=this.gl;t.deleteBuffer(this.vertexBuffer),t.deleteBuffer(this.indexBuffer)},t.exports=e},7955:(t,e,i)=>{var n=i(4650),s=i(501),r=i(6192),o=i(8614),a=function(t,e,i,a,l,u){(this.gl=t,this.frameBuffer=null,this.texture=null,this.size=new n.Rectangle(0,0,1,1),this.resolution=l||r.RESOLUTION,this.projectionMatrix=new n.Matrix,this.transform=null,this.frame=null,this.stencilBuffer=null,this.stencilMaskStack=new o,this.filterStack=[{renderTarget:this,filter:[],bounds:this.size}],this.scaleMode=a||r.SCALE_MODES.DEFAULT,this.root=u,this.root)||(this.frameBuffer=t.createFramebuffer(),this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,a===r.SCALE_MODES.LINEAR?t.LINEAR:t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,a===r.SCALE_MODES.LINEAR?t.LINEAR:t.NEAREST),s.isPowerOfTwo(e,i)?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT)):(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)),t.bindFramebuffer(t.FRAMEBUFFER,this.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.texture,0));this.resize(e,i)};a.prototype.constructor=a,t.exports=a,a.prototype.clear=function(t){var e=this.gl;t&&e.bindFramebuffer(e.FRAMEBUFFER,this.frameBuffer),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)},a.prototype.attachStencilBuffer=function(){if(!this.stencilBuffer&&!this.root){var t=this.gl;this.stencilBuffer=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.stencilBuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,this.stencilBuffer),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.size.width*this.resolution,this.size.height*this.resolution)}},a.prototype.activate=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.frameBuffer);var e=this.frame||this.size;this.calculateProjection(e),this.transform&&this.projectionMatrix.append(this.transform),t.viewport(0,0,e.width*this.resolution,e.height*this.resolution)},a.prototype.calculateProjection=function(t){var e=this.projectionMatrix;e.identity(),this.root?(e.a=1/t.width*2,e.d=-1/t.height*2,e.tx=-1-t.x*e.a,e.ty=1-t.y*e.d):(e.a=1/t.width*2,e.d=1/t.height*2,e.tx=-1-t.x*e.a,e.ty=-1-t.y*e.d)},a.prototype.resize=function(t,e){if(t|=0,e|=0,this.size.width!==t||this.size.height!==e){if(this.size.width=t,this.size.height=e,!this.root){var i=this.gl;i.bindTexture(i.TEXTURE_2D,this.texture),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,t*this.resolution,e*this.resolution,0,i.RGBA,i.UNSIGNED_BYTE,null),this.stencilBuffer&&(i.bindRenderbuffer(i.RENDERBUFFER,this.stencilBuffer),i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,t*this.resolution,e*this.resolution))}var n=this.frame||this.size;this.calculateProjection(n)}},a.prototype.destroy=function(){var t=this.gl;t.deleteRenderbuffer(this.stencilBuffer),t.deleteFramebuffer(this.frameBuffer),t.deleteTexture(this.texture),this.frameBuffer=null,this.texture=null}},8614:t=>{function e(){this.stencilStack=[],this.reverse=!0,this.count=0}e.prototype.constructor=e,t.exports=e},2861:(t,e,i)=>{var n=i(4650),s=i(2699),r=i(7673),o=i(7809),a=i(501),l=i(6192),u=new n.Point;function p(t){r.call(this),this.anchor=new n.Point,this._texture=null,this._width=0,this._height=0,this.tint=16777215,this.blendMode=l.BLEND_MODES.NORMAL,this.shader=null,this.cachedTint=16777215,this.texture=t||s.EMPTY}p.prototype=Object.create(r.prototype),p.prototype.constructor=p,t.exports=p,Object.defineProperties(p.prototype,{width:{get:function(){return Math.abs(this.scale.x)*this.texture._frame.width},set:function(t){this.scale.x=a.sign(this.scale.x)*t/this.texture._frame.width,this._width=t}},height:{get:function(){return Math.abs(this.scale.y)*this.texture._frame.height},set:function(t){this.scale.y=a.sign(this.scale.y)*t/this.texture._frame.height,this._height=t}},texture:{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,this.cachedTint=16777215,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}}),p.prototype._onTextureUpdate=function(){this._width&&(this.scale.x=a.sign(this.scale.x)*this._width/this.texture.frame.width),this._height&&(this.scale.y=a.sign(this.scale.y)*this._height/this.texture.frame.height)},p.prototype._renderWebGL=function(t){t.setObjectRenderer(t.plugins.sprite),t.plugins.sprite.render(this)},p.prototype.getBounds=function(t){if(!this._currentBounds){var e,i,n,s,r=this._texture._frame.width,o=this._texture._frame.height,a=r*(1-this.anchor.x),l=r*-this.anchor.x,u=o*(1-this.anchor.y),p=o*-this.anchor.y,h=t||this.worldTransform,d=h.a,c=h.b,_=h.c,f=h.d,T=h.tx,m=h.ty;if(0===c&&0===_)d<0&&(d*=-1),f<0&&(f*=-1),e=d*l+T,i=d*a+T,n=f*p+m,s=f*u+m;else{var g=d*l+_*p+T,I=f*p+c*l+m,E=d*a+_*p+T,O=f*p+c*a+m,M=d*a+_*u+T,R=f*u+c*a+m,A=d*l+_*u+T,y=f*u+c*l+m;e=A<(e=M<(e=E<(e=g)?E:e)?M:e)?A:e,n=y<(n=R<(n=O<(n=I)?O:n)?R:n)?y:n,i=A>(i=M>(i=E>(i=g)?E:i)?M:i)?A:i,s=y>(s=R>(s=O>(s=I)?O:s)?R:s)?y:s}if(this.children.length){var S=this.containerGetBounds();a=S.x,l=S.x+S.width,e=el?i:l,s=s>(p=S.y+S.height)?s:p}var v=this._bounds;v.x=e,v.width=i-e,v.y=n,v.height=s-n,this._currentBounds=v}return this._currentBounds},p.prototype.getLocalBounds=function(){return this._bounds.x=-this._texture._frame.width*this.anchor.x,this._bounds.y=-this._texture._frame.height*this.anchor.y,this._bounds.width=this._texture._frame.width,this._bounds.height=this._texture._frame.height,this._bounds},p.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,u);var e,i=this._texture._frame.width,n=this._texture._frame.height,s=-i*this.anchor.x;return u.x>s&&u.xe&&u.y{var n=i(1830),s=i(5092),r=i(6192);function o(t){n.call(this,t),this.vertSize=5,this.vertByteSize=4*this.vertSize,this.size=r.SPRITE_BATCH_SIZE;var e=4*this.size*this.vertByteSize,i=6*this.size;this.vertices=new ArrayBuffer(e),this.positions=new Float32Array(this.vertices),this.colors=new Uint32Array(this.vertices),this.indices=new Uint16Array(i);for(var s=0,o=0;s=this.size&&this.flush();var i=e._uvs;if(i){var n,s,r,o,a=t.anchor.x,l=t.anchor.y;if(e.trim&&void 0===t.tileScale){var u=e.trim;n=(s=u.x-a*u.width)+e.crop.width,r=(o=u.y-l*u.height)+e.crop.height}else n=e._frame.width*(1-a),s=e._frame.width*-a,r=e._frame.height*(1-l),o=e._frame.height*-l;var p=this.currentBatchSize*this.vertByteSize,h=t.worldTransform,d=h.a,c=h.b,_=h.c,f=h.d,T=h.tx,m=h.ty,g=this.colors,I=this.positions;this.renderer.roundPixels?(I[p]=d*s+_*o+T|0,I[p+1]=f*o+c*s+m|0,I[p+5]=d*n+_*o+T|0,I[p+6]=f*o+c*n+m|0,I[p+10]=d*n+_*r+T|0,I[p+11]=f*r+c*n+m|0,I[p+15]=d*s+_*r+T|0,I[p+16]=f*r+c*s+m|0):(I[p]=d*s+_*o+T,I[p+1]=f*o+c*s+m,I[p+5]=d*n+_*o+T,I[p+6]=f*o+c*n+m,I[p+10]=d*n+_*r+T,I[p+11]=f*r+c*n+m,I[p+15]=d*s+_*r+T,I[p+16]=f*r+c*s+m),I[p+2]=i.x0,I[p+3]=i.y0,I[p+7]=i.x1,I[p+8]=i.y1,I[p+12]=i.x2,I[p+13]=i.y2,I[p+17]=i.x3,I[p+18]=i.y3;var E=t.tint;g[p+4]=g[p+9]=g[p+14]=g[p+19]=(E>>16)+(65280&E)+((255&E)<<16)+(255*t.worldAlpha<<24),this.sprites[this.currentBatchSize++]=t}},o.prototype.flush=function(){if(0!==this.currentBatchSize){var t,e,i,n,s=this.renderer.gl;if(this.currentBatchSize>.5*this.size)s.bufferSubData(s.ARRAY_BUFFER,0,this.vertices);else{var r=this.positions.subarray(0,this.currentBatchSize*this.vertByteSize);s.bufferSubData(s.ARRAY_BUFFER,0,r)}for(var o,a=0,l=0,u=null,p=this.renderer.blendModeManager.currentBlendMode,h=null,d=!1,c=!1,_=0,f=this.currentBatchSize;_{var n=i(2861),s=i(2699),r=i(4650),o=i(501),a=i(6192);function l(t,e,i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=i||a.RESOLUTION,this._text=null,this._style=null;var o=s.fromCanvas(this.canvas);o.trim=new r.Rectangle,n.call(this,o),this.text=t,this.style=e}l.prototype=Object.create(n.prototype),l.prototype.constructor=l,t.exports=l,l.fontPropertiesCache={},l.fontPropertiesCanvas=document.createElement("canvas"),l.fontPropertiesContext=l.fontPropertiesCanvas.getContext("2d"),Object.defineProperties(l.prototype,{width:{get:function(){return this.dirty&&this.updateText(),this.scale.x*this._texture._frame.width},set:function(t){this.scale.x=t/this._texture._frame.width,this._width=t}},height:{get:function(){return this.dirty&&this.updateText(),this.scale.y*this._texture._frame.height},set:function(t){this.scale.y=t/this._texture._frame.height,this._height=t}},style:{get:function(){return this._style},set:function(t){"number"==typeof(t=t||{}).fill&&(t.fill=o.hex2string(t.fill)),"number"==typeof t.stroke&&(t.stroke=o.hex2string(t.stroke)),"number"==typeof t.dropShadowColor&&(t.dropShadowColor=o.hex2string(t.dropShadowColor)),t.font=t.font||"bold 20pt Arial",t.fill=t.fill||"black",t.align=t.align||"left",t.stroke=t.stroke||"black",t.strokeThickness=t.strokeThickness||0,t.wordWrap=t.wordWrap||!1,t.wordWrapWidth=t.wordWrapWidth||100,t.dropShadow=t.dropShadow||!1,t.dropShadowColor=t.dropShadowColor||"#000000",t.dropShadowAngle=t.dropShadowAngle||Math.PI/6,t.dropShadowDistance=t.dropShadowDistance||5,t.padding=t.padding||0,t.textBaseline=t.textBaseline||"alphabetic",t.lineJoin=t.lineJoin||"miter",t.miterLimit=t.miterLimit||10,this._style=t,this.dirty=!0}},text:{get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}}}),l.prototype.updateText=function(){var t=this._style;this.context.font=t.font;for(var e=(t.wordWrap?this.wordWrap(this._text):this._text).split(/(?:\r\n|\r|\n)/),i=new Array(e.length),n=0,s=this.determineFontProperties(t.font),r=0;rr;a--){for(u=0;ur?(a>0&&(e+="\n"),e+=o[a],r=n-l):(r-=u,e+=" "+o[a])}s{var n=i(501),s=i(6192),r=i(5585);function o(t,e,i){r.call(this),this.uid=n.uid(),this.resolution=i||1,this.width=100,this.height=100,this.realWidth=100,this.realHeight=100,this.scaleMode=e||s.SCALE_MODES.DEFAULT,this.hasLoaded=!1,this.isLoading=!1,this.source=null,this.premultipliedAlpha=!0,this.imageUrl=null,this.isPowerOfTwo=!1,this.mipmap=!1,this._glTextures=[],t&&this.loadSource(t)}o.prototype=Object.create(r.prototype),o.prototype.constructor=o,t.exports=o,o.prototype.update=function(){this.realWidth=this.source.naturalWidth||this.source.width,this.realHeight=this.source.naturalHeight||this.source.height,this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=n.isPowerOfTwo(this.realWidth,this.realHeight),this.emit("update",this)},o.prototype.loadSource=function(t){var e=this.isLoading;if(this.hasLoaded=!1,this.isLoading=!1,e&&this.source&&(this.source.onload=null,this.source.onerror=null),this.source=t,(this.source.complete||this.source.getContext)&&this.source.width&&this.source.height)this._sourceLoaded();else if(!t.getContext){this.isLoading=!0;var i=this;t.onload=function(){t.onload=null,t.onerror=null,i.isLoading&&(i.isLoading=!1,i._sourceLoaded(),i.emit("loaded",i))},t.onerror=function(){t.onload=null,t.onerror=null,i.isLoading&&(i.isLoading=!1,i.emit("error",i))},t.complete&&t.src&&(this.isLoading=!1,t.onload=null,t.onerror=null,t.width&&t.height?(this._sourceLoaded(),e&&this.emit("loaded",this)):e&&this.emit("error",this))}},o.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()},o.prototype.destroy=function(){this.imageUrl?(delete n.BaseTextureCache[this.imageUrl],delete n.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")):this.source&&this.source._pixiId&&delete n.BaseTextureCache[this.source._pixiId],this.source=null,this.dispose()},o.prototype.dispose=function(){this.emit("dispose",this),this._glTextures.length=0},o.prototype.updateSourceImage=function(t){this.source.src=t,this.loadSource(this.source)},o.fromImage=function(t,e,i){var s=n.BaseTextureCache[t];if(void 0===e&&0!==t.indexOf("data:")&&(e=!0),!s){var r=new Image;e&&(r.crossOrigin=""),(s=new o(r,i)).imageUrl=t,r.src=t,n.BaseTextureCache[t]=s,s.resolution=n.getResolutionOfUrl(t)}return s},o.fromCanvas=function(t,e){t._pixiId||(t._pixiId="canvas_"+n.uid());var i=n.BaseTextureCache[t._pixiId];return i||(i=new o(t,e),n.BaseTextureCache[t._pixiId]=i),i}},7443:(t,e,i)=>{var n=i(1936),s=i(2699),r=i(7955),o=i(4598),a=i(1549),l=i(4650),u=i(6192),p=new l.Matrix;function h(t,e,i,p,h){if(!t)throw new Error("Unable to create RenderTexture, you must pass a renderer into the constructor.");e=e||100,i=i||100,h=h||u.RESOLUTION;var d=new n;if(d.width=e,d.height=i,d.resolution=h,d.scaleMode=p||u.SCALE_MODES.DEFAULT,d.hasLoaded=!0,s.call(this,d,new l.Rectangle(0,0,e,i)),this.width=e,this.height=i,this.resolution=h,this.render=null,this.renderer=t,this.renderer.type===u.RENDERER_TYPE.WEBGL){var c=this.renderer.gl;this.textureBuffer=new r(c,this.width,this.height,d.scaleMode,this.resolution),this.baseTexture._glTextures[c.id]=this.textureBuffer.texture,this.filterManager=new o(this.renderer),this.filterManager.onContextChange(),this.filterManager.resize(e,i),this.render=this.renderWebGL,this.renderer.currentRenderer.start(),this.renderer.currentRenderTarget.activate()}else this.render=this.renderCanvas,this.textureBuffer=new a(this.width*this.resolution,this.height*this.resolution),this.baseTexture.source=this.textureBuffer.canvas;this.valid=!0,this._updateUvs()}h.prototype=Object.create(s.prototype),h.prototype.constructor=h,t.exports=h,h.prototype.resize=function(t,e,i){t===this.width&&e===this.height||(this.valid=t>0&&e>0,this.width=this._frame.width=this.crop.width=t,this.height=this._frame.height=this.crop.height=e,i&&(this.baseTexture.width=this.width,this.baseTexture.height=this.height),this.valid&&(this.textureBuffer.resize(this.width,this.height),this.filterManager&&this.filterManager.resize(this.width,this.height)))},h.prototype.clear=function(){this.valid&&(this.renderer.type===u.RENDERER_TYPE.WEBGL&&this.renderer.gl.bindFramebuffer(this.renderer.gl.FRAMEBUFFER,this.textureBuffer.frameBuffer),this.textureBuffer.clear())},h.prototype.renderWebGL=function(t,e,i,n){if(this.valid){if(n=void 0===n||n,//!updateTransform; -this.textureBuffer.transform=e,this.textureBuffer.activate(),t.worldAlpha=1,n){t.worldTransform.identity(),t.currentBounds=null;var s,r,o=t.children;for(s=0,r=o.length;s{var n=i(1936),s=i(3367),r=i(1507),o=i(5585),a=i(4650),l=i(501);function u(t,e,i,n,s){o.call(this),this.noFrame=!1,e||(this.noFrame=!0,e=new a.Rectangle(0,0,1,1)),t instanceof u&&(t=t.baseTexture),this.baseTexture=t,this._frame=e,this.trim=n,this.valid=!1,this.requiresUpdate=!1,this._uvs=null,this.width=0,this.height=0,this.crop=i||e,this.rotate=!!s,t.hasLoaded?(this.noFrame&&(e=new a.Rectangle(0,0,t.width,t.height),t.on("update",this.onBaseTextureUpdated,this)),this.frame=e):t.once("loaded",this.onBaseTextureLoaded,this)}u.prototype=Object.create(o.prototype),u.prototype.constructor=u,t.exports=u,Object.defineProperties(u.prototype,{frame:{get:function(){return this._frame},set:function(t){if(this._frame=t,this.noFrame=!1,this.width=t.width,this.height=t.height,!this.trim&&!this.rotate&&(t.x+t.width>this.baseTexture.width||t.y+t.height>this.baseTexture.height))throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this);this.valid=t&&t.width&&t.height&&this.baseTexture.hasLoaded,this.trim?(this.width=this.trim.width,this.height=this.trim.height,this._frame.width=this.trim.width,this._frame.height=this.trim.height):this.crop=t,this.valid&&this._updateUvs()}}}),u.prototype.update=function(){this.baseTexture.update()},u.prototype.onBaseTextureLoaded=function(t){this.noFrame?this.frame=new a.Rectangle(0,0,t.width,t.height):this.frame=this._frame,this.emit("update",this)},u.prototype.onBaseTextureUpdated=function(t){this._frame.width=t.width,this._frame.height=t.height,this.emit("update",this)},u.prototype.destroy=function(t){this.baseTexture&&(t&&this.baseTexture.destroy(),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture.off("loaded",this.onBaseTextureLoaded,this),this.baseTexture=null),this._frame=null,this._uvs=null,this.trim=null,this.crop=null,this.valid=!1,this.off("dispose",this.dispose,this),this.off("update",this.update,this)},u.prototype.clone=function(){return new u(this.baseTexture,this.frame,this.crop,this.trim,this.rotate)},u.prototype._updateUvs=function(){this._uvs||(this._uvs=new r),this._uvs.set(this.crop,this.baseTexture,this.rotate)},u.fromImage=function(t,e,i){var s=l.TextureCache[t];return s||(s=new u(n.fromImage(t,e,i)),l.TextureCache[t]=s),s},u.fromFrame=function(t){var e=l.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return e},u.fromCanvas=function(t,e){return new u(n.fromCanvas(t,e))},u.fromVideo=function(t,e){return"string"==typeof t?u.fromVideoUrl(t,e):new u(s.fromVideo(t,e))},u.fromVideoUrl=function(t,e){return new u(s.fromUrl(t,e))},u.addTextureToCache=function(t,e){l.TextureCache[e]=t},u.removeTextureFromCache=function(t){var e=l.TextureCache[t];return delete l.TextureCache[t],delete l.BaseTextureCache[t],e},u.EMPTY=new u(new n)},1507:t=>{function e(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1}t.exports=e,e.prototype.set=function(t,e,i){var n=e.width,s=e.height;i?(this.x0=(t.x+t.height)/n,this.y0=t.y/s,this.x1=(t.x+t.height)/n,this.y1=(t.y+t.width)/s,this.x2=t.x/n,this.y2=(t.y+t.width)/s,this.x3=t.x/n,this.y3=t.y/s):(this.x0=t.x/n,this.y0=t.y/s,this.x1=(t.x+t.width)/n,this.y1=t.y/s,this.x2=(t.x+t.width)/n,this.y2=(t.y+t.height)/s,this.x3=t.x/n,this.y3=(t.y+t.height)/s)}},3367:(t,e,i)=>{var n=i(1936),s=i(501);function r(t,e){if(!t)throw new Error("No video source element specified.");(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),n.call(this,t,e),this.autoUpdate=!1,this._onUpdate=this._onUpdate.bind(this),this._onCanPlay=this._onCanPlay.bind(this),t.complete||(t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlay),t.addEventListener("play",this._onPlayStart.bind(this)),t.addEventListener("pause",this._onPlayStop.bind(this))),this.__loaded=!1}function o(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var i=document.createElement("source");return i.src=t,i.type=e,i}r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r.prototype._onUpdate=function(){this.autoUpdate&&(window.requestAnimationFrame(this._onUpdate),this.update())},r.prototype._onPlayStart=function(){this.autoUpdate||(window.requestAnimationFrame(this._onUpdate),this.autoUpdate=!0)},r.prototype._onPlayStop=function(){this.autoUpdate=!1},r.prototype._onCanPlay=function(){this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.source.play(),this.__loaded||(this.__loaded=!0,this.emit("loaded",this)))},r.prototype.destroy=function(){this.source&&this.source._pixiId&&(delete s.BaseTextureCache[this.source._pixiId],delete this.source._pixiId),n.prototype.destroy.call(this)},r.fromVideo=function(t,e){t._pixiId||(t._pixiId="video_"+s.uid());var i=s.BaseTextureCache[t._pixiId];return i||(i=new r(t,e),s.BaseTextureCache[t._pixiId]=i),i},r.fromUrl=function(t,e){var i=document.createElement("video");if(Array.isArray(t))for(var n=0;n{var n=i(6192),s=i(5585),r="tick";function o(){var t=this;this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._emitter.listeners(r,!0)&&(t._requestId=requestAnimationFrame(t._tick)))},this._emitter=new s,this._requestId=null,this._maxElapsedMS=100,this.autoStart=!1,this.deltaTime=1,this.elapsedMS=1/n.TARGET_FPMS,this.lastTime=0,this.speed=1,this.started=!1}Object.defineProperties(o.prototype,{FPS:{get:function(){return 1e3/this.elapsedMS}},minFPS:{get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(Math.max(0,t)/1e3,n.TARGET_FPMS);this._maxElapsedMS=1/e}}}),o.prototype._requestIfNeeded=function(){null===this._requestId&&this._emitter.listeners(r,!0)&&(this.lastTime=performance.now(),this._requestId=requestAnimationFrame(this._tick))},o.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},o.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},o.prototype.add=function(t,e){return this._emitter.on(r,t,e),this._startIfPossible(),this},o.prototype.addOnce=function(t,e){return this._emitter.once(r,t,e),this._startIfPossible(),this},o.prototype.remove=function(t,e){return this._emitter.off(r,t,e),this._emitter.listeners(r,!0)||this._cancelIfNeeded(),this},o.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},o.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},o.prototype.update=function(t){var e;t=t||performance.now(),(e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*n.TARGET_FPMS*this.speed,this._emitter.emit(r,this.deltaTime),this.lastTime=t},t.exports=o},2410:(t,e,i)=>{var n=i(7974),s=new n;s.autoStart=!0,t.exports={shared:s,Ticker:n}},501:(t,e,i)=>{var n=i(6192),s=t.exports={_uid:0,_saidHello:!1,EventEmitter:i(5585),pluginTarget:i(7987),async:i(4083),uid:function(){return++s._uid},hex2rgb:function(t,e){return(e=e||[])[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},hex2string:function(t){return t=t.toString(16),"#"+(t="000000".substr(0,6-t.length)+t)},rgb2hex:function(t){return(255*t[0]<<16)+(255*t[1]<<8)+255*t[2]},canUseNewCanvasBlendModes:function(){if("undefined"==typeof document)return!1;var t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",e="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",i=new Image;i.src=t+"AP804Oa6"+e;var n=new Image;n.src=t+"/wCKxvRF"+e;var s=document.createElement("canvas");s.width=6,s.height=1;var r=s.getContext("2d");r.globalCompositeOperation="multiply",r.drawImage(i,0,0),r.drawImage(n,2,0);var o=r.getImageData(2,0,1,1).data;return 255===o[0]&&0===o[1]&&0===o[2]},getNextPowerOfTwo:function(t){if(t>0&&!(t&t-1))return t;for(var e=1;e0&&!(t&t-1)&&e>0&&!(e&e-1)},getResolutionOfUrl:function(t){var e=n.RETINA_PREFIX.exec(t);return e?parseFloat(e[1]):1},sayHello:function(t){if(!s._saidHello){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c Pixi.js "+n.VERSION+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("Pixi.js "+n.VERSION+" - "+t+" - http://www.pixijs.com/");s._saidHello=!0}},isWebGLSupported:function(){var t={stencil:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t);return!(!i||!i.getContextAttributes().stencil)}catch(t){return!1}},sign:function(t){return t?t<0?-1:1:0},TextureCache:{},BaseTextureCache:{}}},7987:t=>{t.exports={mixin:function(t){!function(t){t.__plugins={},t.registerPlugin=function(e,i){t.__plugins[e]=i},t.prototype.initPlugins=function(){for(var e in this.plugins=this.plugins||{},t.__plugins)this.plugins[e]=new t.__plugins[e](this)},t.prototype.destroyPlugins=function(){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;this.plugins=null}}(t)}}},9513:(t,e,i)=>{var n=i(4651),s=i(8653),r=i(3323),o=i(8319);n.SpriteBatch=function(){throw new ReferenceError("SpriteBatch does not exist any more, please use the new ParticleContainer instead.")},n.AssetLoader=function(){throw new ReferenceError("The loader system was overhauled in pixi v3, please see the new PIXI.loaders.Loader class.")},Object.defineProperties(n,{Stage:{get:function(){return console.warn("You do not need to use a PIXI Stage any more, you can simply render any container."),n.Container}},DisplayObjectContainer:{get:function(){return console.warn("DisplayObjectContainer has been shortened to Container, please use Container from now on."),n.Container}},Strip:{get:function(){return console.warn("The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on."),s.Mesh}},Rope:{get:function(){return console.warn("The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on."),s.Rope}},MovieClip:{get:function(){return console.warn("The MovieClip class has been moved to extras.MovieClip, please use extras.MovieClip from now on."),r.MovieClip}},TilingSprite:{get:function(){return console.warn("The TilingSprite class has been moved to extras.TilingSprite, please use extras.TilingSprite from now on."),r.TilingSprite}},BitmapText:{get:function(){return console.warn("The BitmapText class has been moved to extras.BitmapText, please use extras.BitmapText from now on."),r.BitmapText}},blendModes:{get:function(){return console.warn("The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on."),n.BLEND_MODES}},scaleModes:{get:function(){return console.warn("The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on."),n.SCALE_MODES}},BaseTextureCache:{get:function(){return console.warn("The BaseTextureCache class has been moved to utils.BaseTextureCache, please use utils.BaseTextureCache from now on."),n.utils.BaseTextureCache}},TextureCache:{get:function(){return console.warn("The TextureCache class has been moved to utils.TextureCache, please use utils.TextureCache from now on."),n.utils.TextureCache}},math:{get:function(){return console.warn("The math namespace is deprecated, please access members already accessible on PIXI."),n}}}),n.Sprite.prototype.setTexture=function(t){this.texture=t,console.warn("setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;")},r.BitmapText.prototype.setText=function(t){this.text=t,console.warn("setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';")},n.Text.prototype.setText=function(t){this.text=t,console.warn("setText is now deprecated, please use the text property, e.g : myText.text = 'my text';")},n.Text.prototype.setStyle=function(t){this.style=t,console.warn("setStyle is now deprecated, please use the style property, e.g : myText.style = style;")},n.Texture.prototype.setFrame=function(t){this.frame=t,console.warn("setFrame is now deprecated, please use the frame property, e.g : myTexture.frame = frame;")},Object.defineProperties(o,{AbstractFilter:{get:function(){return console.warn("filters.AbstractFilter is an undocumented alias, please use AbstractFilter from now on."),n.AbstractFilter}},FXAAFilter:{get:function(){return console.warn("filters.FXAAFilter is an undocumented alias, please use FXAAFilter from now on."),n.FXAAFilter}},SpriteMaskFilter:{get:function(){return console.warn("filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on."),n.SpriteMaskFilter}}}),n.utils.uuid=function(){return console.warn("utils.uuid() is deprecated, please use utils.uid() from now on."),n.utils.uid()}},3635:(t,e,i)=>{var n=i(4651);function s(t,e){n.Container.call(this),e=e||{},this.textWidth=0,this.textHeight=0,this._glyphs=[],this._font={tint:void 0!==e.tint?e.tint:16777215,align:e.align||"left",name:null,size:0},this.font=e.font,this._text=t,this.maxWidth=0,this.maxLineHeight=0,this.dirty=!1,this.updateText()}s.prototype=Object.create(n.Container.prototype),s.prototype.constructor=s,t.exports=s,Object.defineProperties(s.prototype,{tint:{get:function(){return this._font.tint},set:function(t){this._font.tint="number"==typeof t&&t>=0?t:16777215,this.dirty=!0}},align:{get:function(){return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},font:{get:function(){return this._font},set:function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):s.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)}},text:{get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}}}),s.prototype.updateText=function(){for(var t=s.fonts[this._font.name],e=new n.Point,i=null,r=[],o=0,a=0,l=[],u=0,p=this._font.size/t.size,h=-1,d=0,c=0;c0&&e.x*p>this.maxWidth)r.splice(h,c-h),c=h,h=-1,l.push(o),a=Math.max(a,o),u++,e.x=0,e.y+=t.lineHeight,i=null;else{var f=t.chars[_];f&&(i&&f.kerning[i]&&(e.x+=f.kerning[i]),r.push({texture:f.texture,line:u,charCode:_,position:new n.Point(e.x+f.xOffset,e.y+f.yOffset)}),o=e.x+(f.texture.width+f.xOffset),e.x+=f.xAdvance,d=Math.max(d,f.yOffset+f.texture.height),i=_)}}l.push(o),a=Math.max(a,o);var T=[];for(c=0;c<=u;c++){var m=0;"right"===this._font.align?m=a-l[c]:"center"===this._font.align&&(m=(a-l[c])/2),T.push(m)}var g=r.length,I=this.tint;for(c=0;c{var n=i(4651);function s(t){n.Sprite.call(this,t[0]instanceof n.Texture?t[0]:t[0].texture),this._textures=null,this._durations=null,this.textures=t,this.animationSpeed=1,this.loop=!0,this.onComplete=null,this._currentTime=0,this.playing=!1}s.prototype=Object.create(n.Sprite.prototype),s.prototype.constructor=s,t.exports=s,Object.defineProperties(s.prototype,{totalFrames:{get:function(){return this._textures.length}},textures:{get:function(){return this._textures},set:function(t){if(t[0]instanceof n.Texture)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):this._texture=this._textures[this.currentFrame]},s.prototype.destroy=function(){this.stop(),n.Sprite.prototype.destroy.call(this)},s.fromFrames=function(t){for(var e=[],i=0;i{var n=i(4651),s=new n.Point,r=i(7809);function o(t,e,i){n.Sprite.call(this,t),this.tileScale=new n.Point(1,1),this.tilePosition=new n.Point(0,0),this._width=e||100,this._height=i||100,this._uvs=new n.TextureUvs,this._canvasPattern=null,this.shader=new n.AbstractFilter(["precision lowp float;","attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute vec4 aColor;","uniform mat3 projectionMatrix;","uniform vec4 uFrame;","uniform vec4 uTransform;","varying vec2 vTextureCoord;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vec2 coord = aTextureCoord;"," coord -= uTransform.xy;"," coord /= uTransform.zw;"," vTextureCoord = coord;"," vColor = vec4(aColor.rgb * aColor.a, aColor.a);","}"].join("\n"),["precision lowp float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D uSampler;","uniform vec4 uFrame;","uniform vec2 uPixelSize;","void main(void){"," vec2 coord = mod(vTextureCoord, uFrame.zw);"," coord = clamp(coord, uPixelSize, uFrame.zw - uPixelSize);"," coord += uFrame.xy;"," gl_FragColor = texture2D(uSampler, coord) * vColor ;","}"].join("\n"),{uFrame:{type:"4fv",value:[0,0,1,1]},uTransform:{type:"4fv",value:[0,0,1,1]},uPixelSize:{type:"2fv",value:[1,1]}})}o.prototype=Object.create(n.Sprite.prototype),o.prototype.constructor=o,t.exports=o,Object.defineProperties(o.prototype,{width:{get:function(){return this._width},set:function(t){this._width=t}},height:{get:function(){return this._height},set:function(t){this._height=t}}}),o.prototype._onTextureUpdate=function(){},o.prototype._renderWebGL=function(t){var e=this._texture;if(e&&e._uvs){var i=e._uvs,n=e._frame.width,s=e._frame.height,r=e.baseTexture.width,o=e.baseTexture.height;e._uvs=this._uvs,e._frame.width=this.width,e._frame.height=this.height,this.shader.uniforms.uPixelSize.value[0]=1/r,this.shader.uniforms.uPixelSize.value[1]=1/o,this.shader.uniforms.uFrame.value[0]=i.x0,this.shader.uniforms.uFrame.value[1]=i.y0,this.shader.uniforms.uFrame.value[2]=i.x1-i.x0,this.shader.uniforms.uFrame.value[3]=i.y2-i.y0,this.shader.uniforms.uTransform.value[0]=this.tilePosition.x%(n*this.tileScale.x)/this._width,this.shader.uniforms.uTransform.value[1]=this.tilePosition.y%(s*this.tileScale.y)/this._height,this.shader.uniforms.uTransform.value[2]=r/this._width*this.tileScale.x,this.shader.uniforms.uTransform.value[3]=o/this._height*this.tileScale.y,t.setObjectRenderer(t.plugins.sprite),t.plugins.sprite.render(this),e._uvs=i,e._frame.width=n,e._frame.height=s}},o.prototype._renderCanvas=function(t){var e=this._texture;if(e.baseTexture.hasLoaded){var i=t.context,s=this.worldTransform,o=t.resolution,a=e.baseTexture,l=this.tilePosition.x/this.tileScale.x%e._frame.width,u=this.tilePosition.y/this.tileScale.y%e._frame.height;if(!this._canvasPattern){var p=new n.CanvasBuffer(e._frame.width,e._frame.height);16777215!==this.tint?(this.cachedTint!==this.tint&&(this.cachedTint=this.tint,this.tintedTexture=r.getTintedTexture(this,this.tint)),p.context.drawImage(this.tintedTexture,0,0)):p.context.drawImage(a.source,-e._frame.x,-e._frame.y),this._canvasPattern=p.context.createPattern(p.canvas,"repeat")}i.globalAlpha=this.worldAlpha,i.setTransform(s.a*o,s.b*o,s.c*o,s.d*o,s.tx*o,s.ty*o),i.scale(this.tileScale.x,this.tileScale.y),i.translate(l+this.anchor.x*-this._width,u+this.anchor.y*-this._height);var h=t.blendModes[this.blendMode];h!==t.context.globalCompositeOperation&&(i.globalCompositeOperation=h),i.fillStyle=this._canvasPattern,i.fillRect(-l,-u,this._width/this.tileScale.x,this._height/this.tileScale.y)}},o.prototype.getBounds=function(){var t,e,i,n,s=this._width,r=this._height,o=s*(1-this.anchor.x),a=s*-this.anchor.x,l=r*(1-this.anchor.y),u=r*-this.anchor.y,p=this.worldTransform,h=p.a,d=p.b,c=p.c,_=p.d,f=p.tx,T=p.ty,m=h*a+c*u+f,g=_*u+d*a+T,I=h*o+c*u+f,E=_*u+d*o+T,O=h*o+c*l+f,M=_*l+d*o+T,R=h*a+c*l+f,A=_*l+d*a+T;t=R<(t=O<(t=I<(t=m)?I:t)?O:t)?R:t,i=A<(i=M<(i=E<(i=g)?E:i)?M:i)?A:i,e=R>(e=O>(e=I>(e=m)?I:e)?O:e)?R:e,n=A>(n=M>(n=E>(n=g)?E:n)?M:n)?A:n;var y=this._bounds;return y.x=t,y.width=e-t,y.y=i,y.height=n-i,this._currentBounds=y,y},o.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,s);var e,i=this._width,n=this._height,r=-i*this.anchor.x;return s.x>r&&s.xe&&s.y{var n=i(4651),s=n.DisplayObject,r=new n.Matrix;s.prototype._cacheAsBitmap=!1,s.prototype._originalRenderWebGL=null,s.prototype._originalRenderCanvas=null,s.prototype._originalUpdateTransform=null,s.prototype._originalHitTest=null,s.prototype._originalDestroy=null,s.prototype._cachedSprite=null,Object.defineProperties(s.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._originalRenderWebGL=this.renderWebGL,this._originalRenderCanvas=this.renderCanvas,this._originalUpdateTransform=this.updateTransform,this._originalGetBounds=this.getBounds,this._originalDestroy=this.destroy,this._originalContainsPoint=this.containsPoint,this.renderWebGL=this._renderCachedWebGL,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(this._cachedSprite&&this._destroyCachedDisplayObject(),this.renderWebGL=this._originalRenderWebGL,this.renderCanvas=this._originalRenderCanvas,this.getBounds=this._originalGetBounds,this.destroy=this._originalDestroy,this.updateTransform=this._originalUpdateTransform,this.containsPoint=this._originalContainsPoint))}}}),s.prototype._renderCachedWebGL=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cachedSprite.worldAlpha=this.worldAlpha,t.setObjectRenderer(t.plugins.sprite),t.plugins.sprite.render(this._cachedSprite))},s.prototype._initCachedDisplayObject=function(t){if(!this._cachedSprite){t.currentRenderer.flush();var e=this.getLocalBounds().clone();if(this._filters){var i=this._filters[0].padding;e.x-=i,e.y-=i,e.width+=2*i,e.height+=2*i}var s=t.currentRenderTarget,o=t.filterManager.filterStack,a=new n.RenderTexture(t,0|e.width,0|e.height),l=r;l.tx=-e.x,l.ty=-e.y,this.renderWebGL=this._originalRenderWebGL,a.render(this,l,!0,!0),t.setRenderTarget(s),t.filterManager.filterStack=o,this.renderWebGL=this._renderCachedWebGL,this.updateTransform=this.displayObjectUpdateTransform,this.getBounds=this._getCachedBounds,this._cachedSprite=new n.Sprite(a),this._cachedSprite.worldTransform=this.worldTransform,this._cachedSprite.anchor.x=-e.x/e.width,this._cachedSprite.anchor.y=-e.y/e.height,this.updateTransform(),this.containsPoint=this._cachedSprite.containsPoint.bind(this._cachedSprite)}},s.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cachedSprite.worldAlpha=this.worldAlpha,this._cachedSprite.renderCanvas(t))},s.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cachedSprite){var e=this.getLocalBounds(),i=t.context,s=new n.RenderTexture(t,0|e.width,0|e.height),o=r;o.tx=-e.x,o.ty=-e.y,this.renderCanvas=this._originalRenderCanvas,s.render(this,o,!0),t.context=i,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.getBounds=this._getCachedBounds,this._cachedSprite=new n.Sprite(s),this._cachedSprite.worldTransform=this.worldTransform,this._cachedSprite.anchor.x=-e.x/e.width,this._cachedSprite.anchor.y=-e.y/e.height,this.updateTransform(),this.containsPoint=this._cachedSprite.containsPoint.bind(this._cachedSprite)}},s.prototype._getCachedBounds=function(){return this._cachedSprite._currentBounds=null,this._cachedSprite.getBounds()},s.prototype._destroyCachedDisplayObject=function(){this._cachedSprite._texture.destroy(),this._cachedSprite=null},s.prototype._cacheAsBitmapDestroy=function(){this.cacheAsBitmap=!1,this._originalDestroy()}},7231:(t,e,i)=>{var n=i(4651);n.DisplayObject.prototype.name=null,n.Container.prototype.getChildByName=function(t){for(var e=0;e{var n=i(4651);n.DisplayObject.prototype.getGlobalPosition=function(t){return t=t||new n.Point,this.parent?(this.displayObjectUpdateTransform(),t.x=this.worldTransform.tx,t.y=this.worldTransform.ty):(t.x=this.position.x,t.y=this.position.y),t}},3323:(t,e,i)=>{ -/** - * @file Main export of the PIXI extras library - * @author Mat Groves - * @copyright 2013-2015 GoodBoyDigital - * @license {@link https://github.com/pixijs/pixi.js/blob/master/LICENSE|MIT License} - */ -i(4262),i(7231),i(4247),t.exports={MovieClip:i(7901),TilingSprite:i(7377),BitmapText:i(3635)}},4350:(t,e,i)=>{var n=i(4651),s=i(9496);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//ascii.frag","utf8"),{dimensions:{type:"4fv",value:new Float32Array([0,0,0,0])},pixelSize:{type:"1f",value:8}})}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{size:{get:function(){return this.uniforms.pixelSize.value},set:function(t){this.uniforms.pixelSize.value=t}}})},5966:(t,e,i)=>{var n=i(4651),s=i(4356),r=i(6160);function o(){n.AbstractFilter.call(this),this.blurXFilter=new s,this.blurYFilter=new r,this.defaultFilter=new n.AbstractFilter}o.prototype=Object.create(n.AbstractFilter.prototype),o.prototype.constructor=o,t.exports=o,o.prototype.applyFilter=function(t,e,i){var s=t.filterManager.getRenderTarget(!0);this.defaultFilter.applyFilter(t,e,i),this.blurXFilter.applyFilter(t,e,s),t.blendModeManager.setBlendMode(n.BLEND_MODES.SCREEN),this.blurYFilter.applyFilter(t,s,i),t.blendModeManager.setBlendMode(n.BLEND_MODES.NORMAL),t.filterManager.returnRenderTarget(s)},Object.defineProperties(o.prototype,{blur:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t}},blurX:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t}},blurY:{get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t}}})},415:(t,e,i)=>{var n=i(4651),s=i(6786);function r(t,e){n.AbstractFilter.call(this,s.readFileSync("//blurDir.vert","utf8"),s.readFileSync("//blurDir.frag","utf8"),{strength:{type:"1f",value:1},dirX:{type:"1f",value:t||0},dirY:{type:"1f",value:e||0}}),this.defaultFilter=new n.AbstractFilter,this.passes=1,this.dirX=t||0,this.dirY=e||0,this.strength=4}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.applyFilter=function(t,e,i,n){var s=this.getShader(t);if(this.uniforms.strength.value=this.strength/4/this.passes*(e.frame.width/e.size.width),1===this.passes)t.filterManager.applyFilter(s,e,i,n);else{var r=t.filterManager.getRenderTarget(!0);t.filterManager.applyFilter(s,e,r,n);for(var o=0;o{var n=i(4651),s=i(4356),r=i(6160);function o(){n.AbstractFilter.call(this),this.blurXFilter=new s,this.blurYFilter=new r}o.prototype=Object.create(n.AbstractFilter.prototype),o.prototype.constructor=o,t.exports=o,o.prototype.applyFilter=function(t,e,i){var n=t.filterManager.getRenderTarget(!0);this.blurXFilter.applyFilter(t,e,n),this.blurYFilter.applyFilter(t,n,i),t.filterManager.returnRenderTarget(n)},Object.defineProperties(o.prototype,{blur:{get:function(){return this.blurXFilter.blur},set:function(t){this.padding=.5*Math.abs(t),this.blurXFilter.blur=this.blurYFilter.blur=t}},passes:{get:function(){return this.blurXFilter.passes},set:function(t){this.blurXFilter.passes=this.blurYFilter.passes=t}},blurX:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t}},blurY:{get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t}}})},4356:(t,e,i)=>{var n=i(4651),s=i(6786);function r(){n.AbstractFilter.call(this,s.readFileSync("//blurX.vert","utf8"),s.readFileSync("//blur.frag","utf8"),{strength:{type:"1f",value:1}}),this.passes=1,this.strength=4}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.applyFilter=function(t,e,i,n){var s=this.getShader(t);if(this.uniforms.strength.value=this.strength/4/this.passes*(e.frame.width/e.size.width),1===this.passes)t.filterManager.applyFilter(s,e,i,n);else{for(var r=t.filterManager.getRenderTarget(!0),o=e,a=r,l=0;l{var n=i(4651),s=i(6786);function r(){n.AbstractFilter.call(this,s.readFileSync("//blurY.vert","utf8"),s.readFileSync("//blur.frag","utf8"),{strength:{type:"1f",value:1}}),this.passes=1,this.strength=4}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.applyFilter=function(t,e,i,n){var s=this.getShader(t);if(this.uniforms.strength.value=Math.abs(this.strength)/4/this.passes*(e.frame.height/e.size.height),1===this.passes)t.filterManager.applyFilter(s,e,i,n);else{for(var r=t.filterManager.getRenderTarget(!0),o=e,a=r,l=0;l{var n=i(4651),s=i(6786);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//smartBlur.frag","utf8"),{delta:{type:"v2",value:{x:.1,y:0}}})}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r},9375:(t,e,i)=>{var n=i(4651),s=i(8884);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//colorMatrix.frag","utf8"),{m:{type:"1fv",value:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]}})}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype._loadMatrix=function(t,e){var i=t;(e=!!e)&&(this._multiply(i,this.uniforms.m.value,t),i=this._colorMatrix(i)),this.uniforms.m.value=i},r.prototype._multiply=function(t,e,i){return t[0]=e[0]*i[0]+e[1]*i[5]+e[2]*i[10]+e[3]*i[15],t[1]=e[0]*i[1]+e[1]*i[6]+e[2]*i[11]+e[3]*i[16],t[2]=e[0]*i[2]+e[1]*i[7]+e[2]*i[12]+e[3]*i[17],t[3]=e[0]*i[3]+e[1]*i[8]+e[2]*i[13]+e[3]*i[18],t[4]=e[0]*i[4]+e[1]*i[9]+e[2]*i[14]+e[3]*i[19],t[5]=e[5]*i[0]+e[6]*i[5]+e[7]*i[10]+e[8]*i[15],t[6]=e[5]*i[1]+e[6]*i[6]+e[7]*i[11]+e[8]*i[16],t[7]=e[5]*i[2]+e[6]*i[7]+e[7]*i[12]+e[8]*i[17],t[8]=e[5]*i[3]+e[6]*i[8]+e[7]*i[13]+e[8]*i[18],t[9]=e[5]*i[4]+e[6]*i[9]+e[7]*i[14]+e[8]*i[19],t[10]=e[10]*i[0]+e[11]*i[5]+e[12]*i[10]+e[13]*i[15],t[11]=e[10]*i[1]+e[11]*i[6]+e[12]*i[11]+e[13]*i[16],t[12]=e[10]*i[2]+e[11]*i[7]+e[12]*i[12]+e[13]*i[17],t[13]=e[10]*i[3]+e[11]*i[8]+e[12]*i[13]+e[13]*i[18],t[14]=e[10]*i[4]+e[11]*i[9]+e[12]*i[14]+e[13]*i[19],t[15]=e[15]*i[0]+e[16]*i[5]+e[17]*i[10]+e[18]*i[15],t[16]=e[15]*i[1]+e[16]*i[6]+e[17]*i[11]+e[18]*i[16],t[17]=e[15]*i[2]+e[16]*i[7]+e[17]*i[12]+e[18]*i[17],t[18]=e[15]*i[3]+e[16]*i[8]+e[17]*i[13]+e[18]*i[18],t[19]=e[15]*i[4]+e[16]*i[9]+e[17]*i[14]+e[18]*i[19],t},r.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},r.prototype.brightness=function(t,e){var i=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(i,e)},r.prototype.greyscale=function(t,e){var i=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(i,e)},r.prototype.grayscale=r.prototype.greyscale,r.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},r.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var i=Math.cos(t),n=Math.sin(t),s=.213,r=.715,o=.072,a=[s+.787*i+n*-s,r+i*-r+n*-r,o+i*-o+.928*n,0,0,s+i*-s+.143*n,r+i*(1-r)+.14*n,o+i*-o+-.283*n,0,0,s+i*-s+-.787*n,r+i*-r+n*r,o+.928*i+n*o,0,0,0,0,0,1,0];this._loadMatrix(a,e)},r.prototype.contrast=function(t,e){var i=(t||0)+1,n=-128*(i-1),s=[i,0,0,0,n,0,i,0,0,n,0,0,i,0,n,0,0,0,1,0];this._loadMatrix(s,e)},r.prototype.saturate=function(t,e){var i=2*(t||0)/3+1,n=-.5*(i-1),s=[i,n,n,0,0,n,i,n,0,0,n,n,i,0,0,0,0,0,1,0];this._loadMatrix(s,e)},r.prototype.desaturate=function(t){this.saturate(-1)},r.prototype.negative=function(t){this._loadMatrix([0,1,1,0,0,1,0,1,0,0,1,1,0,0,0,0,0,0,1,0],t)},r.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},r.prototype.technicolor=function(t){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},r.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},r.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},r.prototype.kodachrome=function(t){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},r.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},r.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},r.prototype.colorTone=function(t,e,i,n,s){var r=((i=i||16770432)>>16&255)/255,o=(i>>8&255)/255,a=(255&i)/255,l=((n=n||3375104)>>16&255)/255,u=(n>>8&255)/255,p=(255&n)/255,h=[.3,.59,.11,0,0,r,o,a,t=t||.2,0,l,u,p,e=e||.15,0,r-l,o-u,a-p,0,0];this._loadMatrix(h,s)},r.prototype.night=function(t,e){var i=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(i,e)},r.prototype.predator=function(t,e){var i=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(i,e)},r.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},r.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},Object.defineProperties(r.prototype,{matrix:{get:function(){return this.uniforms.m.value},set:function(t){this.uniforms.m.value=t}}})},3640:(t,e,i)=>{var n=i(4651),s=i(8884);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//colorStep.frag","utf8"),{step:{type:"1f",value:5}})}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{step:{get:function(){return this.uniforms.step.value},set:function(t){this.uniforms.step.value=t}}})},6982:(t,e,i)=>{var n=i(4651),s=i(8001);function r(t,e,i){n.AbstractFilter.call(this,null,s.readFileSync("//convolution.frag","utf8"),{matrix:{type:"1fv",value:new Float32Array(t)},texelSize:{type:"v2",value:{x:1/e,y:1/i}}})}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{matrix:{get:function(){return this.uniforms.matrix.value},set:function(t){this.uniforms.matrix.value=new Float32Array(t)}},width:{get:function(){return 1/this.uniforms.texelSize.value.x},set:function(t){this.uniforms.texelSize.value.x=1/t}},height:{get:function(){return 1/this.uniforms.texelSize.value.y},set:function(t){this.uniforms.texelSize.value.y=1/t}}})},6280:(t,e,i)=>{var n=i(4651),s=i(1613);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//crosshatch.frag","utf8"))}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r},8286:(t,e,i)=>{var n=i(4651),s=i(5312);function r(t,e){var i=new n.Matrix;t.renderable=!1,n.AbstractFilter.call(this,s.readFileSync("//displacement.vert","utf8"),s.readFileSync("//displacement.frag","utf8"),{mapSampler:{type:"sampler2D",value:t.texture},otherMatrix:{type:"mat3",value:i.toArray(!0)},scale:{type:"v2",value:{x:1,y:1}}}),this.maskSprite=t,this.maskMatrix=i,null==e&&(e=20),this.scale=new n.Point(e,e)}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.applyFilter=function(t,e,i){var n=t.filterManager;n.calculateMappedMatrix(e.frame,this.maskSprite,this.maskMatrix),this.uniforms.otherMatrix.value=this.maskMatrix.toArray(!0),this.uniforms.scale.value.x=this.scale.x*(1/e.frame.width),this.uniforms.scale.value.y=this.scale.y*(1/e.frame.height);var s=this.getShader(t);n.applyFilter(s,e,i)},Object.defineProperties(r.prototype,{map:{get:function(){return this.uniforms.mapSampler.value},set:function(t){this.uniforms.mapSampler.value=t}}})},3466:(t,e,i)=>{var n=i(4651),s=i(9032);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//dotScreen.frag","utf8"),{scale:{type:"1f",value:1},angle:{type:"1f",value:5},dimensions:{type:"4fv",value:[0,0,0,0]}})}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{scale:{get:function(){return this.uniforms.scale.value},set:function(t){this.uniforms.scale.value=t}},angle:{get:function(){return this.uniforms.angle.value},set:function(t){this.uniforms.angle.value=t}}})},5038:(t,e,i)=>{var n=i(4651),s=i(574);function r(){n.AbstractFilter.call(this,s.readFileSync("//blurYTint.vert","utf8"),s.readFileSync("//blurYTint.frag","utf8"),{blur:{type:"1f",value:1/512},color:{type:"c",value:[0,0,0]},alpha:{type:"1f",value:.7},offset:{type:"2f",value:[5,5]},strength:{type:"1f",value:1}}),this.passes=1,this.strength=4}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.applyFilter=function(t,e,i,n){var s=this.getShader(t);if(this.uniforms.strength.value=this.strength/4/this.passes*(e.frame.height/e.size.height),1===this.passes)t.filterManager.applyFilter(s,e,i,n);else{for(var r=t.filterManager.getRenderTarget(!0),o=e,a=r,l=0;l{var n=i(4651),s=i(4356),r=i(5038);function o(){n.AbstractFilter.call(this),this.blurXFilter=new s,this.blurYTintFilter=new r,this.defaultFilter=new n.AbstractFilter,this.padding=30,this._dirtyPosition=!0,this._angle=45*Math.PI/180,this._distance=10,this.alpha=.75,this.hideObject=!1,this.blendMode=n.BLEND_MODES.MULTIPLY}o.prototype=Object.create(n.AbstractFilter.prototype),o.prototype.constructor=o,t.exports=o,o.prototype.applyFilter=function(t,e,i){var s=t.filterManager.getRenderTarget(!0);this._dirtyPosition&&(this._dirtyPosition=!1,this.blurYTintFilter.uniforms.offset.value[0]=Math.sin(this._angle)*this._distance,this.blurYTintFilter.uniforms.offset.value[1]=Math.cos(this._angle)*this._distance),this.blurXFilter.applyFilter(t,e,s),t.blendModeManager.setBlendMode(this.blendMode),this.blurYTintFilter.applyFilter(t,s,i),t.blendModeManager.setBlendMode(n.BLEND_MODES.NORMAL),this.hideObject||this.defaultFilter.applyFilter(t,e,i),t.filterManager.returnRenderTarget(s)},Object.defineProperties(o.prototype,{blur:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYTintFilter.blur=t}},blurX:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t}},blurY:{get:function(){return this.blurYTintFilter.blur},set:function(t){this.blurYTintFilter.blur=t}},color:{get:function(){return n.utils.rgb2hex(this.blurYTintFilter.uniforms.color.value)},set:function(t){this.blurYTintFilter.uniforms.color.value=n.utils.hex2rgb(t)}},alpha:{get:function(){return this.blurYTintFilter.uniforms.alpha.value},set:function(t){this.blurYTintFilter.uniforms.alpha.value=t}},distance:{get:function(){return this._distance},set:function(t){this._dirtyPosition=!0,this._distance=t}},angle:{get:function(){return this._angle},set:function(t){this._dirtyPosition=!0,this._angle=t}}})},5518:(t,e,i)=>{var n=i(4651),s=i(2672);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//gray.frag","utf8"),{gray:{type:"1f",value:1}})}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{gray:{get:function(){return this.uniforms.gray.value},set:function(t){this.uniforms.gray.value=t}}})},8319:(t,e,i)=>{ -/** - * @file Main export of the PIXI filters library - * @author Mat Groves - * @copyright 2013-2015 GoodBoyDigital - * @license {@link https://github.com/pixijs/pixi.js/blob/master/LICENSE|MIT License} - */ -t.exports={AsciiFilter:i(4350),BloomFilter:i(5966),BlurFilter:i(6762),BlurXFilter:i(4356),BlurYFilter:i(6160),BlurDirFilter:i(415),ColorMatrixFilter:i(9375),ColorStepFilter:i(3640),ConvolutionFilter:i(6982),CrossHatchFilter:i(6280),DisplacementFilter:i(8286),DotScreenFilter:i(3466),GrayFilter:i(5518),DropShadowFilter:i(1726),InvertFilter:i(5976),NoiseFilter:i(7898),PixelateFilter:i(240),RGBSplitFilter:i(1952),ShockwaveFilter:i(2942),SepiaFilter:i(3578),SmartBlurFilter:i(1327),TiltShiftFilter:i(6422),TiltShiftXFilter:i(3080),TiltShiftYFilter:i(4407),TwistFilter:i(7326)}},5976:(t,e,i)=>{var n=i(4651),s=i(8215);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//invert.frag","utf8"),{invert:{type:"1f",value:1}})}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{invert:{get:function(){return this.uniforms.invert.value},set:function(t){this.uniforms.invert.value=t}}})},7898:(t,e,i)=>{var n=i(4651),s=i(1417);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//noise.frag","utf8"),{noise:{type:"1f",value:.5}})}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{noise:{get:function(){return this.uniforms.noise.value},set:function(t){this.uniforms.noise.value=t}}})},240:(t,e,i)=>{var n=i(4651),s=i(9391);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//pixelate.frag","utf8"),{dimensions:{type:"4fv",value:new Float32Array([0,0,0,0])},pixelSize:{type:"v2",value:{x:10,y:10}}})}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{size:{get:function(){return this.uniforms.pixelSize.value},set:function(t){this.uniforms.pixelSize.value=t}}})},1952:(t,e,i)=>{var n=i(4651),s=i(3220);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//rgbSplit.frag","utf8"),{red:{type:"v2",value:{x:20,y:20}},green:{type:"v2",value:{x:-20,y:20}},blue:{type:"v2",value:{x:20,y:-20}},dimensions:{type:"4fv",value:[0,0,0,0]}})}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{red:{get:function(){return this.uniforms.red.value},set:function(t){this.uniforms.red.value=t}},green:{get:function(){return this.uniforms.green.value},set:function(t){this.uniforms.green.value=t}},blue:{get:function(){return this.uniforms.blue.value},set:function(t){this.uniforms.blue.value=t}}})},3578:(t,e,i)=>{var n=i(4651),s=i(3985);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//sepia.frag","utf8"),{sepia:{type:"1f",value:1}})}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{sepia:{get:function(){return this.uniforms.sepia.value},set:function(t){this.uniforms.sepia.value=t}}})},2942:(t,e,i)=>{var n=i(4651),s=i(32);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//shockwave.frag","utf8"),{center:{type:"v2",value:{x:.5,y:.5}},params:{type:"v3",value:{x:10,y:.8,z:.1}},time:{type:"1f",value:0}})}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{center:{get:function(){return this.uniforms.center.value},set:function(t){this.uniforms.center.value=t}},params:{get:function(){return this.uniforms.params.value},set:function(t){this.uniforms.params.value=t}},time:{get:function(){return this.uniforms.time.value},set:function(t){this.uniforms.time.value=t}}})},1519:(t,e,i)=>{var n=i(4651),s=i(5650);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//tiltShift.frag","utf8"),{blur:{type:"1f",value:100},gradientBlur:{type:"1f",value:600},start:{type:"v2",value:{x:0,y:window.innerHeight/2}},end:{type:"v2",value:{x:600,y:window.innerHeight/2}},delta:{type:"v2",value:{x:30,y:30}},texSize:{type:"v2",value:{x:window.innerWidth,y:window.innerHeight}}}),this.updateDelta()}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.updateDelta=function(){this.uniforms.delta.value.x=0,this.uniforms.delta.value.y=0},Object.defineProperties(r.prototype,{blur:{get:function(){return this.uniforms.blur.value},set:function(t){this.uniforms.blur.value=t}},gradientBlur:{get:function(){return this.uniforms.gradientBlur.value},set:function(t){this.uniforms.gradientBlur.value=t}},start:{get:function(){return this.uniforms.start.value},set:function(t){this.uniforms.start.value=t,this.updateDelta()}},end:{get:function(){return this.uniforms.end.value},set:function(t){this.uniforms.end.value=t,this.updateDelta()}}})},6422:(t,e,i)=>{var n=i(4651),s=i(3080),r=i(4407);function o(){n.AbstractFilter.call(this),this.tiltShiftXFilter=new s,this.tiltShiftYFilter=new r}o.prototype=Object.create(n.AbstractFilter.prototype),o.prototype.constructor=o,t.exports=o,o.prototype.applyFilter=function(t,e,i){var n=t.filterManager.getRenderTarget(!0);this.tiltShiftXFilter.applyFilter(t,e,n),this.tiltShiftYFilter.applyFilter(t,n,i),t.filterManager.returnRenderTarget(n)},Object.defineProperties(o.prototype,{blur:{get:function(){return this.tiltShiftXFilter.blur},set:function(t){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=t}},gradientBlur:{get:function(){return this.tiltShiftXFilter.gradientBlur},set:function(t){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=t}},start:{get:function(){return this.tiltShiftXFilter.start},set:function(t){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=t}},end:{get:function(){return this.tiltShiftXFilter.end},set:function(t){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=t}}})},3080:(t,e,i)=>{var n=i(1519);function s(){n.call(this)}s.prototype=Object.create(n.prototype),s.prototype.constructor=s,t.exports=s,s.prototype.updateDelta=function(){var t=this.uniforms.end.value.x-this.uniforms.start.value.x,e=this.uniforms.end.value.y-this.uniforms.start.value.y,i=Math.sqrt(t*t+e*e);this.uniforms.delta.value.x=t/i,this.uniforms.delta.value.y=e/i}},4407:(t,e,i)=>{var n=i(1519);function s(){n.call(this)}s.prototype=Object.create(n.prototype),s.prototype.constructor=s,t.exports=s,s.prototype.updateDelta=function(){var t=this.uniforms.end.value.x-this.uniforms.start.value.x,e=this.uniforms.end.value.y-this.uniforms.start.value.y,i=Math.sqrt(t*t+e*e);this.uniforms.delta.value.x=-e/i,this.uniforms.delta.value.y=t/i}},7326:(t,e,i)=>{var n=i(4651),s=i(6644);function r(){n.AbstractFilter.call(this,null,s.readFileSync("//twist.frag","utf8"),{radius:{type:"1f",value:.5},angle:{type:"1f",value:5},offset:{type:"v2",value:{x:.5,y:.5}}})}r.prototype=Object.create(n.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{offset:{get:function(){return this.uniforms.offset.value},set:function(t){this.uniforms.offset.value=t}},radius:{get:function(){return this.uniforms.radius.value},set:function(t){this.uniforms.radius.value=t}},angle:{get:function(){return this.uniforms.angle.value},set:function(t){this.uniforms.angle.value=t}}})},6619:(t,e,i)=>{i(255);var n=t.exports=i(4651);n.extras=i(3323),n.filters=i(8319),n.interaction=i(4816),n.loaders=i(5296),n.mesh=i(8653),n.loader=new n.loaders.Loader,Object.assign(n,i(9513)),i.g.PIXI=n},9440:(t,e,i)=>{var n=i(4651);function s(){this.global=new n.Point,this.target=null,this.originalEvent=null}s.prototype.constructor=s,t.exports=s,s.prototype.getLocalPosition=function(t,e,i){return t.toLocal(i||this.global,e)}},509:(t,e,i)=>{var n=i(4651),s=i(9440);function r(t,e){e=e||{},this.renderer=t,this.autoPreventDefault=void 0===e.autoPreventDefault||e.autoPreventDefault,this.interactionFrequency=e.interactionFrequency||10,this.mouse=new s,this.eventData={stopped:!1,target:null,type:null,data:this.mouse,stopPropagation:function(){this.stopped=!0}},this.interactiveDataPool=[],this.interactionDOMElement=null,this.eventsAdded=!1,this.onMouseUp=this.onMouseUp.bind(this),this.processMouseUp=this.processMouseUp.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.processMouseDown=this.processMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.processMouseMove=this.processMouseMove.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.processMouseOverOut=this.processMouseOverOut.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.processTouchStart=this.processTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.processTouchEnd=this.processTouchEnd.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.processTouchMove=this.processTouchMove.bind(this),this.last=0,this.currentCursorStyle="inherit",this._tempPoint=new n.Point,this.resolution=1,this.setTargetElement(this.renderer.view,this.renderer.resolution)}Object.assign(n.DisplayObject.prototype,i(4241)),r.prototype.constructor=r,t.exports=r,r.prototype.setTargetElement=function(t,e){this.removeEvents(),this.interactionDOMElement=t,this.resolution=e||1,this.addEvents()},r.prototype.addEvents=function(){this.interactionDOMElement&&(n.ticker.shared.add(this.update,this),window.navigator.msPointerEnabled&&(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"),window.document.addEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.addEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.addEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.addEventListener("touchmove",this.onTouchMove,!0),window.addEventListener("mouseup",this.onMouseUp,!0),this.eventsAdded=!0)},r.prototype.removeEvents=function(){this.interactionDOMElement&&(n.ticker.shared.remove(this.update),window.navigator.msPointerEnabled&&(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""),window.document.removeEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.removeEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.removeEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onTouchMove,!0),this.interactionDOMElement=null,window.removeEventListener("mouseup",this.onMouseUp,!0),this.eventsAdded=!1)},r.prototype.update=function(t){this._deltaTime+=t,this._deltaTime=0;a--)!o&&n?o=this.processInteractive(t,r[a],i,!0,s):this.processInteractive(t,r[a],i,!1,!1);return s&&(n&&(e.hitArea?(e.worldTransform.applyInverse(t,this._tempPoint),o=e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)):e.containsPoint&&(o=e.containsPoint(t))),e.interactive&&i(e,o)),o},r.prototype.onMouseDown=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.autoPreventDefault&&this.mouse.originalEvent.preventDefault(),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseDown,!0)},r.prototype.processMouseDown=function(t,e){var i=this.mouse.originalEvent,n=2===i.button||3===i.which;e&&(t[n?"_isRightDown":"_isLeftDown"]=!0,this.dispatchEvent(t,n?"rightdown":"mousedown",this.eventData))},r.prototype.onMouseUp=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseUp,!0)},r.prototype.processMouseUp=function(t,e){var i=this.mouse.originalEvent,n=2===i.button||3===i.which,s=n?"_isRightDown":"_isLeftDown";e?(this.dispatchEvent(t,n?"rightup":"mouseup",this.eventData),t[s]&&(t[s]=!1,this.dispatchEvent(t,n?"rightclick":"click",this.eventData))):t[s]&&(t[s]=!1,this.dispatchEvent(t,n?"rightupoutside":"mouseupoutside",this.eventData))},r.prototype.onMouseMove=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.didMove=!0,this.cursor="inherit",this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseMove,!0),this.currentCursorStyle!==this.cursor&&(this.currentCursorStyle=this.cursor,this.interactionDOMElement.style.cursor=this.cursor)},r.prototype.processMouseMove=function(t,e){this.dispatchEvent(t,"mousemove",this.eventData),this.processMouseOverOut(t,e)},r.prototype.onMouseOut=function(t){this.mouse.originalEvent=t,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.interactionDOMElement.style.cursor="inherit",this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseOverOut,!1)},r.prototype.processMouseOverOut=function(t,e){e?(t._over||(t._over=!0,this.dispatchEvent(t,"mouseover",this.eventData)),t.buttonMode&&(this.cursor=t.defaultCursor)):t._over&&(t._over=!1,this.dispatchEvent(t,"mouseout",this.eventData))},r.prototype.onTouchStart=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,i=e.length,n=0;n{ -/** - * @file Main export of the PIXI interactions library - * @author Mat Groves - * @copyright 2013-2015 GoodBoyDigital - * @license {@link https://github.com/pixijs/pixi.js/blob/master/LICENSE|MIT License} - */ -t.exports={InteractionData:i(9440),InteractionManager:i(509),interactiveTarget:i(4241)}},4241:t=>{t.exports={interactive:!1,buttonMode:!1,interactiveChildren:!0,defaultCursor:"pointer",_over:!1,_touchDown:!1}},4095:(t,e,i)=>{var n=i(542).Resource,s=i(4651),r=i(3323),o=i(6944);function a(t,e){var i={},n=t.data.getElementsByTagName("info")[0],o=t.data.getElementsByTagName("common")[0];i.font=n.getAttribute("face"),i.size=parseInt(n.getAttribute("size"),10),i.lineHeight=parseInt(o.getAttribute("lineHeight"),10),i.chars={};for(var a=t.data.getElementsByTagName("char"),l=0;l{ -/** - * @file Main export of the PIXI loaders library - * @author Mat Groves - * @copyright 2013-2015 GoodBoyDigital - * @license {@link https://github.com/pixijs/pixi.js/blob/master/LICENSE|MIT License} - */ -t.exports={Loader:i(7397),bitmapFontParser:i(4095),spritesheetParser:i(6695),textureParser:i(3968),Resource:i(542).Resource}},7397:(t,e,i)=>{var n=i(542),s=i(3968),r=i(6695),o=i(4095);function a(t,e){n.call(this,t,e);for(var i=0;i{var n=i(542).Resource,s=i(6944),r=i(4651);t.exports=function(){return function(t,e){if(!t.data||!t.isJson||!t.data.frames)return e();var i={crossOrigin:t.crossOrigin,loadType:n.LOAD_TYPE.IMAGE},o=s.dirname(t.url.replace(this.baseUrl,"")),a=r.utils.getResolutionOfUrl(t.url);this.add(t.name+"_image",o+"/"+t.data.meta.image,i,(function(i){t.textures={};var n=t.data.frames;for(var s in n){var o=n[s].frame;if(o){var l=null,u=null;if(l=n[s].rotated?new r.Rectangle(o.x,o.y,o.h,o.w):new r.Rectangle(o.x,o.y,o.w,o.h),n[s].trimmed&&(u=new r.Rectangle(n[s].spriteSourceSize.x/a,n[s].spriteSourceSize.y/a,n[s].sourceSize.w/a,n[s].sourceSize.h/a)),n[s].rotated){var p=l.width;l.width=l.height,l.height=p}l.x/=a,l.y/=a,l.width/=a,l.height/=a,t.textures[s]=new r.Texture(i.texture.baseTexture,l,l.clone(),u,n[s].rotated),r.utils.TextureCache[s]=t.textures[s]}}e()}))}}},3968:(t,e,i)=>{var n=i(4651);t.exports=function(){return function(t,e){if(t.data&&t.isImage){var i=new n.BaseTexture(t.data,null,n.utils.getResolutionOfUrl(t.url));i.imageUrl=t.url,t.texture=new n.Texture(i),n.utils.BaseTextureCache[t.url]=i,n.utils.TextureCache[t.url]=t.texture}e()}}},2876:(t,e,i)=>{var n=i(4651),s=new n.Point,r=new n.Polygon;function o(t,e,i,s,r){n.Container.call(this),this._texture=null,this.uvs=i||new Float32Array([0,1,1,1,1,0,0,1]),this.vertices=e||new Float32Array([0,0,100,0,100,100,0,100]),this.indices=s||new Uint16Array([0,1,2,3]),this.dirty=!0,this.blendMode=n.BLEND_MODES.NORMAL,this.canvasPadding=0,this.drawMode=r||o.DRAW_MODES.TRIANGLE_MESH,this.texture=t}o.prototype=Object.create(n.Container.prototype),o.prototype.constructor=o,t.exports=o,Object.defineProperties(o.prototype,{texture:{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}}),o.prototype._renderWebGL=function(t){t.setObjectRenderer(t.plugins.mesh),t.plugins.mesh.render(this)},o.prototype._renderCanvas=function(t){var e=t.context,i=this.worldTransform;t.roundPixels?e.setTransform(i.a,i.b,i.c,i.d,0|i.tx,0|i.ty):e.setTransform(i.a,i.b,i.c,i.d,i.tx,i.ty),this.drawMode===o.DRAW_MODES.TRIANGLE_MESH?this._renderCanvasTriangleMesh(e):this._renderCanvasTriangles(e)},o.prototype._renderCanvasTriangleMesh=function(t){for(var e=this.vertices,i=this.uvs,n=e.length/2,s=0;s0){var O=this.canvasPadding/this.worldTransform.a,M=this.canvasPadding/this.worldTransform.d,R=(u+p+h)/3,A=(d+c+_)/3,y=u-R,S=d-A,v=Math.sqrt(y*y+S*S);u=R+y/v*(v+O),d=A+S/v*(v+M),S=c-A,p=R+(y=p-R)/(v=Math.sqrt(y*y+S*S))*(v+O),c=A+S/v*(v+M),S=_-A,h=R+(y=h-R)/(v=Math.sqrt(y*y+S*S))*(v+O),_=A+S/v*(v+M)}t.save(),t.beginPath(),t.moveTo(u,d),t.lineTo(p,c),t.lineTo(h,_),t.closePath(),t.clip();var C=f*I+g*m+T*E-I*m-g*T-f*E,L=u*I+g*h+p*E-I*h-g*p-u*E,b=f*p+u*m+T*h-p*m-u*T-f*h,D=f*I*h+g*p*m+u*T*E-u*I*m-g*T*h-f*p*E,w=d*I+g*_+c*E-I*_-g*c-d*E,N=f*c+d*m+T*_-c*m-d*T-f*_,F=f*I*_+g*c*m+d*T*E-d*I*m-g*T*_-f*c*E;t.transform(L/C,w/C,b/C,N/C,D/C,F/C),t.drawImage(o,0,0),t.restore()},o.prototype.renderMeshFlat=function(t){var e=this.context,i=t.vertices,n=i.length/2;e.beginPath();for(var s=1;su?g:u,p=I>p?I:p}if(h===-1/0||p===1/0)return n.Rectangle.EMPTY;var E=this._bounds;E.x=h,E.width=u-h,E.y=d,E.height=p-d,this._currentBounds=E}return this._currentBounds},o.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,s);var e,i,n=this.vertices,a=r.points;if(this.drawMode===o.DRAW_MODES.TRIANGLES){var l=this.indices;for(i=this.indices.length,e=0;e{var n=i(2876),s=i(4651);function r(t,e){n.call(this,t),this.points=e,this.vertices=new Float32Array(4*e.length),this.uvs=new Float32Array(4*e.length),this.colors=new Float32Array(2*e.length),this.indices=new Uint16Array(2*e.length),this._ready=!0,this.refresh()}r.prototype=Object.create(n.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.refresh=function(){var t=this.points;if(!(t.length<1)&&this._texture._uvs){var e=this.uvs,i=this.indices,n=this.colors,r=this._texture._uvs,o=new s.Point(r.x0,r.y0),a=new s.Point(r.x2-r.x0,r.y2-r.y0);e[0]=0+o.x,e[1]=0+o.y,e[2]=0+o.x,e[3]=1*a.y+o.y,n[0]=1,n[1]=1,i[0]=0,i[1]=1;for(var l,u,p=t.length,h=1;h1&&1,a/=s=Math.sqrt(a*a+l*l),l/=s,a*=r=this._texture.height/2,l*=r,u[n]=i.x+a,u[n+1]=i.y+l,u[n+2]=i.x-a,u[n+3]=i.y-l,o=i;this.containerUpdateTransform()}}},8653:(t,e,i)=>{ -/** - * @file Main export of the PIXI extras library - * @author Mat Groves - * @copyright 2013-2015 GoodBoyDigital - * @license {@link https://github.com/pixijs/pixi.js/blob/master/LICENSE|MIT License} - */ -t.exports={Mesh:i(2876),Rope:i(7005),MeshRenderer:i(6709),MeshShader:i(2003)}},6709:(t,e,i)=>{var n=i(4651),s=i(2876);function r(t){n.ObjectRenderer.call(this,t),this.indices=new Uint16Array(15e3);for(var e=0,i=0;e<15e3;e+=6,i+=4)this.indices[e+0]=i+0,this.indices[e+1]=i+1,this.indices[e+2]=i+2,this.indices[e+3]=i+0,this.indices[e+4]=i+2,this.indices[e+5]=i+3}r.prototype=Object.create(n.ObjectRenderer.prototype),r.prototype.constructor=r,t.exports=r,n.WebGLRenderer.registerPlugin("mesh",r),r.prototype.onContextChange=function(){},r.prototype.render=function(t){t._vertexBuffer||this._initWebGL(t);var e=this.renderer,i=e.gl,n=t._texture.baseTexture,r=e.shaderManager.plugins.meshShader,o=t.drawMode===s.DRAW_MODES.TRIANGLE_MESH?i.TRIANGLE_STRIP:i.TRIANGLES;e.blendModeManager.setBlendMode(t.blendMode),i.uniformMatrix3fv(r.uniforms.translationMatrix._location,!1,t.worldTransform.toArray(!0)),i.uniformMatrix3fv(r.uniforms.projectionMatrix._location,!1,e.currentRenderTarget.projectionMatrix.toArray(!0)),i.uniform1f(r.uniforms.alpha._location,t.worldAlpha),t.dirty?(t.dirty=!1,i.bindBuffer(i.ARRAY_BUFFER,t._vertexBuffer),i.bufferData(i.ARRAY_BUFFER,t.vertices,i.STATIC_DRAW),i.vertexAttribPointer(r.attributes.aVertexPosition,2,i.FLOAT,!1,0,0),i.bindBuffer(i.ARRAY_BUFFER,t._uvBuffer),i.bufferData(i.ARRAY_BUFFER,t.uvs,i.STATIC_DRAW),i.vertexAttribPointer(r.attributes.aTextureCoord,2,i.FLOAT,!1,0,0),i.activeTexture(i.TEXTURE0),n._glTextures[i.id]?i.bindTexture(i.TEXTURE_2D,n._glTextures[i.id]):this.renderer.updateTexture(n),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,t._indexBuffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t.indices,i.STATIC_DRAW)):(i.bindBuffer(i.ARRAY_BUFFER,t._vertexBuffer),i.bufferSubData(i.ARRAY_BUFFER,0,t.vertices),i.vertexAttribPointer(r.attributes.aVertexPosition,2,i.FLOAT,!1,0,0),i.bindBuffer(i.ARRAY_BUFFER,t._uvBuffer),i.vertexAttribPointer(r.attributes.aTextureCoord,2,i.FLOAT,!1,0,0),i.activeTexture(i.TEXTURE0),n._glTextures[i.id]?i.bindTexture(i.TEXTURE_2D,n._glTextures[i.id]):this.renderer.updateTexture(n),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,t._indexBuffer),i.bufferSubData(i.ELEMENT_ARRAY_BUFFER,0,t.indices)),i.drawElements(o,t.indices.length,i.UNSIGNED_SHORT,0)},r.prototype._initWebGL=function(t){var e=this.renderer.gl;t._vertexBuffer=e.createBuffer(),t._indexBuffer=e.createBuffer(),t._uvBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t._vertexBuffer),e.bufferData(e.ARRAY_BUFFER,t.vertices,e.DYNAMIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,t._uvBuffer),e.bufferData(e.ARRAY_BUFFER,t.uvs,e.STATIC_DRAW),t.colors&&(t._colorBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t._colorBuffer),e.bufferData(e.ARRAY_BUFFER,t.colors,e.STATIC_DRAW)),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t._indexBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,t.indices,e.STATIC_DRAW)},r.prototype.flush=function(){},r.prototype.start=function(){var t=this.renderer.shaderManager.plugins.meshShader;this.renderer.shaderManager.setShader(t)},r.prototype.destroy=function(){n.ObjectRenderer.prototype.destroy.call(this)}},2003:(t,e,i)=>{var n=i(4651);function s(t){n.Shader.call(this,t,["precision lowp float;","attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;","}"].join("\n"),["precision lowp float;","varying vec2 vTextureCoord;","uniform float alpha;","uniform sampler2D uSampler;","void main(void){"," gl_FragColor = texture2D(uSampler, vTextureCoord) * alpha ;","}"].join("\n"),{alpha:{type:"1f",value:0},translationMatrix:{type:"mat3",value:new Float32Array(9)},projectionMatrix:{type:"mat3",value:new Float32Array(9)}},{aVertexPosition:0,aTextureCoord:0})}s.prototype=Object.create(n.Shader.prototype),s.prototype.constructor=s,t.exports=s,n.ShaderManager.registerPlugin("meshShader",s)},9206:()=>{Math.sign||(Math.sign=function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1})},7537:(t,e,i)=>{Object.assign||(Object.assign=i(5228))},255:(t,e,i)=>{i(7537),i(4377),i(9206)},4377:(t,e,i)=>{if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!i.g.performance||!i.g.performance.now){var n=Date.now();i.g.performance||(i.g.performance={}),i.g.performance.now=function(){return Date.now()-n}}for(var s=Date.now(),r=["ms","moz","webkit","o"],o=0;o{var e,i,n=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(e===setTimeout)return setTimeout(t,0);if((e===s||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(i){try{return e.call(null,t,0)}catch(i){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:s}catch(t){e=s}try{i="function"==typeof clearTimeout?clearTimeout:r}catch(t){i=r}}();var a,l=[],u=!1,p=-1;function h(){u&&a&&(u=!1,a.length?l=a.concat(l):p=-1,l.length&&d())}function d(){if(!u){var t=o(h);u=!0;for(var e=l.length;e;){for(a=l,l=[];++p1)for(var i=1;i{"use strict";i.d(e,{D:()=>n});var n=function(){function t(t){var e=this;void 0===t&&(t=!1),this.ignoreMultipleSettles=t,this.isSettled=!1,this.promise=new Promise((function(t,i){e.resolveCallback=t,e.rejectCallback=i}))}return t.prototype.markAsSettled=function(){var t=this.isSettled;if(t&&!this.ignoreMultipleSettles)throw new Error("PromiseDelegate is already settled!");return this.isSettled=!0,!t},Object.defineProperty(t.prototype,"settled",{get:function(){return this.isSettled},enumerable:!1,configurable:!0}),t.prototype.resolve=function(t){this.markAsSettled()&&this.resolveCallback(t)},t.prototype.reject=function(t){this.markAsSettled()&&this.rejectCallback(t)},t}()},5006:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function n(){}function s(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function r(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),r.prototype.eventNames=function(){var t,n,s=[];if(0===this._eventsCount)return s;for(n in t=this._events)e.call(t,n)&&s.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(t)):s},r.prototype.listeners=function(t,e){var n=i?i+t:t,s=this._events[n];if(e)return!!s;if(!s)return[];if(s.fn)return[s.fn];for(var r=0,o=s.length,a=new Array(o);r{"use strict";var n=i(4678),s=i(978),r=i(8664),o=i(5006);function a(t,e){o.call(this),e=e||10,this.baseUrl=t||"",this.progress=0,this.loading=!1,this._progressChunk=0,this._beforeMiddleware=[],this._afterMiddleware=[],this._boundLoadResource=this._loadResource.bind(this),this._buffer=[],this._numToLoad=0,this._queue=s.queue(this._boundLoadResource,e),this.resources={}}a.prototype=Object.create(o.prototype),a.prototype.constructor=a,t.exports=a,a.prototype.add=a.prototype.enqueue=function(t,e,i,n){if(Array.isArray(t)){for(var s=0;s{"use strict";var n=i(5006),s=i(4678),r=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),o=null;function a(t,e,i){if(n.call(this),i=i||{},"string"!=typeof t||"string"!=typeof e)throw new Error("Both name and url are required for constructing a resource.");this.name=t,this.url=e,this.isDataUrl=0===this.url.indexOf("data:"),this.data=null,this.crossOrigin=!0===i.crossOrigin?"anonymous":i.crossOrigin,this.loadType=i.loadType||this._determineLoadType(),this.xhrType=i.xhrType,this.metadata=i.metadata||{},this.error=null,this.xhr=null,this.isJson=!1,this.isXml=!1,this.isImage=!1,this.isAudio=!1,this.isVideo=!1,this.isComplete=!1,this.isLoading=!1,this._dequeue=null,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this._boundXdrOnTimeout=this._xdrOnTimeout.bind(this)}function l(t){return t.toString().replace("object ","")}function u(t,e,i){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=i)}a.prototype=Object.create(n.prototype),a.prototype.constructor=a,t.exports=a,a.prototype.complete=function(){if(this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null)),this.isComplete)throw new Error("Complete called again for an already completed resource.");this.isComplete=!0,this.isLoading=!1,this.emit("complete",this)},a.prototype.abort=function(t){if(!this.error){if(this.error=new Error(t),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(void 0!==this.data.src)this.data.src="";else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this.complete()}},a.prototype.load=function(t){if(!this.isLoading)if(this.isComplete){if(t){var e=this;setTimeout((function(){t(e)}),1)}}else switch(t&&this.once("complete",t),this.isLoading=!0,this.emit("start",this),!1!==this.crossOrigin&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case a.LOAD_TYPE.IMAGE:this._loadElement("image");break;case a.LOAD_TYPE.AUDIO:this._loadSourceElement("audio");break;case a.LOAD_TYPE.VIDEO:this._loadSourceElement("video");break;case a.LOAD_TYPE.XHR:default:r&&this.crossOrigin?this._loadXdr():this._loadXhr()}},a.prototype._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&void 0!==window.Image?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url);var e="is"+t[0].toUpperCase()+t.substring(1);!1===this[e]&&(this[e]=!0),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1)},a.prototype._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&void 0!==window.Audio?this.data=new Audio:this.data=document.createElement(t),null!==this.data){if(!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=0;e0){if(this.xhrType===a.XHR_RESPONSE_TYPE.TEXT)this.data=t.responseText;else if(this.xhrType===a.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(t.responseText),this.isJson=!0}catch(t){return void this.abort("Error trying to parse loaded json:",t)}else if(this.xhrType===a.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var i=new DOMParser;this.data=i.parseFromString(t.responseText,"text/xml")}else{var n=document.createElement("div");n.innerHTML=t.responseText,this.data=n}this.isXml=!0}catch(t){return void this.abort("Error trying to parse loaded xml:",t)}else this.data=t.response||t.responseText;this.complete()}else this.abort("["+t.status+"]"+t.statusText+":"+t.responseURL)},a.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";e=e||window.location,o||(o=document.createElement("a")),o.href=t;var i=!(t=s(o.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,n=t.protocol?t.protocol+":":"";return t.host===e.hostname&&i&&n===e.protocol?"":"anonymous"},a.prototype._determineXhrType=function(){return a._xhrTypeMap[this._getExtension()]||a.XHR_RESPONSE_TYPE.TEXT},a.prototype._determineLoadType=function(){return a._loadTypeMap[this._getExtension()]||a.LOAD_TYPE.XHR},a.prototype._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var i=t.indexOf("/");e=t.substring(i+1,t.indexOf(";",i))}else{var n=t.indexOf("?");-1!==n&&(t=t.substring(0,n)),e=t.substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},a.prototype._getMimeFromXhrType=function(t){switch(t){case a.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case a.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case a.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case a.XHR_RESPONSE_TYPE.JSON:return"application/json";case a.XHR_RESPONSE_TYPE.DEFAULT:case a.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},a.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},a.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},a._loadTypeMap={gif:a.LOAD_TYPE.IMAGE,png:a.LOAD_TYPE.IMAGE,bmp:a.LOAD_TYPE.IMAGE,jpg:a.LOAD_TYPE.IMAGE,jpeg:a.LOAD_TYPE.IMAGE,tif:a.LOAD_TYPE.IMAGE,tiff:a.LOAD_TYPE.IMAGE,webp:a.LOAD_TYPE.IMAGE,tga:a.LOAD_TYPE.IMAGE,"svg+xml":a.LOAD_TYPE.IMAGE},a._xhrTypeMap={xhtml:a.XHR_RESPONSE_TYPE.DOCUMENT,html:a.XHR_RESPONSE_TYPE.DOCUMENT,htm:a.XHR_RESPONSE_TYPE.DOCUMENT,xml:a.XHR_RESPONSE_TYPE.DOCUMENT,tmx:a.XHR_RESPONSE_TYPE.DOCUMENT,tsx:a.XHR_RESPONSE_TYPE.DOCUMENT,svg:a.XHR_RESPONSE_TYPE.DOCUMENT,gif:a.XHR_RESPONSE_TYPE.BLOB,png:a.XHR_RESPONSE_TYPE.BLOB,bmp:a.XHR_RESPONSE_TYPE.BLOB,jpg:a.XHR_RESPONSE_TYPE.BLOB,jpeg:a.XHR_RESPONSE_TYPE.BLOB,tif:a.XHR_RESPONSE_TYPE.BLOB,tiff:a.XHR_RESPONSE_TYPE.BLOB,webp:a.XHR_RESPONSE_TYPE.BLOB,tga:a.XHR_RESPONSE_TYPE.BLOB,json:a.XHR_RESPONSE_TYPE.JSON,text:a.XHR_RESPONSE_TYPE.TEXT,txt:a.XHR_RESPONSE_TYPE.TEXT},a.setExtensionLoadType=function(t,e){u(a._loadTypeMap,t,e)},a.setExtensionXhrType=function(t,e){u(a._xhrTypeMap,t,e)}},978:t=>{"use strict";function e(){}function i(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}t.exports={eachSeries:function(t,e,i){var n=0,s=t.length;!function r(o){o||n===s?i&&i(o):e(t[n++],r)}()},queue:function(t,n){if(null==n)n=1;else if(0===n)throw new Error("Concurrency must not be zero");var s=0,r={_tasks:[],concurrency:n,saturated:e,unsaturated:e,buffer:n/4,empty:e,drain:e,error:e,started:!1,paused:!1,push:function(t,e){o(t,!1,e)},kill:function(){r.drain=e,r._tasks=[]},unshift:function(t,e){o(t,!0,e)},process:function(){for(;!r.paused&&s{"use strict";t.exports={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encodeBinary:function(t){for(var e,i="",n=new Array(4),s=0,r=0;s>2,n[1]=(3&e[0])<<4|e[1]>>4,n[2]=(15&e[1])<<2|e[2]>>6,n[3]=63&e[2],s-(t.length-1)){case 2:n[3]=64,n[2]=64;break;case 1:n[3]=64}for(r=0;r{"use strict";t.exports=i(3723),t.exports.Resource=i(8664),t.exports.middleware={caching:{memory:i(9911)},parsing:{blob:i(2796)}},t.exports.async=i(978)},9911:t=>{"use strict";var e={};t.exports=function(){return function(t,i){e[t.url]?(t.data=e[t.url],t.complete()):t.once("complete",(function(){e[this.url]=this.data})),i()}}},2796:(t,e,i)=>{"use strict";var n=i(8664),s=i(9350),r=window.URL||window.webkitURL;t.exports=function(){return function(t,e){if(t.data){if(t.xhr&&t.xhrType===n.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var i=r.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=i,t.isImage=!0,void(t.data.onload=function(){r.revokeObjectURL(i),t.data.onload=null,e()})}}else{var o=t.xhr.getResponseHeader("content-type");if(o&&0===o.indexOf("image"))return t.data=new Image,t.data.src="data:"+o+";base64,"+s.encodeBinary(t.xhr.responseText),t.isImage=!0,void(t.data.onload=function(){t.data.onload=null,e()})}e()}else e()}}},5242:(t,e,i)=>{ -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -var n=i(8287),s=n.Buffer;function r(t,e){for(var i in t)e[i]=t[i]}function o(t,e,i){return s(t,e,i)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=n:(r(n,e),e.Buffer=o),o.prototype=Object.create(s.prototype),r(s,o),o.from=function(t,e,i){if("number"==typeof t)throw new TypeError("Argument must not be a number");return s(t,e,i)},o.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=s(t);return void 0!==e?"string"==typeof i?n.fill(e,i):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return s(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},6944:t=>{"use strict";t.exports=path},7425:()=>{},9496:()=>{},6786:()=>{},8884:()=>{},8001:()=>{},1613:()=>{},5312:()=>{},9032:()=>{},574:()=>{},2672:()=>{},8215:()=>{},1417:()=>{},9391:()=>{},3220:()=>{},3985:()=>{},32:()=>{},5650:()=>{},6644:()=>{},1045:t=>{"use strict";t.exports={rE:"3.0.8"}}},__webpack_module_cache__={},leafPrototypes,getProto,inProgress,dataWebpackPrefix;function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var i=__webpack_module_cache__[t]={id:t,loaded:!1,exports:{}};return __webpack_modules__[t].call(i.exports,i,i.exports,__webpack_require__),i.loaded=!0,i.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},getProto=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,__webpack_require__.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var i=Object.create(null);__webpack_require__.r(i);var n={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var s=2&e&&t;"object"==typeof s&&!~leafPrototypes.indexOf(s);s=getProto(s))Object.getOwnPropertyNames(s).forEach((e=>n[e]=()=>t[e]));return n.default=()=>t,__webpack_require__.d(i,n),i},__webpack_require__.d=(t,e)=>{for(var i in e)__webpack_require__.o(e,i)&&!__webpack_require__.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},__webpack_require__.f={},__webpack_require__.e=t=>Promise.all(Object.keys(__webpack_require__.f).reduce(((e,i)=>(__webpack_require__.f[i](t,e),e)),[])),__webpack_require__.u=t=>t+".bundle."+{38:"8f8d27e0",97:"2c190343",195:"9cae47ea",211:"788652b1",317:"a52389ac",837:"202ac045",950:"f4a05602",960:"35ce71c3",974:"0d9230d6"}[t]+".js",__webpack_require__.miniCssF=t=>"styles/"+t+".45554be0.css",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),inProgress={},dataWebpackPrefix="@mixly/python-pyodide:",__webpack_require__.l=(t,e,i,n)=>{if(inProgress[t])inProgress[t].push(e);else{var s,r;if(void 0!==i)for(var o=document.getElementsByTagName("script"),a=0;a{s.onerror=s.onload=null,clearTimeout(p);var n=inProgress[t];if(delete inProgress[t],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach((t=>t(i))),e)return e(i)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=u.bind(null,s.onerror),s.onload=u.bind(null,s.onload),r&&document.head.appendChild(s)}},__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;__webpack_require__.g.importScripts&&(t=__webpack_require__.g.location+"");var e=__webpack_require__.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var i=e.getElementsByTagName("script");if(i.length)for(var n=i.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=i[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=t})(),(()=>{if("undefined"!=typeof document){var t=t=>new Promise(((e,i)=>{var n=__webpack_require__.miniCssF(t),s=__webpack_require__.p+n;if(((t,e)=>{for(var i=document.getElementsByTagName("link"),n=0;n{var r=document.createElement("link");r.rel="stylesheet",r.type="text/css",__webpack_require__.nc&&(r.nonce=__webpack_require__.nc),r.onerror=r.onload=i=>{if(r.onerror=r.onload=null,"load"===i.type)n();else{var o=i&&i.type,a=i&&i.target&&i.target.href||e,l=new Error("Loading CSS chunk "+t+" failed.\n("+o+": "+a+")");l.name="ChunkLoadError",l.code="CSS_CHUNK_LOAD_FAILED",l.type=o,l.request=a,r.parentNode&&r.parentNode.removeChild(r),s(l)}},r.href=e,i?i.parentNode.insertBefore(r,i.nextSibling):document.head.appendChild(r)})(t,s,null,e,i)})),e={792:0};__webpack_require__.f.miniCss=(i,n)=>{e[i]?n.push(e[i]):0!==e[i]&&{317:1}[i]&&n.push(e[i]=t(i).then((()=>{e[i]=0}),(t=>{throw delete e[i],t})))}}})(),(()=>{var t={792:0};__webpack_require__.f.j=(e,i)=>{var n=__webpack_require__.o(t,e)?t[e]:void 0;if(0!==n)if(n)i.push(n[2]);else{var s=new Promise(((i,s)=>n=t[e]=[i,s]));i.push(n[2]=s);var r=__webpack_require__.p+__webpack_require__.u(e),o=new Error;__webpack_require__.l(r,(i=>{if(__webpack_require__.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var s=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;o.message="Loading chunk "+e+" failed.\n("+s+": "+r+")",o.name="ChunkLoadError",o.type=s,o.request=r,n[1](o)}}),"chunk-"+e,e)}};var e=(e,i)=>{var n,s,[r,o,a]=i,l=0;if(r.some((e=>0!==t[e]))){for(n in o)__webpack_require__.o(o,n)&&(__webpack_require__.m[n]=o[n]);if(a)a(__webpack_require__)}for(e&&e(i);l{"use strict";var t={};__webpack_require__.r(t),__webpack_require__.d(t,{controls_type:()=>Tt,controls_typeLists:()=>mt,lists_zip:()=>gt,lists_zip_container:()=>It,lists_zip_item:()=>Et,unpack_iterable_object:()=>Ot,variables_change:()=>_t,variables_get:()=>dt,variables_global:()=>ft,variables_set:()=>ct});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{base_setup:()=>At,controls_delay:()=>yt,controls_end_program:()=>St,controls_except:()=>Yt,controls_finally:()=>Bt,controls_flow_statements:()=>wt,controls_for:()=>Nt,controls_forEach:()=>Lt,controls_for_range:()=>Ft,controls_if:()=>vt,controls_if_else:()=>kt,controls_if_elseif:()=>xt,controls_if_if:()=>Pt,controls_lambda:()=>Xt,controls_main:()=>Rt,controls_pass:()=>Gt,controls_range:()=>Ct,controls_repeat_ext:()=>Ut,controls_thread:()=>Ht,controls_try:()=>Vt,controls_try_finally:()=>Dt,controls_whileUntil:()=>bt,datetime_fromtimestamp:()=>$t,do_while:()=>Wt,garbage_collection:()=>jt,gene_unique_identifier:()=>Qt,get_mem_alloc:()=>qt,get_mem_free:()=>Kt,get_unique_identifier:()=>zt});var i={};__webpack_require__.r(i),__webpack_require__.d(i,{base_map:()=>ge,generate_cartesian_product:()=>Ee,math_arithmetic:()=>ie,math_bit:()=>se,math_constant:()=>te,math_constant_mp:()=>ee,math_constrain:()=>he,math_dec:()=>oe,math_degree_to_radian:()=>Me,math_indexer_number:()=>ce,math_map:()=>de,math_max_min:()=>le,math_number:()=>Zt,math_number_base_conversion:()=>ue,math_radian_to_degree:()=>Oe,math_random:()=>pe,math_random_seed:()=>_e,math_round:()=>fe,math_selfcalcu:()=>ne,math_to_int:()=>ae,math_trig:()=>re,text_to_number:()=>Te,text_to_number_skulpt:()=>me,turn_to_int:()=>Ie});var n={};__webpack_require__.r(n),__webpack_require__.d(n,{ascii_to_char:()=>Ce,char_to_ascii:()=>Le,number_to_text:()=>be,os_system:()=>ei,text:()=>Ae,text_capital:()=>Ye,text_center:()=>Be,text_char:()=>Se,text_char_at:()=>Ne,text_char_at2:()=>we,text_char_at3:()=>Qe,text_compareTo:()=>$e,text_compare_to:()=>Ve,text_create_with_container:()=>qe,text_create_with_item:()=>Ke,text_encode:()=>Ze,text_equals_starts_ends:()=>ke,text_eval:()=>ti,text_find:()=>Ue,text_format:()=>je,text_format_noreturn:()=>Je,text_join:()=>ve,text_join_seq:()=>Xe,text_length:()=>De,text_random_char:()=>Fe,text_replace:()=>Ge,text_split:()=>He,text_strip:()=>We,text_substring:()=>xe,text_substring2:()=>Pe,text_substring3:()=>ze,text_textarea:()=>ye});var s={};__webpack_require__.r(s),__webpack_require__.d(s,{ENUMERATE:()=>ki,content_in_lists:()=>Yi,enumerate:()=>Vi,list_many_input:()=>Ai,list_tolist:()=>Ci,list_tolist2:()=>xi,list_trig:()=>Oi,lists_2d_get_col_row_data:()=>oi,lists_2d_get_data_with_col_row:()=>ri,lists_append_extend:()=>di,lists_change_to:()=>Ri,lists_change_to_general:()=>Si,lists_clear:()=>mi,lists_create_with:()=>ai,lists_create_with2:()=>Li,lists_create_with_container:()=>ui,lists_create_with_item:()=>pi,lists_create_with_noreturn:()=>yi,lists_create_with_text:()=>li,lists_create_with_text2:()=>bi,lists_del_general:()=>vi,lists_find:()=>Ei,lists_getIndex3:()=>Di,lists_getSublist3:()=>wi,lists_get_index:()=>ni,lists_get_random_item:()=>ci,lists_get_random_sublist:()=>_i,lists_get_sublist:()=>si,lists_insert_value:()=>fi,lists_insert_value2:()=>Fi,lists_pop:()=>Ii,lists_remove_at:()=>gi,lists_remove_at2:()=>Pi,lists_reverse:()=>Ti,lists_setIndex3:()=>Ni,lists_set_index:()=>hi,lists_sort:()=>Mi});var r={};__webpack_require__.r(r),__webpack_require__.d(r,{dicts_add_change_del:()=>en,dicts_add_or_change:()=>qi,dicts_clear:()=>$i,dicts_create_with:()=>Ui,dicts_create_with_container:()=>Xi,dicts_create_with_item:()=>Gi,dicts_create_with_noreturn:()=>rn,dicts_deldict:()=>tn,dicts_delete:()=>Ki,dicts_get:()=>Wi,dicts_get_default:()=>ji,dicts_items:()=>Qi,dicts_keys:()=>Hi,dicts_length:()=>Zi,dicts_pop:()=>nn,dicts_setdefault:()=>sn,dicts_to_json:()=>an,dicts_to_json2:()=>pn,dicts_to_to:()=>un,dicts_todict:()=>on,dicts_update:()=>zi,dicts_values:()=>Ji,json_to_dicts:()=>ln});var o={};__webpack_require__.r(o),__webpack_require__.d(o,{logic_boolean:()=>Tn,logic_compare:()=>dn,logic_compare_continous:()=>cn,logic_is:()=>En,logic_is_in:()=>In,logic_negate:()=>fn,logic_null:()=>mn,logic_operation:()=>_n,logic_tobool:()=>On,logic_true_or_false:()=>gn});var a={};__webpack_require__.r(a),__webpack_require__.d(a,{sdcard_mount:()=>Hn,sdcard_use_spi_init:()=>Gn,storage_can_write_ornot:()=>bn,storage_change_dir:()=>Un,storage_close_file:()=>wn,storage_delete_file:()=>Fn,storage_file_seek:()=>kn,storage_file_tell:()=>xn,storage_file_write:()=>Sn,storage_fileopen:()=>Rn,storage_fileopen_new:()=>An,storage_fileopen_new_encoding:()=>yn,storage_get_a_line:()=>Ln,storage_get_contents:()=>Cn,storage_get_contents_without_para:()=>vn,storage_get_current_dir:()=>Vn,storage_get_file_size:()=>Pn,storage_get_filename:()=>Dn,storage_is_file:()=>Xn,storage_list_all_files:()=>Nn,storage_make_dir:()=>Yn,storage_open_file_with_os:()=>Mn,storage_rename:()=>Bn});var l={};__webpack_require__.r(l),__webpack_require__.d(l,{procedures_callnoreturn:()=>zn,procedures_callreturn:()=>$n,procedures_defnoreturn:()=>Wn,procedures_defreturn:()=>jn,procedures_ifreturn:()=>Qn,procedures_mutatorarg:()=>Kn,procedures_mutatorcontainer:()=>qn,procedures_return:()=>Jn});var u={};__webpack_require__.r(u),__webpack_require__.d(u,{tuple_change_to:()=>ps,tuple_create_with:()=>ts,tuple_create_with_container:()=>es,tuple_create_with_item:()=>is,tuple_create_with_noreturn:()=>_s,tuple_create_with_text2:()=>ns,tuple_create_with_text_return:()=>ss,tuple_del:()=>as,tuple_find:()=>hs,tuple_getIndex:()=>rs,tuple_getSublist:()=>cs,tuple_get_random_item:()=>Ts,tuple_get_sublist:()=>fs,tuple_input:()=>gs,tuple_join:()=>ls,tuple_length:()=>os,tuple_max:()=>us,tuple_totuple:()=>ms,tuple_trig:()=>ds});var p={};__webpack_require__.r(p),__webpack_require__.d(p,{set_add_discard:()=>Cs,set_clear:()=>ys,set_create_with:()=>Es,set_create_with_container:()=>Os,set_create_with_item:()=>Ms,set_create_with_text_return:()=>Ds,set_length:()=>Rs,set_operate:()=>Ss,set_operate_update:()=>vs,set_pop:()=>As,set_sub:()=>Ls,set_toset:()=>ws,set_update:()=>bs});var h={};__webpack_require__.r(h),__webpack_require__.d(h,{html_content:()=>ks,html_content_more:()=>Vs,html_document:()=>Fs,html_form:()=>Bs,html_head_body:()=>xs,html_style:()=>Ys,html_style_color:()=>Xs,html_style_content:()=>Us,html_text:()=>Gs,html_title:()=>Ps});var d={};__webpack_require__.r(d),__webpack_require__.d(d,{attribute_access:()=>nr,function_call:()=>tr,function_call_container:()=>er,function_call_item:()=>ir,raw_block:()=>js,raw_empty:()=>Ks,raw_expression:()=>qs,raw_table:()=>Ws,text_comment:()=>zs,text_print_multiple:()=>Qs,text_print_multiple_container:()=>Js,text_print_multiple_item:()=>Zs,type_check:()=>$s});var c={};__webpack_require__.r(c),__webpack_require__.d(c,{controls_type:()=>lr,controls_typeLists:()=>ur,lists_zip:()=>pr,unpack_iterable_object:()=>hr,variables_change:()=>or,variables_get:()=>sr,variables_global:()=>ar,variables_set:()=>rr});var _={};__webpack_require__.r(_),__webpack_require__.d(_,{Panic_with_status_code:()=>Or,base_setup:()=>cr,controls_delay:()=>Er,controls_flow_statements:()=>Ir,controls_for:()=>Tr,controls_forEach:()=>Sr,controls_for_range:()=>mr,controls_if:()=>_r,controls_interrupts:()=>Ar,controls_lambda:()=>Cr,controls_main:()=>dr,controls_millis:()=>Mr,controls_nointerrupts:()=>yr,controls_pass:()=>br,controls_range:()=>vr,controls_repeat:()=>Vr,controls_repeat_ext:()=>Nr,controls_thread:()=>Dr,controls_try_finally:()=>fr,controls_whileUntil:()=>gr,datetime_fromtimestamp:()=>Yr,do_while:()=>wr,garbage_collection:()=>Fr,gene_unique_identifier:()=>Br,get_mem_alloc:()=>Pr,get_mem_free:()=>xr,get_unique_identifier:()=>kr,reset:()=>Rr,time_sleep:()=>Lr});var f={};__webpack_require__.r(f),__webpack_require__.d(f,{base_map:()=>ao,generate_cartesian_product:()=>uo,math_arithmetic:()=>Wr,math_bit:()=>Hr,math_constant:()=>Xr,math_constant_mp:()=>Gr,math_constrain:()=>to,math_dec:()=>zr,math_degree_to_radian:()=>ho,math_indexer_number:()=>no,math_map:()=>Zr,math_max_min:()=>Qr,math_number:()=>Ur,math_number_base_conversion:()=>eo,math_radian_to_degree:()=>po,math_random:()=>Jr,math_random_seed:()=>io,math_round:()=>so,math_selfcalcu:()=>jr,math_single:()=>qr,math_to_int:()=>$r,math_trig:()=>Kr,text_to_number:()=>ro,text_to_number_skulpt:()=>oo,turn_to_int:()=>lo});var T={};__webpack_require__.r(T),__webpack_require__.d(T,{ascii_to_char:()=>mo,char_to_ascii:()=>go,number_to_text:()=>Io,os_system:()=>Xo,text:()=>co,text_capital:()=>Co,text_center:()=>Lo,text_char:()=>fo,text_char_at:()=>Mo,text_char_at2:()=>Oo,text_char_at3:()=>Yo,text_compareTo:()=>Vo,text_compare_to:()=>yo,text_encode:()=>Bo,text_equals_starts_ends:()=>Ao,text_eval:()=>Uo,text_find:()=>bo,text_format:()=>Po,text_format_noreturn:()=>xo,text_join:()=>To,text_join_seq:()=>Do,text_length:()=>Eo,text_random_char:()=>Ro,text_replace:()=>wo,text_split:()=>No,text_strip:()=>Fo,text_substring:()=>vo,text_substring2:()=>So,text_substring3:()=>ko,text_textarea:()=>_o});var m={};__webpack_require__.r(m),__webpack_require__.d(m,{content_in_lists:()=>Ma,enumerate:()=>Oa,list_many_input:()=>la,list_tolist:()=>Ia,list_tolist2:()=>Ea,list_trig:()=>ra,lists_2d_get_col_row_data:()=>Wo,lists_2d_get_data_with_col_row:()=>Ho,lists_append_extend:()=>$o,lists_change_to:()=>aa,lists_change_to_general:()=>pa,lists_clear:()=>ea,lists_create_with:()=>jo,lists_create_with2:()=>da,lists_create_with_noreturn:()=>ua,lists_create_with_text:()=>qo,lists_create_with_text2:()=>ca,lists_del_general:()=>ha,lists_find:()=>ia,lists_getIndex3:()=>_a,lists_getSublist3:()=>fa,lists_get_index:()=>Ko,lists_get_random_item:()=>Qo,lists_get_random_sublist:()=>Jo,lists_get_sublist:()=>Go,lists_insert_value:()=>Zo,lists_insert_value2:()=>ma,lists_pop:()=>sa,lists_remove_at:()=>na,lists_remove_at2:()=>ga,lists_reverse:()=>ta,lists_setIndex3:()=>Ta,lists_set_index:()=>zo,lists_sort:()=>oa});var g={};__webpack_require__.r(g),__webpack_require__.d(g,{dicts_add_change_del:()=>Pa,dicts_add_or_change:()=>va,dicts_clear:()=>ba,dicts_create_with:()=>Ra,dicts_create_with_noreturn:()=>Va,dicts_deldict:()=>Fa,dicts_delete:()=>Ca,dicts_get:()=>ya,dicts_get_default:()=>Sa,dicts_items:()=>Da,dicts_keys:()=>Aa,dicts_length:()=>Na,dicts_pop:()=>xa,dicts_setdefault:()=>ka,dicts_to_json:()=>Ba,dicts_to_json2:()=>Ga,dicts_to_to:()=>Xa,dicts_todict:()=>Ya,dicts_update:()=>La,dicts_values:()=>wa,json_to_dicts:()=>Ua});var I={};__webpack_require__.r(I),__webpack_require__.d(I,{logic_boolean:()=>Ka,logic_compare:()=>Ha,logic_compare_continous:()=>Wa,logic_is:()=>Ja,logic_is_in:()=>Qa,logic_negate:()=>qa,logic_null:()=>za,logic_operation:()=>ja,logic_tobool:()=>Za,logic_true_or_false:()=>$a});var E={};__webpack_require__.r(E),__webpack_require__.d(E,{sdcard_mount:()=>Ml,sdcard_use_spi_init:()=>Ol,storage_can_write_ornot:()=>ll,storage_change_dir:()=>Tl,storage_close_file:()=>pl,storage_delete_file:()=>dl,storage_file_seek:()=>fl,storage_file_tell:()=>_l,storage_file_write:()=>sl,storage_fileopen:()=>el,storage_fileopen_new:()=>il,storage_fileopen_new_encoding:()=>nl,storage_get_a_line:()=>al,storage_get_contents:()=>ol,storage_get_contents_without_para:()=>rl,storage_get_current_dir:()=>ml,storage_get_file_size:()=>cl,storage_get_filename:()=>ul,storage_is_file:()=>El,storage_list_all_files:()=>hl,storage_make_dir:()=>gl,storage_open_file_with_os:()=>tl,storage_rename:()=>Il});var O={};__webpack_require__.r(O),__webpack_require__.d(O,{procedures_callnoreturn:()=>Sl,procedures_callreturn:()=>yl,procedures_defnoreturn:()=>Al,procedures_defreturn:()=>Rl,procedures_ifreturn:()=>vl,procedures_return:()=>Cl});var M={};__webpack_require__.r(M),__webpack_require__.d(M,{tuple_change_to:()=>kl,tuple_create_with:()=>Ll,tuple_create_with_noreturn:()=>Ul,tuple_create_with_text2:()=>bl,tuple_create_with_text_return:()=>Dl,tuple_del:()=>Fl,tuple_find:()=>Vl,tuple_getIndex:()=>wl,tuple_getSublist:()=>Bl,tuple_get_random_item:()=>Gl,tuple_get_sublist:()=>Xl,tuple_input:()=>Wl,tuple_join:()=>Pl,tuple_length:()=>Nl,tuple_max:()=>xl,tuple_totuple:()=>Hl,tuple_trig:()=>Yl});var R={};__webpack_require__.r(R),__webpack_require__.d(R,{set_add_discard:()=>Jl,set_clear:()=>zl,set_create_with:()=>jl,set_create_with_text_return:()=>eu,set_length:()=>ql,set_operate:()=>$l,set_operate_update:()=>Ql,set_pop:()=>Kl,set_sub:()=>Zl,set_toset:()=>iu,set_update:()=>tu});var A={};__webpack_require__.r(A),__webpack_require__.d(A,{html_content:()=>ou,html_content_more:()=>au,html_document:()=>nu,html_form:()=>uu,html_head_body:()=>ru,html_style:()=>lu,html_style_content:()=>pu,html_text:()=>hu,html_title:()=>su});var y={};__webpack_require__.r(y),__webpack_require__.d(y,{attribute_access:()=>gu,function_call:()=>mu,raw_block:()=>du,raw_empty:()=>_u,raw_expression:()=>cu,raw_table:()=>fu,type_check:()=>Tu});var S={};__webpack_require__.r(S),__webpack_require__.d(S,{AI_ChooseAndGet:()=>Ru,AI_Face_match:()=>Lu,AI_ImageClassify:()=>vu,AI_ImageClassify_Func:()=>Cu,AI_Nlp:()=>wu,AI_Nlp_Func:()=>Fu,AI_Nlp_Func_sim:()=>Pu,AI_Nlp_Sim:()=>Nu,AI_Nlp_Topic:()=>xu,AI_Nlp_newsSummary:()=>ku,AI_Ocr:()=>bu,AI_Ocr_Func:()=>Du,AI_Speech_asr:()=>Su,AI_Speech_synthesis:()=>yu,AI_audio:()=>Vu,AI_client:()=>Au,AI_photo:()=>Yu,AI_result:()=>Bu});var v={};__webpack_require__.r(v),__webpack_require__.d(v,{algorithm_add_path:()=>qu,algorithm_add_school:()=>Gu,algorithm_all_books:()=>up,algorithm_all_books_sequence:()=>pp,algorithm_book_scale:()=>Mp,algorithm_check_feet:()=>Np,algorithm_chick_calculate:()=>wp,algorithm_color_seclet:()=>Qp,algorithm_current_school:()=>Zu,algorithm_del_path:()=>Ku,algorithm_delete_book:()=>gp,algorithm_delete_books:()=>Ip,algorithm_delete_books2:()=>Ep,algorithm_divide_books:()=>Tp,algorithm_find_path:()=>Hu,algorithm_first_book:()=>hp,algorithm_fz_calc:()=>kp,algorithm_fz_calc_first_min:()=>Vp,algorithm_fz_compare:()=>Yp,algorithm_fz_move:()=>Up,algorithm_fz_set_min:()=>Bp,algorithm_get_book_num:()=>Sp,algorithm_get_current_location:()=>zp,algorithm_get_half_books:()=>mp,algorithm_hxdb_add:()=>jp,algorithm_hxdb_init_soldier:()=>Gp,algorithm_hxdb_last_line:()=>Wp,algorithm_hxdb_result:()=>qp,algorithm_hxdb_stand_in_line:()=>Hp,algorithm_init_fzsf:()=>xp,algorithm_init_hxdb:()=>Xp,algorithm_init_jttl:()=>Lp,algorithm_move_recent:()=>np,algorithm_new_path:()=>Wu,algorithm_next_book:()=>_p,algorithm_no_left:()=>$u,algorithm_no_path:()=>tp,algorithm_no_ring2:()=>dp,algorithm_not_home:()=>sp,algorithm_not_school:()=>rp,algorithm_number_add:()=>Ap,algorithm_number_zero:()=>Rp,algorithm_prepare:()=>Xu,algorithm_prepare2:()=>Ju,algorithm_prepare_2_1:()=>ep,algorithm_prepare_2_2:()=>ip,algorithm_print_book2:()=>Op,algorithm_print_divide:()=>Cp,algorithm_print_jttl_answer:()=>Fp,algorithm_print_number:()=>yp,algorithm_print_path:()=>Qu,algorithm_print_path2:()=>op,algorithm_print_sequence:()=>vp,algorithm_rabbit_add:()=>Pp,algorithm_rabbit_number_in_range:()=>Dp,algorithm_rabbit_zero:()=>bp,algorithm_return_path:()=>zu,algorithm_set_path:()=>ju,algorithm_two_left:()=>fp,algorithm_void_path:()=>$p,algorithm_yes_ring2:()=>cp,hanoi_init:()=>ap,hanoi_init_offline:()=>Kp,hanoi_move:()=>lp});var C={};__webpack_require__.r(C),__webpack_require__.d(C,{requests_attribute:()=>ih,requests_get:()=>th,requests_get_old:()=>Zp,requests_method:()=>nh,requests_post:()=>eh});var L={};__webpack_require__.r(L),__webpack_require__.d(L,{cv_destroy_all:()=>uh,cv_face_classifier:()=>dh,cv_face_detect:()=>ch,cv_face_detect_all:()=>_h,cv_line_rect:()=>ph,cv_read_image:()=>rh,cv_show_image:()=>oh,cv_text:()=>hh,cv_waitkey:()=>lh,cv_write_image:()=>ah});var b={};__webpack_require__.r(b),__webpack_require__.d(b,{array_create:()=>Dh,array_toarray:()=>Wh,dataframe_aggregate_func:()=>Bd,dataframe_create:()=>gh,dataframe_create_from_index:()=>Eh,dataframe_create_from_one_index:()=>Ih,dataframe_fillna:()=>Sd,dataframe_get:()=>Xh,dataframe_groupby:()=>Yd,dataframe_head_tail:()=>kd,dataframe_info:()=>vd,dataframe_median:()=>yd,dataframe_select:()=>Vd,dataframe_sort_values:()=>xd,matrix_multiplication:()=>Rd,matrix_transpose:()=>Md,numpy_argmin_template_match:()=>_d,numpy_astype:()=>hd,numpy_c_:()=>Ed,numpy_dot:()=>Dd,numpy_linalg_det:()=>Od,numpy_linalg_inv:()=>Ad,numpy_max:()=>Ld,numpy_mean:()=>fd,numpy_mean_digit:()=>cd,numpy_min:()=>Cd,numpy_ones:()=>Id,numpy_random_random:()=>Fd,numpy_reshape:()=>pd,numpy_shape:()=>ud,numpy_size:()=>bd,numpy_square:()=>wd,numpy_std:()=>Td,numpy_sum:()=>Nd,numpy_trig:()=>Yh,pandas_drop_columns:()=>gd,pandas_dropna:()=>md,pandas_readcsv:()=>Uh,pl_axes:()=>vh,pl_bar:()=>Ph,pl_hist:()=>kh,pl_label:()=>bh,pl_legend:()=>Ch,pl_pie:()=>xh,pl_plot:()=>yh,pl_plot_bar:()=>wh,pl_plot_easy:()=>Ah,pl_plot_scatter:()=>Nh,pl_plot_xy:()=>Fh,pl_savefig:()=>Gh,pl_show:()=>Sh,pl_subplot:()=>Bh,pl_text:()=>Hh,pl_ticks:()=>Vh,pl_title:()=>Lh,plot_axes:()=>zh,plot_bar:()=>id,plot_cla:()=>Ud,plot_hist:()=>sd,plot_label:()=>Jh,plot_legend:()=>$h,plot_pie:()=>nd,plot_plot:()=>qh,plot_plot_bar:()=>Zh,plot_plot_easy:()=>jh,plot_plot_scatter:()=>td,plot_plot_xy:()=>ed,plot_savefig:()=>ad,plot_show:()=>Kh,plot_subplot:()=>od,plot_text:()=>ld,plot_ticks:()=>rd,plot_title:()=>Qh,py_sum:()=>Pd,pylab_imshow:()=>dd,series_create:()=>Th,series_create_from_index:()=>mh,series_create_from_text:()=>Oh,series_get_num:()=>Rh,series_index_value:()=>Mh});var D={};__webpack_require__.r(D),__webpack_require__.d(D,{ds_add_node_by_attr:()=>$d,ds_add_node_by_name:()=>zd,ds_create_linkedlist:()=>Gd,ds_create_linkedlist_container:()=>Hd,ds_create_linkedlist_item:()=>Wd,ds_create_node:()=>jd,ds_del_node_by_attr:()=>Jd,ds_del_node_by_name:()=>Qd,ds_get_node_attr:()=>qd,ds_reverse_linkedlist:()=>Zd,ds_set_node_attr:()=>Kd});var w={};__webpack_require__.r(w),__webpack_require__.d(w,{factory_block:()=>pc,factory_block_return:()=>hc,factory_block_return_with_textarea:()=>cc,factory_block_with_textarea:()=>dc,factory_callMethod_noreturn:()=>lc,factory_callMethod_return:()=>uc,factory_create_with_container:()=>sc,factory_create_with_item:()=>rc,factory_declare:()=>ac,factory_from_import:()=>ec,factory_function_noreturn:()=>nc,factory_function_return:()=>oc,factory_import:()=>ic});var N={};__webpack_require__.r(N),__webpack_require__.d(N,{hardware_arduino_analog_read:()=>Ec,hardware_arduino_analog_write:()=>Ic,hardware_arduino_digital_read:()=>gc,hardware_arduino_digital_write:()=>mc,hardware_arduino_start:()=>fc,inout_highlow:()=>Tc});var F={};__webpack_require__.r(F),__webpack_require__.d(F,{inout_input:()=>Oc,inout_print:()=>Mc,inout_print_container:()=>Cc,inout_print_end:()=>Ac,inout_print_inline:()=>Rc,inout_print_item:()=>Lc,inout_print_many:()=>vc,inout_type_input:()=>yc,pyinout_type_input:()=>Sc});var P={};__webpack_require__.r(P),__webpack_require__.d(P,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>Zc,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>Jc,IOT_EMQX_PING:()=>$c,IOT_FORMATTING:()=>Kc,IOT_FORMAT_STRING:()=>zc,IOT_MIXIO_NTP:()=>Qc,IOT_MIXIO_PUBLISH:()=>Bc,IOT_MIXIO_SUBSCRIBE:()=>Uc,IOT_MIXIO_UNSUBSCRIBE:()=>Xc,iot_checkonenet:()=>u_,iot_client_onboard:()=>i_,iot_create_with_item:()=>Vc,iot_http_client:()=>n_,iot_http_data:()=>s_,iot_mixio_check:()=>Wc,iot_mixio_connect:()=>Yc,iot_mixio_connect_only:()=>Hc,iot_mixio_disconnect:()=>Gc,iot_mixio_format_msg:()=>qc,iot_mixio_format_topic:()=>jc,iot_mixly_key:()=>e_,iot_mixly_key_py:()=>t_,iot_mqtt_client:()=>r_,iot_mqtt_data:()=>o_,iot_onenet_check:()=>Nc,iot_onenet_connect:()=>Dc,iot_onenet_disconnect:()=>wc,iot_onenet_publish:()=>Pc,iot_onenet_publish_dict:()=>Fc,iot_onenetconnect:()=>a_,iot_onenetdisconnect:()=>l_,iot_publish:()=>p_,iot_publish_container:()=>xc,iot_publish_item:()=>kc});var x={};__webpack_require__.r(x),__webpack_require__.d(x,{pins_analog_read:()=>f_,pins_analog_write:()=>__,pins_digital_read:()=>c_,pins_digital_write:()=>d_});var k={};__webpack_require__.r(k),__webpack_require__.d(k,{serial_close:()=>I_,serial_open:()=>T_,serial_read_b:()=>g_,serial_write:()=>m_});var V={};__webpack_require__.r(V),__webpack_require__.d(V,{sklearn_DecisionTreeClassifier_Regressor:()=>b_,sklearn_GaussianNB:()=>N_,sklearn_KMeans:()=>x_,sklearn_KMeans_fit:()=>k_,sklearn_KNeighborsClassifier_Regressor:()=>w_,sklearn_LinearRegression:()=>C_,sklearn_RandomForestClassifier_Regressor:()=>D_,sklearn_Ridge:()=>L_,sklearn_cluster_centers_labels_inertia:()=>H_,sklearn_coef_intercept:()=>G_,sklearn_data_target:()=>y_,sklearn_fit:()=>V_,sklearn_fit_no_target:()=>Y_,sklearn_load:()=>A_,sklearn_make_blobs:()=>R_,sklearn_make_classification:()=>O_,sklearn_make_regression:()=>M_,sklearn_pca:()=>F_,sklearn_pca_fit_transform:()=>P_,sklearn_predict:()=>B_,sklearn_save_load_model:()=>W_,sklearn_score:()=>U_,sklearn_score_no_target:()=>X_,sklearn_train_test_split:()=>S_,sklearn_train_test_split_no_target:()=>v_});var Y={};__webpack_require__.r(Y),__webpack_require__.d(Y,{Panic_with_status_code:()=>$_,base_delay:()=>q_,controls_millis:()=>K_,controls_mstimer2:()=>J_,controls_mstimer2_start:()=>Z_,controls_mstimer2_stop:()=>tf,reset:()=>Q_,time_localtime:()=>z_,time_sleep:()=>ef});var B={};__webpack_require__.r(B),__webpack_require__.d(B,{turtle_bgcolor:()=>Rf,turtle_bgcolor_hex:()=>wf,turtle_bgcolor_hex_new:()=>vf,turtle_circle:()=>Ef,turtle_circle_advanced:()=>Of,turtle_clear:()=>_f,turtle_clone:()=>Sf,turtle_color:()=>bf,turtle_color_hex:()=>Df,turtle_color_seclet:()=>Xf,turtle_create:()=>sf,turtle_done:()=>rf,turtle_exitonclick:()=>of,turtle_fill:()=>Tf,turtle_fillcolor:()=>yf,turtle_fillcolor_hex:()=>Ff,turtle_fillcolor_hex_new:()=>Lf,turtle_getscreen:()=>Gf,turtle_goto:()=>hf,turtle_listen:()=>qf,turtle_move:()=>af,turtle_numinput:()=>kf,turtle_onclick:()=>Wf,turtle_onkey:()=>Hf,turtle_ontimer:()=>jf,turtle_pencolor:()=>Af,turtle_pencolor_hex:()=>Nf,turtle_pencolor_hex_new:()=>Cf,turtle_penup:()=>ff,turtle_pos_shape:()=>cf,turtle_rotate:()=>lf,turtle_screen_delay:()=>pf,turtle_screen_savefig:()=>Kf,turtle_setheading:()=>uf,turtle_setxy:()=>df,turtle_shape:()=>Pf,turtle_shapesize:()=>xf,turtle_size:()=>gf,turtle_size_speed:()=>mf,turtle_speed:()=>If,turtle_textinput:()=>Vf,turtle_visible:()=>Mf,turtle_write:()=>Yf,turtle_write_format:()=>Bf,turtle_write_format_skulpt:()=>Uf});var U={};__webpack_require__.r(U),__webpack_require__.d(U,{AI_ChooseAndGet:()=>zf,AI_Face_match:()=>tT,AI_ImageClassify:()=>Zf,AI_ImageClassify_Func:()=>oT,AI_Nlp:()=>iT,AI_Nlp_Func:()=>lT,AI_Nlp_Func_sim:()=>uT,AI_Nlp_Sim:()=>nT,AI_Nlp_Topic:()=>sT,AI_Nlp_newsSummary:()=>rT,AI_Ocr:()=>eT,AI_Ocr_Func:()=>aT,AI_Speech_asr:()=>Jf,AI_Speech_synthesis:()=>Qf,AI_audio:()=>pT,AI_client:()=>$f,AI_photo:()=>hT,AI_result:()=>dT});var X={};__webpack_require__.r(X),__webpack_require__.d(X,{algorithm_add_path:()=>gT,algorithm_add_school:()=>_T,algorithm_all_books:()=>PT,algorithm_all_books_sequence:()=>FT,algorithm_book_scale:()=>WT,algorithm_check_feet:()=>ZT,algorithm_chick_calculate:()=>JT,algorithm_color_seclet:()=>Tm,algorithm_current_school:()=>AT,algorithm_del_path:()=>IT,algorithm_delete_book:()=>GT,algorithm_divide_books:()=>UT,algorithm_find_path:()=>fT,algorithm_first_book:()=>xT,algorithm_fz_calc:()=>nm,algorithm_fz_compare:()=>sm,algorithm_fz_move:()=>om,algorithm_fz_set_min:()=>rm,algorithm_get_current_location:()=>_m,algorithm_get_half_books:()=>XT,algorithm_hxdb_add:()=>hm,algorithm_hxdb_init_soldier:()=>lm,algorithm_hxdb_last_line:()=>pm,algorithm_hxdb_result:()=>dm,algorithm_hxdb_stand_in_line:()=>um,algorithm_init_fzsf:()=>im,algorithm_init_hxdb:()=>am,algorithm_init_jttl:()=>zT,algorithm_move_recent:()=>CT,algorithm_new_path:()=>TT,algorithm_next_book:()=>YT,algorithm_no_left:()=>OT,algorithm_no_path:()=>yT,algorithm_no_ring2:()=>kT,algorithm_not_home:()=>LT,algorithm_not_school:()=>bT,algorithm_number_add:()=>qT,algorithm_number_zero:()=>jT,algorithm_prepare:()=>cT,algorithm_prepare2:()=>RT,algorithm_prepare_2_1:()=>ST,algorithm_prepare_2_2:()=>vT,algorithm_print_book2:()=>HT,algorithm_print_jttl_answer:()=>tm,algorithm_print_number:()=>KT,algorithm_print_path:()=>MT,algorithm_print_path2:()=>DT,algorithm_rabbit_add:()=>em,algorithm_rabbit_number_in_range:()=>QT,algorithm_rabbit_zero:()=>$T,algorithm_return_path:()=>ET,algorithm_set_path:()=>mT,algorithm_two_left:()=>BT,algorithm_void_path:()=>fm,algorithm_yes_ring2:()=>VT,hanoi_init:()=>wT,hanoi_init_offline:()=>cm,hanoi_move:()=>NT});var G={};__webpack_require__.r(G),__webpack_require__.d(G,{requests_attribute:()=>Em,requests_get:()=>gm,requests_get_old:()=>mm,requests_method:()=>Om,requests_post:()=>Im});var H={};__webpack_require__.r(H),__webpack_require__.d(H,{array_create:()=>Vm,array_toarray:()=>Jm,dataframe_aggregate_func:()=>qg,dataframe_create:()=>ym,dataframe_create_from_index:()=>Sm,dataframe_create_from_one_index:()=>vm,dataframe_fillna:()=>Ng,dataframe_get:()=>zm,dataframe_groupby:()=>jg,dataframe_head_tail:()=>Hg,dataframe_info:()=>Fg,dataframe_median:()=>wg,dataframe_select:()=>Wg,dataframe_sort_values:()=>Gg,matrix_multiplication:()=>bg,matrix_transpose:()=>Lg,numpy_argmin_template_match:()=>Og,numpy_astype:()=>gg,numpy_c_:()=>vg,numpy_dot:()=>Vg,numpy_linalg_det:()=>Cg,numpy_linalg_inv:()=>Dg,numpy_max:()=>xg,numpy_mean:()=>Mg,numpy_mean_digit:()=>Eg,numpy_min:()=>Pg,numpy_ones:()=>Sg,numpy_random_random:()=>Ug,numpy_reshape:()=>mg,numpy_shape:()=>Tg,numpy_size:()=>kg,numpy_square:()=>Yg,numpy_std:()=>Rg,numpy_sum:()=>Bg,numpy_trig:()=>jm,pandas_drop_columns:()=>yg,pandas_dropna:()=>Ag,pandas_readcsv:()=>Km,pl_axes:()=>wm,pl_bar:()=>Xm,pl_hist:()=>Hm,pl_label:()=>km,pl_legend:()=>Pm,pl_pie:()=>Gm,pl_plot:()=>Fm,pl_plot_bar:()=>Ym,pl_plot_easy:()=>Nm,pl_plot_scatter:()=>Bm,pl_plot_xy:()=>Um,pl_savefig:()=>$m,pl_show:()=>Dm,pl_subplot:()=>qm,pl_text:()=>Qm,pl_ticks:()=>Wm,pl_title:()=>xm,plot_axes:()=>tg,plot_bar:()=>ug,plot_cla:()=>Kg,plot_hist:()=>hg,plot_label:()=>rg,plot_legend:()=>ng,plot_pie:()=>pg,plot_plot:()=>ig,plot_plot_bar:()=>og,plot_plot_easy:()=>eg,plot_plot_scatter:()=>ag,plot_plot_xy:()=>lg,plot_savefig:()=>_g,plot_show:()=>Zm,plot_subplot:()=>cg,plot_text:()=>fg,plot_ticks:()=>dg,plot_title:()=>sg,py_sum:()=>Xg,pylab_imshow:()=>Ig,series_create:()=>Rm,series_create_from_index:()=>Am,series_create_from_text:()=>Cm,series_get_num:()=>bm,series_index_value:()=>Lm});var W={};__webpack_require__.r(W),__webpack_require__.d(W,{ds_add_node_by_attr:()=>tI,ds_add_node_by_name:()=>Zg,ds_create_linkedlist:()=>zg,ds_create_node:()=>$g,ds_del_node_by_attr:()=>iI,ds_del_node_by_name:()=>eI,ds_get_node_attr:()=>Qg,ds_reverse_linkedlist:()=>nI,ds_set_node_attr:()=>Jg});var j={};__webpack_require__.r(j),__webpack_require__.d(j,{factory_block:()=>hI,factory_block_return:()=>dI,factory_block_return_with_textarea:()=>_I,factory_block_with_textarea:()=>cI,factory_callMethod_noreturn:()=>uI,factory_callMethod_return:()=>pI,factory_declare:()=>lI,factory_from_import:()=>sI,factory_function_noreturn:()=>oI,factory_function_return:()=>aI,factory_import:()=>rI});var q={};__webpack_require__.r(q),__webpack_require__.d(q,{hardware_arduino_analog_read:()=>II,hardware_arduino_analog_write:()=>EI,hardware_arduino_digital_read:()=>gI,hardware_arduino_digital_write:()=>mI,hardware_arduino_start:()=>fI,inout_highlow:()=>TI});var K={};__webpack_require__.r(K),__webpack_require__.d(K,{inout_input:()=>OI,inout_print:()=>MI,inout_print_end:()=>AI,inout_print_inline:()=>RI,inout_print_many:()=>vI,inout_type_input:()=>yI,pyinout_type_input:()=>SI});var z={};__webpack_require__.r(z),__webpack_require__.d(z,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>YI,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>XI,IOT_EMQX_PING:()=>GI,IOT_FORMATTING:()=>kI,IOT_FORMAT_STRING:()=>VI,IOT_MIXIO_NTP:()=>HI,IOT_MIXIO_PUBLISH:()=>LI,IOT_MIXIO_SUBSCRIBE:()=>bI,IOT_MIXIO_UNSUBSCRIBE:()=>DI,iot_mixio_check:()=>FI,iot_mixio_connect:()=>CI,iot_mixio_connect_only:()=>NI,iot_mixio_disconnect:()=>wI,iot_mixio_format_msg:()=>xI,iot_mixio_format_topic:()=>PI,iot_mixly_key:()=>BI,iot_mixly_key_py:()=>UI});var Q={};__webpack_require__.r(Q),__webpack_require__.d(Q,{pins_analog_read:()=>zI,pins_analog_write:()=>KI,pins_digital:()=>WI,pins_digital_read:()=>qI,pins_digital_write:()=>jI});var J={};__webpack_require__.r(J),__webpack_require__.d(J,{serial_close:()=>ZI,serial_open:()=>$I,serial_read_b:()=>JI,serial_write:()=>QI});var Z={};__webpack_require__.r(Z),__webpack_require__.d(Z,{sklearn_DecisionTreeClassifier_Regressor:()=>uE,sklearn_GaussianNB:()=>dE,sklearn_KMeans:()=>fE,sklearn_KMeans_fit:()=>TE,sklearn_KNeighborsClassifier_Regressor:()=>hE,sklearn_LinearRegression:()=>aE,sklearn_RandomForestClassifier_Regressor:()=>pE,sklearn_Ridge:()=>lE,sklearn_cluster_centers_labels_inertia:()=>RE,sklearn_coef_intercept:()=>ME,sklearn_data_target:()=>sE,sklearn_fit:()=>mE,sklearn_fit_no_target:()=>gE,sklearn_load:()=>nE,sklearn_make_blobs:()=>iE,sklearn_make_classification:()=>tE,sklearn_make_regression:()=>eE,sklearn_pca:()=>cE,sklearn_pca_fit_transform:()=>_E,sklearn_predict:()=>IE,sklearn_save_load_model:()=>AE,sklearn_score:()=>EE,sklearn_score_no_target:()=>OE,sklearn_train_test_split:()=>rE,sklearn_train_test_split_no_target:()=>oE});var tt={};__webpack_require__.r(tt),__webpack_require__.d(tt,{controls_end_program:()=>SE,controls_millis:()=>yE,time_localtime:()=>vE});var et={};__webpack_require__.r(et),__webpack_require__.d(et,{turtle_bgcolor:()=>qE,turtle_bgcolor_hex:()=>QE,turtle_bgcolor_hex_new:()=>tO,turtle_circle:()=>GE,turtle_circle_advanced:()=>WE,turtle_clear:()=>kE,turtle_clone:()=>$E,turtle_color:()=>sO,turtle_color_hex:()=>nO,turtle_color_seclet:()=>dO,turtle_create:()=>CE,turtle_done:()=>LE,turtle_exitonclick:()=>bE,turtle_fill:()=>YE,turtle_fillcolor:()=>zE,turtle_fillcolor_hex:()=>ZE,turtle_fillcolor_hex_new:()=>iO,turtle_getscreen:()=>cO,turtle_goto:()=>PE,turtle_listen:()=>mO,turtle_move:()=>DE,turtle_numinput:()=>lO,turtle_onclick:()=>fO,turtle_onkey:()=>_O,turtle_ontimer:()=>TO,turtle_pencolor:()=>KE,turtle_pencolor_hex:()=>JE,turtle_pencolor_hex_new:()=>eO,turtle_penup:()=>VE,turtle_pos_shape:()=>xE,turtle_rotate:()=>wE,turtle_screen_delay:()=>FE,turtle_screen_savefig:()=>gO,turtle_setheading:()=>NE,turtle_setxy:()=>HE,turtle_shape:()=>rO,turtle_shapesize:()=>oO,turtle_size:()=>UE,turtle_size_speed:()=>BE,turtle_speed:()=>XE,turtle_textinput:()=>aO,turtle_visible:()=>jE,turtle_write:()=>uO,turtle_write_format:()=>pO,turtle_write_format_skulpt:()=>hO});var it={};__webpack_require__.r(it),__webpack_require__.d(it,{COPYFILE_EXCL:()=>nM,COPYFILE_FICLONE:()=>sM,COPYFILE_FICLONE_FORCE:()=>rM,F_OK:()=>ZO,O_APPEND:()=>cM,O_CREAT:()=>uM,O_DIRECT:()=>EM,O_DIRECTORY:()=>_M,O_DSYNC:()=>gM,O_EXCL:()=>pM,O_NOATIME:()=>fM,O_NOCTTY:()=>hM,O_NOFOLLOW:()=>TM,O_NONBLOCK:()=>OM,O_RDONLY:()=>oM,O_RDWR:()=>lM,O_SYMLINK:()=>IM,O_SYNC:()=>mM,O_TRUNC:()=>dM,O_WRONLY:()=>aM,R_OK:()=>tM,S_IFBLK:()=>SM,S_IFCHR:()=>CM,S_IFDIR:()=>vM,S_IFIFO:()=>LM,S_IFLNK:()=>AM,S_IFMT:()=>MM,S_IFREG:()=>yM,S_IFSOCK:()=>RM,S_IRGRP:()=>VM,S_IROTH:()=>XM,S_IRUSR:()=>FM,S_IRWXG:()=>kM,S_IRWXO:()=>UM,S_IRWXU:()=>NM,S_ISGID:()=>DM,S_ISUID:()=>bM,S_ISVTX:()=>wM,S_IWGRP:()=>YM,S_IWOTH:()=>GM,S_IWUSR:()=>PM,S_IXGRP:()=>BM,S_IXOTH:()=>HM,S_IXUSR:()=>xM,UV_FS_O_FILEMAP:()=>WM,W_OK:()=>eM,X_OK:()=>iM,size_max:()=>jM});var nt={};__webpack_require__.r(nt),__webpack_require__.d(nt,{FileHandle:()=>cy,access:()=>Yy,appendFile:()=>Ay,chmod:()=>Ny,chown:()=>Dy,constants:()=>it,copyFile:()=>Xy,cp:()=>Hy,exists:()=>fy,lchmod:()=>Fy,lchown:()=>wy,link:()=>Cy,lstat:()=>my,lutimes:()=>xy,mkdir:()=>Sy,mkdtemp:()=>Uy,open:()=>Oy,opendir:()=>Gy,readFile:()=>My,readdir:()=>vy,readlink:()=>by,realpath:()=>ky,rename:()=>_y,rm:()=>By,rmdir:()=>yy,stat:()=>Ty,statfs:()=>Wy,symlink:()=>Ly,truncate:()=>gy,unlink:()=>Iy,utimes:()=>Py,watch:()=>Vy,writeFile:()=>Ry});var st={};__webpack_require__.r(st),__webpack_require__.d(st,{BigIntStatsFs:()=>ZM,Dir:()=>ay,Dirent:()=>oy,ReadStream:()=>uy,Stats:()=>$M,StatsFs:()=>JM,WriteStream:()=>py,_synced:()=>iA,access:()=>SS,accessSync:()=>QA,appendFile:()=>iS,appendFileSync:()=>vA,chmod:()=>OS,chmodSync:()=>jA,chown:()=>IS,chownSync:()=>HA,chroot:()=>aA,close:()=>sS,closeSync:()=>LA,constants:()=>it,copyFile:()=>PS,copyFileSync:()=>ty,cp:()=>YS,cpSync:()=>sy,createReadStream:()=>DS,createWriteStream:()=>wS,exists:()=>Ky,existsSync:()=>TA,fchmod:()=>hS,fchmodSync:()=>xA,fchown:()=>pS,fchownSync:()=>PA,fdatasync:()=>aS,fdatasyncSync:()=>wA,fstat:()=>nS,fstatSync:()=>CA,fsync:()=>oS,fsyncSync:()=>DA,ftruncate:()=>rS,ftruncateSync:()=>bA,futimes:()=>dS,futimesSync:()=>kA,lchmod:()=>MS,lchmodSync:()=>qA,lchown:()=>ES,lchownSync:()=>WA,link:()=>TS,linkSync:()=>UA,lopenSync:()=>RA,lstat:()=>$y,lstatSync:()=>gA,lutimes:()=>AS,lutimesSync:()=>zA,mkdir:()=>_S,mkdirSync:()=>YA,mkdtemp:()=>FS,mkdtempSync:()=>ZA,mount:()=>ZR,mountObject:()=>rA,mounts:()=>JR,open:()=>Zy,openAsBlob:()=>US,openSync:()=>MA,opendir:()=>VS,opendirSync:()=>ny,promises:()=>nt,read:()=>uS,readFile:()=>tS,readFileSync:()=>yA,readSync:()=>FA,readdir:()=>fS,readdirSync:()=>BA,readlink:()=>gS,readlinkSync:()=>GA,readv:()=>xS,readvSync:()=>ey,realpath:()=>yS,realpathSync:()=>$A,rename:()=>qy,renameSync:()=>fA,rm:()=>NS,rmSync:()=>JA,rmdir:()=>cS,rmdirSync:()=>VA,stat:()=>zy,statSync:()=>mA,statfs:()=>BS,statfsSync:()=>ry,symlink:()=>mS,symlinkSync:()=>XA,truncate:()=>Qy,truncateSync:()=>IA,umount:()=>tA,unlink:()=>Jy,unlinkSync:()=>EA,unwatchFile:()=>LS,utimes:()=>RS,utimesSync:()=>KA,watch:()=>bS,watchFile:()=>CS,write:()=>lS,writeFile:()=>eS,writeFileSync:()=>SA,writeSync:()=>NA,writev:()=>kS,writevSync:()=>iy});const rt=Blockly;Object.assign(rt.Lang.ZhHans,{PYTHON_PYODIDE_IMAGE:"图像",PYTHON_PYODIDE_LOADING:"Python3内核载入中...",PYTHON_PYODIDE_FILE_SYSTEM:"本地文件系统",PYTHON_PYODIDE_LOAD_FILE_SYSTEM:"载入本地文件夹"}),Object.assign(rt.Lang.ZhHant,{PYTHON_PYODIDE_IMAGE:"影像",PYTHON_PYODIDE_LOADING:"Python3核心載入...",PYTHON_PYODIDE_FILE_SYSTEM:"本機檔案系統",PYTHON_PYODIDE_LOAD_FILE_SYSTEM:"載入本機資料夾"}),Object.assign(rt.Lang.En,{PYTHON_PYODIDE_IMAGE:"Image",PYTHON_PYODIDE_LOADING:"Python3 kernel loading...",PYTHON_PYODIDE_FILE_SYSTEM:"Local File System",PYTHON_PYODIDE_LOAD_FILE_SYSTEM:"Load Local Folder"}),Object.assign(rt.Lang.ZhHans.MSG,{}),Object.assign(rt.Lang.ZhHant.MSG,{}),Object.assign(rt.Lang.En.MSG,{});const ot=Mixly,at={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(o+=n)):i=o}else i="i";return i}},lt=at; -/** - * @license - * Visual Blocks Editor - * - * Copyright 2012 Google Inc. - * https://developers.google.com/blockly/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class ut{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var i=t.split(","),n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(rt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(rt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(rt.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var r=t.newBlock("controls_if_else");r.initSvg(),i.connect(r.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],r=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,r=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,r)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),r=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(r.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(rt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(rt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(rt.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},Ct={init:function(){this.setColour(Mt),this.appendValueInput("FROM").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.PYTHON_RANGE).appendField(rt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(rt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Lt={init:function(){this.setColour(Mt),this.appendValueInput("LIST").setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(rt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return rt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},bt={init:function(){this.setColour(Mt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(rt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new rt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(rt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:rt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:rt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Dt={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(rt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new rt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(rt.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(rt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(rt.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var r=t.newBlock("controls_finally");r.initSvg(),i.connect(r.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],r=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,r=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,r)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),r=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(r.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(rt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(rt.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},wt={init:function(){this.setColour(Mt);var t=new rt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(rt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:rt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:rt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},Nt={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new rt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return rt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Ft={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new rt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(rt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return rt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};bt.OPERATORS=[[rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],wt.OPERATORS=[[rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[rt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Pt={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(rt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},xt={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},kt={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(rt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Vt={init:function(){this.setColour(Mt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},Yt={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(rt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Bt={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(rt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Ut={init:function(){this.jsonInit({message0:rt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:Mt,tooltip:rt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:rt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Xt={init:function(){this.setColour(Mt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(rt.Msg.MIXLY_STAT),this.setOutput(!0)}},Gt={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},Ht={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(rt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},Wt={init:function(){this.appendDummyInput().appendField(rt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+rt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(rt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new rt.FieldDropdown([[rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[rt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Mt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},jt={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qt={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},Kt={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},zt={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.MIXLY_GET+rt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(rt.Msg.PROCEDURES_DEFRETURN_RETURN+rt.Msg.MIXLY_GET_UNIQUE_IDEN)}},$t={init:function(){this.setColour(Mt),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(rt.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},Qt={init:function(){this.setColour(Mt),this.appendDummyInput().appendField(rt.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},Jt=230;rt.FieldTextInput.math_number_validator=function(t){return String(t)},rt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const Zt={init:function(){this.setColour(Jt),this.appendDummyInput().appendField(new rt.FieldTextInput("0",rt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(rt.Msg.MATH_NUMBER_TOOLTIP)}},te={init:function(){this.setColour(Jt);this.appendDummyInput("").appendField(rt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new rt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},ee={init:function(){this.setColour(Jt);this.appendDummyInput("").appendField(rt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new rt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:rt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},ie={init:function(){this.setColour(Jt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new rt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:rt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:rt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:rt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:rt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:rt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},ne={init:function(){this.setColour(Jt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new rt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:rt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:rt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:rt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:rt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:rt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:rt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},se={init:function(){this.setColour(Jt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new rt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},re={init:function(){this.setColour(Jt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new rt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:rt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:rt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:rt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:rt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:rt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:rt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:rt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},oe={init:function(){var t=[[rt.Msg.MATH_BIN,"bin"],[rt.Msg.MATH_OCT,"oct"],[rt.Msg.MATH_HEX,"hex"]];this.setColour(Jt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new rt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:rt.Msg.MATH_DEC_TOOLTIP_BIN,oct:rt.Msg.MATH_DEC_TOOLTIP_OCT,hex:rt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},ae={init:function(){var t=[[rt.Msg.LANG_MATH_TO_ROUND,"round"],[rt.Msg.LANG_MATH_TO_CEIL,"ceil"],[rt.Msg.LANG_MATH_TO_FLOOR,"floor"],[rt.Msg.MATH_ABS,"fabs"],[rt.Msg.MATH_SQRT,"sqrt"]];this.setColour(Jt),this.appendValueInput("A").setCheck(Number).appendField(new rt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:rt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:rt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:rt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:rt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:rt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:rt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},le={init:function(){var t=[[rt.Msg.MIXLY_MAX,"max"],[rt.Msg.MIXLY_MIN,"min"]];this.setColour(Jt),this.appendValueInput("A").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(new rt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(rt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:rt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:rt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},ue={init:function(){var t=[[rt.Msg.MATH_TWO,"two"],[rt.Msg.MATH_EIGHT,"eight"],[rt.Msg.MATH_TEN,"ten"],[rt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(Jt),this.appendDummyInput("").appendField(rt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new rt.FieldDropdown(t),"OP").appendField(rt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(rt.Msg.MATH_ZHW).appendField(new rt.FieldDropdown(t),"OP2").appendField(rt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:rt.Msg.MATH_Before_two,eight:rt.Msg.MATH_Before_eight,ten:rt.Msg.MATH_Before_ten,sixteen:rt.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:rt.Msg.MATH_Behind_two,eight:rt.Msg.MATH_Behind_eight,ten:rt.Msg.MATH_Behind_ten,sixteen:rt.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},pe={init:function(){var t=[[rt.Msg.LANG_MATH_INT,"int"],[rt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Jt),this.setOutput(!0,Number),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new rt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(rt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:rt.Msg.LANG_MATH_INT,float:rt.Msg.LANG_MATH_FLOAT_RANDOM};return rt.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},he={init:function(){this.setColour(Jt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(rt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(rt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(rt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(rt.Msg.MATH_CONSTRAIN_TOOLTIP)}},de={init:function(){this.setColour(Jt),this.appendValueInput("NUM",Number).appendField(rt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(rt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(rt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},ce={init:function(){this.setColour(Jt),this.appendDummyInput().appendField(new rt.FieldTextInput("0",rt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(rt.Msg.MATH_NUMBER_TOOLTIP)}},_e={init:function(){this.setColour(Jt),this.appendValueInput("NUM").setCheck(Number).appendField(rt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},fe={init:function(){this.setColour(Jt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(rt.Msg.MATH_ROUND).appendField(rt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(rt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(rt.Msg.MATH_ROUND_NEW_TOOLTIP)}},Te={init:function(){var t=[[rt.Msg.MIXLY_TO_INT,"int"],[rt.Msg.MIXLY_TO_FLOAT,"float"],[rt.Msg.MIXLY_TO_BITES,"b"],[rt.Msg.LANG_MATH_BYTE+rt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(Jt),this.appendValueInput("VAR").appendField(new rt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:rt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:rt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:rt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},me={init:function(){var t=[[rt.Msg.MIXLY_TO_INT,"int"],[rt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Jt),this.appendValueInput("VAR").appendField(new rt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:rt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:rt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},ge=de,Ie={init:function(){this.setColour(Jt),this.appendValueInput("VAR").appendField(rt.Msg.LANG_MATH_BYTE+rt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(rt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},Ee={init:function(){this.setColour(Jt),this.itemCount_=1,this.setMutator(new rt.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(rt.Msg.MIXLY_PRODUCT+rt.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(rt.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(rt.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(rt.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const Se={init:function(){this.setColour(Re),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new rt.FieldTextInput("",rt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(rt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new rt.FieldImage(e,7,12,'"')}},ve={init:function(){this.setColour(Re),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(rt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},Ce={init:function(){this.setColour(Re),this.appendValueInput("VAR").setCheck(Number).appendField(rt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},Le={init:function(){this.setColour(Re),this.appendValueInput("VAR").setCheck(String).appendField(rt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},be={init:function(){this.setColour(Re),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(rt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},De={init:function(){this.setColour(Re),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},we={init:function(){this.WHERE_OPTIONS=[[rt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[rt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[rt.Msg.TEXT_GET_INDEX_RANDOM+1+rt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(rt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Re),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(rt.Msg.LISTS_GET_INDEX_GET,"MODE"),rt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(rt.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=rt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=rt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=rt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=rt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+rt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",rt.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:rt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:rt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:rt.Msg.TEXT_GET_INDEX_RANDOM};return rt.Msg.PROCEDURES_DEFRETURN_RETURN+rt.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+rt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==rt.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),rt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(rt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new rt.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),rt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Ne={init:function(){this.setHelpUrl(rt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Re),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(rt.Msg.LISTS_GET_INDEX_GET+" "+rt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(rt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(rt.Msg.PROCEDURES_DEFRETURN_RETURN+rt.Msg.MIXLY_MICROBIT_TYPE_STRING+rt.Msg.LISTS_GET_INDEX_FROM_START+"n"+rt.Msg.TEXT_CHARAT2)}},Fe={init:function(){this.setHelpUrl(rt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(Re),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(rt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(rt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Pe={init:function(){this.WHERE_OPTIONS_1=[[rt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[rt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[rt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[rt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[rt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[rt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(rt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Re),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(rt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==rt.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==rt.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),rt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(rt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new rt.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},xe={init:function(){this.setHelpUrl(rt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Re),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(rt.Msg.LISTS_GET_INDEX_GET+" "+rt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(rt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(rt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(rt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},ke={init:function(){var t=[[rt.Msg.MIXLY_EQUALS,"==="],[rt.Msg.MIXLY_STARTSWITH,"startswith"],[rt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(Re),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new rt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Ve={init:function(){this.setColour(Re),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(rt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_COMPARETO_HELP)}},Ye={init:function(){var t=[[rt.Msg.TEXT_UPPER,"upper"],[rt.Msg.TEXT_TITLE,"title"],[rt.Msg.TEXT_CAPITALIZE,"capitalize"],[rt.Msg.TEXT_SWAPCASE,"swapcase"],[rt.Msg.TEXT_LOWER,"lower"]];this.setColour(Re),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new rt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:rt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:rt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:rt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:rt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:rt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Be={init:function(){var t=[[rt.Msg.TEXT_LJUST,"ljust"],[rt.Msg.TEXT_CENTER,"center"],[rt.Msg.TEXT_RJUST,"rjust"]];this.setColour(Re),this.appendValueInput("VAR").appendField(new rt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(rt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(rt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(rt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Ue={init:function(){this.setColour(Re),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(rt.Msg.MIXLY_MID+rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(rt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(rt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Xe={init:function(){this.setColour(Re),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(rt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(rt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(rt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Ge={init:function(){this.setColour(Re),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(rt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(rt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(rt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},He={init:function(){this.setColour(Re),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(rt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(rt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(rt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},We={init:function(){var t=[[rt.Msg.TEXT_TRIM_BOTH,"strip"],[rt.Msg.TEXT_TRIM_LEFT,"lstrip"],[rt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(Re),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(rt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new rt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(rt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:rt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:rt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:rt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},je={init:function(){this.setColour(Re),this.appendDummyInput("").appendField(rt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new rt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new rt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(rt.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Xi={init:function(){this.setColour(Bi),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(rt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Gi={init:function(){this.setColour(Bi),this.appendDummyInput().appendField(rt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Hi={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(rt.Msg.DICT_KEYS),this.setTooltip(rt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Wi={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(rt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(rt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(rt.Msg.DICTS_GET_TOOLTIP)}},ji={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(rt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(rt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(rt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(rt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},qi={init:function(){this.setColour(Bi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(rt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(rt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Ki={init:function(){this.setColour(Bi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(rt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(rt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.DICTS_DELETE_TOOLTIP)}},zi={init:function(){this.setColour(Bi),this.appendValueInput("DICT2").setCheck("Dict").appendField(rt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(rt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(rt.Msg.MIXLY_MID),this.setTooltip(rt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$i={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(rt.Msg.DICT_CLEAR),this.setTooltip(rt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qi={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(rt.Msg.DICT_ITEMS),this.setTooltip(rt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Ji={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(rt.Msg.DICT_VALUES),this.setTooltip(rt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Zi={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(rt.Msg.MIXLY_LENGTH),this.setTooltip(rt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},tn={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(rt.Msg.DICT_DELDICT),this.setTooltip(rt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},en={init:function(){this.MODE=[[rt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[rt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(rt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(rt.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=rt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=rt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==rt.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new rt.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},nn={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(rt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(rt.Msg.DICTS_ADD_VALUE),this.setTooltip(rt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},sn={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(rt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(rt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},rn={init:function(){this.setColour(Bi),this.appendDummyInput("").appendField(new rt.FieldLabel(rt.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new rt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(rt.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},on={init:function(){this.setColour(Bi),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(rt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},an={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(rt.Msg.MIXLY_TO_JSON),this.setTooltip(rt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},ln={init:function(){this.setColour(Bi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(rt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(rt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},un={init:function(){this.setColour(Bi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},pn={init:function(){this.setColour(Bi),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(rt.Msg.MIXLY_TO_JSON),this.setTooltip(rt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},hn=210,dn={init:function(){var t=rt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(hn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new rt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:rt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:rt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:rt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:rt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:rt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:rt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},cn={init:function(){var t=rt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=rt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(hn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new rt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new rt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},_n={init:function(){var t=[[rt.Msg.LOGIC_OPERATION_AND,"AND"],[rt.Msg.LOGIC_OPERATION_OR,"OR"],[rt.Msg.LOGIC_OPERATION_NOR,"NOR"],[rt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(hn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new rt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:rt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:rt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:rt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:rt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},fn={init:function(){this.setColour(hn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(rt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(rt.Msg.LOGIC_NEGATE_TOOLTIP)}},Tn={init:function(){var t=[[rt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[rt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(hn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new rt.FieldDropdown(t),"BOOL"),this.setTooltip(rt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},mn={init:function(){this.setColour(hn),this.setOutput(!0),this.appendDummyInput().appendField(rt.Msg.LOGIC_NULL),this.setTooltip(rt.Msg.LOGIC_NULL_TOOLTIP)}},gn={init:function(){this.setColour(hn),this.appendValueInput("A"),this.appendValueInput("B").appendField(rt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(rt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},In={init:function(){var t=[[rt.Msg.TEXT_APPEND_TO,"in"],[rt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(hn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new rt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(rt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(rt.Msg.IN)}},En={init:function(){var t=[[rt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[rt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(hn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new rt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},On={init:function(){this.setColour(hn),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(rt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},Mn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(rt.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},Rn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=rt.Msg.MIXLY_USE,n=rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,r=rt.Msg.MIXLY_BELONG;return i+{r:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+r+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},An={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=rt.Msg.MIXLY_USE,n=rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,r=rt.Msg.MIXLY_BELONG,o=rt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+r+n+s+o}))}},yn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(rt.Msg.MIXPY_TEXT_ENCODE).appendField(new rt.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=rt.Msg.MIXLY_USE,n=rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=rt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,r=rt.Msg.MIXLY_BELONG,o=rt.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+r+n+s+o}))}},Sn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+rt.Msg.MIXLY_MICROBIT_TYPE_STRING+rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},vn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Cn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},Ln={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(rt.Msg.MICROBIT_PYTHON_TYPE)}},bn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(rt.Msg.HTML_FILE),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Dn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},wn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Nn={init:function(){this.setColour(0),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};rt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Fn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Pn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+rt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},xn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},kn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=rt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},Vn={init:function(){this.setColour(0),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Yn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(rt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return rt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+rt.Msg.MIXLY_ESP32_SET+{mkdir:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Bn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(rt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Xn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new rt.FieldDropdown([[rt.Msg.HTML_FILE,"isfile"],[rt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return rt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+rt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:rt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Gn={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(rt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(rt.Msg.MIXLY_SETUP+rt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(rt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Hn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(rt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Wn={init:function(){var t=rt.Procedures.findLegalName("",this),e=new rt.FieldTextInput(t,rt.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new rt.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&rt.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(rt.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(rt.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(rt.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(rt.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=rt.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),rt.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{rt.Events.enable()}},mutationToDom:function(t){var e=rt.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(rt.Msg.MIXLY_AIP_ATTR).setAlign(rt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ys={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(rt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Bs={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(rt.Msg.HTML_FORM_CONTENT).appendField(new rt.FieldDropdown([[rt.Msg.HTML_TEXT,"text"],[rt.Msg.HTML_EMAIL,"email"],[rt.Msg.HTML_NUMBER,"number"],[rt.Msg.HTML_PASSWORD,"password"],[rt.Msg.HTML_CHECKBOX,"checkbox"],[rt.Msg.HTML_RADIOBUTTON,"radiobutton"],[rt.Msg.HTML_BUTTON,"button"],[rt.Msg.HTML_COLOUR,"colour"],[rt.Msg.HTML_DATE,"date"],[rt.Msg.HTML_LOCALTIME,"local time"],[rt.Msg.HTML_FILE,"file"],[rt.Msg.HTML_HIDDEN,"hidden"],[rt.Msg.HTML_IMAGE,"image"],[rt.Msg.HTML_MONTH,"month"],[rt.Msg.HTML_RANGE,"range"],[rt.Msg.HTML_RESET,"reset"],[rt.Msg.HTML_SEARCH,"search"],[rt.Msg.HTML_SUBMIT,"submit"],[rt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[rt.Msg.HTML_TIME,"time"],[rt.Msg.HTML_URL,"url"],[rt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(rt.Msg.HTML_NAME).appendField(new rt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(rt.Msg.HTML_VALUE).appendField(new rt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(rt.Msg.MIXLY_AIP_ATTR).setAlign(rt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Us={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(new rt.FieldTextInput("property"),"KEY").appendField(":").appendField(new rt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Xs={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(new rt.FieldTextInput("property"),"KEY").appendField(":").appendField(new rt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Gs={init:function(){this.setColour(Ns),this.appendDummyInput().appendField(rt.Msg.HTML_TEXT).appendField(new rt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Hs=160,Ws={init:function(){this.setColour(Hs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new rt.FieldTable(""),"TEXT")}},js={init:function(){this.setColour(Hs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new rt.FieldMultilineInput(""),"TEXT")}},qs={init:function(){this.setColour(Hs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new rt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Ks={init:function(){this.setColour(Hs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},zs={init:function(){this.setColour(Hs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new rt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},$s={init:function(){this.setColour(Hs),this.appendValueInput("VALUE").appendField(rt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Qs={init:function(){this.setColour(Hs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new rt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(rt.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=rt.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+l()+"("+t+", "+e+", "+i+") or "+u()+"("+t+", "+e+", "+i+")"},rt.isNumber(n)&&rt.isNumber(s)&&rt.isNumber(r))n=parseFloat(n),s=parseFloat(s),r=Math.abs(parseFloat(r)),0==n%1&&0==s%1&&0==r%1?(n<=s?(s++,t=0==n&&1==r?s:n+", "+s,1!=r&&(t+=", "+r)):t=n+", "+--s+", -"+r,t="range("+t+")"):(t=n",GTE:">="};const ja=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",r=e.valueToCode(this,"B",n)||"False";if("AND"==i)var o=s+" and "+r;else if("OR"==i)o=s+" or "+r;else if("NOR"==i)o="not("+s+"^"+r+")";else o=s+"^"+r;return[o,n]},qa=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},Ka=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},za=function(t,e){return["None",e.ORDER_ATOMIC]},$a=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},Qa=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},Ja=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},Za=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},tl=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},el=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},il=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},nl=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},sl=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},rl=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},ol=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},al=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ll=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},ul=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},pl=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},hl=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},dl=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},cl=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},_l=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},fl=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},Tl=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},ml=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},gl=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Il=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},El=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},Ol=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Ml=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},Rl=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),rt.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var r=[],o=0;o\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},su=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},ru=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},ou=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},au=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},lu=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},uu=function(t,e){return'"},pu=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},hu=function(){return this.getFieldValue("TEXT")+"\n"},du=function(t){return t.getFieldValue("TEXT")+"\n"},cu=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},_u=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},fu=function(){return""},Tu=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},mu=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),r=0;r0?e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+a.join("")+t+"while True:\n"+l.join("")+u.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+o.join("\n")+a.join("")+t+u.join("\n")},Ou.scrubNakedValue=function(t){return t+"\n"},Ou.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},Ou.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},Ou.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(r=t.getCommentText())&&(r=rt.utils.string.wrap(r,Ou.COMMENT_WRAP-3),n+=Ou.prefixLines(r+"\n","# "));for(var s=0;s0?"int("+a+" + "+s+")":s<0?"int("+a+" - "+-s+")":"int("+a+")",n&&(a="-"+a)),a};const Mu=205,Ru={init:function(){this.setColour(Mu),this.appendDummyInput("").appendField(rt.Msg.MIXLY_CHOOSE_AND_GET).appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_CHOOSE_AND_GET_ONE_FILE_NAME,"getOneFile"],[rt.Msg.MIXLY_CHOOSE_AND_GET_MANY_FILE_NAMES,"getManyFiles"],[rt.Msg.MIXLY_CHOOSE_AND_GET_DIR,"getDirectory"]]),"TYPE"),this.setInputsInline(!0),this.setOutput(!0)}},Au={init:function(){this.setColour(Mu),this.appendDummyInput("").appendField(rt.Msg.MIXLY_SETUP).appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_AipImageClassify,"AipImageClassify"],[rt.Msg.MIXLY_AipSpeech,"AipSpeech"],[rt.Msg.MIXLY_AipImageCensor,"AipImageCensor"],[rt.Msg.MIXLY_AipFace,"AipFace"],[rt.Msg.MIXLY_AipOcr,"AipOcr"],[rt.Msg.MIXLY_AipNlp,"AipNlp"]]),"CTYPE"),this.appendValueInput("SUB").appendField(rt.Msg.MIXLY_Client).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("API_KEY").appendField("API_KEY").setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("SECRET_KEY").appendField("SECRET_KEY").setAlign(rt.inputs.Align.RIGHT),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},yu={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField(rt.Msg.MIXLY_AipSpeech_synthesis).appendField(rt.Msg.MIXLY_Client).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("STR").appendField(rt.Msg.OLED_STRING).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(rt.Msg.MIXLY_AIP_ATTR).setAlign(rt.inputs.Align.RIGHT),this.setTooltip(rt.Msg.MIXLY_AipSpeech_synthesis_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},Su={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField(rt.Msg.MIXLY_AipSpeech_asr).appendField(rt.Msg.MIXLY_Client).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("FILE").appendField(rt.Msg.MIXLY_AipSpeech_File).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(rt.Msg.MIXLY_AIP_ATTR).setAlign(rt.inputs.Align.RIGHT),this.setTooltip(rt.Msg.MIXLY_AipSpeech_ASR_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},vu={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField(rt.Msg.MIXLY_AipImageClassify).appendField(rt.Msg.MIXLY_Client).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(rt.Msg.MIXLY_AIP_FUNC).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("ADDR").appendField(rt.Msg.MIXLY_AipImageClassify_Image).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(rt.Msg.MIXLY_AIP_ATTR).setAlign(rt.inputs.Align.RIGHT),this.setTooltip(rt.Msg.MIXLY_AipImageClassify_advancedGeneral_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},Cu={init:function(){this.setColour(Mu),this.appendDummyInput("").appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_AipImageClassify_advancedGeneral,"advancedGeneral"],[rt.Msg.MIXLY_AipImageClassify_dishDetect,"dishDetect"],[rt.Msg.MIXLY_AipImageClassify_carDetect,"carDetect"],[rt.Msg.MIXLY_AipImageClassify_animalDetect,"animalDetect"],[rt.Msg.MIXLY_AipImageClassify_plantDetect,"plantDetect"],[rt.Msg.MIXLY_AipImageClassify_logoSearch,"logoSearch"]]),"TYPE"),this.setOutput(!0)}},Lu={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField(rt.Msg.MIXLY_AipFace_match).appendField(rt.Msg.MIXLY_Client).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_AipImageClassify_Image+"1"+rt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("VAR2").appendField(rt.Msg.MIXLY_AipImageClassify_Image+"2"+rt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(rt.Msg.MIXLY_AIP_ATTR).setAlign(rt.inputs.Align.RIGHT),this.setTooltip(rt.Msg.MIXLY_AipFace_match_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},bu={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField(rt.Msg.MIXLY_AipOcr).appendField(rt.Msg.MIXLY_Client).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(rt.Msg.MIXLY_AIP_FUNC).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("ADDR").appendField(rt.Msg.MIXLY_AipImageClassify_Image).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(rt.Msg.MIXLY_AIP_ATTR).setAlign(rt.inputs.Align.RIGHT),this.setTooltip(rt.Msg.MIXLY_AipOcr_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},Du={init:function(){this.setColour(Mu),this.appendDummyInput("").appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_AipOcr_basicGeneral,"basicGeneral"],[rt.Msg.MIXLY_AipOcr_webImage,"webImage"],[rt.Msg.MIXLY_AipOcr_idcard,"idcard"],[rt.Msg.MIXLY_AipOcr_bankcard,"bankcard"],[rt.Msg.MIXLY_AipOcr_drivingLicense,"drivingLicense"],[rt.Msg.MIXLY_AipOcr_vehicleLicense,"vehicleLicense"],[rt.Msg.MIXLY_AipOcr_licensePlate,"licensePlate"],[rt.Msg.MIXLY_AipOcr_businessLicense,"businessLicense"],[rt.Msg.MIXLY_AipOcr_receipt,"receipt"],[rt.Msg.MIXLY_AipOcr_trainTicket,"trainTicket"],[rt.Msg.MIXLY_AipOcr_taxiReceipt,"taxiReceipt"],[rt.Msg.MIXLY_AipOcr_form,"tableRecognition"],[rt.Msg.MIXLY_AipOcr_vatInvoice,"vatInvoice"],[rt.Msg.MIXLY_AipOcr_passport,"passport"],[rt.Msg.MIXLY_AipOcr_handwriting,"handwriting"]]),"TYPE"),this.setOutput(!0)}},wu={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField(rt.Msg.MIXLY_AipNlp).appendField(rt.Msg.MIXLY_Client).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(rt.Msg.MIXLY_AIP_FUNC).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("STR").appendField(rt.Msg.OLED_STRING).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(rt.Msg.MIXLY_AIP_ATTR).setAlign(rt.inputs.Align.RIGHT),this.setTooltip(rt.Msg.MIXLY_AipNlp_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},Nu={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField(rt.Msg.MIXLY_AipNlp_Sim).appendField(rt.Msg.MIXLY_Client).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(rt.Msg.MIXLY_AIP_FUNC).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("STR1").appendField(rt.Msg.OLED_STRING+"1").setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("STR2").appendField(rt.Msg.OLED_STRING+"2").setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(rt.Msg.MIXLY_AIP_ATTR).setAlign(rt.inputs.Align.RIGHT),this.setTooltip(rt.Msg.MIXLY_AipNlp_Sim_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},Fu={init:function(){this.setColour(Mu),this.appendDummyInput("").appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_AipNlp_lexer,"lexer"],[rt.Msg.MIXLY_AipNlp_depParser,"depParser"],[rt.Msg.MIXLY_AipNlp_wordEmbedding,"wordEmbedding"],[rt.Msg.MIXLY_AipNlp_dnnlm,"dnnlm"],[rt.Msg.MIXLY_AipNlp_commentTag,"commentTag"],[rt.Msg.MIXLY_AipNlp_sentimentClassify,"sentimentClassify"],[rt.Msg.MIXLY_AipNlp_keyword,"keyword"],[rt.Msg.MIXLY_AipNlp_topic,"topic"],[rt.Msg.MIXLY_AipNlp_ecnet,"ecnet"],[rt.Msg.MIXLY_AipNlp_emotion,"emotion"]]),"TYPE"),this.setOutput(!0)}},Pu={init:function(){this.setColour(Mu),this.appendDummyInput("").appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_AipNlp_wordSimEmbedding,"wordSimEmbedding"],[rt.Msg.MIXLY_AipNlp_simnet,"simnet"]]),"TYPE"),this.setOutput(!0)}},xu={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField(rt.Msg.MIXLY_AipNlp_topic).appendField(rt.Msg.MIXLY_Client).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("STR1").appendField(rt.Msg.MIXLY_AipNlp_Topic_Title).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("STR2").appendField(rt.Msg.MIXLY_AipNlp_Topic_Content).setAlign(rt.inputs.Align.RIGHT),this.setTooltip(rt.Msg.MIXLY_AipNlp_Topic_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},ku={init:function(){this.setColour(Mu),this.appendValueInput("SUB").appendField(rt.Msg.MIXLY_AipNlp_summary).appendField(rt.Msg.MIXLY_Client).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("STR").appendField(rt.Msg.MIXLY_AipNlp_Topic_Content).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("LEN").appendField(rt.Msg.MIXLY_LIST_LEN).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(rt.Msg.MIXLY_AIP_ATTR).setAlign(rt.inputs.Align.RIGHT),this.setTooltip(rt.Msg.MIXLY_AipNlp_Summary_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},Vu={init:function(){this.setColour(Mu),this.appendValueInput("VAR").appendField(rt.Msg.MIXPY_AI_AUDIO),this.appendValueInput("TIME").appendField(rt.Msg.MIXPY_AI_AUDIO_TIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXPY_AI_AUDIO_TOOLTIP)}},Yu={init:function(){this.setColour(Mu),this.appendValueInput("VAR").appendField(rt.Msg.MIXPY_AI_PHOTO),this.appendValueInput("BUT").appendField(rt.Msg.MIXPY_AI_PHOTO_BUTTON),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXPY_AI_PHOTO_TOOLTIP)}},Bu={init:function(){this.setColour(Mu),this.appendValueInput("AI").appendField(rt.Msg.MIXPY_AI_RESULT).appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_AipImageClassify,"Image"],[rt.Msg.MIXLY_AipSpeech_asr,"Speech"],[rt.Msg.MIXLY_AipFace_match,"Face"],[rt.Msg.MIXLY_AipOcr,"Ocr"],[rt.Msg.MIXLY_AipNlp_simnet,"OcrSimilarity"],[rt.Msg.MIXLY_AipNlp_sentimentClassify,"Emotion"]]),"CTYPE"),this.setOutput(!0),this.setTooltip(rt.Msg.LOGIC_NEGATE_TOOLTIP)}},Uu="#526FC3",Xu={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Gu={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_ADD_SCHOOL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Hu={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_FIND_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Wu={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_NEW_PATH),this.setOutput(!0)}},ju={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_SET_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},qu={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_ADD_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Ku={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_DEL_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},zu={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_RETURN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},$u={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_NO_LEFT),this.setOutput(!0)}},Qu={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Ju={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Zu={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_CURRENT_SCHOOL),this.setOutput(!0)}},tp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_NO_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ep={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE_2_1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ip={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE_2_2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},np={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_MOVE_RECENT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},sp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_NOT_HOME),this.setOutput(!0)}},rp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_NOT_SCHOOL),this.setOutput(!0)}},op={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_PATH2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ap={init:function(){this.appendDummyInput().appendField("准备").appendField(new rt.FieldNumber(3,0,100,1),"NUM").appendField("层汉诺塔"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},lp={init:function(){this.appendDummyInput().appendField("移动圆盘从"),this.appendValueInput("FROM_NUM").setCheck(null).appendField("柱"),this.appendDummyInput().appendField("到"),this.appendValueInput("TO_NUM").setCheck(null).appendField("柱"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},up={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_ALL_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},pp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_ALL_BOOKS2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},hp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_FIRST_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},dp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_NO_RING),this.setOutput(!0)}},cp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_YES_RING),this.setOutput(!0)}},_p={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_NEXT_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},fp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_TWO_LEFT),this.setOutput(!0)}},Tp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_DIVIDE_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},mp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_GET_HALF_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},gp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_DELETE_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Ip={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_DELETE_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Ep={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_DELETE_BOOKS2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Op={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Mp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("设置待查书总数 N=").appendField(new rt.FieldDropdown([["5","5"],["10","10"],["20","20"],["50","50"]]),"NUM"),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},Rp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_NUMBER_ZERO),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Ap={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_NUMBER_ADD),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},yp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Sp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField("n"+rt.Msg.MIXLY_VALUE2).appendField(new rt.FieldTextInput("50"),"NUM"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},vp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_SEQUENCE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Cp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_DIVIDE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Lp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("初始化鸡兔同笼问题:"),this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("有若干只鸡、兔在同一个笼子里。"),this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("从上面数鸡兔有10个头,"),this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("从下面数鸡兔有32只脚。"),this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("问笼中有多少只鸡和多少只兔?"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},bp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("假设兔子的数量为0只"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},Dp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("兔子的数量在范围之内"),this.setOutput(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},wp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("根据(头数-兔子数)计算出鸡的数量"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},Np={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("计算得到脚的数量正确"),this.setOutput(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},Fp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("输出鸡、兔的数量"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},Pp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("假设兔子数量要更多一只"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},xp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("加载路线图"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},kp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("计算").appendField(new rt.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME").appendField("长度"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},Vp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("设置S1为Smin"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},Yp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField(new rt.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME").appendField("的长度比").appendField(new rt.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME2").appendField("短"),this.setOutput(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},Bp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("设置").appendField(new rt.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME").appendField("为Smin"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},Up={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("按照Smin移动"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},Xp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("初始化韩信点兵问题:"),this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("有未知数量的若干士兵。"),this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("若3人一排列队,多1人;"),this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("若5人一排列队,多2人;"),this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("若7人一排列队,多2人;"),this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("问士兵的数量最少是多少人?"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},Gp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("初始化士兵为").appendField(new rt.FieldTextInput("7"),"NUM").appendField("个"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},Hp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("使士兵").appendField(new rt.FieldDropdown([["3","3"],["5","5"],["7","7"]]),"NUM").appendField("人一排列队"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},Wp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("剩余").appendField(new rt.FieldTextInput("1"),"NUM").appendField("个士兵"),this.setOutput(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},jp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("增加1个士兵"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},qp={init:function(){this.appendDummyInput().setAlign(rt.inputs.Align.LEFT).appendField("输出士兵数量"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setTooltip(""),this.setHelpUrl("")}},Kp={init:function(){this.appendDummyInput().appendField("准备").appendField(new rt.FieldNumber(3,0,100,1),"NUM").appendField("层汉诺塔"),this.appendValueInput("VAR").setCheck(String).appendField(rt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Uu),this.setInputsInline(!0),this.setTooltip(""),this.setHelpUrl("")}},zp={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_GET_CURRENT_LOCATION),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},$p={init:function(){this.setColour(Uu),this.appendDummyInput().appendField(rt.Msg.MIXLY_MIXPY_ALGORITHM_VOID_PATH),this.setOutput(!0)}},Qp={init:function(){this.setColour(Uu),this.appendDummyInput("").setAlign(rt.inputs.Align.RIGHT).appendField(new rt.FieldColour("ff0000"),"COLOR"),this.setInputsInline(!0),this.setOutput(!0,String)}},Jp="#3288dd",Zp={init:function(){this.setColour(Jp),this.appendValueInput("DOMAIN").appendField(rt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(rt.Msg.blockpy_REQUESTS_GET).appendField(new rt.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},th={init:function(){this.setColour(Jp),this.appendValueInput("URL").appendField(rt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(rt.Msg.blockpy_CONDUCT).appendField(new rt.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(rt.Msg.blockpy_REQUESTS).appendField(rt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},eh={init:function(){this.setColour(Jp),this.appendValueInput("URL").appendField(rt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(rt.Msg.blockpy_CONDUCT).appendField(new rt.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(rt.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(rt.Msg.blockpy_REQUESTS+rt.Msg.OLED_STRING),this.appendDummyInput("").appendField(rt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},ih={init:function(){this.appendValueInput("VAL");var t=[[rt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[rt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[rt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[rt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[rt.Msg.MIXPY_TEXT_ENCODE,"encoding"]];this.setColour(Jp),this.appendDummyInput("").appendField(rt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new rt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},nh={init:function(){this.appendValueInput("VAR").appendField(rt.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(Jp),this.appendDummyInput("").appendField(rt.Msg.blockpy_CONDUCT).appendField(new rt.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"DIR"),this.appendDummyInput("").appendField(rt.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:rt.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:rt.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))}},sh="f0a559",rh={init:function(){this.setColour(sh),this.appendValueInput("FILE").setCheck(String).appendField(rt.Msg.MIXLY_CV_IMREAD),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},oh={init:function(){this.setColour(sh),this.appendValueInput("FILE").appendField(rt.Msg.OLED_BITMAP),this.appendValueInput("data").setCheck(String).appendField(rt.Msg.MIXLY_AipNlp_Topic_Title),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ah={init:function(){this.setColour(sh),this.appendValueInput("FILE").appendField(rt.Msg.MIXLY_CV_IMWRITE),this.appendValueInput("data").setCheck(String).appendField(rt.Msg.HTML_NAME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},lh={init:function(){this.setColour(sh),this.appendValueInput("data").setCheck(Number).appendField(rt.Msg.MIXLY_DELAY),this.appendDummyInput().appendField(rt.Msg.MIXLY_MILLIS+rt.Msg.MIXLY_CV_OR_PRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_CV_WAITKEY_TOOLTIP)}},uh={init:function(){this.setColour(sh),this.appendDummyInput().appendField(rt.Msg.MIXLY_CV_DESTROY_ALL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ph={init:function(){this.setColour(sh),this.appendValueInput("FILE").appendField(rt.Msg.MIXLY_MICROBIT_IMAGE);var t=[[rt.Msg.MIXLY_CV_RECT,"rectangle"],[rt.Msg.MIXLY_CV_LINE,"line"]];this.appendValueInput("x1").setCheck(Number).appendField(rt.Msg.MIXLY_DISPLAY_DRAW).appendField(new rt.FieldDropdown(t),"DIR").appendField(rt.Msg.MIXLY_CV_DRAWLINE_BEGIN+"(x1"),this.appendValueInput("y1").setCheck(Number).appendField(",y1"),this.appendValueInput("x2").setCheck(Number).appendField(") "+rt.Msg.MIXLY_CV_DRAWLINE_END+"(x2"),this.appendValueInput("y2").setCheck(Number).appendField(",y2"),this.appendDummyInput().appendField(") "+rt.Msg.MIXLY_CV_DRAWLINE_COLOR).appendField(new rt.FieldColour("#ff0000"),"FIELDNAME"),this.appendValueInput("thick").setCheck(Number).appendField(rt.Msg.MIXLY_CV_DRAWLINE_THICKNESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_CV_DRAWLINE_RECT_TOOLTIP)}},hh={init:function(){this.setColour(sh),this.appendValueInput("FILE").appendField(rt.Msg.MIXLY_MICROBIT_IMAGE);this.appendValueInput("data").setCheck(String).appendField(rt.Msg.MIXLY_CV_DRAWTEXT),this.appendValueInput("x1").setCheck(Number).appendField(rt.Msg.MIXLY_CV_DRAWLINE_BEGIN+"(x1"),this.appendValueInput("y1").setCheck(Number).appendField(",y1"),this.appendDummyInput().appendField(") "+rt.Msg.MIXLY_TURTLE_WRITE_FONT_NAME).appendField(new rt.FieldDropdown([["SIMPLEX","SIMPLEX"],["PLAIN","PLAIN"],["DUPLEX","DUPLEX"],["COMPLEX","COMPLEX"],["COMPLEX_SMALL","COMPLEX_SMALL"],["TRIPLEX","TRIPLEX"],["SCRIPT_SIMPLEX","SCRIPT_SIMPLEX"],["SCRIPT_COMPLEX","SCRIPT_COMPLEX"]]),"font"),this.appendValueInput("size").setCheck(Number).appendField(rt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendDummyInput().appendField(") "+rt.Msg.MIXLY_CV_DRAWLINE_COLOR).appendField(new rt.FieldColour("#ff0000"),"FIELDNAME"),this.appendValueInput("thick").setCheck(Number).appendField(rt.Msg.MIXLY_CV_DRAWLINE_THICKNESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_CV_DRAWLINE_RECT_TOOLTIP)}},dh={init:function(){this.setColour(sh),this.appendValueInput("FILE").setCheck(String).appendField(rt.Msg.MIXLY_CV_FACE_CLASSIFIER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},ch={init:function(){this.setColour(sh),this.appendValueInput("FILE").appendField(rt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("FACE").appendField(rt.Msg.MIXLY_CV_FACE_DETECT),this.appendValueInput("SCALE").setCheck(Number).appendField(rt.Msg.MIXLY_CV_FACE_DETECT_SCALE),this.appendValueInput("NEIGHBOR").setCheck(Number).appendField(rt.Msg.MIXLY_CV_FACE_DETECT_NEIGHBOR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},_h={init:function(){this.setColour(sh),this.appendValueInput("FILE").appendField(rt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("FACE").appendField(rt.Msg.MIXLY_CV_FACE_DETECT),this.appendValueInput("SCALE").setCheck(Number).appendField(rt.Msg.MIXLY_CV_FACE_DETECT_SCALE),this.appendValueInput("NEIGHBOR").setCheck(Number).appendField(rt.Msg.MIXLY_CV_FACE_DETECT_NEIGHBOR),this.appendValueInput("x1").setCheck(Number).appendField(rt.Msg.MIXLY_CV_FACE_DETECT_RANGE).appendField(rt.Msg.blockpy_TUPLE_MIN),this.appendValueInput("y1").setCheck(Number).appendField("×"),this.appendValueInput("x2").setCheck(Number).appendField(rt.Msg.blockpy_TUPLE_MAX),this.appendValueInput("y2").setCheck(Number).appendField("×"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},fh=170,Th={init:function(){this.setColour(fh),this.appendDummyInput("").appendField(rt.Msg.blockpy_series_create).appendField(new rt.FieldTextInput("ser1"),"VAR"),this.appendValueInput("SER").appendField(rt.Msg.blockpy_series_via),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.blockpy_series_create_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},mh={init:function(){this.setColour(fh),this.appendDummyInput("").appendField(rt.Msg.blockpy_series_create).appendField(new rt.FieldTextInput("ser1"),"VAR"),this.appendValueInput("SER").appendField(rt.Msg.blockpy_series_via),this.appendValueInput("INDEX").setCheck([String,"List"]).appendField(rt.Msg.blockpy_series_set_index),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.blockpy_series_create_index_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},gh={init:function(){this.setColour(fh),this.appendDummyInput("").appendField(rt.Msg.blockpy_dataframe_create).appendField(new rt.FieldTextInput("df1"),"VAR"),this.appendValueInput("SER").appendField(rt.Msg.blockpy_series_via),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.blockpy_dataframe_create_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Ih={init:function(){this.setColour(fh);var t=[[rt.Msg.DATAFRAME_RAW,"index"],[rt.Msg.DATAFRAME_COLUMN,"columns"]];this.appendDummyInput("").appendField(rt.Msg.blockpy_dataframe_create).appendField(new rt.FieldTextInput("df1"),"VAR"),this.appendValueInput("SER").appendField(rt.Msg.blockpy_series_via),this.appendDummyInput("").appendField(new rt.FieldDropdown(t),"COLUMN_RAW"),this.appendValueInput("INDEX").setCheck([String,"List"]).appendField(rt.Msg.blockpy_series_set_index),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.blockpy_dataframe_create_index_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Eh={init:function(){this.setColour(fh),this.appendDummyInput("").appendField(rt.Msg.blockpy_dataframe_create).appendField(new rt.FieldTextInput("df1"),"VAR"),this.appendValueInput("SER").appendField(rt.Msg.blockpy_series_via),this.appendValueInput("INDEX_COLUMN").setCheck([String,"List"]).appendField(rt.Msg.blockpy_dataframe_set_index_column),this.appendValueInput("INDEX_RAW").setCheck([String,"List"]).appendField(rt.Msg.blockpy_dataframe_set_index_raw),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.blockpy_dataframe_create_index_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Oh={init:function(){this.setColour(fh),this.appendDummyInput("").appendField(new rt.FieldTextInput("ser1"),"VAR").appendField(" = [").appendField(new rt.FieldTextInput("1,2,3"),"TEXT").appendField("]"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_SERIES_CREATE_FROM_TEXT)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Mh={init:function(){this.setColour(fh);var t=[[rt.Msg.SERIES_INDEX,"index"],[rt.Msg.HTML_VALUE,"value"]];this.appendValueInput("SERIES").setCheck("Series"),this.appendDummyInput("").appendField(rt.Msg.SERIES_INDEX_VALUE).appendField(new rt.FieldDropdown(t),"INDEX_VALUE"),this.setOutput(!0,"List");var e=this;this.setTooltip((function(){var t=e.getFieldValue("INDEX_VALUE");return{index:rt.Msg.SERIES_INDEX_TOOLTIP,value:rt.Msg.HTML_VALUE_TOOLTIP}[t]}))}},Rh={init:function(){this.setColour(fh),this.setOutput(!0),this.appendValueInput("SER").setCheck("Series"),this.appendValueInput("AT").setCheck(Number).appendField(rt.Msg.LANG_LISTS_GET_INDEX1),this.appendDummyInput("").appendField(rt.Msg.LANG_LISTS_GET_INDEX2),this.setInputsInline(!0),this.setTooltip(rt.Msg.TUPLE_GET_INDEX_TOOLTIP)}},Ah={init:function(){this.setColour(fh),this.appendValueInput("SER").setCheck("Series").appendField(rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(rt.Msg.blockpy_PYLAB_PLOT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yh={init:function(){this.setColour(fh);var t=[[rt.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[rt.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[rt.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[rt.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[rt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[rt.Msg.COLOUR_RGB_BLUE,"b"],[rt.Msg.COLOUR_RGB_GREEN,"g"],[rt.Msg.COLOUR_RGB_RED,"r"],[rt.Msg.COLOUR_CYAN,"c"],[rt.Msg.COLOUR_MAGENTA,"m"],[rt.Msg.COLOUR_YELLOW,"y"],[rt.Msg.COLOUR_BLACK,"k"],[rt.Msg.COLOUR_WHITE,"w"]],i=[[rt.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[rt.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("SER").setCheck("Series").appendField(rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(rt.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(rt.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new rt.FieldDropdown(i),"DOT"),this.appendDummyInput("").appendField(rt.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new rt.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(rt.Msg.HTML_COLOUR).appendField(new rt.FieldDropdown(e),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Sh={init:function(){this.setColour(fh),this.appendDummyInput().appendField(rt.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vh={init:function(){this.setColour(fh),this.appendDummyInput().appendField(rt.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ch={init:function(){this.setColour(fh),this.appendDummyInput().appendField(rt.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Lh={init:function(){this.setColour(fh),this.appendDummyInput().appendField(rt.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bh={init:function(){this.setColour(fh);var t=[[rt.Msg.PYLAB_LABEL_X,"x"],[rt.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(rt.Msg.blockpy_PYLAB_SET_LABEL).appendField(new rt.FieldDropdown(t),"DIR"),this.appendValueInput("LABEL").appendField(rt.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Dh={init:function(){this.setColour(fh),this.appendValueInput("FROM").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MIXLY_SPLITBYDOU).appendField(rt.Msg.MIXPY_DATA_ARRAY_CREATE_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MIXPY_DATA_ARRAY_CREATE_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MIXLY_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(rt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},wh={init:function(){this.setColour(fh);var t=[[rt.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[rt.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(rt.Msg.MIXLY_DISPLAY_DRAW).appendField(new rt.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(rt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(rt.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{plot:rt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:rt.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[t]}))}},Nh={init:function(){this.setColour(fh);var t=[[rt.Msg.COLOUR_RGB_BLUE,"b"],[rt.Msg.COLOUR_RGB_GREEN,"g"],[rt.Msg.COLOUR_RGB_RED,"r"],[rt.Msg.COLOUR_CYAN,"c"],[rt.Msg.COLOUR_MAGENTA,"m"],[rt.Msg.COLOUR_YELLOW,"y"],[rt.Msg.COLOUR_BLACK,"k"],[rt.Msg.COLOUR_WHITE,"w"]],e=[[rt.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[rt.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(rt.Msg.mixpy_PYLAB_SCATTER).appendField(rt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(rt.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(rt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(rt.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new rt.FieldDropdown(e),"DOT"),this.appendDummyInput("").appendField(rt.Msg.HTML_COLOUR).appendField(new rt.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(rt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},Fh={init:function(){this.setColour(fh);var t=[[rt.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[rt.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[rt.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[rt.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[rt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[rt.Msg.COLOUR_RGB_BLUE,"b"],[rt.Msg.COLOUR_RGB_GREEN,"g"],[rt.Msg.COLOUR_RGB_RED,"r"],[rt.Msg.COLOUR_CYAN,"c"],[rt.Msg.COLOUR_MAGENTA,"m"],[rt.Msg.COLOUR_YELLOW,"y"],[rt.Msg.COLOUR_BLACK,"k"],[rt.Msg.COLOUR_WHITE,"w"]],i=[[rt.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[rt.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(rt.Msg.mixpy_PYLAB_PLOT_XY).appendField(rt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(rt.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(rt.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new rt.FieldDropdown(i),"DOT"),this.appendDummyInput("").appendField(rt.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new rt.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(rt.Msg.HTML_COLOUR).appendField(new rt.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(rt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Ph={init:function(){this.setColour(fh);var t=[[rt.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[rt.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(rt.Msg.mixpy_PYLAB_BAR).appendField(rt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(rt.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(rt.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(rt.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new rt.FieldDropdown(t),"ALIGN"),this.appendDummyInput().appendField(rt.Msg.HTML_COLOUR).appendField(new rt.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(rt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},xh={init:function(){this.setColour(fh);var t=[[rt.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[rt.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],e=[[rt.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[rt.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[rt.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[rt.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(rt.Msg.mixpy_PYLAB_PIE).appendField(rt.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(rt.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(rt.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(rt.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new rt.FieldDropdown(e),"autopct"),this.appendDummyInput("").appendField(rt.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new rt.FieldDropdown(t),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},kh={init:function(){this.setColour(fh),this.appendValueInput("A").appendField(rt.Msg.mixpy_PYLAB_HIST).appendField(rt.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vh={init:function(){this.setColour(fh);var t=[[rt.Msg.PYLAB_LABEL_X,"x"],[rt.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(rt.Msg.MIXLY_SETTING).appendField(new rt.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(rt.Msg.mixpy_PYLAB_TICKS).appendField(rt.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(rt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},Yh={init:function(){var t=[["sin","sin"],["cos","cos"],["tan","tan"],["arcsin","arcsin"],["arccos","arccos"],["arctan","arctan"],[rt.Msg.LANG_MATH_TO_ROUND,"round"],[rt.Msg.LANG_MATH_TO_CEIL,"ceil"],[rt.Msg.LANG_MATH_TO_FLOOR,"floor"]];this.setColour(fh),this.setOutput(!0),this.setInputsInline(!0),this.appendDummyInput().appendField(rt.Msg.mixpy_NUMPY_TRIG),this.appendValueInput("NUM").setCheck(Number).appendField(new rt.FieldDropdown(t),"OP"),this.setTooltip(rt.Msg.mixpy_NUMPY_TRIG_TOOLTIP)}},Bh={init:function(){this.setColour(fh),this.appendValueInput("VET").setCheck(Number).appendField(rt.Msg.mixpy_SUBPLOT).appendField(rt.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(rt.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(rt.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Uh={init:function(){this.setColour(fh),this.appendValueInput("FILENAME").appendField(rt.Msg.MIXPY_PANDAS_READ_CSV),this.appendDummyInput().appendField(new rt.FieldDropdown([[rt.Msg.mixpy_PANDAS_READCSV_HEADER_Y,"0"],[rt.Msg.mixpy_PANDAS_READCSV_HEADER_N,"None"]]),"MODE"),this.appendDummyInput().appendField(rt.Msg.mixpy_PANDAS_READCSV_TITLE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.mixpy_PANDAS_READCSV_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Xh={init:function(){this.setColour(fh),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(rt.Msg.mixpy_DATAFRAME_GET),this.appendDummyInput("").appendField(rt.Msg.mixpy_DATAFRAME_GET_INDEX).appendField(new rt.FieldDropdown([[rt.Msg.DATAFRAME_COLUMN,"column"],[rt.Msg.DATAFRAME_RAW,"raw"]]),"MODE"),this.setOutput(!0),this.setTooltip(rt.Msg.mixpy_DATAFRAME_GET_TOOLTIP)}},Gh={init:function(){this.setColour(fh),this.appendValueInput("FILE").setCheck(String).appendField(rt.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(rt.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},Hh={init:function(){this.setColour(fh);var t=[[rt.Msg.TEXT_TRIM_LEFT,"right"],[rt.Msg.mixpy_PL_TEXT_CENTER,"center"],[rt.Msg.TEXT_TRIM_RIGHT,"left"]],e=[[rt.Msg.mixpy_PL_TEXT_TOP,"bottom"],[rt.Msg.mixpy_PL_TEXT_CENTER,"center"],[rt.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(rt.Msg.MIXLY_SETTING).appendField(rt.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(rt.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(rt.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(rt.Msg.mixpy_PL_TEXT_HOR).appendField(new rt.FieldDropdown(t),"HALIGN"),this.appendDummyInput("").appendField(rt.Msg.mixpy_PL_TEXT_VER).appendField(new rt.FieldDropdown(e),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(rt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.mixpy_PL_TEXT_TOOLTIP)}},Wh={init:function(){this.setColour(fh),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_TOARRAY),this.setOutput(!0,"List"),this.setTooltip(rt.Msg.MIXLY_PYTHON_TOOLTIP_TOARRAY)}},jh={init:function(){this.setColour(fh),this.appendValueInput("SER").setCheck("Series").appendField(rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(rt.Msg.blockpy_PYLAB_PLOT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qh={init:function(){this.setColour(fh);var t=[[rt.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[rt.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[rt.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[rt.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[rt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[rt.Msg.COLOUR_RGB_BLUE,"b"],[rt.Msg.COLOUR_RGB_GREEN,"g"],[rt.Msg.COLOUR_RGB_RED,"r"],[rt.Msg.COLOUR_CYAN,"c"],[rt.Msg.COLOUR_MAGENTA,"m"],[rt.Msg.COLOUR_YELLOW,"y"],[rt.Msg.COLOUR_BLACK,"k"],[rt.Msg.COLOUR_WHITE,"w"]],i=[[rt.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[rt.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("SER").setCheck("Series").appendField(rt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(rt.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(rt.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new rt.FieldDropdown(i),"DOT"),this.appendDummyInput("").appendField(rt.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new rt.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(rt.Msg.HTML_COLOUR).appendField(new rt.FieldDropdown(e),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Kh={init:function(){this.setColour(fh),this.appendDummyInput().appendField(rt.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zh={init:function(){this.setColour(fh),this.appendDummyInput().appendField(rt.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$h={init:function(){this.setColour(fh),this.appendDummyInput().appendField(rt.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qh={init:function(){this.setColour(fh),this.appendDummyInput().appendField(rt.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Jh={init:function(){this.setColour(fh);var t=[[rt.Msg.PYLAB_LABEL_X,"x"],[rt.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(rt.Msg.blockpy_PYLAB_SET_LABEL).appendField(new rt.FieldDropdown(t),"DIR"),this.appendValueInput("LABEL").appendField(rt.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zh={init:function(){this.setColour(fh);var t=[[rt.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[rt.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(rt.Msg.MIXLY_DISPLAY_DRAW).appendField(new rt.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(rt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(rt.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{plot:rt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:rt.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[t]}))}},td={init:function(){this.setColour(fh);var t=[[rt.Msg.COLOUR_RGB_BLUE,"b"],[rt.Msg.COLOUR_RGB_GREEN,"g"],[rt.Msg.COLOUR_RGB_RED,"r"],[rt.Msg.COLOUR_CYAN,"c"],[rt.Msg.COLOUR_MAGENTA,"m"],[rt.Msg.COLOUR_YELLOW,"y"],[rt.Msg.COLOUR_BLACK,"k"],[rt.Msg.COLOUR_WHITE,"w"]],e=[[rt.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[rt.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(rt.Msg.mixpy_PYLAB_SCATTER).appendField(rt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(rt.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(rt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(rt.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new rt.FieldDropdown(e),"DOT"),this.appendDummyInput("").appendField(rt.Msg.HTML_COLOUR).appendField(new rt.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(rt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},ed={init:function(){this.setColour(fh);var t=[[rt.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[rt.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[rt.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[rt.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[rt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[rt.Msg.COLOUR_RGB_BLUE,"b"],[rt.Msg.COLOUR_RGB_GREEN,"g"],[rt.Msg.COLOUR_RGB_RED,"r"],[rt.Msg.COLOUR_CYAN,"c"],[rt.Msg.COLOUR_MAGENTA,"m"],[rt.Msg.COLOUR_YELLOW,"y"],[rt.Msg.COLOUR_BLACK,"k"],[rt.Msg.COLOUR_WHITE,"w"]],i=[[rt.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[rt.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[rt.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(rt.Msg.mixpy_PYLAB_PLOT_XY).appendField(rt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(rt.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(rt.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new rt.FieldDropdown(i),"DOT"),this.appendDummyInput("").appendField(rt.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new rt.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(rt.Msg.HTML_COLOUR).appendField(new rt.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(rt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},id={init:function(){this.setColour(fh);var t=[[rt.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[rt.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(rt.Msg.mixpy_PYLAB_BAR).appendField(rt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(rt.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(rt.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(rt.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new rt.FieldDropdown(t),"ALIGN"),this.appendDummyInput().appendField(rt.Msg.HTML_COLOUR).appendField(new rt.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(rt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},nd={init:function(){this.setColour(fh);var t=[[rt.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[rt.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],e=[[rt.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[rt.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[rt.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[rt.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(rt.Msg.mixpy_PYLAB_PIE).appendField(rt.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(rt.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(rt.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(rt.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new rt.FieldDropdown(e),"autopct"),this.appendDummyInput("").appendField(rt.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new rt.FieldDropdown(t),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},sd={init:function(){this.setColour(fh),this.appendValueInput("A").appendField(rt.Msg.mixpy_PYLAB_HIST).appendField(rt.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(rt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},rd={init:function(){this.setColour(fh);var t=[[rt.Msg.PYLAB_LABEL_X,"x"],[rt.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(rt.Msg.MIXLY_SETTING).appendField(new rt.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(rt.Msg.mixpy_PYLAB_TICKS).appendField(rt.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(rt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},od={init:function(){this.setColour(fh),this.appendValueInput("VET").setCheck(Number).appendField(rt.Msg.mixpy_SUBPLOT).appendField(rt.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(rt.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(rt.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},ad={init:function(){this.setColour(fh),this.appendDummyInput("").appendField(rt.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(rt.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},ld={init:function(){this.setColour(fh);var t=[[rt.Msg.TEXT_TRIM_LEFT,"right"],[rt.Msg.mixpy_PL_TEXT_CENTER,"center"],[rt.Msg.TEXT_TRIM_RIGHT,"left"]],e=[[rt.Msg.mixpy_PL_TEXT_TOP,"bottom"],[rt.Msg.mixpy_PL_TEXT_CENTER,"center"],[rt.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(rt.Msg.MIXLY_SETTING).appendField(rt.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(rt.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(rt.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(rt.Msg.mixpy_PL_TEXT_HOR).appendField(new rt.FieldDropdown(t),"HALIGN"),this.appendDummyInput("").appendField(rt.Msg.mixpy_PL_TEXT_VER).appendField(new rt.FieldDropdown(e),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(rt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.mixpy_PL_TEXT_TOOLTIP)}},ud={init:function(){this.setColour(fh),this.appendValueInput("ARRAY").appendField("获取维度"),this.setOutput(!0),this.setTooltip("Returns the shape of the array.")}},pd={init:function(){this.setColour(fh),this.appendValueInput("ARRAY").appendField("变形"),this.appendValueInput("DIMENSIONS").appendField("后维度为"),this.setOutput(!0),this.setTooltip("Reshapes the array to the specified dimensions.")}},hd={init:function(){this.setColour(fh),this.appendValueInput("ARRAY").appendField("把"),this.appendDummyInput().appendField("转换为").appendField(new rt.FieldDropdown([["uint8","numpy.uint8"],["int32","numpy.int32"],["float32","numpy.float32"],["float64","numpy.float64"]]),"TYPE"),this.setOutput(!0),this.setTooltip("Converts array to specified type.")}},dd={init:function(){this.setColour(fh),this.appendValueInput("ARRAY").appendField("创建二维图"),this.appendDummyInput().appendField("颜色").appendField(new rt.FieldDropdown([["gray","gray"],["viridis","viridis"],["plasma","plasma"],["inferno","inferno"],["magma","magma"],["cividis","cividis"],["hot","hot"],["cool","cool"],["spring","spring"],["summer","summer"],["autumn","autumn"],["winter","winter"],["jet","jet"]]),"COLORMAP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("Displays an image with the specified colormap.")}},cd={init:function(){this.setColour(fh),this.appendValueInput("X").appendField("从数据集"),this.appendValueInput("Y").appendField("获取平均图像,标签"),this.appendValueInput("DIGIT").appendField("为"),this.setOutput(!0),this.setTooltip("Computes the mean of X where y equals the specified digit.")}},_d={init:function(){this.setColour(fh),this.appendValueInput("IMAGE").appendField("获取模板匹配结果,图片:"),this.appendValueInput("TEMPLATES").appendField("模板:"),this.setOutput(!0),this.setTooltip("Finds the index of the template that minimizes the sum of absolute differences with the image.")}},fd={init:function(){this.setColour(fh),this.appendValueInput("ARRAY").appendField("获取平均值"),this.appendDummyInput().appendField("沿着axis").appendField(new rt.FieldDropdown([["None","NONE"],["0","0"],["1","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Computes the mean of the array along the specified axis.")}},Td={init:function(){this.setColour(fh),this.appendValueInput("ARRAY").appendField("获取标准差"),this.appendDummyInput().appendField("沿着axis").appendField(new rt.FieldDropdown([["None","NONE"],["0","0"],["1","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Computes the standard deviation of the array along the specified axis.")}},md={init:function(){this.setColour(fh),this.appendValueInput("DF").appendField("丢弃缺省值"),this.setOutput(!0),this.setTooltip("Drops rows with NaN values from the dataframe.")}},gd={init:function(){this.setColour(fh),this.appendValueInput("DATAFRAME").appendField("从数据集"),this.appendValueInput("COLUMNS").appendField("中删除列").setCheck(String),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("从数据框中删除指定的列。用逗号分隔多个列名。")}},Id={init:function(){this.setColour(fh),this.appendValueInput("NUM").appendField("生成单位行向量"),this.setOutput(!0),this.setTooltip("Creates an array of ones with the specified length.")}},Ed={init:function(){this.setColour(fh),this.appendValueInput("ARRAY1").appendField("列拼接:数组1"),this.appendValueInput("ARRAY2").appendField("数组2"),this.setOutput(!0),this.setTooltip("Concatenates two arrays along the second axis using numpy.c_.")}},Od={init:function(){this.setColour(fh),this.appendValueInput("ARRAY").appendField("获取行列式"),this.setOutput(!0),this.setTooltip("Computes the determinant of an array using numpy.linalg.det.")}},Md={init:function(){this.setColour(fh),this.appendValueInput("MATRIX").appendField("获取转置"),this.setOutput(!0),this.setTooltip("Computes the transpose of the given matrix.")}},Rd={init:function(){this.setColour(fh),this.appendValueInput("MATRIX1"),this.appendValueInput("MATRIX2").appendField("@"),this.setOutput(!0),this.setTooltip("Multiplies two matrices.")}},Ad={init:function(){this.setColour(fh),this.appendValueInput("ARRAY").appendField("获取逆矩阵"),this.setOutput(!0),this.setTooltip("Computes the inverse of the given matrix using numpy.linalg.inv.")}},yd={init:function(){this.setColour(fh),this.appendValueInput("DATAFRAME").appendField("获取中位数"),this.setOutput(!0),this.setTooltip("Computes the median of the given dataframe.")}},Sd={init:function(){this.setColour(fh),this.appendValueInput("DATAFRAME").appendField("填充缺失值"),this.appendValueInput("VALUE").appendField("填充值"),this.appendDummyInput().appendField("是否修改原数据").appendField(new rt.FieldDropdown([["True","True"],["False","False"]]),"INPLACE"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("Fills NaN values in the dataframe with the specified value.")}},vd={init:function(){this.setColour(fh),this.appendValueInput("DATAFRAME").appendField("获取DataFrame信息"),this.setOutput(!0),this.setTooltip("Displays information about the DataFrame.")}},Cd={init:function(){this.setColour(fh),this.appendValueInput("ARRAY").appendField("获取最小值"),this.appendDummyInput().appendField("沿着axis").appendField(new rt.FieldDropdown([["None","None"],["行","0"],["列","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Returns the minimum value along the specified axis.")}},Ld={init:function(){this.setColour(fh),this.appendValueInput("ARRAY").appendField("获取最大值"),this.appendDummyInput().appendField("沿着axis").appendField(new rt.FieldDropdown([["None","None"],["行","0"],["列","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Returns the maximum value along the specified axis.")}},bd={init:function(){this.setColour(fh),this.appendValueInput("ARRAY").appendField("获取数组大小"),this.setOutput(!0),this.setTooltip("Returns the size of the array.")}},Dd={init:function(){this.setColour(fh),this.appendValueInput("ARRAY1").appendField("点乘数组1"),this.appendValueInput("ARRAY2").appendField("点乘数组2"),this.setOutput(!0),this.setTooltip("Returns the dot product of two arrays.")}},wd={init:function(){this.setColour(fh),this.appendValueInput("ARRAY").appendField("获取平方数组"),this.setOutput(!0),this.setTooltip("Returns the element-wise square of the array.")}},Nd={init:function(){this.setColour(fh),this.appendValueInput("ARRAY").appendField("获取数组元素和"),this.setOutput(!0),this.setTooltip("Returns the sum of the array.")}},Fd={init:function(){this.setColour(fh),this.appendValueInput("SIZE").appendField("生成随机数组"),this.setOutput(!0),this.setTooltip("Returns a random array of the specified size.")}},Pd={init:function(){this.setColour(fh),this.appendValueInput("ARRAY").appendField("Python求和"),this.setOutput(!0),this.setTooltip("Returns the sum of the iterable.")}},xd={init:function(){this.setColour(fh),this.appendValueInput("DICT").setAlign(rt.inputs.Align.RIGHT).setCheck("Dict"),this.appendDummyInput().setAlign(rt.inputs.Align.RIGHT).appendField("值排序"),this.appendValueInput("KEY").setAlign(rt.inputs.Align.RIGHT).appendField("标签"),this.appendDummyInput().setAlign(rt.inputs.Align.RIGHT).appendField("排序方式").appendField(new rt.FieldDropdown([["升序","True"],["降序","False"]]),"AS_CENDING"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},kd={init:function(){this.setColour(fh),this.appendValueInput("DICT").setAlign(rt.inputs.Align.RIGHT).setCheck("Dict"),this.appendDummyInput().setAlign(rt.inputs.Align.RIGHT).appendField("获取").appendField(new rt.FieldDropdown([["前几行","head"],["最后几行","tail"]]),"TYPE"),this.appendValueInput("LINES").setAlign(rt.inputs.Align.RIGHT).appendField("行数"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},Vd={init:function(){this.setColour(fh),this.appendValueInput("DICT").setAlign(rt.inputs.Align.RIGHT).setCheck("Dict"),this.appendDummyInput().setAlign(rt.inputs.Align.RIGHT).appendField("筛选数据"),this.appendValueInput("KEY").setAlign(rt.inputs.Align.RIGHT).appendField("满足条件"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},Yd={init:function(){this.setColour(fh),this.appendValueInput("DICT").setAlign(rt.inputs.Align.RIGHT).setCheck("Dict"),this.appendValueInput("KEY").setAlign(rt.inputs.Align.RIGHT).appendField("通过标签"),this.appendDummyInput().setAlign(rt.inputs.Align.RIGHT).appendField("分组"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},Bd={init:function(){this.setColour(fh),this.appendDummyInput().setAlign(rt.inputs.Align.RIGHT).appendField(new rt.FieldDropdown([["求最小值","min"],["求最大值","max"],["求和","sum"],["求平均值","mean"],["求中位数","median"],["求标准差","std"]]),"TYPE"),this.appendValueInput("DICT").setAlign(rt.inputs.Align.RIGHT).setCheck("Dict"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},Ud={init:function(){this.setColour(fh),this.appendDummyInput().appendField("清除已有图像"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Xd=80,Gd={init:function(){this.setColour(Xd),this.appendDummyInput("").appendField(new rt.FieldLabel(rt.Msg.DS_CREATE_LINKEDLIST_NEW)),this.appendDummyInput("").appendField(new rt.FieldLabel(rt.Msg.DS_CREATE_LINKEDLIST_HEAD)).appendField(new rt.FieldTextInput("head"),"VAR"),this.appendDummyInput("").appendField(new rt.FieldLabel(rt.Msg.DS_CREATE_LINKEDLIST_TYPE)).appendField(new rt.FieldTextInput("tag"),"TYPE"),this.appendDummyInput().appendField(rt.Msg.DS_CREATE_LINKEDLIST_ATTRIBUTE),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new rt.icons.MutatorIcon(["ds_create_linkedlist_item"],this)),this.setTooltip(rt.Msg.DS_CREATE_LINKEDLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("ds_create_linkedlist_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:"name"),"KEY"+e).appendField("=")},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Hd={init:function(){this.setColour(Xd),this.appendDummyInput().appendField(rt.Msg.DS_CREATE_LINKEDLIST_CONTAINER_TITLE),this.appendStatementInput("STACK"),this.setTooltip(rt.Msg.DS_CREATE_LINKEDLIST_CONTAINER_TOOLTIP),this.contextMenu=!1}},Wd={init:function(){this.setColour(Xd),this.appendDummyInput().appendField(rt.Msg.DS_CREATE_LINKEDLIST_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.DS_CREATE_LINKEDLIST_ITEM_TOOLTIP),this.contextMenu=!1}},jd={init:function(){this.setColour(Xd),this.appendDummyInput("").appendField(rt.Msg.DS_CREATE_NODE_USE).appendField(new rt.FieldTextInput("tag"),"TYPE"),this.appendDummyInput("").appendField(rt.Msg.DS_CREATE_NODE_NEW),this.appendValueInput("NODE"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.DS_CREATE_NODE_TOOLTIP)}},qd={init:function(){this.setColour(Xd),this.appendDummyInput("").appendField(rt.Msg.DS_GET_NODE_ATTR_NODE),this.appendValueInput("NODE"),this.appendDummyInput("").appendField(rt.Msg.MIXLY_AIP_ATTR).appendField(new rt.FieldTextInput("name"),"TYPE"),this.appendDummyInput("").appendField(rt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.DS_GET_NODE_ATTR_TOOLTIP)}},Kd={init:function(){this.setColour(Xd),this.appendDummyInput("").appendField(rt.Msg.DS_SET_NODE_ATTR_NODE),this.appendValueInput("NODE"),this.appendDummyInput("").appendField(rt.Msg.MIXLY_AIP_ATTR).appendField(new rt.FieldTextInput("name"),"TYPE"),this.appendValueInput("VAR").appendField(rt.Msg.DS_SET_NODE_ATTR_SET),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.DS_SET_NODE_ATTR_TOOLTIP)}},zd={init:function(){this.setColour(Xd),this.appendValueInput("NODE").appendField(rt.Msg.DS_ADD_NODE_HEAD_NODE);var t=[[rt.Msg.DS_ADD_NODE_BEFORE,"before"],[rt.Msg.DS_ADD_NODE_AFTER,"after"]];this.appendDummyInput("").appendField(rt.Msg.DS_ADD_NODE_LINKEDLIST),this.appendValueInput("NODE2").appendField(rt.Msg.DS_SET_NODE_ATTR_NODE),this.appendValueInput("NODE3").appendField(new rt.FieldDropdown(t),"DIR").appendField(rt.Msg.DS_ADD_NODE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.DS_ADD_NODE_TOOLTIP)}},$d={init:function(){this.setColour(Xd),this.appendValueInput("NODE").appendField(rt.Msg.DS_ADD_NODE_HEAD_NODE);var t=[[rt.Msg.DS_ADD_NODE_BEFORE,"before"],[rt.Msg.DS_ADD_NODE_AFTER,"after"]];this.appendDummyInput("").appendField(rt.Msg.DS_ADD_NODE_LINKEDLIST),this.appendDummyInput("").appendField(rt.Msg.DS_CREATE_LINKEDLIST_ITEM_TITLE).appendField(new rt.FieldTextInput("name"),"TYPE"),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_AS),this.appendDummyInput("").appendField(rt.Msg.DS_ADD_NODE_ATTR),this.appendValueInput("NODE3").appendField(new rt.FieldDropdown(t),"DIR").appendField(rt.Msg.DS_ADD_NODE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.DS_ADD_NODE_TOOLTIP)}},Qd={init:function(){this.setColour(Xd),this.appendValueInput("NODE").appendField(rt.Msg.DS_ADD_NODE_HEAD_NODE),this.appendDummyInput("").appendField(rt.Msg.DS_ADD_NODE_LINKEDLIST),this.appendValueInput("NODE2").appendField(rt.Msg.DS_DEL_NODE_NAME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.DS_DEL_NODE_TOOLTIP)}},Jd={init:function(){this.setColour(Xd),this.appendValueInput("NODE").appendField(rt.Msg.DS_ADD_NODE_HEAD_NODE),this.appendDummyInput("").appendField(rt.Msg.DS_ADD_NODE_LINKEDLIST),this.appendDummyInput("").appendField(rt.Msg.DS_DEL_NODE_ATTR).appendField(new rt.FieldTextInput("name"),"TYPE"),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_AS),this.appendDummyInput("").appendField(rt.Msg.DS_ADD_NODE_ATTR),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.DS_DEL_NODE_TOOLTIP)}},Zd={init:function(){this.setColour(Xd),this.appendValueInput("NODE").appendField(rt.Msg.DS_ADD_NODE_HEAD_NODE),this.appendDummyInput("").appendField(rt.Msg.DS_REVERSE_LINKEDLIST),this.appendValueInput("NODE2").appendField(rt.Msg.DS_REVERSE_LINKEDLIST_NEW_HEAD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.DS_DEL_NODE_TOOLTIP)}},tc="#777777",ec={init:function(){this.setColour(tc),this.appendDummyInput("").appendField("from ").appendField(new rt.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new rt.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ic={init:function(){this.setColour(tc),this.appendDummyInput("").appendField("import ").appendField(new rt.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},nc={init:function(){this.setColour(tc),this.appendDummyInput("").appendField(new rt.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new rt.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},xc={init:function(){this.setColour(bc),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(rt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},kc={init:function(){this.setColour(bc),this.appendDummyInput().appendField(rt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Vc={init:function(){this.setColour(bc),this.appendDummyInput().appendField(rt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Yc={init:function(){this.setColour(bc),this.appendDummyInput().appendField(rt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(rt.Msg.MIXLY_EMQX_SERVER).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(rt.Msg.MIXLY_WIFI_USERNAME).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(rt.Msg.MIXLY_IOT_PASSWORD).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(rt.Msg.MIXLY_EMQX_PROJECT).setAlign(rt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bc={init:function(){this.setColour(bc),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(rt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(rt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(rt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},Uc={init:function(){this.setColour(bc),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(rt.Msg.MIXLY_EMQX_SUBSCRIBE+rt.Msg.MIXLY_MICROBIT_MSG).appendField(rt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(rt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},Xc={init:function(){this.setColour(bc),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(rt.Msg.MSG.stop+rt.Msg.MIXLY_EMQX_SUBSCRIBE).appendField(rt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},Gc={init:function(){this.setColour(bc),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(rt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Hc={init:function(){this.setColour(bc),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(rt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Wc={init:function(){this.setColour(bc),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(rt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},jc={init:function(){this.setColour(bc),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(rt.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},qc={init:function(){this.setColour(bc),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(rt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},Kc={init:function(){this.setColour(bc),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},zc={init:function(){this.setColour(bc),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},$c={init:function(){this.setColour(bc),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(rt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(rt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},Qc={init:function(){this.setColour(bc),this.appendDummyInput().appendField("MixIO").appendField(rt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(rt.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},Jc={init:function(){this.setColour(bc),this.appendDummyInput().appendField(rt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(rt.Msg.MIXLY_EMQX_SERVER).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(rt.Msg.CONTROLS_FOR_INPUT_WITH+rt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(rt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zc={init:function(){this.setColour(bc),this.appendDummyInput().appendField(rt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(rt.Msg.MIXLY_EMQX_SERVER).setAlign(rt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(rt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(rt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},t_={init:function(){this.VISITOR_ID=ot.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(bc),this.appendDummyInput("").appendField(this.newQuote_(!0)).appendField(new rt.FieldTextInput(this.visitorId),"VISITOR_ID").appendField(this.newQuote_(!1)),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")},newQuote_:function(t){if(t==this.RTL)var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAqUlEQVQI1z3KvUpCcRiA8ef9E4JNHhI0aFEacm1o0BsI0Slx8wa8gLauoDnoBhq7DcfWhggONDmJJgqCPA7neJ7p934EOOKOnM8Q7PDElo/4x4lFb2DmuUjcUzS3URnGib9qaPNbuXvBO3sGPHJDRG6fGVdMSeWDP2q99FQdFrz26Gu5Tq7dFMzUvbXy8KXeAj57cOklgA+u1B5AoslLtGIHQMaCVnwDnADZIFIrXsoXrgAAAABJRU5ErkJggg==";else e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAn0lEQVQI1z3OMa5BURSF4f/cQhAKjUQhuQmFNwGJEUi0RKN5rU7FHKhpjEH3TEMtkdBSCY1EIv8r7nFX9e29V7EBAOvu7RPjwmWGH/VuF8CyN9/OAdvqIXYLvtRaNjx9mMTDyo+NjAN1HNcl9ZQ5oQMM3dgDUqDo1l8DzvwmtZN7mnD+PkmLa+4mhrxVA9fRowBWmVBhFy5gYEjKMfz9AylsaRRgGzvZAAAAAElFTkSuQmCC";return new rt.FieldImage(e,12,12,'"')}},e_={init:function(){this.VISITOR_ID=ot.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(bc),this.appendDummyInput("").appendField(new rt.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},i_={init:function(){this.setColour(bc),this.appendDummyInput().appendField("MixIO").appendField(rt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},n_={init:function(){this.setColour(bc),this.appendDummyInput().appendField("HTTP"+rt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(rt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(rt.Msg.MIXLY_REQUESTS_GET).appendField(rt.Msg.MIXLY_GET_CURRENT_TIME).appendField(rt.Msg.MIXLY_OPEN_DEBUG).appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[rt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},s_={init:function(){this.setColour(bc),this.appendDummyInput().appendField("HTTP"+rt.Msg.MIXLY_Client).appendField(rt.Msg.MIXLY_GET).appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[rt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[rt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},r_={init:function(){this.setColour(bc),this.appendDummyInput().appendField("MQTT"+rt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(rt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(rt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(rt.MQTT_Topic).appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(rt.Msg.MIXLY_OPEN_DEBUG).appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[rt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},o_={init:function(){this.setColour(bc),this.appendDummyInput().appendField("MQTT"+rt.Msg.MIXLY_Client).appendField(rt.Msg.MIXLY_GET).appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[rt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[rt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},a_=Dc,l_=wc,u_=Nc,p_=Pc,h_=230,d_={init:function(){this.setColour(h_),this.appendDummyInput("").appendField(new rt.FieldDropdown(ot.Profile.default.digital_write),"PIN"),this.setOutput(!0)}},c_={init:function(){this.setColour(h_),this.appendDummyInput("").appendField(new rt.FieldDropdown(ot.Profile.default.digital_read),"PIN"),this.setOutput(!0)}},__={init:function(){this.setColour(h_),this.appendDummyInput("").appendField(new rt.FieldDropdown(ot.Profile.default.analog_write),"PIN"),this.setOutput(!0)}},f_={init:function(){this.setColour(h_),this.appendDummyInput("").appendField(new rt.FieldDropdown(ot.Profile.default.analog_read),"PIN"),this.setOutput(!0)}},T_={init:function(){this.setColour(40),this.appendDummyInput("").appendField(new rt.FieldLabel(rt.Msg.MIXPY_SERIAL_OPEN)).appendField(new rt.FieldTextInput("ser"),"SER"),this.appendDummyInput().appendField(rt.Msg.MIXLY_SERIAL_BEGIN).appendField(new rt.FieldDropdown([["115200","115200"],["256000","256000"],["128000","128000"],["57600","57600"],["56000","56000"],["43000","43000"],["38400","38400"],["28800","28800"],["19200","19200"],["9600","9600"],["4800","4800"],["2400","2400"],["1200","1200"],["600","600"],["300","300"],["110","110"]]),"BPS"),this.appendValueInput("VAR").appendField(rt.Msg.MIXPY_SERIAL_OPEN_TIMEOUT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(rt.Msg.MIXPY_SERIAL_OPEN_TOOLTIP)}},m_={init:function(){this.setColour(40),this.appendValueInput("SER"),this.appendValueInput("VAR").appendField(rt.Msg.MIXPY_SERIAL_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(rt.Msg.MIXPY_SERIAL_WRITE_TOOLTIP)}},g_={init:function(){this.setColour(40),this.appendValueInput("SER"),this.appendValueInput("VAR").setCheck(Number).appendField(rt.Msg.MIXPY_SERIAL_READ),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(rt.Msg.MIXPY_SERIAL_READ_TOOLTIP)}},I_={init:function(){this.setColour(40),this.appendValueInput("SER"),this.appendDummyInput().appendField(rt.Msg.MIXPY_SERIAL_CLOSE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(rt.Msg.MIXPY_SERIAL_CLOSE_TOOLTIP)}},E_=80,O_={init:function(){this.appendDummyInput().appendField(rt.Msg.SKLEARN_CLASSIFICATION_GENERATION),this.appendValueInput("n_samples").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_SAMPLES),this.appendValueInput("n_features").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_FEATURES),this.appendValueInput("n_informative").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_EFFECTIVE_FEATURES),this.appendValueInput("n_redundant").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_REDUNDANT_FEATURES),this.appendValueInput("n_repeated").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_REPEATED_FEATURES),this.appendValueInput("n_classes").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_CLASSES),this.appendValueInput("n_clusters_per_class").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_CLUSTERS_PER_CLASSES),this.appendValueInput("random_state").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},M_={init:function(){this.appendDummyInput().appendField(rt.Msg.SKLEARN_REGRESSION_GENERATION),this.appendValueInput("n_samples").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_SAMPLES),this.appendValueInput("n_features").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_FEATURES),this.appendValueInput("n_informative").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_EFFECTIVE_FEATURES),this.appendValueInput("n_targets").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_LABELS),this.appendValueInput("bias").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.DEVIATION),this.appendValueInput("noise").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NOISE),this.appendValueInput("random_state").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},R_={init:function(){this.appendDummyInput().appendField(rt.Msg.SKLEARN_CLUSTERING_GENERATION),this.appendValueInput("n_samples").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_SAMPLES),this.appendValueInput("n_features").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_FEATURES),this.appendValueInput("centers").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_CLUSTERS),this.appendValueInput("cluster_std").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.STANDARD_DEVIATION_OF_CLUSTER),this.appendValueInput("center_box").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.CLUSTER_BOUNDING_BOX),this.appendValueInput("shuffle").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.SHUFFLE_SAMPLES),this.appendValueInput("random_state").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},A_={init:function(){var t=[[rt.Msg.SKLEARN_LOAD_IRIS,"load_iris"],[rt.Msg.SKLEARN_LOAD_BOSTON,"load_boston"],[rt.Msg.SKLEARN_LOAD_DIABETES,"load_diabetes"],[rt.Msg.SKLEARN_LOAD_BREAST_CANCER,"load_breast_cancer"],[rt.Msg.SKLEARN_LOAD_LINNERUD,"load_linnerud"],[rt.Msg.SKLEARN_LOAD_DIGITS,"load_digits"]];this.appendDummyInput().appendField("sklearn "+rt.Msg.LOAD).appendField(new rt.FieldDropdown(t),"type").appendField(new rt.FieldTextInput("iris"),"name"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")},getVars:function(){return[this.getFieldValue("name")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("name"))&&this.setTitleValue(e,"name")}},y_={init:function(){this.appendValueInput("name").setCheck(null).appendField("sklearn "+rt.Msg.DATA_SET),this.appendDummyInput().setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MIXLY_GET).appendField(new rt.FieldDropdown([[rt.Msg.EIGENVALUES,"data"],[rt.Msg.LABEL_VALUE,"target"],[rt.Msg.FEATURE,"feature_names"],[rt.Msg.mixpy_PYLAB_TICKS_TAG,"target_names"]]),"type"),this.setOutput(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},S_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.DATA_SEGMENTATION),this.appendValueInput("train_data").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.EIGENVALUES),this.appendValueInput("train_target").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.LABEL_VALUE),this.appendValueInput("test_size").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.TEST_SET_PROPORTION),this.appendValueInput("rondom_state").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},v_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.DATA_SEGMENTATION),this.appendValueInput("train_data").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.EIGENVALUES),this.appendValueInput("test_size").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.TEST_SET_PROPORTION),this.appendValueInput("rondom_state").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},C_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.SKLEARN_LINEARREGRESSION_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendValueInput("fit_intercept").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.SKLEARN_CALCULATE_MODEL_INTERRUPT),this.appendValueInput("normalize").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.SKLEARN_REGRESSION_NORMIALIZATION),this.appendValueInput("n_jobs").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.SKLEARN_THREADS),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},L_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.SKLEARN_RIDGE_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendValueInput("alpha").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.SKLEARN_REGULA_INTENSITY),this.appendValueInput("fit_intercept").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.SKLEARN_CALCULATE_MODEL_INTERRUPT),this.appendValueInput("normalize").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.SKLEARN_REGRESSION_NORMIALIZATION),this.appendValueInput("max_iter").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.SKLEARN_MAX_ITER),this.appendValueInput("random_state").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},b_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.SKLEARN_DECISIONTREE_INIT).appendField(new rt.FieldDropdown([[rt.Msg.SKLEARN_CLASSIFICATION_ALGORITHM,"DecisionTreeClassifier"],[rt.Msg.SKLEARN_REGRESSION_ALGORITHM,"DecisionTreeRegressor"]]),"type"),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendValueInput("max_depth").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.SKLEARN_MAXIMUM_TREE_DEPTH),this.appendValueInput("random_state").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},D_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.SKLEARN_RANDOMFOREST_INIT).appendField(new rt.FieldDropdown([[rt.Msg.SKLEARN_CLASSIFICATION_ALGORITHM,"RandomForestClassifier"],[rt.Msg.SKLEARN_REGRESSION_ALGORITHM,"RandomForestRegressor"]]),"type"),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendValueInput("n_estimators").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_TREES),this.appendValueInput("max_depth").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.SKLEARN_MAXIMUM_TREE_DEPTH),this.appendValueInput("n_jobs").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.SKLEARN_THREADS),this.appendValueInput("random_state").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},w_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.SKLEARN_KNN_INIT).appendField(new rt.FieldDropdown([[rt.Msg.SKLEARN_CLASSIFICATION_ALGORITHM,"KNeighborsClassifier"],[rt.Msg.SKLEARN_REGRESSION_ALGORITHM,"KNeighborsRegressor"]]),"type"),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendValueInput("K").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField("K"),this.appendValueInput("n_jobs").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.SKLEARN_THREADS),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},N_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.SKLEARN_GAUSSINNB_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},F_={init:function(){this.appendDummyInput().appendField("sklearn 初始化 PCA 算法"),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendValueInput("n_components").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.SKLEARN_PCA_N_COMPONENTS),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},P_={init:function(){this.appendDummyInput().appendField("sklearn PCA 降维"),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.EIGENVALUES),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},x_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.SKLEARN_KMEANS_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendValueInput("n_clusters").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.NUMBER_OF_CLUSTERS_JUST),this.appendValueInput("max_iter").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.SKLEARN_MAX_ITER),this.appendValueInput("random_state").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},k_={init:function(){this.appendDummyInput().appendField("sklearn K-均值聚类"),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.EIGENVALUES),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},V_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.TRAINING_MODEL),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.EIGENVALUES),this.appendValueInput("train_target").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.LABEL_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},Y_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.TRAINING_MODEL),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.EIGENVALUES),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},B_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.MODEL_PRODICTION),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.EIGENVALUES),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},U_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.CALCULATE_THE_SCORE),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.EIGENVALUES),this.appendValueInput("train_target").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.LABEL_VALUE),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},X_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.CALCULATE_THE_SCORE),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.EIGENVALUES),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},G_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.SKLEARN_GENERALIZED_LINEAR_REGRESSION),this.appendValueInput("model_name").setAlign(rt.inputs.Align.RIGHT).setCheck(null).appendField(rt.Msg.MODEL_NAME),this.appendDummyInput().setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MIXLY_GET).appendField(new rt.FieldDropdown([[rt.Msg.SKLEARN_COEF,"coef_"],[rt.Msg.SKLEARN_INTERCEPT,"intercept_"]]),"type"),this.setOutput(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},H_={init:function(){this.appendDummyInput().appendField("sklearn "+rt.Msg.SKLEARN_CLUSTERING),this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MODEL_NAME),this.appendDummyInput().appendField(rt.Msg.MIXLY_GET).appendField(new rt.FieldDropdown([[rt.Msg.SKLEARN_CLUSTER_CENTER,"cluster_centers_"],[rt.Msg.SKLEARN_LABELS_AFTER_CLUSTERING,"labels_"],[rt.Msg.SKLEARN_CLUSTERING_SUM_OF_SQUARED_DISTANCES,"inertia_"]]),"type"),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},W_={init:function(){this.appendValueInput("model_name").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField("sklearn").appendField(new rt.FieldDropdown([[rt.Msg.SKLEARN_SAVE_MODEL,"dump"],[rt.Msg.SKLEARN_LOAD_MODEL,"load"]]),"type").appendField(" "+rt.Msg.MODEL_NAME),this.appendValueInput("address").setCheck(null).setAlign(rt.inputs.Align.RIGHT).appendField(rt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(E_),this.setTooltip(""),this.setHelpUrl("")}},j_=120,q_={init:function(){this.setColour(j_),this.appendValueInput("DELAY_TIME",Number).appendField(rt.Msg.MIXLY_DELAY+"("+rt.Msg.MIXLY_MILLIS+")").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_CONTROL_DELAY)}},K_={init:function(){this.setColour(j_),this.appendDummyInput().appendField(rt.Msg.blockpy_time_time),this.setOutput(!0,Number),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_CONTROL_MILLIS)}},z_={init:function(){this.setColour(j_),this.appendDummyInput("").appendField(rt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME),this.appendDummyInput().appendField(new rt.FieldDropdown([[rt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_ALL,"all"],[rt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_YEAR,"0"],[rt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_MONTH,"1"],[rt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_DATE,"2"],[rt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_HOUR,"3"],[rt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_MINUTE,"4"],[rt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_SECOND,"5"],[rt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_INWEEK,"6"],[rt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_INYEAR,"7"],[rt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_DST,"8"]]),"op"),this.setOutput(!0),this.setInputsInline(!0)}},$_={init:function(){this.setColour(j_),this.appendValueInput("STATUS_CODE",Number).appendField(rt.Msg.MIXLY_MICROBIT_Panic_with_status_code).setCheck(Number),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_CONTROL_DELAY)}},Q_={init:function(){this.setColour(j_),this.appendDummyInput().appendField(rt.Msg.MIXLY_MICROBIT_Reset_micro),this.setPreviousStatement(!0)}},J_={init:function(){this.setColour(j_),this.appendValueInput("TIME").setCheck(Number).setAlign(rt.inputs.Align.RIGHT).appendField("MsTimer2").appendField(rt.Msg.MIXLY_MSTIMER2_EVERY),this.appendDummyInput().appendField("ms"),this.appendStatementInput("DO").appendField(rt.Msg.MIXLY_MSTIMER2_DO),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Z_={init:function(){this.setColour(j_),this.appendDummyInput().appendField("MsTimer2").appendField(rt.Msg.MIXLY_MSTIMER2_START),this.setPreviousStatement(!0),this.setNextStatement(!0)}},tf={init:function(){this.setColour(j_),this.appendDummyInput().appendField("MsTimer2").appendField(rt.Msg.MIXLY_STOP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ef={init:function(){this.setColour(j_),this.appendValueInput("DELAY_TIME",Number).appendField(rt.Msg.MIXLY_DELAY).setCheck(Number),this.appendDummyInput().appendField(rt.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_CONTROL_DELAY)}},nf=180,sf={init:function(){this.setColour(nf),this.appendDummyInput("").appendField(rt.Msg.blockpy_turtle_create).appendField(new rt.FieldTextInput("tina"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.blockpy_turtle_create_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},rf={init:function(){this.setColour(nf),this.appendDummyInput().appendField(rt.Msg.blockpy_TURTLE_DONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},of={init:function(){this.setColour(nf),this.appendDummyInput().appendField(rt.Msg.MIXLY_PYTHON_TURTLE_EXITONCLICK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},af={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[rt.Msg.blockpy_forward,"forward"],[rt.Msg.blockpy_backward,"backward"]];this.setColour(nf),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_MICROBIT_JS_MOVE_BY).appendField(new rt.FieldDropdown(t),"DIR").appendField(rt.Msg.MIXLY_MICROBIT_JS_MOVE_BY_num),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{forward:rt.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:rt.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[t]}))}},lf={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[rt.Msg.blockpy_left,"left"],[rt.Msg.blockpy_right,"right"]];this.setColour(nf),this.appendValueInput("VAR").appendField(rt.Msg.blockpy_turtle_rotate).appendField(new rt.FieldDropdown(t),"DIR").appendField(rt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{left:rt.Msg.MIXLY_TOOLTIP_TURTEL_LEFT,right:rt.Msg.MIXLY_TOOLTIP_TURTEL_RIGHT}[t]}))}},uf={init:function(){this.setColour(nf),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(rt.Msg.blockpy_setheading),this.appendDummyInput().appendField(rt.Msg.blockpy_setheading_degree),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},pf={init:function(){this.setColour(nf),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(rt.Msg.MIXLY_TURTLE_SCREEN_DELAY),this.appendDummyInput().appendField(rt.Msg.MIXLY_MILLIS),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_TURTEL_SCREEN_DELAY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},hf={init:function(){this.setColour(nf),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(rt.Msg.blockpy_turtle_goto),this.appendValueInput("val").setCheck(Number).appendField(rt.Msg.blockpy_turtle_goto_y),this.appendDummyInput().appendField(rt.Msg.blockpy_turtle_goto_position),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},df={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[rt.Msg.PYLAB_LABEL_X,"x"],[rt.Msg.PYLAB_LABEL_Y,"y"]];this.setColour(nf),this.appendValueInput("VAR").appendField(new rt.FieldDropdown(t),"DIR").appendField(rt.Msg.MIXLY_MIXPY_TURTLE_SETXY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.MIXLY_MIXPY_TURTLE_SETXY_TOOLTIP)}},cf={init:function(){this.setColour(nf);var t=[[rt.Msg.TURTLE_POS,"pos"],[rt.Msg.TURTLE_SHAPE,"shape"],[rt.Msg.TURTLE_HEADING,"heading"],[rt.Msg.MIXLY_MIXPY_TURTLE_WIDTH,"width"],[rt.Msg.MIXLY_TURTEL_GET_SHAPESIZE,"shapesize"],[rt.Msg.MIXLY_SPEED,"speed"]];this.appendValueInput("TUR").setCheck("Turtle"),this.appendDummyInput("").appendField(rt.Msg.TURTLE_POS_SHAPE).appendField(new rt.FieldDropdown(t),"DIR");var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{pos:rt.Msg.MIXLY_TOOLTIP_TURTEL_POS,shape:rt.Msg.MIXLY_TOOLTIP_TURTEL_SHAPE,heading:rt.Msg.MIXLY_TOOLTIP_TURTEL_HEADING,width:rt.Msg.MIXLY_TOOLTIP_TURTEL_WIDTH,speed:rt.Msg.MIXLY_TOOLTIP_TURTEL_GET_SPEED,shapesize:rt.Msg.MIXLY_TURTEL_GET_SHAPESIZE_TOOLTIP}[t]})),this.setOutput(!0),this.setInputsInline(!0)}},_f={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[rt.Msg.MIXLY_LCD_STAT_CLEAR,"clear"],[rt.Msg.blockpy_turtle_reset,"reset"],[rt.Msg.blockpy_turtle_home,"home"]];this.setColour(nf),this.appendDummyInput("").appendField(new rt.FieldDropdown(t),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:rt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:rt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:rt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))}},ff={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[rt.Msg.blockpy_turtle_penup,"penup"],[rt.Msg.blockpy_turtle_pendown,"pendown"]];this.setColour(nf),this.appendDummyInput("").appendField(new rt.FieldDropdown(t),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{penup:rt.Msg.MIXLY_TOOLTIP_TURTEL_PENUP,pendown:rt.Msg.MIXLY_TOOLTIP_TURTEL_PENDOWN}[t]}))}},Tf={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[rt.Msg.blockpy_turtle_beginfill,"begin"],[rt.Msg.blockpy_turtle_endfill,"end"]];this.setColour(nf),this.appendDummyInput("").appendField(new rt.FieldDropdown(t),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{begin:rt.Msg.MIXLY_TOOLTIP_TURTEL_BEGINFILL,end:rt.Msg.MIXLY_TOOLTIP_TURTEL_ENDFILL}[t]}))}},mf={init:function(){this.appendDummyInput("").appendField(new rt.FieldTextInput("tina"),"TUR");var t=[[rt.Msg.blockpy_turtle_size,"pensize"],[rt.Msg.MIXLY_SPEED,"speed"]];this.setColour(nf),this.appendValueInput("VAR").appendField(rt.Msg.blockpy_turtle_set).appendField(new rt.FieldDropdown(t),"DIR").appendField(rt.Msg.blockpy_turtle_set_num),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{pensize:rt.Msg.MIXLY_TOOLTIP_TURTEL_SIZE,speed:rt.Msg.MIXLY_TOOLTIP_TURTEL_SPEED}[t]}))}},gf={init:function(){this.setColour(nf),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(rt.Msg.blockpy_turtle_set_size),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_TURTEL_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},If={init:function(){this.setColour(nf),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(rt.Msg.blockpy_turtle_set_speed),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_TURTEL_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ef={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[rt.Msg.blockpy_turtle_circle,"circle"],[rt.Msg.blockpy_turtle_dot,"dot"]];this.setColour(nf),this.appendValueInput("VAR").appendField(rt.Msg.blockpy_turtle_draw).appendField(new rt.FieldDropdown(t),"DIR").appendField(rt.Msg.blockpy_turtle_radius),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{circle:rt.Msg.MIXLY_TOOLTIP_TURTEL_CIRCLE,dot:rt.Msg.MIXLY_TOOLTIP_TURTEL_DOT}[t]}))}},Of={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(nf),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(rt.Msg.blockpy_turtle_radius),this.appendValueInput("data").setCheck(Number).appendField(rt.Msg.blockpy_turtle_angle),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_TURTEL_CIRCLE)}},Mf={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[rt.Msg.blockpy_turtle_hide,"hideturtle"],[rt.Msg.blockpy_turtle_show,"showturtle"]];this.setColour(nf),this.appendDummyInput("").appendField(new rt.FieldDropdown(t),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{hideturtle:rt.Msg.MIXLY_TOOLTIP_TURTEL_HIDE,showturtle:rt.Msg.MIXLY_TOOLTIP_TURTEL_SHOW}[t]}))}},Rf={init:function(){this.setColour(nf),this.appendDummyInput().appendField(rt.Msg.blockpy_turtle_bgcolor).appendField(new rt.FieldColour("#ff0000"),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Af={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(nf),this.appendDummyInput().appendField(rt.Msg.blockpy_turtle_pencolor).appendField(new rt.FieldColour("#ff0000"),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yf={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(nf),this.appendDummyInput().appendField(rt.Msg.blockpy_turtle_fillcolor).appendField(new rt.FieldColour("#ff0000"),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Sf={init:function(){this.setColour(nf),this.appendValueInput("TUR").setCheck("Turtle"),this.appendDummyInput("").appendField(rt.Msg.TURTLE_CLONE),this.setTooltip(rt.Msg.TURTLE_CLONE_TOOLTIP),this.setOutput(!0)}},vf={init:function(){this.setColour(nf),this.appendValueInput("VAR").setCheck(String).appendField(rt.Msg.blockpy_turtle_bgcolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Cf={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(nf),this.appendValueInput("VAR").setCheck(String).appendField(rt.Msg.blockpy_turtle_pencolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Lf={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(nf),this.appendValueInput("VAR").setCheck(String).appendField(rt.Msg.blockpy_turtle_fillcolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bf={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(nf),this.appendDummyInput().appendField(rt.Msg.blockpy_turtle_pencolor).appendField(new rt.FieldColour("#ff0000"),"FIELDNAME"),this.appendDummyInput().appendField(rt.Msg.blockpy_turtle_fillcolor).appendField(new rt.FieldColour("#ff0000"),"FIELDNAME2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Df={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(nf),this.appendValueInput("VAR1").setCheck(String).appendField(rt.Msg.blockpy_turtle_pencolor),this.appendValueInput("VAR2").setCheck(String).appendField(rt.Msg.blockpy_turtle_fillcolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wf={init:function(){this.setColour(nf),this.appendValueInput("VAR").setCheck(String).appendField(rt.Msg.blockpy_turtle_bgcolor_hex),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Nf={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(nf),this.appendValueInput("VAR").setCheck(String).appendField(rt.Msg.blockpy_turtle_pencolor_hex),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ff={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(nf),this.appendValueInput("VAR").setCheck(String).appendField(rt.Msg.blockpy_turtle_fillcolor_hex),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pf={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[rt.Msg.blockpy_turtle_shape_arrow,"arrow"],[rt.Msg.blockpy_turtle_shape_turtle,"turtle"],[rt.Msg.blockpy_turtle_shape_circle,"circle"],[rt.Msg.blockpy_turtle_shape_square,"square"],[rt.Msg.blockpy_turtle_shape_triangle,"triangle"],[rt.Msg.blockpy_turtle_shape_classic,"classic"]];this.setColour(nf),this.appendDummyInput("").appendField(rt.Msg.blockpy_turtle_shape).appendField(new rt.FieldDropdown(t),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.TURTLE_SHAPE_TOOLTIP)}},xf={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(nf),this.appendDummyInput("").appendField(rt.Msg.MIXLY_TURTEL_SHAPESIZE),this.appendValueInput("WID").setCheck(Number).appendField(rt.Msg.MIXLY_TURTEL_SHAPESIZE_WID),this.appendValueInput("LEN").setCheck(Number).appendField(rt.Msg.MIXLY_TURTEL_SHAPESIZE_LEN),this.appendValueInput("OUTLINE").setCheck(Number).appendField(rt.Msg.MIXLY_TURTEL_SHAPESIZE_OUTLINE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.MIXLY_TOOLTIP_SHAPESIZE)}},kf={init:function(){this.appendDummyInput("").appendField(rt.Msg.MIXLY_MIXPY_TURTLE_NUMINPUT),this.setColour(nf),this.appendValueInput("TITLE").setCheck(String).appendField(rt.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_TITLE),this.appendValueInput("PROMPT").setCheck(String).appendField(rt.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_PROMPT),this.appendValueInput("DEFAULT").setCheck(Number).appendField(rt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("MIN").setCheck(Number).appendField(rt.Msg.MATH_ONLIST_OPERATOR_MIN),this.appendValueInput("MAX").setCheck(Number).appendField(rt.Msg.MATH_ONLIST_OPERATOR_MAX),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(rt.Msg.TURTLE_NUMINPUT_TOOLTIP)}},Vf={init:function(){this.appendDummyInput("").appendField(rt.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT),this.setColour(nf),this.appendValueInput("TITLE").setCheck(String).appendField(rt.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_TITLE),this.appendValueInput("PROMPT").setCheck(String).appendField(rt.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_PROMPT),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(rt.Msg.TURTLE_TEXTINPUT_TOOLTIP)}},Yf={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(nf),this.appendValueInput("VAR").setCheck(String).appendField(rt.Msg.blockpy_turtle_write),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.TURTLE_WRITE_TOOLTIP)}},Bf={init:function(){var t=[[rt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"],[rt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"]],e=[[rt.Msg.MIXLY_TURTLE_WRITE_ALIGN_LEFT,"left"],[rt.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[rt.Msg.MIXLY_TURTLE_WRITE_ALIGN_RIGHT,"right"]],i=[[rt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_NORMAL,"normal"],[rt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_BOLD,"bold"],[rt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_ITALIC,"italic"],[rt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_BOLD_ITALIC,'bold","italic']];this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(nf),this.appendValueInput("VAR").setCheck(String).appendField(rt.Msg.blockpy_turtle_write),this.appendDummyInput("").appendField(rt.Msg.MIXLY_TURTLE_WRITE_MOVE).appendField(new rt.FieldDropdown(t),"MOVE"),this.appendDummyInput("").appendField(rt.Msg.MIXLY_TURTLE_WRITE_ALIGN).appendField(new rt.FieldDropdown(e),"ALIGN"),this.appendValueInput("FONTNAME").setCheck(String).appendField(rt.Msg.MIXLY_TURTLE_WRITE_FONT_NAME),this.appendValueInput("FONTNUM").setCheck(Number).appendField(rt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendDummyInput("").appendField(rt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE).appendField(new rt.FieldDropdown(i),"FONTTYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.TURTLE_WRITE_TOOLTIP)}},Uf={init:function(){var t=[[rt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"],[rt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"]],e=[[rt.Msg.MIXLY_TURTLE_WRITE_ALIGN_LEFT,"left"],[rt.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[rt.Msg.MIXLY_TURTLE_WRITE_ALIGN_RIGHT,"right"]],i=[[rt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_NORMAL,"normal"],[rt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_BOLD,"bold"],[rt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_ITALIC,"italic"]];this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(nf),this.appendValueInput("VAR").setCheck(String).appendField(rt.Msg.blockpy_turtle_write),this.appendDummyInput("").appendField(rt.Msg.MIXLY_TURTLE_WRITE_MOVE).appendField(new rt.FieldDropdown(t),"MOVE"),this.appendDummyInput("").appendField(rt.Msg.MIXLY_TURTLE_WRITE_ALIGN).appendField(new rt.FieldDropdown(e),"ALIGN"),this.appendValueInput("FONTNAME").setCheck(String).appendField(rt.Msg.MIXLY_TURTLE_WRITE_FONT_NAME),this.appendValueInput("FONTNUM").setCheck(Number).appendField(rt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendDummyInput("").appendField(rt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE).appendField(new rt.FieldDropdown(i),"FONTTYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.TURTLE_WRITE_TOOLTIP)}},Xf={init:function(){this.setColour(nf),this.appendDummyInput("").setAlign(rt.inputs.Align.RIGHT).appendField(new rt.FieldColour("ff0000"),"COLOR"),this.setInputsInline(!0),this.setOutput(!0,String)}},Gf={init:function(){this.setColour(nf),this.appendValueInput("TUR").setCheck("Turtle"),this.appendDummyInput("").appendField(rt.Msg.MIXLY_TURTEL_GETSCREEN).appendField(new rt.FieldTextInput("screen"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(rt.Msg.MIXLY_TURTEL_GETSCREEN_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){rt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Hf={init:function(){this.setColour(nf),this.appendValueInput("TUR"),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_TURTEL_EVENT_ONKEY),this.appendValueInput("callback").appendField(rt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_TURTEL_EVENT_ONKEY_TOOLTIP)}},Wf={init:function(){this.setColour(nf),this.appendValueInput("TUR"),this.appendDummyInput("").appendField(rt.Msg.MIXLY_TURTEL_EVENT_ONCLICK),this.appendValueInput("callback").appendField(rt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_TURTEL_EVENT_ONCLICK_TOOLTIP)}},jf={init:function(){this.setColour(nf),this.appendValueInput("TUR"),this.appendValueInput("VAR").appendField(rt.Msg.MIXLY_TURTEL_EVENT_ONTIMER),this.appendDummyInput("").appendField(rt.Msg.MIXLY_mSecond),this.appendValueInput("callback").appendField(rt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(rt.Msg.MIXLY_TURTEL_EVENT_ONTIMER_TOOLTIP)}},qf={init:function(){this.setColour(nf),this.appendValueInput("TUR"),this.appendDummyInput().appendField(rt.Msg.MIXLY_TURTEL_SCREEN_LISTEN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Kf={init:function(){this.setColour(nf),this.appendValueInput("TUR"),this.appendValueInput("FILE").setCheck(String).appendField(rt.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(rt.Msg.mixpy_TURTLE_SAVEFIG_TOOLTIP)}},zf=function(t,e){var i=this.getFieldValue("TYPE");return e.definitions_.import_FileDialog="import FileDialog",["FileDialog."+i+"()",e.ORDER_ATOMIC]},$f=function(t,e){var i=this.getFieldValue("CTYPE");return e.definitions_.import_aip="import aip",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = aip."+i+"("+e.valueToCode(this,"API_KEY",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"SECRET_KEY",e.ORDER_ATOMIC)+")\n"},Qf=function(t,e){return e.definitions_.import_aip="import aip",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".synthesis("+e.valueToCode(this,"STR",e.ORDER_ATOMIC)+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},Jf=function(t,e){return e.definitions_.import_aip="import aip",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".asr("+(e.valueToCode(this,"FILE",e.ORDER_ATOMIC)||'""')+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},Zf=function(t,e){e.definitions_.import_aip="import aip";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return[i+"."+e.valueToCode(this,"FUNC",e.ORDER_ATOMIC)+"("+n+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},tT=function(t,e){return e.definitions_.import_aip="import aip",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".match("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"VAR2",e.ORDER_ATOMIC)+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},eT=function(t,e){e.definitions_.import_aip="import aip";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return[i+"."+e.valueToCode(this,"FUNC",e.ORDER_ATOMIC)+"("+n+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},iT=function(t,e){e.definitions_.import_aip="import aip";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"STR",e.ORDER_ATOMIC);return[i+"."+e.valueToCode(this,"FUNC",e.ORDER_ATOMIC)+"("+n+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},nT=function(t,e){e.definitions_.import_aip="import aip";var i=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),n=e.valueToCode(this,"STR1",e.ORDER_ATOMIC),s=e.valueToCode(this,"STR2",e.ORDER_ATOMIC);return[i+"."+e.valueToCode(this,"FUNC",e.ORDER_ATOMIC)+"("+n+","+s+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},sT=function(t,e){return e.definitions_.import_aip="import aip",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".topic("+e.valueToCode(this,"STR1",e.ORDER_ATOMIC)+","+e.valueToCode(this,"STR2",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},rT=function(t,e){return e.definitions_.import_aip="import aip",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".newsSummary("+e.valueToCode(this,"STR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"LEN",e.ORDER_ATOMIC)+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},oT=function(t,e){return[this.getFieldValue("TYPE"),e.ORDER_ATOMIC]},aT=function(t,e){return[this.getFieldValue("TYPE"),e.ORDER_ATOMIC]},lT=function(t,e){return[this.getFieldValue("TYPE"),e.ORDER_ATOMIC]},uT=function(t,e){return[this.getFieldValue("TYPE"),e.ORDER_ATOMIC]},pT=function(t,e){return e.definitions_.import_audio="import audio","audio.audio_record("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+","+(e.valueToCode(this,"TIME",e.ORDER_ATOMIC)||"0")+")\n"},hT=function(t,e){return e.definitions_.import_audio="import cam","cam.photo_capture("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+","+(e.valueToCode(this,"BUT",e.ORDER_ATOMIC)||'""')+")\n"},dT=function(t,e){var i=e.valueToCode(this,"AI",e.ORDER_ASSIGNMENT)||"0",n=this.getFieldValue("CTYPE");if("Image"==n)var s=i+'["result"][0]["keyword"]';if("Speech"==n)s=i+'["result"][0]';if("Face"==n||"OcrSimilarity"==n)s=i+'["score"]';if("Ocr"==n)s=i+'["words_result"]';return[s,e.ORDER_ATOMIC]},cT=function(t,e){e.definitions_.import_sprite="import sprite";return"g = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,1,0,0,0,0,0,0], [0,0,0,1,0,0,1,0,0,0], [0,1,1,0,1,1,0,0,0,0], [0,0,0,1,0,0,0,1,0,0], [0,0,0,1,0,0,1,1,0,0], [0,0,1,0,0,1,0,1,0,0], [0,0,0,0,1,1,1,0,0,0]]\nmark = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0]]\nvis = [0,1,0,0,0,0,0,0,0]\nposition = [[0, 0], [200, 200], [250, 60], [320, 200], [280, 380], [470, 250], [670, 90], [650, 340]]\nsprite.clearAllSprites()\nsprite.createBackground('ditu')\nmask = sprite.Sprite('white', 96, 354)\nmask.hide()\nhouse = [\n sprite.Sprite('mark', 150, 380),\n sprite.Sprite('xtxn', 96, 170),\n sprite.Sprite('xnvijx', 270, 45),\n sprite.Sprite('xnxbjx', 310, 182),\n sprite.Sprite('xnsijx', 300, 370),\n sprite.Sprite('xnkejx', 495, 220),\n sprite.Sprite('bwbwjx', 716, 85),\n sprite.Sprite('lelejx', 686, 314)\n]\nfor i in house:\n i.filterBrighter()\n i.hide()\n"},_T=function(){return"path = [1]\nmask.show()\ncar = sprite.Sprite('xnie', position[1][0], position[1][1])\nhouse[1].show()\ncar.nowPos = 1\ndef drive(n):\n if g[car.nowPos][n]==1:\n car.slideTo(position[n][0], position[n][1], 1)\n car.nowPos = n\n else:\n print('移动失败!程序有误!')\n exit()\n"},fT=function(t,e){e.definitions_.import_random="import random";return"f = path[(len(path) - 1)]\nflag = 0\nfor _my_variable in [6,5,4,3,2,1,0]:\n if vis[_my_variable+1] == 0 and g[f][_my_variable+1] == 1:\n if mark[f][_my_variable+1] == 0:\n flag = 1\n break\n"},TT=function(t,e){return["flag == 1",e.ORDER_ATOMIC]},mT=function(){return"mark[f][_my_variable+1] = 1\nvis[_my_variable+1] = 1\n"},gT=function(){return"path.append(_my_variable+1)\ndrive(path[len(path) - 1])\nhouse[_my_variable+1].show()\n"},IT=function(t,e){e.definitions_.import_time="import time";return"del path[len(path) - 1]\nhouse[0].show()\ntime.sleep(0.5)\nhouse[0].hide()\n"},ET=function(){var t="for i in range(7):\n mark[f][i+1] = 0\n vis[f] = 0\n";return t="house[f].hide()\ndrive(path[len(path) - 1])\n"+t},OT=function(t,e){return["len(path) == 7",e.ORDER_ATOMIC]},MT=function(){return'name = ["","学校","小智家","小欣家","小思家","小科家","贝贝家","乐乐家"]\nres = ""\nfor i in path:\n res = res + name[i] + "-"\nprint(res[:-1])\n'},RT=function(t,e){e.definitions_.import_sprite="import sprite";return"g = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,1,0,0,0,0,0,0], [0,0,0,1,0,0,1,0,0,0], [0,1,1,0,1,0,0,0,0,0], [0,0,0,1,0,0,0,1,0,0], [0,0,0,1,0,0,0,1,0,0], [0,0,1,0,0,0,0,1,0,0], [0,0,0,0,1,1,1,0,0,0]]\nmark = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0]]\nvis = [0,1,0,0,0,0,0,0,0]\nposition = [[0, 0], [200, 200], [250, 60], [320, 200], [280, 380], [470, 250], [670, 90], [650, 340]]\nsprite.clearAllSprites()\nsprite.createBackground('ditu')\nmask = sprite.Sprite('white', 96, 354)\nmask.hide()\nhouse = [\n sprite.Sprite('mark', 150, 380),\n sprite.Sprite('xtxn', 96, 170),\n sprite.Sprite('xnvijx', 270, 45),\n sprite.Sprite('xnxbjx', 310, 182),\n sprite.Sprite('xnsijx', 300, 370),\n sprite.Sprite('xnkejx', 495, 220),\n sprite.Sprite('bwbwjx', 716, 85),\n sprite.Sprite('lelejx', 686, 314)\n]\nbarricade = sprite.Sprite('barricade', 610, 170)\nbarricade.enlargeTo(100)\nfor i in house:\n i.filterBrighter()\n i.hide()\n"},AT=function(t,e){return["f == 1",e.ORDER_ATOMIC]},yT=function(){return"print('没有符合条件的路线')\n"},ST=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return'g = [[10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000],[10000,10000,500,300,10000,10000,10000,10000,10000,10000,10000],[10000,500,10000,10000,100,10000,10000,10000,10000,10000,10000],[10000,300,10000,10000,400,300,10000,10000,10000,10000,10000],[10000,10000,100,400,10000,10000,200,10000,10000,10000,10000],[10000,10000,10000,300,10000,10000,100,200,10000,10000,10000],[10000,10000,10000,10000,200,100,10000,10000,100,10000,10000],[10000,10000,10000,10000,10000,200,10000,10000,100,10000,10000],[10000,10000,10000,10000,10000,10000,100,100,10000,10000,10000]]\nnow=1\nlast=1\npath=[]\npath.append(1)\nname = ["","小思家","银行","邮局","餐厅","书店","医院","超市","小科家"]\nposition = [[0, 0], [60, 320], [510, 390], [240, 200], [750, 330], [410, 90], [540, 190], [550, 30], [720, 120]]\nsprite.clearAllSprites()\nsprite.createBackground(\'map_si_ke\')\nstu = sprite.Sprite(\'girl\', 60, 320)\nstu.enlargeTo(100)\ntime.sleep(1)\n\n'},vT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return'g =[[10000,10000,10000,10000,10000,10000,10000],[10000,10000,300,500,10000,10000,10000],[10000,300,10000,10000,300,700,10000],[10000,500,10000,10000,10000,100,10000],[10000,10000,300,10000,10000,10000,200],[10000,10000,700,100,10000,10000,100],[10000,10000,10000,10000,200,100,10000]]\nnow=1\nlast=1\npath=[]\npath.append(1)\nname = ["","小智家","邮局","银行","书店","餐厅","学校"]\nposition = [[0, 0], [70, 340], [70, 90], [550, 310], [420, 70], [730, 250], [650, 130]]\nsprite.clearAllSprites()\nsprite.createBackground(\'map_zhi_xue\')\nstu = sprite.Sprite(\'boy\', 70, 340)\nstu.enlargeTo(100)\ntime.sleep(1)\n\n'},CT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return'tmp=10000\nfor i in range(0, len(g), 1):\n if g[now][i]6:\n print("路线错乱!程序有误!")\n exit()\n'},LT=function(t,e){return["name[now] != '小科家'",e.ORDER_ATOMIC]},bT=function(t,e){return["name[now] != '学校'",e.ORDER_ATOMIC]},DT=function(){return'res = ""\nfor i in path:\n res = res + name[i] + "→"\nprint(res[:-1])\n'},wT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var i=this.getFieldValue("NUM");if(i>=7)var n="print('层数过高!不得高于6层!')\nexit()\n";else n="sprite.clearAllSprites()\n_Hanoicolor = ['blue', 'red', 'yellow', 'green', 'purple', 'black']\n_Hanoi = [[], [], []]\nA = 0\nB = 1\nC = 2\n_n = "+i+"\n_HanoiColumn = [\n sprite.Sprite('HanoiColumn', 200, 320),\n sprite.Sprite('HanoiColumn', 400, 320),\n sprite.Sprite('HanoiColumn', 600, 320)\n]\n_HanoiColumnNumber = [\n sprite.Text('A', 190, 120),\n sprite.Text('B', 390, 120),\n sprite.Text('C', 590, 120)\n]\n_HanoiBlock = []\nfor i in range(0, _n, 1):\n _HanoiBlock.append(sprite.Sprite(_Hanoicolor[i], 200, 400-(_n-i-1)*27))\n _HanoiBlock[i].setScale(25, 30*i+30)\n _Hanoi[0].insert(0, _HanoiBlock[i])\n_steptext = sprite.Text('步数:0', 30, 30)\n_steps = {'steps' : 0}\ntime.sleep(1)\n";return n},NT=function(t,e){var i=e.valueToCode(this,"FROM_NUM",e.ORDER_ATOMIC)||"0",n=e.valueToCode(this,"TO_NUM",e.ORDER_ATOMIC)||"0";return`if len(_Hanoi[${i}])>0 :\n _HanoiBlockMoved = _Hanoi[${i}].pop()\n if len(_Hanoi[${n}]) > 0 :\n _HanoiBlockSuppressed = _Hanoi[${n}].pop()\n if _HanoiBlock.index(_HanoiBlockMoved) > _HanoiBlock.index(_HanoiBlockSuppressed):\n print('非法移动!程序有误!')\n exit()\n else:\n _Hanoi[${n}].append(_HanoiBlockSuppressed)\n _HanoiBlockMoved.slideTo(${i}*200+200, 180, 0.2)\n _HanoiBlockMoved.slideTo(${n}*200+200, 180, 0.5)\n _HanoiBlockMoved.slideTo(${n}*200+200, 400-len(_Hanoi[${n}])*27, 0.2)\n _Hanoi[${n}].append(_HanoiBlockMoved)\n _steps['steps'] += 1\n _steptext.changeText('步数:'+str(_steps['steps']))\nelse :\n print('非法移动!程序有误!')\n exit()\n`},FT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"if 'mode' not in globals() or mode == 0:\n sprite.clearAllSprites()\n ring=[0,0,0,0,0,0,0,0,0,0]\n mode=1\n n=5\n ring[5]=1\n name=['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\n Books = []\n for i in range(1, 11, 1):\n Books.append(sprite.Sprite('books/book'+str(i), (130*i-650) if i>5 else 130*i, 320 if i>5 else 120))\nelse:\n mode=2\n n=len(ring)-1\nring[n]=1\ntime.sleep(1)\n"},PT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"if 'mode' not in globals() or mode == 0:\n sprite.clearAllSprites()\n ring=[0,0,0,0,0,0,0,0,0,0]\n mode=2\n n=5\n name=['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\n Books = []\n for i in range(1, 11, 1):\n Books.append(sprite.Sprite('books/book'+str(i), (130*i-650) if i>5 else 130*i, 320 if i>5 else 120))\nelse:\n mode=1\n n=len(ring)-1\nring[n]=n\nlist=ring\ntemp=Books\ntime.sleep(1)\n"},xT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"res=0\nflag=ring[res]\nBooks[res].filterBrighter()\ntime.sleep(0.1)\nBooks[res].filterOrigin()\n"},kT=function(t,e){return["(('mode' not in globals())or(mode==1 and flag==0)or(mode==2 and not any(value > 0 for value in qian))or(mode==0))",e.ORDER_ATOMIC]},VT=function(t,e){return["(('mode' in globals())and((mode==1 and flag!=0)or(mode==2 and any(value > 0 for value in qian))))",e.ORDER_ATOMIC]},YT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var i="res+=1\nflag=ring[res]\n";return i="Books[res].filterGray()\ntime.sleep(0.3)\n"+(i+="Books[res].filterBrighter()\ntime.sleep(0.1)\nBooks[res].filterOrigin()\n")},BT=function(t,e){return["len(list)>=2",e.ORDER_ATOMIC]},UT=function(){return"mid = int(len(list)/2)\nqian = list[0:mid]\nhou = list[mid:]\nqiantemp = temp[0:mid]\nhoutemp = temp[mid:]\n"},XT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"quchu = qian\nlist = hou\nquchutemp = qiantemp\ntemp = houtemp\nfor i in qiantemp:\n i.filterBrighter()\ntime.sleep(0.5)\nfor i in qiantemp:\n i.filterGray()\ntime.sleep(0.5)\n"},GT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"list = quchu\ntemp = quchutemp\nfor i in qiantemp:\n i.filterBrighter()\ntime.sleep(0.5)\nfor i in qiantemp:\n i.filterOrigin()\nfor i in houtemp:\n\ti.filterBrighter()\ntime.sleep(0.5)\nfor i in houtemp:\n i.filterGray()\ntime.sleep(0.5)\n"},HT=function(){return"if 'list' in globals():\n res = list[0]\nBooks[res].filterBrighter()\nprint('未消磁的书籍是第'+str(res+1)+'本《'+name[res%10]+'》。')\nif res!=n:\n print('答案错误!请检查程序!')\nmode=0\n"},WT=function(t,e){var i=this.getFieldValue("NUM");return e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite",`sprite.clearAllSprites()\nring = []\nname = ['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\nBooks = []\nfor i in range(${i}):\n ring.append(0)\nfor i in range(1, ${i}+1, 1):\n Books.append(sprite.Sprite('books/book'+str(i%10 if i%10!=0 else 10), ${{5:"130*i, 120",10:"(130*i-650) if i>5 else 130*i, 320 if i>5 else 120",20:"(65*i-650)+30 if i>10 else 65*i+30, 320 if i>10 else 120",50:"(26*i-650)+50 if i>25 else 26*i+50, 320 if i>25 else 120"}[i]}))\ntime.sleep(1)\nmode=3\n`},jT=function(t,e){e.definitions_.import_sprite="import sprite";return"cnt=0\ncntText = sprite.Text('计数器:0', 30, 200)\n"},qT=function(t,e){e.definitions_.import_sprite="import sprite";return"cnt+=1\ncntText.changeText('计数器:'+str(cnt))\n"},KT=function(t,e){e.definitions_.import_sprite="import sprite";return"print('计数器大小:'+str(cnt))\n"},zT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\n_head = 10\n_foot = 32\n_footText = sprite.Text('脚的数量:', 20, 10)\n_sprite = []\n"},$T=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_rabbit = 0\ntime.sleep(1)\n"},QT=function(t,e){return["_rabbit < _head",e.ORDER_ATOMIC]},JT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_chick = _head - _rabbit\nfor i in range(0, _chick, 1):\n _sprite.append(sprite.Sprite('jttl/chick', len(_sprite)*130+130 if len(_sprite)<5 else len(_sprite)*130+130-650, 120 if len(_sprite)<5 else 320))\n\ntime.sleep(0.5)\n_footText.changeText('脚的数量:'+str(_rabbit*4 + _chick*2))\ntime.sleep(1)\n"},ZT=function(t,e){return["_rabbit*4 + _chick*2 == _foot",e.ORDER_ATOMIC]},tm=function(t,e){e.definitions_.import_sprite="import sprite";return"print('鸡的数量:'+str(_chick)+'只;\\n兔的数量:'+str(_rabbit)+'只。')\n"},em=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_rabbit += 1\nsprite.clearAllSprites()\n_sprite = []\n_footText = sprite.Text('脚的数量:', 20, 10)\nfor i in range(0, _rabbit, 1):\n _sprite.append(sprite.Sprite('jttl/rabbit', len(_sprite)*130+130 if len(_sprite)<5 else len(_sprite)*130+130-650, 120 if len(_sprite)<5 else 320))\ntime.sleep(0.5)\n"},im=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\nsprite.createBackground('/fzsf/map_ck_xxjsjs')\n_S1 = sprite.Sprite('/fzsf/S1',400,225,'S1')\n_S2 = sprite.Sprite('/fzsf/S2',400,225,'S2')\n_S3 = sprite.Sprite('/fzsf/S3',400,225,'S3')\n_S4 = sprite.Sprite('/fzsf/S4',400,225,'S4')\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\n_text_1 = sprite.Text('S1:',0,0,'text')\n_text_2 = sprite.Text('S2:',0,30,'text2')\n_text_3 = sprite.Text('S3:',0,60,'text3')\n_text_4 = sprite.Text('S4:',0,90,'text4')\n_position = [[60, 270], [240, 50], [260, 380], [440, 190], [730, 60], [700, 400]]\n_Llen = [0, 170, 230, 100, 150, 10, 30, 50]\n_Slen = [0, 0, 0, 0, 0]\n_tag = [0, [0, 1, 3], [0, 2, 3], [3, 4, 5], [3, 5]]\nbear = sprite.Sprite('mixbear',60,270,'bear')\nbear.enlargeTo(80)\n_pos = 0\ntime.sleep(1)\n"},nm=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var i=this.getFieldValue("PATHNAME");const n=[0,[1,3],[2,4],[5,7],[6]];var s="";return s+=`_S${i}.show()\ntime.sleep(1)\n`,s+=4!=i?`_Slen[${i}] = _Llen[${n[i][0]}] + _Llen[${n[i][1]}]\n_text_${i}.changeText('S${i}:'+str(_Slen[${i}])+'m')\ntime.sleep(1)\n_S${i}.hide()\ntime.sleep(1)\n`:"_Slen[4] = _Llen[6]\n_text_4.changeText('S4:'+str(_Slen[4])+'m')\ntime.sleep(1)\n_S4.hide()\ntime.sleep(1)\n"},sm=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var i="";return[i+=`_Slen[${this.getFieldValue("PATHNAME")}] < _Slen[${this.getFieldValue("PATHNAME2")}]`,e.ORDER_ATOMIC]},rm=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var i=this.getFieldValue("PATHNAME"),n="";return n+=`\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\n_Smin = ${i}\n_S${i}.show()\ntime.sleep(0.5)\n_S${i}.hide()\ntime.sleep(0.5)\n_S${i}.show()\ntime.sleep(1)\n`},om=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"if(_pos == _tag[_Smin][0]):\n for i in range(1, len(_tag[_Smin]), 1):\n bear.slideTo(_position[_tag[_Smin][i]][0], _position[_tag[_Smin][i]][1], 1)\n _pos = _tag[_Smin][len(_tag[_Smin])-1]\nelse:\n print('移动错误!程序有误!')\n exit()\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\nif(_pos == 5):\n print('成功抵达信息科技教室!')\n"},am=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\nsprite.createBackground('/hxdb/hxdbbg')\n_soldier = []\n_num = sprite.Text('目前士兵数量:0',0,0,'num')\n_last = sprite.Text('剩余:0',500,0,'last')\n_line = 3\n"},lm=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var i="";return i+=`for i in range(0, ${this.getFieldValue("NUM")}, 1):\n _soldier.append(sprite.Sprite('/hxdb/soldier', 30 + (len(_soldier)%_line)*50 + (len(_soldier)//(4*_line))*(_line+1)*50 +(len(_soldier)%3-2), 80+(len(_soldier)//_line)*100-(len(_soldier)//(4*_line))*4*100+(len(_soldier)%2)))\n_num.changeText('目前士兵数量:'+str(len(_soldier)))\n`},um=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var i=this.getFieldValue("NUM");return`for i in range(0, len(_soldier), 1):\n _soldier[i].slideTo(30 + (i%${i})*50 + (i//(4*${i}))*(${i}+1)*50 +(i%3-2), 80+(i//${i})*100-(i//(4*${i}))*4*100+(i%2), 0.05)\n_line = ${i}\n_last.changeText('剩余:'+str(len(_soldier)%_line))\ntime.sleep(2)\n`},pm=function(t,e){return e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite",[`len(_soldier)%_line == ${this.getFieldValue("NUM")}`,e.ORDER_ATOMIC]},hm=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_num.changeText('目前士兵数量:'+str(len(_soldier)+1))\n_last.changeText('剩余:')\ntime.sleep(0.5)\n_soldier.append(sprite.Sprite('/hxdb/soldier', 30 + (len(_soldier)%_line)*50 + (len(_soldier)//(4*_line))*(_line+1)*50 +(len(_soldier)%3-2), 80+(len(_soldier)//_line)*100-(len(_soldier)//(4*_line))*4*100+(len(_soldier)%2)))\ntime.sleep(1)\n"},dm=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"print('符合要求的士兵数量为:'+str(len(_soldier)))\n"},cm=function(t,e){e.definitions_.import_turtle="import turtle",e.definitions_.import_time="import time",e.definitions_.import_math="import math";var i=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),n=this.getFieldValue("NUM");return e.setups_.init_Hanoi="\ndef init_Hanoi():\n pen = turtle.Turtle()\n pen.hideturtle()\n pen.speed(0)\n for i in range(0, 3, 1):\n pen.penup()\n pen.setheading(0)\n pen.goto(150 * i - 200,-100)\n pen.pendown()\n pen.pensize(5)\n pen.forward(100)\n pen.goto(150 * i - 150,-100)\n pen.setheading(90)\n pen.forward(200)",e.setups_.begin="\ndef begin(): \n s = turtle.Turtle()\n s.hideturtle()\n s.penup()\n s.speed(0)\n s.goto(0,-150)\n s.write('3')\n time.sleep(1)\n s.clear()\n s.write('2')\n time.sleep(1)\n s.clear()\n s.write('1')\n time.sleep(1)\n s.clear()\n s.write('Start!')\n time.sleep(1)\n s.clear()\n",e.setups_.move="\ndef move(x, y):\n try:\n t = tower[x].pop(-1)\n a = tower_num[x].pop(-1)\n if tower_num[y]!=[]:\n b = tower_num[y][-1]\n if a 1"}]`,e.ORDER_ATOMIC]},jg=function(t,e){return[`${e.valueToCode(t,"DICT",e.ORDER_ATOMIC)||"df"}.groupby(by=${e.valueToCode(t,"KEY",e.ORDER_ATOMIC)||"'tag'"})`,e.ORDER_ATOMIC]},qg=function(t,e){return[`${e.valueToCode(t,"DICT",e.ORDER_ATOMIC)||"df"}.${t.getFieldValue("TYPE")}()`,e.ORDER_ATOMIC]},Kg=function(t,e){e.definitions_.import_matplotlib_pyplot="import matplotlib.pyplot as plt";return"plt.cla()\n"},zg=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("VAR"),rt.Variables.NAME_TYPE),n=e.variableDB_.getName(this.getFieldValue("TYPE"),rt.Variables.NAME_TYPE),s="class "+n+":\n";s+=" def __init__(self):\n";for(var r=new Array(this.itemCount_),o=0;o{},displayTag:!1,processingDisplayEvent:null,successDisplayEvents:[],successProcessingDisplayEvents:[],startTime:performance.now(),timer:0,lastFrameTime:null,lastSecond:null,targetFPS:60,frameCount:0,currentFPS:60,canvasHeight:450,canvasWidth:800,gameLoop:()=>{1==AO.state&&(AO.repeatPlay(),AO.gameLoopDisplay()),AO.timer=performance.now()-AO.startTime},animate:t=>{t-AO.lastFrameTime>=1e3/AO.targetFPS&&(AO.frameCount++,AO.gameLoop(),AO.renderer.render(AO.stage),AO.lastFrameTime=t),t-AO.lastSecond>=1e3&&(AO.currentFPS=AO.frameCount,AO.frameCount=0,AO.lastSecond=t),requestAnimationFrame(AO.animate)}};AO.createBackground=(t,e=0)=>{var i;return 0==e&&(i=new(RO().Sprite.fromImage)(`../common/media/spriteimg/${t}.png`)),i.name="background",i.anchor.set(.5),i.x=AO.canvasWidth/2,i.y=AO.canvasHeight/2,i.width=AO.canvasWidth,i.height=AO.canvasHeight,i.interactive=!0,i.buttonMode=!0,i.isDown=!1,i.isUp=!0,i.on("mousedown",(function(){this.isDown=!0,this.isUp=!1,AO.state&&this.runningMouseDown()})).on("mouseup",(function(){this.isDown=!1,this.isUp=!0})).on("mouseupoutside",(function(){this.isDown=!1,this.isUp=!0})),i.runningMouseDown=new Function(""),AO.backgroundSprite&&AO.backgroundSprite.parent&&AO.stage.removeChild(AO.backgroundSprite),AO.backgroundSprite=i,AO.stage.addChildAt(AO.backgroundSprite,0),0},AO.createASprite=(t,e=AO.canvasWidth/2,i=AO.canvasHeight/2,n="",s=0)=>{var r;return""==n&&(n="sprite"+ ++AO.counter),0==s&&(r=new(RO().Sprite.fromImage)(`../common/media/spriteimg/${t}.png`)),AO.sprites[n]||AO.texts[n]||(r.name=n,r.anchor.set(.5),r.x=e,r.y=i,r.interactive=!0,r.buttonMode=!0,r.isDown=!1,r.isUp=!0,r.on("mousedown",(function(t){this.isDown=!0,this.isUp=!1,AO.state?this.runningMouseDown():(this.data=t.data,this.alpha=.5,this.dragging=!0)})).on("mouseup",(function(){this.isDown=!1,this.isUp=!0,AO.state||(this.alpha=1,this.dragging=!1,this.data=null)})).on("mouseupoutside",(function(){this.isDown=!1,this.isUp=!0,AO.state||(this.alpha=1,this.dragging=!1,this.data=null)})).on("mousemove",(function(){if(!AO.state&&this.dragging){var t=this.data.getLocalPosition(this.parent);this.position.x=t.x,this.position.y=t.y}})),r.runningMouseDown=new Function(""),r.show=function(){this.visible=!0},r.hide=function(){this.visible=!1},r.enlarge=function(t){const e=this.height/this.width;var i=Math.sqrt(this.height*this.width);i+=t,this.width=Math.sqrt(i*i/e),this.height=this.width*e},r.enlargeTo=function(t){var e=this.height/this.width;this.width=Math.sqrt(t*t/e),this.height=this.width*e},r.expandTo=async function(t,e=1){if(AO.running){AO.displayTag=!0,AO.processingDisplayEvent={sprite:this,targetS:t,totalTime:1e3*e,startTime:performance.now(),displayType:"expand"};var i=new Promise((t=>{if(!1===AO.displayTag)t();else{const e=setInterval((()=>{!1===AO.displayTag&&(clearInterval(e),t())}),10)}}));return await i}return AO.successProcessingDisplayEvents.push({sprite:this,targetS:t,totalTime:1e3*e,startTime:performance.now(),displayType:"expand"}),0},r.move=function(t){this.x+=t*Math.cos(this.rotation),this.y+=t*Math.sin(this.rotation)},r.moveTo=function(t,e){this.x=t,this.y=e},r.slideTo=async function(t,e,i=1){if(AO.running){AO.displayTag=!0,AO.processingDisplayEvent={sprite:this,targetX:t,targetY:e,totalTime:1e3*i,startTime:performance.now(),displayType:"slide"};var n=new Promise((t=>{const e=setInterval((()=>{!1===AO.displayTag&&(clearInterval(e),t())}),10)}));return await n}return AO.successProcessingDisplayEvents.push({sprite:this,targetX:t,targetY:e,totalTime:1e3*i,startTime:performance.now(),displayType:"slide"}),0},r.addX=function(t){this.x+=t},r.addY=function(t){this.y+=t},r.rotate=function(t){this.rotation+=Math.PI/180*t},r.rotateTo=function(t){this.rotation=Math.PI/180*t},r.circleTo=async function(t,e=1){if(AO.running){AO.displayTag=!0,AO.processingDisplayEvent={sprite:this,targetDegree:t,totalTime:1e3*e,startTime:performance.now(),displayType:"circle"};var i=new Promise((t=>{if(!1===AO.displayTag)t();else{const e=setInterval((()=>{!1===AO.displayTag&&(clearInterval(e),t())}),10)}}));return await i}return AO.successProcessingDisplayEvents.push({sprite:this,targetDegree:t,totalTime:1e3*e,startTime:performance.now(),displayType:"circle"}),0},r.hit=function(t){return AO.hitTestRectangle(this,t)},r.outOfScreen=function(){return this.y>=AO.renderer.height||this.y<=0||this.x<=0||this.x>=AO.renderer.width},r.mouseAction=function(t){this.runningMouseDown=t},r.setScale=function(t=0,e=0){0==t&&(t=this.height),0==e&&(e=this.width),this.height=t,this.width=e},r.filterGray=function(){const t=new(RO().filters.ColorMatrixFilter);t.blackAndWhite(),this.filters=[t]},r.filterBrighter=function(){const t=new(RO().filters.ColorMatrixFilter);t.brightness(1.25),this.filters=[t]},r.filterOrigin=function(){this.filters=null},AO.stage.addChild(r),AO.sprites[n]=r),n},AO.clearAllSprites=()=>{AO.backgroundSprite&&AO.backgroundSprite.parent&&AO.backgroundSprite.parent.removeChild(AO.backgroundSprite);for(const t in AO.sprites)AO.sprites[t].parent.removeChild(AO.sprites[t]),delete AO.sprites[t];for(const t in AO.texts)AO.texts[t].parent.removeChild(AO.texts[t]),delete AO.texts[t];return AO.counter=0,AO.clearTimer(),0},AO.createText=(t,e=AO.canvasWidth/2,i=AO.canvasHeight/2,n="")=>{if(""==n&&(n="text"+ ++AO.counter),!AO.sprites[n]&&!AO.texts[n]){var s=new(RO().Text)(t);s.name=n,s.x=e,s.y=i,s.interactive=!0,s.buttonMode=!0,s.on("mousedown",(function(t){this.isDown=!0,this.isUp=!1,AO.state?this.runningMouseDown():(this.data=t.data,this.alpha=.5,this.dragging=!0)})).on("mouseup",(function(){this.isDown=!1,this.isUp=!0,AO.state||(this.alpha=1,this.dragging=!1,this.data=null)})).on("mouseupoutside",(function(){this.isDown=!1,this.isUp=!0,AO.state||(this.alpha=1,this.dragging=!1,this.data=null)})).on("mousemove",(function(){if(!AO.state&&this.dragging){var t=this.data.getLocalPosition(this.parent);this.position.x=t.x,this.position.y=t.y}})),s.runningMouseDown=new Function(""),s.changeText=function(t){this.text=t},s.show=function(){this.visible=!0},s.hide=function(){this.visible=!1},AO.stage.addChild(s),AO.texts[n]=s}return n},AO.hitTestRectangle=(t,e)=>{let i,n,s,r,o;return i=!1,t.centerX=t.x+t.width/2,t.centerY=t.y+t.height/2,e.centerX=e.x+e.width/2,e.centerY=e.y+e.height/2,t.halfWidth=t.width/2,t.halfHeight=t.height/2,e.halfWidth=e.width/2,e.halfHeight=e.height/2,r=t.centerX-e.centerX,o=t.centerY-e.centerY,n=t.halfWidth+e.halfWidth,s=t.halfHeight+e.halfHeight,i=Math.abs(r){AO.repeatPlay=t},AO.isKeyboardHit=t=>{if(!AO.keys[t]){let e=AO.keyboard(t);AO.keys[t]=e}return AO.keys[t].isDown},AO.keyboardListener=(t,e)=>{if(AO.keys[t])AO.keys[t].press=function(){AO.state&&e()};else{let i=AO.keyboard(t);i.press=function(){AO.state&&e()},AO.keys[t]=i}},AO.keyboard=t=>{let e={};e.value=t,e.isDown=!1,e.isUp=!0,e.press=void 0,e.release=void 0,e.downHandler=t=>{t.key===e.value&&(e.isUp&&e.press&&e.press(),e.isDown=!0,e.isUp=!1,t.preventDefault())},e.upHandler=t=>{t.key===e.value&&(e.isDown&&e.release&&e.release(),e.isDown=!1,e.isUp=!0,t.preventDefault())};const i=e.downHandler.bind(e),n=e.upHandler.bind(e);return window.addEventListener("keydown",i,!1),window.addEventListener("keyup",n,!1),e.unsubscribe=()=>{window.removeEventListener("keydown",i),window.removeEventListener("keyup",n)},e},AO.clearTimer=()=>{AO.startTime=performance.now()},AO.gameLoopDisplay=()=>{if(AO.processingDisplayEvent){const t=AO.processingDisplayEvent;switch(t.displayType){case"slide":if(performance.now()>=t.totalTime+t.startTime)t.sprite.moveTo(t.targetX,t.targetY),AO.displayTag=!1,AO.processingDisplayEvent=null;else(e=AO.currentFPS*(t.totalTime+t.startTime-performance.now())/1e3)>=1&&(t.sprite.addX((t.targetX-t.sprite.x)/e),t.sprite.addY((t.targetY-t.sprite.y)/e));break;case"expand":if(performance.now()>=t.totalTime+t.startTime)t.sprite.enlargeTo(t.targetS),AO.displayTag=!1,AO.processingDisplayEvent=null;else(e=AO.currentFPS*(t.totalTime+t.startTime-performance.now())/1e3)>=1&&t.sprite.enlarge((t.targetS-Math.sqrt(t.sprite.height*t.sprite.width))/e);break;case"circle":if(performance.now()>=t.totalTime+t.startTime)t.sprite.rotateTo(t.targetDegree),AO.displayTag=!1,AO.processingDisplayEvent=null;else(e=AO.currentFPS*(t.totalTime+t.startTime-performance.now())/1e3)>=1&&t.sprite.rotate((t.targetDegree-180*t.sprite.rotation/Math.PI)/e)}}if(!AO.running&&AO.successProcessingDisplayEvents.length)for(var t=AO.successProcessingDisplayEvents.length-1;t>=0;t--){const i=AO.successProcessingDisplayEvents[t];switch(i.displayType){case"slide":if(performance.now()>=i.totalTime+i.startTime)i.sprite.moveTo(i.targetX,i.targetY),AO.successProcessingDisplayEvents.splice(t,1);else(e=AO.currentFPS*(i.totalTime+i.startTime-performance.now())/1e3)>=1&&(i.sprite.addX((i.targetX-i.sprite.x)/e),i.sprite.addY((i.targetY-i.sprite.y)/e));break;case"expand":if(performance.now()>=i.totalTime+i.startTime)i.sprite.enlargeTo(i.targetS),AO.successProcessingDisplayEvents.splice(t,1);else(e=AO.currentFPS*(i.totalTime+i.startTime-performance.now())/1e3)>=1&&i.sprite.enlarge((i.targetS-Math.sqrt(i.sprite.height*i.sprite.width))/e);break;case"circle":var e;if(performance.now()>=i.totalTime+i.startTime)i.sprite.rotateTo(i.targetDegree),AO.successProcessingDisplayEvents.splice(t,1);else(e=AO.currentFPS*(i.totalTime+i.startTime-performance.now())/1e3)>=1&&i.sprite.rotate((i.targetDegree-180*i.sprite.rotation/Math.PI)/e)}}},AO.changeWidth=t=>{const e=OO()(AO.renderer.view),i=e.width(),n=e.height();e.width(t),e.height(t/i*n)},AO.kill=()=>{AO.state=!1,AO.repeatPlay=new Function;for(let t in AO.keys)AO.keys[t].unsubscribe(),delete AO.keys[t];AO.processingDisplayEvent=null,AO.displayTag=!1,AO.running=!1,AO.clearTimer()},AO.runit=t=>{const e=OO()(t);e.empty(),RO().SCALE_MODES.DEFAULT=RO().SCALE_MODES.NEAREST,AO.renderer=RO().autoDetectRenderer(AO.canvasWidth,AO.canvasHeight,{backgroundColor:16777215}),e.append(AO.renderer.view),AO.pointer={x:0,y:0},AO.stage.sortableChildren=!0,AO.stage.interactive=!0,AO.stage.on("mousemove",((t=RO().InteractionEvent)=>{AO.pointer.x=t.data.global.x,AO.pointer.y=t.data.global.y})),AO.lastFrameTime=0,AO.running=!0,AO.lastFrameTime||(AO.lastFrameTime=performance.now(),AO.lastSecond=performance.now()),AO.animate(performance.now()),AO.repeatPlay=new Function;for(let t in AO.keys)AO.keys[t].unsubscribe(),delete AO.keys[t];AO.backgroundSprite&&(AO.backgroundSprite.runningMouseDown=new Function);for(let t in AO.sprites)AO.sprites[t].runningMouseDown=new Function;for(let t in AO.texts)AO.texts[t].runningMouseDown=new Function;AO.processingDisplayEvent=null,AO.displayTag=!1,AO.clearTimer(),AO.changeWidth(OO()("body").width()/2),AO.state=!0},window.mixlySprite=AO;const yO=AO;var SO=__webpack_require__(9610);class vO{constructor(t,e){this._pageLoad=new SO.D,this._kernelAvailable=new SO.D,this._loaderId="basthon-loader",this._doNotHideLoader=!0;const i=t.language;if(null!=e&&(this._loaderId=e),"loading"===document.readyState){const t=()=>{document.removeEventListener("DOMContentLoaded",t),this._pageLoad.resolve()};document.addEventListener("DOMContentLoaded",t)}else this._pageLoad.resolve();(async()=>{switch(i){case"python":case"python3":case"python3.11":const{KernelPython3:e}=await __webpack_require__.e(211).then(__webpack_require__.bind(__webpack_require__,211));this._kernel=new e(t);break;case"python3-old":case"python3.8":const{KernelPython3Old:n}=await __webpack_require__.e(195).then(__webpack_require__.bind(__webpack_require__,5195));this._kernel=new n(t);break;case"js":case"javascript":const{KernelJavaScript:s}=await __webpack_require__.e(97).then(__webpack_require__.bind(__webpack_require__,4097));this._kernel=new s(t);break;case"sql":const{KernelSQL:r}=await Promise.all([__webpack_require__.e(960),__webpack_require__.e(837)]).then(__webpack_require__.bind(__webpack_require__,592));this._kernel=new r(t);break;case"ocaml":const{KernelOCaml:o}=await __webpack_require__.e(38).then(__webpack_require__.bind(__webpack_require__,38));this._kernel=new o(t);break;default:return window.console.error(`Kernel '${i}' not supported.`),void this._kernelAvailable.reject()}window.Basthon=this._kernel,this._kernelAvailable.resolve(this._kernel)})()}async pageLoad(){await this._pageLoad.promise}async kernelAvailable(){return await this._kernelAvailable.promise}async kernelLoaded(){const t=await this.kernelAvailable();return await t.loaded(),t}get kernel(){return this._kernel}get kernelSafe(){var t;return(null===(t=this.kernel)||void 0===t?void 0:t.ready)?this.kernel:null}async showLoader(t,e=!1,i=!0){this.kernelAvailable().then((()=>{var t;return null===(t=this.kernel)||void 0===t?void 0:t.init()})),__webpack_require__.e(317).then(__webpack_require__.bind(__webpack_require__,1317));const n="basthon-loader-"+(e?"full":"foot"),s=document.createElement("div");s.id=this._loaderId,s.classList.add("darklighted"),s.classList.add("basthon-loader-root"),s.classList.add(n);const r=document.createElement("div");r.classList.add("basthon-loader-container"),r.classList.add(n),s.appendChild(r);const o=document.createElement("div");o.classList.add("basthon-loader-spinner"),o.classList.add(n),o.innerHTML="",r.appendChild(o);const a=document.createElement("div");a.classList.add("basthon-loader-break"),a.classList.add(n),r.appendChild(a);const l=document.createElement("div");l.classList.add("basthon-loader-text"),l.classList.add(n),l.innerHTML=t,r.appendChild(l),this._loaderTextElem=l;const u=document.createElement("div");u.classList.add("basthon-loader-text"),u.classList.add(n),u.style.display="none",r.appendChild(u),this._loaderTextError=u,await this.pageLoad(),document.body.appendChild(s),this._rootLoader=s;try{await this.kernelLoaded()}catch(t){const e=this.browser();this.setErrorText(`Erreur de chargement de Basthon !!!
Vérifiez que votre navigateur est à jour.
Version détectée : ${e.name} ${e.version}.`);for(const t of document.body.querySelectorAll(".basthon-loader-foot"))t.classList.remove("basthon-loader-foot"),t.classList.add("basthon-loader-full");return o.classList.remove("basthon-loader-spinner"),o.classList.add("basthon-loader-error"),void(this._doNotHideLoader=!0)}this._doNotHideLoader=!1,i&&this.hideLoader()}setLoaderText(t){null!=this._loaderTextElem&&(this._loaderTextElem.innerHTML=t)}setErrorText(t){null!=this._loaderTextElem&&(this._loaderTextElem.style.display="none"),null!=this._loaderTextError&&(this._loaderTextError.style.display="",this._loaderTextError.innerHTML=t)}hideLoader(){if(this._doNotHideLoader)return;const t=this._rootLoader;null!=t&&(t.classList.add("basthon-loader-hide"),window.setTimeout((()=>{this._rootLoader=void 0,t.remove()}),1100))}browser(){var t,e=navigator.userAgent,i=e.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(i[1])?{name:"IE",version:(t=/\brv[ :]+(\d+)/g.exec(e)||[])[1]||""}:"Chrome"===i[1]&&null!=(t=e.match(/\bOPR|Edge\/(\d+)/))?{name:"Opera",version:t[1]}:(i=i[2]?[i[1],i[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(t=e.match(/version\/(\d+)/i))&&i.splice(1,1,t[1]),{name:i[0],version:i[1]})}}class CO extends ot.PageBase{static{ot.HTMLTemplate.add("html/statusbar/statusbar-image.html",new ot.HTMLTemplate('\r\n
')),this.init=function(){ot.StatusBarsManager.typesRegistry.register(["images"],CO);const t=ot.Workspace.getMain().getStatusBarsManager();return t.add({type:"images",id:"images",name:rt.Msg.PYTHON_PYODIDE_IMAGE,title:rt.Msg.PYTHON_PYODIDE_IMAGE}),t.changeTo("output"),t.get("images")}}constructor(){super();const t=OO()(ot.HTMLTemplate.get("html/statusbar/statusbar-image.html").render());this.setContent(t)}init(){super.init(),this.hideCloseBtn()}clean(){this.getContent().empty()}display(t){const e=this.getContent(),i=function(t){t.style.width="auto",t.style.height="auto",t.style.maxWidth="100%",t.style.maxHeight="100%"};this.clean();let n=t.content,s=null,r=null;switch(t.display_type){case"p5":n.style.width="100%",n.style.height="100%",n.style.display="flex",n.style.justifyContent="center",n.style.alignItems="center",new MutationObserver((function(t){t.forEach((t=>t.addedNodes.forEach((t=>{const e=t;null!=e.tagName&&["canvas","video"].includes(e.tagName.toLowerCase())&&i(e)}))))})).observe(n,{childList:!0}),n.querySelectorAll("canvas,video").forEach(i),e.append(n);break;case"matplotlib":s=n.querySelector("canvas"),s&&(n=s),n.style.width="",n.style.height="",n.style.maxWidth="100%",n.style.maxHeight="100%",e.append(n);break;case"ocaml-canvas":n.style.width="",n.style.height="",n.style.maxWidth="100%",n.style.maxHeight="100%",e.append(n);break;case"turtle":n.setAttribute("width","100%"),n.setAttribute("height","100%"),e.append(n.outerHTML);break;case"sympy":e.append(t.content),void 0===window.MathJax?(console.log("Loading MathJax (Sympy expression needs it)."),function(){let t=document.createElement("script");t.type="text/javascript",t.src="https://cdn.jsdelivr.net/npm/mathjax@3.0.5/es5/tex-mml-chtml.js",document.getElementsByTagName("head")[0].appendChild(t)}()):window.MathJax.typeset();break;case"multiple":for(let i of["image/svg+xml","image/png","text/html","text/plain"])if(i in t.content){let n=t.content[i];"image/png"===i&&(n=''),e.append(n);break}break;case"tutor":if(e.append(OO()(t.content.replace("overflow-y%3A%20hidden%3B",""))),r=this.getContent()[0].getElementsByTagName("iframe")[0],null==r)return;r.style.maxHeight=r.style.minHeight="100%",new IntersectionObserver(((t,e)=>{const i=t[0];i&&!i.isIntersecting||(r.contentWindow?.postMessage({type:"redraw"},"*"),e.disconnect())})).observe(r);break;default:console.error(`Not supported node type '${t.display_type}' in eval.display result processing.`)}}}const LO=layui;var bO;!function(t){t[t.EPERM=1]="EPERM",t[t.ENOENT=2]="ENOENT",t[t.EINTR=4]="EINTR",t[t.EIO=5]="EIO",t[t.ENXIO=6]="ENXIO",t[t.EBADF=9]="EBADF",t[t.EAGAIN=11]="EAGAIN",t[t.ENOMEM=12]="ENOMEM",t[t.EACCES=13]="EACCES",t[t.EFAULT=14]="EFAULT",t[t.ENOTBLK=15]="ENOTBLK",t[t.EBUSY=16]="EBUSY",t[t.EEXIST=17]="EEXIST",t[t.EXDEV=18]="EXDEV",t[t.ENODEV=19]="ENODEV",t[t.ENOTDIR=20]="ENOTDIR",t[t.EISDIR=21]="EISDIR",t[t.EINVAL=22]="EINVAL",t[t.ENFILE=23]="ENFILE",t[t.EMFILE=24]="EMFILE",t[t.ETXTBSY=26]="ETXTBSY",t[t.EFBIG=27]="EFBIG",t[t.ENOSPC=28]="ENOSPC",t[t.ESPIPE=29]="ESPIPE",t[t.EROFS=30]="EROFS",t[t.EMLINK=31]="EMLINK",t[t.EPIPE=32]="EPIPE",t[t.EDOM=33]="EDOM",t[t.ERANGE=34]="ERANGE",t[t.EDEADLK=35]="EDEADLK",t[t.ENAMETOOLONG=36]="ENAMETOOLONG",t[t.ENOLCK=37]="ENOLCK",t[t.ENOSYS=38]="ENOSYS",t[t.ENOTEMPTY=39]="ENOTEMPTY",t[t.ELOOP=40]="ELOOP",t[t.ENOMSG=42]="ENOMSG",t[t.EBADE=52]="EBADE",t[t.EBADR=53]="EBADR",t[t.EXFULL=54]="EXFULL",t[t.ENOANO=55]="ENOANO",t[t.EBADRQC=56]="EBADRQC",t[t.ENOSTR=60]="ENOSTR",t[t.ENODATA=61]="ENODATA",t[t.ETIME=62]="ETIME",t[t.ENOSR=63]="ENOSR",t[t.ENONET=64]="ENONET",t[t.EREMOTE=66]="EREMOTE",t[t.ENOLINK=67]="ENOLINK",t[t.ECOMM=70]="ECOMM",t[t.EPROTO=71]="EPROTO",t[t.EBADMSG=74]="EBADMSG",t[t.EOVERFLOW=75]="EOVERFLOW",t[t.EBADFD=77]="EBADFD",t[t.ESTRPIPE=86]="ESTRPIPE",t[t.ENOTSOCK=88]="ENOTSOCK",t[t.EDESTADDRREQ=89]="EDESTADDRREQ",t[t.EMSGSIZE=90]="EMSGSIZE",t[t.EPROTOTYPE=91]="EPROTOTYPE",t[t.ENOPROTOOPT=92]="ENOPROTOOPT",t[t.EPROTONOSUPPORT=93]="EPROTONOSUPPORT",t[t.ESOCKTNOSUPPORT=94]="ESOCKTNOSUPPORT",t[t.ENOTSUP=95]="ENOTSUP",t[t.ENETDOWN=100]="ENETDOWN",t[t.ENETUNREACH=101]="ENETUNREACH",t[t.ENETRESET=102]="ENETRESET",t[t.ETIMEDOUT=110]="ETIMEDOUT",t[t.ECONNREFUSED=111]="ECONNREFUSED",t[t.EHOSTDOWN=112]="EHOSTDOWN",t[t.EHOSTUNREACH=113]="EHOSTUNREACH",t[t.EALREADY=114]="EALREADY",t[t.EINPROGRESS=115]="EINPROGRESS",t[t.ESTALE=116]="ESTALE",t[t.EREMOTEIO=121]="EREMOTEIO",t[t.EDQUOT=122]="EDQUOT"}(bO||(bO={}));const DO={[bO.EPERM]:"Operation not permitted",[bO.ENOENT]:"No such file or directory",[bO.EINTR]:"Interrupted system call",[bO.EIO]:"Input/output error",[bO.ENXIO]:"No such device or address",[bO.EBADF]:"Bad file descriptor",[bO.EAGAIN]:"Resource temporarily unavailable",[bO.ENOMEM]:"Cannot allocate memory",[bO.EACCES]:"Permission denied",[bO.EFAULT]:"Bad address",[bO.ENOTBLK]:"Block device required",[bO.EBUSY]:"Resource busy or locked",[bO.EEXIST]:"File exists",[bO.EXDEV]:"Invalid cross-device link",[bO.ENODEV]:"No such device",[bO.ENOTDIR]:"File is not a directory",[bO.EISDIR]:"File is a directory",[bO.EINVAL]:"Invalid argument",[bO.ENFILE]:"Too many open files in system",[bO.EMFILE]:"Too many open files",[bO.ETXTBSY]:"Text file busy",[bO.EFBIG]:"File is too big",[bO.ENOSPC]:"No space left on disk",[bO.ESPIPE]:"Illegal seek",[bO.EROFS]:"Cannot modify a read-only file system",[bO.EMLINK]:"Too many links",[bO.EPIPE]:"Broken pipe",[bO.EDOM]:"Numerical argument out of domain",[bO.ERANGE]:"Numerical result out of range",[bO.EDEADLK]:"Resource deadlock would occur",[bO.ENAMETOOLONG]:"File name too long",[bO.ENOLCK]:"No locks available",[bO.ENOSYS]:"Function not implemented",[bO.ENOTEMPTY]:"Directory is not empty",[bO.ELOOP]:"Too many levels of symbolic links",[bO.ENOMSG]:"No message of desired type",[bO.EBADE]:"Invalid exchange",[bO.EBADR]:"Invalid request descriptor",[bO.EXFULL]:"Exchange full",[bO.ENOANO]:"No anode",[bO.EBADRQC]:"Invalid request code",[bO.ENOSTR]:"Device not a stream",[bO.ENODATA]:"No data available",[bO.ETIME]:"Timer expired",[bO.ENOSR]:"Out of streams resources",[bO.ENONET]:"Machine is not on the network",[bO.EREMOTE]:"Object is remote",[bO.ENOLINK]:"Link has been severed",[bO.ECOMM]:"Communication error on send",[bO.EPROTO]:"Protocol error",[bO.EBADMSG]:"Bad message",[bO.EOVERFLOW]:"Value too large for defined data type",[bO.EBADFD]:"File descriptor in bad state",[bO.ESTRPIPE]:"Streams pipe error",[bO.ENOTSOCK]:"Socket operation on non-socket",[bO.EDESTADDRREQ]:"Destination address required",[bO.EMSGSIZE]:"Message too long",[bO.EPROTOTYPE]:"Protocol wrong type for socket",[bO.ENOPROTOOPT]:"Protocol not available",[bO.EPROTONOSUPPORT]:"Protocol not supported",[bO.ESOCKTNOSUPPORT]:"Socket type not supported",[bO.ENOTSUP]:"Operation is not supported",[bO.ENETDOWN]:"Network is down",[bO.ENETUNREACH]:"Network is unreachable",[bO.ENETRESET]:"Network dropped connection on reset",[bO.ETIMEDOUT]:"Connection timed out",[bO.ECONNREFUSED]:"Connection refused",[bO.EHOSTDOWN]:"Host is down",[bO.EHOSTUNREACH]:"No route to host",[bO.EALREADY]:"Operation already in progress",[bO.EINPROGRESS]:"Operation now in progress",[bO.ESTALE]:"Stale file handle",[bO.EREMOTEIO]:"Remote I/O error",[bO.EDQUOT]:"Disk quota exceeded"};class wO extends Error{static fromJSON(t){const e=new wO(t.errno,t.message,t.path,t.syscall);return e.code=t.code,e.stack=t.stack,e}static With(t,e,i){return new wO(bO[t],DO[bO[t]],e,i)}constructor(t,e=DO[t],i,n=""){super(e),this.errno=t,this.path=i,this.syscall=n,this.code=bO[t],this.message=this.code+": "+e+(this.path?`, '${this.path}'`:"")}toString(){return this.message}toJSON(){return{errno:this.errno,code:this.code,path:this.path,stack:this.stack,message:this.message,syscall:this.syscall}}bufferSize(){return 4+JSON.stringify(this.toJSON()).length}}let NO="/";function FO(t,e){let i="",n=0,s=-1,r=0,o="\0";for(let a=0;a<=t.length;++a){if(a2){const t=i.lastIndexOf("/");-1===t?(i="",n=0):(i=i.slice(0,t),n=i.length-1-i.lastIndexOf("/")),s=a,r=0;continue}if(0!==i.length){i="",n=0,s=a,r=0;continue}}e&&(i+=i.length>0?"/..":"..",n=2)}else i.length>0?i+="/"+t.slice(s+1,a):i=t.slice(s+1,a),n=a-s-1;s=a,r=0}else"."===o&&-1!==r?++r:r=-1}return i}function PO(...t){let e="";for(const i of[...t.reverse(),NO])if(i.length&&(e=`${i}/${e}`,i.startsWith("/")))break;const i=e.startsWith("/");return e=FO(e,!i),i?`/${e}`:e.length?e:"/"}function xO(...t){if(!t.length)return".";const e=t.join("/");return e?.length?function(t){if(!t.length)return".";const e=t.startsWith("/"),i=t.endsWith("/");return(t=FO(t,!e)).length?(i&&(t+="/"),e?`/${t}`:t):e?"/":i?"./":"."}(e):"."}function kO(t){if(0===t.length)return".";const e="/"===t[0];let i=-1,n=!0;for(let e=t.length-1;e>=1;--e)if("/"===t[e]){if(!n){i=e;break}}else n=!1;return-1===i?e?"/":".":e&&1===i?"//":t.slice(0,i)}function VO(t,e){let i=0,n=-1,s=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e===t)return"";let r=e.length-1,o=-1;for(let a=t.length-1;a>=0;--a)if("/"===t[a]){if(!s){i=a+1;break}}else-1===o&&(s=!1,o=a+1),r>=0&&(t[a]===e[r]?-1==--r&&(n=a):(r=-1,n=o));return i===n?n=o:-1===n&&(n=t.length),t.slice(i,n)}for(let e=t.length-1;e>=0;--e)if("/"===t[e]){if(!s){i=e+1;break}}else-1===n&&(s=!1,n=e+1);return-1===n?"":t.slice(i,n)}function YO(t){const e=t.startsWith("/"),i={root:e?"/":"",dir:"",base:"",ext:"",name:""};if(0===t.length)return i;const n=e?1:0;let s=-1,r=0,o=-1,a=!0,l=t.length-1,u=0;for(;l>=n;--l)if("/"!==t[l])-1===o&&(a=!1,o=l+1),"."===t[l]?-1===s?s=l:1!==u&&(u=1):-1!==s&&(u=-1);else if(!a){r=l+1;break}if(-1!==o){const n=0===r&&e?1:r;-1===s||0===u||1===u&&s===o-1&&s===r+1?i.base=i.name=t.slice(n,o):(i.name=t.slice(n,s),i.base=t.slice(n,o),i.ext=t.slice(s,o))}return r>0?i.dir=t.slice(0,r-1):e&&(i.dir="/"),i}const BO=new TextEncoder;function UO(t){if("string"!=typeof t)throw new wO(bO.EINVAL,"Can not encode a non-string");return BO.encode(t)}const XO=new TextDecoder;function GO(t){if(!(t instanceof Uint8Array))throw new wO(bO.EINVAL,"Can not decode a non-Uint8Array");return XO.decode(t)}function HO(t){return JSON.parse(GO(t),((t,e)=>""==t?e:BigInt(e)))}function WO(t){return UO(JSON.stringify(t,((t,e)=>""==t?e:e.toString())))}function jO(t,e){if("number"==typeof t)return t;if("string"==typeof t){const e=parseInt(t,8);if(!isNaN(e))return e}if("number"==typeof e)return e;throw new wO(bO.EINVAL,"Invalid mode: "+t?.toString())}function qO(t){if(t instanceof Date)return t;try{return new Date(t)}catch{throw new wO(bO.EINVAL,"Invalid time.")}}function KO(t){if((t=t.toString()).includes("\0"))throw new wO(bO.EINVAL,"Path can not contain null character");if(0==t.length)throw new wO(bO.EINVAL,"Path can not be empty");return PO(t.replaceAll(/[/\\]+/g,"/"))}function zO(t,e="utf8",i,n=0){return"object"!=typeof t||null===t?{encoding:"string"==typeof t?t:e??null,flag:i,mode:n}:{encoding:"string"==typeof t?.encoding?t.encoding:e??null,flag:"string"==typeof t?.flag?t.flag:i,mode:jO("mode"in t?t?.mode:null,n)}}function $O(){return crypto.getRandomValues(new BigUint64Array(1))[0]}const QO={uid:0,gid:0,suid:0,sgid:0,euid:0,egid:0,groups:[]};function JO(t){return{suid:t.uid,sgid:t.gid,euid:t.uid,egid:t.gid,groups:[],...t}}const ZO=0,tM=4,eM=2,iM=1,nM=1,sM=2,rM=4,oM=0,aM=1,lM=2,uM=64,pM=128,hM=256,dM=512,cM=1024,_M=65536,fM=262144,TM=131072,mM=1052672,gM=4096,IM=32768,EM=16384,OM=2048,MM=61440,RM=49152,AM=40960,yM=32768,SM=24576,vM=16384,CM=8192,LM=4096,bM=2048,DM=1024,wM=512,NM=448,FM=256,PM=128,xM=64,kM=56,VM=32,YM=16,BM=8,UM=7,XM=4,GM=2,HM=1,WM=0,jM=2**32-1,qM={checkAccess:!0,updateOnRead:!0,syncImmediately:!0,unsafeBufferReplace:!1};Promise.withResolvers??(Promise.withResolvers=function(){let t,e;const i=new Promise(((i,n)=>{t=i,e=n}));return{promise:i,resolve:t,reject:e}}),Symbol.dispose??(Symbol.dispose=Symbol("Symbol.dispose")),Symbol.asyncDispose??(Symbol.asyncDispose=Symbol("Symbol.asyncDispose"));class KM{_convert(t){return this._isBigint?BigInt(t):Number(t)}get blocks(){return this._convert(Math.ceil(Number(this.size)/512))}get atime(){return new Date(Number(this.atimeMs))}set atime(t){this.atimeMs=this._convert(t.getTime())}get mtime(){return new Date(Number(this.mtimeMs))}set mtime(t){this.mtimeMs=this._convert(t.getTime())}get ctime(){return new Date(Number(this.ctimeMs))}set ctime(t){this.ctimeMs=this._convert(t.getTime())}get birthtime(){return new Date(Number(this.birthtimeMs))}set birthtime(t){this.birthtimeMs=this._convert(t.getTime())}constructor({atimeMs:t,mtimeMs:e,ctimeMs:i,birthtimeMs:n,uid:s,gid:r,size:o,mode:a,ino:l}={}){this.dev=this._convert(0),this.ino=this._convert(0),this.rdev=this._convert(0),this.nlink=this._convert(1),this.blksize=this._convert(4096),this.uid=this._convert(0),this.gid=this._convert(0);const u=Date.now();this.atimeMs=this._convert(t??u),this.mtimeMs=this._convert(e??u),this.ctimeMs=this._convert(i??u),this.birthtimeMs=this._convert(n??u),this.uid=this._convert(s??0),this.gid=this._convert(r??0),this.size=this._convert(o??0),this.ino=this._convert(l??0),this.mode=this._convert(a??420&yM),this.mode&MM||(this.mode=this.mode|this._convert(yM))}isFile(){return(this.mode&MM)===yM}isDirectory(){return(this.mode&MM)===vM}isSymbolicLink(){return(this.mode&MM)===AM}isSocket(){return(this.mode&MM)===RM}isBlockDevice(){return(this.mode&MM)===SM}isCharacterDevice(){return(this.mode&MM)===CM}isFIFO(){return(this.mode&MM)===LM}hasAccess(t,e){const i=e?.credentials||QO;if(this.isSymbolicLink()||0===i.euid||0===i.egid)return!0;let n=0;return i.uid===this.uid&&(this.mode&FM&&(n|=tM),this.mode&PM&&(n|=eM),this.mode&xM&&(n|=iM)),(i.gid===this.gid||i.groups.includes(Number(this.gid)))&&(this.mode&VM&&(n|=tM),this.mode&YM&&(n|=eM),this.mode&BM&&(n|=iM)),this.mode&XM&&(n|=tM),this.mode&GM&&(n|=eM),this.mode&HM&&(n|=iM),(n&t)===t}chmod(t){this.mode=this._convert(this.mode&MM|t)}chown(t,e){t=Number(t),e=Number(e),!isNaN(t)&&0<=t&&t<2**32&&(this.uid=this._convert(t)),!isNaN(e)&&0<=e&&e<2**32&&(this.gid=this._convert(e))}get atimeNs(){return 1000n*BigInt(this.atimeMs)}get mtimeNs(){return 1000n*BigInt(this.mtimeMs)}get ctimeNs(){return 1000n*BigInt(this.ctimeMs)}get birthtimeNs(){return 1000n*BigInt(this.birthtimeMs)}}function zM(t,e,i){!isNaN(e)&&0<=e&&e<2**32&&(t.uid=e),!isNaN(i)&&0<=i&&i<2**32&&(t.gid=i)}class $M extends KM{constructor(){super(...arguments),this._isBigint=!1}}class QM extends KM{constructor(){super(...arguments),this._isBigint=!0}}class JM{constructor(){this.type=525687744115,this.bsize=4096,this.blocks=0,this.bfree=0,this.bavail=0,this.files=jM,this.ffree=jM}}class ZM{constructor(){this.type=0x7a656e6673n,this.bsize=4096n,this.blocks=0n,this.bfree=0n,this.bavail=0n,this.files=BigInt(jM),this.ffree=BigInt(jM)}}const tR=["r","r+","rs","rs+","w","wx","w+","wx+","a","ax","a+","ax+"];function eR(t){if("number"==typeof t)return function(t){switch(t){case oM:return"r";case oM|mM:return"rs";case lM:return"r+";case lM|mM:return"rs+";case dM|uM|aM:return"w";case dM|uM|aM|pM:return"wx";case dM|uM|lM:return"w+";case dM|uM|lM|pM:return"wx+";case cM|uM|aM:return"a";case cM|uM|aM|pM:return"ax";case cM|uM|lM:return"a+";case cM|uM|lM|pM:return"ax+";default:throw new Error("Invalid flag number: "+t)}}(t);if(!tR.includes(t))throw new Error("Invalid flag string: "+t);return t}function iR(t){let e=0;return e<<=1,e+=+nR(t),e<<=1,e+=+sR(t),e<<=1,e}function nR(t){return-1!==t.indexOf("r")||-1!==t.indexOf("+")}function sR(t){return-1!==t.indexOf("w")||-1!==t.indexOf("a")||-1!==t.indexOf("+")}function rR(t){return-1!==t.indexOf("w")}function oR(t){return-1!==t.indexOf("a")}function aR(t){return-1!==t.indexOf("x")}class lR{constructor(t,e){this.fs=t,this.path=e}async[Symbol.asyncDispose](){await this.close()}[Symbol.dispose](){this.closeSync()}datasync(){return this.sync()}datasyncSync(){return this.syncSync()}}class uR extends lR{constructor(t,e,i,n,s=new Uint8Array(new ArrayBuffer(0,t.metadata().noResizableBuffers?{}:{maxByteLength:jM}))){if(super(t,e),this.flag=i,this.stats=n,this._buffer=s,this._position=0,this.dirty=!1,this.closed=!1,this.stats.size!=s.byteLength){if(nR(this.flag))throw new Error(`Size mismatch: buffer length ${s.byteLength}, stats size ${this.stats.size}`);this.dirty=!0}}get buffer(){return this._buffer}get position(){return oR(this.flag)?this.stats.size:this._position}set position(t){this._position=t}async sync(){if(this.closed)throw wO.With("EBADF",this.path,"File.sync");this.dirty&&(await this.fs.sync(this.path,this._buffer,this.stats),this.dirty=!1)}syncSync(){if(this.closed)throw wO.With("EBADF",this.path,"File.sync");this.dirty&&(this.fs.syncSync(this.path,this._buffer,this.stats),this.dirty=!1)}async close(){if(this.closed)throw wO.With("EBADF",this.path,"File.close");await this.sync(),this.dispose()}closeSync(){if(this.closed)throw wO.With("EBADF",this.path,"File.close");this.syncSync(),this.dispose()}dispose(t){if(this.closed)throw wO.With("EBADF",this.path,"File.dispose");if(this.dirty&&!t)throw wO.With("EBUSY",this.path,"File.dispose");delete this._buffer,delete this.stats,this.closed=!0}stat(){if(this.closed)throw wO.With("EBADF",this.path,"File.stat");return Promise.resolve(new $M(this.stats))}statSync(){if(this.closed)throw wO.With("EBADF",this.path,"File.stat");return new $M(this.stats)}_truncate(t){if(this.closed)throw wO.With("EBADF",this.path,"File.truncate");if(this.dirty=!0,!sR(this.flag))throw new wO(bO.EPERM,"File not opened with a writeable mode.");if(this.stats.mtimeMs=Date.now(),t>this._buffer.length){const e=new Uint8Array(t-this._buffer.length);this._write(e,0,e.length,this._buffer.length)}else this.stats.size=t,this._buffer=t?this._buffer.slice(0,t):new Uint8Array}async truncate(t){this._truncate(t),qM.syncImmediately&&await this.sync()}truncateSync(t){this._truncate(t),qM.syncImmediately&&this.syncSync()}_write(t,e=0,i=this.stats.size,n=this.position){if(this.closed)throw wO.With("EBADF",this.path,"File.write");if(!sR(this.flag))throw new wO(bO.EPERM,"File not opened with a writeable mode.");this.dirty=!0;const s=n+i,r=t.slice(e,e+i);if(s>this.stats.size&&(this.stats.size=s,s>this._buffer.byteLength))if(this._buffer.buffer.resizable&&this._buffer.buffer.maxByteLength<=s)this._buffer.buffer.resize(s);else if(qM.unsafeBufferReplace)this._buffer=r;else{const t=new Uint8Array(new ArrayBuffer(s,this.fs.metadata().noResizableBuffers?{}:{maxByteLength:jM}));t.set(this._buffer),this._buffer=t}return this._buffer.set(r,n),this.stats.mtimeMs=Date.now(),this.position=n+r.byteLength,r.byteLength}async write(t,e,i,n){const s=this._write(t,e,i,n);return qM.syncImmediately&&await this.sync(),s}writeSync(t,e=0,i=this.stats.size,n=this.position){const s=this._write(t,e,i,n);return qM.syncImmediately&&this.syncSync(),s}_read(t,e=0,i=this.stats.size,n){if(this.closed)throw wO.With("EBADF",this.path,"File.read");if(!nR(this.flag))throw new wO(bO.EPERM,"File not opened with a readable mode.");qM.updateOnRead&&(this.dirty=!0),this.stats.atimeMs=Date.now(),n??(n=this.position);let s=n+i;s>this.stats.size&&(s=n+Math.max(this.stats.size-n,0)),this._position=s;const r=s-n;return 0==r||new Uint8Array(t.buffer,e,i).set(this._buffer.slice(n,s)),r}async read(t,e,i,n){const s=this._read(t,e,i,n);return qM.syncImmediately&&await this.sync(),{bytesRead:s,buffer:t}}readSync(t,e,i,n){const s=this._read(t,e,i,n);return qM.syncImmediately&&this.syncSync(),s}async chmod(t){if(this.closed)throw wO.With("EBADF",this.path,"File.chmod");this.dirty=!0,this.stats.mode=this.stats.mode&(t>MM?~MM:MM)|t,(qM.syncImmediately||t>MM)&&await this.sync()}chmodSync(t){if(this.closed)throw wO.With("EBADF",this.path,"File.chmod");this.dirty=!0,this.stats.mode=this.stats.mode&(t>MM?~MM:MM)|t,(qM.syncImmediately||t>MM)&&this.syncSync()}async chown(t,e){if(this.closed)throw wO.With("EBADF",this.path,"File.chown");this.dirty=!0,zM(this.stats,t,e),qM.syncImmediately&&await this.sync()}chownSync(t,e){if(this.closed)throw wO.With("EBADF",this.path,"File.chown");this.dirty=!0,zM(this.stats,t,e),qM.syncImmediately&&this.syncSync()}async utimes(t,e){if(this.closed)throw wO.With("EBADF",this.path,"File.utimes");this.dirty=!0,this.stats.atime=t,this.stats.mtime=e,qM.syncImmediately&&await this.sync()}utimesSync(t,e){if(this.closed)throw wO.With("EBADF",this.path,"File.utimes");this.dirty=!0,this.stats.atime=t,this.stats.mtime=e,qM.syncImmediately&&this.syncSync()}}class pR{metadata(){return{name:this.constructor.name.toLowerCase(),readonly:!1,totalSpace:0,freeSpace:0,noResizableBuffers:!1,noAsyncCache:this._disableSync??!1,type:525687744115}}constructor(...t){}async ready(){}async exists(t){try{return await this.stat(t),!0}catch(t){return"ENOENT"!=t.code}}existsSync(t){try{return this.statSync(t),!0}catch(t){return"ENOENT"!=t.code}}}var hR=__webpack_require__(228);Symbol.toStringTag,Symbol.iterator;const dR=Intl.NumberFormat("en",{notation:"compact"});dR.format.bind(dR);function cR(t){return t.at(0).toUpperCase()+t.slice(1)}const _R=["int8","uint8","int16","uint16","int32","uint32","int64","uint64","float32","float64"],fR=[..._R,..._R.map((t=>cR(t))),"char"],TR=/^(u?int|float)(8|16|32|64)$/i;function mR(t){return"char"==t?"uint8":t.toLowerCase()}function gR(t){return TR.test(t.toString())}function IR(t){return"char"==t||TR.test(t.toString().toLowerCase())}Symbol.struct_init||=Symbol("struct_init"),Symbol.struct_metadata||=Symbol("struct_metadata");Symbol.struct_init,Symbol.struct_metadata;function ER(t){const e=Symbol.metadata||Object.getOwnPropertySymbols(t).find((t=>"Symbol.metadata"==t.description));var i;if(i=t,Symbol?.metadata&&(Symbol.metadata in i||Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:Object.create(null)})),!e)throw new ReferenceError("Could not get a reference to Symbol.metadata");return e}function OR(t){return"function"==typeof t&&ER(t)in t&&function(t){return null!=t&&"object"==typeof t&&Symbol.struct_metadata in t}(t[ER(t)])}function MR(t){return null!=t&&"object"==typeof t&&OR(t.constructor)}function RR(t){if(!MR(t))throw new TypeError(("function"==typeof t?t.name:"object"==typeof t&&t?t.constructor.name:t)+" is not a struct instance")}function AR(t){if(!function(t){return MR(t)||OR(t)}(t))throw new TypeError(("function"==typeof t?t.name:"object"==typeof t&&t?t.constructor.name:t)+" is not a struct")}function yR(t){if("string"==typeof t)return function(t){if(!IR(t))throw new TypeError("Not a valid primitive type: "+t)}(t),+mR(t).match(TR)[2]/8;AR(t);const e=OR(t)?t:t.constructor;return e[ER(e)][Symbol.struct_metadata].size}function SR(t={}){return function(e,i){i.metadata??={},i.metadata[Symbol.struct_init]||=[];let n=0;const s=new Map;for(const e of i.metadata[Symbol.struct_init]){const{name:i,type:a,length:l}=e;if(!IR(a)&&!OR(a))throw new TypeError("Not a valid type: "+a);s.set(i,{offset:n,type:IR(a)?mR(a):a,length:l}),n+=yR(a)*(l||1),r=n,o=t.align||1,n=Math.ceil(r/o)*o}var r,o;return i.metadata[Symbol.struct_metadata]={options:t,members:s,size:n},e}}function vR(t,e){return function(i,n){let s=n.name;if("symbol"==typeof s&&(console.warn("Symbol used for struct member name will be coerced to string: "+s.toString()),s=s.toString()),!s)throw new ReferenceError("Invalid name for struct member");return n.metadata??={},n.metadata[Symbol.struct_init]||=[],n.metadata[Symbol.struct_init].push({name:s,type:t,length:e}),i}}function CR(t){RR(t);const{options:e,members:i}=t.constructor[ER(t.constructor)][Symbol.struct_metadata],n=new Uint8Array(yR(t)),s=new DataView(n.buffer);for(const[r,{type:o,length:a,offset:l}]of i)for(let i=0;i<(a||1);i++){const u=l+yR(o)*i;let p=a>0?t[r][i]:t[r];if("string"==typeof p&&(p=p.charCodeAt(0)),!gR(o)){n.set(p?CR(p):new Uint8Array(yR(o)),u);continue}const h="set"+cR(o);"setInt64"!=h?"setUint64"!=h?s[h](u,Number(p),!e.bigEndian):s.setBigUint64(u,BigInt(p),!e.bigEndian):s.setBigInt64(u,BigInt(p),!e.bigEndian)}return n}function LR(t,e){RR(t);const{options:i,members:n}=t.constructor[ER(t.constructor)][Symbol.struct_metadata],s=e instanceof Uint8Array?e:new Uint8Array("buffer"in e?e.buffer:e),r=new DataView(s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength));for(const[e,{type:o,offset:a,length:l}]of n)for(let n=0;n<(l||1);n++){let u=l>0?t[e]:t;const p=l>0?n:e,h=a+yR(o)*n;if("string"==typeof t[e]){t[e]=t[e].slice(0,n)+String.fromCharCode(r.getUint8(h))+t[e].slice(n+1);continue}if(!gR(o)){if(null===u[p]||void 0===u[p])continue;LR(u[p],new Uint8Array(s.slice(h,h+yR(o))));continue}l>0&&(u||=[]);const d="get"+cR(o);"getInt64"!=d?u[p]="getUint64"!=d?r[d](h,!i.bigEndian):r.getBigUint64(h,!i.bigEndian):u[p]=r.getBigInt64(h,!i.bigEndian)}}Symbol.metadata??=Symbol.for("Symbol.metadata");const bR=Object.fromEntries(fR.map((t=>{return[t,(e=t,function(t,i){return"number"==typeof t?vR(e,t):vR(e)(t,i)})];var e})));var DR=function(t,e,i,n,s,r){function o(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var a,l=n.kind,u="getter"===l?"get":"setter"===l?"set":"value",p=!e&&t?n.static?t:t.prototype:null,h=e||(p?Object.getOwnPropertyDescriptor(p,n.name):{}),d=!1,c=i.length-1;c>=0;c--){var _={};for(var f in n)_[f]="access"===f?{}:n[f];for(var f in n.access)_.access[f]=n.access[f];_.addInitializer=function(t){if(d)throw new TypeError("Cannot add initializers after decoration has completed");r.push(o(t||null))};var T=(0,i[c])("accessor"===l?{get:h.get,set:h.set}:h[u],_);if("accessor"===l){if(void 0===T)continue;if(null===T||"object"!=typeof T)throw new TypeError("Object expected");(a=o(T.get))&&(h.get=a),(a=o(T.set))&&(h.set=a),(a=o(T.init))&&s.unshift(a)}else(a=o(T))&&("field"===l?s.unshift(a):h[u]=a)}p&&Object.defineProperty(p,n.name,h),d=!0},wR=function(t,e,i){for(var n=arguments.length>2,s=0;s{var t,e,i,n,s,r,o,a,l,u,p;let h,d,c,_,f,T,m,g,I,E,O,M,R,A=[SR()],y=[],S=[],v=[],C=[],L=[],b=[],D=[],w=[],N=[],F=[],P=[],x=[],k=[],V=[],Y=[],B=[],U=[],X=[],G=[],H=[],W=[],j=[],q=[];var K=d=class{constructor(t){if(this.data=wR(this,S,void 0),this.size=(wR(this,v),wR(this,C,void 0)),this.mode=(wR(this,L),wR(this,b,void 0)),this.nlink=(wR(this,D),wR(this,w,void 0)),this.uid=(wR(this,N),wR(this,F,void 0)),this.gid=(wR(this,P),wR(this,x,void 0)),this.atimeMs=(wR(this,k),wR(this,V,void 0)),this.birthtimeMs=(wR(this,Y),wR(this,B,void 0)),this.mtimeMs=(wR(this,U),wR(this,X,void 0)),this.ctimeMs=(wR(this,G),wR(this,H,void 0)),this.ino=(wR(this,W),wR(this,j,void 0)),wR(this,q),t){const e=yR(K),i=e-yR("uint64");if(t.byteLength{const z="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;c=[(t=bR).uint64.bind(t)],_=[(e=bR).uint32.bind(e)],f=[(i=bR).uint16.bind(i)],T=[(n=bR).uint32.bind(n)],m=[(s=bR).uint32.bind(s)],g=[(r=bR).uint32.bind(r)],I=[(o=bR).float64.bind(o)],E=[(a=bR).float64.bind(a)],O=[(l=bR).float64.bind(l)],M=[(u=bR).float64.bind(u)],R=[(p=bR).uint64.bind(p)],DR(null,null,c,{kind:"field",name:"data",static:!1,private:!1,access:{has:t=>"data"in t,get:t=>t.data,set:(t,e)=>{t.data=e}},metadata:z},S,v),DR(null,null,_,{kind:"field",name:"size",static:!1,private:!1,access:{has:t=>"size"in t,get:t=>t.size,set:(t,e)=>{t.size=e}},metadata:z},C,L),DR(null,null,f,{kind:"field",name:"mode",static:!1,private:!1,access:{has:t=>"mode"in t,get:t=>t.mode,set:(t,e)=>{t.mode=e}},metadata:z},b,D),DR(null,null,T,{kind:"field",name:"nlink",static:!1,private:!1,access:{has:t=>"nlink"in t,get:t=>t.nlink,set:(t,e)=>{t.nlink=e}},metadata:z},w,N),DR(null,null,m,{kind:"field",name:"uid",static:!1,private:!1,access:{has:t=>"uid"in t,get:t=>t.uid,set:(t,e)=>{t.uid=e}},metadata:z},F,P),DR(null,null,g,{kind:"field",name:"gid",static:!1,private:!1,access:{has:t=>"gid"in t,get:t=>t.gid,set:(t,e)=>{t.gid=e}},metadata:z},x,k),DR(null,null,I,{kind:"field",name:"atimeMs",static:!1,private:!1,access:{has:t=>"atimeMs"in t,get:t=>t.atimeMs,set:(t,e)=>{t.atimeMs=e}},metadata:z},V,Y),DR(null,null,E,{kind:"field",name:"birthtimeMs",static:!1,private:!1,access:{has:t=>"birthtimeMs"in t,get:t=>t.birthtimeMs,set:(t,e)=>{t.birthtimeMs=e}},metadata:z},B,U),DR(null,null,O,{kind:"field",name:"mtimeMs",static:!1,private:!1,access:{has:t=>"mtimeMs"in t,get:t=>t.mtimeMs,set:(t,e)=>{t.mtimeMs=e}},metadata:z},X,G),DR(null,null,M,{kind:"field",name:"ctimeMs",static:!1,private:!1,access:{has:t=>"ctimeMs"in t,get:t=>t.ctimeMs,set:(t,e)=>{t.ctimeMs=e}},metadata:z},H,W),DR(null,null,R,{kind:"field",name:"ino",static:!1,private:!1,access:{has:t=>"ino"in t,get:t=>t.ino,set:(t,e)=>{t.ino=e}},metadata:z},j,q),DR(null,h={value:d},A,{kind:"class",name:d.name,metadata:z},null,y),K=d=h.value,z&&Object.defineProperty(d,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:z}),wR(d,y)})(),K=d})();var PR=function(t,e,i){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var n,s;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],i&&(s=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:n,async:i})}else i&&t.stack.push({async:!0});return e},xR=function(t){return function(e){function i(i){e.error=e.hasError?new t(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}return function t(){for(;e.stack.length;){var n=e.stack.pop();try{var s=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(s).then(t,(function(e){return i(e),t()}))}catch(t){i(t)}}if(e.hasError)throw e.error}()}}("function"==typeof SuppressedError?SuppressedError:function(t,e,i){var n=new Error(i);return n.name="SuppressedError",n.error=t,n.suppressed=e,n});class kR extends pR{async ready(){this._initialized||(await this.checkRoot(),this._initialized=!0)}constructor(t){super(),this.store=t,this._initialized=!1}metadata(){return{...super.metadata(),name:this.store.name}}async empty(){await this.store.clear(),await this.checkRoot()}emptySync(){this.store.clearSync(),this.checkRootSync()}async rename(t,e){const i={stack:[],error:void 0,hasError:!1};try{const n=PR(i,this.store.transaction(),!0),s=YO(t),r=YO(e),o=await this.findInode(n,s.dir,"rename"),a=HO(await this.get(n,o.data,s.dir,"rename"));if(!a[s.base])throw wO.With("ENOENT",t,"rename");const l=a[s.base];if(delete a[s.base],0===(r.dir+"/").indexOf(t+"/"))throw new wO(bO.EBUSY,s.dir);const u=r.dir==s.dir,p=u?o:await this.findInode(n,r.dir,"rename"),h=u?a:HO(await this.get(n,p.data,r.dir,"rename"));if(h[r.base]){const t=new FR(await this.get(n,h[r.base],e,"rename"));if(!t.toStats().isFile())throw wO.With("EPERM",e,"rename");await n.remove(t.data),await n.remove(h[r.base])}h[r.base]=l,await n.set(o.data,WO(a)),await n.set(p.data,WO(h)),await n.commit()}catch(t){i.error=t,i.hasError=!0}finally{const t=xR(i);t&&await t}}renameSync(t,e){const i={stack:[],error:void 0,hasError:!1};try{const n=PR(i,this.store.transaction(),!1),s=YO(t),r=YO(e),o=this.findInodeSync(n,s.dir,"rename"),a=HO(this.getSync(n,o.data,s.dir,"rename"));if(!a[s.base])throw wO.With("ENOENT",t,"rename");const l=a[s.base];if(delete a[s.base],0==(r.dir+"/").indexOf(t+"/"))throw new wO(bO.EBUSY,s.dir);const u=r.dir===s.dir,p=u?o:this.findInodeSync(n,r.dir,"rename"),h=u?a:HO(this.getSync(n,p.data,r.dir,"rename"));if(h[r.base]){const t=new FR(this.getSync(n,h[r.base],e,"rename"));if(!t.toStats().isFile())throw wO.With("EPERM",e,"rename");n.removeSync(t.data),n.removeSync(h[r.base])}h[r.base]=l,n.setSync(o.data,WO(a)),n.setSync(p.data,WO(h)),n.commitSync()}catch(t){i.error=t,i.hasError=!0}finally{xR(i)}}async stat(t){const e={stack:[],error:void 0,hasError:!1};try{const i=PR(e,this.store.transaction(),!0);return(await this.findInode(i,t,"stat")).toStats()}catch(t){e.error=t,e.hasError=!0}finally{const t=xR(e);t&&await t}}statSync(t){const e={stack:[],error:void 0,hasError:!1};try{const i=PR(e,this.store.transaction(),!1);return this.findInodeSync(i,t,"stat").toStats()}catch(t){e.error=t,e.hasError=!0}finally{xR(e)}}async createFile(t,e,i){const n=await this.commitNew(t,yM,i,new Uint8Array,"createFile");return new uR(this,t,e,n.toStats(),new Uint8Array)}createFileSync(t,e,i){const n=this.commitNewSync(t,yM,i,new Uint8Array,"createFile");return new uR(this,t,e,n.toStats(),new Uint8Array)}async openFile(t,e){const i={stack:[],error:void 0,hasError:!1};try{const n=PR(i,this.store.transaction(),!0),s=await this.findInode(n,t,"openFile"),r=await this.get(n,s.data,t,"openFile");return new uR(this,t,e,s.toStats(),r)}catch(t){i.error=t,i.hasError=!0}finally{const t=xR(i);t&&await t}}openFileSync(t,e){const i={stack:[],error:void 0,hasError:!1};try{const n=PR(i,this.store.transaction(),!1),s=this.findInodeSync(n,t,"openFile"),r=this.getSync(n,s.data,t,"openFile");return new uR(this,t,e,s.toStats(),r)}catch(t){i.error=t,i.hasError=!0}finally{xR(i)}}async unlink(t){return this.remove(t,!1,"unlink")}unlinkSync(t){this.removeSync(t,!1,"unlink")}async rmdir(t){if((await this.readdir(t)).length)throw wO.With("ENOTEMPTY",t,"rmdir");await this.remove(t,!0,"rmdir")}rmdirSync(t){if(this.readdirSync(t).length)throw wO.With("ENOTEMPTY",t,"rmdir");this.removeSync(t,!0,"rmdir")}async mkdir(t,e){await this.commitNew(t,vM,e,UO("{}"),"mkdir")}mkdirSync(t,e){this.commitNewSync(t,vM,e,UO("{}"),"mkdir")}async readdir(t){const e={stack:[],error:void 0,hasError:!1};try{const i=PR(e,this.store.transaction(),!0),n=await this.findInode(i,t,"readdir");return Object.keys(HO(await this.get(i,n.data,t,"readdir")))}catch(t){e.error=t,e.hasError=!0}finally{const t=xR(e);t&&await t}}readdirSync(t){const e={stack:[],error:void 0,hasError:!1};try{const i=PR(e,this.store.transaction(),!1),n=this.findInodeSync(i,t,"readdir");return Object.keys(HO(this.getSync(i,n.data,t,"readdir")))}catch(t){e.error=t,e.hasError=!0}finally{xR(e)}}async sync(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{const s=PR(n,this.store.transaction(),!0),r=await this._findInode(s,t,"sync"),o=new FR(await this.get(s,r,t,"sync")),a=o.update(i);await s.set(o.data,e),a&&await s.set(r,CR(o)),await s.commit()}catch(t){n.error=t,n.hasError=!0}finally{const t=xR(n);t&&await t}}syncSync(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{const s=PR(n,this.store.transaction(),!1),r=this._findInodeSync(s,t,"sync"),o=new FR(this.getSync(s,r,t,"sync")),a=o.update(i);s.setSync(o.data,e),a&&s.setSync(r,CR(o)),s.commitSync()}catch(t){n.error=t,n.hasError=!0}finally{xR(n)}}async link(t,e){const i={stack:[],error:void 0,hasError:!1};try{const n=PR(i,this.store.transaction(),!0),s=kO(e),r=await this.findInode(n,s,"link"),o=HO(await this.get(n,r.data,s,"link")),a=await this._findInode(n,t,"link"),l=new FR(await this.get(n,a,t,"link"));l.nlink++,o[VO(e)]=a,n.setSync(a,CR(l)),n.setSync(r.data,WO(o)),n.commitSync()}catch(t){i.error=t,i.hasError=!0}finally{const t=xR(i);t&&await t}}linkSync(t,e){const i={stack:[],error:void 0,hasError:!1};try{const n=PR(i,this.store.transaction(),!1),s=kO(e),r=this.findInodeSync(n,s,"link"),o=HO(this.getSync(n,r.data,s,"link")),a=this._findInodeSync(n,t,"link"),l=new FR(this.getSync(n,a,t,"link"));l.nlink++,o[VO(e)]=a,n.setSync(a,CR(l)),n.setSync(r.data,WO(o)),n.commitSync()}catch(t){i.error=t,i.hasError=!0}finally{xR(i)}}async checkRoot(){const t={stack:[],error:void 0,hasError:!1};try{const e=PR(t,this.store.transaction(),!0);if(await e.get(0n))return;const i=new FR;i.ino=0n,i.mode=511|vM,await e.set(i.data,UO("{}")),await e.set(0n,CR(i)),await e.commit()}catch(e){t.error=e,t.hasError=!0}finally{const e=xR(t);e&&await e}}checkRootSync(){const t={stack:[],error:void 0,hasError:!1};try{const e=PR(t,this.store.transaction(),!1);if(e.getSync(0n))return;const i=new FR;i.ino=0n,i.mode=511|vM,e.setSync(i.data,UO("{}")),e.setSync(0n,CR(i)),e.commitSync()}catch(e){t.error=e,t.hasError=!0}finally{xR(t)}}async _findInode(t,e,i,n=new Set){if(n.has(e))throw new wO(bO.EIO,"Infinite loop detected while finding inode",e);if(n.add(e),"/"==e)return 0n;const{dir:s,base:r}=YO(e),o="/"==s?new FR(await this.get(t,0n,s,i)):await this.findInode(t,s,i,n),a=HO(await this.get(t,o.data,s,i));if(!(r in a))throw wO.With("ENOENT",PO(s,r),i);return a[r]}_findInodeSync(t,e,i,n=new Set){if(n.has(e))throw new wO(bO.EIO,"Infinite loop detected while finding inode",e);if(n.add(e),"/"==e)return 0n;const{dir:s,base:r}=YO(e),o="/"==s?new FR(this.getSync(t,0n,s,i)):this.findInodeSync(t,s,i,n),a=HO(this.getSync(t,o.data,s,i));if(!(r in a))throw wO.With("ENOENT",PO(s,r),i);return a[r]}async findInode(t,e,i,n=new Set){const s=await this._findInode(t,e,i,n);return new FR(await this.get(t,s,e,i))}findInodeSync(t,e,i,n=new Set){const s=this._findInodeSync(t,e,i,n);return new FR(this.getSync(t,s,e,i))}async get(t,e,i,n){const s=await t.get(e);if(!s)throw wO.With("ENOENT",i,n);return s}getSync(t,e,i,n){const s=t.getSync(e);if(!s)throw wO.With("ENOENT",i,n);return s}async allocNew(t,e,i){for(let e=0;e<5;e++){const e=$O();if(!await t.get(e))return e}throw new wO(bO.ENOSPC,"No IDs available",e,i)}allocNewSync(t,e,i){for(let e=0;e<5;e++){const e=$O();if(!t.getSync(e))return e}throw new wO(bO.ENOSPC,"No IDs available",e,i)}async commitNew(t,e,i,n,s){const r={stack:[],error:void 0,hasError:!1};try{if("/"==t)throw wO.With("EEXIST",t,s);const o=PR(r,this.store.transaction(),!0),{dir:a,base:l}=YO(t),u=await this.findInode(o,a,s),p=HO(await this.get(o,u.data,a,s));if(p[l])throw wO.With("EEXIST",t,s);const h=new FR;return h.ino=await this.allocNew(o,t,s),h.data=await this.allocNew(o,t,s),h.mode=i|e,h.uid=u.mode&bM?u.uid:QO.uid,h.gid=u.mode&DM?u.gid:QO.gid,h.size=n.length,await o.set(h.ino,CR(h)),await o.set(h.data,n),p[l]=h.ino,await o.set(u.data,WO(p)),await o.commit(),h}catch(t){r.error=t,r.hasError=!0}finally{const t=xR(r);t&&await t}}commitNewSync(t,e,i,n,s){const r={stack:[],error:void 0,hasError:!1};try{if("/"==t)throw wO.With("EEXIST",t,s);const o=PR(r,this.store.transaction(),!1),{dir:a,base:l}=YO(t),u=this.findInodeSync(o,a,s),p=HO(this.getSync(o,u.data,a,s));if(p[l])throw wO.With("EEXIST",t,s);const h=new FR;return h.ino=this.allocNewSync(o,t,s),h.data=this.allocNewSync(o,t,s),h.size=n.length,h.mode=i|e,h.uid=u.mode&bM?u.uid:QO.uid,h.gid=u.mode&DM?u.gid:QO.gid,o.setSync(h.ino,CR(h)),o.setSync(h.data,n),p[l]=h.ino,o.setSync(u.data,WO(p)),o.commitSync(),h}catch(t){r.error=t,r.hasError=!0}finally{xR(r)}}async remove(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{const s=PR(n,this.store.transaction(),!0),{dir:r,base:o}=YO(t),a=await this.findInode(s,r,i),l=HO(await this.get(s,a.data,r,i));if(!l[o])throw wO.With("ENOENT",t,"remove");const u=l[o],p=new FR(await this.get(s,u,t,i));if(delete l[o],!e&&p.toStats().isDirectory())throw wO.With("EISDIR",t,"remove");await s.set(a.data,WO(l)),--p.nlink<1&&(await s.remove(p.data),await s.remove(u)),await s.commit()}catch(t){n.error=t,n.hasError=!0}finally{const t=xR(n);t&&await t}}removeSync(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{const s=PR(n,this.store.transaction(),!1),{dir:r,base:o}=YO(t),a=this.findInodeSync(s,r,i),l=HO(this.getSync(s,a.data,r,i)),u=l[o];if(!u)throw wO.With("ENOENT",t,"remove");const p=new FR(this.getSync(s,u,t,i));if(delete l[o],!e&&p.toStats().isDirectory())throw wO.With("EISDIR",t,"remove");s.setSync(a.data,WO(l)),--p.nlink<1&&(s.removeSync(p.data),s.removeSync(u)),s.commitSync()}catch(t){n.error=t,n.hasError=!0}finally{xR(n)}}}class VR{constructor(t){this.store=t,this.done=!1}async[Symbol.asyncDispose](){this.done||await this.abort()}[Symbol.dispose](){this.done||this.abortSync()}}class YR extends VR{async keys(){return this.keysSync()}async get(t){return this.getSync(t)}async set(t,e){return this.setSync(t,e)}async remove(t){return this.removeSync(t)}async commit(){return this.commitSync()}async abort(){return this.abortSync()}}class BR extends YR{constructor(){super(...arguments),this.originalData=new Map,this.modifiedKeys=new Set}keysSync(){return this.store.keys()}getSync(t){const e=this.store.get(t);return this.stashOldValue(t,e),e}setSync(t,e){return this.markModified(t),this.store.set(t,e)}removeSync(t){this.markModified(t),this.store.delete(t)}commitSync(){this.done=!0}abortSync(){if(this.done){for(const t of this.modifiedKeys){const e=this.originalData.get(t);e?this.store.set(t,e):this.store.delete(t)}this.done=!0}}stashOldValue(t,e){this.originalData.has(t)||this.originalData.set(t,e)}markModified(t){this.modifiedKeys.add(t),this.originalData.has(t)||this.originalData.set(t,this.store.get(t))}}class UR extends Map{constructor(t="tmp"){super(),this.name=t}async sync(){}clearSync(){this.clear()}transaction(){return new BR(this)}}const XR={name:"InMemory",isAvailable:()=>!0,options:{name:{type:"string",required:!1}},create({name:t}){const e=new kR(new UR(t));return e.checkRootSync(),e}};"function"==typeof SuppressedError&&SuppressedError;class GR{constructor(){this.isEnabled=!1,this.sync=new Map,this.async=new Map}has(t){return this.isEnabled&&this.sync.has(t)}get(t){if(this.isEnabled)return this.sync.get(t)}set(t,e){this.isEnabled&&(this.sync.set(t,e),this.async.set(t,Promise.resolve(e)))}hasAsync(t){return this.isEnabled&&this.async.has(t)}getAsync(t){if(this.isEnabled)return this.async.get(t)}setAsync(t,e){this.isEnabled&&(this.async.set(t,e),e.then((e=>this.sync.set(t,e))))}clear(){this.isEnabled&&(this.sync.clear(),this.async.clear())}}const HR=new GR,WR=new GR;var jR=__webpack_require__(8287);function qR(t,e){return Object.fromEntries(Object.entries(t).map((([t,i])=>[t,"function"==typeof i?i.bind(e):i])))}const KR=new Map;let zR=100;function $R(t){const e=zR++;return KR.set(e,t),e}function QR(t){if(!KR.has(t))throw new wO(bO.EBADF);return KR.get(t)}const JR=new Map;function ZR(t,e){if("/"!==t[0]&&(t="/"+t),t=PO(t),JR.has(t))throw new wO(bO.EINVAL,"Mount point "+t+" is already in use.");JR.set(t,e),WR.clear()}function tA(t){if("/"!==t[0]&&(t="/"+t),t=PO(t),!JR.has(t))throw new wO(bO.EINVAL,"Mount point "+t+" is already unmounted.");JR.delete(t),WR.clear()}function eA(t,e){const i=e?.root||"/";t=KO(xO(i,t));const n=[...JR].sort(((t,e)=>t[0].length>e[0].length?-1:1));for(const[e,s]of n)if(e.length<=t.length&&t.startsWith(e))return""===(t=t.slice(e.length>1?e.length:0))&&(t=i),{fs:s,path:t,mountPoint:e,root:i};throw new wO(bO.EIO,"No file system")}async function iA(){await Promise.all([...JR.values()].map((t=>t.ready())))}function nA(t,e){for(const[i,n]of Object.entries(e))t=t?.replaceAll(i,n);return t}function sA(t,e){"string"==typeof t.stack&&(t.stack=nA(t.stack,e));try{t.message=nA(t.message,e)}catch{}return t.path&&(t.path=nA(t.path,e)),t}function rA(t){"/"in t&&tA("/");for(const[e,i]of Object.entries(t))ZR(e,i)}function oA(t,e){const i=t.metadata(),n=i.blockSize||4096;return{type:(e?BigInt:Number)(i.type),bsize:(e?BigInt:Number)(n),ffree:(e?BigInt:Number)(i.freeNodes||jM),files:(e?BigInt:Number)(i.totalNodes||jM),bavail:(e?BigInt:Number)(i.freeSpace/n),bfree:(e?BigInt:Number)(i.freeSpace/n),blocks:(e?BigInt:Number)(i.totalSpace/n)}}function aA(t,e){const i=this?.credentials;if(i?.uid&&i?.gid&&i?.euid&&i?.egid)throw new wO(bO.EPERM,"Can not chroot() as non-root user");return e&&this?(this.root+=t,this):function(t,e=structuredClone(QO)){const i={root:t,credentials:JO(e)},n=qR(st,i),s=qR(nt,i);return{...i,...n,promises:s}}(xO(this?.root||"/",t),i)}ZR("/",XR.create({name:"root"}));class lA extends hR{off(t,e,i,n){return super.off(t,e,i,n)}removeListener(t,e,i,n){return super.removeListener(t,e,i,n)}constructor(t){super(),this.path=t}setMaxListeners(){throw wO.With("ENOSYS",this.path,"Watcher.setMaxListeners")}getMaxListeners(){throw wO.With("ENOSYS",this.path,"Watcher.getMaxListeners")}prependListener(){throw wO.With("ENOSYS",this.path,"Watcher.prependListener")}prependOnceListener(){throw wO.With("ENOSYS",this.path,"Watcher.prependOnceListener")}rawListeners(){throw wO.With("ENOSYS",this.path,"Watcher.rawListeners")}ref(){return this}unref(){return this}}class uA extends lA{constructor(t,e){super(t),this.options=e,function(t,e){const i=KO(t);hA.has(i)||hA.set(i,new Set);hA.get(i).add(e)}(t.toString(),this)}close(){super.emit("close"),function(t,e){const i=KO(t);hA.has(i)&&(hA.get(i).delete(e),0===hA.get(i).size&&hA.delete(i))}(this.path.toString(),this)}[Symbol.dispose](){this.close()}}class pA extends lA{constructor(t,e){super(t),this.options=e,this.start()}onInterval(){try{const i=mA(this.path);t=this.previous,e=i,(t.size!=e.size||+t.atime!=+e.atime||+t.mtime!=+e.mtime||+t.ctime!=+e.ctime||t.mode!=e.mode)&&(this.emit("change",i,this.previous),this.previous=i)}catch(t){this.emit("error",t)}var t,e}start(){const t=this.options.interval||5e3;try{this.previous=mA(this.path)}catch(t){return void this.emit("error",t)}this.intervalId=setInterval(this.onInterval.bind(this),t),this.options.persistent||"object"!=typeof this.intervalId||this.intervalId.unref()}stop(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this.removeAllListeners()}}const hA=new Map;function dA(t,e){if(e=KO(e),hA.has(e))for(const i of hA.get(e))i.emit("change",t,VO(e));let i,n=e;for(;n!==i;)if(i=n,n=kO(n),hA.has(n))for(const i of hA.get(n))i.emit("change",t,e.slice(n.length+("/"==n?0:1)))}var cA=function(t,e,i){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var n,s;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],i&&(s=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:n,async:i})}else i&&t.stack.push({async:!0});return e},_A=function(t){return function(e){function i(i){e.error=e.hasError?new t(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}return function t(){for(;e.stack.length;){var n=e.stack.pop();try{var s=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(s).then(t,(function(e){return i(e),t()}))}catch(t){i(t)}}if(e.hasError)throw e.error}()}}("function"==typeof SuppressedError?SuppressedError:function(t,e,i){var n=new Error(i);return n.name="SuppressedError",n.error=t,n.suppressed=e,n});function fA(t,e){t=KO(t),e=KO(e);const i=eA(t,this),n=eA(e,this);if(qM.checkAccess&&!mA.call(this,kO(t)).hasAccess(eM,this))throw wO.With("EACCES",t,"rename");try{if(i===n)return i.fs.renameSync(i.path,n.path),dA("rename",t.toString()),void dA("change",e.toString());SA.call(this,e,yA(t)),EA.call(this,t),dA("rename",t.toString())}catch(s){throw sA(s,{[i.path]:t,[n.path]:e})}}function TA(t){t=KO(t);try{const{fs:e,path:i}=eA($A.call(this,t),this);return e.existsSync(i)}catch(t){if(t.errno==bO.ENOENT)return!1;throw t}}function mA(t,e){t=KO(t);const{fs:i,path:n}=eA($A.call(this,t),this);try{const t=i.statSync(n);if(qM.checkAccess&&!t.hasAccess(tM,this))throw wO.With("EACCES",n,"stat");return e?.bigint?new QM(t):t}catch(e){throw sA(e,{[n]:t})}}function gA(t,e){t=KO(t);const{fs:i,path:n}=eA(t,this);try{const t=i.statSync(n);return e?.bigint?new QM(t):t}catch(e){throw sA(e,{[n]:t})}}function IA(t,e=0){const i={stack:[],error:void 0,hasError:!1};try{const n=cA(i,OA.call(this,t,"r+"),!1);if(e||(e=0),e<0)throw new wO(bO.EINVAL);n.truncateSync(e)}catch(t){i.error=t,i.hasError=!0}finally{_A(i)}}function EA(t){t=KO(t);const{fs:e,path:i}=eA(t,this);try{if(qM.checkAccess&&!(HR.get(t)||e.statSync(i)).hasAccess(eM,this))throw wO.With("EACCES",i,"unlink");e.unlinkSync(i),dA("rename",t.toString())}catch(e){throw sA(e,{[i]:t})}}function OA(t,e,i,n=!0){t=KO(t);const s=jO(i,420),r=eR(e);t=n?$A.call(this,t):t;const{fs:o,path:a}=eA(t,this);let l;try{l=o.statSync(a)}catch{}if(!l){if(!sR(r)&&!oR(r)||"r+"==r)throw wO.With("ENOENT",t,"_open");const e=o.statSync(kO(a));if(qM.checkAccess&&!e.hasAccess(eM,this))throw wO.With("EACCES",kO(t),"_open");if(!e.isDirectory())throw wO.With("ENOTDIR",kO(t),"_open");return o.createFileSync(a,r,s)}if(qM.checkAccess&&(!l.hasAccess(s,this)||!l.hasAccess(iR(r),this)))throw wO.With("EACCES",t,"_open");if(aR(r))throw wO.With("EEXIST",t,"_open");const u=o.openFileSync(a,r);return rR(r)&&u.truncateSync(0),u}function MA(t,e,i=ZO){return $R(OA.call(this,t,e,i,!0))}function RA(t,e,i){return $R(OA.call(this,t,e,i,!1))}function AA(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{const s=cA(n,OA.call(this,t,e,420,i),!1),r=s.statSync(),o=new Uint8Array(r.size);return s.readSync(o,0,r.size,0),o}catch(t){n.error=t,n.hasError=!0}finally{_A(n)}}function yA(t,e={}){const i=zO(e,null,"r",420);if(!nR(eR(i.flag)))throw new wO(bO.EINVAL,"Flag passed to readFile must allow for reading.");const n=jR.Buffer.from(AA.call(this,"number"==typeof t?QR(t).path:t.toString(),i.flag,!0));return i.encoding?n.toString(i.encoding):n}function SA(t,e,i={}){const n={stack:[],error:void 0,hasError:!1};try{const s=zO(i,"utf8","w+",420),r=eR(s.flag);if(!sR(r))throw new wO(bO.EINVAL,"Flag passed to writeFile must allow for writing.");if("string"!=typeof e&&!s.encoding)throw new wO(bO.EINVAL,"Encoding not specified");const o="string"==typeof e?jR.Buffer.from(e,s.encoding):new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(!o)throw new wO(bO.EINVAL,"Data not specified");cA(n,OA.call(this,"number"==typeof t?QR(t).path:t.toString(),r,s.mode,!0),!1).writeSync(o,0,o.byteLength,0),dA("change",t.toString())}catch(t){n.error=t,n.hasError=!0}finally{_A(n)}}function vA(t,e,i={}){const n={stack:[],error:void 0,hasError:!1};try{const s=zO(i,"utf8","a+",420),r=eR(s.flag);if(!oR(r))throw new wO(bO.EINVAL,"Flag passed to appendFile must allow for appending.");if("string"!=typeof e&&!s.encoding)throw new wO(bO.EINVAL,"Encoding not specified");const o="string"==typeof e?jR.Buffer.from(e,s.encoding):new Uint8Array(e.buffer,e.byteOffset,e.byteLength);cA(n,OA.call(this,"number"==typeof t?QR(t).path:t.toString(),r,s.mode,!0),!1).writeSync(o,0,o.byteLength)}catch(t){n.error=t,n.hasError=!0}finally{_A(n)}}function CA(t,e){const i=QR(t).statSync();return e?.bigint?new QM(i):i}function LA(t){QR(t).closeSync(),KR.delete(t)}function bA(t,e=0){if(e||(e=0),e<0)throw new wO(bO.EINVAL);QR(t).truncateSync(e)}function DA(t){QR(t).syncSync()}function wA(t){QR(t).datasyncSync()}function NA(t,e,i,n,s){let r,o,a,l;if("string"==typeof e){l="number"==typeof i?i:null;const t="string"==typeof n?n:"utf8";o=0,r=jR.Buffer.from(e,t),a=r.byteLength}else r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),o=i,a=n,l="number"==typeof s?s:null;const u=QR(t);l??(l=u.position);const p=u.writeSync(r,o,a,l);return dA("change",u.path),p}function FA(t,e,i,n,s){const r=QR(t),o="object"==typeof i?i.offset:i;return"object"==typeof i&&(n=i.length,s=i.position),s=Number(s),isNaN(s)&&(s=r.position),r.readSync(e,o,n,s)}function PA(t,e,i){QR(t).chownSync(e,i)}function xA(t,e){const i=jO(e,-1);if(i<0)throw new wO(bO.EINVAL,"Invalid mode.");QR(t).chmodSync(i)}function kA(t,e,i){QR(t).utimesSync(qO(e),qO(i))}function VA(t){t=KO(t);const{fs:e,path:i}=eA($A.call(this,t),this);try{const n=HR.get(t)||e.statSync(i);if(!n.isDirectory())throw wO.With("ENOTDIR",i,"rmdir");if(qM.checkAccess&&!n.hasAccess(eM,this))throw wO.With("EACCES",i,"rmdir");e.rmdirSync(i),dA("rename",t.toString())}catch(e){throw sA(e,{[i]:t})}}function YA(t,e){e="object"==typeof e?e:{mode:e};const i=jO(e?.mode,511);t=$A.call(this,t);const{fs:n,path:s,root:r}=eA(t,this),o={[s]:t};try{if(!e?.recursive){if(qM.checkAccess&&!n.statSync(kO(s)).hasAccess(eM,this))throw wO.With("EACCES",kO(s),"mkdir");return n.mkdirSync(s,i)}const a=[];for(let e=s,i=t;!n.existsSync(e);e=kO(e),i=kO(i))a.unshift(e),o[e]=i;for(const t of a){if(qM.checkAccess&&!n.statSync(kO(t)).hasAccess(eM,this))throw wO.With("EACCES",kO(t),"mkdir");n.mkdirSync(t,i),dA("rename",t)}return 1==r.length?a[0]:a[0]?.slice(r.length)}catch(t){throw sA(t,o)}}function BA(t,e){e="object"==typeof e?e:{encoding:e},t=KO(t);const{fs:i,path:n}=eA($A.call(this,t),this);let s;try{const e=HR.get(t)||i.statSync(n);if(HR.set(t,e),qM.checkAccess&&!e.hasAccess(tM,this))throw wO.With("EACCES",n,"readdir");if(!e.isDirectory())throw wO.With("ENOTDIR",n,"readdir");s=i.readdirSync(n)}catch(e){throw sA(e,{[n]:t})}const r=[];for(const o of s){const s=HR.get(xO(t,o))||i.statSync(xO(n,o));if(HR.set(xO(t,o),s),e?.withFileTypes?r.push(new oy(o,s)):"buffer"==e?.encoding?r.push(jR.Buffer.from(o)):r.push(o),s.isDirectory()&&e?.recursive)for(const i of BA.call(this,xO(t,o),{...e,_isIndirect:!0}))i instanceof oy?(i.path=xO(o,i.path),r.push(i)):jR.Buffer.isBuffer(i)?r.push(jR.Buffer.from(xO(o,GO(i)))):r.push(xO(o,i))}return e?._isIndirect||HR.clear(),r}function UA(t,e){if(t=KO(t),qM.checkAccess&&!mA(kO(t)).hasAccess(tM,this))throw wO.With("EACCES",kO(t),"link");if(e=KO(e),qM.checkAccess&&!mA(kO(e)).hasAccess(eM,this))throw wO.With("EACCES",kO(e),"link");const{fs:i,path:n}=eA(t,this),s=eA(e,this);if(i!=s.fs)throw wO.With("EXDEV",e,"link");try{if(qM.checkAccess&&!i.statSync(n).hasAccess(tM,this))throw wO.With("EACCES",n,"link");return i.linkSync(n,e)}catch(i){throw sA(i,{[n]:t,[s.path]:e})}}function XA(t,e,i="file"){if(!["file","dir","junction"].includes(i))throw new wO(bO.EINVAL,"Invalid type: "+i);if(TA.call(this,e))throw wO.With("EEXIST",e.toString(),"symlink");SA.call(this,e,t.toString());OA.call(this,e,"r+",420,!1).chmodSync(AM)}function GA(t,e){const i=jR.Buffer.from(AA.call(this,t.toString(),"r",!1)),n="object"==typeof e?e?.encoding:e;return"buffer"==n?i:i.toString(n)}function HA(t,e,i){const n=MA.call(this,t,"r+");PA(n,e,i),LA(n)}function WA(t,e,i){const n=RA.call(this,t,"r+");PA(n,e,i),LA(n)}function jA(t,e){const i=MA.call(this,t,"r+");xA(i,e),LA(i)}function qA(t,e){const i=RA.call(this,t,"r+");xA(i,e),LA(i)}function KA(t,e,i){const n=MA.call(this,t,"r+");kA(n,e,i),LA(n)}function zA(t,e,i){const n=RA.call(this,t,"r+");kA(n,e,i),LA(n)}function $A(t,e){t=KO(t);const i=(this?.root||"")+t;if(WR.has(i))return WR.get(i);const{base:n,dir:s}=YO(t),r="/"==s?"/":WR.get((this?.root||"")+s)||$A.call(this,s),o=xO(r,n),{fs:a,path:l}=eA(o,this);try{const n=HR.get(o)||a.statSync(l);if(HR.set(o,n),!n.isSymbolicLink())return WR.set(t,o),o;const s=PO(r,GA.call(this,o,e).toString()),u=WR.get((this?.root||"")+s)||$A.call(this,s);return WR.set(i,u),u}catch(e){if("ENOENT"==e.code)return t;throw sA(e,{[l]:o})}}function QA(t,e=384){if(qM.checkAccess&&!mA.call(this,t).hasAccess(e,this))throw new wO(bO.EACCES)}function JA(t,e){let i;t=KO(t);try{i=HR.get(t)||gA.bind(this)(t)}catch(t){if("ENOENT"!=t.code||!e?.force)throw t}if(i){switch(HR.set(t,i),i.mode&MM){case vM:if(e?.recursive)for(const i of BA.call(this,t,{_isIndirect:!0}))JA.call(this,xO(t,i),{...e,_isIndirect:!0});VA.call(this,t);break;case yM:case AM:case SM:case CM:EA.call(this,t);break;default:throw HR.clear(),new wO(bO.EPERM,"File type not supported",t,"rm")}e?._isIndirect||HR.clear()}}function ZA(t,e){const i="object"==typeof e?e?.encoding:e||"utf8",n="/tmp/"+`${t}${Date.now()}-${Math.random().toString(36).slice(2)}`;return YA.call(this,n),"buffer"==i?jR.Buffer.from(n):n}function ty(t,e,i){if(t=KO(t),e=KO(e),i&&i&nM&&TA(e))throw new wO(bO.EEXIST,"Destination file already exists.",e,"copyFile");SA.call(this,e,yA(t)),dA("rename",e.toString())}function ey(t,e,i){const n=QR(t);let s=0;for(const t of e)s+=n.readSync(t,0,t.byteLength,i+s);return s}function iy(t,e,i){const n=QR(t);let s=0;for(const t of e)s+=n.writeSync(new Uint8Array(t.buffer),0,t.byteLength,i+s);return s}function ny(t,e){return t=KO(t),new ay(t,this)}function sy(t,e,i){t=KO(t),e=KO(e);const n=gA.call(this,t);if(i?.errorOnExist&&TA.call(this,e))throw new wO(bO.EEXIST,"Destination file or directory already exists.",e,"cp");switch(n.mode&MM){case vM:if(!i?.recursive)throw new wO(bO.EISDIR,t+" is a directory (not copied)",t,"cp");YA.call(this,e,{recursive:!0});for(const n of BA.call(this,t,{withFileTypes:!0}))i.filter&&!i.filter(xO(t,n.name),xO(e,n.name))||sy.call(this,xO(t,n.name),xO(e,n.name),i);break;case yM:case AM:ty.call(this,t,e);break;default:throw new wO(bO.EPERM,"File type not supported",t,"rm")}i?.preserveTimestamps&&KA.call(this,e,n.atime,n.mtime)}function ry(t,e){t=KO(t);const{fs:i}=eA(t,this);return oA(i,e?.bigint)}class oy{get name(){return VO(this.path)}constructor(t,e){this.path=t,this.stats=e}get parentPath(){return this.path}isFile(){return this.stats.isFile()}isDirectory(){return this.stats.isDirectory()}isBlockDevice(){return this.stats.isBlockDevice()}isCharacterDevice(){return this.stats.isCharacterDevice()}isSymbolicLink(){return this.stats.isSymbolicLink()}isFIFO(){return this.stats.isFIFO()}isSocket(){return this.stats.isSocket()}}class ay{checkClosed(){if(this.closed)throw new wO(bO.EBADF,"Can not use closed Dir")}constructor(t,e){this.path=t,this.context=e,this.closed=!1}close(t){if(this.closed=!0,!t)return Promise.resolve();t()}closeSync(){this.closed=!0}async _read(){return this.checkClosed(),this._entries??(this._entries=await vy.call(this.context,this.path,{withFileTypes:!0})),this._entries.length?this._entries.shift()??null:null}read(t){if(!t)return this._read();this._read().then((e=>t(void 0,e)))}readSync(){return this.checkClosed(),this._entries??(this._entries=BA.call(this.context,this.path,{withFileTypes:!0})),this._entries.length?this._entries.shift()??null:null}async next(){const t=await this._read();return t?{done:!1,value:t}:(await this.close(),{done:!0,value:void 0})}[Symbol.asyncIterator](){return this}}var ly=__webpack_require__(6248);class uy extends ly.Readable{close(t=()=>null){try{super.destroy(),super.emit("close"),t()}catch(e){t(new wO(bO.EIO,e.toString()))}}}class py extends ly.Writable{close(t=()=>null){try{super.destroy(),super.emit("close"),t()}catch(e){t(new wO(bO.EIO,e.toString()))}}}var hy=function(t,e,i){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var n,s;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],i&&(s=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:n,async:i})}else i&&t.stack.push({async:!0});return e},dy=function(t){return function(e){function i(i){e.error=e.hasError?new t(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}return function t(){for(;e.stack.length;){var n=e.stack.pop();try{var s=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(s).then(t,(function(e){return i(e),t()}))}catch(t){i(t)}}if(e.hasError)throw e.error}()}}("function"==typeof SuppressedError?SuppressedError:function(t,e,i){var n=new Error(i);return n.name="SuppressedError",n.error=t,n.suppressed=e,n});class cy{constructor(t,e){this.context=e;const i="number"!=typeof t;this.fd=i?$R(t):t,this.file=i?t:QR(t)}async chown(t,e){await this.file.chown(t,e),dA("change",this.file.path)}async chmod(t){const e=jO(t,-1);if(e<0)throw new wO(bO.EINVAL,"Invalid mode.");await this.file.chmod(e),dA("change",this.file.path)}datasync(){return this.file.datasync()}sync(){return this.file.sync()}async truncate(t){if(t||(t=0),t<0)throw new wO(bO.EINVAL);await this.file.truncate(t),dA("change",this.file.path)}async utimes(t,e){await this.file.utimes(qO(t),qO(e)),dA("change",this.file.path)}async appendFile(t,e={}){const i=zO(e,"utf8","a",420);if(!oR(eR(i.flag)))throw new wO(bO.EINVAL,"Flag passed to appendFile must allow for appending.");if("string"!=typeof t&&!i.encoding)throw new wO(bO.EINVAL,"Encoding not specified");const n="string"==typeof t?jR.Buffer.from(t,i.encoding):t;await this.file.write(n,0,n.length),dA("change",this.file.path)}read(t,e,i,n){return isNaN(+n)&&(n=this.file.position),this.file.read(t,e,i,n)}async readFile(t){const e=zO(t,null,"r",292);if(!nR(eR(e.flag)))throw new wO(bO.EINVAL,"Flag passed must allow for reading.");const{size:i}=await this.stat(),{buffer:n}=await this.file.read(new Uint8Array(i),0,i,0),s=jR.Buffer.from(n);return e.encoding?s.toString(e.encoding):s}readableWebStream(t={}){const e=globalThis;if(!("ReadableStream"in e))throw new wO(bO.ENOSYS,"ReadableStream is missing on globalThis");return new e.ReadableStream({start:async t=>{try{const e=65536,i=1e7;let n=0,s=0,r=NaN;for(;r>0;){const o=await this.read(new Uint8Array(e),0,e,s);if(!o.bytesRead)return void t.close();if(t.enqueue(o.buffer.slice(0,o.bytesRead)),s+=o.bytesRead,++n>=i)throw new wO(bO.EFBIG,"Too many iterations on readable stream",this.file.path,"FileHandle.readableWebStream");r=o.bytesRead}}catch(e){t.error(e)}},type:t.type})}readLines(t){throw wO.With("ENOSYS",this.file.path,"FileHandle.readLines")}[Symbol.asyncDispose](){return this.close()}async stat(t){const e=await this.file.stat();if(qM.checkAccess&&!e.hasAccess(tM,this.context))throw wO.With("EACCES",this.file.path,"stat");return t?.bigint?new QM(e):e}async write(t,e,i,n){let s,r,o;if("string"==typeof t){n="number"==typeof e?e:null;const a="string"==typeof i?i:"utf8";r=0,s=jR.Buffer.from(t,a),o=s.length}else s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),r=e,o=i,n="number"==typeof n?n:null;n??(n=this.file.position);const a=await this.file.write(s,r,o,n);return dA("change",this.file.path),{buffer:s,bytesWritten:a}}async writeFile(t,e={}){const i=zO(e,"utf8","w",420);if(!sR(eR(i.flag)))throw new wO(bO.EINVAL,"Flag passed must allow for writing.");if("string"!=typeof t&&!i.encoding)throw new wO(bO.EINVAL,"Encoding not specified");const n="string"==typeof t?jR.Buffer.from(t,i.encoding):t;await this.file.write(n,0,n.length,0),dA("change",this.file.path)}async close(){await this.file.close(),KR.delete(this.fd)}async writev(t,e){let i=0;for(const n of t)i+=(await this.write(n,0,n.length,e+i)).bytesWritten;return{bytesWritten:i,buffers:t}}async readv(t,e){let i=0;for(const n of t)i+=(await this.read(n,0,n.byteLength,e+i)).bytesRead;return{bytesRead:i,buffers:t}}createReadStream(t){const e=new uy({highWaterMark:t?.highWaterMark||65536,encoding:t.encoding,read:async t=>{try{const i=await this.read(new Uint8Array(t),0,t,this.file.position);e.push(i.bytesRead?i.buffer.slice(0,i.bytesRead):null),this.file.position+=i.bytesRead}catch(t){e.destroy(t)}}});return e.path=this.file.path,e}createWriteStream(t){const e=new py({highWaterMark:t?.highWaterMark,encoding:t?.encoding,write:async(t,e,i)=>{try{const{bytesWritten:n}=await this.write(t,null,e);i(n==t.length?null:new Error("Failed to write full chunk"))}catch(t){i(t)}}});return e.path=this.file.path,e}}async function _y(t,e){t=KO(t),e=KO(e);const i=eA(t,this),n=eA(e,this);if(qM.checkAccess&&!(await Ty.call(this,kO(t))).hasAccess(eM,this))throw wO.With("EACCES",t,"rename");try{if(i.mountPoint==n.mountPoint)return await i.fs.rename(i.path,n.path),dA("rename",t.toString()),void dA("change",e.toString());await Ry.call(this,e,await My(t)),await Iy.call(this,t),dA("rename",t.toString())}catch(s){throw sA(s,{[i.path]:t,[n.path]:e})}}async function fy(t){try{const{fs:e,path:i}=eA(await ky.call(this,t),this);return await e.exists(i)}catch(t){if(t instanceof wO&&"ENOENT"==t.code)return!1;throw t}}async function Ty(t,e){t=KO(t);const{fs:i,path:n}=eA(await ky.call(this,t),this);try{const t=await i.stat(n);if(qM.checkAccess&&!t.hasAccess(tM,this))throw wO.With("EACCES",n,"stat");return e?.bigint?new QM(t):t}catch(e){throw sA(e,{[n]:t})}}async function my(t,e){t=KO(t);const{fs:i,path:n}=eA(t,this);try{const t=await i.stat(n);return e?.bigint?new QM(t):t}catch(e){throw sA(e,{[n]:t})}}async function gy(t,e=0){const i={stack:[],error:void 0,hasError:!1};try{const n=hy(i,await Oy.call(this,t,"r+"),!0);await n.truncate(e)}catch(t){i.error=t,i.hasError=!0}finally{const t=dy(i);t&&await t}}async function Iy(t){t=KO(t);const{fs:e,path:i}=eA(t,this);try{if(qM.checkAccess&&!(await(HR.getAsync(t)||e.stat(i))).hasAccess(eM,this))throw wO.With("EACCES",i,"unlink");await e.unlink(i),dA("rename",t.toString())}catch(e){throw sA(e,{[i]:t})}}async function Ey(t,e,i=420,n){t=KO(t);const s=jO(i,420),r=eR(e);t=n?await ky.call(this,t):t;const{fs:o,path:a}=eA(t,this),l=await o.stat(a).catch((()=>null));if(!l){if(!sR(r)&&!oR(r)||"r+"==r)throw wO.With("ENOENT",t,"_open");const e=await o.stat(kO(a));if(qM.checkAccess&&!e.hasAccess(eM,this))throw wO.With("EACCES",kO(t),"_open");if(!e.isDirectory())throw wO.With("ENOTDIR",kO(t),"_open");return new cy(await o.createFile(a,r,s),this)}if(qM.checkAccess&&!l.hasAccess(iR(r),this))throw wO.With("EACCES",t,"_open");if(aR(r))throw wO.With("EEXIST",t,"_open");const u=new cy(await o.openFile(a,r),this);return rR(r)&&await u.truncate(0),u}async function Oy(t,e="r",i=420){return await Ey.call(this,t,e,i,!0)}async function My(t,e){const i={stack:[],error:void 0,hasError:!1};try{const n=zO(e,null,"r",420),s=hy(i,"object"==typeof t&&"fd"in t?t:await Oy.call(this,t,n.flag,n.mode),!0);return await s.readFile(n)}catch(t){i.error=t,i.hasError=!0}finally{const t=dy(i);t&&await t}}async function Ry(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{const s=zO(i,"utf8","w+",420),r=hy(n,t instanceof cy?t:await Oy.call(this,t.toString(),s.flag,s.mode),!0),o=e;if("string"!=typeof o&&!(o instanceof Uint8Array))throw new wO(bO.EINVAL,"Iterables and streams not supported",r.file.path,"writeFile");await r.writeFile(o,s)}catch(t){n.error=t,n.hasError=!0}finally{const t=dy(n);t&&await t}}async function Ay(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{const s=zO(i,"utf8","a",420);if(!oR(eR(s.flag)))throw new wO(bO.EINVAL,"Flag passed to appendFile must allow for appending.");if("string"!=typeof e&&!s.encoding)throw new wO(bO.EINVAL,"Encoding not specified");const r="string"==typeof e?jR.Buffer.from(e,s.encoding):new Uint8Array(e.buffer,e.byteOffset,e.byteLength),o=hy(n,"object"==typeof t&&"fd"in t?t:await Oy.call(this,t,s.flag,s.mode),!0);await o.appendFile(r,s)}catch(t){n.error=t,n.hasError=!0}finally{const t=dy(n);t&&await t}}async function yy(t){t=await ky.call(this,t);const{fs:e,path:i}=eA(t,this);try{const n=await(HR.getAsync(t)||e.stat(i));if(!n)throw wO.With("ENOENT",t,"rmdir");if(!n.isDirectory())throw wO.With("ENOTDIR",i,"rmdir");if(qM.checkAccess&&!n.hasAccess(eM,this))throw wO.With("EACCES",i,"rmdir");await e.rmdir(i),dA("rename",t.toString())}catch(e){throw sA(e,{[i]:t})}}async function Sy(t,e){e="object"==typeof e?e:{mode:e};const i=jO(e?.mode,511);t=await ky.call(this,t);const{fs:n,path:s,root:r}=eA(t,this),o={[s]:t};try{if(!e?.recursive){if(qM.checkAccess&&!(await n.stat(kO(s))).hasAccess(eM,this))throw wO.With("EACCES",kO(s),"mkdir");return await n.mkdir(s,i),void dA("rename",t.toString())}const a=[];for(let e=s,i=t;!await n.exists(e);e=kO(e),i=kO(i))a.unshift(e),o[e]=i;for(const t of a){if(qM.checkAccess&&!(await n.stat(kO(t))).hasAccess(eM,this))throw wO.With("EACCES",kO(t),"mkdir");await n.mkdir(t,i),dA("rename",t)}return 1==r.length?a[0]:a[0]?.slice(r.length)}catch(t){throw sA(t,o)}}async function vy(t,e){e="object"==typeof e?e:{encoding:e},t=await ky.call(this,t);const i=e=>{throw sA(e,{[s]:t})},{fs:n,path:s}=eA(t,this),r=HR.getAsync(t)||n.stat(s).catch(i);HR.setAsync(t,r);const o=await r;if(!o)throw wO.With("ENOENT",t,"readdir");if(qM.checkAccess&&!o.hasAccess(tM,this))throw wO.With("EACCES",t,"readdir");if(!o.isDirectory())throw wO.With("ENOTDIR",t,"readdir");const a=await n.readdir(s).catch(i),l=[];return await Promise.all(a.map((async r=>{let o;if(e?.recursive||e?.withFileTypes){const e=HR.getAsync(xO(t,r))||n.stat(xO(s,r)).catch(i);HR.setAsync(xO(t,r),e),o=await e}if(e?.withFileTypes?l.push(new oy(r,o)):"buffer"==e?.encoding?l.push(jR.Buffer.from(r)):l.push(r),e?.recursive&&o?.isDirectory())for(const i of await vy.call(this,xO(t,r),{...e,_isIndirect:!0}))i instanceof oy?(i.path=xO(r,i.path),l.push(i)):jR.Buffer.isBuffer(i)?l.push(jR.Buffer.from(xO(r,GO(i)))):l.push(xO(r,i))}))),e?._isIndirect||HR.clear(),l}async function Cy(t,e){t=KO(t),e=KO(e);const{fs:i,path:n}=eA(t,this),s=eA(e,this);if(i!=s.fs)throw wO.With("EXDEV",e,"link");try{if(qM.checkAccess&&!(await i.stat(kO(t))).hasAccess(tM,this))throw wO.With("EACCES",kO(n),"link");if(qM.checkAccess&&!(await Ty.call(this,kO(e))).hasAccess(eM,this))throw wO.With("EACCES",kO(e),"link");if(qM.checkAccess&&!(await i.stat(n)).hasAccess(tM,this))throw wO.With("EACCES",n,"link");return await i.link(n,s.path)}catch(i){throw sA(i,{[s.path]:e,[n]:t})}}async function Ly(t,e,i="file"){const n={stack:[],error:void 0,hasError:!1};try{if(!["file","dir","junction"].includes(i))throw new wO(bO.EINVAL,"Invalid symlink type: "+i);if(await fy.call(this,e))throw wO.With("EEXIST",e.toString(),"symlink");const s=hy(n,await Ey.call(this,e,"w+",420,!1),!0);await s.writeFile(t.toString()),await s.file.chmod(AM)}catch(t){n.error=t,n.hasError=!0}finally{const t=dy(n);t&&await t}}async function by(t,e){const i={stack:[],error:void 0,hasError:!1};try{const n=hy(i,await Ey.call(this,KO(t),"r",420,!1),!0),s=await n.readFile(),r="object"==typeof e?e?.encoding:e;return"buffer"==r?s:s.toString(r)}catch(t){i.error=t,i.hasError=!0}finally{const t=dy(i);t&&await t}}async function Dy(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{const s=hy(n,await Oy.call(this,t,"r+"),!0);await s.chown(e,i)}catch(t){n.error=t,n.hasError=!0}finally{const t=dy(n);t&&await t}}async function wy(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{const s=hy(n,await Ey.call(this,t,"r+",420,!1),!0);await s.chown(e,i)}catch(t){n.error=t,n.hasError=!0}finally{const t=dy(n);t&&await t}}async function Ny(t,e){const i={stack:[],error:void 0,hasError:!1};try{const n=hy(i,await Oy.call(this,t,"r+"),!0);await n.chmod(e)}catch(t){i.error=t,i.hasError=!0}finally{const t=dy(i);t&&await t}}async function Fy(t,e){const i={stack:[],error:void 0,hasError:!1};try{const n=hy(i,await Ey.call(this,t,"r+",420,!1),!0);await n.chmod(e)}catch(t){i.error=t,i.hasError=!0}finally{const t=dy(i);t&&await t}}async function Py(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{const s=hy(n,await Oy.call(this,t,"r+"),!0);await s.utimes(e,i)}catch(t){n.error=t,n.hasError=!0}finally{const t=dy(n);t&&await t}}async function xy(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{const s=hy(n,await Ey.call(this,t,"r+",420,!1),!0);await s.utimes(new Date(e),new Date(i))}catch(t){n.error=t,n.hasError=!0}finally{const t=dy(n);t&&await t}}async function ky(t,e){t=KO(t);const i=(this?.root||"")+t;if(WR.hasAsync(i))return WR.getAsync(i);const{base:n,dir:s}=YO(t),r="/"==s?"/":await(WR.getAsync((this?.root||"")+s)||ky.call(this,s)),o=xO(r,n),{fs:a,path:l}=eA(o,this);try{const e=HR.getAsync(o)||a.stat(l);if(HR.setAsync(o,e),!(await e).isSymbolicLink())return WR.set(t,o),o;const n=PO(r,(await by.call(this,o)).toString()),s=WR.getAsync((this?.root||"")+n)||ky.call(this,n);return WR.setAsync(i,s),await s}catch(e){if("ENOENT"==e.code)return t;throw sA(e,{[l]:o})}}function Vy(t,e={}){return{[Symbol.asyncIterator](){const i=new uA(t.toString(),"string"!=typeof e?e:{encoding:e}),n=[];function s(){i.close();for(const t of n)t({value:null,done:!0});return n.length=0,Promise.resolve({value:null,done:!0})}return i.on("change",((t,e)=>{n.shift()?.({value:{eventType:t,filename:e},done:!1})})),{async next(){const{promise:t,resolve:e}=Promise.withResolvers();return n.push(e),t},return:s,throw:s}}}}async function Yy(t,e=ZO){if(!qM.checkAccess)return;if(!(await Ty.call(this,t)).hasAccess(e,this))throw new wO(bO.EACCES)}async function By(t,e){t=KO(t);const i=await(HR.getAsync(t)||my.call(this,t).catch((t=>{if("ENOENT"!=t.code||!e?.force)throw t})));if(i){switch(HR.set(t,i),i.mode&MM){case vM:if(e?.recursive)for(const i of await vy.call(this,t,{_isIndirect:!0}))await By.call(this,xO(t,i),{...e,_isIndirect:!0});await yy.call(this,t);break;case yM:case AM:case SM:case CM:await Iy.call(this,t);break;default:throw HR.clear(),new wO(bO.EPERM,"File type not supported",t,"rm")}e?._isIndirect||HR.clear()}}async function Uy(t,e){const i="object"==typeof e?e?.encoding:e||"utf8",n="/tmp/"+`${t}${Date.now()}-${Math.random().toString(36).slice(2)}`;return await Sy.call(this,n),"buffer"==i?jR.Buffer.from(n):n}async function Xy(t,e,i){if(t=KO(t),e=KO(e),i&&i&nM&&await fy.call(this,e))throw new wO(bO.EEXIST,"Destination file already exists.",e,"copyFile");await Ry.call(this,e,await My.call(this,t)),dA("rename",e.toString())}function Gy(t,e){return t=KO(t),Promise.resolve(new ay(t,this))}async function Hy(t,e,i){t=KO(t),e=KO(e);const n=await my.call(this,t);if(i?.errorOnExist&&await fy.call(this,e))throw new wO(bO.EEXIST,"Destination file or directory already exists.",e,"cp");switch(n.mode&MM){case vM:{if(!i?.recursive)throw new wO(bO.EISDIR,t+" is a directory (not copied)",t,"cp");const[n]=await Promise.all([vy.call(this,t,{withFileTypes:!0}),Sy.call(this,e,{recursive:!0})]),s=async n=>{i.filter&&!i.filter(xO(t,n.name),xO(e,n.name))||await Hy.call(this,xO(t,n.name),xO(e,n.name),i)};await Promise.all(n.map(s));break}case yM:case AM:await Xy.call(this,t,e);break;default:throw new wO(bO.EPERM,"File type not supported",t,"rm")}i?.preserveTimestamps&&await Py.call(this,e,n.atime,n.mtime)}async function Wy(t,e){t=KO(t);const{fs:i}=eA(t,this);return Promise.resolve(oA(i,e?.bigint))}const jy=()=>{};function qy(t,e,i=jy){_y.call(this,t,e).then((()=>i())).catch(i)}function Ky(t,e=jy){fy.call(this,t).then(e).catch((()=>e(!1)))}function zy(t,e,i=jy){i="function"==typeof e?e:i,Ty.call(this,t,"function"!=typeof e?e:{}).then((t=>i(void 0,t))).catch(i)}function $y(t,e,i=jy){i="function"==typeof e?e:i,my.call(this,t,"function"!=typeof e?e:{}).then((t=>i(void 0,t))).catch(i)}function Qy(t,e=0,i=jy){i="function"==typeof e?e:i;const n="number"==typeof e?e:0;gy.call(this,t,n).then((()=>i())).catch(i)}function Jy(t,e=jy){Iy.call(this,t).then((()=>e())).catch(e)}function Zy(t,e,i,n=jy){const s=jO(i,420);n="function"==typeof i?i:n,Oy.call(this,t,e,s).then((t=>n(void 0,t.fd))).catch(n)}function tS(t,e,i=jy){i="function"==typeof e?e:i,My.call(this,t,"function"==typeof e?null:e).then((t=>i(void 0,t))).catch(i)}function eS(t,e,i,n=jy){n="function"==typeof i?i:n,Ry.call(this,t,e,"function"!=typeof i?i:null).then((()=>n(void 0))).catch(n)}function iS(t,e,i,n=jy){const s="function"!=typeof i?i:void 0;n="function"==typeof i?i:n,Ay.call(this,t,e,s).then((()=>n())).catch(n)}function nS(t,e,i=jy){i="function"==typeof e?e:i,QR(t).stat().then((t=>i(void 0,"object"==typeof e&&e?.bigint?new QM(t):t))).catch(i)}function sS(t,e=jy){const i=QR(t).close();KR.delete(t),i.then((()=>e())).catch(e)}function rS(t,e,i=jy){const n="number"==typeof e?e:0;i="function"==typeof e?e:i;const s=QR(t);if(n<0)throw new wO(bO.EINVAL);s.truncate(n).then((()=>i())).catch(i)}function oS(t,e=jy){QR(t).sync().then((()=>e())).catch(e)}function aS(t,e=jy){QR(t).datasync().then((()=>e())).catch(e)}function lS(t,e,i,n,s,r=jy){let o,a,l,u,p;const h=new cy(t,this);if("string"==typeof e){switch(p="utf8",typeof i){case"function":r=i;break;case"number":u=i,p="string"==typeof n?n:"utf8",r="function"==typeof s?s:r;break;default:return void(r="function"==typeof n?n:"function"==typeof s?s:r)(new wO(bO.EINVAL,"Invalid arguments."))}o=jR.Buffer.from(e),a=0,l=o.length;const t=r;h.write(o,a,l,u).then((({bytesWritten:e})=>t(void 0,e,o.toString(p)))).catch(t)}else{o=jR.Buffer.from(e.buffer),a=i,l=n,u="number"==typeof s?s:null;const t="function"==typeof s?s:r;h.write(o,a,l,u).then((({bytesWritten:e})=>t(void 0,e,o))).catch(t)}}function uS(t,e,i,n,s,r=jy){new cy(t,this).read(e,i,n,s).then((({bytesRead:t,buffer:e})=>r(void 0,t,e))).catch(r)}function pS(t,e,i,n=jy){new cy(t,this).chown(e,i).then((()=>n())).catch(n)}function hS(t,e,i){new cy(t,this).chmod(e).then((()=>i())).catch(i)}function dS(t,e,i,n=jy){new cy(t,this).utimes(e,i).then((()=>n())).catch(n)}function cS(t,e=jy){yy.call(this,t).then((()=>e())).catch(e)}function _S(t,e,i=jy){Sy.call(this,t,e).then((()=>i())).catch(i)}function fS(t,e,i=jy){i="function"==typeof e?e:i;const n="function"!=typeof e?e:{};vy.call(this,t,n).then((t=>i(void 0,t))).catch(i)}function TS(t,e,i=jy){Cy.call(this,t,e).then((()=>i())).catch(i)}function mS(t,e,i,n=jy){const s="string"==typeof i?i:"file";n="function"==typeof i?i:n,Ly.call(this,t,e,s).then((()=>n())).catch(n)}function gS(t,e,i=jy){i="function"==typeof e?e:i,by.call(this,t).then((t=>i(void 0,t))).catch(i)}function IS(t,e,i,n=jy){Dy.call(this,t,e,i).then((()=>n())).catch(n)}function ES(t,e,i,n=jy){wy.call(this,t,e,i).then((()=>n())).catch(n)}function OS(t,e,i=jy){Ny.call(this,t,e).then((()=>i())).catch(i)}function MS(t,e,i=jy){Fy.call(this,t,e).then((()=>i())).catch(i)}function RS(t,e,i,n=jy){Py.call(this,t,e,i).then((()=>n())).catch(n)}function AS(t,e,i,n=jy){xy.call(this,t,e,i).then((()=>n())).catch(n)}function yS(t,e,i=jy){i="function"==typeof e?e:i,ky.call(this,t,"function"==typeof e?null:e).then((t=>i(void 0,t))).catch(i)}function SS(t,e,i=jy){const n="number"==typeof e?e:tM;i="function"==typeof e?e:i,Yy.call(this,t,n).then((()=>i())).catch(i)}const vS=new Map;function CS(t,e,i){const n=KO(t.toString()),s="function"!=typeof e?e:{};if("function"==typeof e&&(i=e),!i)throw new wO(bO.EINVAL,"No listener specified",t.toString(),"watchFile");if(vS.has(n)){const t=vS.get(n);return void(t&&t.listeners.add(i))}const r=new pA(n,s);r.on("change",((t,e)=>{const i=vS.get(n);if(i)for(const n of i.listeners)n(t,e)})),vS.set(n,{watcher:r,listeners:new Set})}function LS(t,e=jy){const i=KO(t.toString()),n=vS.get(i);n&&(e&&e!==jy?n.listeners.delete(e):n.listeners.clear(),0===n.listeners.size&&(n.watcher.stop(),vS.delete(i)))}function bS(t,e,i){const n=new uA(KO(t),"object"==typeof e?e:{});return i="function"==typeof e?e:i,n.on("change",i||jy),n}function DS(t,e){const i=this;let n;const s=new uy({highWaterMark:(e="object"==typeof e?e:{encoding:e}).highWaterMark||65536,encoding:e.encoding||"utf8",async read(r){try{n||(n=await Oy.call(i,t,"r",e?.mode));const o=await n.read(new Uint8Array(r),0,r,n.file.position);s.push(o.bytesRead?o.buffer.slice(0,o.bytesRead):null),n.file.position+=o.bytesRead,o.bytesRead||await n.close()}catch(t){await(n?.close()),s.destroy(t)}},destroy(t,e){n?.close().then((()=>e(t))).catch(jy)}});return s.path=t.toString(),s}function wS(t,e){const i=this;let n;e="object"==typeof e?e:{encoding:e};const s=new py({highWaterMark:e?.highWaterMark,async write(s,r,o){try{n||(n=await Oy.call(i,t,"w",e?.mode||438)),await n.write(s,0,r),o(void 0)}catch(t){await(n?.close()),o(t)}},destroy(t,e){e(t),n?.close().then((()=>e(t))).catch(e)},final(t){n?.close().then((()=>t())).catch(t)}});return s.path=t.toString(),s}function NS(t,e,i=jy){i="function"==typeof e?e:i,By.call(this,t,"function"==typeof e?void 0:e).then((()=>i(void 0))).catch(i)}function FS(t,e,i=jy){i="function"==typeof e?e:i,Uy.call(this,t,"function"!=typeof e?e:null).then((t=>i(void 0,t))).catch(i)}function PS(t,e,i,n=jy){n="function"==typeof i?i:n,Xy.call(this,t,e,"function"==typeof i?void 0:i).then((()=>n(void 0))).catch(n)}function xS(t,e,i,n=jy){n="function"==typeof i?i:n,new cy(t,this).readv(e,"function"==typeof i?void 0:i).then((({buffers:t,bytesRead:e})=>n(void 0,e,t))).catch(n)}function kS(t,e,i,n=jy){n="function"==typeof i?i:n,new cy(t,this).writev(e,"function"==typeof i?void 0:i).then((({buffers:t,bytesWritten:e})=>n(void 0,e,t))).catch(n)}function VS(t,e,i=jy){i="function"==typeof e?e:i,Gy.call(this,t,"function"==typeof e?void 0:e).then((t=>i(void 0,t))).catch(i)}function YS(t,e,i,n=jy){n="function"==typeof i?i:n,Hy.call(this,t,e,"function"==typeof i?void 0:i).then((()=>n(void 0))).catch(n)}function BS(t,e,i=jy){i="function"==typeof e?e:i,Wy.call(this,t,"function"==typeof e?void 0:e).then((t=>i(void 0,t))).catch(i)}async function US(t,e){const i=await Oy.call(this,t.toString(),"r"),n=await i.readFile();return await i.close(),new Blob([n],e)}var XS=function(t,e,i){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var n,s;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],i&&(s=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:n,async:i})}else i&&t.stack.push({async:!0});return e},GS=function(t){return function(e){function i(i){e.error=e.hasError?new t(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}return function t(){for(;e.stack.length;){var n=e.stack.pop();try{var s=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(s).then(t,(function(e){return i(e),t()}))}catch(t){i(t)}}if(e.hasError)throw e.error}()}}("function"==typeof SuppressedError?SuppressedError:function(t,e,i){var n=new Error(i);return n.name="SuppressedError",n.error=t,n.suppressed=e,n});function HS(t){return class extends t{constructor(){super(...arguments),this._queue=[],this._isInitialized=!1}get _queueRunning(){return!!this._queue.length}queueDone(){return new Promise((t=>{const e=()=>this._queueRunning?setTimeout(e):t();e()}))}async ready(){if(await super.ready(),await this.queueDone(),!this._isInitialized&&!this._disableSync){if(this.checkSync(),await this._sync.ready(),this._sync instanceof kR&&this instanceof kR){const t=this._sync.store.transaction(),e=this.store.transaction(),i=[];for(const n of await e.keys())i.push(e.get(n).then((e=>t.setSync(n,e))));return await Promise.all(i),void(this._isInitialized=!0)}try{await this.crossCopy("/"),this._isInitialized=!0}catch(t){throw this._isInitialized=!1,t}}}checkSync(t,e){if(this._disableSync)throw new wO(bO.ENOTSUP,"Sync caching has been disabled for this async file system",t,e);if(!this._sync)throw new wO(bO.ENOTSUP,"No sync cache is attached to this async file system",t,e)}renameSync(t,e){this.checkSync(t,"rename"),this._sync.renameSync(t,e),this.queue("rename",t,e)}statSync(t){return this.checkSync(t,"stat"),this._sync.statSync(t)}createFileSync(t,e,i){return this.checkSync(t,"createFile"),this._sync.createFileSync(t,e,i),this.queue("createFile",t,e,i),this.openFileSync(t,e)}openFileSync(t,e){this.checkSync(t,"openFile");const i=this._sync.openFileSync(t,e+"+"),n=i.statSync(),s=new Uint8Array(n.size);return i.readSync(s),new uR(this,t,e,n,s)}unlinkSync(t){this.checkSync(t,"unlinkSync"),this._sync.unlinkSync(t),this.queue("unlink",t)}rmdirSync(t){this.checkSync(t,"rmdir"),this._sync.rmdirSync(t),this.queue("rmdir",t)}mkdirSync(t,e){this.checkSync(t,"mkdir"),this._sync.mkdirSync(t,e),this.queue("mkdir",t,e)}readdirSync(t){return this.checkSync(t,"readdir"),this._sync.readdirSync(t)}linkSync(t,e){this.checkSync(t,"link"),this._sync.linkSync(t,e),this.queue("link",t,e)}syncSync(t,e,i){this.checkSync(t,"sync"),this._sync.syncSync(t,e,i),this.queue("sync",t,e,i)}existsSync(t){return this.checkSync(t,"exists"),this._sync.existsSync(t)}async crossCopy(t){this.checkSync(t,"crossCopy");const e=await this.stat(t);if(!e.isDirectory()){const i={stack:[],error:void 0,hasError:!1};try{const n=XS(i,await this.openFile(t,eR("r")),!0),s=XS(i,this._sync.createFileSync(t,eR("w"),e.mode),!1),r=new Uint8Array(e.size);return await n.read(r),void s.writeSync(r,0,e.size)}catch(t){i.error=t,i.hasError=!0}finally{const t=GS(i);t&&await t}}if("/"!==t){const e=await this.stat(t);this._sync.mkdirSync(t,e.mode)}const i=[];for(const e of await this.readdir(t))i.push(this.crossCopy(xO(t,e)));await Promise.all(i)}async _next(){if(!this._queueRunning)return;const[t,...e]=this._queue.shift();await this[t](...e),await this._next()}queue(...t){this._queue.push(t),this._next()}}}new Map;HS(pR);new Map;Map;WS=pR;var WS;var jS=function(t,e,i){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var n,s;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],i&&(s=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:n,async:i})}else i&&t.stack.push({async:!0});return e},qS=function(t){return function(e){function i(i){e.error=e.hasError?new t(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}return function t(){for(;e.stack.length;){var n=e.stack.pop();try{var s=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(s).then(t,(function(e){return i(e),t()}))}catch(t){i(t)}}if(e.hasError)throw e.error}()}}("function"==typeof SuppressedError?SuppressedError:function(t,e,i){var n=new Error(i);return n.name="SuppressedError",n.error=t,n.suppressed=e,n});class KS{get isLocked(){return this._isLocked}constructor(t){this.previous=t,this.current=Promise.withResolvers(),this._isLocked=!0}async done(){await(this.previous?.done()),await this.current.promise}unlock(){this.current.resolve(),this._isLocked=!1}[Symbol.dispose](){this.unlock()}}class zS{async ready(){return await this._fs.ready()}metadata(){return this._fs.metadata()}addLock(){const t=new KS(this.currentLock);return this.currentLock=t,t}async lock(t,e){const i=this.currentLock,n=this.addLock(),s=(new Error).stack;return setTimeout((()=>{if(n.isLocked){const i=wO.With("EDEADLK",t,e);throw i.stack+=s?.slice(5),i}}),5e3),await(i?.done()),n}lockSync(t,e){if(this.currentLock?.isLocked)throw wO.With("EBUSY",t,e);return this.addLock()}get isLocked(){return!!this.currentLock?.isLocked}async rename(t,e){const i={stack:[],error:void 0,hasError:!1};try{jS(i,await this.lock(t,"rename"),!1);await this._fs.rename(t,e)}catch(t){i.error=t,i.hasError=!0}finally{qS(i)}}renameSync(t,e){const i={stack:[],error:void 0,hasError:!1};try{jS(i,this.lockSync(t,"rename"),!1);return this._fs.renameSync(t,e)}catch(t){i.error=t,i.hasError=!0}finally{qS(i)}}async stat(t){const e={stack:[],error:void 0,hasError:!1};try{jS(e,await this.lock(t,"stat"),!1);return await this._fs.stat(t)}catch(t){e.error=t,e.hasError=!0}finally{qS(e)}}statSync(t){const e={stack:[],error:void 0,hasError:!1};try{jS(e,this.lockSync(t,"stat"),!1);return this._fs.statSync(t)}catch(t){e.error=t,e.hasError=!0}finally{qS(e)}}async openFile(t,e){const i={stack:[],error:void 0,hasError:!1};try{jS(i,await this.lock(t,"openFile"),!1);const n=await this._fs.openFile(t,e);return n.fs=this,n}catch(t){i.error=t,i.hasError=!0}finally{qS(i)}}openFileSync(t,e){const i={stack:[],error:void 0,hasError:!1};try{jS(i,this.lockSync(t,"openFile"),!1);const n=this._fs.openFileSync(t,e);return n.fs=this,n}catch(t){i.error=t,i.hasError=!0}finally{qS(i)}}async createFile(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{jS(n,await this.lock(t,"createFile"),!1);const s=await this._fs.createFile(t,e,i);return s.fs=this,s}catch(t){n.error=t,n.hasError=!0}finally{qS(n)}}createFileSync(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{jS(n,this.lockSync(t,"createFile"),!1);const s=this._fs.createFileSync(t,e,i);return s.fs=this,s}catch(t){n.error=t,n.hasError=!0}finally{qS(n)}}async unlink(t){const e={stack:[],error:void 0,hasError:!1};try{jS(e,await this.lock(t,"unlink"),!1);await this._fs.unlink(t)}catch(t){e.error=t,e.hasError=!0}finally{qS(e)}}unlinkSync(t){const e={stack:[],error:void 0,hasError:!1};try{jS(e,this.lockSync(t,"unlink"),!1);return this._fs.unlinkSync(t)}catch(t){e.error=t,e.hasError=!0}finally{qS(e)}}async rmdir(t){const e={stack:[],error:void 0,hasError:!1};try{jS(e,await this.lock(t,"rmdir"),!1);await this._fs.rmdir(t)}catch(t){e.error=t,e.hasError=!0}finally{qS(e)}}rmdirSync(t){const e={stack:[],error:void 0,hasError:!1};try{jS(e,this.lockSync(t,"rmdir"),!1);return this._fs.rmdirSync(t)}catch(t){e.error=t,e.hasError=!0}finally{qS(e)}}async mkdir(t,e){const i={stack:[],error:void 0,hasError:!1};try{jS(i,await this.lock(t,"mkdir"),!1);await this._fs.mkdir(t,e)}catch(t){i.error=t,i.hasError=!0}finally{qS(i)}}mkdirSync(t,e){const i={stack:[],error:void 0,hasError:!1};try{jS(i,this.lockSync(t,"mkdir"),!1);return this._fs.mkdirSync(t,e)}catch(t){i.error=t,i.hasError=!0}finally{qS(i)}}async readdir(t){const e={stack:[],error:void 0,hasError:!1};try{jS(e,await this.lock(t,"readdir"),!1);return await this._fs.readdir(t)}catch(t){e.error=t,e.hasError=!0}finally{qS(e)}}readdirSync(t){const e={stack:[],error:void 0,hasError:!1};try{jS(e,this.lockSync(t,"readdir"),!1);return this._fs.readdirSync(t)}catch(t){e.error=t,e.hasError=!0}finally{qS(e)}}async exists(t){const e={stack:[],error:void 0,hasError:!1};try{jS(e,await this.lock(t,"exists"),!1);return await this._fs.exists(t)}catch(t){e.error=t,e.hasError=!0}finally{qS(e)}}existsSync(t){const e={stack:[],error:void 0,hasError:!1};try{jS(e,this.lockSync(t,"exists"),!1);return this._fs.existsSync(t)}catch(t){e.error=t,e.hasError=!0}finally{qS(e)}}async link(t,e){const i={stack:[],error:void 0,hasError:!1};try{jS(i,await this.lock(t,"link"),!1);await this._fs.link(t,e)}catch(t){i.error=t,i.hasError=!0}finally{qS(i)}}linkSync(t,e){const i={stack:[],error:void 0,hasError:!1};try{jS(i,this.lockSync(t,"link"),!1);return this._fs.linkSync(t,e)}catch(t){i.error=t,i.hasError=!0}finally{qS(i)}}async sync(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{jS(n,await this.lock(t,"sync"),!1);await this._fs.sync(t,e,i)}catch(t){n.error=t,n.hasError=!0}finally{qS(n)}}syncSync(t,e,i){const n={stack:[],error:void 0,hasError:!1};try{jS(n,this.lockSync(t,"sync"),!1);return this._fs.syncSync(t,e,i)}catch(t){n.error=t,n.hasError=!0}finally{qS(n)}}}var $S=function(t,e,i){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var n,s;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],i&&(s=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:n,async:i})}else i&&t.stack.push({async:!0});return e},QS=function(t){return function(e){function i(i){e.error=e.hasError?new t(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}return function t(){for(;e.stack.length;){var n=e.stack.pop();try{var s=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(s).then(t,(function(e){return i(e),t()}))}catch(t){i(t)}}if(e.hasError)throw e.error}()}}("function"==typeof SuppressedError?SuppressedError:function(t,e,i){var n=new Error(i);return n.name="SuppressedError",n.error=t,n.suppressed=e,n});const JS="/.deleted";class ZS extends pR{async ready(){await this.readable.ready(),await this.writable.ready(),await this._ready}constructor({writable:t,readable:e}){if(super(),this._isInitialized=!1,this._deletedFiles=new Set,this._deleteLog="",this._deleteLogUpdatePending=!1,this._deleteLogUpdateNeeded=!1,this.writable=t,this.readable=e,this.writable.metadata().readonly)throw new wO(bO.EINVAL,"Writable file system must be writable.");this._ready=this._initialize()}metadata(){return{...super.metadata(),name:tv.name}}async sync(t,e,i){await this.copyForWrite(t),await this.writable.exists(t)||await this.writable.createFile(t,"w",420),await this.writable.sync(t,e,i)}syncSync(t,e,i){this.copyForWriteSync(t),this.writable.syncSync(t,e,i)}async _initialize(){if(!this._isInitialized){try{const t=await this.writable.openFile(JS,eR("r")),{size:e}=await t.stat(),{buffer:i}=await t.read(new Uint8Array(e));this._deleteLog=GO(i)}catch(t){if(t.errno!==bO.ENOENT)throw t}this._isInitialized=!0,this._reparseDeletionLog()}}getDeletionLog(){return this._deleteLog}async restoreDeletionLog(t){this._deleteLog=t,this._reparseDeletionLog(),await this.updateLog("")}async rename(t,e){this.checkInitialized(),this.checkPath(t),this.checkPath(e),await this.copyForWrite(t);try{await this.writable.rename(t,e)}catch{if(this._deletedFiles.has(t))throw wO.With("ENOENT",t,"rename")}}renameSync(t,e){this.checkInitialized(),this.checkPath(t),this.checkPath(e),this.copyForWriteSync(t);try{this.writable.renameSync(t,e)}catch{if(this._deletedFiles.has(t))throw wO.With("ENOENT",t,"rename")}}async stat(t){this.checkInitialized();try{return await this.writable.stat(t)}catch{if(this._deletedFiles.has(t))throw wO.With("ENOENT",t,"stat");const e=await this.readable.stat(t);return e.mode|=146,e}}statSync(t){this.checkInitialized();try{return this.writable.statSync(t)}catch{if(this._deletedFiles.has(t))throw wO.With("ENOENT",t,"stat");const e=this.readable.statSync(t);return e.mode|=146,e}}async openFile(t,e){if(await this.writable.exists(t))return this.writable.openFile(t,e);const i=await this.readable.openFile(t,eR("r")),n=await i.stat(),{buffer:s}=await i.read(new Uint8Array(n.size));return new uR(this,t,e,n,s)}openFileSync(t,e){if(this.writable.existsSync(t))return this.writable.openFileSync(t,e);const i=this.readable.openFileSync(t,eR("r")),n=i.statSync(),s=new Uint8Array(n.size);return i.readSync(s),new uR(this,t,e,n,s)}async createFile(t,e,i){return this.checkInitialized(),await this.writable.createFile(t,e,i),this.openFile(t,e)}createFileSync(t,e,i){return this.checkInitialized(),this.writable.createFileSync(t,e,i),this.openFileSync(t,e)}async link(t,e){this.checkInitialized(),await this.copyForWrite(t),await this.writable.link(t,e)}linkSync(t,e){this.checkInitialized(),this.copyForWriteSync(t),this.writable.linkSync(t,e)}async unlink(t){if(this.checkInitialized(),this.checkPath(t),!await this.exists(t))throw wO.With("ENOENT",t,"unlink");await this.writable.exists(t)&&await this.writable.unlink(t),await this.exists(t)&&await this.deletePath(t)}unlinkSync(t){if(this.checkInitialized(),this.checkPath(t),!this.existsSync(t))throw wO.With("ENOENT",t,"unlink");this.writable.existsSync(t)&&this.writable.unlinkSync(t),this.existsSync(t)&&this.deletePath(t)}async rmdir(t){if(this.checkInitialized(),!await this.exists(t))throw wO.With("ENOENT",t,"rmdir");if(await this.writable.exists(t)&&await this.writable.rmdir(t),await this.exists(t)){if((await this.readdir(t)).length)throw wO.With("ENOTEMPTY",t,"rmdir");await this.deletePath(t)}}rmdirSync(t){if(this.checkInitialized(),!this.existsSync(t))throw wO.With("ENOENT",t,"rmdir");if(this.writable.existsSync(t)&&this.writable.rmdirSync(t),this.existsSync(t)){if(this.readdirSync(t).length)throw wO.With("ENOTEMPTY",t,"rmdir");this.deletePath(t)}}async mkdir(t,e){if(this.checkInitialized(),await this.exists(t))throw wO.With("EEXIST",t,"mkdir");await this.createParentDirectories(t),await this.writable.mkdir(t,e)}mkdirSync(t,e){if(this.checkInitialized(),this.existsSync(t))throw wO.With("EEXIST",t,"mkdir");this.createParentDirectoriesSync(t),this.writable.mkdirSync(t,e)}async readdir(t){this.checkInitialized();const e=[];try{e.push(...await this.writable.readdir(t))}catch{}try{e.push(...(await this.readable.readdir(t)).filter((e=>!this._deletedFiles.has(`${t}/${e}`))))}catch{}const i={};return e.filter((t=>{const e=!i[t];return i[t]=!0,e}))}readdirSync(t){this.checkInitialized();let e=[];try{e=e.concat(this.writable.readdirSync(t))}catch{}try{e=e.concat(this.readable.readdirSync(t).filter((e=>!this._deletedFiles.has(`${t}/${e}`))))}catch{}const i={};return e.filter((t=>{const e=!i[t];return i[t]=!0,e}))}async deletePath(t){this._deletedFiles.add(t),await this.updateLog(`d${t}\n`)}async updateLog(t){if(this._deleteLog+=t,this._deleteLogUpdatePending)return void(this._deleteLogUpdateNeeded=!0);this._deleteLogUpdatePending=!0;const e=await this.writable.openFile(JS,eR("w"));try{await e.write(UO(this._deleteLog)),this._deleteLogUpdateNeeded&&(this._deleteLogUpdateNeeded=!1,await this.updateLog(""))}catch(t){this._deleteLogError=t}finally{this._deleteLogUpdatePending=!1}}_reparseDeletionLog(){this._deletedFiles.clear();for(const t of this._deleteLog.split("\n"))t.startsWith("d")&&this._deletedFiles.add(t.slice(1))}checkInitialized(){if(!this._isInitialized)throw new wO(bO.EPERM,"OverlayFS is not initialized. Please initialize OverlayFS using its initialize() method before using it.");if(!this._deleteLogError)return;const t=this._deleteLogError;throw delete this._deleteLogError,t}checkPath(t){if(t==JS)throw wO.With("EPERM",t,"checkPath")}createParentDirectoriesSync(t){let e=kO(t);const i=[];for(;!this.writable.existsSync(e);)i.push(e),e=kO(e);for(const t of i.reverse())this.writable.mkdirSync(t,this.statSync(t).mode)}async createParentDirectories(t){let e=kO(t);const i=[];for(;!await this.writable.exists(e);)i.push(e),e=kO(e);for(const t of i.reverse()){const e=await this.stat(t);await this.writable.mkdir(t,e.mode)}}copyForWriteSync(t){if(!this.existsSync(t))throw wO.With("ENOENT",t,"copyForWrite");this.writable.existsSync(kO(t))||this.createParentDirectoriesSync(t),this.writable.existsSync(t)||this.copyToWritableSync(t)}async copyForWrite(t){if(!await this.exists(t))throw wO.With("ENOENT",t,"copyForWrite");if(await this.writable.exists(kO(t))||await this.createParentDirectories(t),!await this.writable.exists(t))return this.copyToWritable(t)}copyToWritableSync(t){const e={stack:[],error:void 0,hasError:!1};try{const i=this.statSync(t);if(i.isDirectory())return void this.writable.mkdirSync(t,i.mode);const n=new Uint8Array(i.size);$S(e,this.readable.openFileSync(t,"r"),!1).readSync(n);$S(e,this.writable.createFileSync(t,"w",146|i.mode),!1).writeSync(n)}catch(t){e.error=t,e.hasError=!0}finally{QS(e)}}async copyToWritable(t){const e={stack:[],error:void 0,hasError:!1};try{const i=await this.stat(t);if(i.isDirectory())return void await this.writable.mkdir(t,i.mode);const n=new Uint8Array(i.size),s=$S(e,await this.readable.openFile(t,"r"),!0);await s.read(n);const r=$S(e,await this.writable.createFile(t,"w",146|i.mode),!0);await r.write(n)}catch(t){e.error=t,e.hasError=!0}finally{const t=QS(e);t&&await t}}}class tv extends(function(t){return class extends zS{constructor(...e){super(),this._fs=new t(...e)}}}(ZS)){}function ev(t,e,i){if(t instanceof wO)return t;const n=t instanceof DOMException?bO[function(t){switch(t.name){case"IndexSizeError":case"HierarchyRequestError":case"InvalidCharacterError":case"InvalidStateError":case"SyntaxError":case"NamespaceError":case"TypeMismatchError":case"ConstraintError":case"VersionError":case"URLMismatchError":case"InvalidNodeTypeError":return"EINVAL";case"WrongDocumentError":return"EXDEV";case"NoModificationAllowedError":case"InvalidModificationError":case"InvalidAccessError":case"SecurityError":case"NotAllowedError":return"EACCES";case"NotFoundError":return"ENOENT";case"NotSupportedError":return"ENOTSUP";case"InUseAttributeError":return"EBUSY";case"NetworkError":return"ENETDOWN";case"AbortError":return"EINTR";case"QuotaExceededError":return"ENOSPC";case"TimeoutError":return"ETIMEDOUT";case"ReadOnlyError":return"EROFS";default:return"EIO"}}(t)]:bO.EIO,s=new wO(n,t.message,e,i);return s.stack=t.stack,s.cause=t.cause,s}globalThis.__zenfs__=st;class iv extends(HS(pR)){constructor(t){super(),this._handles=new Map,this._sync=XR.create({name:"accessfs-cache"}),this._handles.set("/",t)}metadata(){return{...super.metadata(),name:"WebAccess",noResizableBuffers:!0}}async sync(t,e){await this.writeFile(t,e)}async rename(t,e){const i=await this.getHandle(t);if(i instanceof FileSystemDirectoryHandle){const i=await this.readdir(t);if(await this.mkdir(e),!i.length)return void await this.unlink(t);for(const n of i)await this.rename(xO(t,n),xO(e,n)),await this.unlink(t);return}if(!(i instanceof FileSystemFileHandle))throw new wO(bO.ENOTSUP,"Not a file or directory handle",t,"rename");const n=await i.getFile().catch((e=>{throw ev(e,t,"rename")})),s=await this.getHandle(kO(e));if(!(s instanceof FileSystemDirectoryHandle))return;const r=await s.getFileHandle(VO(e),{create:!0}).catch((t=>{throw ev(t,e,"rename")})),o=await r.createWritable();await o.write(await n.arrayBuffer()),await o.close(),await this.unlink(t)}async writeFile(t,e){if(e.buffer.resizable)throw new wO(bO.EINVAL,"Resizable buffers can not be written",t,"write");const i=await this.getHandle(kO(t));if(!(i instanceof FileSystemDirectoryHandle))return;const n=await i.getFileHandle(VO(t),{create:!0}),s=await n.createWritable();await s.write(e),await s.close()}async createFile(t,e){return await this.writeFile(t,new Uint8Array),this.openFile(t,e)}async stat(t){const e=await this.getHandle(t);if(!e)throw wO.With("ENOENT",t,"stat");if(e instanceof FileSystemDirectoryHandle)return new $M({mode:511|vM,size:4096});if(e instanceof FileSystemFileHandle){const{lastModified:t,size:i}=await e.getFile();return new $M({mode:511|yM,size:i,mtimeMs:t})}throw new wO(bO.EBADE,"Handle is not a directory or file",t,"stat")}async openFile(t,e){const i=await this.getHandle(t);if(!(i instanceof FileSystemFileHandle))throw wO.With("EISDIR",t,"openFile");const n=await i.getFile().catch((e=>{throw ev(e,t,"openFile")})),s=new Uint8Array(await n.arrayBuffer()),r=new $M({mode:511|yM,size:n.size,mtimeMs:n.lastModified});return new uR(this,t,e,r,s)}async unlink(t){const e=await this.getHandle(kO(t));if(!(e instanceof FileSystemDirectoryHandle))throw wO.With("ENOTDIR",kO(t),"unlink");await e.removeEntry(VO(t),{recursive:!0}).catch((e=>{throw ev(e,t,"unlink")}))}async link(t){}async rmdir(t){return this.unlink(t)}async mkdir(t){if(await this.getHandle(t).catch((t=>{if("ENOENT"!=t.code)throw t})))throw wO.With("EEXIST",t,"mkdir");const e=await this.getHandle(kO(t));if(!(e instanceof FileSystemDirectoryHandle))throw wO.With("ENOTDIR",t,"mkdir");await e.getDirectoryHandle(VO(t),{create:!0})}async readdir(t){const e=await this.getHandle(t);if(!(e instanceof FileSystemDirectoryHandle))throw wO.With("ENOTDIR",t,"readdir");const i=[];for await(const t of e.keys())i.push(t);return i}async getHandle(t){if(this._handles.has(t))return this._handles.get(t);let e="/";for(const i of t.split("/").slice(1)){const t=this._handles.get(e);if(!(t instanceof FileSystemDirectoryHandle))throw wO.With("ENOTDIR",e,"getHandle");e=xO(e,i);const n=await t.getDirectoryHandle(i).catch((n=>{switch(n.name){case"TypeMismatchError":return t.getFileHandle(i).catch((t=>{}));case"TypeError":throw new wO(bO.ENOENT,n.message,e,"getHandle");default:throw ev(n,e,"getHandle")}}));n&&this._handles.set(e,n)}return this._handles.get(t)}}function nv(t){return new Promise(((e,i)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>i(t.error)}))}let sv;function rv(){return sv||(sv=function(t,e){const i=indexedDB.open(t);i.onupgradeneeded=()=>i.result.createObjectStore(e);const n=nv(i);return(t,i)=>n.then((n=>i(n.transaction(e,t).objectStore(e))))}("keyval-store","keyval")),sv}class ov extends iv{constructor(t){super(t)}async readFile(t){const e=await this.getHandle(t);if(e instanceof window.FileSystemFileHandle){const t=await e.getFile();return await t.text()}return""}}class av extends ot.FS{#t=null;#e=new TextEncoder;constructor(){super()}async showDirectoryPicker(){const t=await window.showDirectoryPicker({mode:"readwrite"});if("granted"!==await t.requestPermission({mode:"readwrite"}))throw new Error("readwrite access to directory not granted");return await this.setFSCache(t),this.#t=new ov(t),t}async loadFS(){let t=await this.getFSCache();if(!t)return null;if("granted"!==await t.requestPermission({mode:"readwrite"}))throw new Error("readwrite access to directory not granted");return this.#t=new ov(t),t}async getFSCache(){return function(t,e=rv()){return e("readonly",(e=>nv(e.get(t))))}("mixly-pyodide-fs")}async setFSCache(t){await function(t,e,i=rv()){return i("readwrite",(i=>(i.put(e,t),nv(i.transaction))))}("mixly-pyodide-fs",t)}async createFile(t){return this.#t.createFile(t,"")}async readFile(t){return this.#t.readFile(t)}async writeFile(t,e){const i=this.#e.encode(e);return this.#t.writeFile(t,i)}async isFile(t){const e=await this.#t.stat(t);return!(!e||33279!==e.mode)}async renameFile(t,e){return await this.#t.rename(t,e)}async moveFile(t,e){return this.renameFile(t,e)}async deleteFile(t){return this.#t.unlink(t)}async createDirectory(t){return this.#t.mkdir(t,511)}async readDirectory(t){return await this.#t.readdir(t)}async isDirectory(t){const e=await this.#t.stat(t);return!(!e||16895!==e.mode)}async isDirectoryEmpty(t){const e=await this.readDirectory(t);return!e?.length}async renameDirectory(t,e){return this.#t.rename(t,e)}async moveDirectory(t,e){return this.#t.rename(t,e)}async deleteDirectory(t){return this.#t.rmdir(t)}}class lv extends ot.FileTree{constructor(){super(new av)}async readFolder(t){let e=[];try{const i=this.getFS();if(!await i.isDirectory(t))return e;const n=await i.readDirectory(t);for(let s of n){const n=IO.join(t,s);if(await i.isDirectory(n)){const t=await i.isDirectoryEmpty(n);e.push({type:"folder",id:n,children:!t,title:`/${this.getRootFolderName()}${n}`})}else e.push({type:"file",id:n,children:!1,title:`/${this.getRootFolderName()}${n}`})}}catch(t){ot.Debug.error(t)}return e}}class uv extends ot.PageBase{static{ot.HTMLTemplate.add("html/statusbar/statusbar-filesystem.html",new ot.HTMLTemplate('\r\n
\r\n
\r\n
\r\n
')),ot.HTMLTemplate.add("html/statusbar/statusbar-filesystem-open-fs.html",new ot.HTMLTemplate('\r\n
\r\n \r\n
')),ot.HTMLTemplate.add("html/statusbar/statusbar-filesystem-editor-empty.html",new ot.HTMLTemplate('\r\n
\r\n
\r\n
')),this.init=function(){ot.StatusBarsManager.typesRegistry.register(["file-system"],uv);const t=ot.Workspace.getMain().getStatusBarsManager();return t.add({type:"file-system",id:"file-system",name:rt.Msg.PYTHON_PYODIDE_FILE_SYSTEM,title:rt.Msg.PYTHON_PYODIDE_FILE_SYSTEM}),t.changeTo("output"),t.get("file-system")}}#i=null;#n=null;#s=null;#r=null;#o=null;#a=null;#l=null;#u=null;#p=!1;#h=!1;#d=!1;#c=null;constructor(){super();const t=OO()(ot.HTMLTemplate.get("html/statusbar/statusbar-filesystem.html").render());this.setContent(t),this.#l=new lv,this.#n=t.children(".file-tree"),this.#r=OO()(ot.HTMLTemplate.get("html/statusbar/statusbar-filesystem-open-fs.html").render({msg:{loadFS:rt.Msg.PYTHON_PYODIDE_LOAD_FILE_SYSTEM}})),this.#n.append(this.#r),this.#a=new ot.StatusBar,this.#s=t.children(".editor"),this.#o=OO()(ot.HTMLTemplate.get("html/statusbar/statusbar-filesystem-editor-empty.html").render()),this.#s.append(this.#o)}#_(){this.#u=new ot.DragV(this.getContent()[0],{min:"150px",startSize:"15%",full:[!1,!1]}),this.#u.bind("sizeChanged",(()=>{this.resize()})),this.#r.children("button").click((()=>{this.selectFS().catch(ot.Debug.error)})),this.#l.bind("beforeSelectLeaf",(t=>{const e=t[0].id,i=this.#a.getFileMode(IO.extname(e));return i?(this.#a.setMode(i),!0):(LO.layer.msg(ot.Msg.Lang["statusbar.ampy.cannotEdit"],{time:1e3}),!1)})),this.#l.bind("afterSelectLeaf",(async t=>{const e=t[0].id;this.#l.showProgress();const i=this.#l.getFS();try{const t=await i.readFile(e);this.showEditor(),this.#a.setValue(t),this.#a.scrollToTop(),this.#a.focus(),this.setStatus(!1)}catch(t){ot.Debug.error(t),this.hideEditor(),this.#l.deselectAll()}this.#l.hideProgress()})),this.#l.bind("afterCreateNode",(t=>{this.#l.refreshFolder(t)})),this.#l.bind("afterDeleteNode",(t=>{this.#l.refreshFolder(t)})),this.#l.bind("afterRenameNode",(t=>{this.#l.refreshFolder(t)})),this.#l.bind("afterRefreshNode",(()=>{this.#l.getSelectedNodeId()||this.hideEditor()}));const t=this.#l.getContextMenu().getItem("menu");t.add({weight:7,type:"copy_path",data:{isHtmlName:!0,name:ot.Menu.getItem(ot.Msg.Lang["fileTree.copyPath"]),callback:(t,{$trigger:e})=>{let i=null;i="root"===e.attr("type")?this.#l.getRootFolderTitle():e.attr("title"),navigator.clipboard.writeText(i).catch(ot.Debug.error)}}}),t.add({weight:14,type:"sep5",preconditionFn:t=>{const e=this.#l.getSelectedNodeId();let i=t.attr("type"),n=t.attr("id");return"file"!==i||e===n},data:"---------"}),t.add({weight:15,type:"refresh",preconditionFn:t=>{const e=this.#l.getSelectedNodeId();let i=t.attr("type"),n=t.attr("id");return"file"!==i||e===n},data:{isHtmlName:!0,name:ot.Menu.getItem(ot.Msg.Lang["statusbar.ampy.refresh"]),callback:(t,{$trigger:e})=>{let i=e.attr("type");if("root"===i)this.#l.openRootFolder(),this.#l.refreshFolder("/");else if("folder"===i){let t=e.attr("id");this.#l.openNode(t),this.#l.refreshFolder(t)}else{const t=this.#l.getSelectedNodes();this.#l.runEvent("afterSelectLeaf",t)}}}}),t.add({weight:16,type:"sep6",preconditionFn:t=>{let e=t.attr("type");return["root"].includes(e)},data:"---------"}),t.add({weight:17,type:"exit",preconditionFn:t=>{let e=t.attr("type");return["root"].includes(e)},data:{isHtmlName:!0,name:ot.Menu.getItem(ot.Msg.Lang["statusbar.ampy.exit"]),callback:()=>{this.closeFS()}}}),t.remove("copy"),t.remove("cut"),t.remove("paste"),t.remove("sep2");const e=this.#a.getContextMenu().getItem("code");e.empty(),e.add({weight:0,type:"cut",data:{isHtmlName:!0,name:ot.Menu.getItem(ot.Msg.Lang["editor.contextMenu.cut"],"Ctrl+X"),callback:()=>this.#a.cut()}}),e.add({weight:1,type:"copy",data:{isHtmlName:!0,name:ot.Menu.getItem(ot.Msg.Lang["editor.contextMenu.copy"],"Ctrl+C"),callback:()=>this.#a.copy()}}),e.add({weight:2,type:"paste",data:{isHtmlName:!0,name:ot.Menu.getItem(ot.Msg.Lang["editor.contextMenu.paste"],"Ctrl+V"),callback:()=>this.#a.paste()}}),e.add({weight:3,type:"sep1",data:"---------"}),e.add({weight:4,type:"togglecomment",data:{isHtmlName:!0,name:ot.Menu.getItem(ot.Msg.Lang["editor.contextMenu.togglecomment"],"Ctrl+/"),callback:()=>this.#a.commentLine()}}),e.add({weight:6,type:"sep2",preconditionFn:()=>this.#d,data:"---------"}),e.add({weight:7,type:"save",preconditionFn:()=>this.#d,data:{isHtmlName:!0,name:ot.Menu.getItem(ot.Msg.Lang["file.save"],"Ctrl+S"),callback:async()=>{await this.put()}}});const{commands:i}=this.#a.getEditor();i.addCommand({name:"save",bindKey:"Ctrl-S",exec:async()=>{this.#d&&await this.put()}})}async put(){this.#l.showProgress();const t=this.#l.getSelectedNodeId(),e=this.#l.getFS();try{await e.writeFile(t,this.#a.getValue()),this.setStatus(!1)}catch(t){ot.Debug.error(t)}finally{this.#l.hideProgress()}}showFileTree(){this.#p||(this.#r.detach(),this.#n.empty(),this.#n.append(this.#l.getContent()),this.#p=!0)}hideFileTree(){this.#p&&(this.#l.getContent().detach(),this.#n.empty(),this.#n.append(this.#r),this.#p=!1)}showEditor(){this.#h||(this.#o.detach(),this.#s.empty(),this.#s.append(this.#a.getContent()),this.#h=!0)}hideEditor(){this.#h&&(this.#a.getContent().detach(),this.#s.empty(),this.#s.append(this.#o),this.#h=!1,this.setStatus(!1))}getDrag(){return this.#u}init(){super.init(),this.hideCloseBtn(),this.#a.init(),this.#_();const t=this.#a.getEditor();t.setReadOnly(!1),t.renderer.setShowGutter(!0),t.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0,newLineMode:"unix"}),t.on("change",(()=>{this.setStatus(!0)})),this.loadFS().catch(ot.Debug.error)}async loadFS(){const t=this.#l.getFS(),e=await t.loadFS();await this.openFS(e)}async selectFS(){const t=this.#l.getFS(),e=await t.showDirectoryPicker();await this.openFS(e)}async openFS(t){if(!t?.name)return;const e="/"+t.name;this.#l.setFolderPath("/"),this.#l.setRootFolderTitle(e),this.#l.setRootFolderName(t.name),this.#l.openRootFolder(),this.showFileTree(),this.#c=await window.pyodide.mountNativeFS(e,t)}closeFS(){const t=this.#l.getRootFolderTitle();if(Object.keys(window.pyodide.FS.root.contents).includes(IO.basename(t))){const e=window.pyodide.FS.lookupPath(t,{follow_mount:!1});window.pyodide.FS.isMountpoint(e.node)&&window.pyodide.FS.unmount(t)}this.#l.getFS().setFSCache(null),this.#l.deselectAll(),this.hideFileTree(),this.hideEditor(),this.setStatus(!1)}onMounted(){super.onMounted(),this.#a.onMounted(),this.#l.onMounted()}onUnmounted(){super.onUnmounted(),this.#a.onUnmounted(),this.#l.onUnmounted()}resize(){super.resize(),this.#a.resize(),this.#l.resize()}setStatus(t){this.#d!==t&&(this.#d=t)}getNativeFS(){return this.#c}dispose(){this.#a.dispose(),this.#a=null,this.#l.dispose(),this.#l=null,super.dispose()}}class pv{static{ot.HTMLTemplate.add("html/statusbar/loader.html",new ot.HTMLTemplate('\r\n
\r\n
\r\n

{{d.msg.loading}}

\r\n
')),this.pythonShell=null,this.kernelLoaded=!1,this.$loader=OO()(ot.HTMLTemplate.get("html/statusbar/loader.html").render({msg:{loading:rt.Msg.PYTHON_PYODIDE_LOADING}})),this.statusBarImage=null,this.statusBarFileSystem=null,this.init=async function(){ot.app.getFooterBar().getContent().after(this.$loader);const t=IO.relative(ot.Env.indexDirPath,ot.Env.boardDirPath),e=new vO({rootPath:IO.join(t,"deps"),language:"python3"}),i=await e.kernelAvailable();i&&(await i.init(),await i.loaded(),this.loader=e,this.kernel=i,this.statusBarImage=CO.init(),this.statusBarFileSystem=uv.init(),this.pythonShell=new pv,this.pyodide=window.pyodide,this.interruptBuffer=new Uint8Array(new ArrayBuffer(1)),this.pyodide.setInterruptBuffer(this.interruptBuffer),this.kernelLoaded=!0,this.$loader.remove(),this.$loader=null)},this.run=async function(){if(!this.kernelLoaded)return;const t=ot.Workspace.getMain().getEditorsManager().getActive().getCode();return this.pythonShell.run(t)},this.stop=async function(){if(this.kernelLoaded)return this.pythonShell.stop()}}#f=null;#T=null;#m=null;#g={row:0,column:0};#I="";#E=null;#O=null;#M=!1;#R=!1;#A=null;#y=()=>this.#S();#v=[{name:"REPL-Enter",bindKey:"Enter",exec:t=>{if(t.getSession().selection.getCursor().row===this.#g.row){const t=this.#f.getEndPos();let e=this.#f.getValueRange(this.#g,t);e=e.replace(this.#I,""),this.#E?.(e),this.#E=null,this.#O=null,this.#f.addValue("\n"),this.#C()}return!1}},{name:"REPL-ChangeEditor",bindKey:"Delete|Ctrl-X|Backspace",exec:t=>{const e=t.getSession().selection.getCursor();return e.row{this.#R=!1,this.#f.addValue(`\n==${ot.Msg.Lang["shell.finish"]}==`),this.syncfs(!1).catch(ot.Debug.error)})),this.#A.addEventListener("eval.output",(t=>{this.#f.addValue(t.content)})),this.#A.addEventListener("eval.error",(()=>{this.#R=!1,this.#f.addValue(`\n==${ot.Msg.Lang["shell.finish"]}==`)})),this.#A.addEventListener("eval.input",(t=>{const e=String(t?.content?.prompt);this.#f.addValue(e),this.#I=e,this.#E=t.resolve,this.#O=t.reject,this.#L()})),this.#A.addEventListener("eval.display",(t=>{this.#m.changeTo("images"),this.#T.display(t)}))}#S(){const t=this.#f.getEditor(),e=t.getSession().selection.getCursor();t.setReadOnly(e.row{window.pyodide.FS.syncfs(t,e)}))}sleep(t){return new Promise((e=>setTimeout(e,t)))}}const hv={init:async function(){const t=ot.app.getNav();t.register({icon:"icon-play-circled",title:"",id:"python-run-btn",displayText:rt.Msg.MSG.run,preconditionFn:()=>!0,callback:()=>{pv.run().catch(ot.Debug.error)},scopeType:ot.Nav.Scope.LEFT,weight:4}),t.register({icon:"icon-cancel",title:"",id:"python-stop-btn",displayText:rt.Msg.MSG.stop,preconditionFn:()=>!0,callback:()=>{pv.stop().catch(ot.Debug.error)},scopeType:ot.Nav.Scope.LEFT,weight:5}),await pv.init()}};hv.init(),Object.assign(rt.Variables,lt),Object.assign(rt.Procedures,Eu),rt.Python=Ou,rt.generator=Ou,ot.Profile.default={},Object.assign(rt.Blocks,t,e,i,n,s,r,o,a,l,u,p,h,d,S,v,C,L,b,D,w,N,F,P,x,k,V,Y,B),Object.assign(rt.Python.forBlock,c,_,f,T,m,g,I,E,O,M,R,A,y,U,X,G,Mm,H,W,j,q,K,z,Q,J,Z,tt,et)})()})(); \ No newline at end of file diff --git a/boards/default/python_pyodide/main.bundle.40a87a6a.js b/boards/default/python_pyodide/main.bundle.40a87a6a.js new file mode 100644 index 00000000..df102321 --- /dev/null +++ b/boards/default/python_pyodide/main.bundle.40a87a6a.js @@ -0,0 +1,15099 @@ +(()=>{var __webpack_modules__={936:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{cv_destroy_all:()=>cv_destroy_all,cv_face_classifier:()=>cv_face_classifier,cv_face_detect:()=>cv_face_detect,cv_face_detect_all:()=>cv_face_detect_all,cv_line_rect:()=>cv_line_rect,cv_read_image:()=>cv_read_image,cv_show_image:()=>cv_show_image,cv_text:()=>cv_text,cv_waitkey:()=>cv_waitkey,cv_write_image:()=>cv_write_image});const cv_read_image=function(t,e){return e.definitions_.import_cv2="import cv2",["cv2.imread("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},cv_show_image=function(t,e){return e.definitions_.import_cv2="import cv2","cv2.imshow("+e.valueToCode(this,"data",e.ORDER_ATOMIC)+","+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},cv_write_image=function(t,e){return e.definitions_.import_cv2="import cv2","cv2.imwrite("+e.valueToCode(this,"data",e.ORDER_ATOMIC)+","+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},cv_waitkey=function(t,e){return e.definitions_.import_cv2="import cv2","cv2.waitKey("+e.valueToCode(this,"data",e.ORDER_ATOMIC)+")\n"},cv_destroy_all=function(t,e){e.definitions_.import_cv2="import cv2";return"cv2.destroyAllWindows()\n"},cv_line_rect=function(_,generator){generator.definitions_.import_cv2="import cv2";var file=generator.valueToCode(this,"FILE",generator.ORDER_ATOMIC),x1=generator.valueToCode(this,"x1",generator.ORDER_ATOMIC),y1=generator.valueToCode(this,"y1",generator.ORDER_ATOMIC),x2=generator.valueToCode(this,"x2",generator.ORDER_ATOMIC),y2=generator.valueToCode(this,"y2",generator.ORDER_ATOMIC),thick=generator.valueToCode(this,"thick",generator.ORDER_ATOMIC),color=this.getFieldValue("FIELDNAME"),color1=eval("0x"+color[1]+color[2]),color2=eval("0x"+color[3]+color[4]),color3=eval("0x"+color[5]+color[6]),direction=this.getFieldValue("DIR"),code="cv2."+direction+"("+file+",("+x1+","+y1+"),("+x2+","+y2+"),("+color3+","+color2+","+color1+"),"+thick+")\n";return code},cv_text=function(_,generator){generator.definitions_.import_cv2="import cv2";var file=generator.valueToCode(this,"FILE",generator.ORDER_ATOMIC),x1=generator.valueToCode(this,"x1",generator.ORDER_ATOMIC),y1=generator.valueToCode(this,"y1",generator.ORDER_ATOMIC),data=generator.valueToCode(this,"data",generator.ORDER_ATOMIC),size=generator.valueToCode(this,"size",generator.ORDER_ATOMIC),thick=generator.valueToCode(this,"thick",generator.ORDER_ATOMIC),color=this.getFieldValue("FIELDNAME"),color1=eval("0x"+color[1]+color[2]),color2=eval("0x"+color[3]+color[4]),color3=eval("0x"+color[5]+color[6]),font=this.getFieldValue("font"),code="cv2.putText("+file+","+data+",("+x1+","+y1+"),cv2.FONT_HERSHEY_"+font+","+size+",("+color3+","+color2+","+color1+"),"+thick+")\n";return code},cv_face_classifier=function(t,e){return e.definitions_.import_cv2="import cv2",["cv2.CascadeClassifier("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},cv_face_detect=function(t,e){e.definitions_.import_cv2="import cv2";var n=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return[e.valueToCode(this,"FACE",e.ORDER_ATOMIC)+".detectMultiScale("+n+",scaleFactor="+e.valueToCode(this,"SCALE",e.ORDER_ATOMIC)+",minNeighbors="+e.valueToCode(this,"NEIGHBOR",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},cv_face_detect_all=function(t,e){e.definitions_.import_cv2="import cv2";var n=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return[e.valueToCode(this,"FACE",e.ORDER_ATOMIC)+".detectMultiScale("+n+",scaleFactor="+e.valueToCode(this,"SCALE",e.ORDER_ATOMIC)+",minNeighbors="+e.valueToCode(this,"NEIGHBOR",e.ORDER_ATOMIC)+",minSize=("+e.valueToCode(this,"x1",e.ORDER_ATOMIC)+","+e.valueToCode(this,"y1",e.ORDER_ATOMIC)+"),maxSize=("+e.valueToCode(this,"x2",e.ORDER_ATOMIC)+","+e.valueToCode(this,"y2",e.ORDER_ATOMIC)+"))",e.ORDER_ATOMIC]}},153:(t,e,n)=>{"use strict";const{SymbolDispose:i}=n(4184),{AbortError:s,codes:r}=n(6605),{isNodeStream:a,isWebStream:o,kControllerErrorFunction:l}=n(6569),u=n(9700),{ERR_INVALID_ARG_TYPE:h}=r;let p;t.exports.addAbortSignal=function(e,n){if(((t,e)=>{if("object"!=typeof t||!("aborted"in t))throw new h(e,"AbortSignal",t)})(e,"signal"),!a(n)&&!o(n))throw new h("stream",["ReadableStream","WritableStream","Stream"],n);return t.exports.addAbortSignalNoValidate(e,n)},t.exports.addAbortSignalNoValidate=function(t,e){if("object"!=typeof t||!("aborted"in t))return e;const r=a(e)?()=>{e.destroy(new s(void 0,{cause:t.reason}))}:()=>{e[l](new s(void 0,{cause:t.reason}))};if(t.aborted)r();else{p=p||n(798).addAbortListener;const s=p(t,r);u(e,s[i])}return e}},1515:(t,e,n)=>{"use strict";const{StringPrototypeSlice:i,SymbolIterator:s,TypedArrayPrototypeSet:r,Uint8Array:a}=n(4184),{Buffer:o}=n(8287),{inspect:l}=n(798);t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}unshift(t){const e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}shift(){if(0===this.length)return;const t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(0===this.length)return"";let e=this.head,n=""+e.data;for(;null!==(e=e.next);)n+=t+e.data;return n}concat(t){if(0===this.length)return o.alloc(0);const e=o.allocUnsafe(t>>>0);let n=this.head,i=0;for(;n;)r(e,n.data,i),i+=n.data.length,n=n.next;return e}consume(t,e){const n=this.head.data;if(tr.length)){t===r.length?(e+=r,++s,n.next?this.head=n.next:this.head=this.tail=null):(e+=i(r,0,t),this.head=n,n.data=i(r,t));break}e+=r,t-=r.length,++s}while(null!==(n=n.next));return this.length-=s,e}_getBuffer(t){const e=o.allocUnsafe(t),n=t;let i=this.head,s=0;do{const o=i.data;if(!(t>o.length)){t===o.length?(r(e,o,n-t),++s,i.next?this.head=i.next:this.head=this.tail=null):(r(e,new a(o.buffer,o.byteOffset,t),n-t),this.head=i,i.data=o.slice(t));break}r(e,o,n-t),t-=o.length,++s}while(null!==(i=i.next));return this.length-=s,e}[Symbol.for("nodejs.util.inspect.custom")](t,e){return l(this,{...e,depth:0,customInspect:!1})}}},6864:(t,e,n)=>{"use strict";const{pipeline:i}=n(872),s=n(4992),{destroyer:r}=n(2430),{isNodeStream:a,isReadable:o,isWritable:l,isWebStream:u,isTransformStream:h,isWritableStream:p,isReadableStream:c}=n(6569),{AbortError:d,codes:{ERR_INVALID_ARG_VALUE:f,ERR_MISSING_ARGS:m}}=n(6605),g=n(9700);t.exports=function(...t){if(0===t.length)throw new m("streams");if(1===t.length)return s.from(t[0]);const e=[...t];if("function"==typeof t[0]&&(t[0]=s.from(t[0])),"function"==typeof t[t.length-1]){const e=t.length-1;t[e]=s.from(t[e])}for(let n=0;n0&&!(l(t[n])||p(t[n])||h(t[n])))throw new f(`streams[${n}]`,e[n],"must be writable")}let n,_,T,y,I;const E=t[0],b=i(t,(function(t){const e=y;y=null,e?e(t):t?I.destroy(t):w||v||I.destroy()})),v=!!(l(E)||p(E)||h(E)),w=!!(o(b)||c(b)||h(b));if(I=new s({writableObjectMode:!(null==E||!E.writableObjectMode),readableObjectMode:!(null==b||!b.readableObjectMode),writable:v,readable:w}),v){if(a(E))I._write=function(t,e,i){E.write(t,e)?i():n=i},I._final=function(t){E.end(),_=t},E.on("drain",(function(){if(n){const t=n;n=null,t()}}));else if(u(E)){const t=(h(E)?E.writable:E).getWriter();I._write=async function(e,n,i){try{await t.ready,t.write(e).catch((()=>{})),i()}catch(t){i(t)}},I._final=async function(e){try{await t.ready,t.close().catch((()=>{})),_=e}catch(t){e(t)}}}const t=h(b)?b.readable:b;g(t,(()=>{if(_){const t=_;_=null,t()}}))}if(w)if(a(b))b.on("readable",(function(){if(T){const t=T;T=null,t()}})),b.on("end",(function(){I.push(null)})),I._read=function(){for(;;){const t=b.read();if(null===t)return void(T=I._read);if(!I.push(t))return}};else if(u(b)){const t=(h(b)?b.readable:b).getReader();I._read=async function(){for(;;)try{const{value:e,done:n}=await t.read();if(!I.push(e))return;if(n)return void I.push(null)}catch{return}}}return I._destroy=function(t,e){t||null===y||(t=new d),T=null,n=null,_=null,null===y?e(t):(y=e,a(b)&&r(b,t))},I}},2430:(t,e,n)=>{"use strict";const i=n(5606),{aggregateTwoErrors:s,codes:{ERR_MULTIPLE_CALLBACK:r},AbortError:a}=n(6605),{Symbol:o}=n(4184),{kIsDestroyed:l,isDestroyed:u,isFinished:h,isServerRequest:p}=n(6569),c=o("kDestroy"),d=o("kConstruct");function f(t,e,n){t&&(t.stack,e&&!e.errored&&(e.errored=t),n&&!n.errored&&(n.errored=t))}function m(t,e,n){let s=!1;function r(e){if(s)return;s=!0;const r=t._readableState,a=t._writableState;f(e,a,r),a&&(a.closed=!0),r&&(r.closed=!0),"function"==typeof n&&n(e),e?i.nextTick(g,t,e):i.nextTick(_,t)}try{t._destroy(e||null,r)}catch(e){r(e)}}function g(t,e){T(t,e),_(t)}function _(t){const e=t._readableState,n=t._writableState;n&&(n.closeEmitted=!0),e&&(e.closeEmitted=!0),(null!=n&&n.emitClose||null!=e&&e.emitClose)&&t.emit("close")}function T(t,e){const n=t._readableState,i=t._writableState;null!=i&&i.errorEmitted||null!=n&&n.errorEmitted||(i&&(i.errorEmitted=!0),n&&(n.errorEmitted=!0),t.emit("error",e))}function y(t,e,n){const s=t._readableState,r=t._writableState;if(null!=r&&r.destroyed||null!=s&&s.destroyed)return this;null!=s&&s.autoDestroy||null!=r&&r.autoDestroy?t.destroy(e):e&&(e.stack,r&&!r.errored&&(r.errored=e),s&&!s.errored&&(s.errored=e),n?i.nextTick(T,t,e):T(t,e))}function I(t){let e=!1;function n(n){if(e)return void y(t,null!=n?n:new r);e=!0;const s=t._readableState,a=t._writableState,o=a||s;s&&(s.constructed=!0),a&&(a.constructed=!0),o.destroyed?t.emit(c,n):n?y(t,n,!0):i.nextTick(E,t)}try{t._construct((t=>{i.nextTick(n,t)}))}catch(t){i.nextTick(n,t)}}function E(t){t.emit(d)}function b(t){return(null==t?void 0:t.setHeader)&&"function"==typeof t.abort}function v(t){t.emit("close")}function w(t,e){t.emit("error",e),i.nextTick(v,t)}t.exports={construct:function(t,e){if("function"!=typeof t._construct)return;const n=t._readableState,s=t._writableState;n&&(n.constructed=!1),s&&(s.constructed=!1),t.once(d,e),t.listenerCount(d)>1||i.nextTick(I,t)},destroyer:function(t,e){t&&!u(t)&&(e||h(t)||(e=new a),p(t)?(t.socket=null,t.destroy(e)):b(t)?t.abort():b(t.req)?t.req.abort():"function"==typeof t.destroy?t.destroy(e):"function"==typeof t.close?t.close():e?i.nextTick(w,t,e):i.nextTick(v,t),t.destroyed||(t[l]=!0))},destroy:function(t,e){const n=this._readableState,i=this._writableState,r=i||n;return null!=i&&i.destroyed||null!=n&&n.destroyed?("function"==typeof e&&e(),this):(f(t,i,n),i&&(i.destroyed=!0),n&&(n.destroyed=!0),r.constructed?m(this,t,e):this.once(c,(function(n){m(this,s(n,t),e)})),this)},undestroy:function(){const t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=!1===t.readable,t.endEmitted=!1===t.readable),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=!1===e.writable,e.ending=!1===e.writable,e.finished=!1===e.writable)},errorOrDestroy:y}},4992:(t,e,n)=>{"use strict";const{ObjectDefineProperties:i,ObjectGetOwnPropertyDescriptor:s,ObjectKeys:r,ObjectSetPrototypeOf:a}=n(4184);t.exports=u;const o=n(6566),l=n(394);a(u.prototype,o.prototype),a(u,o);{const t=r(l.prototype);for(let e=0;e{const i=n(5606),s=n(8287),{isReadable:r,isWritable:a,isIterable:o,isNodeStream:l,isReadableNodeStream:u,isWritableNodeStream:h,isDuplexNodeStream:p,isReadableStream:c,isWritableStream:d}=n(6569),f=n(9700),{AbortError:m,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:_}}=n(6605),{destroyer:T}=n(2430),y=n(4992),I=n(6566),E=n(394),{createDeferredPromise:b}=n(798),v=n(3182),w=globalThis.Blob||s.Blob,S=void 0!==w?function(t){return t instanceof w}:function(t){return!1},x=globalThis.AbortController||n(5568).AbortController,{FunctionPrototypeCall:R}=n(4184);class O extends y{constructor(t){super(t),!1===(null==t?void 0:t.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==t?void 0:t.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function A(t){const e=t.readable&&"function"!=typeof t.readable.read?I.wrap(t.readable):t.readable,n=t.writable;let i,s,o,l,u,h=!!r(e),p=!!a(n);function c(t){const e=l;l=null,e?e(t):t&&u.destroy(t)}return u=new O({readableObjectMode:!(null==e||!e.readableObjectMode),writableObjectMode:!(null==n||!n.writableObjectMode),readable:h,writable:p}),p&&(f(n,(t=>{p=!1,t&&T(e,t),c(t)})),u._write=function(t,e,s){n.write(t,e)?s():i=s},u._final=function(t){n.end(),s=t},n.on("drain",(function(){if(i){const t=i;i=null,t()}})),n.on("finish",(function(){if(s){const t=s;s=null,t()}}))),h&&(f(e,(t=>{h=!1,t&&T(e,t),c(t)})),e.on("readable",(function(){if(o){const t=o;o=null,t()}})),e.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const t=e.read();if(null===t)return void(o=u._read);if(!u.push(t))return}}),u._destroy=function(t,r){t||null===l||(t=new m),o=null,i=null,s=null,null===l?r(t):(l=r,T(n,t),T(e,t))},u}t.exports=function t(e,n){if(p(e))return e;if(u(e))return A({readable:e});if(h(e))return A({writable:e});if(l(e))return A({writable:!1,readable:!1});if(c(e))return A({readable:I.fromWeb(e)});if(d(e))return A({writable:E.fromWeb(e)});if("function"==typeof e){const{value:t,write:s,final:r,destroy:a}=function(t){let{promise:e,resolve:n}=b();const s=new x,r=s.signal,a=t(async function*(){for(;;){const t=e;e=null;const{chunk:s,done:a,cb:o}=await t;if(i.nextTick(o),a)return;if(r.aborted)throw new m(void 0,{cause:r.reason});({promise:e,resolve:n}=b()),yield s}}(),{signal:r});return{value:a,write(t,e,i){const s=n;n=null,s({chunk:t,done:!1,cb:i})},final(t){const e=n;n=null,e({done:!0,cb:t})},destroy(t,e){s.abort(),e(t)}}}(e);if(o(t))return v(O,t,{objectMode:!0,write:s,final:r,destroy:a});const l=null==t?void 0:t.then;if("function"==typeof l){let e;const n=R(l,t,(t=>{if(null!=t)throw new _("nully","body",t)}),(t=>{T(e,t)}));return e=new O({objectMode:!0,readable:!1,write:s,final(t){r((async()=>{try{await n,i.nextTick(t,null)}catch(e){i.nextTick(t,e)}}))},destroy:a})}throw new _("Iterable, AsyncIterable or AsyncFunction",n,t)}if(S(e))return t(e.arrayBuffer());if(o(e))return v(O,e,{objectMode:!0,writable:!1});if(c(null==e?void 0:e.readable)&&d(null==e?void 0:e.writable))return O.fromWeb(e);if("object"==typeof(null==e?void 0:e.writable)||"object"==typeof(null==e?void 0:e.readable)){return A({readable:null!=e&&e.readable?u(null==e?void 0:e.readable)?null==e?void 0:e.readable:t(e.readable):void 0,writable:null!=e&&e.writable?h(null==e?void 0:e.writable)?null==e?void 0:e.writable:t(e.writable):void 0})}const s=null==e?void 0:e.then;if("function"==typeof s){let t;return R(s,e,(e=>{null!=e&&t.push(e),t.push(null)}),(e=>{T(t,e)})),t=new O({objectMode:!0,writable:!1,read(){}})}throw new g(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],e)}},9700:(t,e,n)=>{const i=n(5606),{AbortError:s,codes:r}=n(6605),{ERR_INVALID_ARG_TYPE:a,ERR_STREAM_PREMATURE_CLOSE:o}=r,{kEmptyObject:l,once:u}=n(798),{validateAbortSignal:h,validateFunction:p,validateObject:c,validateBoolean:d}=n(6283),{Promise:f,PromisePrototypeThen:m,SymbolDispose:g}=n(4184),{isClosed:_,isReadable:T,isReadableNodeStream:y,isReadableStream:I,isReadableFinished:E,isReadableErrored:b,isWritable:v,isWritableNodeStream:w,isWritableStream:S,isWritableFinished:x,isWritableErrored:R,isNodeStream:O,willEmitClose:A,kIsClosedPromise:M}=n(6569);let C;const N=()=>{};function k(t,e,r){var d,f;if(2===arguments.length?(r=e,e=l):null==e?e=l:c(e,"options"),p(r,"callback"),h(e.signal,"options.signal"),r=u(r),I(t)||S(t))return function(t,e,r){let a=!1,o=N;if(e.signal)if(o=()=>{a=!0,r.call(t,new s(void 0,{cause:e.signal.reason}))},e.signal.aborted)i.nextTick(o);else{C=C||n(798).addAbortListener;const i=C(e.signal,o),s=r;r=u(((...e)=>{i[g](),s.apply(t,e)}))}const l=(...e)=>{a||i.nextTick((()=>r.apply(t,e)))};return m(t[M].promise,l,l),N}(t,e,r);if(!O(t))throw new a("stream",["ReadableStream","WritableStream","Stream"],t);const k=null!==(d=e.readable)&&void 0!==d?d:y(t),D=null!==(f=e.writable)&&void 0!==f?f:w(t),L=t._writableState,F=t._readableState,P=()=>{t.writable||V()};let $=A(t)&&y(t)===k&&w(t)===D,B=x(t,!1);const V=()=>{B=!0,t.destroyed&&($=!1),(!$||t.readable&&!k)&&(k&&!U||r.call(t))};let U=E(t,!1);const Y=()=>{U=!0,t.destroyed&&($=!1),(!$||t.writable&&!D)&&(D&&!B||r.call(t))},G=e=>{r.call(t,e)};let H=_(t);const W=()=>{H=!0;const e=R(t)||b(t);return e&&"boolean"!=typeof e?r.call(t,e):k&&!U&&y(t,!0)&&!E(t,!1)?r.call(t,new o):!D||B||x(t,!1)?void r.call(t):r.call(t,new o)},z=()=>{H=!0;const e=R(t)||b(t);if(e&&"boolean"!=typeof e)return r.call(t,e);r.call(t)},X=()=>{t.req.on("finish",V)};!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?D&&!L&&(t.on("end",P),t.on("close",P)):(t.on("complete",V),$||t.on("abort",W),t.req?X():t.on("request",X)),$||"boolean"!=typeof t.aborted||t.on("aborted",W),t.on("end",Y),t.on("finish",V),!1!==e.error&&t.on("error",G),t.on("close",W),H?i.nextTick(W):null!=L&&L.errorEmitted||null!=F&&F.errorEmitted?$||i.nextTick(z):(k||$&&!T(t)||!B&&!1!==v(t))&&(D||$&&!v(t)||!U&&!1!==T(t))?F&&t.req&&t.aborted&&i.nextTick(z):i.nextTick(z);const j=()=>{r=N,t.removeListener("aborted",W),t.removeListener("complete",V),t.removeListener("abort",W),t.removeListener("request",X),t.req&&t.req.removeListener("finish",V),t.removeListener("end",P),t.removeListener("close",P),t.removeListener("finish",V),t.removeListener("end",Y),t.removeListener("error",G),t.removeListener("close",W)};if(e.signal&&!H){const a=()=>{const n=r;j(),n.call(t,new s(void 0,{cause:e.signal.reason}))};if(e.signal.aborted)i.nextTick(a);else{C=C||n(798).addAbortListener;const i=C(e.signal,a),s=r;r=u(((...e)=>{i[g](),s.apply(t,e)}))}}return j}t.exports=k,t.exports.finished=function(t,e){var n;let i=!1;return null===e&&(e=l),null!==(n=e)&&void 0!==n&&n.cleanup&&(d(e.cleanup,"cleanup"),i=e.cleanup),new f(((n,s)=>{const r=k(t,e,(t=>{i&&r(),t?s(t):n()}))}))}},3182:(t,e,n)=>{"use strict";const i=n(5606),{PromisePrototypeThen:s,SymbolAsyncIterator:r,SymbolIterator:a}=n(4184),{Buffer:o}=n(8287),{ERR_INVALID_ARG_TYPE:l,ERR_STREAM_NULL_VALUES:u}=n(6605).codes;t.exports=function(t,e,n){let h,p;if("string"==typeof e||e instanceof o)return new t({objectMode:!0,...n,read(){this.push(e),this.push(null)}});if(e&&e[r])p=!0,h=e[r]();else{if(!e||!e[a])throw new l("iterable",["Iterable"],e);p=!1,h=e[a]()}const c=new t({objectMode:!0,highWaterMark:1,...n});let d=!1;return c._read=function(){d||(d=!0,async function(){for(;;){try{const{value:t,done:e}=p?await h.next():h.next();if(e)c.push(null);else{const e=t&&"function"==typeof t.then?await t:t;if(null===e)throw d=!1,new u;if(c.push(e))continue;d=!1}}catch(t){c.destroy(t)}break}}())},c._destroy=function(t,e){s(async function(t){const e=null!=t,n="function"==typeof h.throw;if(e&&n){const{value:e,done:n}=await h.throw(t);if(await e,n)return}if("function"==typeof h.return){const{value:t}=await h.return();await t}}(t),(()=>i.nextTick(e,t)),(n=>i.nextTick(e,n||t)))},c}},2913:(t,e,n)=>{"use strict";const{ArrayIsArray:i,ObjectSetPrototypeOf:s}=n(4184),{EventEmitter:r}=n(7007);function a(t){r.call(this,t)}function o(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?i(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}s(a.prototype,r.prototype),s(a,r),a.prototype.pipe=function(t,e){const n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function s(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",s),t._isStdio||e&&!1===e.end||(n.on("end",l),n.on("close",u));let a=!1;function l(){a||(a=!0,t.end())}function u(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function h(t){p(),0===r.listenerCount(this,"error")&&this.emit("error",t)}function p(){n.removeListener("data",i),t.removeListener("drain",s),n.removeListener("end",l),n.removeListener("close",u),n.removeListener("error",h),t.removeListener("error",h),n.removeListener("end",p),n.removeListener("close",p),t.removeListener("close",p)}return o(n,"error",h),o(t,"error",h),n.on("end",p),n.on("close",p),t.on("close",p),t.emit("pipe",n),t},t.exports={Stream:a,prependListener:o}},5589:(t,e,n)=>{"use strict";const i=globalThis.AbortController||n(5568).AbortController,{codes:{ERR_INVALID_ARG_VALUE:s,ERR_INVALID_ARG_TYPE:r,ERR_MISSING_ARGS:a,ERR_OUT_OF_RANGE:o},AbortError:l}=n(6605),{validateAbortSignal:u,validateInteger:h,validateObject:p}=n(6283),c=n(4184).Symbol("kWeak"),d=n(4184).Symbol("kResistStopPropagation"),{finished:f}=n(9700),m=n(6864),{addAbortSignalNoValidate:g}=n(153),{isWritable:_,isNodeStream:T}=n(6569),{deprecate:y}=n(798),{ArrayPrototypePush:I,Boolean:E,MathFloor:b,Number:v,NumberIsNaN:w,Promise:S,PromiseReject:x,PromiseResolve:R,PromisePrototypeThen:O,Symbol:A}=n(4184),M=A("kEmpty"),C=A("kEof");function N(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);null!=e&&p(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");let i=1;null!=(null==e?void 0:e.concurrency)&&(i=b(e.concurrency));let s=i-1;return null!=(null==e?void 0:e.highWaterMark)&&(s=b(e.highWaterMark)),h(i,"options.concurrency",1),h(s,"options.highWaterMark",0),s+=i,async function*(){const r=n(798).AbortSignalAny([null==e?void 0:e.signal].filter(E)),a=this,o=[],u={signal:r};let h,p,c=!1,d=0;function f(){c=!0,m()}function m(){d-=1,g()}function g(){p&&!c&&d=s||d>=i)&&await new S((t=>{p=t}))}o.push(C)}catch(t){const e=x(t);O(e,m,f),o.push(e)}finally{c=!0,h&&(h(),h=null)}}();try{for(;;){for(;o.length>0;){const t=await o[0];if(t===C)return;if(r.aborted)throw new l;t!==M&&(yield t),o.shift(),g()}await new S((t=>{h=t}))}}finally{c=!0,p&&(p(),p=null)}}.call(this)}async function k(t,e=void 0){for await(const n of D.call(this,t,e))return!0;return!1}function D(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);return N.call(this,(async function(e,n){return await t(e,n)?e:M}),e)}class L extends a{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function F(t){if(t=v(t),w(t))return 0;if(t<0)throw new o("number",">= 0",t);return t}t.exports.streamReturningOperators={asIndexedPairs:y((function(t=void 0){return null!=t&&p(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),async function*(){let e=0;for await(const i of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l({cause:t.signal.reason});yield[e++,i]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(t,e=void 0){return null!=e&&p(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),t=F(t),async function*(){var n;if(null!=e&&null!==(n=e.signal)&&void 0!==n&&n.aborted)throw new l;for await(const n of this){var i;if(null!=e&&null!==(i=e.signal)&&void 0!==i&&i.aborted)throw new l;t--<=0&&(yield n)}}.call(this)},filter:D,flatMap:function(t,e){const n=N.call(this,t,e);return async function*(){for await(const t of n)yield*t}.call(this)},map:N,take:function(t,e=void 0){return null!=e&&p(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),t=F(t),async function*(){var n;if(null!=e&&null!==(n=e.signal)&&void 0!==n&&n.aborted)throw new l;for await(const n of this){var i;if(null!=e&&null!==(i=e.signal)&&void 0!==i&&i.aborted)throw new l;if(t-- >0&&(yield n),t<=0)return}}.call(this)},compose:function(t,e){if(null!=e&&p(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),T(t)&&!_(t))throw new s("stream",t,"must be writable");const n=m(this,t);return null!=e&&e.signal&&g(e.signal,n),n}},t.exports.promiseReturningOperators={every:async function(t,e=void 0){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);return!await k.call(this,(async(...e)=>!await t(...e)),e)},forEach:async function(t,e){if("function"!=typeof t)throw new r("fn",["Function","AsyncFunction"],t);for await(const n of N.call(this,(async function(e,n){return await t(e,n),M}),e));},reduce:async function(t,e,n){var s;if("function"!=typeof t)throw new r("reducer",["Function","AsyncFunction"],t);null!=n&&p(n,"options"),null!=(null==n?void 0:n.signal)&&u(n.signal,"options.signal");let a=arguments.length>1;if(null!=n&&null!==(s=n.signal)&&void 0!==s&&s.aborted){const t=new l(void 0,{cause:n.signal.reason});throw this.once("error",(()=>{})),await f(this.destroy(t)),t}const o=new i,h=o.signal;if(null!=n&&n.signal){const t={once:!0,[c]:this,[d]:!0};n.signal.addEventListener("abort",(()=>o.abort()),t)}let m=!1;try{for await(const i of this){var g;if(m=!0,null!=n&&null!==(g=n.signal)&&void 0!==g&&g.aborted)throw new l;a?e=await t(e,i,{signal:h}):(e=i,a=!0)}if(!m&&!a)throw new L}finally{o.abort()}return e},toArray:async function(t){null!=t&&p(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal");const e=[];for await(const i of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l(void 0,{cause:t.signal.reason});I(e,i)}return e},some:k,find:async function(t,e){for await(const n of D.call(this,t,e))return n}}},6898:(t,e,n)=>{"use strict";const{ObjectSetPrototypeOf:i}=n(4184);t.exports=r;const s=n(208);function r(t){if(!(this instanceof r))return new r(t);s.call(this,t)}i(r.prototype,s.prototype),i(r,s),r.prototype._transform=function(t,e,n){n(null,t)}},872:(t,e,n)=>{const i=n(5606),{ArrayIsArray:s,Promise:r,SymbolAsyncIterator:a,SymbolDispose:o}=n(4184),l=n(9700),{once:u}=n(798),h=n(2430),p=n(4992),{aggregateTwoErrors:c,codes:{ERR_INVALID_ARG_TYPE:d,ERR_INVALID_RETURN_VALUE:f,ERR_MISSING_ARGS:m,ERR_STREAM_DESTROYED:g,ERR_STREAM_PREMATURE_CLOSE:_},AbortError:T}=n(6605),{validateFunction:y,validateAbortSignal:I}=n(6283),{isIterable:E,isReadable:b,isReadableNodeStream:v,isNodeStream:w,isTransformStream:S,isWebStream:x,isReadableStream:R,isReadableFinished:O}=n(6569),A=globalThis.AbortController||n(5568).AbortController;let M,C,N;function k(t,e,n){let i=!1;t.on("close",(()=>{i=!0}));return{destroy:e=>{i||(i=!0,h.destroyer(t,e||new g("pipe")))},cleanup:l(t,{readable:e,writable:n},(t=>{i=!t}))}}function D(t){if(E(t))return t;if(v(t))return async function*(t){C||(C=n(6566));yield*C.prototype[a].call(t)}(t);throw new d("val",["Readable","Iterable","AsyncIterable"],t)}async function L(t,e,n,{end:i}){let s,a=null;const o=t=>{if(t&&(s=t),a){const t=a;a=null,t()}},u=()=>new r(((t,e)=>{s?e(s):a=()=>{s?e(s):t()}}));e.on("drain",o);const h=l(e,{readable:!1},o);try{e.writableNeedDrain&&await u();for await(const n of t)e.write(n)||await u();i&&(e.end(),await u()),n()}catch(t){n(s!==t?c(s,t):t)}finally{h(),e.off("drain",o)}}async function F(t,e,n,{end:i}){S(e)&&(e=e.writable);const s=e.getWriter();try{for await(const e of t)await s.ready,s.write(e).catch((()=>{}));await s.ready,i&&await s.close(),n()}catch(t){try{await s.abort(t),n(t)}catch(t){n(t)}}}function P(t,e,r){if(1===t.length&&s(t[0])&&(t=t[0]),t.length<2)throw new m("streams");const a=new A,l=a.signal,u=null==r?void 0:r.signal,h=[];function c(){V(new T)}let g,_,y;I(u,"options.signal"),N=N||n(798).addAbortListener,u&&(g=N(u,c));const O=[];let C,P=0;function B(t){V(t,0==--P)}function V(t,n){var s;if(!t||_&&"ERR_STREAM_PREMATURE_CLOSE"!==_.code||(_=t),_||n){for(;O.length;)O.shift()(_);null===(s=g)||void 0===s||s[o](),a.abort(),n&&(_||h.forEach((t=>t())),i.nextTick(e,_,y))}}for(let H=0;H0,j=z||!1!==(null==r?void 0:r.end),q=H===t.length-1;if(w(W)){if(j){const{destroy:K,cleanup:Q}=k(W,z,X);O.push(K),b(W)&&q&&h.push(Q)}function U(t){t&&"AbortError"!==t.name&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code&&B(t)}W.on("error",U),b(W)&&q&&h.push((()=>{W.removeListener("error",U)}))}if(0===H)if("function"==typeof W){if(C=W({signal:l}),!E(C))throw new f("Iterable, AsyncIterable or Stream","source",C)}else C=E(W)||v(W)||S(W)?W:p.from(W);else if("function"==typeof W){var Y;if(S(C))C=D(null===(Y=C)||void 0===Y?void 0:Y.readable);else C=D(C);if(C=W(C,{signal:l}),z){if(!E(C,!0))throw new f("AsyncIterable",`transform[${H-1}]`,C)}else{var G;M||(M=n(6898));const J=new M({objectMode:!0}),Z=null===(G=C)||void 0===G?void 0:G.then;if("function"==typeof Z)P++,Z.call(C,(t=>{y=t,null!=t&&J.write(t),j&&J.end(),i.nextTick(B)}),(t=>{J.destroy(t),i.nextTick(B,t)}));else if(E(C,!0))P++,L(C,J,B,{end:j});else{if(!R(C)&&!S(C))throw new f("AsyncIterable or Promise","destination",C);{const nt=C.readable||C;P++,L(nt,J,B,{end:j})}}C=J;const{destroy:tt,cleanup:et}=k(C,!1,!0);O.push(tt),q&&h.push(et)}}else if(w(W)){if(v(C)){P+=2;const it=$(C,W,B,{end:j});b(W)&&q&&h.push(it)}else if(S(C)||R(C)){const st=C.readable||C;P++,L(st,W,B,{end:j})}else{if(!E(C))throw new d("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],C);P++,L(C,W,B,{end:j})}C=W}else if(x(W)){if(v(C))P++,F(D(C),W,B,{end:j});else if(R(C)||E(C))P++,F(C,W,B,{end:j});else{if(!S(C))throw new d("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],C);P++,F(C.readable,W,B,{end:j})}C=W}else C=p.from(W)}return(null!=l&&l.aborted||null!=u&&u.aborted)&&i.nextTick(c),C}function $(t,e,n,{end:s}){let r=!1;if(e.on("close",(()=>{r||n(new _)})),t.pipe(e,{end:!1}),s){function a(){r=!0,e.end()}O(t)?i.nextTick(a):t.once("end",a)}else n();return l(t,{readable:!0,writable:!1},(e=>{const i=t._readableState;e&&"ERR_STREAM_PREMATURE_CLOSE"===e.code&&i&&i.ended&&!i.errored&&!i.errorEmitted?t.once("end",n).once("error",n):n(e)})),l(e,{readable:!1,writable:!0},n)}t.exports={pipelineImpl:P,pipeline:function(...t){return P(t,u(function(t){return y(t[t.length-1],"streams[stream.length - 1]"),t.pop()}(t)))}}},6566:(t,e,n)=>{const i=n(5606),{ArrayPrototypeIndexOf:s,NumberIsInteger:r,NumberIsNaN:a,NumberParseInt:o,ObjectDefineProperties:l,ObjectKeys:u,ObjectSetPrototypeOf:h,Promise:p,SafeSet:c,SymbolAsyncDispose:d,SymbolAsyncIterator:f,Symbol:m}=n(4184);t.exports=q,q.ReadableState=j;const{EventEmitter:g}=n(7007),{Stream:_,prependListener:T}=n(2913),{Buffer:y}=n(8287),{addAbortSignal:I}=n(153),E=n(9700);let b=n(798).debuglog("stream",(t=>{b=t}));const v=n(1515),w=n(2430),{getHighWaterMark:S,getDefaultHighWaterMark:x}=n(9153),{aggregateTwoErrors:R,codes:{ERR_INVALID_ARG_TYPE:O,ERR_METHOD_NOT_IMPLEMENTED:A,ERR_OUT_OF_RANGE:M,ERR_STREAM_PUSH_AFTER_EOF:C,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N},AbortError:k}=n(6605),{validateObject:D}=n(6283),L=m("kPaused"),{StringDecoder:F}=n(8707),P=n(3182);h(q.prototype,_.prototype),h(q,_);const $=()=>{},{errorOrDestroy:B}=w,V=1,U=16,Y=32,G=64,H=2048,W=4096,z=65536;function X(t){return{enumerable:!1,get(){return!!(this.state&t)},set(e){e?this.state|=t:this.state&=~t}}}function j(t,e,i){"boolean"!=typeof i&&(i=e instanceof n(4992)),this.state=H|W|U|Y,t&&t.objectMode&&(this.state|=V),i&&t&&t.readableObjectMode&&(this.state|=V),this.highWaterMark=t?S(this,t,"readableHighWaterMark",i):x(!1),this.buffer=new v,this.length=0,this.pipes=[],this.flowing=null,this[L]=null,t&&!1===t.emitClose&&(this.state&=~H),t&&!1===t.autoDestroy&&(this.state&=~W),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new F(t.encoding),this.encoding=t.encoding)}function q(t){if(!(this instanceof q))return new q(t);const e=this instanceof n(4992);this._readableState=new j(t,this,e),t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&!e&&I(t.signal,this)),_.call(this,t),w.construct(this,(()=>{this._readableState.needReadable&&et(this,this._readableState)}))}function K(t,e,n,i){b("readableAddChunk",e);const s=t._readableState;let r;if(s.state&V||("string"==typeof e?(n=n||s.defaultEncoding,s.encoding!==n&&(i&&s.encoding?e=y.from(e,n).toString(s.encoding):(e=y.from(e,n),n=""))):e instanceof y?n="":_._isUint8Array(e)?(e=_._uint8ArrayToBuffer(e),n=""):null!=e&&(r=new O("chunk",["string","Buffer","Uint8Array"],e))),r)B(t,r);else if(null===e)s.state&=-9,function(t,e){if(b("onEofChunk"),e.ended)return;if(e.decoder){const t=e.decoder.end();t&&t.length&&(e.buffer.push(t),e.length+=e.objectMode?1:t.length)}e.ended=!0,e.sync?Z(t):(e.needReadable=!1,e.emittedReadable=!0,tt(t))}(t,s);else if(s.state&V||e&&e.length>0)if(i)if(4&s.state)B(t,new N);else{if(s.destroyed||s.errored)return!1;Q(t,s,e,!0)}else if(s.ended)B(t,new C);else{if(s.destroyed||s.errored)return!1;s.state&=-9,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?Q(t,s,e,!1):et(t,s)):Q(t,s,e,!1)}else i||(s.state&=-9,et(t,s));return!s.ended&&(s.length0?(e.state&z?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit("data",n)):(e.length+=e.objectMode?1:n.length,i?e.buffer.unshift(n):e.buffer.push(n),e.state&G&&Z(t)),et(t,e)}l(j.prototype,{objectMode:X(V),ended:X(2),endEmitted:X(4),reading:X(8),constructed:X(U),sync:X(Y),needReadable:X(G),emittedReadable:X(128),readableListening:X(256),resumeScheduled:X(512),errorEmitted:X(1024),emitClose:X(H),autoDestroy:X(W),destroyed:X(8192),closed:X(16384),closeEmitted:X(32768),multiAwaitDrain:X(z),readingMore:X(1<<17),dataEmitted:X(1<<18)}),q.prototype.destroy=w.destroy,q.prototype._undestroy=w.undestroy,q.prototype._destroy=function(t,e){e(t)},q.prototype[g.captureRejectionSymbol]=function(t){this.destroy(t)},q.prototype[d]=function(){let t;return this.destroyed||(t=this.readableEnded?null:new k,this.destroy(t)),new p(((e,n)=>E(this,(i=>i&&i!==t?n(i):e(null)))))},q.prototype.push=function(t,e){return K(this,t,e,!1)},q.prototype.unshift=function(t,e){return K(this,t,e,!0)},q.prototype.isPaused=function(){const t=this._readableState;return!0===t[L]||!1===t.flowing},q.prototype.setEncoding=function(t){const e=new F(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;const n=this._readableState.buffer;let i="";for(const t of n)i+=e.write(t);return n.clear(),""!==i&&n.push(i),this._readableState.length=i.length,this};function J(t,e){return t<=0||0===e.length&&e.ended?0:e.state&V?1:a(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}function Z(t){const e=t._readableState;b("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(b("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(tt,t))}function tt(t){const e=t._readableState;b("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||e.errored||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,at(t)}function et(t,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,i.nextTick(nt,t,e))}function nt(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!1===e[L]?e.flowing=!0:t.listenerCount("data")>0?t.resume():e.readableListening||(e.flowing=null)}function st(t){b("readable nexttick read 0"),t.read(0)}function rt(t,e){b("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),at(t),e.flowing&&!e.reading&&t.read(0)}function at(t){const e=t._readableState;for(b("flow",e.flowing);e.flowing&&null!==t.read(););}function ot(t,e){"function"!=typeof t.read&&(t=q.wrap(t,{objectMode:!0}));const n=async function*(t,e){let n,i=$;function s(e){this===t?(i(),i=$):i=e}t.on("readable",s);const r=E(t,{writable:!1},(t=>{n=t?R(n,t):null,i(),i=$}));try{for(;;){const e=t.destroyed?null:t.read();if(null!==e)yield e;else{if(n)throw n;if(null===n)return;await new p(s)}}}catch(t){throw n=R(n,t),n}finally{!n&&!1===(null==e?void 0:e.destroyOnReturn)||void 0!==n&&!t._readableState.autoDestroy?(t.off("readable",s),r()):w.destroyer(t,null)}}(t,e);return n.stream=t,n}function lt(t,e){if(0===e.length)return null;let n;return e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n}function ut(t){const e=t._readableState;b("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(ht,e,t))}function ht(t,e){if(b("endReadableNT",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&0===t.length)if(t.endEmitted=!0,e.emit("end"),e.writable&&!1===e.allowHalfOpen)i.nextTick(pt,e);else if(t.autoDestroy){const t=e._writableState;(!t||t.autoDestroy&&(t.finished||!1===t.writable))&&e.destroy()}}function pt(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end()}let ct;function dt(){return void 0===ct&&(ct={}),ct}q.prototype.read=function(t){b("read",t),void 0===t?t=NaN:r(t)||(t=o(t,10));const e=this._readableState,n=t;if(t>e.highWaterMark&&(e.highWaterMark=function(t){if(t>1073741824)throw new M("size","<= 1GiB",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,++t}(t)),0!==t&&(e.state&=-129),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return b("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?ut(this):Z(this),null;if(0===(t=J(t,e))&&e.ended)return 0===e.length&&ut(this),null;let i,s=!!(e.state&G);if(b("need readable",s),(0===e.length||e.length-t0?lt(t,e):null,null===i?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&ut(this)),null===i||e.errorEmitted||e.closeEmitted||(e.dataEmitted=!0,this.emit("data",i)),i},q.prototype._read=function(t){throw new A("_read()")},q.prototype.pipe=function(t,e){const n=this,s=this._readableState;1===s.pipes.length&&(s.multiAwaitDrain||(s.multiAwaitDrain=!0,s.awaitDrainWriters=new c(s.awaitDrainWriters?[s.awaitDrainWriters]:[]))),s.pipes.push(t),b("pipe count=%d opts=%j",s.pipes.length,e);const r=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?o:g;function a(e,i){b("onunpipe"),e===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,function(){b("cleanup"),t.removeListener("close",f),t.removeListener("finish",m),l&&t.removeListener("drain",l);t.removeListener("error",d),t.removeListener("unpipe",a),n.removeListener("end",o),n.removeListener("end",g),n.removeListener("data",p),u=!0,l&&s.awaitDrainWriters&&(!t._writableState||t._writableState.needDrain)&&l()}())}function o(){b("onend"),t.end()}let l;s.endEmitted?i.nextTick(r):n.once("end",r),t.on("unpipe",a);let u=!1;function h(){u||(1===s.pipes.length&&s.pipes[0]===t?(b("false write response, pause",0),s.awaitDrainWriters=t,s.multiAwaitDrain=!1):s.pipes.length>1&&s.pipes.includes(t)&&(b("false write response, pause",s.awaitDrainWriters.size),s.awaitDrainWriters.add(t)),n.pause()),l||(l=function(t,e){return function(){const n=t._readableState;n.awaitDrainWriters===e?(b("pipeOnDrain",1),n.awaitDrainWriters=null):n.multiAwaitDrain&&(b("pipeOnDrain",n.awaitDrainWriters.size),n.awaitDrainWriters.delete(e)),n.awaitDrainWriters&&0!==n.awaitDrainWriters.size||!t.listenerCount("data")||t.resume()}}(n,t),t.on("drain",l))}function p(e){b("ondata");const n=t.write(e);b("dest.write",n),!1===n&&h()}function d(e){if(b("onerror",e),g(),t.removeListener("error",d),0===t.listenerCount("error")){const n=t._writableState||t._readableState;n&&!n.errorEmitted?B(t,e):t.emit("error",e)}}function f(){t.removeListener("finish",m),g()}function m(){b("onfinish"),t.removeListener("close",f),g()}function g(){b("unpipe"),n.unpipe(t)}return n.on("data",p),T(t,"error",d),t.once("close",f),t.once("finish",m),t.emit("pipe",n),!0===t.writableNeedDrain?h():s.flowing||(b("pipe resume"),n.resume()),t},q.prototype.unpipe=function(t){const e=this._readableState;if(0===e.pipes.length)return this;if(!t){const t=e.pipes;e.pipes=[],this.pause();for(let e=0;e0,!1!==s.flowing&&this.resume()):"readable"===t&&(s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.flowing=!1,s.emittedReadable=!1,b("on readable",s.length,s.reading),s.length?Z(this):s.reading||i.nextTick(st,this))),n},q.prototype.addListener=q.prototype.on,q.prototype.removeListener=function(t,e){const n=_.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(it,this),n},q.prototype.off=q.prototype.removeListener,q.prototype.removeAllListeners=function(t){const e=_.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(it,this),e},q.prototype.resume=function(){const t=this._readableState;return t.flowing||(b("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(rt,t,e))}(this,t)),t[L]=!1,this},q.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[L]=!0,this},q.prototype.wrap=function(t){let e=!1;t.on("data",(n=>{!this.push(n)&&t.pause&&(e=!0,t.pause())})),t.on("end",(()=>{this.push(null)})),t.on("error",(t=>{B(this,t)})),t.on("close",(()=>{this.destroy()})),t.on("destroy",(()=>{this.destroy()})),this._read=()=>{e&&t.resume&&(e=!1,t.resume())};const n=u(t);for(let e=1;e{"use strict";const{MathFloor:i,NumberIsInteger:s}=n(4184),{validateInteger:r}=n(6283),{ERR_INVALID_ARG_VALUE:a}=n(6605).codes;let o=16384,l=16;function u(t){return t?l:o}t.exports={getHighWaterMark:function(t,e,n,r){const o=function(t,e,n){return null!=t.highWaterMark?t.highWaterMark:e?t[n]:null}(e,r,n);if(null!=o){if(!s(o)||o<0){throw new a(r?`options.${n}`:"options.highWaterMark",o)}return i(o)}return u(t.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(t,e){r(e,"value",0),t?l=e:o=e}}},208:(t,e,n)=>{"use strict";const{ObjectSetPrototypeOf:i,Symbol:s}=n(4184);t.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:r}=n(6605).codes,a=n(4992),{getHighWaterMark:o}=n(9153);i(u.prototype,a.prototype),i(u,a);const l=s("kCallback");function u(t){if(!(this instanceof u))return new u(t);const e=t?o(this,t,"readableHighWaterMark",!0):null;0===e&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),a.call(this,t),this._readableState.sync=!1,this[l]=null,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",p)}function h(t){"function"!=typeof this._flush||this.destroyed?(this.push(null),t&&t()):this._flush(((e,n)=>{e?t?t(e):this.destroy(e):(null!=n&&this.push(n),this.push(null),t&&t())}))}function p(){this._final!==h&&h.call(this)}u.prototype._final=h,u.prototype._transform=function(t,e,n){throw new r("_transform()")},u.prototype._write=function(t,e,n){const i=this._readableState,s=this._writableState,r=i.length;this._transform(t,e,((t,e)=>{t?n(t):(null!=e&&this.push(e),s.ended||r===i.length||i.length{"use strict";const{SymbolAsyncIterator:i,SymbolIterator:s,SymbolFor:r}=n(4184),a=r("nodejs.stream.destroyed"),o=r("nodejs.stream.errored"),l=r("nodejs.stream.readable"),u=r("nodejs.stream.writable"),h=r("nodejs.stream.disturbed"),p=r("nodejs.webstream.isClosedPromise"),c=r("nodejs.webstream.controllerErrorFunction");function d(t,e=!1){var n;return!(!t||"function"!=typeof t.pipe||"function"!=typeof t.on||e&&("function"!=typeof t.pause||"function"!=typeof t.resume)||t._writableState&&!1===(null===(n=t._readableState)||void 0===n?void 0:n.readable)||t._writableState&&!t._readableState)}function f(t){var e;return!(!t||"function"!=typeof t.write||"function"!=typeof t.on||t._readableState&&!1===(null===(e=t._writableState)||void 0===e?void 0:e.writable))}function m(t){return t&&(t._readableState||t._writableState||"function"==typeof t.write&&"function"==typeof t.on||"function"==typeof t.pipe&&"function"==typeof t.on)}function g(t){return!(!t||m(t)||"function"!=typeof t.pipeThrough||"function"!=typeof t.getReader||"function"!=typeof t.cancel)}function _(t){return!(!t||m(t)||"function"!=typeof t.getWriter||"function"!=typeof t.abort)}function T(t){return!(!t||m(t)||"object"!=typeof t.readable||"object"!=typeof t.writable)}function y(t){if(!m(t))return null;const e=t._writableState,n=t._readableState,i=e||n;return!!(t.destroyed||t[a]||null!=i&&i.destroyed)}function I(t){if(!f(t))return null;if(!0===t.writableEnded)return!0;const e=t._writableState;return(null==e||!e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)}function E(t,e){if(!d(t))return null;const n=t._readableState;return(null==n||!n.errored)&&("boolean"!=typeof(null==n?void 0:n.endEmitted)?null:!!(n.endEmitted||!1===e&&!0===n.ended&&0===n.length))}function b(t){return t&&null!=t[l]?t[l]:"boolean"!=typeof(null==t?void 0:t.readable)?null:!y(t)&&(d(t)&&t.readable&&!E(t))}function v(t){return t&&null!=t[u]?t[u]:"boolean"!=typeof(null==t?void 0:t.writable)?null:!y(t)&&(f(t)&&t.writable&&!I(t))}function w(t){return"boolean"==typeof t._closed&&"boolean"==typeof t._defaultKeepAlive&&"boolean"==typeof t._removedConnection&&"boolean"==typeof t._removedContLen}function S(t){return"boolean"==typeof t._sent100&&w(t)}t.exports={isDestroyed:y,kIsDestroyed:a,isDisturbed:function(t){var e;return!(!t||!(null!==(e=t[h])&&void 0!==e?e:t.readableDidRead||t.readableAborted))},kIsDisturbed:h,isErrored:function(t){var e,n,i,s,r,a,l,u,h,p;return!(!t||!(null!==(e=null!==(n=null!==(i=null!==(s=null!==(r=null!==(a=t[o])&&void 0!==a?a:t.readableErrored)&&void 0!==r?r:t.writableErrored)&&void 0!==s?s:null===(l=t._readableState)||void 0===l?void 0:l.errorEmitted)&&void 0!==i?i:null===(u=t._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==n?n:null===(h=t._readableState)||void 0===h?void 0:h.errored)&&void 0!==e?e:null===(p=t._writableState)||void 0===p?void 0:p.errored))},kIsErrored:o,isReadable:b,kIsReadable:l,kIsClosedPromise:p,kControllerErrorFunction:c,kIsWritable:u,isClosed:function(t){if(!m(t))return null;if("boolean"==typeof t.closed)return t.closed;const e=t._writableState,n=t._readableState;return"boolean"==typeof(null==e?void 0:e.closed)||"boolean"==typeof(null==n?void 0:n.closed)?(null==e?void 0:e.closed)||(null==n?void 0:n.closed):"boolean"==typeof t._closed&&w(t)?t._closed:null},isDuplexNodeStream:function(t){return!(!t||"function"!=typeof t.pipe||!t._readableState||"function"!=typeof t.on||"function"!=typeof t.write)},isFinished:function(t,e){return m(t)?!!y(t)||(!1===(null==e?void 0:e.readable)||!b(t))&&(!1===(null==e?void 0:e.writable)||!v(t)):null},isIterable:function(t,e){return null!=t&&(!0===e?"function"==typeof t[i]:!1===e?"function"==typeof t[s]:"function"==typeof t[i]||"function"==typeof t[s])},isReadableNodeStream:d,isReadableStream:g,isReadableEnded:function(t){if(!d(t))return null;if(!0===t.readableEnded)return!0;const e=t._readableState;return!(!e||e.errored)&&("boolean"!=typeof(null==e?void 0:e.ended)?null:e.ended)},isReadableFinished:E,isReadableErrored:function(t){var e,n;return m(t)?t.readableErrored?t.readableErrored:null!==(e=null===(n=t._readableState)||void 0===n?void 0:n.errored)&&void 0!==e?e:null:null},isNodeStream:m,isWebStream:function(t){return g(t)||_(t)||T(t)},isWritable:v,isWritableNodeStream:f,isWritableStream:_,isWritableEnded:I,isWritableFinished:function(t,e){if(!f(t))return null;if(!0===t.writableFinished)return!0;const n=t._writableState;return(null==n||!n.errored)&&("boolean"!=typeof(null==n?void 0:n.finished)?null:!!(n.finished||!1===e&&!0===n.ended&&0===n.length))},isWritableErrored:function(t){var e,n;return m(t)?t.writableErrored?t.writableErrored:null!==(e=null===(n=t._writableState)||void 0===n?void 0:n.errored)&&void 0!==e?e:null:null},isServerRequest:function(t){var e;return"boolean"==typeof t._consuming&&"boolean"==typeof t._dumped&&void 0===(null===(e=t.req)||void 0===e?void 0:e.upgradeOrConnect)},isServerResponse:S,willEmitClose:function(t){if(!m(t))return null;const e=t._writableState,n=t._readableState,i=e||n;return!i&&S(t)||!!(i&&i.autoDestroy&&i.emitClose&&!1===i.closed)},isTransformStream:T}},394:(t,e,n)=>{const i=n(5606),{ArrayPrototypeSlice:s,Error:r,FunctionPrototypeSymbolHasInstance:a,ObjectDefineProperty:o,ObjectDefineProperties:l,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:h,Symbol:p,SymbolHasInstance:c}=n(4184);t.exports=D,D.WritableState=N;const{EventEmitter:d}=n(7007),f=n(2913).Stream,{Buffer:m}=n(8287),g=n(2430),{addAbortSignal:_}=n(153),{getHighWaterMark:T,getDefaultHighWaterMark:y}=n(9153),{ERR_INVALID_ARG_TYPE:I,ERR_METHOD_NOT_IMPLEMENTED:E,ERR_MULTIPLE_CALLBACK:b,ERR_STREAM_CANNOT_PIPE:v,ERR_STREAM_DESTROYED:w,ERR_STREAM_ALREADY_FINISHED:S,ERR_STREAM_NULL_VALUES:x,ERR_STREAM_WRITE_AFTER_END:R,ERR_UNKNOWN_ENCODING:O}=n(6605).codes,{errorOrDestroy:A}=g;function M(){}u(D.prototype,f.prototype),u(D,f);const C=p("kOnFinished");function N(t,e,i){"boolean"!=typeof i&&(i=e instanceof n(4992)),this.objectMode=!(!t||!t.objectMode),i&&(this.objectMode=this.objectMode||!(!t||!t.writableObjectMode)),this.highWaterMark=t?T(this,t,"writableHighWaterMark",i):y(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const s=!(!t||!1!==t.decodeStrings);this.decodeStrings=!s,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=$.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,k(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||!1!==t.emitClose,this.autoDestroy=!t||!1!==t.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[C]=[]}function k(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0}function D(t){const e=this instanceof n(4992);if(!e&&!a(D,this))return new D(t);this._writableState=new N(t,this,e),t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&_(t.signal,this)),f.call(this,t),g.construct(this,(()=>{const t=this._writableState;t.writing||Y(this,t),W(this,t)}))}function L(t,e,n,s){const r=t._writableState;if("function"==typeof n)s=n,n=r.defaultEncoding;else{if(n){if("buffer"!==n&&!m.isEncoding(n))throw new O(n)}else n=r.defaultEncoding;"function"!=typeof s&&(s=M)}if(null===e)throw new x;if(!r.objectMode)if("string"==typeof e)!1!==r.decodeStrings&&(e=m.from(e,n),n="buffer");else if(e instanceof m)n="buffer";else{if(!f._isUint8Array(e))throw new I("chunk",["string","Buffer","Uint8Array"],e);e=f._uint8ArrayToBuffer(e),n="buffer"}let a;return r.ending?a=new R:r.destroyed&&(a=new w("write")),a?(i.nextTick(s,a),A(t,a,!0),a):(r.pendingcb++,function(t,e,n,i,s){const r=e.objectMode?1:n.length;e.length+=r;const a=e.lengthn.bufferedIndex&&Y(t,n),s?null!==n.afterWriteTickInfo&&n.afterWriteTickInfo.cb===r?n.afterWriteTickInfo.count++:(n.afterWriteTickInfo={count:1,cb:r,stream:t,state:n},i.nextTick(B,n.afterWriteTickInfo)):V(t,n,1,r))):A(t,new b)}function B({stream:t,state:e,count:n,cb:i}){return e.afterWriteTickInfo=null,V(t,e,n,i)}function V(t,e,n,i){for(!e.ending&&!t.destroyed&&0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));n-- >0;)e.pendingcb--,i();e.destroyed&&U(e),W(t,e)}function U(t){if(t.writing)return;for(let n=t.bufferedIndex;n1&&t._writev){e.pendingcb-=a-1;const i=e.allNoop?M:t=>{for(let e=o;e256?(n.splice(0,o),e.bufferedIndex=0):e.bufferedIndex=o}e.bufferProcessing=!1}function G(t){return t.ending&&!t.destroyed&&t.constructed&&0===t.length&&!t.errored&&0===t.buffered.length&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function H(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.finalCalled=!0,function(t,e){let n=!1;function s(s){if(n)A(t,null!=s?s:b());else if(n=!0,e.pendingcb--,s){const n=e[C].splice(0);for(let t=0;t{G(e)?z(t,e):e.pendingcb--}),t,e)):G(e)&&(e.pendingcb++,z(t,e))))}function z(t,e){e.pendingcb--,e.finished=!0;const n=e[C].splice(0);for(let t=0;t{"use strict";const{ArrayIsArray:i,ArrayPrototypeIncludes:s,ArrayPrototypeJoin:r,ArrayPrototypeMap:a,NumberIsInteger:o,NumberIsNaN:l,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:h,NumberParseInt:p,ObjectPrototypeHasOwnProperty:c,RegExpPrototypeExec:d,String:f,StringPrototypeToUpperCase:m,StringPrototypeTrim:g}=n(4184),{hideStackFrames:_,codes:{ERR_SOCKET_BAD_PORT:T,ERR_INVALID_ARG_TYPE:y,ERR_INVALID_ARG_VALUE:I,ERR_OUT_OF_RANGE:E,ERR_UNKNOWN_SIGNAL:b}}=n(6605),{normalizeEncoding:v}=n(798),{isAsyncFunction:w,isArrayBufferView:S}=n(798).types,x={};const R=/^[0-7]+$/;const O=_(((t,e,n=h,i=u)=>{if("number"!=typeof t)throw new y(e,"number",t);if(!o(t))throw new E(e,"an integer",t);if(ti)throw new E(e,`>= ${n} && <= ${i}`,t)})),A=_(((t,e,n=-2147483648,i=2147483647)=>{if("number"!=typeof t)throw new y(e,"number",t);if(!o(t))throw new E(e,"an integer",t);if(ti)throw new E(e,`>= ${n} && <= ${i}`,t)})),M=_(((t,e,n=!1)=>{if("number"!=typeof t)throw new y(e,"number",t);if(!o(t))throw new E(e,"an integer",t);const i=n?1:0,s=4294967295;if(ts)throw new E(e,`>= ${i} && <= ${s}`,t)}));function C(t,e){if("string"!=typeof t)throw new y(e,"string",t)}const N=_(((t,e,n)=>{if(!s(n,t)){const i=r(a(n,(t=>"string"==typeof t?`'${t}'`:f(t))),", ");throw new I(e,t,"must be one of: "+i)}}));function k(t,e){if("boolean"!=typeof t)throw new y(e,"boolean",t)}function D(t,e,n){return null!=t&&c(t,e)?t[e]:n}const L=_(((t,e,n=null)=>{const s=D(n,"allowArray",!1),r=D(n,"allowFunction",!1);if(!D(n,"nullable",!1)&&null===t||!s&&i(t)||"object"!=typeof t&&(!r||"function"!=typeof t))throw new y(e,"Object",t)})),F=_(((t,e)=>{if(null!=t&&"object"!=typeof t&&"function"!=typeof t)throw new y(e,"a dictionary",t)})),P=_(((t,e,n=0)=>{if(!i(t))throw new y(e,"Array",t);if(t.length{if(!S(t))throw new y(e,["Buffer","TypedArray","DataView"],t)}));const B=_(((t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new y(e,"AbortSignal",t)})),V=_(((t,e)=>{if("function"!=typeof t)throw new y(e,"Function",t)})),U=_(((t,e)=>{if("function"!=typeof t||w(t))throw new y(e,"Function",t)})),Y=_(((t,e)=>{if(void 0!==t)throw new y(e,"undefined",t)}));const G=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function H(t,e){if(void 0===t||!d(G,t))throw new I(e,t,'must be an array or string of format "; rel=preload; as=style"')}t.exports={isInt32:function(t){return t===(0|t)},isUint32:function(t){return t===t>>>0},parseFileMode:function(t,e,n){if(void 0===t&&(t=n),"string"==typeof t){if(null===d(R,t))throw new I(e,t,"must be a 32-bit unsigned integer or an octal string");t=p(t,8)}return M(t,e),t},validateArray:P,validateStringArray:function(t,e){P(t,e);for(let n=0;ni||(null!=n||null!=i)&&l(t))throw new E(e,`${null!=n?`>= ${n}`:""}${null!=n&&null!=i?" && ":""}${null!=i?`<= ${i}`:""}`,t)},validateObject:L,validateOneOf:N,validatePlainFunction:U,validatePort:function(t,e="Port",n=!0){if("number"!=typeof t&&"string"!=typeof t||"string"==typeof t&&0===g(t).length||+t!=+t>>>0||t>65535||0===t&&!n)throw new T(e,t,n);return 0|t},validateSignalName:function(t,e="signal"){if(C(t,e),void 0===x[t]){if(void 0!==x[m(t)])throw new b(t+" (signals must use all capital letters)");throw new b(t)}},validateString:C,validateUint32:M,validateUndefined:Y,validateUnion:function(t,e,n){if(!s(n,t))throw new y(e,`('${r(n,"|")}')`,t)},validateAbortSignal:B,validateLinkHeaderValue:function(t){if("string"==typeof t)return H(t,"hints"),t;if(i(t)){const e=t.length;let n="";if(0===e)return n;for(let i=0;i; rel=preload; as=style"')}}},6248:(t,e,n)=>{"use strict";const i=n(4612),s=n(105),r=i.Readable.destroy;t.exports=i.Readable,t.exports._uint8ArrayToBuffer=i._uint8ArrayToBuffer,t.exports._isUint8Array=i._isUint8Array,t.exports.isDisturbed=i.isDisturbed,t.exports.isErrored=i.isErrored,t.exports.isReadable=i.isReadable,t.exports.Readable=i.Readable,t.exports.Writable=i.Writable,t.exports.Duplex=i.Duplex,t.exports.Transform=i.Transform,t.exports.PassThrough=i.PassThrough,t.exports.addAbortSignal=i.addAbortSignal,t.exports.finished=i.finished,t.exports.destroy=i.destroy,t.exports.destroy=r,t.exports.pipeline=i.pipeline,t.exports.compose=i.compose,Object.defineProperty(i,"promises",{configurable:!0,enumerable:!0,get:()=>s}),t.exports.Stream=i.Stream,t.exports.default=t.exports},6605:(t,e,n)=>{"use strict";const{format:i,inspect:s,AggregateError:r}=n(798),a=globalThis.AggregateError||r,o=Symbol("kIsNodeError"),l=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,h={};function p(t,e){if(!t)throw new h.ERR_INTERNAL_ASSERTION(e)}function c(t){let e="",n=t.length;const i="-"===t[0]?1:0;for(;n>=i+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function d(t,e,n){n||(n=Error);class s extends n{constructor(...n){super(function(t,e,n){if("function"==typeof e)return p(e.length<=n.length,`Code: ${t}; The provided arguments length (${n.length}) does not match the required ones (${e.length}).`),e(...n);const s=(e.match(/%[dfijoOs]/g)||[]).length;return p(s===n.length,`Code: ${t}; The provided arguments length (${n.length}) does not match the required ones (${s}).`),0===n.length?e:i(e,...n)}(t,e,n))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(s.prototype,{name:{value:n.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),s.prototype.code=t,s.prototype[o]=!0,h[t]=s}function f(t){const e="__node_internal_"+t.name;return Object.defineProperty(t,"name",{value:e}),t}class m extends Error{constructor(t="The operation was aborted",e=void 0){if(void 0!==e&&"object"!=typeof e)throw new h.ERR_INVALID_ARG_TYPE("options","Object",e);super(t,e),this.code="ABORT_ERR",this.name="AbortError"}}d("ERR_ASSERTION","%s",Error),d("ERR_INVALID_ARG_TYPE",((t,e,n)=>{p("string"==typeof t,"'name' must be a string"),Array.isArray(e)||(e=[e]);let i="The ";t.endsWith(" argument")?i+=`${t} `:i+=`"${t}" ${t.includes(".")?"property":"argument"} `,i+="must be ";const r=[],a=[],o=[];for(const t of e)p("string"==typeof t,"All expected entries have to be of type string"),l.includes(t)?r.push(t.toLowerCase()):u.test(t)?a.push(t):(p("object"!==t,'The value "object" should be written as "Object"'),o.push(t));if(a.length>0){const t=r.indexOf("object");-1!==t&&(r.splice(r,t,1),a.push("Object"))}if(r.length>0){switch(r.length){case 1:i+=`of type ${r[0]}`;break;case 2:i+=`one of type ${r[0]} or ${r[1]}`;break;default:{const t=r.pop();i+=`one of type ${r.join(", ")}, or ${t}`}}(a.length>0||o.length>0)&&(i+=" or ")}if(a.length>0){switch(a.length){case 1:i+=`an instance of ${a[0]}`;break;case 2:i+=`an instance of ${a[0]} or ${a[1]}`;break;default:{const t=a.pop();i+=`an instance of ${a.join(", ")}, or ${t}`}}o.length>0&&(i+=" or ")}switch(o.length){case 0:break;case 1:o[0].toLowerCase()!==o[0]&&(i+="an "),i+=`${o[0]}`;break;case 2:i+=`one of ${o[0]} or ${o[1]}`;break;default:{const t=o.pop();i+=`one of ${o.join(", ")}, or ${t}`}}if(null==n)i+=`. Received ${n}`;else if("function"==typeof n&&n.name)i+=`. Received function ${n.name}`;else if("object"==typeof n){var h;if(null!==(h=n.constructor)&&void 0!==h&&h.name)i+=`. Received an instance of ${n.constructor.name}`;else{i+=`. Received ${s(n,{depth:-1})}`}}else{let t=s(n,{colors:!1});t.length>25&&(t=`${t.slice(0,25)}...`),i+=`. Received type ${typeof n} (${t})`}return i}),TypeError),d("ERR_INVALID_ARG_VALUE",((t,e,n="is invalid")=>{let i=s(e);i.length>128&&(i=i.slice(0,128)+"...");return`The ${t.includes(".")?"property":"argument"} '${t}' ${n}. Received ${i}`}),TypeError),d("ERR_INVALID_RETURN_VALUE",((t,e,n)=>{var i;return`Expected ${t} to be returned from the "${e}" function but got ${null!=n&&null!==(i=n.constructor)&&void 0!==i&&i.name?`instance of ${n.constructor.name}`:"type "+typeof n}.`}),TypeError),d("ERR_MISSING_ARGS",((...t)=>{let e;p(t.length>0,"At least one arg needs to be specified");const n=t.length;switch(t=(Array.isArray(t)?t:[t]).map((t=>`"${t}"`)).join(" or "),n){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{const n=t.pop();e+=`The ${t.join(", ")}, and ${n} arguments`}}return`${e} must be specified`}),TypeError),d("ERR_OUT_OF_RANGE",((t,e,n)=>{let i;return p(e,'Missing "range" argument'),Number.isInteger(n)&&Math.abs(n)>2**32?i=c(String(n)):"bigint"==typeof n?(i=String(n),(n>2n**32n||n<-(2n**32n))&&(i=c(i)),i+="n"):i=s(n),`The value of "${t}" is out of range. It must be ${e}. Received ${i}`}),RangeError),d("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),d("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),d("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),d("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),d("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),d("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),d("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),d("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),d("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),d("ERR_STREAM_WRITE_AFTER_END","write after end",Error),d("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),t.exports={AbortError:m,aggregateTwoErrors:f((function(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;const n=new a([e,t],e.message);return n.code=e.code,n}return t||e})),hideStackFrames:f,codes:h}},4184:t=>{"use strict";t.exports={ArrayIsArray:t=>Array.isArray(t),ArrayPrototypeIncludes:(t,e)=>t.includes(e),ArrayPrototypeIndexOf:(t,e)=>t.indexOf(e),ArrayPrototypeJoin:(t,e)=>t.join(e),ArrayPrototypeMap:(t,e)=>t.map(e),ArrayPrototypePop:(t,e)=>t.pop(e),ArrayPrototypePush:(t,e)=>t.push(e),ArrayPrototypeSlice:(t,e,n)=>t.slice(e,n),Error,FunctionPrototypeCall:(t,e,...n)=>t.call(e,...n),FunctionPrototypeSymbolHasInstance:(t,e)=>Function.prototype[Symbol.hasInstance].call(t,e),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(t,e)=>Object.defineProperties(t,e),ObjectDefineProperty:(t,e,n)=>Object.defineProperty(t,e,n),ObjectGetOwnPropertyDescriptor:(t,e)=>Object.getOwnPropertyDescriptor(t,e),ObjectKeys:t=>Object.keys(t),ObjectSetPrototypeOf:(t,e)=>Object.setPrototypeOf(t,e),Promise,PromisePrototypeCatch:(t,e)=>t.catch(e),PromisePrototypeThen:(t,e,n)=>t.then(e,n),PromiseReject:t=>Promise.reject(t),PromiseResolve:t=>Promise.resolve(t),ReflectApply:Reflect.apply,RegExpPrototypeTest:(t,e)=>t.test(e),SafeSet:Set,String,StringPrototypeSlice:(t,e,n)=>t.slice(e,n),StringPrototypeToLowerCase:t=>t.toLowerCase(),StringPrototypeToUpperCase:t=>t.toUpperCase(),StringPrototypeTrim:t=>t.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(t,e,n)=>t.set(e,n),Boolean,Uint8Array}},798:(t,e,n)=>{"use strict";const i=n(8287),{kResistStopPropagation:s,SymbolDispose:r}=n(4184),a=globalThis.AbortSignal||n(5568).AbortSignal,o=globalThis.AbortController||n(5568).AbortController,l=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||i.Blob,h=void 0!==u?function(t){return t instanceof u}:function(t){return!1},p=(t,e)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new ERR_INVALID_ARG_TYPE(e,"AbortSignal",t)};class c extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError("Expected input to be an Array, got "+typeof t);let e="";for(let n=0;n{t=n,e=i})),resolve:t,reject:e}},promisify:t=>new Promise(((e,n)=>{t(((t,...i)=>t?n(t):e(...i)))})),debuglog:()=>function(){},format:(t,...e)=>t.replace(/%([sdifj])/g,(function(...[t,n]){const i=e.shift();if("f"===n)return i.toFixed(6);if("j"===n)return JSON.stringify(i);if("s"===n&&"object"==typeof i){return`${i.constructor!==Object?i.constructor.name:""} {}`.trim()}return i.toString()})),inspect(t){switch(typeof t){case"string":if(t.includes("'")){if(!t.includes('"'))return`"${t}"`;if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}},types:{isAsyncFunction:t=>t instanceof l,isArrayBufferView:t=>ArrayBuffer.isView(t)},isBlob:h,deprecate:(t,e)=>t,addAbortListener:n(7007).addAbortListener||function(t,e){if(void 0===t)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",t);let n;return p(t,"signal"),((t,e)=>{if("function"!=typeof t)throw new ERR_INVALID_ARG_TYPE(e,"Function",t)})(e,"listener"),t.aborted?queueMicrotask((()=>e())):(t.addEventListener("abort",e,{__proto__:null,once:!0,[s]:!0}),n=()=>{t.removeEventListener("abort",e)}),{__proto__:null,[r](){var t;null===(t=n)||void 0===t||t()}}},AbortSignalAny:a.any||function(t){if(1===t.length)return t[0];const e=new o,n=()=>e.abort();return t.forEach((t=>{p(t,"signals"),t.addEventListener("abort",n,{once:!0})})),e.signal.addEventListener("abort",(()=>{t.forEach((t=>t.removeEventListener("abort",n)))}),{once:!0}),e.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},4612:(t,e,n)=>{const{Buffer:i}=n(8287),{ObjectDefineProperty:s,ObjectKeys:r,ReflectApply:a}=n(4184),{promisify:{custom:o}}=n(798),{streamReturningOperators:l,promiseReturningOperators:u}=n(5589),{codes:{ERR_ILLEGAL_CONSTRUCTOR:h}}=n(6605),p=n(6864),{setDefaultHighWaterMark:c,getDefaultHighWaterMark:d}=n(9153),{pipeline:f}=n(872),{destroyer:m}=n(2430),g=n(9700),_=n(105),T=n(6569),y=t.exports=n(2913).Stream;y.isDestroyed=T.isDestroyed,y.isDisturbed=T.isDisturbed,y.isErrored=T.isErrored,y.isReadable=T.isReadable,y.isWritable=T.isWritable,y.Readable=n(6566);for(const b of r(l)){const v=l[b];function I(...t){if(new.target)throw h();return y.Readable.from(a(v,this,t))}s(I,"name",{__proto__:null,value:v.name}),s(I,"length",{__proto__:null,value:v.length}),s(y.Readable.prototype,b,{__proto__:null,value:I,enumerable:!1,configurable:!0,writable:!0})}for(const w of r(u)){const S=u[w];function I(...t){if(new.target)throw h();return a(S,this,t)}s(I,"name",{__proto__:null,value:S.name}),s(I,"length",{__proto__:null,value:S.length}),s(y.Readable.prototype,w,{__proto__:null,value:I,enumerable:!1,configurable:!0,writable:!0})}y.Writable=n(394),y.Duplex=n(4992),y.Transform=n(208),y.PassThrough=n(6898),y.pipeline=f;const{addAbortSignal:E}=n(153);y.addAbortSignal=E,y.finished=g,y.destroy=m,y.compose=p,y.setDefaultHighWaterMark=c,y.getDefaultHighWaterMark=d,s(y,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>_}),s(f,o,{__proto__:null,enumerable:!0,get:()=>_.pipeline}),s(g,o,{__proto__:null,enumerable:!0,get:()=>_.finished}),y.Stream=y,y._isUint8Array=function(t){return t instanceof Uint8Array},y._uint8ArrayToBuffer=function(t){return i.from(t.buffer,t.byteOffset,t.byteLength)}},105:(t,e,n)=>{"use strict";const{ArrayPrototypePop:i,Promise:s}=n(4184),{isIterable:r,isNodeStream:a,isWebStream:o}=n(6569),{pipelineImpl:l}=n(872),{finished:u}=n(9700);n(4612),t.exports={finished:u,pipeline:function(...t){return new s(((e,n)=>{let s,u;const h=t[t.length-1];if(h&&"object"==typeof h&&!a(h)&&!r(h)&&!o(h)){const e=i(t);s=e.signal,u=e.end}l(t,((t,i)=>{t?n(t):e(i)}),{signal:s,end:u})}))}}},8707:(t,e,n)=>{"use strict";var i=n(5242).Buffer,s=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(i.isEncoding===s||!s(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=l,this.end=u,e=4;break;case"utf8":this.fillLast=o,e=4;break;case"base64":this.text=h,this.end=p,e=3;break;default:return this.write=c,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function o(t){var e=this.lastTotal-this.lastNeed,n=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function h(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function p(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function c(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=r,r.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return s>0&&(t.lastNeed=s-1),s;if(--i=0)return s>0&&(t.lastNeed=s-2),s;if(--i=0)return s>0&&(2===s?s=0:t.lastNeed=s-3),s;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var i=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},r.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},5568:t=>{"use strict";const{AbortController:e,AbortSignal:n}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;t.exports=e,t.exports.AbortSignal=n,t.exports.default=e},4083:(t,e,n)=>{var i; +/*! + * async + * https://github.com/caolan/async + * + * Copyright 2010-2014 Caolan McMahon + * Released under the MIT license + */!function(){var s,r={};function a(){}function o(t){return t}function l(t){return!!t}function u(t){return!t}var h="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g||this;function p(t){return function(){if(null===t)throw new Error("Callback was already called.");t.apply(this,arguments),t=null}}function c(t){return function(){null!==t&&(t.apply(this,arguments),t=null)}}null!=h&&(s=h.async),r.noConflict=function(){return h.async=s,r};var d=Object.prototype.toString,f=Array.isArray||function(t){return"[object Array]"===d.call(t)};function m(t){return f(t)||"number"==typeof t.length&&t.length>=0&&t.length%1==0}function g(t,e){for(var n=-1,i=t.length;++n3?t(i,s,l,o):(a=r,r=s,t(i,l,o))}}function D(t,e){return e}function L(t,e,n){n=n||a;var i=m(e)?[]:{};t(e,(function(t,e,n){t(b((function(t,s){s.length<=1&&(s=s[0]),i[e]=s,n(t)})))}),(function(t){n(t,i)}))}function F(t,e,n,i){var s=[];t(e,(function(t,e,i){n(t,(function(t,e){s=s.concat(e||[]),i(t)}))}),(function(t){i(t,s)}))}function P(t,e,n){if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");function i(t,e,n,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");if(t.started=!0,f(e)||(e=[e]),0===e.length&&t.idle())return r.setImmediate((function(){t.drain()}));g(e,(function(e){var s={data:e,callback:i||a};n?t.tasks.unshift(s):t.tasks.push(s),t.tasks.length===t.concurrency&&t.saturated()})),r.setImmediate(t.process)}function s(t,e){return function(){o-=1;var n=!1,i=arguments;g(e,(function(t){g(l,(function(e,i){e!==t||n||(l.splice(i,1),n=!0)})),t.callback.apply(t,i)})),t.tasks.length+o===0&&t.drain(),t.process()}}var o=0,l=[],u={tasks:[],concurrency:e,payload:n,saturated:a,empty:a,drain:a,started:!1,paused:!1,push:function(t,e){i(u,t,!1,e)},kill:function(){u.drain=a,u.tasks=[]},unshift:function(t,e){i(u,t,!0,e)},process:function(){for(;!u.paused&&oi?1:0}r.map(t,(function(t,n){e(t,(function(e,i){e?n(e):n(null,{value:t,criteria:i})}))}),(function(t,e){if(t)return n(t);n(null,_(e.sort(i),(function(t){return t.value})))}))},r.auto=function(t,e,n){"function"==typeof arguments[1]&&(n=e,e=null),n=c(n||a);var i=I(t),s=i.length;if(!s)return n(null);e||(e=s);var o={},l=0,u=!1,h=[];function p(t){h.unshift(t)}function d(){s--,g(h.slice(0),(function(t){t()}))}p((function(){s||n(null,o)})),g(i,(function(i){if(!u){for(var s,a=f(t[i])?t[i]:[t[i]],c=b((function(t,e){if(l--,e.length<=1&&(e=e[0]),t){var s={};h=function(t,e){s[e]=t},g(I(a=o),(function(t){h(a[t],t)})),s[i]=e,u=!0,n(t,s)}else o[i]=e,r.setImmediate(d);var a,h})),m=a.slice(0,a.length-1),_=m.length;_--;){if(!(s=t[m[_]]))throw new Error("Has nonexistent dependency in "+m.join(", "));if(f(s)&&y(s,i)>=0)throw new Error("Has cyclic dependencies")}T()?(l++,a[a.length-1](c,o)):p((function t(){T()&&(l++,(e=y(h,t))>=0&&h.splice(e,1),a[a.length-1](c,o));var e}))}function T(){return l3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");function o(t,e){function n(t,n){return function(i){t((function(t,e){i(!t||n,{err:t,result:e})}),e)}}function a(t){return function(e){setTimeout((function(){e(null)}),t)}}for(;s.times;){var o=!(s.times-=1);i.push(n(s.task,o)),!o&&s.interval>0&&i.push(a(s.interval))}r.series(i,(function(e,n){n=n[n.length-1],(t||s.callback)(n.err,n.result)}))}return a<=2&&"function"==typeof t&&(n=e,e=t),"function"!=typeof t&&function(t,e){if("number"==typeof e)t.times=parseInt(e,10)||5;else{if("object"!=typeof e)throw new Error("Unsupported argument type for 'times': "+typeof e);t.times=parseInt(e.times,10)||5,t.interval=parseInt(e.interval,10)||0}}(s,t),s.callback=n,s.task=e,s.callback?o():o},r.waterfall=function(t,e){if(e=c(e||a),!f(t)){var n=new Error("First argument to waterfall must be an array of functions");return e(n)}if(!t.length)return e();!function t(n){return b((function(i,s){if(i)e.apply(null,[i].concat(s));else{var r=n.next();r?s.push(t(r)):s.push(e),U(n).apply(null,s)}}))}(r.iterator(t))()},r.parallel=function(t,e){L(r.eachOf,t,e)},r.parallelLimit=function(t,e,n){L(x(e),t,n)},r.series=function(t,e){L(r.eachOfSeries,t,e)},r.iterator=function(t){return function e(n){function i(){return t.length&&t[n].apply(null,arguments),i.next()}return i.next=function(){return n>>1);n(e,t[r])>=0?i=r:s=r-1}return i}(t.tasks,o,n)+1,0,o),t.tasks.length===t.concurrency&&t.saturated(),r.setImmediate(t.process)}))}(i,t,e,s)},delete i.unshift,i},r.cargo=function(t,e){return P(t,1,e)},r.log=$("log"),r.dir=$("dir"),r.memoize=function(t,e){var n={},i={},s=Object.prototype.hasOwnProperty;e=e||o;var a=b((function(a){var o=a.pop(),l=e.apply(null,a);s.call(n,l)?r.setImmediate((function(){o.apply(null,n[l])})):s.call(i,l)?i[l].push(o):(i[l]=[o],t.apply(null,a.concat([b((function(t){n[l]=t;var e=i[l];delete i[l];for(var s=0,r=e.length;s{"use strict";e.byteLength=function(t){var e=o(t),n=e[0],i=e[1];return 3*(n+i)/4-i},e.toByteArray=function(t){var e,n,r=o(t),a=r[0],l=r[1],u=new s(function(t,e,n){return 3*(e+n)/4-n}(0,a,l)),h=0,p=l>0?a-4:a;for(n=0;n>16&255,u[h++]=e>>8&255,u[h++]=255&e;2===l&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[h++]=255&e);1===l&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[h++]=e>>8&255,u[h++]=255&e);return u},e.fromByteArray=function(t){for(var e,i=t.length,s=i%3,r=[],a=16383,o=0,u=i-s;ou?u:o+a));1===s?(e=t[i-1],r.push(n[e>>2]+n[e<<4&63]+"==")):2===s&&(e=(t[i-2]<<8)+t[i-1],r.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return r.join("")};for(var n=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=r[a],i[r.charCodeAt(a)]=a;function o(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,i){for(var s,r,a=[],o=e;o>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},8287:(t,e,n)=>{"use strict"; +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */const i=n(7526),s=n(251),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=function(t){+t!=t&&(t=0);return l.alloc(+t)},e.INSPECT_MAX_BYTES=50;const a=2147483647;function o(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return p(t)}return u(t,e,n)}function u(t,e,n){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|m(t,e);let i=o(n);const s=i.write(t,e);s!==n&&(i=i.slice(0,s));return i}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return c(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return d(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return d(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return l.from(i,e,n);const s=function(t){if(l.isBuffer(t)){const e=0|f(t.length),n=o(e);return 0===n.length||t.copy(n,0,0,e),n}if(void 0!==t.length)return"number"!=typeof t.length||K(t.length)?o(0):c(t);if("Buffer"===t.type&&Array.isArray(t.data))return c(t.data)}(t);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function p(t){return h(t),o(t<0?0:0|f(t))}function c(t){const e=t.length<0?0:0|f(t.length),n=o(e);for(let i=0;i=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function m(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;let s=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(t).length;default:if(s)return i?-1:z(t).length;e=(""+e).toLowerCase(),s=!0}}function g(t,e,n){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return M(this,e,n);case"utf8":case"utf-8":return x(this,e,n);case"ascii":return O(this,e,n);case"latin1":case"binary":return A(this,e,n);case"base64":return S(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function _(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function T(t,e,n,i,s){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=s?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(s)return-1;n=t.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof e&&(e=l.from(e,i)),l.isBuffer(e))return 0===e.length?-1:y(t,e,n,i,s);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,i,s);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,i,s){let r,a=1,o=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;a=2,o/=2,l/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(s){let i=-1;for(r=n;ro&&(n=o-l),r=n;r>=0;r--){let n=!0;for(let i=0;is&&(i=s):i=s;const r=e.length;let a;for(i>r/2&&(i=r/2),a=0;a>8,s=n%256,r.push(s),r.push(i);return r}(e,t.length-n),t,n,i)}function S(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function x(t,e,n){n=Math.min(t.length,n);const i=[];let s=e;for(;s239?4:e>223?3:e>191?2:1;if(s+a<=n){let n,i,o,l;switch(a){case 1:e<128&&(r=e);break;case 2:n=t[s+1],128==(192&n)&&(l=(31&e)<<6|63&n,l>127&&(r=l));break;case 3:n=t[s+1],i=t[s+2],128==(192&n)&&128==(192&i)&&(l=(15&e)<<12|(63&n)<<6|63&i,l>2047&&(l<55296||l>57343)&&(r=l));break;case 4:n=t[s+1],i=t[s+2],o=t[s+3],128==(192&n)&&128==(192&i)&&128==(192&o)&&(l=(15&e)<<18|(63&n)<<12|(63&i)<<6|63&o,l>65535&&l<1114112&&(r=l))}}null===r?(r=65533,a=1):r>65535&&(r-=65536,i.push(r>>>10&1023|55296),r=56320|1023&r),i.push(r),s+=a}return function(t){const e=t.length;if(e<=R)return String.fromCharCode.apply(String,t);let n="",i=0;for(;ii.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(i,s)):Uint8Array.prototype.set.call(i,e,s);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(i,s)}s+=e.length}return i},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;en&&(t+=" ... "),""},r&&(l.prototype[r]=l.prototype.inspect),l.prototype.compare=function(t,e,n,i,s){if(q(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===s&&(s=this.length),e<0||n>t.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&e>=n)return 0;if(i>=s)return-1;if(e>=n)return 1;if(this===t)return 0;let r=(s>>>=0)-(i>>>=0),a=(n>>>=0)-(e>>>=0);const o=Math.min(r,a),u=this.slice(i,s),h=t.slice(e,n);for(let t=0;t>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}const s=this.length-e;if((void 0===n||n>s)&&(n=s),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let r=!1;for(;;)switch(i){case"hex":return I(this,t,e,n);case"utf8":case"utf-8":return E(this,t,e,n);case"ascii":case"latin1":case"binary":return b(this,t,e,n);case"base64":return v(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,t,e,n);default:if(r)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),r=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function O(t,e,n){let i="";n=Math.min(t.length,n);for(let s=e;si)&&(n=i);let s="";for(let i=e;in)throw new RangeError("Trying to access beyond buffer length")}function k(t,e,n,i,s,r){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>s||et.length)throw new RangeError("Index out of range")}function D(t,e,n,i,s){Y(e,i,s,t,n,7);let r=Number(e&BigInt(4294967295));t[n++]=r,r>>=8,t[n++]=r,r>>=8,t[n++]=r,r>>=8,t[n++]=r;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function L(t,e,n,i,s){Y(e,i,s,t,n,7);let r=Number(e&BigInt(4294967295));t[n+7]=r,r>>=8,t[n+6]=r,r>>=8,t[n+5]=r,r>>=8,t[n+4]=r;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function F(t,e,n,i,s,r){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function P(t,e,n,i,r){return e=+e,n>>>=0,r||F(t,0,n,4),s.write(t,e,n,i,23,4),n+4}function $(t,e,n,i,r){return e=+e,n>>>=0,r||F(t,0,n,8),s.write(t,e,n,i,52,8),n+8}l.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||N(t,e,this.length);let i=this[t],s=1,r=0;for(;++r>>=0,e>>>=0,n||N(t,e,this.length);let i=this[t+--e],s=1;for(;e>0&&(s*=256);)i+=this[t+--e]*s;return i},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=J((function(t){G(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const i=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,s=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(i)+(BigInt(s)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const i=e*2**24+65536*this[++t]+256*this[++t]+this[++t],s=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(i)<>>=0,e>>>=0,n||N(t,e,this.length);let i=this[t],s=1,r=0;for(;++r=s&&(i-=Math.pow(2,8*e)),i},l.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||N(t,e,this.length);let i=e,s=1,r=this[t+--i];for(;i>0&&(s*=256);)r+=this[t+--i]*s;return s*=128,r>=s&&(r-=Math.pow(2,8*e)),r},l.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=J((function(t){G(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const i=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(i)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const i=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(i)<>>=0,e||N(t,4,this.length),s.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),s.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),s.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),s.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e>>>=0,n>>>=0,!i){k(this,t,e,n,Math.pow(2,8*n)-1,0)}let s=1,r=0;for(this[e]=255&t;++r>>=0,n>>>=0,!i){k(this,t,e,n,Math.pow(2,8*n)-1,0)}let s=n-1,r=1;for(this[e+s]=255&t;--s>=0&&(r*=256);)this[e+s]=t/r&255;return e+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=J((function(t,e=0){return D(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=J((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e>>>=0,!i){const i=Math.pow(2,8*n-1);k(this,t,e,n,i-1,-i)}let s=0,r=1,a=0;for(this[e]=255&t;++s>>=0,!i){const i=Math.pow(2,8*n-1);k(this,t,e,n,i-1,-i)}let s=n-1,r=1,a=0;for(this[e+s]=255&t;--s>=0&&(r*=256);)t<0&&0===a&&0!==this[e+s+1]&&(a=1),this[e+s]=(t/r|0)-a&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||k(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=J((function(t,e=0){return D(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=J((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(t,e,n){return P(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return P(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return $(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return $(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,i){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=e;s=i+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function Y(t,e,n,i,s,r){if(t>n||t3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(r+1)}${i}`:`>= -(2${i} ** ${8*(r+1)-1}${i}) and < 2 ** ${8*(r+1)-1}${i}`:`>= ${e}${i} and <= ${n}${i}`,new B.ERR_OUT_OF_RANGE("value",s,t)}!function(t,e,n){G(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||H(e,t.length-(n+1))}(i,s,r)}function G(t,e){if("number"!=typeof t)throw new B.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,n){if(Math.floor(t)!==t)throw G(t,n),new B.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}V("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),V("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),V("ERR_OUT_OF_RANGE",(function(t,e,n){let i=`The value of "${t}" is out of range.`,s=n;return Number.isInteger(n)&&Math.abs(n)>2**32?s=U(String(n)):"bigint"==typeof n&&(s=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(s=U(s)),s+="n"),i+=` It must be ${e}. Received ${s}`,i}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function z(t,e){let n;e=e||1/0;const i=t.length;let s=null;const r=[];for(let a=0;a55295&&n<57344){if(!s){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&r.push(239,191,189);continue}s=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),s=n;continue}n=65536+(s-55296<<10|n-56320)}else s&&(e-=3)>-1&&r.push(239,191,189);if(s=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function X(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function j(t,e,n,i){let s;for(s=0;s=e.length||s>=t.length);++s)e[s+n]=t[s];return s}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function K(t){return t!=t}const Q=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const i=16*n;for(let s=0;s<16;++s)e[i+s]=t[n]+t[s]}return e}();function J(t){return"undefined"==typeof BigInt?Z:t}function Z(){throw new Error("BigInt not supported")}},6570:t=>{"use strict";function e(t,e,i){i=i||2;var r,a,o,l,p,c,f,m=e&&e.length,g=m?e[0]*i:t.length,_=n(t,0,g,i,!0),T=[];if(!_||_.next===_.prev)return T;if(m&&(_=function(t,e,i,s){var r,a,o,l=[];for(r=0,a=e.length;r80*i){r=o=t[0],a=l=t[1];for(var y=i;yo&&(o=p),c>l&&(l=c);f=0!==(f=Math.max(o-r,l-a))?32767/f:0}return s(_,T,i,r,a,f,0),T}function n(t,e,n,i,s){var r,a;if(s===x(t,e,n,i)>0)for(r=e;r=e;r-=i)a=v(r,t[r],t[r+1],a);return a&&_(a,a.next)&&(w(a),a=a.next),a}function i(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!_(i,i.next)&&0!==g(i.prev,i,i.next))i=i.next;else{if(w(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function s(t,e,n,u,h,p,d){if(t){!d&&p&&function(t,e,n,i){var s=t;do{0===s.z&&(s.z=c(s.x,s.y,e,n,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,n,i,s,r,a,o,l,u=1;do{for(n=t,t=null,r=null,a=0;n;){for(a++,i=n,o=0,e=0;e0||l>0&&i;)0!==o&&(0===l||!i||n.z<=i.z)?(s=n,n=n.nextZ,o--):(s=i,i=i.nextZ,l--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;n=i}r.nextZ=null,u*=2}while(a>1)}(s)}(t,u,h,p);for(var f,m,g=t;t.prev!==t.next;)if(f=t.prev,m=t.next,p?a(t,u,h,p):r(t))e.push(f.i/n|0),e.push(t.i/n|0),e.push(m.i/n|0),w(t),t=m.next,g=m.next;else if((t=m)===g){d?1===d?s(t=o(i(t),e,n),e,n,u,h,p,2):2===d&&l(t,e,n,u,h,p):s(i(t),e,n,u,h,p,1);break}}}function r(t){var e=t.prev,n=t,i=t.next;if(g(e,n,i)>=0)return!1;for(var s=e.x,r=n.x,a=i.x,o=e.y,l=n.y,u=i.y,h=sr?s>a?s:a:r>a?r:a,d=o>l?o>u?o:u:l>u?l:u,m=i.next;m!==e;){if(m.x>=h&&m.x<=c&&m.y>=p&&m.y<=d&&f(s,o,r,l,a,u,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function a(t,e,n,i){var s=t.prev,r=t,a=t.next;if(g(s,r,a)>=0)return!1;for(var o=s.x,l=r.x,u=a.x,h=s.y,p=r.y,d=a.y,m=ol?o>u?o:u:l>u?l:u,y=h>p?h>d?h:d:p>d?p:d,I=c(m,_,e,n,i),E=c(T,y,e,n,i),b=t.prevZ,v=t.nextZ;b&&b.z>=I&&v&&v.z<=E;){if(b.x>=m&&b.x<=T&&b.y>=_&&b.y<=y&&b!==s&&b!==a&&f(o,h,l,p,u,d,b.x,b.y)&&g(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,v.x>=m&&v.x<=T&&v.y>=_&&v.y<=y&&v!==s&&v!==a&&f(o,h,l,p,u,d,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;b&&b.z>=I;){if(b.x>=m&&b.x<=T&&b.y>=_&&b.y<=y&&b!==s&&b!==a&&f(o,h,l,p,u,d,b.x,b.y)&&g(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;v&&v.z<=E;){if(v.x>=m&&v.x<=T&&v.y>=_&&v.y<=y&&v!==s&&v!==a&&f(o,h,l,p,u,d,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function o(t,e,n){var s=t;do{var r=s.prev,a=s.next.next;!_(r,a)&&T(r,s,s.next,a)&&E(r,a)&&E(a,r)&&(e.push(r.i/n|0),e.push(s.i/n|0),e.push(a.i/n|0),w(s),w(s.next),s=t=a),s=s.next}while(s!==t);return i(s)}function l(t,e,n,r,a,o){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&m(l,u)){var h=b(l,u);return l=i(l,l.next),h=i(h,h.next),s(l,e,n,r,a,o,0),void s(h,e,n,r,a,o,0)}u=u.next}l=l.next}while(l!==t)}function u(t,e){return t.x-e.x}function h(t,e){var n=function(t,e){var n,i=e,s=t.x,r=t.y,a=-1/0;do{if(r<=i.y&&r>=i.next.y&&i.next.y!==i.y){var o=i.x+(r-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(o<=s&&o>a&&(a=o,n=i.x=i.x&&i.x>=h&&s!==i.x&&f(rn.x||i.x===n.x&&p(n,i)))&&(n=i,d=l)),i=i.next}while(i!==u);return n}(t,e);if(!n)return e;var s=b(n,t);return i(s,s.next),i(n,n.next)}function p(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function c(t,e,n,i,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*s|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-i)*s|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,n=t;do{(e.x=(t-a)*(r-o)&&(t-a)*(i-o)>=(n-a)*(e-o)&&(n-a)*(r-o)>=(s-a)*(i-o)}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&T(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){var n=t,i=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{n.y>r!=n.next.y>r&&n.next.y!==n.y&&s<(n.next.x-n.x)*(r-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||_(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function _(t,e){return t.x===e.x&&t.y===e.y}function T(t,e,n,i){var s=I(g(t,e,n)),r=I(g(t,e,i)),a=I(g(n,i,t)),o=I(g(n,i,e));return s!==r&&a!==o||(!(0!==s||!y(t,n,e))||(!(0!==r||!y(t,i,e))||(!(0!==a||!y(n,t,i))||!(0!==o||!y(n,e,i)))))}function y(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function I(t){return t>0?1:t<0?-1:0}function E(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function b(t,e){var n=new S(t.i,t.x,t.y),i=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,n.next=s,s.prev=n,i.next=n,n.prev=i,r.next=i,i.prev=r,i}function v(t,e,n,i){var s=new S(t,e,n);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function w(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function x(t,e,n,i){for(var s=0,r=e,a=n-i;r0&&(i+=t[s-1].length,n.holes.push(i))}return n}},228:t=>{"use strict";var e=Object.prototype.hasOwnProperty,n="~";function i(){}function s(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function r(t,e,i,r,a){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new s(i,r||t,a),l=n?n+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],o]:t._events[l].push(o):(t._events[l]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function o(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),o.prototype.eventNames=function(){var t,i,s=[];if(0===this._eventsCount)return s;for(i in t=this._events)e.call(t,i)&&s.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(t)):s},o.prototype.listeners=function(t){var e=n?n+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var s=0,r=i.length,a=new Array(r);s{"use strict";var e,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function r(){r.init.call(this)}t.exports=r,t.exports.once=function(t,e){return new Promise((function(n,i){function s(n){t.removeListener(e,r),i(n)}function r(){"function"==typeof t.removeListener&&t.removeListener("error",s),n([].slice.call(arguments))}m(t,e,r,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&m(t,"error",e,n)}(t,s,{once:!0})}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var a=10;function o(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?r.defaultMaxListeners:t._maxListeners}function u(t,e,n,i){var s,r,a,u;if(o(n),void 0===(r=t._events)?(r=t._events=Object.create(null),t._eventsCount=0):(void 0!==r.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),r=t._events),a=r[e]),void 0===a)a=r[e]=n,++t._eventsCount;else if("function"==typeof a?a=r[e]=i?[n,a]:[a,n]:i?a.unshift(n):a.push(n),(s=l(t))>0&&a.length>s&&!a.warned){a.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=a.length,u=h,console&&console.warn&&console.warn(u)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,n){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},s=h.bind(i);return s.listener=n,i.wrapFn=s,s}function c(t,e,n){var i=t._events;if(void 0===i)return[];var s=i[e];return void 0===s?[]:"function"==typeof s?n?[s.listener||s]:[s]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(a=e[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var l=r[t];if(void 0===l)return!1;if("function"==typeof l)i(l,this,e);else{var u=l.length,h=f(l,u);for(n=0;n=0;r--)if(n[r]===e||n[r].listener===e){a=n[r].listener,s=r;break}if(s<0)return this;0===s?n.shift():function(t,e){for(;e+1=0;i--)this.removeListener(t,e[i]);return this},r.prototype.listeners=function(t){return c(this,t,!0)},r.prototype.rawListeners=function(t){return c(this,t,!1)},r.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},r.prototype.listenerCount=d,r.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},251:(t,e)=>{ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +e.read=function(t,e,n,i,s){var r,a,o=8*s-i-1,l=(1<>1,h=-7,p=n?s-1:0,c=n?-1:1,d=t[e+p];for(p+=c,r=d&(1<<-h)-1,d>>=-h,h+=o;h>0;r=256*r+t[e+p],p+=c,h-=8);for(a=r&(1<<-h)-1,r>>=-h,h+=i;h>0;a=256*a+t[e+p],p+=c,h-=8);if(0===r)r=1-u;else{if(r===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,i),r-=u}return(d?-1:1)*a*Math.pow(2,r-i)},e.write=function(t,e,n,i,s,r){var a,o,l,u=8*r-s-1,h=(1<>1,c=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:r-1,f=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+p>=1?c/l:c*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=h?(o=0,a=h):a+p>=1?(o=(e*l-1)*Math.pow(2,s),a+=p):(o=e*Math.pow(2,p-1)*Math.pow(2,s),a=0));s>=8;t[n+d]=255&o,d+=f,o/=256,s-=8);for(a=a<0;t[n+d]=255&a,d+=f,a/=256,u-=8);t[n+d-f]|=128*m}},8570:t=>{t.exports=n;var e=null;try{e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(t){}function n(t,e,n){this.low=0|t,this.high=0|e,this.unsigned=!!n}function i(t){return!0===(t&&t.__isLong__)}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=i;var s={},r={};function a(t,e){var n,i,a;return e?(a=0<=(t>>>=0)&&t<256)&&(i=r[t])?i:(n=l(t,(0|t)<0?-1:0,!0),a&&(r[t]=n),n):(a=-128<=(t|=0)&&t<128)&&(i=s[t])?i:(n=l(t,t<0?-1:0,!1),a&&(s[t]=n),n)}function o(t,e){if(isNaN(t))return e?_:g;if(e){if(t<0)return _;if(t>=d)return b}else{if(t<=-f)return v;if(t+1>=f)return E}return t<0?o(-t,e).neg():l(t%c|0,t/c|0,e)}function l(t,e,i){return new n(t,e,i)}n.fromInt=a,n.fromNumber=o,n.fromBits=l;var u=Math.pow;function h(t,e,n){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return g;if("number"==typeof e?(n=e,e=!1):e=!!e,(n=n||10)<2||360)throw Error("interior hyphen");if(0===i)return h(t.substring(1),e,n).neg();for(var s=o(u(n,8)),r=g,a=0;a>>0:this.low},w.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},w.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((r=l).isZero())return h+a;for(;h.length<6;)h="0"+h;a=""+h+a}},w.getHighBits=function(){return this.high},w.getHighBitsUnsigned=function(){return this.high>>>0},w.getLowBits=function(){return this.low},w.getLowBitsUnsigned=function(){return this.low>>>0},w.getNumBitsAbs=function(){if(this.isNegative())return this.eq(v)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<=0},w.isOdd=function(){return!(1&~this.low)},w.isEven=function(){return!(1&this.low)},w.equals=function(t){return i(t)||(t=p(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},w.eq=w.equals,w.notEquals=function(t){return!this.eq(t)},w.neq=w.notEquals,w.ne=w.notEquals,w.lessThan=function(t){return this.comp(t)<0},w.lt=w.lessThan,w.lessThanOrEqual=function(t){return this.comp(t)<=0},w.lte=w.lessThanOrEqual,w.le=w.lessThanOrEqual,w.greaterThan=function(t){return this.comp(t)>0},w.gt=w.greaterThan,w.greaterThanOrEqual=function(t){return this.comp(t)>=0},w.gte=w.greaterThanOrEqual,w.ge=w.greaterThanOrEqual,w.compare=function(t){if(i(t)||(t=p(t)),this.eq(t))return 0;var e=this.isNegative(),n=t.isNegative();return e&&!n?-1:!e&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},w.comp=w.compare,w.negate=function(){return!this.unsigned&&this.eq(v)?v:this.not().add(T)},w.neg=w.negate,w.add=function(t){i(t)||(t=p(t));var e=this.high>>>16,n=65535&this.high,s=this.low>>>16,r=65535&this.low,a=t.high>>>16,o=65535&t.high,u=t.low>>>16,h=0,c=0,d=0,f=0;return d+=(f+=r+(65535&t.low))>>>16,c+=(d+=s+u)>>>16,h+=(c+=n+o)>>>16,h+=e+a,l((d&=65535)<<16|(f&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},w.subtract=function(t){return i(t)||(t=p(t)),this.add(t.neg())},w.sub=w.subtract,w.multiply=function(t){if(this.isZero())return g;if(i(t)||(t=p(t)),e)return l(e.mul(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned);if(t.isZero())return g;if(this.eq(v))return t.isOdd()?v:g;if(t.eq(v))return this.isOdd()?v:g;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(m)&&t.lt(m))return o(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,s=65535&this.high,r=this.low>>>16,a=65535&this.low,u=t.high>>>16,h=65535&t.high,c=t.low>>>16,d=65535&t.low,f=0,_=0,T=0,y=0;return T+=(y+=a*d)>>>16,_+=(T+=r*d)>>>16,T&=65535,_+=(T+=a*c)>>>16,f+=(_+=s*d)>>>16,_&=65535,f+=(_+=r*c)>>>16,_&=65535,f+=(_+=a*h)>>>16,f+=n*d+s*c+r*h+a*u,l((T&=65535)<<16|(y&=65535),(f&=65535)<<16|(_&=65535),this.unsigned)},w.mul=w.multiply,w.divide=function(t){if(i(t)||(t=p(t)),t.isZero())throw Error("division by zero");var n,s,r;if(e)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?l((this.unsigned?e.div_u:e.div_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?_:g;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return _;if(t.gt(this.shru(1)))return y;r=_}else{if(this.eq(v))return t.eq(T)||t.eq(I)?v:t.eq(v)?T:(n=this.shr(1).div(t).shl(1)).eq(g)?t.isNegative()?T:I:(s=this.sub(t.mul(n)),r=n.add(s.div(t)));if(t.eq(v))return this.unsigned?_:g;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();r=g}for(s=this;s.gte(t);){n=Math.max(1,Math.floor(s.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),h=a<=48?1:u(2,a-48),c=o(n),d=c.mul(t);d.isNegative()||d.gt(s);)d=(c=o(n-=h,this.unsigned)).mul(t);c.isZero()&&(c=T),r=r.add(c),s=s.sub(d)}return r},w.div=w.divide,w.modulo=function(t){return i(t)||(t=p(t)),e?l((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},w.mod=w.modulo,w.rem=w.modulo,w.not=function(){return l(~this.low,~this.high,this.unsigned)},w.and=function(t){return i(t)||(t=p(t)),l(this.low&t.low,this.high&t.high,this.unsigned)},w.or=function(t){return i(t)||(t=p(t)),l(this.low|t.low,this.high|t.high,this.unsigned)},w.xor=function(t){return i(t)||(t=p(t)),l(this.low^t.low,this.high^t.high,this.unsigned)},w.shiftLeft=function(t){return i(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?l(this.low<>>32-t,this.unsigned):l(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):l(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},w.shr=w.shiftRight,w.shiftRightUnsigned=function(t){if(i(t)&&(t=t.toInt()),0===(t&=63))return this;var e=this.high;return t<32?l(this.low>>>t|e<<32-t,e>>>t,this.unsigned):l(32===t?e:e>>>t-32,0,this.unsigned)},w.shru=w.shiftRightUnsigned,w.shr_u=w.shiftRightUnsigned,w.toSigned=function(){return this.unsigned?l(this.low,this.high,!1):this},w.toUnsigned=function(){return this.unsigned?this:l(this.low,this.high,!0)},w.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},w.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},w.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},n.fromBytes=function(t,e,i){return i?n.fromBytesLE(t,e):n.fromBytesBE(t,e)},n.fromBytesLE=function(t,e){return new n(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},n.fromBytesBE=function(t,e){return new n(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}},5228:t=>{"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(t){i[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(t){return!1}}()?Object.assign:function(t,s){for(var r,a,o=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l{"use strict";t.exports=(t,e={})=>{if(!t)return;const n={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:/?#]+):)?(?:\/\/([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/,loose:/^(?:(?![^:@]+:[^:@/]*@)([^:/?#.]+):)?(?:\/\/)?([^/?#]*)([^?#]*)(?:\?([^#]*))?(?:#(.*))?/}},i=(e.strictMode?n.parser.strict:n.parser.loose).exec(t);if(!i)return;const s={};if(s[n.key[0]]=t,s[n.key[1]]=i[1]||"",s[n.key[2]]=i[2]||"",s[n.key[8]]=i[3]||"",s[n.key[12]]=i[4]||"",s[n.key[13]]=i[5]||"",s[n.key[2]]){const t=/^(?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?/.exec(s[n.key[2]]);t&&(s[n.key[3]]=t[1]||"",s[n.key[4]]=t[2]||"",s[n.key[5]]=t[3]||"",s[n.key[6]]=t[4]||"",s[n.key[7]]=t[5]||"")}return s[n.q.name]={},s[n.key[12]].replace(n.q.parser,(function(t,e,i){e&&(s[n.q.name][e]=i)})),s}},5585:t=>{"use strict";var e=Object.prototype.hasOwnProperty,n="function"!=typeof Object.create&&"~";function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(){}s.prototype._events=void 0,s.prototype.eventNames=function(){var t,i=this._events,s=[];if(!i)return s;for(t in i)e.call(i,t)&&s.push(n?t.slice(1):t);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(i)):s},s.prototype.listeners=function(t,e){var i=n?n+t:t,s=this._events&&this._events[i];if(e)return!!s;if(!s)return[];if(s.fn)return[s.fn];for(var r=0,a=s.length,o=new Array(a);r{var i={VERSION:n(1045).rE,PI_2:2*Math.PI,RAD_TO_DEG:180/Math.PI,DEG_TO_RAD:Math.PI/180,TARGET_FPMS:.06,RENDERER_TYPE:{UNKNOWN:0,WEBGL:1,CANVAS:2},BLEND_MODES:{NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16},DRAW_MODES:{POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},SCALE_MODES:{DEFAULT:0,LINEAR:0,NEAREST:1},RETINA_PREFIX:/@(.+)x/,RESOLUTION:1,FILTER_RESOLUTION:1,DEFAULT_RENDER_OPTIONS:{view:null,resolution:1,antialias:!1,forceFXAA:!1,autoResize:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,roundPixels:!1},SHAPES:{POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},SPRITE_BATCH_SIZE:2e3};t.exports=i},7673:(t,e,n)=>{var i=n(4650),s=n(2295),r=n(7443),a=new i.Matrix;function o(){s.call(this),this.children=[]}o.prototype=Object.create(s.prototype),o.prototype.constructor=o,t.exports=o,Object.defineProperties(o.prototype,{width:{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t}},height:{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t}}}),o.prototype.onChildrenChange=function(){},o.prototype.addChild=function(t){return this.addChildAt(t,this.children.length)},o.prototype.addChildAt=function(t,e){if(t===this)return t;if(e>=0&&e<=this.children.length)return t.parent&&t.parent.removeChild(t),t.parent=this,this.children.splice(e,0,t),this.onChildrenChange(e),t.emit("added",this),t;throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length)},o.prototype.swapChildren=function(t,e){if(t!==e){var n=this.getChildIndex(t),i=this.getChildIndex(e);if(n<0||i<0)throw new Error("swapChildren: Both the supplied DisplayObjects must be children of the caller.");this.children[n]=e,this.children[i]=t,this.onChildrenChange(n=this.children.length)throw new Error("The supplied index is out of bounds");var n=this.getChildIndex(t);this.children.splice(n,1),this.children.splice(e,0,t),this.onChildrenChange(e)},o.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Supplied index "+t+" does not exist in the child list, or the supplied DisplayObject is not a child of the caller");return this.children[t]},o.prototype.removeChild=function(t){var e=this.children.indexOf(t);if(-1!==e)return this.removeChildAt(e)},o.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,this.children.splice(t,1),this.onChildrenChange(t),e.emit("removed",this),e},o.prototype.removeChildren=function(t,e){var n,i,s=t||0,r="number"==typeof e?e:this.children.length,a=r-s;if(a>0&&a<=r){for(n=this.children.splice(s,a),i=0;i(e=t.width+t.x)?a:e,o=o>(n=t.height+t.y)?o:n)}if(!l)return i.Rectangle.EMPTY;var p=this._bounds;p.x=s,p.y=r,p.width=a-s,p.height=o-r,this._currentBounds=p}return this._currentBounds},o.prototype.containerGetBounds=o.prototype.getBounds,o.prototype.getLocalBounds=function(){var t=this.worldTransform;this.worldTransform=i.Matrix.IDENTITY;for(var e=0,n=this.children.length;e{var i=n(4650),s=n(7443),r=n(5585),a=n(6192),o=new i.Matrix,l={worldTransform:new i.Matrix,worldAlpha:1,children:[]};function u(){r.call(this),this.position=new i.Point,this.scale=new i.Point(1,1),this.pivot=new i.Point(0,0),this.rotation=0,this.alpha=1,this.visible=!0,this.renderable=!0,this.parent=null,this.worldAlpha=1,this.worldTransform=new i.Matrix,this.filterArea=null,this._sr=0,this._cr=1,this._bounds=new i.Rectangle(0,0,1,1),this._currentBounds=null,this._mask=null}u.prototype=Object.create(r.prototype),u.prototype.constructor=u,t.exports=u,Object.defineProperties(u.prototype,{x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},worldVisible:{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}},mask:{get:function(){return this._mask},set:function(t){this._mask&&(this._mask.renderable=!0),this._mask=t,this._mask&&(this._mask.renderable=!1)}},filters:{get:function(){return this._filters&&this._filters.slice()},set:function(t){this._filters=t&&t.slice()}}}),u.prototype.updateTransform=function(){var t,e,n,i,s,r,o=this.parent.worldTransform,l=this.worldTransform;this.rotation%a.PI_2?(this.rotation!==this.rotationCache&&(this.rotationCache=this.rotation,this._sr=Math.sin(this.rotation),this._cr=Math.cos(this.rotation)),t=this._cr*this.scale.x,e=this._sr*this.scale.x,n=-this._sr*this.scale.y,i=this._cr*this.scale.y,s=this.position.x,r=this.position.y,(this.pivot.x||this.pivot.y)&&(s-=this.pivot.x*t+this.pivot.y*n,r-=this.pivot.x*e+this.pivot.y*i),l.a=t*o.a+e*o.c,l.b=t*o.b+e*o.d,l.c=n*o.a+i*o.c,l.d=n*o.b+i*o.d,l.tx=s*o.a+r*o.c+o.tx,l.ty=s*o.b+r*o.d+o.ty):(t=this.scale.x,i=this.scale.y,s=this.position.x-this.pivot.x*t,r=this.position.y-this.pivot.y*i,l.a=t*o.a,l.b=t*o.b,l.c=i*o.c,l.d=i*o.d,l.tx=s*o.a+r*o.c+o.tx,l.ty=s*o.b+r*o.d+o.ty),this.worldAlpha=this.alpha*this.parent.worldAlpha,this._currentBounds=null},u.prototype.displayObjectUpdateTransform=u.prototype.updateTransform,u.prototype.getBounds=function(t){return i.Rectangle.EMPTY},u.prototype.getLocalBounds=function(){return this.getBounds(i.Matrix.IDENTITY)},u.prototype.toGlobal=function(t){return this.parent?this.displayObjectUpdateTransform():(this.parent=l,this.displayObjectUpdateTransform(),this.parent=null),this.worldTransform.apply(t)},u.prototype.toLocal=function(t,e){return e&&(t=e.toGlobal(t)),this.parent?this.displayObjectUpdateTransform():(this.parent=l,this.displayObjectUpdateTransform(),this.parent=null),this.worldTransform.applyInverse(t)},u.prototype.renderWebGL=function(t){},u.prototype.renderCanvas=function(t){},u.prototype.generateTexture=function(t,e,n){var i=this.getLocalBounds(),r=new s(t,0|i.width,0|i.height,e,n);return o.tx=-i.x,o.ty=-i.y,r.render(this,o),r},u.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},u.prototype.destroy=function(){this.position=null,this.scale=null,this.pivot=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.worldTransform=null,this.filterArea=null}},6720:(t,e,n)=>{var i=n(7673),s=n(2699),r=n(1549),a=n(4694),o=n(7240),l=n(4650),u=n(6192),h=new l.Point;function p(){i.call(this),this.fillAlpha=1,this.lineWidth=0,this.lineColor=0,this.graphicsData=[],this.tint=16777215,this._prevTint=16777215,this.blendMode=u.BLEND_MODES.NORMAL,this.currentPath=null,this._webGL={},this.isMask=!1,this.boundsPadding=0,this._localBounds=new l.Rectangle(0,0,1,1),this.dirty=!0,this.glDirty=!1,this.boundsDirty=!0,this.cachedSpriteDirty=!1}p.prototype=Object.create(i.prototype),p.prototype.constructor=p,t.exports=p,p.prototype.clone=function(){var t=new p;t.renderable=this.renderable,t.fillAlpha=this.fillAlpha,t.lineWidth=this.lineWidth,t.lineColor=this.lineColor,t.tint=this.tint,t.blendMode=this.blendMode,t.isMask=this.isMask,t.boundsPadding=this.boundsPadding,t.dirty=!0,t.glDirty=!0,t.cachedSpriteDirty=this.cachedSpriteDirty;for(var e=0;eh*o)}return this.dirty=this.boundsDirty=!0,this},p.prototype.arc=function(t,e,n,i,s,r){if(i===s)return this;!(r=r||!1)&&s<=i?s+=2*Math.PI:r&&i<=s&&(i+=2*Math.PI);var a=r?-1*(i-s):s-i,o=40*Math.ceil(Math.abs(a)/(2*Math.PI));if(0===a)return this;var l=t+Math.cos(i)*n,u=e+Math.sin(i)*n;this.currentPath?this.currentPath.shape.points.push(l,u):this.moveTo(l,u);for(var h=this.currentPath.shape.points,p=a/(2*o),c=2*p,d=Math.cos(p),f=Math.sin(p),m=o-1,g=m%1/m,_=0;_<=m;_++){var T=p+i+c*(_+g*_),y=Math.cos(T),I=-Math.sin(T);h.push((d*y+f*I)*n+t,(d*-I+f*y)*n+e)}return this.dirty=this.boundsDirty=!0,this},p.prototype.beginFill=function(t,e){return this.filling=!0,this.fillColor=t||0,this.fillAlpha=void 0===e?1:e,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},p.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},p.prototype.drawRect=function(t,e,n,i){return this.drawShape(new l.Rectangle(t,e,n,i)),this},p.prototype.drawRoundedRect=function(t,e,n,i,s){return this.drawShape(new l.RoundedRectangle(t,e,n,i,s)),this},p.prototype.drawCircle=function(t,e,n){return this.drawShape(new l.Circle(t,e,n)),this},p.prototype.drawEllipse=function(t,e,n,i){return this.drawShape(new l.Ellipse(t,e,n,i)),this},p.prototype.drawPolygon=function(t){var e=t,n=!0;if(e instanceof l.Polygon&&(n=e.closed,e=e.points),!Array.isArray(e)){e=new Array(arguments.length);for(var i=0;i(b=T>(b=g>b?g:b)?T:b)?I:b,v=E>(v=y>(v=_>v?_:v)?y:v)?E:v,this._bounds.x=w,this._bounds.width=b-w,this._bounds.y=S,this._bounds.height=v-S,this._currentBounds=this._bounds}return this._currentBounds},p.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,h);for(var e=this.graphicsData,n=0;ne?a+l:e,n=oi?o+h:i;else if(d===u.SHAPES.CIRC)a=s.x,o=s.y,t=a-(l=s.radius+f/2)e?a+l:e,n=o-(h=s.radius+f/2)i?o+h:i;else if(d===u.SHAPES.ELIP)a=s.x,o=s.y,t=a-(l=s.width+f/2)e?a+l:e,n=o-(h=s.height+f/2)i?o+h:i;else{r=s.points;for(var m=0;me?a+f:e,n=(o=r[m+1])-fi?o+f:i}}else t=0,e=0,n=0,i=0;var g=this.boundsPadding;this._localBounds.x=t-g,this._localBounds.width=e-t+2*g,this._localBounds.y=n-g,this._localBounds.height=i-n+2*g},p.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var e=new o(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,t);return this.graphicsData.push(e),e.type===u.SHAPES.POLY&&(e.shape.closed=e.shape.closed||this.filling,this.currentPath=e),this.dirty=this.boundsDirty=!0,e},p.prototype.destroy=function(){i.prototype.destroy.apply(this,arguments);for(var t=0;t{function e(t,e,n,i,s,r,a){this.lineWidth=t,this.lineColor=e,this.lineAlpha=n,this._lineTint=e,this.fillColor=i,this.fillAlpha=s,this._fillTint=i,this.fill=r,this.shape=a,this.type=a.type}e.prototype.constructor=e,t.exports=e,e.prototype.clone=function(){return new e(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.shape)},e.prototype.destroy=function(){this.shape=null}},4237:(t,e,n)=>{var i=n(501),s=n(4650),r=n(6192),a=n(1830),o=n(5092),l=n(5075),u=n(6570);function h(t){a.call(this,t),this.graphicsDataPool=[],this.primitiveShader=null,this.complexPrimitiveShader=null,this.maximumSimplePolySize=200}h.prototype=Object.create(a.prototype),h.prototype.constructor=h,t.exports=h,o.registerPlugin("graphics",h),h.prototype.onContextChange=function(){},h.prototype.destroy=function(){a.prototype.destroy.call(this);for(var t=0;t=6)if(o.points.length<2*this.maximumSimplePolySize)n=this.switchMode(s,0),this.buildPoly(o,n)||(n=this.switchMode(s,1),this.buildComplexPoly(o,n));else n=this.switchMode(s,1),this.buildComplexPoly(o,n);o.lineWidth>0&&(n=this.switchMode(s,0),this.buildLine(o,n))}else n=this.switchMode(s,0),o.type===r.SHAPES.RECT?this.buildRectangle(o,n):o.type===r.SHAPES.CIRC||o.type===r.SHAPES.ELIP?this.buildCircle(o,n):o.type===r.SHAPES.RREC&&this.buildRoundedRectangle(o,n);s.lastIndex++}for(e=0;e32e4||n.mode!==e||1===e)&&((n=this.graphicsDataPool.pop()||new l(t.gl)).mode=e,t.data.push(n)):((n=this.graphicsDataPool.pop()||new l(t.gl)).mode=e,t.data.push(n)),n.dirty=!0,n},h.prototype.buildRectangle=function(t,e){var n=t.shape,s=n.x,r=n.y,a=n.width,o=n.height;if(t.fill){var l=i.hex2rgb(t.fillColor),u=t.fillAlpha,h=l[0]*u,p=l[1]*u,c=l[2]*u,d=e.points,f=e.indices,m=d.length/6;d.push(s,r),d.push(h,p,c,u),d.push(s+a,r),d.push(h,p,c,u),d.push(s,r+o),d.push(h,p,c,u),d.push(s+a,r+o),d.push(h,p,c,u),f.push(m,m,m+1,m+2,m+3,m+3)}if(t.lineWidth){var g=t.points;t.points=[s,r,s+a,r,s+a,r+o,s,r+o,s,r],this.buildLine(t,e),t.points=g}},h.prototype.buildRoundedRectangle=function(t,e){var n=t.shape,s=n.x,r=n.y,a=n.width,o=n.height,l=n.radius,h=[];if(h.push(s,r+l),this.quadraticBezierCurve(s,r+o-l,s,r+o,s+l,r+o,h),this.quadraticBezierCurve(s+a-l,r+o,s+a,r+o,s+a,r+o-l,h),this.quadraticBezierCurve(s+a,r+l,s+a,r,s+a-l,r,h),this.quadraticBezierCurve(s+l,r,s,r,s,r+l+1e-10,h),t.fill){var p=i.hex2rgb(t.fillColor),c=t.fillAlpha,d=p[0]*c,f=p[1]*c,m=p[2]*c,g=e.points,_=e.indices,T=g.length/6,y=u(h,null,2),I=0;for(I=0;I19600?(b=T-I,v=y-E,b/=C=Math.sqrt(b*b+v*v),v/=C,b*=P,v*=P,N.push(f-b,m-v),N.push(V,U,Y,B),N.push(f+b,m+v),N.push(V,U,Y,B),N.push(f-b,m-v),N.push(V,U,Y,B),L++):(N.push(h,p),N.push(V,U,Y,B),N.push(f-(h-f),m-(p-m)),N.push(V,U,Y,B));for(c=r[2*(D-2)],d=r[2*(D-2)+1],f=r[2*(D-1)],T=-(d-(m=r[2*(D-1)+1])),y=c-f,T/=C=Math.sqrt(T*T+y*y),y/=C,T*=P,y*=P,N.push(f-T,m-y),N.push(V,U,Y,B),N.push(f+T,m+y),N.push(V,U,Y,B),k.push(F),n=0;nl?r:l,u=(a=n[p+1])h?a:h;n.push(o,u,l,u,l,h,o,h);var c=n.length/2;for(p=0;p{function e(t){this.gl=t,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=t.createBuffer(),this.indexBuffer=t.createBuffer(),this.mode=1,this.alpha=1,this.dirty=!0,this.glPoints=null,this.glIndices=null}e.prototype.constructor=e,t.exports=e,e.prototype.reset=function(){this.points.length=0,this.indices.length=0},e.prototype.upload=function(){var t=this.gl;this.glPoints=new Float32Array(this.points),t.bindBuffer(t.ARRAY_BUFFER,this.buffer),t.bufferData(t.ARRAY_BUFFER,this.glPoints,t.STATIC_DRAW),this.glIndices=new Uint16Array(this.indices),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.glIndices,t.STATIC_DRAW),this.dirty=!1},e.prototype.destroy=function(){this.color=null,this.points=null,this.indices=null,this.gl.deleteBuffer(this.buffer),this.gl.deleteBuffer(this.indexBuffer),this.gl=null,this.buffer=null,this.indexBuffer=null,this.glPoints=null,this.glIndices=null}},4651:(t,e,n)=>{ +/** + * @file Main export of the PIXI core library + * @author Mat Groves + * @copyright 2013-2015 GoodBoyDigital + * @license {@link https://github.com/pixijs/pixi.js/blob/master/LICENSE|MIT License} + */ +var i=t.exports=Object.assign(n(6192),n(4650),{utils:n(501),ticker:n(2410),DisplayObject:n(2295),Container:n(7673),Sprite:n(2861),ParticleContainer:n(3326),SpriteRenderer:n(7920),ParticleRenderer:n(2952),Text:n(9252),Graphics:n(6720),GraphicsData:n(7240),GraphicsRenderer:n(4237),Texture:n(2699),BaseTexture:n(1936),RenderTexture:n(7443),VideoBaseTexture:n(3367),TextureUvs:n(1507),CanvasRenderer:n(8010),CanvasGraphics:n(4694),CanvasBuffer:n(1549),WebGLRenderer:n(5092),ShaderManager:n(3779),Shader:n(8306),ObjectRenderer:n(1830),RenderTarget:n(7955),AbstractFilter:n(580),FXAAFilter:n(1438),SpriteMaskFilter:n(5207),autoDetectRenderer:function(t,e,n,s){return t=t||800,e=e||600,!s&&i.utils.isWebGLSupported()?new i.WebGLRenderer(t,e,n):new i.CanvasRenderer(t,e,n)}})},2825:(t,e,n)=>{var i=n(8840);function s(){this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0}s.prototype.constructor=s,t.exports=s,s.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},s.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var n=e||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},s.prototype.apply=function(t,e){e=e||new i;var n=t.x,s=t.y;return e.x=this.a*n+this.c*s+this.tx,e.y=this.b*n+this.d*s+this.ty,e},s.prototype.applyInverse=function(t,e){e=e||new i;var n=1/(this.a*this.d+this.c*-this.b),s=t.x,r=t.y;return e.x=this.d*n*s+-this.c*n*r+(this.ty*this.c-this.tx*this.d)*n,e.y=this.a*n*r+-this.b*n*s+(-this.ty*this.a+this.tx*this.b)*n,e},s.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},s.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},s.prototype.rotate=function(t){var e=Math.cos(t),n=Math.sin(t),i=this.a,s=this.c,r=this.tx;return this.a=i*e-this.b*n,this.b=i*n+this.b*e,this.c=s*e-this.d*n,this.d=s*n+this.d*e,this.tx=r*e-this.ty*n,this.ty=r*n+this.ty*e,this},s.prototype.append=function(t){var e=this.a,n=this.b,i=this.c,s=this.d;return this.a=t.a*e+t.b*i,this.b=t.a*n+t.b*s,this.c=t.c*e+t.d*i,this.d=t.c*n+t.d*s,this.tx=t.tx*e+t.ty*i+this.tx,this.ty=t.tx*n+t.ty*s+this.ty,this},s.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var n=this.a,i=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},s.prototype.invert=function(){var t=this.a,e=this.b,n=this.c,i=this.d,s=this.tx,r=t*i-e*n;return this.a=i/r,this.b=-e/r,this.c=-n/r,this.d=t/r,this.tx=(n*this.ty-i*s)/r,this.ty=-(t*this.ty-e*s)/r,this},s.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},s.prototype.clone=function(){var t=new s;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},s.prototype.copy=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},s.IDENTITY=new s,s.TEMP_MATRIX=new s},8840:t=>{function e(t,e){this.x=t||0,this.y=e||0}e.prototype.constructor=e,t.exports=e,e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.copy=function(t){this.set(t.x,t.y)},e.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},e.prototype.set=function(t,e){this.x=t||0,this.y=e||(0!==e?this.x:0)}},4650:(t,e,n)=>{t.exports={Point:n(8840),Matrix:n(2825),Circle:n(5385),Ellipse:n(8419),Polygon:n(3671),Rectangle:n(2068),RoundedRectangle:n(1347)}},5385:(t,e,n)=>{var i=n(2068),s=n(6192);function r(t,e,n){this.x=t||0,this.y=e||0,this.radius=n||0,this.type=s.SHAPES.CIRC}r.prototype.constructor=r,t.exports=r,r.prototype.clone=function(){return new r(this.x,this.y,this.radius)},r.prototype.contains=function(t,e){if(this.radius<=0)return!1;var n=this.x-t,i=this.y-e;return(n*=n)+(i*=i)<=this.radius*this.radius},r.prototype.getBounds=function(){return new i(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)}},8419:(t,e,n)=>{var i=n(2068),s=n(6192);function r(t,e,n,i){this.x=t||0,this.y=e||0,this.width=n||0,this.height=i||0,this.type=s.SHAPES.ELIP}r.prototype.constructor=r,t.exports=r,r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var n=(t-this.x)/this.width,i=(e-this.y)/this.height;return(n*=n)+(i*=i)<=1},r.prototype.getBounds=function(){return new i(this.x-this.width,this.y-this.height,this.width,this.height)}},3671:(t,e,n)=>{var i=n(8840),s=n(6192);function r(t){var e=t;if(!Array.isArray(e)){e=new Array(arguments.length);for(var n=0;ne!=u>e&&t<(l-a)*(e-o)/(u-o)+a&&(n=!n)}return n}},2068:(t,e,n)=>{var i=n(6192);function s(t,e,n,s){this.x=t||0,this.y=e||0,this.width=n||0,this.height=s||0,this.type=i.SHAPES.RECT}s.prototype.constructor=s,t.exports=s,s.EMPTY=new s(0,0,0,0),s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height)},s.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t=this.y&&e{var i=n(6192);function s(t,e,n,s,r){this.x=t||0,this.y=e||0,this.width=n||0,this.height=s||0,this.radius=r||20,this.type=i.SHAPES.RREC}s.prototype.constructor=s,t.exports=s,s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.radius)},s.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height)}},3326:(t,e,n)=>{var i=n(7673),s=n(6192);function r(t,e,n){i.call(this);(n=n||15e3)>16384&&(n=16384),n>(t=t||15e3)&&(n=t),this._properties=[!1,!0,!1,!1,!1],this._maxSize=t,this._batchSize=n,this._buffers=null,this._bufferToUpdate=0,this.interactiveChildren=!1,this.blendMode=s.BLEND_MODES.NORMAL,this.roundPixels=!0,this.setProperties(e)}r.prototype=Object.create(i.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.setProperties=function(t){t&&(this._properties[0]="scale"in t?!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="alpha"in t?!!t.alpha:this._properties[4])},r.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},r.prototype.renderWebGL=function(t){this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(t.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},r.prototype.onChildrenChange=function(t){var e=Math.floor(t/this._batchSize);e{function e(t,e,n,i){this.gl=t,this.vertSize=2,this.vertByteSize=4*this.vertSize,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(var s=0;s{var i=n(1830),s=n(5092),r=n(3646),a=n(3361),o=n(4650);function l(t){i.call(this,t);this.indices=new Uint16Array(98304);for(var e=0,n=0;e<98304;e+=6,n+=4)this.indices[e+0]=n+0,this.indices[e+1]=n+1,this.indices[e+2]=n+2,this.indices[e+3]=n+0,this.indices[e+4]=n+2,this.indices[e+5]=n+3;this.shader=null,this.indexBuffer=null,this.properties=null,this.tempMatrix=new o.Matrix}l.prototype=Object.create(i.prototype),l.prototype.constructor=l,t.exports=l,s.registerPlugin("particle",l),l.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new r(this.renderer.shaderManager),this.indexBuffer=t.createBuffer(),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices,t.STATIC_DRAW),this.properties=[{attribute:this.shader.attributes.aVertexPosition,size:2,uploadFunction:this.uploadVertices,offset:0},{attribute:this.shader.attributes.aPositionCoord,size:2,uploadFunction:this.uploadPosition,offset:0},{attribute:this.shader.attributes.aRotation,size:1,uploadFunction:this.uploadRotation,offset:0},{attribute:this.shader.attributes.aTextureCoord,size:2,uploadFunction:this.uploadUvs,offset:0},{attribute:this.shader.attributes.aColor,size:1,uploadFunction:this.uploadAlpha,offset:0}]},l.prototype.start=function(){var t=this.renderer.gl;t.activeTexture(t.TEXTURE0),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indexBuffer);var e=this.shader;this.renderer.shaderManager.setShader(e)},l.prototype.render=function(t){var e=t.children,n=e.length,i=t._maxSize,s=t._batchSize;if(0!==n){n>i&&(n=i),t._buffers||(t._buffers=this.generateBuffers(t)),this.renderer.blendModeManager.setBlendMode(t.blendMode);var r=this.renderer.gl,a=t.worldTransform.copy(this.tempMatrix);a.prepend(this.renderer.currentRenderTarget.projectionMatrix),r.uniformMatrix3fv(this.shader.uniforms.projectionMatrix._location,!1,a.toArray(!0)),r.uniform1f(this.shader.uniforms.uAlpha._location,t.worldAlpha);var o=e[0]._texture.baseTexture;if(o._glTextures[r.id])r.bindTexture(r.TEXTURE_2D,o._glTextures[r.id]);else{if(!this.renderer.updateTexture(o))return;t._properties[0]&&t._properties[3]||(t._bufferToUpdate=0)}for(var l=0,u=0;ls&&(h=s);var p=t._buffers[u];p.uploadDynamic(e,l,h),t._bufferToUpdate===u&&(p.uploadStatic(e,l,h),t._bufferToUpdate=u+1),p.bind(this.shader),r.drawElements(r.TRIANGLES,6*h,r.UNSIGNED_SHORT,0),this.renderer.drawCount++}}},l.prototype.generateBuffers=function(t){var e,n=this.renderer.gl,i=[],s=t._maxSize,r=t._batchSize,o=t._properties;for(e=0;e{var i=n(8297);function s(t){i.call(this,t,["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute float aColor;","attribute vec2 aPositionCoord;","attribute vec2 aScale;","attribute float aRotation;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","varying float vColor;","void main(void){"," vec2 v = aVertexPosition;"," v.x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);"," v.y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);"," v = v + aPositionCoord;"," gl_Position = vec4((projectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;"," vColor = aColor;","}"].join("\n"),["precision lowp float;","varying vec2 vTextureCoord;","varying float vColor;","uniform sampler2D uSampler;","uniform float uAlpha;","void main(void){"," vec4 color = texture2D(uSampler, vTextureCoord) * vColor * uAlpha;"," if (color.a == 0.0) discard;"," gl_FragColor = color;","}"].join("\n"),{uAlpha:{type:"1f",value:1}},{aPositionCoord:0,aRotation:0})}s.prototype=Object.create(i.prototype),s.prototype.constructor=s,t.exports=s},6820:(t,e,n)=>{var i=n(501),s=n(4650),r=n(6192),a=n(5585);function o(t,e,n,o){if(a.call(this),i.sayHello(t),o)for(var l in r.DEFAULT_RENDER_OPTIONS)void 0===o[l]&&(o[l]=r.DEFAULT_RENDER_OPTIONS[l]);else o=r.DEFAULT_RENDER_OPTIONS;this.type=r.RENDERER_TYPE.UNKNOWN,this.width=e||800,this.height=n||600,this.view=o.view||document.createElement("canvas"),this.resolution=o.resolution,this.transparent=o.transparent,this.autoResize=o.autoResize||!1,this.blendModes=null,this.preserveDrawingBuffer=o.preserveDrawingBuffer,this.clearBeforeRender=o.clearBeforeRender,this.roundPixels=o.roundPixels,this._backgroundColor=0,this._backgroundColorRgb=[0,0,0],this._backgroundColorString="#000000",this.backgroundColor=o.backgroundColor||this._backgroundColor,this._tempDisplayObjectParent={worldTransform:new s.Matrix,worldAlpha:1,children:[]},this._lastObjectRendered=this._tempDisplayObjectParent}o.prototype=Object.create(a.prototype),o.prototype.constructor=o,t.exports=o,Object.defineProperties(o.prototype,{backgroundColor:{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=i.hex2string(t),i.hex2rgb(t,this._backgroundColorRgb)}}}),o.prototype.resize=function(t,e){this.width=t*this.resolution,this.height=e*this.resolution,this.view.width=this.width,this.view.height=this.height,this.autoResize&&(this.view.style.width=this.width/this.resolution+"px",this.view.style.height=this.height/this.resolution+"px")},o.prototype.destroy=function(t){t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.type=r.RENDERER_TYPE.UNKNOWN,this.width=0,this.height=0,this.view=null,this.resolution=0,this.transparent=!1,this.autoResize=!1,this.blendModes=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this.roundPixels=!1,this._backgroundColor=0,this._backgroundColorRgb=null,this._backgroundColorString=null}},8010:(t,e,n)=>{var i=n(6820),s=n(6871),r=n(501),a=n(4650),o=n(6192);function l(t,e,n){n=n||{},i.call(this,"Canvas",t,e,n),this.type=o.RENDERER_TYPE.CANVAS,this.context=this.view.getContext("2d",{alpha:this.transparent}),this.refresh=!0,this.maskManager=new s,this.smoothProperty="imageSmoothingEnabled",this.context.imageSmoothingEnabled||(this.context.webkitImageSmoothingEnabled?this.smoothProperty="webkitImageSmoothingEnabled":this.context.mozImageSmoothingEnabled?this.smoothProperty="mozImageSmoothingEnabled":this.context.oImageSmoothingEnabled?this.smoothProperty="oImageSmoothingEnabled":this.context.msImageSmoothingEnabled&&(this.smoothProperty="msImageSmoothingEnabled")),this.initPlugins(),this._mapBlendModes(),this._tempDisplayObjectParent={worldTransform:new a.Matrix,worldAlpha:1},this.resize(t,e)}l.prototype=Object.create(i.prototype),l.prototype.constructor=l,t.exports=l,r.pluginTarget.mixin(l),l.prototype.render=function(t){var e=t.parent;this._lastObjectRendered=t,t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=e,this.context.setTransform(1,0,0,1,0,0),this.context.globalAlpha=1,this.context.globalCompositeOperation=this.blendModes[o.BLEND_MODES.NORMAL],navigator.isCocoonJS&&this.view.screencanvas&&(this.context.fillStyle="black",this.context.clear()),this.clearBeforeRender&&(this.transparent?this.context.clearRect(0,0,this.width,this.height):(this.context.fillStyle=this._backgroundColorString,this.context.fillRect(0,0,this.width,this.height))),this.renderDisplayObject(t,this.context)},l.prototype.destroy=function(t){this.destroyPlugins(),i.prototype.destroy.call(this,t),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},l.prototype.renderDisplayObject=function(t,e){var n=this.context;this.context=e,t.renderCanvas(this),this.context=n},l.prototype.resize=function(t,e){i.prototype.resize.call(this,t,e),this.smoothProperty&&(this.context[this.smoothProperty]=o.SCALE_MODES.DEFAULT===o.SCALE_MODES.LINEAR)},l.prototype._mapBlendModes=function(){this.blendModes||(this.blendModes={},r.canUseNewCanvasBlendModes()?(this.blendModes[o.BLEND_MODES.NORMAL]="source-over",this.blendModes[o.BLEND_MODES.ADD]="lighter",this.blendModes[o.BLEND_MODES.MULTIPLY]="multiply",this.blendModes[o.BLEND_MODES.SCREEN]="screen",this.blendModes[o.BLEND_MODES.OVERLAY]="overlay",this.blendModes[o.BLEND_MODES.DARKEN]="darken",this.blendModes[o.BLEND_MODES.LIGHTEN]="lighten",this.blendModes[o.BLEND_MODES.COLOR_DODGE]="color-dodge",this.blendModes[o.BLEND_MODES.COLOR_BURN]="color-burn",this.blendModes[o.BLEND_MODES.HARD_LIGHT]="hard-light",this.blendModes[o.BLEND_MODES.SOFT_LIGHT]="soft-light",this.blendModes[o.BLEND_MODES.DIFFERENCE]="difference",this.blendModes[o.BLEND_MODES.EXCLUSION]="exclusion",this.blendModes[o.BLEND_MODES.HUE]="hue",this.blendModes[o.BLEND_MODES.SATURATION]="saturate",this.blendModes[o.BLEND_MODES.COLOR]="color",this.blendModes[o.BLEND_MODES.LUMINOSITY]="luminosity"):(this.blendModes[o.BLEND_MODES.NORMAL]="source-over",this.blendModes[o.BLEND_MODES.ADD]="lighter",this.blendModes[o.BLEND_MODES.MULTIPLY]="source-over",this.blendModes[o.BLEND_MODES.SCREEN]="source-over",this.blendModes[o.BLEND_MODES.OVERLAY]="source-over",this.blendModes[o.BLEND_MODES.DARKEN]="source-over",this.blendModes[o.BLEND_MODES.LIGHTEN]="source-over",this.blendModes[o.BLEND_MODES.COLOR_DODGE]="source-over",this.blendModes[o.BLEND_MODES.COLOR_BURN]="source-over",this.blendModes[o.BLEND_MODES.HARD_LIGHT]="source-over",this.blendModes[o.BLEND_MODES.SOFT_LIGHT]="source-over",this.blendModes[o.BLEND_MODES.DIFFERENCE]="source-over",this.blendModes[o.BLEND_MODES.EXCLUSION]="source-over",this.blendModes[o.BLEND_MODES.HUE]="source-over",this.blendModes[o.BLEND_MODES.SATURATION]="source-over",this.blendModes[o.BLEND_MODES.COLOR]="source-over",this.blendModes[o.BLEND_MODES.LUMINOSITY]="source-over"))}},1549:t=>{function e(t,e){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.canvas.width=t,this.canvas.height=e}e.prototype.constructor=e,t.exports=e,Object.defineProperties(e.prototype,{width:{get:function(){return this.canvas.width},set:function(t){this.canvas.width=t}},height:{get:function(){return this.canvas.height},set:function(t){this.canvas.height=t}}}),e.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},e.prototype.resize=function(t,e){this.canvas.width=t,this.canvas.height=e},e.prototype.destroy=function(){this.context=null,this.canvas=null}},4694:(t,e,n)=>{var i=n(6192),s={};t.exports=s,s.renderGraphics=function(t,e){var n=t.worldAlpha;t.dirty&&(this.updateGraphicsTint(t),t.dirty=!1);for(var s=0;sR?R:x,e.beginPath(),e.moveTo(b,v+x),e.lineTo(b,v+S-x),e.quadraticCurveTo(b,v+S,b+x,v+S),e.lineTo(b+w-x,v+S),e.quadraticCurveTo(b+w,v+S,b+w,v+S-x),e.lineTo(b+w,v+x),e.quadraticCurveTo(b+w,v,b+w-x,v),e.lineTo(b+x,v),e.quadraticCurveTo(b,v,b,v+x),e.closePath(),(r.fillColor||0===r.fillColor)&&(e.globalAlpha=r.fillAlpha*n,e.fillStyle="#"+("00000"+(0|o).toString(16)).substr(-6),e.fill()),r.lineWidth&&(e.globalAlpha=r.lineAlpha*n,e.strokeStyle="#"+("00000"+(0|l).toString(16)).substr(-6),e.stroke())}}},s.renderGraphicsMask=function(t,e){var n=t.graphicsData.length;if(0!==n){e.beginPath();for(var s=0;sS?S:w,e.moveTo(I,E+w),e.lineTo(I,E+v-w),e.quadraticCurveTo(I,E+v,I+w,E+v),e.lineTo(I+b-w,E+v),e.quadraticCurveTo(I+b,E+v,I+b,E+v-w),e.lineTo(I+b,E+w),e.quadraticCurveTo(I+b,E,I+b-w,E),e.lineTo(I+w,E),e.quadraticCurveTo(I,E,I,E+w),e.closePath()}}}},s.updateGraphicsTint=function(t){if(16777215!==t.tint||t._prevTint!==t.tint){t._prevTint=t.tint;for(var e=(t.tint>>16&255)/255,n=(t.tint>>8&255)/255,i=(255&t.tint)/255,s=0;s>16&255)/255*e*255<<16)+((a>>8&255)/255*n*255<<8)+(255&a)/255*i*255,r._lineTint=((o>>16&255)/255*e*255<<16)+((o>>8&255)/255*n*255<<8)+(255&o)/255*i*255}}}},6871:(t,e,n)=>{var i=n(4694);function s(){}s.prototype.constructor=s,t.exports=s,s.prototype.pushMask=function(t,e){e.context.save();var n=t.alpha,s=t.worldTransform,r=e.resolution;e.context.setTransform(s.a*r,s.b*r,s.c*r,s.d*r,s.tx*r,s.ty*r),t.texture||(i.renderGraphicsMask(t,e.context),e.context.clip()),t.worldAlpha=n},s.prototype.popMask=function(t){t.context.restore()},s.prototype.destroy=function(){}},7809:(t,e,n)=>{var i=n(501),s={};t.exports=s,s.getTintedTexture=function(t,e){var n=t.texture,i="#"+("00000"+(0|(e=s.roundColor(e))).toString(16)).substr(-6);if(n.tintCache=n.tintCache||{},n.tintCache[i])return n.tintCache[i];var r=s.canvas||document.createElement("canvas");if(s.tintMethod(n,e,r),s.convertTintToImage){var a=new Image;a.src=r.toDataURL(),n.tintCache[i]=a}else n.tintCache[i]=r,s.canvas=null;return r},s.tintWithMultiply=function(t,e,n){var i=n.getContext("2d"),s=t.baseTexture.resolution,r=t.crop.clone();r.x*=s,r.y*=s,r.width*=s,r.height*=s,n.width=r.width,n.height=r.height,i.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),i.fillRect(0,0,r.width,r.height),i.globalCompositeOperation="multiply",i.drawImage(t.baseTexture.source,r.x,r.y,r.width,r.height,0,0,r.width,r.height),i.globalCompositeOperation="destination-atop",i.drawImage(t.baseTexture.source,r.x,r.y,r.width,r.height,0,0,r.width,r.height)},s.tintWithOverlay=function(t,e,n){var i=n.getContext("2d"),s=t.baseTexture.resolution,r=t.crop.clone();r.x*=s,r.y*=s,r.width*=s,r.height*=s,n.width=r.width,n.height=r.height,i.globalCompositeOperation="copy",i.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),i.fillRect(0,0,r.width,r.height),i.globalCompositeOperation="destination-atop",i.drawImage(t.baseTexture.source,r.x,r.y,r.width,r.height,0,0,r.width,r.height)},s.tintWithPerPixel=function(t,e,n){var s=n.getContext("2d"),r=t.baseTexture.resolution,a=t.crop.clone();a.x*=r,a.y*=r,a.width*=r,a.height*=r,n.width=a.width,n.height=a.height,s.globalCompositeOperation="copy",s.drawImage(t.baseTexture.source,a.x,a.y,a.width,a.height,0,0,a.width,a.height);for(var o=i.hex2rgb(e),l=o[0],u=o[1],h=o[2],p=s.getImageData(0,0,a.width,a.height),c=p.data,d=0;d{var i=n(6820),s=n(3779),r=n(9240),a=n(5468),o=n(4598),l=n(5396),u=n(7955),h=n(1830),p=n(1438),c=n(501),d=n(6192);function f(t,e,n){n=n||{},i.call(this,"WebGL",t,e,n),this.type=d.RENDERER_TYPE.WEBGL,this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this),this.view.addEventListener("webglcontextlost",this.handleContextLost,!1),this.view.addEventListener("webglcontextrestored",this.handleContextRestored,!1),this._useFXAA=!!n.forceFXAA&&n.antialias,this._FXAAFilter=null,this._contextOptions={alpha:this.transparent,antialias:n.antialias,premultipliedAlpha:this.transparent&&"notMultiplied"!==this.transparent,stencil:!0,preserveDrawingBuffer:n.preserveDrawingBuffer},this.drawCount=0,this.shaderManager=new s(this),this.maskManager=new r(this),this.stencilManager=new a(this),this.filterManager=new o(this),this.blendModeManager=new l(this),this.currentRenderTarget=null,this.currentRenderer=new h(this),this.initPlugins(),this._createContext(),this._initContext(),this._mapGlModes(),this._renderTargetStack=[]}f.prototype=Object.create(i.prototype),f.prototype.constructor=f,t.exports=f,c.pluginTarget.mixin(f),f.glContextId=0,f.prototype._createContext=function(){var t=this.view.getContext("webgl",this._contextOptions)||this.view.getContext("experimental-webgl",this._contextOptions);if(this.gl=t,!t)throw new Error("This browser does not support webGL. Try using the canvas renderer");this.glContextId=f.glContextId++,t.id=this.glContextId,t.renderer=this},f.prototype._initContext=function(){var t=this.gl;t.disable(t.DEPTH_TEST),t.disable(t.CULL_FACE),t.enable(t.BLEND),this.renderTarget=new u(t,this.width,this.height,null,this.resolution,!0),this.setRenderTarget(this.renderTarget),this.emit("context",t),this.resize(this.width,this.height),this._useFXAA||(this._useFXAA=this._contextOptions.antialias&&!t.getContextAttributes().antialias),this._useFXAA&&(window.console.warn("FXAA antialiasing being used instead of native antialiasing"),this._FXAAFilter=[new p])},f.prototype.render=function(t){if(!this.gl.isContextLost()){this.drawCount=0,this._lastObjectRendered=t,this._useFXAA&&(this._FXAAFilter[0].uniforms.resolution.value.x=this.width,this._FXAAFilter[0].uniforms.resolution.value.y=this.height,t.filterArea=this.renderTarget.size,t.filters=this._FXAAFilter);var e=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=e;var n=this.gl;this.setRenderTarget(this.renderTarget),this.clearBeforeRender&&(this.transparent?n.clearColor(0,0,0,0):n.clearColor(this._backgroundColorRgb[0],this._backgroundColorRgb[1],this._backgroundColorRgb[2],1),n.clear(n.COLOR_BUFFER_BIT)),this.renderDisplayObject(t,this.renderTarget)}},f.prototype.renderDisplayObject=function(t,e,n){this.setRenderTarget(e),n&&e.clear(),this.filterManager.setFilterStack(e.filterStack),t.renderWebGL(this),this.currentRenderer.flush()},f.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},f.prototype.setRenderTarget=function(t){this.currentRenderTarget!==t&&(this.currentRenderTarget=t,this.currentRenderTarget.activate(),this.stencilManager.setMaskStack(t.stencilMaskStack))},f.prototype.resize=function(t,e){i.prototype.resize.call(this,t,e),this.filterManager.resize(t,e),this.renderTarget.resize(t,e),this.currentRenderTarget===this.renderTarget&&(this.renderTarget.activate(),this.gl.viewport(0,0,this.width,this.height))},f.prototype.updateTexture=function(t){if((t=t.baseTexture||t).hasLoaded){var e=this.gl;return t._glTextures[e.id]||(t._glTextures[e.id]=e.createTexture(),t.on("update",this.updateTexture,this),t.on("dispose",this.destroyTexture,this)),e.bindTexture(e.TEXTURE_2D,t._glTextures[e.id]),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultipliedAlpha),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.source),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t.scaleMode===d.SCALE_MODES.LINEAR?e.LINEAR:e.NEAREST),t.mipmap&&t.isPowerOfTwo?(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t.scaleMode===d.SCALE_MODES.LINEAR?e.LINEAR_MIPMAP_LINEAR:e.NEAREST_MIPMAP_NEAREST),e.generateMipmap(e.TEXTURE_2D)):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t.scaleMode===d.SCALE_MODES.LINEAR?e.LINEAR:e.NEAREST),t.isPowerOfTwo?(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT)):(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)),t._glTextures[e.id]}},f.prototype.destroyTexture=function(t){(t=t.baseTexture||t).hasLoaded&&t._glTextures[this.gl.id]&&this.gl.deleteTexture(t._glTextures[this.gl.id])},f.prototype.handleContextLost=function(t){t.preventDefault()},f.prototype.handleContextRestored=function(){for(var t in this._initContext(),c.BaseTextureCache)c.BaseTextureCache[t]._glTextures.length=0},f.prototype.destroy=function(t){for(var e in this.destroyPlugins(),this.view.removeEventListener("webglcontextlost",this.handleContextLost),this.view.removeEventListener("webglcontextrestored",this.handleContextRestored),c.BaseTextureCache){var n=c.BaseTextureCache[e];n.off("update",this.updateTexture,this),n.off("dispose",this.destroyTexture,this)}i.prototype.destroy.call(this,t),this.uid=0,this.shaderManager.destroy(),this.maskManager.destroy(),this.stencilManager.destroy(),this.filterManager.destroy(),this.blendModeManager.destroy(),this.shaderManager=null,this.maskManager=null,this.filterManager=null,this.blendModeManager=null,this.currentRenderer=null,this.handleContextLost=null,this.handleContextRestored=null,this._contextOptions=null,this.drawCount=0,this.gl.useProgram(null),this.gl=null},f.prototype._mapGlModes=function(){var t=this.gl;this.blendModes||(this.blendModes={},this.blendModes[d.BLEND_MODES.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[d.BLEND_MODES.ADD]=[t.SRC_ALPHA,t.DST_ALPHA],this.blendModes[d.BLEND_MODES.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA],this.blendModes[d.BLEND_MODES.SCREEN]=[t.SRC_ALPHA,t.ONE],this.blendModes[d.BLEND_MODES.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[d.BLEND_MODES.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[d.BLEND_MODES.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[d.BLEND_MODES.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[d.BLEND_MODES.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[d.BLEND_MODES.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[d.BLEND_MODES.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[d.BLEND_MODES.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[d.BLEND_MODES.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[d.BLEND_MODES.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[d.BLEND_MODES.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[d.BLEND_MODES.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],this.blendModes[d.BLEND_MODES.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA]),this.drawModes||(this.drawModes={},this.drawModes[d.DRAW_MODES.POINTS]=t.POINTS,this.drawModes[d.DRAW_MODES.LINES]=t.LINES,this.drawModes[d.DRAW_MODES.LINE_LOOP]=t.LINE_LOOP,this.drawModes[d.DRAW_MODES.LINE_STRIP]=t.LINE_STRIP,this.drawModes[d.DRAW_MODES.TRIANGLES]=t.TRIANGLES,this.drawModes[d.DRAW_MODES.TRIANGLE_STRIP]=t.TRIANGLE_STRIP,this.drawModes[d.DRAW_MODES.TRIANGLE_FAN]=t.TRIANGLE_FAN)}},580:(t,e,n)=>{var i=n(8297);function s(t,e,n){this.shaders=[],this.padding=0,this.uniforms=n||{},this.vertexSrc=t||i.defaultVertexSrc,this.fragmentSrc=e||i.defaultFragmentSrc}s.prototype.constructor=s,t.exports=s,s.prototype.getShader=function(t){var e=t.gl,n=this.shaders[e.id];return n||(n=new i(t.shaderManager,this.vertexSrc,this.fragmentSrc,this.uniforms,this.attributes),this.shaders[e.id]=n),n},s.prototype.applyFilter=function(t,e,n,i){var s=this.getShader(t);t.filterManager.applyFilter(s,e,n,i)},s.prototype.syncUniform=function(t){for(var e=0,n=this.shaders.length;e{var i=n(580),s=n(7425);function r(){i.call(this,s.readFileSync("//FXAA.vert","utf8"),s.readFileSync("//FXAA.frag","utf8"),{resolution:{type:"v2",value:{x:1,y:1}}})}r.prototype=Object.create(i.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.applyFilter=function(t,e,n){var i=t.filterManager,s=this.getShader(t);i.applyFilter(s,e,n)}},5207:(t,e,n)=>{var i=n(580),s=n(4650),r=n(7425);function a(t){var e=new s.Matrix;i.call(this,r.readFileSync("//spriteMaskFilter.vert","utf8"),r.readFileSync("//spriteMaskFilter.frag","utf8"),{mask:{type:"sampler2D",value:t._texture},alpha:{type:"f",value:1},otherMatrix:{type:"mat3",value:e.toArray(!0)}}),this.maskSprite=t,this.maskMatrix=e}a.prototype=Object.create(i.prototype),a.prototype.constructor=a,t.exports=a,a.prototype.applyFilter=function(t,e,n){var i=t.filterManager;this.uniforms.mask.value=this.maskSprite._texture,i.calculateMappedMatrix(e.frame,this.maskSprite,this.maskMatrix),this.uniforms.otherMatrix.value=this.maskMatrix.toArray(!0),this.uniforms.alpha.value=this.maskSprite.worldAlpha;var s=this.getShader(t);i.applyFilter(s,e,n)},Object.defineProperties(a.prototype,{map:{get:function(){return this.uniforms.mask.value},set:function(t){this.uniforms.mask.value=t}},offset:{get:function(){return this.uniforms.offset.value},set:function(t){this.uniforms.offset.value=t}}})},5396:(t,e,n)=>{var i=n(1103);function s(t){i.call(this,t),this.currentBlendMode=99999}s.prototype=Object.create(i.prototype),s.prototype.constructor=s,t.exports=s,s.prototype.setBlendMode=function(t){if(this.currentBlendMode===t)return!1;this.currentBlendMode=t;var e=this.renderer.blendModes[this.currentBlendMode];return this.renderer.gl.blendFunc(e[0],e[1]),!0}},4598:(t,e,n)=>{var i=n(1103),s=n(7955),r=n(6192),a=n(3885),o=n(4650);function l(t){i.call(this,t),this.filterStack=[],this.filterStack.push({renderTarget:t.currentRenderTarget,filter:[],bounds:null}),this.texturePool=[],this.textureSize=new o.Rectangle(0,0,t.width,t.height),this.currentFrame=null}l.prototype=Object.create(i.prototype),l.prototype.constructor=l,t.exports=l,l.prototype.onContextChange=function(){this.texturePool.length=0;var t=this.renderer.gl;this.quad=new a(t)},l.prototype.setFilterStack=function(t){this.filterStack=t},l.prototype.pushFilter=function(t,e){var n=t.filterArea?t.filterArea.clone():t.getBounds();n.x=0|n.x,n.y=0|n.y,n.width=0|n.width,n.height=0|n.height;var i=0|e[0].padding;if(n.x-=i,n.y-=i,n.width+=2*i,n.height+=2*i,this.renderer.currentRenderTarget.transform){var s=this.renderer.currentRenderTarget.transform;n.x+=s.tx,n.y+=s.ty,this.capFilterArea(n),n.x-=s.tx,n.y-=s.ty}else this.capFilterArea(n);if(n.width>0&&n.height>0){this.currentFrame=n;var r=this.getRenderTarget();this.renderer.setRenderTarget(r),r.clear(),this.filterStack.push({renderTarget:r,filter:e})}else this.filterStack.push({renderTarget:null,filter:e})},l.prototype.popFilter=function(){var t=this.filterStack.pop(),e=this.filterStack[this.filterStack.length-1],n=t.renderTarget;if(t.renderTarget){var i=e.renderTarget,s=this.renderer.gl;this.currentFrame=n.frame,this.quad.map(this.textureSize,n.frame),s.bindBuffer(s.ARRAY_BUFFER,this.quad.vertexBuffer),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,this.quad.indexBuffer);var a=t.filter;if(s.vertexAttribPointer(this.renderer.shaderManager.defaultShader.attributes.aVertexPosition,2,s.FLOAT,!1,0,0),s.vertexAttribPointer(this.renderer.shaderManager.defaultShader.attributes.aTextureCoord,2,s.FLOAT,!1,0,32),s.vertexAttribPointer(this.renderer.shaderManager.defaultShader.attributes.aColor,4,s.FLOAT,!1,0,64),this.renderer.blendModeManager.setBlendMode(r.BLEND_MODES.NORMAL),1===a.length)a[0].uniforms.dimensions&&(a[0].uniforms.dimensions.value[0]=this.renderer.width,a[0].uniforms.dimensions.value[1]=this.renderer.height,a[0].uniforms.dimensions.value[2]=this.quad.vertices[0],a[0].uniforms.dimensions.value[3]=this.quad.vertices[5]),a[0].applyFilter(this.renderer,n,i),this.returnRenderTarget(n);else{for(var o=n,l=this.getRenderTarget(!0),u=0;uthis.textureSize.width&&(t.width=this.textureSize.width-t.x),t.y+t.height>this.textureSize.height&&(t.height=this.textureSize.height-t.y)},l.prototype.resize=function(t,e){this.textureSize.width=t,this.textureSize.height=e;for(var n=0;n{var i=n(1103),s=n(5207);function r(t){i.call(this,t),this.stencilStack=[],this.reverse=!0,this.count=0,this.alphaMaskPool=[]}r.prototype=Object.create(i.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.pushMask=function(t,e){e.texture?this.pushSpriteMask(t,e):this.pushStencilMask(t,e)},r.prototype.popMask=function(t,e){e.texture?this.popSpriteMask(t,e):this.popStencilMask(t,e)},r.prototype.pushSpriteMask=function(t,e){var n=this.alphaMaskPool.pop();n||(n=[new s(e)]),n[0].maskSprite=e,this.renderer.filterManager.pushFilter(t,n)},r.prototype.popSpriteMask=function(){var t=this.renderer.filterManager.popFilter();this.alphaMaskPool.push(t)},r.prototype.pushStencilMask=function(t,e){this.renderer.stencilManager.pushMask(e)},r.prototype.popStencilMask=function(t,e){this.renderer.stencilManager.popMask(e)}},3779:(t,e,n)=>{var i=n(1103),s=n(8297),r=n(7151),a=n(9691),o=n(501);function l(t){i.call(this,t),this.maxAttibs=10,this.attribState=[],this.tempAttribState=[];for(var e=0;e{var i=n(1103),s=n(501);function r(t){i.call(this,t),this.stencilMaskStack=null}r.prototype=Object.create(i.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.setMaskStack=function(t){this.stencilMaskStack=t;var e=this.renderer.gl;0===t.stencilStack.length?e.disable(e.STENCIL_TEST):e.enable(e.STENCIL_TEST)},r.prototype.pushStencil=function(t,e){this.renderer.currentRenderTarget.attachStencilBuffer();var n=this.renderer.gl,i=this.stencilMaskStack;this.bindGraphics(t,e),0===i.stencilStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),i.reverse=!0,i.count=0),i.stencilStack.push(e);var s=i.count;n.colorMask(!1,!1,!1,!1),n.stencilFunc(n.ALWAYS,0,255),n.stencilOp(n.KEEP,n.KEEP,n.INVERT),1===e.mode?(n.drawElements(n.TRIANGLE_FAN,e.indices.length-4,n.UNSIGNED_SHORT,0),i.reverse?(n.stencilFunc(n.EQUAL,255-s,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)):(n.stencilFunc(n.EQUAL,s,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)),n.drawElements(n.TRIANGLE_FAN,4,n.UNSIGNED_SHORT,2*(e.indices.length-4)),i.reverse?n.stencilFunc(n.EQUAL,255-(s+1),255):n.stencilFunc(n.EQUAL,s+1,255),i.reverse=!i.reverse):(i.reverse?(n.stencilFunc(n.EQUAL,s,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,255-s,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),n.drawElements(n.TRIANGLE_STRIP,e.indices.length,n.UNSIGNED_SHORT,0),i.reverse?n.stencilFunc(n.EQUAL,s+1,255):n.stencilFunc(n.EQUAL,255-(s+1),255)),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),i.count++},r.prototype.bindGraphics=function(t,e){var n,i=this.renderer.gl;1===e.mode?(n=this.renderer.shaderManager.complexPrimitiveShader,this.renderer.shaderManager.setShader(n),i.uniformMatrix3fv(n.uniforms.translationMatrix._location,!1,t.worldTransform.toArray(!0)),i.uniformMatrix3fv(n.uniforms.projectionMatrix._location,!1,this.renderer.currentRenderTarget.projectionMatrix.toArray(!0)),i.uniform3fv(n.uniforms.tint._location,s.hex2rgb(t.tint)),i.uniform3fv(n.uniforms.color._location,e.color),i.uniform1f(n.uniforms.alpha._location,t.worldAlpha),i.bindBuffer(i.ARRAY_BUFFER,e.buffer),i.vertexAttribPointer(n.attributes.aVertexPosition,2,i.FLOAT,!1,8,0),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,e.indexBuffer)):(n=this.renderer.shaderManager.primitiveShader,this.renderer.shaderManager.setShader(n),i.uniformMatrix3fv(n.uniforms.translationMatrix._location,!1,t.worldTransform.toArray(!0)),i.uniformMatrix3fv(n.uniforms.projectionMatrix._location,!1,this.renderer.currentRenderTarget.projectionMatrix.toArray(!0)),i.uniform3fv(n.uniforms.tint._location,s.hex2rgb(t.tint)),i.uniform1f(n.uniforms.alpha._location,t.worldAlpha),i.bindBuffer(i.ARRAY_BUFFER,e.buffer),i.vertexAttribPointer(n.attributes.aVertexPosition,2,i.FLOAT,!1,24,0),i.vertexAttribPointer(n.attributes.aColor,4,i.FLOAT,!1,24,8),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,e.indexBuffer))},r.prototype.popStencil=function(t,e){var n=this.renderer.gl,i=this.stencilMaskStack;if(i.stencilStack.pop(),i.count--,0===i.stencilStack.length)n.disable(n.STENCIL_TEST);else{var s=i.count;this.bindGraphics(t,e),n.colorMask(!1,!1,!1,!1),1===e.mode?(i.reverse=!i.reverse,i.reverse?(n.stencilFunc(n.EQUAL,255-(s+1),255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,s+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),n.drawElements(n.TRIANGLE_FAN,4,n.UNSIGNED_SHORT,2*(e.indices.length-4)),n.stencilFunc(n.ALWAYS,0,255),n.stencilOp(n.KEEP,n.KEEP,n.INVERT),n.drawElements(n.TRIANGLE_FAN,e.indices.length-4,n.UNSIGNED_SHORT,0),this.renderer.drawCount+=2,i.reverse?n.stencilFunc(n.EQUAL,s,255):n.stencilFunc(n.EQUAL,255-s,255)):(i.reverse?(n.stencilFunc(n.EQUAL,s+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)):(n.stencilFunc(n.EQUAL,255-(s+1),255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)),n.drawElements(n.TRIANGLE_STRIP,e.indices.length,n.UNSIGNED_SHORT,0),this.renderer.drawCount++,i.reverse?n.stencilFunc(n.EQUAL,s,255):n.stencilFunc(n.EQUAL,255-s,255)),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP)}},r.prototype.destroy=function(){i.prototype.destroy.call(this),this.stencilMaskStack.stencilStack=null},r.prototype.pushMask=function(t){this.renderer.setObjectRenderer(this.renderer.plugins.graphics),t.dirty&&this.renderer.plugins.graphics.updateGraphics(t,this.renderer.gl),t._webGL[this.renderer.gl.id].data.length&&this.pushStencil(t,t._webGL[this.renderer.gl.id].data[0])},r.prototype.popMask=function(t){this.renderer.setObjectRenderer(this.renderer.plugins.graphics),this.popStencil(t,t._webGL[this.renderer.gl.id].data[0])}},1103:t=>{function e(t){this.renderer=t,this.renderer.on("context",this.onContextChange,this)}e.prototype.constructor=e,t.exports=e,e.prototype.onContextChange=function(){},e.prototype.destroy=function(){this.renderer.off("context",this.onContextChange,this),this.renderer=null}},7151:(t,e,n)=>{var i=n(8306);function s(t){i.call(this,t,["attribute vec2 aVertexPosition;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform vec3 tint;","uniform float alpha;","uniform vec3 color;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vColor = vec4(color * alpha * tint, alpha);","}"].join("\n"),["precision mediump float;","varying vec4 vColor;","void main(void){"," gl_FragColor = vColor;","}"].join("\n"),{tint:{type:"3f",value:[0,0,0]},alpha:{type:"1f",value:0},color:{type:"3f",value:[0,0,0]},translationMatrix:{type:"mat3",value:new Float32Array(9)},projectionMatrix:{type:"mat3",value:new Float32Array(9)}},{aVertexPosition:0})}s.prototype=Object.create(i.prototype),s.prototype.constructor=s,t.exports=s},9691:(t,e,n)=>{var i=n(8306);function s(t){i.call(this,t,["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform float alpha;","uniform float flipY;","uniform vec3 tint;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vColor = aColor * vec4(tint * alpha, alpha);","}"].join("\n"),["precision mediump float;","varying vec4 vColor;","void main(void){"," gl_FragColor = vColor;","}"].join("\n"),{tint:{type:"3f",value:[0,0,0]},alpha:{type:"1f",value:0},translationMatrix:{type:"mat3",value:new Float32Array(9)},projectionMatrix:{type:"mat3",value:new Float32Array(9)}},{aVertexPosition:0,aColor:0})}s.prototype=Object.create(i.prototype),s.prototype.constructor=s,t.exports=s},8306:(t,e,n)=>{var i=n(501);function s(t,e,n,s,r){if(!e||!n)throw new Error("Pixi.js Error. Shader requires vertexSrc and fragmentSrc");this.uid=i.uid(),this.gl=t.renderer.gl,this.shaderManager=t,this.program=null,this.uniforms=s||{},this.attributes=r||{},this.textureCount=1,this.vertexSrc=e,this.fragmentSrc=n,this.init()}s.prototype.constructor=s,t.exports=s,s.prototype.init=function(){this.compile(),this.gl.useProgram(this.program),this.cacheUniformLocations(Object.keys(this.uniforms)),this.cacheAttributeLocations(Object.keys(this.attributes))},s.prototype.cacheUniformLocations=function(t){for(var e=0;e{var i=n(8306);function s(t,e,n,r,a){var o={uSampler:{type:"sampler2D",value:0},projectionMatrix:{type:"mat3",value:new Float32Array([1,0,0,0,1,0,0,0,1])}};if(r)for(var l in r)o[l]=r[l];var u={aVertexPosition:0,aTextureCoord:0,aColor:0};if(a)for(var h in a)u[h]=a[h];e=e||s.defaultVertexSrc,n=n||s.defaultFragmentSrc,i.call(this,t,e,n,o,u)}s.prototype=Object.create(i.prototype),s.prototype.constructor=s,t.exports=s,s.defaultVertexSrc=["precision lowp float;","attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute vec4 aColor;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;"," vColor = vec4(aColor.rgb * aColor.a, aColor.a);","}"].join("\n"),s.defaultFragmentSrc=["precision lowp float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D uSampler;","void main(void){"," gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor ;","}"].join("\n")},1830:(t,e,n)=>{var i=n(1103);function s(t){i.call(this,t)}s.prototype=Object.create(i.prototype),s.prototype.constructor=s,t.exports=s,s.prototype.start=function(){},s.prototype.stop=function(){this.flush()},s.prototype.flush=function(){},s.prototype.render=function(t){}},3885:t=>{function e(t){this.gl=t,this.vertices=new Float32Array([0,0,200,0,200,200,0,200]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.colors=new Float32Array([1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),this.indices=new Uint16Array([0,1,2,0,3,2]),this.vertexBuffer=t.createBuffer(),this.indexBuffer=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this.vertexBuffer),t.bufferData(t.ARRAY_BUFFER,128,t.DYNAMIC_DRAW),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices,t.STATIC_DRAW),this.upload()}e.prototype.constructor=e,e.prototype.map=function(t,e){var n=0,i=0;this.uvs[0]=n,this.uvs[1]=i,this.uvs[2]=n+e.width/t.width,this.uvs[3]=i,this.uvs[4]=n+e.width/t.width,this.uvs[5]=i+e.height/t.height,this.uvs[6]=n,this.uvs[7]=i+e.height/t.height,n=e.x,i=e.y,this.vertices[0]=n,this.vertices[1]=i,this.vertices[2]=n+e.width,this.vertices[3]=i,this.vertices[4]=n+e.width,this.vertices[5]=i+e.height,this.vertices[6]=n,this.vertices[7]=i+e.height,this.upload()},e.prototype.upload=function(){var t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,this.vertexBuffer),t.bufferSubData(t.ARRAY_BUFFER,0,this.vertices),t.bufferSubData(t.ARRAY_BUFFER,32,this.uvs),t.bufferSubData(t.ARRAY_BUFFER,64,this.colors)},e.prototype.destroy=function(){var t=this.gl;t.deleteBuffer(this.vertexBuffer),t.deleteBuffer(this.indexBuffer)},t.exports=e},7955:(t,e,n)=>{var i=n(4650),s=n(501),r=n(6192),a=n(8614),o=function(t,e,n,o,l,u){(this.gl=t,this.frameBuffer=null,this.texture=null,this.size=new i.Rectangle(0,0,1,1),this.resolution=l||r.RESOLUTION,this.projectionMatrix=new i.Matrix,this.transform=null,this.frame=null,this.stencilBuffer=null,this.stencilMaskStack=new a,this.filterStack=[{renderTarget:this,filter:[],bounds:this.size}],this.scaleMode=o||r.SCALE_MODES.DEFAULT,this.root=u,this.root)||(this.frameBuffer=t.createFramebuffer(),this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,o===r.SCALE_MODES.LINEAR?t.LINEAR:t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,o===r.SCALE_MODES.LINEAR?t.LINEAR:t.NEAREST),s.isPowerOfTwo(e,n)?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT)):(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)),t.bindFramebuffer(t.FRAMEBUFFER,this.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.texture,0));this.resize(e,n)};o.prototype.constructor=o,t.exports=o,o.prototype.clear=function(t){var e=this.gl;t&&e.bindFramebuffer(e.FRAMEBUFFER,this.frameBuffer),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)},o.prototype.attachStencilBuffer=function(){if(!this.stencilBuffer&&!this.root){var t=this.gl;this.stencilBuffer=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.stencilBuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,this.stencilBuffer),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.size.width*this.resolution,this.size.height*this.resolution)}},o.prototype.activate=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.frameBuffer);var e=this.frame||this.size;this.calculateProjection(e),this.transform&&this.projectionMatrix.append(this.transform),t.viewport(0,0,e.width*this.resolution,e.height*this.resolution)},o.prototype.calculateProjection=function(t){var e=this.projectionMatrix;e.identity(),this.root?(e.a=1/t.width*2,e.d=-1/t.height*2,e.tx=-1-t.x*e.a,e.ty=1-t.y*e.d):(e.a=1/t.width*2,e.d=1/t.height*2,e.tx=-1-t.x*e.a,e.ty=-1-t.y*e.d)},o.prototype.resize=function(t,e){if(t|=0,e|=0,this.size.width!==t||this.size.height!==e){if(this.size.width=t,this.size.height=e,!this.root){var n=this.gl;n.bindTexture(n.TEXTURE_2D,this.texture),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,t*this.resolution,e*this.resolution,0,n.RGBA,n.UNSIGNED_BYTE,null),this.stencilBuffer&&(n.bindRenderbuffer(n.RENDERBUFFER,this.stencilBuffer),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t*this.resolution,e*this.resolution))}var i=this.frame||this.size;this.calculateProjection(i)}},o.prototype.destroy=function(){var t=this.gl;t.deleteRenderbuffer(this.stencilBuffer),t.deleteFramebuffer(this.frameBuffer),t.deleteTexture(this.texture),this.frameBuffer=null,this.texture=null}},8614:t=>{function e(){this.stencilStack=[],this.reverse=!0,this.count=0}e.prototype.constructor=e,t.exports=e},2861:(t,e,n)=>{var i=n(4650),s=n(2699),r=n(7673),a=n(7809),o=n(501),l=n(6192),u=new i.Point;function h(t){r.call(this),this.anchor=new i.Point,this._texture=null,this._width=0,this._height=0,this.tint=16777215,this.blendMode=l.BLEND_MODES.NORMAL,this.shader=null,this.cachedTint=16777215,this.texture=t||s.EMPTY}h.prototype=Object.create(r.prototype),h.prototype.constructor=h,t.exports=h,Object.defineProperties(h.prototype,{width:{get:function(){return Math.abs(this.scale.x)*this.texture._frame.width},set:function(t){this.scale.x=o.sign(this.scale.x)*t/this.texture._frame.width,this._width=t}},height:{get:function(){return Math.abs(this.scale.y)*this.texture._frame.height},set:function(t){this.scale.y=o.sign(this.scale.y)*t/this.texture._frame.height,this._height=t}},texture:{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,this.cachedTint=16777215,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}}),h.prototype._onTextureUpdate=function(){this._width&&(this.scale.x=o.sign(this.scale.x)*this._width/this.texture.frame.width),this._height&&(this.scale.y=o.sign(this.scale.y)*this._height/this.texture.frame.height)},h.prototype._renderWebGL=function(t){t.setObjectRenderer(t.plugins.sprite),t.plugins.sprite.render(this)},h.prototype.getBounds=function(t){if(!this._currentBounds){var e,n,i,s,r=this._texture._frame.width,a=this._texture._frame.height,o=r*(1-this.anchor.x),l=r*-this.anchor.x,u=a*(1-this.anchor.y),h=a*-this.anchor.y,p=t||this.worldTransform,c=p.a,d=p.b,f=p.c,m=p.d,g=p.tx,_=p.ty;if(0===d&&0===f)c<0&&(c*=-1),m<0&&(m*=-1),e=c*l+g,n=c*o+g,i=m*h+_,s=m*u+_;else{var T=c*l+f*h+g,y=m*h+d*l+_,I=c*o+f*h+g,E=m*h+d*o+_,b=c*o+f*u+g,v=m*u+d*o+_,w=c*l+f*u+g,S=m*u+d*l+_;e=w<(e=b<(e=I<(e=T)?I:e)?b:e)?w:e,i=S<(i=v<(i=E<(i=y)?E:i)?v:i)?S:i,n=w>(n=b>(n=I>(n=T)?I:n)?b:n)?w:n,s=S>(s=v>(s=E>(s=y)?E:s)?v:s)?S:s}if(this.children.length){var x=this.containerGetBounds();o=x.x,l=x.x+x.width,e=el?n:l,s=s>(h=x.y+x.height)?s:h}var R=this._bounds;R.x=e,R.width=n-e,R.y=i,R.height=s-i,this._currentBounds=R}return this._currentBounds},h.prototype.getLocalBounds=function(){return this._bounds.x=-this._texture._frame.width*this.anchor.x,this._bounds.y=-this._texture._frame.height*this.anchor.y,this._bounds.width=this._texture._frame.width,this._bounds.height=this._texture._frame.height,this._bounds},h.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,u);var e,n=this._texture._frame.width,i=this._texture._frame.height,s=-n*this.anchor.x;return u.x>s&&u.xe&&u.y{var i=n(1830),s=n(5092),r=n(6192);function a(t){i.call(this,t),this.vertSize=5,this.vertByteSize=4*this.vertSize,this.size=r.SPRITE_BATCH_SIZE;var e=4*this.size*this.vertByteSize,n=6*this.size;this.vertices=new ArrayBuffer(e),this.positions=new Float32Array(this.vertices),this.colors=new Uint32Array(this.vertices),this.indices=new Uint16Array(n);for(var s=0,a=0;s=this.size&&this.flush();var n=e._uvs;if(n){var i,s,r,a,o=t.anchor.x,l=t.anchor.y;if(e.trim&&void 0===t.tileScale){var u=e.trim;i=(s=u.x-o*u.width)+e.crop.width,r=(a=u.y-l*u.height)+e.crop.height}else i=e._frame.width*(1-o),s=e._frame.width*-o,r=e._frame.height*(1-l),a=e._frame.height*-l;var h=this.currentBatchSize*this.vertByteSize,p=t.worldTransform,c=p.a,d=p.b,f=p.c,m=p.d,g=p.tx,_=p.ty,T=this.colors,y=this.positions;this.renderer.roundPixels?(y[h]=c*s+f*a+g|0,y[h+1]=m*a+d*s+_|0,y[h+5]=c*i+f*a+g|0,y[h+6]=m*a+d*i+_|0,y[h+10]=c*i+f*r+g|0,y[h+11]=m*r+d*i+_|0,y[h+15]=c*s+f*r+g|0,y[h+16]=m*r+d*s+_|0):(y[h]=c*s+f*a+g,y[h+1]=m*a+d*s+_,y[h+5]=c*i+f*a+g,y[h+6]=m*a+d*i+_,y[h+10]=c*i+f*r+g,y[h+11]=m*r+d*i+_,y[h+15]=c*s+f*r+g,y[h+16]=m*r+d*s+_),y[h+2]=n.x0,y[h+3]=n.y0,y[h+7]=n.x1,y[h+8]=n.y1,y[h+12]=n.x2,y[h+13]=n.y2,y[h+17]=n.x3,y[h+18]=n.y3;var I=t.tint;T[h+4]=T[h+9]=T[h+14]=T[h+19]=(I>>16)+(65280&I)+((255&I)<<16)+(255*t.worldAlpha<<24),this.sprites[this.currentBatchSize++]=t}},a.prototype.flush=function(){if(0!==this.currentBatchSize){var t,e,n,i,s=this.renderer.gl;if(this.currentBatchSize>.5*this.size)s.bufferSubData(s.ARRAY_BUFFER,0,this.vertices);else{var r=this.positions.subarray(0,this.currentBatchSize*this.vertByteSize);s.bufferSubData(s.ARRAY_BUFFER,0,r)}for(var a,o=0,l=0,u=null,h=this.renderer.blendModeManager.currentBlendMode,p=null,c=!1,d=!1,f=0,m=this.currentBatchSize;f{var i=n(2861),s=n(2699),r=n(4650),a=n(501),o=n(6192);function l(t,e,n){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=n||o.RESOLUTION,this._text=null,this._style=null;var a=s.fromCanvas(this.canvas);a.trim=new r.Rectangle,i.call(this,a),this.text=t,this.style=e}l.prototype=Object.create(i.prototype),l.prototype.constructor=l,t.exports=l,l.fontPropertiesCache={},l.fontPropertiesCanvas=document.createElement("canvas"),l.fontPropertiesContext=l.fontPropertiesCanvas.getContext("2d"),Object.defineProperties(l.prototype,{width:{get:function(){return this.dirty&&this.updateText(),this.scale.x*this._texture._frame.width},set:function(t){this.scale.x=t/this._texture._frame.width,this._width=t}},height:{get:function(){return this.dirty&&this.updateText(),this.scale.y*this._texture._frame.height},set:function(t){this.scale.y=t/this._texture._frame.height,this._height=t}},style:{get:function(){return this._style},set:function(t){"number"==typeof(t=t||{}).fill&&(t.fill=a.hex2string(t.fill)),"number"==typeof t.stroke&&(t.stroke=a.hex2string(t.stroke)),"number"==typeof t.dropShadowColor&&(t.dropShadowColor=a.hex2string(t.dropShadowColor)),t.font=t.font||"bold 20pt Arial",t.fill=t.fill||"black",t.align=t.align||"left",t.stroke=t.stroke||"black",t.strokeThickness=t.strokeThickness||0,t.wordWrap=t.wordWrap||!1,t.wordWrapWidth=t.wordWrapWidth||100,t.dropShadow=t.dropShadow||!1,t.dropShadowColor=t.dropShadowColor||"#000000",t.dropShadowAngle=t.dropShadowAngle||Math.PI/6,t.dropShadowDistance=t.dropShadowDistance||5,t.padding=t.padding||0,t.textBaseline=t.textBaseline||"alphabetic",t.lineJoin=t.lineJoin||"miter",t.miterLimit=t.miterLimit||10,this._style=t,this.dirty=!0}},text:{get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}}}),l.prototype.updateText=function(){var t=this._style;this.context.font=t.font;for(var e=(t.wordWrap?this.wordWrap(this._text):this._text).split(/(?:\r\n|\r|\n)/),n=new Array(e.length),i=0,s=this.determineFontProperties(t.font),r=0;rr;o--){for(u=0;ur?(o>0&&(e+="\n"),e+=a[o],r=i-l):(r-=u,e+=" "+a[o])}s{var i=n(501),s=n(6192),r=n(5585);function a(t,e,n){r.call(this),this.uid=i.uid(),this.resolution=n||1,this.width=100,this.height=100,this.realWidth=100,this.realHeight=100,this.scaleMode=e||s.SCALE_MODES.DEFAULT,this.hasLoaded=!1,this.isLoading=!1,this.source=null,this.premultipliedAlpha=!0,this.imageUrl=null,this.isPowerOfTwo=!1,this.mipmap=!1,this._glTextures=[],t&&this.loadSource(t)}a.prototype=Object.create(r.prototype),a.prototype.constructor=a,t.exports=a,a.prototype.update=function(){this.realWidth=this.source.naturalWidth||this.source.width,this.realHeight=this.source.naturalHeight||this.source.height,this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=i.isPowerOfTwo(this.realWidth,this.realHeight),this.emit("update",this)},a.prototype.loadSource=function(t){var e=this.isLoading;if(this.hasLoaded=!1,this.isLoading=!1,e&&this.source&&(this.source.onload=null,this.source.onerror=null),this.source=t,(this.source.complete||this.source.getContext)&&this.source.width&&this.source.height)this._sourceLoaded();else if(!t.getContext){this.isLoading=!0;var n=this;t.onload=function(){t.onload=null,t.onerror=null,n.isLoading&&(n.isLoading=!1,n._sourceLoaded(),n.emit("loaded",n))},t.onerror=function(){t.onload=null,t.onerror=null,n.isLoading&&(n.isLoading=!1,n.emit("error",n))},t.complete&&t.src&&(this.isLoading=!1,t.onload=null,t.onerror=null,t.width&&t.height?(this._sourceLoaded(),e&&this.emit("loaded",this)):e&&this.emit("error",this))}},a.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()},a.prototype.destroy=function(){this.imageUrl?(delete i.BaseTextureCache[this.imageUrl],delete i.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")):this.source&&this.source._pixiId&&delete i.BaseTextureCache[this.source._pixiId],this.source=null,this.dispose()},a.prototype.dispose=function(){this.emit("dispose",this),this._glTextures.length=0},a.prototype.updateSourceImage=function(t){this.source.src=t,this.loadSource(this.source)},a.fromImage=function(t,e,n){var s=i.BaseTextureCache[t];if(void 0===e&&0!==t.indexOf("data:")&&(e=!0),!s){var r=new Image;e&&(r.crossOrigin=""),(s=new a(r,n)).imageUrl=t,r.src=t,i.BaseTextureCache[t]=s,s.resolution=i.getResolutionOfUrl(t)}return s},a.fromCanvas=function(t,e){t._pixiId||(t._pixiId="canvas_"+i.uid());var n=i.BaseTextureCache[t._pixiId];return n||(n=new a(t,e),i.BaseTextureCache[t._pixiId]=n),n}},7443:(t,e,n)=>{var i=n(1936),s=n(2699),r=n(7955),a=n(4598),o=n(1549),l=n(4650),u=n(6192),h=new l.Matrix;function p(t,e,n,h,p){if(!t)throw new Error("Unable to create RenderTexture, you must pass a renderer into the constructor.");e=e||100,n=n||100,p=p||u.RESOLUTION;var c=new i;if(c.width=e,c.height=n,c.resolution=p,c.scaleMode=h||u.SCALE_MODES.DEFAULT,c.hasLoaded=!0,s.call(this,c,new l.Rectangle(0,0,e,n)),this.width=e,this.height=n,this.resolution=p,this.render=null,this.renderer=t,this.renderer.type===u.RENDERER_TYPE.WEBGL){var d=this.renderer.gl;this.textureBuffer=new r(d,this.width,this.height,c.scaleMode,this.resolution),this.baseTexture._glTextures[d.id]=this.textureBuffer.texture,this.filterManager=new a(this.renderer),this.filterManager.onContextChange(),this.filterManager.resize(e,n),this.render=this.renderWebGL,this.renderer.currentRenderer.start(),this.renderer.currentRenderTarget.activate()}else this.render=this.renderCanvas,this.textureBuffer=new o(this.width*this.resolution,this.height*this.resolution),this.baseTexture.source=this.textureBuffer.canvas;this.valid=!0,this._updateUvs()}p.prototype=Object.create(s.prototype),p.prototype.constructor=p,t.exports=p,p.prototype.resize=function(t,e,n){t===this.width&&e===this.height||(this.valid=t>0&&e>0,this.width=this._frame.width=this.crop.width=t,this.height=this._frame.height=this.crop.height=e,n&&(this.baseTexture.width=this.width,this.baseTexture.height=this.height),this.valid&&(this.textureBuffer.resize(this.width,this.height),this.filterManager&&this.filterManager.resize(this.width,this.height)))},p.prototype.clear=function(){this.valid&&(this.renderer.type===u.RENDERER_TYPE.WEBGL&&this.renderer.gl.bindFramebuffer(this.renderer.gl.FRAMEBUFFER,this.textureBuffer.frameBuffer),this.textureBuffer.clear())},p.prototype.renderWebGL=function(t,e,n,i){if(this.valid){if(i=void 0===i||i,//!updateTransform; +this.textureBuffer.transform=e,this.textureBuffer.activate(),t.worldAlpha=1,i){t.worldTransform.identity(),t.currentBounds=null;var s,r,a=t.children;for(s=0,r=a.length;s{var i=n(1936),s=n(3367),r=n(1507),a=n(5585),o=n(4650),l=n(501);function u(t,e,n,i,s){a.call(this),this.noFrame=!1,e||(this.noFrame=!0,e=new o.Rectangle(0,0,1,1)),t instanceof u&&(t=t.baseTexture),this.baseTexture=t,this._frame=e,this.trim=i,this.valid=!1,this.requiresUpdate=!1,this._uvs=null,this.width=0,this.height=0,this.crop=n||e,this.rotate=!!s,t.hasLoaded?(this.noFrame&&(e=new o.Rectangle(0,0,t.width,t.height),t.on("update",this.onBaseTextureUpdated,this)),this.frame=e):t.once("loaded",this.onBaseTextureLoaded,this)}u.prototype=Object.create(a.prototype),u.prototype.constructor=u,t.exports=u,Object.defineProperties(u.prototype,{frame:{get:function(){return this._frame},set:function(t){if(this._frame=t,this.noFrame=!1,this.width=t.width,this.height=t.height,!this.trim&&!this.rotate&&(t.x+t.width>this.baseTexture.width||t.y+t.height>this.baseTexture.height))throw new Error("Texture Error: frame does not fit inside the base Texture dimensions "+this);this.valid=t&&t.width&&t.height&&this.baseTexture.hasLoaded,this.trim?(this.width=this.trim.width,this.height=this.trim.height,this._frame.width=this.trim.width,this._frame.height=this.trim.height):this.crop=t,this.valid&&this._updateUvs()}}}),u.prototype.update=function(){this.baseTexture.update()},u.prototype.onBaseTextureLoaded=function(t){this.noFrame?this.frame=new o.Rectangle(0,0,t.width,t.height):this.frame=this._frame,this.emit("update",this)},u.prototype.onBaseTextureUpdated=function(t){this._frame.width=t.width,this._frame.height=t.height,this.emit("update",this)},u.prototype.destroy=function(t){this.baseTexture&&(t&&this.baseTexture.destroy(),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture.off("loaded",this.onBaseTextureLoaded,this),this.baseTexture=null),this._frame=null,this._uvs=null,this.trim=null,this.crop=null,this.valid=!1,this.off("dispose",this.dispose,this),this.off("update",this.update,this)},u.prototype.clone=function(){return new u(this.baseTexture,this.frame,this.crop,this.trim,this.rotate)},u.prototype._updateUvs=function(){this._uvs||(this._uvs=new r),this._uvs.set(this.crop,this.baseTexture,this.rotate)},u.fromImage=function(t,e,n){var s=l.TextureCache[t];return s||(s=new u(i.fromImage(t,e,n)),l.TextureCache[t]=s),s},u.fromFrame=function(t){var e=l.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return e},u.fromCanvas=function(t,e){return new u(i.fromCanvas(t,e))},u.fromVideo=function(t,e){return"string"==typeof t?u.fromVideoUrl(t,e):new u(s.fromVideo(t,e))},u.fromVideoUrl=function(t,e){return new u(s.fromUrl(t,e))},u.addTextureToCache=function(t,e){l.TextureCache[e]=t},u.removeTextureFromCache=function(t){var e=l.TextureCache[t];return delete l.TextureCache[t],delete l.BaseTextureCache[t],e},u.EMPTY=new u(new i)},1507:t=>{function e(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1}t.exports=e,e.prototype.set=function(t,e,n){var i=e.width,s=e.height;n?(this.x0=(t.x+t.height)/i,this.y0=t.y/s,this.x1=(t.x+t.height)/i,this.y1=(t.y+t.width)/s,this.x2=t.x/i,this.y2=(t.y+t.width)/s,this.x3=t.x/i,this.y3=t.y/s):(this.x0=t.x/i,this.y0=t.y/s,this.x1=(t.x+t.width)/i,this.y1=t.y/s,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/s,this.x3=t.x/i,this.y3=(t.y+t.height)/s)}},3367:(t,e,n)=>{var i=n(1936),s=n(501);function r(t,e){if(!t)throw new Error("No video source element specified.");(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),i.call(this,t,e),this.autoUpdate=!1,this._onUpdate=this._onUpdate.bind(this),this._onCanPlay=this._onCanPlay.bind(this),t.complete||(t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlay),t.addEventListener("play",this._onPlayStart.bind(this)),t.addEventListener("pause",this._onPlayStop.bind(this))),this.__loaded=!1}function a(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var n=document.createElement("source");return n.src=t,n.type=e,n}r.prototype=Object.create(i.prototype),r.prototype.constructor=r,t.exports=r,r.prototype._onUpdate=function(){this.autoUpdate&&(window.requestAnimationFrame(this._onUpdate),this.update())},r.prototype._onPlayStart=function(){this.autoUpdate||(window.requestAnimationFrame(this._onUpdate),this.autoUpdate=!0)},r.prototype._onPlayStop=function(){this.autoUpdate=!1},r.prototype._onCanPlay=function(){this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.source.play(),this.__loaded||(this.__loaded=!0,this.emit("loaded",this)))},r.prototype.destroy=function(){this.source&&this.source._pixiId&&(delete s.BaseTextureCache[this.source._pixiId],delete this.source._pixiId),i.prototype.destroy.call(this)},r.fromVideo=function(t,e){t._pixiId||(t._pixiId="video_"+s.uid());var n=s.BaseTextureCache[t._pixiId];return n||(n=new r(t,e),s.BaseTextureCache[t._pixiId]=n),n},r.fromUrl=function(t,e){var n=document.createElement("video");if(Array.isArray(t))for(var i=0;i{var i=n(6192),s=n(5585),r="tick";function a(){var t=this;this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._emitter.listeners(r,!0)&&(t._requestId=requestAnimationFrame(t._tick)))},this._emitter=new s,this._requestId=null,this._maxElapsedMS=100,this.autoStart=!1,this.deltaTime=1,this.elapsedMS=1/i.TARGET_FPMS,this.lastTime=0,this.speed=1,this.started=!1}Object.defineProperties(a.prototype,{FPS:{get:function(){return 1e3/this.elapsedMS}},minFPS:{get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(Math.max(0,t)/1e3,i.TARGET_FPMS);this._maxElapsedMS=1/e}}}),a.prototype._requestIfNeeded=function(){null===this._requestId&&this._emitter.listeners(r,!0)&&(this.lastTime=performance.now(),this._requestId=requestAnimationFrame(this._tick))},a.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},a.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},a.prototype.add=function(t,e){return this._emitter.on(r,t,e),this._startIfPossible(),this},a.prototype.addOnce=function(t,e){return this._emitter.once(r,t,e),this._startIfPossible(),this},a.prototype.remove=function(t,e){return this._emitter.off(r,t,e),this._emitter.listeners(r,!0)||this._cancelIfNeeded(),this},a.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},a.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},a.prototype.update=function(t){var e;t=t||performance.now(),(e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*i.TARGET_FPMS*this.speed,this._emitter.emit(r,this.deltaTime),this.lastTime=t},t.exports=a},2410:(t,e,n)=>{var i=n(7974),s=new i;s.autoStart=!0,t.exports={shared:s,Ticker:i}},501:(t,e,n)=>{var i=n(6192),s=t.exports={_uid:0,_saidHello:!1,EventEmitter:n(5585),pluginTarget:n(7987),async:n(4083),uid:function(){return++s._uid},hex2rgb:function(t,e){return(e=e||[])[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},hex2string:function(t){return t=t.toString(16),"#"+(t="000000".substr(0,6-t.length)+t)},rgb2hex:function(t){return(255*t[0]<<16)+(255*t[1]<<8)+255*t[2]},canUseNewCanvasBlendModes:function(){if("undefined"==typeof document)return!1;var t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",e="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",n=new Image;n.src=t+"AP804Oa6"+e;var i=new Image;i.src=t+"/wCKxvRF"+e;var s=document.createElement("canvas");s.width=6,s.height=1;var r=s.getContext("2d");r.globalCompositeOperation="multiply",r.drawImage(n,0,0),r.drawImage(i,2,0);var a=r.getImageData(2,0,1,1).data;return 255===a[0]&&0===a[1]&&0===a[2]},getNextPowerOfTwo:function(t){if(t>0&&!(t&t-1))return t;for(var e=1;e0&&!(t&t-1)&&e>0&&!(e&e-1)},getResolutionOfUrl:function(t){var e=i.RETINA_PREFIX.exec(t);return e?parseFloat(e[1]):1},sayHello:function(t){if(!s._saidHello){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c Pixi.js "+i.VERSION+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("Pixi.js "+i.VERSION+" - "+t+" - http://www.pixijs.com/");s._saidHello=!0}},isWebGLSupported:function(){var t={stencil:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),n=e.getContext("webgl",t)||e.getContext("experimental-webgl",t);return!(!n||!n.getContextAttributes().stencil)}catch(t){return!1}},sign:function(t){return t?t<0?-1:1:0},TextureCache:{},BaseTextureCache:{}}},7987:t=>{t.exports={mixin:function(t){!function(t){t.__plugins={},t.registerPlugin=function(e,n){t.__plugins[e]=n},t.prototype.initPlugins=function(){for(var e in this.plugins=this.plugins||{},t.__plugins)this.plugins[e]=new t.__plugins[e](this)},t.prototype.destroyPlugins=function(){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;this.plugins=null}}(t)}}},9513:(t,e,n)=>{var i=n(4651),s=n(8653),r=n(3323),a=n(8319);i.SpriteBatch=function(){throw new ReferenceError("SpriteBatch does not exist any more, please use the new ParticleContainer instead.")},i.AssetLoader=function(){throw new ReferenceError("The loader system was overhauled in pixi v3, please see the new PIXI.loaders.Loader class.")},Object.defineProperties(i,{Stage:{get:function(){return console.warn("You do not need to use a PIXI Stage any more, you can simply render any container."),i.Container}},DisplayObjectContainer:{get:function(){return console.warn("DisplayObjectContainer has been shortened to Container, please use Container from now on."),i.Container}},Strip:{get:function(){return console.warn("The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on."),s.Mesh}},Rope:{get:function(){return console.warn("The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on."),s.Rope}},MovieClip:{get:function(){return console.warn("The MovieClip class has been moved to extras.MovieClip, please use extras.MovieClip from now on."),r.MovieClip}},TilingSprite:{get:function(){return console.warn("The TilingSprite class has been moved to extras.TilingSprite, please use extras.TilingSprite from now on."),r.TilingSprite}},BitmapText:{get:function(){return console.warn("The BitmapText class has been moved to extras.BitmapText, please use extras.BitmapText from now on."),r.BitmapText}},blendModes:{get:function(){return console.warn("The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on."),i.BLEND_MODES}},scaleModes:{get:function(){return console.warn("The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on."),i.SCALE_MODES}},BaseTextureCache:{get:function(){return console.warn("The BaseTextureCache class has been moved to utils.BaseTextureCache, please use utils.BaseTextureCache from now on."),i.utils.BaseTextureCache}},TextureCache:{get:function(){return console.warn("The TextureCache class has been moved to utils.TextureCache, please use utils.TextureCache from now on."),i.utils.TextureCache}},math:{get:function(){return console.warn("The math namespace is deprecated, please access members already accessible on PIXI."),i}}}),i.Sprite.prototype.setTexture=function(t){this.texture=t,console.warn("setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;")},r.BitmapText.prototype.setText=function(t){this.text=t,console.warn("setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';")},i.Text.prototype.setText=function(t){this.text=t,console.warn("setText is now deprecated, please use the text property, e.g : myText.text = 'my text';")},i.Text.prototype.setStyle=function(t){this.style=t,console.warn("setStyle is now deprecated, please use the style property, e.g : myText.style = style;")},i.Texture.prototype.setFrame=function(t){this.frame=t,console.warn("setFrame is now deprecated, please use the frame property, e.g : myTexture.frame = frame;")},Object.defineProperties(a,{AbstractFilter:{get:function(){return console.warn("filters.AbstractFilter is an undocumented alias, please use AbstractFilter from now on."),i.AbstractFilter}},FXAAFilter:{get:function(){return console.warn("filters.FXAAFilter is an undocumented alias, please use FXAAFilter from now on."),i.FXAAFilter}},SpriteMaskFilter:{get:function(){return console.warn("filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on."),i.SpriteMaskFilter}}}),i.utils.uuid=function(){return console.warn("utils.uuid() is deprecated, please use utils.uid() from now on."),i.utils.uid()}},3635:(t,e,n)=>{var i=n(4651);function s(t,e){i.Container.call(this),e=e||{},this.textWidth=0,this.textHeight=0,this._glyphs=[],this._font={tint:void 0!==e.tint?e.tint:16777215,align:e.align||"left",name:null,size:0},this.font=e.font,this._text=t,this.maxWidth=0,this.maxLineHeight=0,this.dirty=!1,this.updateText()}s.prototype=Object.create(i.Container.prototype),s.prototype.constructor=s,t.exports=s,Object.defineProperties(s.prototype,{tint:{get:function(){return this._font.tint},set:function(t){this._font.tint="number"==typeof t&&t>=0?t:16777215,this.dirty=!0}},align:{get:function(){return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},font:{get:function(){return this._font},set:function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):s.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)}},text:{get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}}}),s.prototype.updateText=function(){for(var t=s.fonts[this._font.name],e=new i.Point,n=null,r=[],a=0,o=0,l=[],u=0,h=this._font.size/t.size,p=-1,c=0,d=0;d0&&e.x*h>this.maxWidth)r.splice(p,d-p),d=p,p=-1,l.push(a),o=Math.max(o,a),u++,e.x=0,e.y+=t.lineHeight,n=null;else{var m=t.chars[f];m&&(n&&m.kerning[n]&&(e.x+=m.kerning[n]),r.push({texture:m.texture,line:u,charCode:f,position:new i.Point(e.x+m.xOffset,e.y+m.yOffset)}),a=e.x+(m.texture.width+m.xOffset),e.x+=m.xAdvance,c=Math.max(c,m.yOffset+m.texture.height),n=f)}}l.push(a),o=Math.max(o,a);var g=[];for(d=0;d<=u;d++){var _=0;"right"===this._font.align?_=o-l[d]:"center"===this._font.align&&(_=(o-l[d])/2),g.push(_)}var T=r.length,y=this.tint;for(d=0;d{var i=n(4651);function s(t){i.Sprite.call(this,t[0]instanceof i.Texture?t[0]:t[0].texture),this._textures=null,this._durations=null,this.textures=t,this.animationSpeed=1,this.loop=!0,this.onComplete=null,this._currentTime=0,this.playing=!1}s.prototype=Object.create(i.Sprite.prototype),s.prototype.constructor=s,t.exports=s,Object.defineProperties(s.prototype,{totalFrames:{get:function(){return this._textures.length}},textures:{get:function(){return this._textures},set:function(t){if(t[0]instanceof i.Texture)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e=this._durations[this.currentFrame];)n-=this._durations[this.currentFrame]*i,this._currentTime+=i;this._currentTime+=n/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):this._texture=this._textures[this.currentFrame]},s.prototype.destroy=function(){this.stop(),i.Sprite.prototype.destroy.call(this)},s.fromFrames=function(t){for(var e=[],n=0;n{var i=n(4651),s=new i.Point,r=n(7809);function a(t,e,n){i.Sprite.call(this,t),this.tileScale=new i.Point(1,1),this.tilePosition=new i.Point(0,0),this._width=e||100,this._height=n||100,this._uvs=new i.TextureUvs,this._canvasPattern=null,this.shader=new i.AbstractFilter(["precision lowp float;","attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute vec4 aColor;","uniform mat3 projectionMatrix;","uniform vec4 uFrame;","uniform vec4 uTransform;","varying vec2 vTextureCoord;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vec2 coord = aTextureCoord;"," coord -= uTransform.xy;"," coord /= uTransform.zw;"," vTextureCoord = coord;"," vColor = vec4(aColor.rgb * aColor.a, aColor.a);","}"].join("\n"),["precision lowp float;","varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D uSampler;","uniform vec4 uFrame;","uniform vec2 uPixelSize;","void main(void){"," vec2 coord = mod(vTextureCoord, uFrame.zw);"," coord = clamp(coord, uPixelSize, uFrame.zw - uPixelSize);"," coord += uFrame.xy;"," gl_FragColor = texture2D(uSampler, coord) * vColor ;","}"].join("\n"),{uFrame:{type:"4fv",value:[0,0,1,1]},uTransform:{type:"4fv",value:[0,0,1,1]},uPixelSize:{type:"2fv",value:[1,1]}})}a.prototype=Object.create(i.Sprite.prototype),a.prototype.constructor=a,t.exports=a,Object.defineProperties(a.prototype,{width:{get:function(){return this._width},set:function(t){this._width=t}},height:{get:function(){return this._height},set:function(t){this._height=t}}}),a.prototype._onTextureUpdate=function(){},a.prototype._renderWebGL=function(t){var e=this._texture;if(e&&e._uvs){var n=e._uvs,i=e._frame.width,s=e._frame.height,r=e.baseTexture.width,a=e.baseTexture.height;e._uvs=this._uvs,e._frame.width=this.width,e._frame.height=this.height,this.shader.uniforms.uPixelSize.value[0]=1/r,this.shader.uniforms.uPixelSize.value[1]=1/a,this.shader.uniforms.uFrame.value[0]=n.x0,this.shader.uniforms.uFrame.value[1]=n.y0,this.shader.uniforms.uFrame.value[2]=n.x1-n.x0,this.shader.uniforms.uFrame.value[3]=n.y2-n.y0,this.shader.uniforms.uTransform.value[0]=this.tilePosition.x%(i*this.tileScale.x)/this._width,this.shader.uniforms.uTransform.value[1]=this.tilePosition.y%(s*this.tileScale.y)/this._height,this.shader.uniforms.uTransform.value[2]=r/this._width*this.tileScale.x,this.shader.uniforms.uTransform.value[3]=a/this._height*this.tileScale.y,t.setObjectRenderer(t.plugins.sprite),t.plugins.sprite.render(this),e._uvs=n,e._frame.width=i,e._frame.height=s}},a.prototype._renderCanvas=function(t){var e=this._texture;if(e.baseTexture.hasLoaded){var n=t.context,s=this.worldTransform,a=t.resolution,o=e.baseTexture,l=this.tilePosition.x/this.tileScale.x%e._frame.width,u=this.tilePosition.y/this.tileScale.y%e._frame.height;if(!this._canvasPattern){var h=new i.CanvasBuffer(e._frame.width,e._frame.height);16777215!==this.tint?(this.cachedTint!==this.tint&&(this.cachedTint=this.tint,this.tintedTexture=r.getTintedTexture(this,this.tint)),h.context.drawImage(this.tintedTexture,0,0)):h.context.drawImage(o.source,-e._frame.x,-e._frame.y),this._canvasPattern=h.context.createPattern(h.canvas,"repeat")}n.globalAlpha=this.worldAlpha,n.setTransform(s.a*a,s.b*a,s.c*a,s.d*a,s.tx*a,s.ty*a),n.scale(this.tileScale.x,this.tileScale.y),n.translate(l+this.anchor.x*-this._width,u+this.anchor.y*-this._height);var p=t.blendModes[this.blendMode];p!==t.context.globalCompositeOperation&&(n.globalCompositeOperation=p),n.fillStyle=this._canvasPattern,n.fillRect(-l,-u,this._width/this.tileScale.x,this._height/this.tileScale.y)}},a.prototype.getBounds=function(){var t,e,n,i,s=this._width,r=this._height,a=s*(1-this.anchor.x),o=s*-this.anchor.x,l=r*(1-this.anchor.y),u=r*-this.anchor.y,h=this.worldTransform,p=h.a,c=h.b,d=h.c,f=h.d,m=h.tx,g=h.ty,_=p*o+d*u+m,T=f*u+c*o+g,y=p*a+d*u+m,I=f*u+c*a+g,E=p*a+d*l+m,b=f*l+c*a+g,v=p*o+d*l+m,w=f*l+c*o+g;t=v<(t=E<(t=y<(t=_)?y:t)?E:t)?v:t,n=w<(n=b<(n=I<(n=T)?I:n)?b:n)?w:n,e=v>(e=E>(e=y>(e=_)?y:e)?E:e)?v:e,i=w>(i=b>(i=I>(i=T)?I:i)?b:i)?w:i;var S=this._bounds;return S.x=t,S.width=e-t,S.y=n,S.height=i-n,this._currentBounds=S,S},a.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,s);var e,n=this._width,i=this._height,r=-n*this.anchor.x;return s.x>r&&s.xe&&s.y{var i=n(4651),s=i.DisplayObject,r=new i.Matrix;s.prototype._cacheAsBitmap=!1,s.prototype._originalRenderWebGL=null,s.prototype._originalRenderCanvas=null,s.prototype._originalUpdateTransform=null,s.prototype._originalHitTest=null,s.prototype._originalDestroy=null,s.prototype._cachedSprite=null,Object.defineProperties(s.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._originalRenderWebGL=this.renderWebGL,this._originalRenderCanvas=this.renderCanvas,this._originalUpdateTransform=this.updateTransform,this._originalGetBounds=this.getBounds,this._originalDestroy=this.destroy,this._originalContainsPoint=this.containsPoint,this.renderWebGL=this._renderCachedWebGL,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(this._cachedSprite&&this._destroyCachedDisplayObject(),this.renderWebGL=this._originalRenderWebGL,this.renderCanvas=this._originalRenderCanvas,this.getBounds=this._originalGetBounds,this.destroy=this._originalDestroy,this.updateTransform=this._originalUpdateTransform,this.containsPoint=this._originalContainsPoint))}}}),s.prototype._renderCachedWebGL=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cachedSprite.worldAlpha=this.worldAlpha,t.setObjectRenderer(t.plugins.sprite),t.plugins.sprite.render(this._cachedSprite))},s.prototype._initCachedDisplayObject=function(t){if(!this._cachedSprite){t.currentRenderer.flush();var e=this.getLocalBounds().clone();if(this._filters){var n=this._filters[0].padding;e.x-=n,e.y-=n,e.width+=2*n,e.height+=2*n}var s=t.currentRenderTarget,a=t.filterManager.filterStack,o=new i.RenderTexture(t,0|e.width,0|e.height),l=r;l.tx=-e.x,l.ty=-e.y,this.renderWebGL=this._originalRenderWebGL,o.render(this,l,!0,!0),t.setRenderTarget(s),t.filterManager.filterStack=a,this.renderWebGL=this._renderCachedWebGL,this.updateTransform=this.displayObjectUpdateTransform,this.getBounds=this._getCachedBounds,this._cachedSprite=new i.Sprite(o),this._cachedSprite.worldTransform=this.worldTransform,this._cachedSprite.anchor.x=-e.x/e.width,this._cachedSprite.anchor.y=-e.y/e.height,this.updateTransform(),this.containsPoint=this._cachedSprite.containsPoint.bind(this._cachedSprite)}},s.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cachedSprite.worldAlpha=this.worldAlpha,this._cachedSprite.renderCanvas(t))},s.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cachedSprite){var e=this.getLocalBounds(),n=t.context,s=new i.RenderTexture(t,0|e.width,0|e.height),a=r;a.tx=-e.x,a.ty=-e.y,this.renderCanvas=this._originalRenderCanvas,s.render(this,a,!0),t.context=n,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.getBounds=this._getCachedBounds,this._cachedSprite=new i.Sprite(s),this._cachedSprite.worldTransform=this.worldTransform,this._cachedSprite.anchor.x=-e.x/e.width,this._cachedSprite.anchor.y=-e.y/e.height,this.updateTransform(),this.containsPoint=this._cachedSprite.containsPoint.bind(this._cachedSprite)}},s.prototype._getCachedBounds=function(){return this._cachedSprite._currentBounds=null,this._cachedSprite.getBounds()},s.prototype._destroyCachedDisplayObject=function(){this._cachedSprite._texture.destroy(),this._cachedSprite=null},s.prototype._cacheAsBitmapDestroy=function(){this.cacheAsBitmap=!1,this._originalDestroy()}},7231:(t,e,n)=>{var i=n(4651);i.DisplayObject.prototype.name=null,i.Container.prototype.getChildByName=function(t){for(var e=0;e{var i=n(4651);i.DisplayObject.prototype.getGlobalPosition=function(t){return t=t||new i.Point,this.parent?(this.displayObjectUpdateTransform(),t.x=this.worldTransform.tx,t.y=this.worldTransform.ty):(t.x=this.position.x,t.y=this.position.y),t}},3323:(t,e,n)=>{ +/** + * @file Main export of the PIXI extras library + * @author Mat Groves + * @copyright 2013-2015 GoodBoyDigital + * @license {@link https://github.com/pixijs/pixi.js/blob/master/LICENSE|MIT License} + */ +n(4262),n(7231),n(4247),t.exports={MovieClip:n(7901),TilingSprite:n(7377),BitmapText:n(3635)}},4350:(t,e,n)=>{var i=n(4651),s=n(9496);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//ascii.frag","utf8"),{dimensions:{type:"4fv",value:new Float32Array([0,0,0,0])},pixelSize:{type:"1f",value:8}})}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{size:{get:function(){return this.uniforms.pixelSize.value},set:function(t){this.uniforms.pixelSize.value=t}}})},5966:(t,e,n)=>{var i=n(4651),s=n(4356),r=n(6160);function a(){i.AbstractFilter.call(this),this.blurXFilter=new s,this.blurYFilter=new r,this.defaultFilter=new i.AbstractFilter}a.prototype=Object.create(i.AbstractFilter.prototype),a.prototype.constructor=a,t.exports=a,a.prototype.applyFilter=function(t,e,n){var s=t.filterManager.getRenderTarget(!0);this.defaultFilter.applyFilter(t,e,n),this.blurXFilter.applyFilter(t,e,s),t.blendModeManager.setBlendMode(i.BLEND_MODES.SCREEN),this.blurYFilter.applyFilter(t,s,n),t.blendModeManager.setBlendMode(i.BLEND_MODES.NORMAL),t.filterManager.returnRenderTarget(s)},Object.defineProperties(a.prototype,{blur:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t}},blurX:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t}},blurY:{get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t}}})},415:(t,e,n)=>{var i=n(4651),s=n(6786);function r(t,e){i.AbstractFilter.call(this,s.readFileSync("//blurDir.vert","utf8"),s.readFileSync("//blurDir.frag","utf8"),{strength:{type:"1f",value:1},dirX:{type:"1f",value:t||0},dirY:{type:"1f",value:e||0}}),this.defaultFilter=new i.AbstractFilter,this.passes=1,this.dirX=t||0,this.dirY=e||0,this.strength=4}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.applyFilter=function(t,e,n,i){var s=this.getShader(t);if(this.uniforms.strength.value=this.strength/4/this.passes*(e.frame.width/e.size.width),1===this.passes)t.filterManager.applyFilter(s,e,n,i);else{var r=t.filterManager.getRenderTarget(!0);t.filterManager.applyFilter(s,e,r,i);for(var a=0;a{var i=n(4651),s=n(4356),r=n(6160);function a(){i.AbstractFilter.call(this),this.blurXFilter=new s,this.blurYFilter=new r}a.prototype=Object.create(i.AbstractFilter.prototype),a.prototype.constructor=a,t.exports=a,a.prototype.applyFilter=function(t,e,n){var i=t.filterManager.getRenderTarget(!0);this.blurXFilter.applyFilter(t,e,i),this.blurYFilter.applyFilter(t,i,n),t.filterManager.returnRenderTarget(i)},Object.defineProperties(a.prototype,{blur:{get:function(){return this.blurXFilter.blur},set:function(t){this.padding=.5*Math.abs(t),this.blurXFilter.blur=this.blurYFilter.blur=t}},passes:{get:function(){return this.blurXFilter.passes},set:function(t){this.blurXFilter.passes=this.blurYFilter.passes=t}},blurX:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t}},blurY:{get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t}}})},4356:(t,e,n)=>{var i=n(4651),s=n(6786);function r(){i.AbstractFilter.call(this,s.readFileSync("//blurX.vert","utf8"),s.readFileSync("//blur.frag","utf8"),{strength:{type:"1f",value:1}}),this.passes=1,this.strength=4}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.applyFilter=function(t,e,n,i){var s=this.getShader(t);if(this.uniforms.strength.value=this.strength/4/this.passes*(e.frame.width/e.size.width),1===this.passes)t.filterManager.applyFilter(s,e,n,i);else{for(var r=t.filterManager.getRenderTarget(!0),a=e,o=r,l=0;l{var i=n(4651),s=n(6786);function r(){i.AbstractFilter.call(this,s.readFileSync("//blurY.vert","utf8"),s.readFileSync("//blur.frag","utf8"),{strength:{type:"1f",value:1}}),this.passes=1,this.strength=4}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.applyFilter=function(t,e,n,i){var s=this.getShader(t);if(this.uniforms.strength.value=Math.abs(this.strength)/4/this.passes*(e.frame.height/e.size.height),1===this.passes)t.filterManager.applyFilter(s,e,n,i);else{for(var r=t.filterManager.getRenderTarget(!0),a=e,o=r,l=0;l{var i=n(4651),s=n(6786);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//smartBlur.frag","utf8"),{delta:{type:"v2",value:{x:.1,y:0}}})}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r},9375:(t,e,n)=>{var i=n(4651),s=n(8884);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//colorMatrix.frag","utf8"),{m:{type:"1fv",value:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]}})}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype._loadMatrix=function(t,e){var n=t;(e=!!e)&&(this._multiply(n,this.uniforms.m.value,t),n=this._colorMatrix(n)),this.uniforms.m.value=n},r.prototype._multiply=function(t,e,n){return t[0]=e[0]*n[0]+e[1]*n[5]+e[2]*n[10]+e[3]*n[15],t[1]=e[0]*n[1]+e[1]*n[6]+e[2]*n[11]+e[3]*n[16],t[2]=e[0]*n[2]+e[1]*n[7]+e[2]*n[12]+e[3]*n[17],t[3]=e[0]*n[3]+e[1]*n[8]+e[2]*n[13]+e[3]*n[18],t[4]=e[0]*n[4]+e[1]*n[9]+e[2]*n[14]+e[3]*n[19],t[5]=e[5]*n[0]+e[6]*n[5]+e[7]*n[10]+e[8]*n[15],t[6]=e[5]*n[1]+e[6]*n[6]+e[7]*n[11]+e[8]*n[16],t[7]=e[5]*n[2]+e[6]*n[7]+e[7]*n[12]+e[8]*n[17],t[8]=e[5]*n[3]+e[6]*n[8]+e[7]*n[13]+e[8]*n[18],t[9]=e[5]*n[4]+e[6]*n[9]+e[7]*n[14]+e[8]*n[19],t[10]=e[10]*n[0]+e[11]*n[5]+e[12]*n[10]+e[13]*n[15],t[11]=e[10]*n[1]+e[11]*n[6]+e[12]*n[11]+e[13]*n[16],t[12]=e[10]*n[2]+e[11]*n[7]+e[12]*n[12]+e[13]*n[17],t[13]=e[10]*n[3]+e[11]*n[8]+e[12]*n[13]+e[13]*n[18],t[14]=e[10]*n[4]+e[11]*n[9]+e[12]*n[14]+e[13]*n[19],t[15]=e[15]*n[0]+e[16]*n[5]+e[17]*n[10]+e[18]*n[15],t[16]=e[15]*n[1]+e[16]*n[6]+e[17]*n[11]+e[18]*n[16],t[17]=e[15]*n[2]+e[16]*n[7]+e[17]*n[12]+e[18]*n[17],t[18]=e[15]*n[3]+e[16]*n[8]+e[17]*n[13]+e[18]*n[18],t[19]=e[15]*n[4]+e[16]*n[9]+e[17]*n[14]+e[18]*n[19],t},r.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},r.prototype.brightness=function(t,e){var n=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},r.prototype.greyscale=function(t,e){var n=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},r.prototype.grayscale=r.prototype.greyscale,r.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},r.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var n=Math.cos(t),i=Math.sin(t),s=.213,r=.715,a=.072,o=[s+.787*n+i*-s,r+n*-r+i*-r,a+n*-a+.928*i,0,0,s+n*-s+.143*i,r+n*(1-r)+.14*i,a+n*-a+-.283*i,0,0,s+n*-s+-.787*i,r+n*-r+i*r,a+.928*n+i*a,0,0,0,0,0,1,0];this._loadMatrix(o,e)},r.prototype.contrast=function(t,e){var n=(t||0)+1,i=-128*(n-1),s=[n,0,0,0,i,0,n,0,0,i,0,0,n,0,i,0,0,0,1,0];this._loadMatrix(s,e)},r.prototype.saturate=function(t,e){var n=2*(t||0)/3+1,i=-.5*(n-1),s=[n,i,i,0,0,i,n,i,0,0,i,i,n,0,0,0,0,0,1,0];this._loadMatrix(s,e)},r.prototype.desaturate=function(t){this.saturate(-1)},r.prototype.negative=function(t){this._loadMatrix([0,1,1,0,0,1,0,1,0,0,1,1,0,0,0,0,0,0,1,0],t)},r.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},r.prototype.technicolor=function(t){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},r.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},r.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},r.prototype.kodachrome=function(t){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},r.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},r.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},r.prototype.colorTone=function(t,e,n,i,s){var r=((n=n||16770432)>>16&255)/255,a=(n>>8&255)/255,o=(255&n)/255,l=((i=i||3375104)>>16&255)/255,u=(i>>8&255)/255,h=(255&i)/255,p=[.3,.59,.11,0,0,r,a,o,t=t||.2,0,l,u,h,e=e||.15,0,r-l,a-u,o-h,0,0];this._loadMatrix(p,s)},r.prototype.night=function(t,e){var n=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},r.prototype.predator=function(t,e){var n=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(n,e)},r.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},r.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},Object.defineProperties(r.prototype,{matrix:{get:function(){return this.uniforms.m.value},set:function(t){this.uniforms.m.value=t}}})},3640:(t,e,n)=>{var i=n(4651),s=n(8884);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//colorStep.frag","utf8"),{step:{type:"1f",value:5}})}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{step:{get:function(){return this.uniforms.step.value},set:function(t){this.uniforms.step.value=t}}})},6982:(t,e,n)=>{var i=n(4651),s=n(8001);function r(t,e,n){i.AbstractFilter.call(this,null,s.readFileSync("//convolution.frag","utf8"),{matrix:{type:"1fv",value:new Float32Array(t)},texelSize:{type:"v2",value:{x:1/e,y:1/n}}})}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{matrix:{get:function(){return this.uniforms.matrix.value},set:function(t){this.uniforms.matrix.value=new Float32Array(t)}},width:{get:function(){return 1/this.uniforms.texelSize.value.x},set:function(t){this.uniforms.texelSize.value.x=1/t}},height:{get:function(){return 1/this.uniforms.texelSize.value.y},set:function(t){this.uniforms.texelSize.value.y=1/t}}})},6280:(t,e,n)=>{var i=n(4651),s=n(1613);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//crosshatch.frag","utf8"))}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r},8286:(t,e,n)=>{var i=n(4651),s=n(5312);function r(t,e){var n=new i.Matrix;t.renderable=!1,i.AbstractFilter.call(this,s.readFileSync("//displacement.vert","utf8"),s.readFileSync("//displacement.frag","utf8"),{mapSampler:{type:"sampler2D",value:t.texture},otherMatrix:{type:"mat3",value:n.toArray(!0)},scale:{type:"v2",value:{x:1,y:1}}}),this.maskSprite=t,this.maskMatrix=n,null==e&&(e=20),this.scale=new i.Point(e,e)}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.applyFilter=function(t,e,n){var i=t.filterManager;i.calculateMappedMatrix(e.frame,this.maskSprite,this.maskMatrix),this.uniforms.otherMatrix.value=this.maskMatrix.toArray(!0),this.uniforms.scale.value.x=this.scale.x*(1/e.frame.width),this.uniforms.scale.value.y=this.scale.y*(1/e.frame.height);var s=this.getShader(t);i.applyFilter(s,e,n)},Object.defineProperties(r.prototype,{map:{get:function(){return this.uniforms.mapSampler.value},set:function(t){this.uniforms.mapSampler.value=t}}})},3466:(t,e,n)=>{var i=n(4651),s=n(9032);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//dotScreen.frag","utf8"),{scale:{type:"1f",value:1},angle:{type:"1f",value:5},dimensions:{type:"4fv",value:[0,0,0,0]}})}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{scale:{get:function(){return this.uniforms.scale.value},set:function(t){this.uniforms.scale.value=t}},angle:{get:function(){return this.uniforms.angle.value},set:function(t){this.uniforms.angle.value=t}}})},5038:(t,e,n)=>{var i=n(4651),s=n(574);function r(){i.AbstractFilter.call(this,s.readFileSync("//blurYTint.vert","utf8"),s.readFileSync("//blurYTint.frag","utf8"),{blur:{type:"1f",value:1/512},color:{type:"c",value:[0,0,0]},alpha:{type:"1f",value:.7},offset:{type:"2f",value:[5,5]},strength:{type:"1f",value:1}}),this.passes=1,this.strength=4}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.applyFilter=function(t,e,n,i){var s=this.getShader(t);if(this.uniforms.strength.value=this.strength/4/this.passes*(e.frame.height/e.size.height),1===this.passes)t.filterManager.applyFilter(s,e,n,i);else{for(var r=t.filterManager.getRenderTarget(!0),a=e,o=r,l=0;l{var i=n(4651),s=n(4356),r=n(5038);function a(){i.AbstractFilter.call(this),this.blurXFilter=new s,this.blurYTintFilter=new r,this.defaultFilter=new i.AbstractFilter,this.padding=30,this._dirtyPosition=!0,this._angle=45*Math.PI/180,this._distance=10,this.alpha=.75,this.hideObject=!1,this.blendMode=i.BLEND_MODES.MULTIPLY}a.prototype=Object.create(i.AbstractFilter.prototype),a.prototype.constructor=a,t.exports=a,a.prototype.applyFilter=function(t,e,n){var s=t.filterManager.getRenderTarget(!0);this._dirtyPosition&&(this._dirtyPosition=!1,this.blurYTintFilter.uniforms.offset.value[0]=Math.sin(this._angle)*this._distance,this.blurYTintFilter.uniforms.offset.value[1]=Math.cos(this._angle)*this._distance),this.blurXFilter.applyFilter(t,e,s),t.blendModeManager.setBlendMode(this.blendMode),this.blurYTintFilter.applyFilter(t,s,n),t.blendModeManager.setBlendMode(i.BLEND_MODES.NORMAL),this.hideObject||this.defaultFilter.applyFilter(t,e,n),t.filterManager.returnRenderTarget(s)},Object.defineProperties(a.prototype,{blur:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYTintFilter.blur=t}},blurX:{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t}},blurY:{get:function(){return this.blurYTintFilter.blur},set:function(t){this.blurYTintFilter.blur=t}},color:{get:function(){return i.utils.rgb2hex(this.blurYTintFilter.uniforms.color.value)},set:function(t){this.blurYTintFilter.uniforms.color.value=i.utils.hex2rgb(t)}},alpha:{get:function(){return this.blurYTintFilter.uniforms.alpha.value},set:function(t){this.blurYTintFilter.uniforms.alpha.value=t}},distance:{get:function(){return this._distance},set:function(t){this._dirtyPosition=!0,this._distance=t}},angle:{get:function(){return this._angle},set:function(t){this._dirtyPosition=!0,this._angle=t}}})},5518:(t,e,n)=>{var i=n(4651),s=n(2672);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//gray.frag","utf8"),{gray:{type:"1f",value:1}})}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{gray:{get:function(){return this.uniforms.gray.value},set:function(t){this.uniforms.gray.value=t}}})},8319:(t,e,n)=>{ +/** + * @file Main export of the PIXI filters library + * @author Mat Groves + * @copyright 2013-2015 GoodBoyDigital + * @license {@link https://github.com/pixijs/pixi.js/blob/master/LICENSE|MIT License} + */ +t.exports={AsciiFilter:n(4350),BloomFilter:n(5966),BlurFilter:n(6762),BlurXFilter:n(4356),BlurYFilter:n(6160),BlurDirFilter:n(415),ColorMatrixFilter:n(9375),ColorStepFilter:n(3640),ConvolutionFilter:n(6982),CrossHatchFilter:n(6280),DisplacementFilter:n(8286),DotScreenFilter:n(3466),GrayFilter:n(5518),DropShadowFilter:n(1726),InvertFilter:n(5976),NoiseFilter:n(7898),PixelateFilter:n(240),RGBSplitFilter:n(1952),ShockwaveFilter:n(2942),SepiaFilter:n(3578),SmartBlurFilter:n(1327),TiltShiftFilter:n(6422),TiltShiftXFilter:n(3080),TiltShiftYFilter:n(4407),TwistFilter:n(7326)}},5976:(t,e,n)=>{var i=n(4651),s=n(8215);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//invert.frag","utf8"),{invert:{type:"1f",value:1}})}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{invert:{get:function(){return this.uniforms.invert.value},set:function(t){this.uniforms.invert.value=t}}})},7898:(t,e,n)=>{var i=n(4651),s=n(1417);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//noise.frag","utf8"),{noise:{type:"1f",value:.5}})}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{noise:{get:function(){return this.uniforms.noise.value},set:function(t){this.uniforms.noise.value=t}}})},240:(t,e,n)=>{var i=n(4651),s=n(9391);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//pixelate.frag","utf8"),{dimensions:{type:"4fv",value:new Float32Array([0,0,0,0])},pixelSize:{type:"v2",value:{x:10,y:10}}})}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{size:{get:function(){return this.uniforms.pixelSize.value},set:function(t){this.uniforms.pixelSize.value=t}}})},1952:(t,e,n)=>{var i=n(4651),s=n(3220);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//rgbSplit.frag","utf8"),{red:{type:"v2",value:{x:20,y:20}},green:{type:"v2",value:{x:-20,y:20}},blue:{type:"v2",value:{x:20,y:-20}},dimensions:{type:"4fv",value:[0,0,0,0]}})}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{red:{get:function(){return this.uniforms.red.value},set:function(t){this.uniforms.red.value=t}},green:{get:function(){return this.uniforms.green.value},set:function(t){this.uniforms.green.value=t}},blue:{get:function(){return this.uniforms.blue.value},set:function(t){this.uniforms.blue.value=t}}})},3578:(t,e,n)=>{var i=n(4651),s=n(3985);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//sepia.frag","utf8"),{sepia:{type:"1f",value:1}})}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{sepia:{get:function(){return this.uniforms.sepia.value},set:function(t){this.uniforms.sepia.value=t}}})},2942:(t,e,n)=>{var i=n(4651),s=n(32);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//shockwave.frag","utf8"),{center:{type:"v2",value:{x:.5,y:.5}},params:{type:"v3",value:{x:10,y:.8,z:.1}},time:{type:"1f",value:0}})}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{center:{get:function(){return this.uniforms.center.value},set:function(t){this.uniforms.center.value=t}},params:{get:function(){return this.uniforms.params.value},set:function(t){this.uniforms.params.value=t}},time:{get:function(){return this.uniforms.time.value},set:function(t){this.uniforms.time.value=t}}})},1519:(t,e,n)=>{var i=n(4651),s=n(5650);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//tiltShift.frag","utf8"),{blur:{type:"1f",value:100},gradientBlur:{type:"1f",value:600},start:{type:"v2",value:{x:0,y:window.innerHeight/2}},end:{type:"v2",value:{x:600,y:window.innerHeight/2}},delta:{type:"v2",value:{x:30,y:30}},texSize:{type:"v2",value:{x:window.innerWidth,y:window.innerHeight}}}),this.updateDelta()}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.updateDelta=function(){this.uniforms.delta.value.x=0,this.uniforms.delta.value.y=0},Object.defineProperties(r.prototype,{blur:{get:function(){return this.uniforms.blur.value},set:function(t){this.uniforms.blur.value=t}},gradientBlur:{get:function(){return this.uniforms.gradientBlur.value},set:function(t){this.uniforms.gradientBlur.value=t}},start:{get:function(){return this.uniforms.start.value},set:function(t){this.uniforms.start.value=t,this.updateDelta()}},end:{get:function(){return this.uniforms.end.value},set:function(t){this.uniforms.end.value=t,this.updateDelta()}}})},6422:(t,e,n)=>{var i=n(4651),s=n(3080),r=n(4407);function a(){i.AbstractFilter.call(this),this.tiltShiftXFilter=new s,this.tiltShiftYFilter=new r}a.prototype=Object.create(i.AbstractFilter.prototype),a.prototype.constructor=a,t.exports=a,a.prototype.applyFilter=function(t,e,n){var i=t.filterManager.getRenderTarget(!0);this.tiltShiftXFilter.applyFilter(t,e,i),this.tiltShiftYFilter.applyFilter(t,i,n),t.filterManager.returnRenderTarget(i)},Object.defineProperties(a.prototype,{blur:{get:function(){return this.tiltShiftXFilter.blur},set:function(t){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=t}},gradientBlur:{get:function(){return this.tiltShiftXFilter.gradientBlur},set:function(t){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=t}},start:{get:function(){return this.tiltShiftXFilter.start},set:function(t){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=t}},end:{get:function(){return this.tiltShiftXFilter.end},set:function(t){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=t}}})},3080:(t,e,n)=>{var i=n(1519);function s(){i.call(this)}s.prototype=Object.create(i.prototype),s.prototype.constructor=s,t.exports=s,s.prototype.updateDelta=function(){var t=this.uniforms.end.value.x-this.uniforms.start.value.x,e=this.uniforms.end.value.y-this.uniforms.start.value.y,n=Math.sqrt(t*t+e*e);this.uniforms.delta.value.x=t/n,this.uniforms.delta.value.y=e/n}},4407:(t,e,n)=>{var i=n(1519);function s(){i.call(this)}s.prototype=Object.create(i.prototype),s.prototype.constructor=s,t.exports=s,s.prototype.updateDelta=function(){var t=this.uniforms.end.value.x-this.uniforms.start.value.x,e=this.uniforms.end.value.y-this.uniforms.start.value.y,n=Math.sqrt(t*t+e*e);this.uniforms.delta.value.x=-e/n,this.uniforms.delta.value.y=t/n}},7326:(t,e,n)=>{var i=n(4651),s=n(6644);function r(){i.AbstractFilter.call(this,null,s.readFileSync("//twist.frag","utf8"),{radius:{type:"1f",value:.5},angle:{type:"1f",value:5},offset:{type:"v2",value:{x:.5,y:.5}}})}r.prototype=Object.create(i.AbstractFilter.prototype),r.prototype.constructor=r,t.exports=r,Object.defineProperties(r.prototype,{offset:{get:function(){return this.uniforms.offset.value},set:function(t){this.uniforms.offset.value=t}},radius:{get:function(){return this.uniforms.radius.value},set:function(t){this.uniforms.radius.value=t}},angle:{get:function(){return this.uniforms.angle.value},set:function(t){this.uniforms.angle.value=t}}})},6619:(t,e,n)=>{n(255);var i=t.exports=n(4651);i.extras=n(3323),i.filters=n(8319),i.interaction=n(4816),i.loaders=n(5296),i.mesh=n(8653),i.loader=new i.loaders.Loader,Object.assign(i,n(9513)),n.g.PIXI=i},9440:(t,e,n)=>{var i=n(4651);function s(){this.global=new i.Point,this.target=null,this.originalEvent=null}s.prototype.constructor=s,t.exports=s,s.prototype.getLocalPosition=function(t,e,n){return t.toLocal(n||this.global,e)}},509:(t,e,n)=>{var i=n(4651),s=n(9440);function r(t,e){e=e||{},this.renderer=t,this.autoPreventDefault=void 0===e.autoPreventDefault||e.autoPreventDefault,this.interactionFrequency=e.interactionFrequency||10,this.mouse=new s,this.eventData={stopped:!1,target:null,type:null,data:this.mouse,stopPropagation:function(){this.stopped=!0}},this.interactiveDataPool=[],this.interactionDOMElement=null,this.eventsAdded=!1,this.onMouseUp=this.onMouseUp.bind(this),this.processMouseUp=this.processMouseUp.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.processMouseDown=this.processMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.processMouseMove=this.processMouseMove.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.processMouseOverOut=this.processMouseOverOut.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.processTouchStart=this.processTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.processTouchEnd=this.processTouchEnd.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.processTouchMove=this.processTouchMove.bind(this),this.last=0,this.currentCursorStyle="inherit",this._tempPoint=new i.Point,this.resolution=1,this.setTargetElement(this.renderer.view,this.renderer.resolution)}Object.assign(i.DisplayObject.prototype,n(4241)),r.prototype.constructor=r,t.exports=r,r.prototype.setTargetElement=function(t,e){this.removeEvents(),this.interactionDOMElement=t,this.resolution=e||1,this.addEvents()},r.prototype.addEvents=function(){this.interactionDOMElement&&(i.ticker.shared.add(this.update,this),window.navigator.msPointerEnabled&&(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"),window.document.addEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.addEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.addEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.addEventListener("touchmove",this.onTouchMove,!0),window.addEventListener("mouseup",this.onMouseUp,!0),this.eventsAdded=!0)},r.prototype.removeEvents=function(){this.interactionDOMElement&&(i.ticker.shared.remove(this.update),window.navigator.msPointerEnabled&&(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""),window.document.removeEventListener("mousemove",this.onMouseMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onMouseDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onMouseOut,!0),this.interactionDOMElement.removeEventListener("touchstart",this.onTouchStart,!0),this.interactionDOMElement.removeEventListener("touchend",this.onTouchEnd,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onTouchMove,!0),this.interactionDOMElement=null,window.removeEventListener("mouseup",this.onMouseUp,!0),this.eventsAdded=!1)},r.prototype.update=function(t){this._deltaTime+=t,this._deltaTime=0;o--)!a&&i?a=this.processInteractive(t,r[o],n,!0,s):this.processInteractive(t,r[o],n,!1,!1);return s&&(i&&(e.hitArea?(e.worldTransform.applyInverse(t,this._tempPoint),a=e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)):e.containsPoint&&(a=e.containsPoint(t))),e.interactive&&n(e,a)),a},r.prototype.onMouseDown=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.autoPreventDefault&&this.mouse.originalEvent.preventDefault(),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseDown,!0)},r.prototype.processMouseDown=function(t,e){var n=this.mouse.originalEvent,i=2===n.button||3===n.which;e&&(t[i?"_isRightDown":"_isLeftDown"]=!0,this.dispatchEvent(t,i?"rightdown":"mousedown",this.eventData))},r.prototype.onMouseUp=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseUp,!0)},r.prototype.processMouseUp=function(t,e){var n=this.mouse.originalEvent,i=2===n.button||3===n.which,s=i?"_isRightDown":"_isLeftDown";e?(this.dispatchEvent(t,i?"rightup":"mouseup",this.eventData),t[s]&&(t[s]=!1,this.dispatchEvent(t,i?"rightclick":"click",this.eventData))):t[s]&&(t[s]=!1,this.dispatchEvent(t,i?"rightupoutside":"mouseupoutside",this.eventData))},r.prototype.onMouseMove=function(t){this.mouse.originalEvent=t,this.eventData.data=this.mouse,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.didMove=!0,this.cursor="inherit",this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseMove,!0),this.currentCursorStyle!==this.cursor&&(this.currentCursorStyle=this.cursor,this.interactionDOMElement.style.cursor=this.cursor)},r.prototype.processMouseMove=function(t,e){this.dispatchEvent(t,"mousemove",this.eventData),this.processMouseOverOut(t,e)},r.prototype.onMouseOut=function(t){this.mouse.originalEvent=t,this.eventData.stopped=!1,this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.interactionDOMElement.style.cursor="inherit",this.mapPositionToPoint(this.mouse.global,t.clientX,t.clientY),this.processInteractive(this.mouse.global,this.renderer._lastObjectRendered,this.processMouseOverOut,!1)},r.prototype.processMouseOverOut=function(t,e){e?(t._over||(t._over=!0,this.dispatchEvent(t,"mouseover",this.eventData)),t.buttonMode&&(this.cursor=t.defaultCursor)):t._over&&(t._over=!1,this.dispatchEvent(t,"mouseout",this.eventData))},r.prototype.onTouchStart=function(t){this.autoPreventDefault&&t.preventDefault();for(var e=t.changedTouches,n=e.length,i=0;i{ +/** + * @file Main export of the PIXI interactions library + * @author Mat Groves + * @copyright 2013-2015 GoodBoyDigital + * @license {@link https://github.com/pixijs/pixi.js/blob/master/LICENSE|MIT License} + */ +t.exports={InteractionData:n(9440),InteractionManager:n(509),interactiveTarget:n(4241)}},4241:t=>{t.exports={interactive:!1,buttonMode:!1,interactiveChildren:!0,defaultCursor:"pointer",_over:!1,_touchDown:!1}},4095:(t,e,n)=>{var i=n(542).Resource,s=n(4651),r=n(3323),a=n(6944);function o(t,e){var n={},i=t.data.getElementsByTagName("info")[0],a=t.data.getElementsByTagName("common")[0];n.font=i.getAttribute("face"),n.size=parseInt(i.getAttribute("size"),10),n.lineHeight=parseInt(a.getAttribute("lineHeight"),10),n.chars={};for(var o=t.data.getElementsByTagName("char"),l=0;l{ +/** + * @file Main export of the PIXI loaders library + * @author Mat Groves + * @copyright 2013-2015 GoodBoyDigital + * @license {@link https://github.com/pixijs/pixi.js/blob/master/LICENSE|MIT License} + */ +t.exports={Loader:n(7397),bitmapFontParser:n(4095),spritesheetParser:n(6695),textureParser:n(3968),Resource:n(542).Resource}},7397:(t,e,n)=>{var i=n(542),s=n(3968),r=n(6695),a=n(4095);function o(t,e){i.call(this,t,e);for(var n=0;n{var i=n(542).Resource,s=n(6944),r=n(4651);t.exports=function(){return function(t,e){if(!t.data||!t.isJson||!t.data.frames)return e();var n={crossOrigin:t.crossOrigin,loadType:i.LOAD_TYPE.IMAGE},a=s.dirname(t.url.replace(this.baseUrl,"")),o=r.utils.getResolutionOfUrl(t.url);this.add(t.name+"_image",a+"/"+t.data.meta.image,n,(function(n){t.textures={};var i=t.data.frames;for(var s in i){var a=i[s].frame;if(a){var l=null,u=null;if(l=i[s].rotated?new r.Rectangle(a.x,a.y,a.h,a.w):new r.Rectangle(a.x,a.y,a.w,a.h),i[s].trimmed&&(u=new r.Rectangle(i[s].spriteSourceSize.x/o,i[s].spriteSourceSize.y/o,i[s].sourceSize.w/o,i[s].sourceSize.h/o)),i[s].rotated){var h=l.width;l.width=l.height,l.height=h}l.x/=o,l.y/=o,l.width/=o,l.height/=o,t.textures[s]=new r.Texture(n.texture.baseTexture,l,l.clone(),u,i[s].rotated),r.utils.TextureCache[s]=t.textures[s]}}e()}))}}},3968:(t,e,n)=>{var i=n(4651);t.exports=function(){return function(t,e){if(t.data&&t.isImage){var n=new i.BaseTexture(t.data,null,i.utils.getResolutionOfUrl(t.url));n.imageUrl=t.url,t.texture=new i.Texture(n),i.utils.BaseTextureCache[t.url]=n,i.utils.TextureCache[t.url]=t.texture}e()}}},2876:(t,e,n)=>{var i=n(4651),s=new i.Point,r=new i.Polygon;function a(t,e,n,s,r){i.Container.call(this),this._texture=null,this.uvs=n||new Float32Array([0,1,1,1,1,0,0,1]),this.vertices=e||new Float32Array([0,0,100,0,100,100,0,100]),this.indices=s||new Uint16Array([0,1,2,3]),this.dirty=!0,this.blendMode=i.BLEND_MODES.NORMAL,this.canvasPadding=0,this.drawMode=r||a.DRAW_MODES.TRIANGLE_MESH,this.texture=t}a.prototype=Object.create(i.Container.prototype),a.prototype.constructor=a,t.exports=a,Object.defineProperties(a.prototype,{texture:{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}}),a.prototype._renderWebGL=function(t){t.setObjectRenderer(t.plugins.mesh),t.plugins.mesh.render(this)},a.prototype._renderCanvas=function(t){var e=t.context,n=this.worldTransform;t.roundPixels?e.setTransform(n.a,n.b,n.c,n.d,0|n.tx,0|n.ty):e.setTransform(n.a,n.b,n.c,n.d,n.tx,n.ty),this.drawMode===a.DRAW_MODES.TRIANGLE_MESH?this._renderCanvasTriangleMesh(e):this._renderCanvasTriangles(e)},a.prototype._renderCanvasTriangleMesh=function(t){for(var e=this.vertices,n=this.uvs,i=e.length/2,s=0;s0){var E=this.canvasPadding/this.worldTransform.a,b=this.canvasPadding/this.worldTransform.d,v=(u+h+p)/3,w=(c+d+f)/3,S=u-v,x=c-w,R=Math.sqrt(S*S+x*x);u=v+S/R*(R+E),c=w+x/R*(R+b),x=d-w,h=v+(S=h-v)/(R=Math.sqrt(S*S+x*x))*(R+E),d=w+x/R*(R+b),x=f-w,p=v+(S=p-v)/(R=Math.sqrt(S*S+x*x))*(R+E),f=w+x/R*(R+b)}t.save(),t.beginPath(),t.moveTo(u,c),t.lineTo(h,d),t.lineTo(p,f),t.closePath(),t.clip();var O=m*y+T*_+g*I-y*_-T*g-m*I,A=u*y+T*p+h*I-y*p-T*h-u*I,M=m*h+u*_+g*p-h*_-u*g-m*p,C=m*y*p+T*h*_+u*g*I-u*y*_-T*g*p-m*h*I,N=c*y+T*f+d*I-y*f-T*d-c*I,k=m*d+c*_+g*f-d*_-c*g-m*f,D=m*y*f+T*d*_+c*g*I-c*y*_-T*g*f-m*d*I;t.transform(A/O,N/O,M/O,k/O,C/O,D/O),t.drawImage(a,0,0),t.restore()},a.prototype.renderMeshFlat=function(t){var e=this.context,n=t.vertices,i=n.length/2;e.beginPath();for(var s=1;su?T:u,h=y>h?y:h}if(p===-1/0||h===1/0)return i.Rectangle.EMPTY;var I=this._bounds;I.x=p,I.width=u-p,I.y=c,I.height=h-c,this._currentBounds=I}return this._currentBounds},a.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,s);var e,n,i=this.vertices,o=r.points;if(this.drawMode===a.DRAW_MODES.TRIANGLES){var l=this.indices;for(n=this.indices.length,e=0;e{var i=n(2876),s=n(4651);function r(t,e){i.call(this,t),this.points=e,this.vertices=new Float32Array(4*e.length),this.uvs=new Float32Array(4*e.length),this.colors=new Float32Array(2*e.length),this.indices=new Uint16Array(2*e.length),this._ready=!0,this.refresh()}r.prototype=Object.create(i.prototype),r.prototype.constructor=r,t.exports=r,r.prototype.refresh=function(){var t=this.points;if(!(t.length<1)&&this._texture._uvs){var e=this.uvs,n=this.indices,i=this.colors,r=this._texture._uvs,a=new s.Point(r.x0,r.y0),o=new s.Point(r.x2-r.x0,r.y2-r.y0);e[0]=0+a.x,e[1]=0+a.y,e[2]=0+a.x,e[3]=1*o.y+a.y,i[0]=1,i[1]=1,n[0]=0,n[1]=1;for(var l,u,h=t.length,p=1;p1&&1,o/=s=Math.sqrt(o*o+l*l),l/=s,o*=r=this._texture.height/2,l*=r,u[i]=n.x+o,u[i+1]=n.y+l,u[i+2]=n.x-o,u[i+3]=n.y-l,a=n;this.containerUpdateTransform()}}},8653:(t,e,n)=>{ +/** + * @file Main export of the PIXI extras library + * @author Mat Groves + * @copyright 2013-2015 GoodBoyDigital + * @license {@link https://github.com/pixijs/pixi.js/blob/master/LICENSE|MIT License} + */ +t.exports={Mesh:n(2876),Rope:n(7005),MeshRenderer:n(6709),MeshShader:n(2003)}},6709:(t,e,n)=>{var i=n(4651),s=n(2876);function r(t){i.ObjectRenderer.call(this,t),this.indices=new Uint16Array(15e3);for(var e=0,n=0;e<15e3;e+=6,n+=4)this.indices[e+0]=n+0,this.indices[e+1]=n+1,this.indices[e+2]=n+2,this.indices[e+3]=n+0,this.indices[e+4]=n+2,this.indices[e+5]=n+3}r.prototype=Object.create(i.ObjectRenderer.prototype),r.prototype.constructor=r,t.exports=r,i.WebGLRenderer.registerPlugin("mesh",r),r.prototype.onContextChange=function(){},r.prototype.render=function(t){t._vertexBuffer||this._initWebGL(t);var e=this.renderer,n=e.gl,i=t._texture.baseTexture,r=e.shaderManager.plugins.meshShader,a=t.drawMode===s.DRAW_MODES.TRIANGLE_MESH?n.TRIANGLE_STRIP:n.TRIANGLES;e.blendModeManager.setBlendMode(t.blendMode),n.uniformMatrix3fv(r.uniforms.translationMatrix._location,!1,t.worldTransform.toArray(!0)),n.uniformMatrix3fv(r.uniforms.projectionMatrix._location,!1,e.currentRenderTarget.projectionMatrix.toArray(!0)),n.uniform1f(r.uniforms.alpha._location,t.worldAlpha),t.dirty?(t.dirty=!1,n.bindBuffer(n.ARRAY_BUFFER,t._vertexBuffer),n.bufferData(n.ARRAY_BUFFER,t.vertices,n.STATIC_DRAW),n.vertexAttribPointer(r.attributes.aVertexPosition,2,n.FLOAT,!1,0,0),n.bindBuffer(n.ARRAY_BUFFER,t._uvBuffer),n.bufferData(n.ARRAY_BUFFER,t.uvs,n.STATIC_DRAW),n.vertexAttribPointer(r.attributes.aTextureCoord,2,n.FLOAT,!1,0,0),n.activeTexture(n.TEXTURE0),i._glTextures[n.id]?n.bindTexture(n.TEXTURE_2D,i._glTextures[n.id]):this.renderer.updateTexture(i),n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t._indexBuffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,t.indices,n.STATIC_DRAW)):(n.bindBuffer(n.ARRAY_BUFFER,t._vertexBuffer),n.bufferSubData(n.ARRAY_BUFFER,0,t.vertices),n.vertexAttribPointer(r.attributes.aVertexPosition,2,n.FLOAT,!1,0,0),n.bindBuffer(n.ARRAY_BUFFER,t._uvBuffer),n.vertexAttribPointer(r.attributes.aTextureCoord,2,n.FLOAT,!1,0,0),n.activeTexture(n.TEXTURE0),i._glTextures[n.id]?n.bindTexture(n.TEXTURE_2D,i._glTextures[n.id]):this.renderer.updateTexture(i),n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t._indexBuffer),n.bufferSubData(n.ELEMENT_ARRAY_BUFFER,0,t.indices)),n.drawElements(a,t.indices.length,n.UNSIGNED_SHORT,0)},r.prototype._initWebGL=function(t){var e=this.renderer.gl;t._vertexBuffer=e.createBuffer(),t._indexBuffer=e.createBuffer(),t._uvBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t._vertexBuffer),e.bufferData(e.ARRAY_BUFFER,t.vertices,e.DYNAMIC_DRAW),e.bindBuffer(e.ARRAY_BUFFER,t._uvBuffer),e.bufferData(e.ARRAY_BUFFER,t.uvs,e.STATIC_DRAW),t.colors&&(t._colorBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t._colorBuffer),e.bufferData(e.ARRAY_BUFFER,t.colors,e.STATIC_DRAW)),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t._indexBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,t.indices,e.STATIC_DRAW)},r.prototype.flush=function(){},r.prototype.start=function(){var t=this.renderer.shaderManager.plugins.meshShader;this.renderer.shaderManager.setShader(t)},r.prototype.destroy=function(){i.ObjectRenderer.prototype.destroy.call(this)}},2003:(t,e,n)=>{var i=n(4651);function s(t){i.Shader.call(this,t,["precision lowp float;","attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","varying vec2 vTextureCoord;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;","}"].join("\n"),["precision lowp float;","varying vec2 vTextureCoord;","uniform float alpha;","uniform sampler2D uSampler;","void main(void){"," gl_FragColor = texture2D(uSampler, vTextureCoord) * alpha ;","}"].join("\n"),{alpha:{type:"1f",value:0},translationMatrix:{type:"mat3",value:new Float32Array(9)},projectionMatrix:{type:"mat3",value:new Float32Array(9)}},{aVertexPosition:0,aTextureCoord:0})}s.prototype=Object.create(i.Shader.prototype),s.prototype.constructor=s,t.exports=s,i.ShaderManager.registerPlugin("meshShader",s)},9206:()=>{Math.sign||(Math.sign=function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1})},7537:(t,e,n)=>{Object.assign||(Object.assign=n(5228))},255:(t,e,n)=>{n(7537),n(4377),n(9206)},4377:(t,e,n)=>{if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!n.g.performance||!n.g.performance.now){var i=Date.now();n.g.performance||(n.g.performance={}),n.g.performance.now=function(){return Date.now()-i}}for(var s=Date.now(),r=["ms","moz","webkit","o"],a=0;a{var e,n,i=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===s||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:s}catch(t){e=s}try{n="function"==typeof clearTimeout?clearTimeout:r}catch(t){n=r}}();var o,l=[],u=!1,h=-1;function p(){u&&o&&(u=!1,o.length?l=o.concat(l):h=-1,l.length&&c())}function c(){if(!u){var t=a(p);u=!0;for(var e=l.length;e;){for(o=l,l=[];++h1)for(var n=1;n{"use strict";n.d(e,{D:()=>i});var i=function(){function t(t){var e=this;void 0===t&&(t=!1),this.ignoreMultipleSettles=t,this.isSettled=!1,this.promise=new Promise((function(t,n){e.resolveCallback=t,e.rejectCallback=n}))}return t.prototype.markAsSettled=function(){var t=this.isSettled;if(t&&!this.ignoreMultipleSettles)throw new Error("PromiseDelegate is already settled!");return this.isSettled=!0,!t},Object.defineProperty(t.prototype,"settled",{get:function(){return this.isSettled},enumerable:!1,configurable:!0}),t.prototype.resolve=function(t){this.markAsSettled()&&this.resolveCallback(t)},t.prototype.reject=function(t){this.markAsSettled()&&this.rejectCallback(t)},t}()},5006:t=>{"use strict";var e=Object.prototype.hasOwnProperty,n="~";function i(){}function s(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function r(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),r.prototype.eventNames=function(){var t,i,s=[];if(0===this._eventsCount)return s;for(i in t=this._events)e.call(t,i)&&s.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(t)):s},r.prototype.listeners=function(t,e){var i=n?n+t:t,s=this._events[i];if(e)return!!s;if(!s)return[];if(s.fn)return[s.fn];for(var r=0,a=s.length,o=new Array(a);r{"use strict";var i=n(4678),s=n(978),r=n(8664),a=n(5006);function o(t,e){a.call(this),e=e||10,this.baseUrl=t||"",this.progress=0,this.loading=!1,this._progressChunk=0,this._beforeMiddleware=[],this._afterMiddleware=[],this._boundLoadResource=this._loadResource.bind(this),this._buffer=[],this._numToLoad=0,this._queue=s.queue(this._boundLoadResource,e),this.resources={}}o.prototype=Object.create(a.prototype),o.prototype.constructor=o,t.exports=o,o.prototype.add=o.prototype.enqueue=function(t,e,n,i){if(Array.isArray(t)){for(var s=0;s{"use strict";var i=n(5006),s=n(4678),r=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),a=null;function o(t,e,n){if(i.call(this),n=n||{},"string"!=typeof t||"string"!=typeof e)throw new Error("Both name and url are required for constructing a resource.");this.name=t,this.url=e,this.isDataUrl=0===this.url.indexOf("data:"),this.data=null,this.crossOrigin=!0===n.crossOrigin?"anonymous":n.crossOrigin,this.loadType=n.loadType||this._determineLoadType(),this.xhrType=n.xhrType,this.metadata=n.metadata||{},this.error=null,this.xhr=null,this.isJson=!1,this.isXml=!1,this.isImage=!1,this.isAudio=!1,this.isVideo=!1,this.isComplete=!1,this.isLoading=!1,this._dequeue=null,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this._boundXdrOnTimeout=this._xdrOnTimeout.bind(this)}function l(t){return t.toString().replace("object ","")}function u(t,e,n){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=n)}o.prototype=Object.create(i.prototype),o.prototype.constructor=o,t.exports=o,o.prototype.complete=function(){if(this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null)),this.isComplete)throw new Error("Complete called again for an already completed resource.");this.isComplete=!0,this.isLoading=!1,this.emit("complete",this)},o.prototype.abort=function(t){if(!this.error){if(this.error=new Error(t),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(void 0!==this.data.src)this.data.src="";else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this.complete()}},o.prototype.load=function(t){if(!this.isLoading)if(this.isComplete){if(t){var e=this;setTimeout((function(){t(e)}),1)}}else switch(t&&this.once("complete",t),this.isLoading=!0,this.emit("start",this),!1!==this.crossOrigin&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case o.LOAD_TYPE.IMAGE:this._loadElement("image");break;case o.LOAD_TYPE.AUDIO:this._loadSourceElement("audio");break;case o.LOAD_TYPE.VIDEO:this._loadSourceElement("video");break;case o.LOAD_TYPE.XHR:default:r&&this.crossOrigin?this._loadXdr():this._loadXhr()}},o.prototype._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&void 0!==window.Image?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url);var e="is"+t[0].toUpperCase()+t.substring(1);!1===this[e]&&(this[e]=!0),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1)},o.prototype._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&void 0!==window.Audio?this.data=new Audio:this.data=document.createElement(t),null!==this.data){if(!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=0;e0){if(this.xhrType===o.XHR_RESPONSE_TYPE.TEXT)this.data=t.responseText;else if(this.xhrType===o.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(t.responseText),this.isJson=!0}catch(t){return void this.abort("Error trying to parse loaded json:",t)}else if(this.xhrType===o.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var n=new DOMParser;this.data=n.parseFromString(t.responseText,"text/xml")}else{var i=document.createElement("div");i.innerHTML=t.responseText,this.data=i}this.isXml=!0}catch(t){return void this.abort("Error trying to parse loaded xml:",t)}else this.data=t.response||t.responseText;this.complete()}else this.abort("["+t.status+"]"+t.statusText+":"+t.responseURL)},o.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";e=e||window.location,a||(a=document.createElement("a")),a.href=t;var n=!(t=s(a.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,i=t.protocol?t.protocol+":":"";return t.host===e.hostname&&n&&i===e.protocol?"":"anonymous"},o.prototype._determineXhrType=function(){return o._xhrTypeMap[this._getExtension()]||o.XHR_RESPONSE_TYPE.TEXT},o.prototype._determineLoadType=function(){return o._loadTypeMap[this._getExtension()]||o.LOAD_TYPE.XHR},o.prototype._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var n=t.indexOf("/");e=t.substring(n+1,t.indexOf(";",n))}else{var i=t.indexOf("?");-1!==i&&(t=t.substring(0,i)),e=t.substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},o.prototype._getMimeFromXhrType=function(t){switch(t){case o.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case o.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case o.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case o.XHR_RESPONSE_TYPE.JSON:return"application/json";case o.XHR_RESPONSE_TYPE.DEFAULT:case o.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},o.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},o.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},o._loadTypeMap={gif:o.LOAD_TYPE.IMAGE,png:o.LOAD_TYPE.IMAGE,bmp:o.LOAD_TYPE.IMAGE,jpg:o.LOAD_TYPE.IMAGE,jpeg:o.LOAD_TYPE.IMAGE,tif:o.LOAD_TYPE.IMAGE,tiff:o.LOAD_TYPE.IMAGE,webp:o.LOAD_TYPE.IMAGE,tga:o.LOAD_TYPE.IMAGE,"svg+xml":o.LOAD_TYPE.IMAGE},o._xhrTypeMap={xhtml:o.XHR_RESPONSE_TYPE.DOCUMENT,html:o.XHR_RESPONSE_TYPE.DOCUMENT,htm:o.XHR_RESPONSE_TYPE.DOCUMENT,xml:o.XHR_RESPONSE_TYPE.DOCUMENT,tmx:o.XHR_RESPONSE_TYPE.DOCUMENT,tsx:o.XHR_RESPONSE_TYPE.DOCUMENT,svg:o.XHR_RESPONSE_TYPE.DOCUMENT,gif:o.XHR_RESPONSE_TYPE.BLOB,png:o.XHR_RESPONSE_TYPE.BLOB,bmp:o.XHR_RESPONSE_TYPE.BLOB,jpg:o.XHR_RESPONSE_TYPE.BLOB,jpeg:o.XHR_RESPONSE_TYPE.BLOB,tif:o.XHR_RESPONSE_TYPE.BLOB,tiff:o.XHR_RESPONSE_TYPE.BLOB,webp:o.XHR_RESPONSE_TYPE.BLOB,tga:o.XHR_RESPONSE_TYPE.BLOB,json:o.XHR_RESPONSE_TYPE.JSON,text:o.XHR_RESPONSE_TYPE.TEXT,txt:o.XHR_RESPONSE_TYPE.TEXT},o.setExtensionLoadType=function(t,e){u(o._loadTypeMap,t,e)},o.setExtensionXhrType=function(t,e){u(o._xhrTypeMap,t,e)}},978:t=>{"use strict";function e(){}function n(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}t.exports={eachSeries:function(t,e,n){var i=0,s=t.length;!function r(a){a||i===s?n&&n(a):e(t[i++],r)}()},queue:function(t,i){if(null==i)i=1;else if(0===i)throw new Error("Concurrency must not be zero");var s=0,r={_tasks:[],concurrency:i,saturated:e,unsaturated:e,buffer:i/4,empty:e,drain:e,error:e,started:!1,paused:!1,push:function(t,e){a(t,!1,e)},kill:function(){r.drain=e,r._tasks=[]},unshift:function(t,e){a(t,!0,e)},process:function(){for(;!r.paused&&s{"use strict";t.exports={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encodeBinary:function(t){for(var e,n="",i=new Array(4),s=0,r=0;s>2,i[1]=(3&e[0])<<4|e[1]>>4,i[2]=(15&e[1])<<2|e[2]>>6,i[3]=63&e[2],s-(t.length-1)){case 2:i[3]=64,i[2]=64;break;case 1:i[3]=64}for(r=0;r{"use strict";t.exports=n(3723),t.exports.Resource=n(8664),t.exports.middleware={caching:{memory:n(9911)},parsing:{blob:n(2796)}},t.exports.async=n(978)},9911:t=>{"use strict";var e={};t.exports=function(){return function(t,n){e[t.url]?(t.data=e[t.url],t.complete()):t.once("complete",(function(){e[this.url]=this.data})),n()}}},2796:(t,e,n)=>{"use strict";var i=n(8664),s=n(9350),r=window.URL||window.webkitURL;t.exports=function(){return function(t,e){if(t.data){if(t.xhr&&t.xhrType===i.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var n=r.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=n,t.isImage=!0,void(t.data.onload=function(){r.revokeObjectURL(n),t.data.onload=null,e()})}}else{var a=t.xhr.getResponseHeader("content-type");if(a&&0===a.indexOf("image"))return t.data=new Image,t.data.src="data:"+a+";base64,"+s.encodeBinary(t.xhr.responseText),t.isImage=!0,void(t.data.onload=function(){t.data.onload=null,e()})}e()}else e()}}},5242:(t,e,n)=>{ +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ +var i=n(8287),s=i.Buffer;function r(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return s(t,e,n)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=i:(r(i,e),e.Buffer=a),a.prototype=Object.create(s.prototype),r(s,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return s(t,e,n)},a.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=s(t);return void 0!==e?"string"==typeof n?i.fill(e,n):i.fill(e):i.fill(0),i},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return s(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},7391:(t,e,n)=>{var i=n(7180),s=n(3181),r=n(3031),a=n(9067),o=n(6833),l=n(3717),u=n(4801);u.alea=i,u.xor128=s,u.xorwow=r,u.xorshift7=a,u.xor4096=o,u.tychei=l,t.exports=u},7180:function(t,e,n){var i;!function(t,s){function r(t){var e=this,n=function(){var t=4022871197,e=function(e){e=String(e);for(var n=0;n>>0,t=(i*=t)>>>0,t+=4294967296*(i-=t)}return 2.3283064365386963e-10*(t>>>0)};return e}();e.next=function(){var t=2091639*e.s0+2.3283064365386963e-10*e.c;return e.s0=e.s1,e.s1=e.s2,e.s2=t-(e.c=0|t)},e.c=1,e.s0=n(" "),e.s1=n(" "),e.s2=n(" "),e.s0-=n(t),e.s0<0&&(e.s0+=1),e.s1-=n(t),e.s1<0&&(e.s1+=1),e.s2-=n(t),e.s2<0&&(e.s2+=1),n=null}function a(t,e){return e.c=t.c,e.s0=t.s0,e.s1=t.s1,e.s2=t.s2,e}function o(t,e){var n=new r(t),i=e&&e.state,s=n.next;return s.int32=function(){return 4294967296*n.next()|0},s.double=function(){return s()+11102230246251565e-32*(2097152*s()|0)},s.quick=s,i&&("object"==typeof i&&a(i,n),s.state=function(){return a(n,{})}),s}s&&s.exports?s.exports=o:n.amdD&&n.amdO?void 0===(i=function(){return o}.call(e,n,e,s))||(s.exports=i):this.alea=o}(0,t=n.nmd(t),n.amdD)},3717:function(t,e,n){var i;!function(t,s){function r(t){var e=this,n="";e.next=function(){var t=e.b,n=e.c,i=e.d,s=e.a;return t=t<<25^t>>>7^n,n=n-i|0,i=i<<24^i>>>8^s,s=s-t|0,e.b=t=t<<20^t>>>12^n,e.c=n=n-i|0,e.d=i<<16^n>>>16^s,e.a=s-t|0},e.a=0,e.b=0,e.c=-1640531527,e.d=1367130551,t===Math.floor(t)?(e.a=t/4294967296|0,e.b=0|t):n+=t;for(var i=0;i>>0)/4294967296};return s.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},s.int32=n.next,s.quick=s,i&&("object"==typeof i&&a(i,n),s.state=function(){return a(n,{})}),s}s&&s.exports?s.exports=o:n.amdD&&n.amdO?void 0===(i=function(){return o}.call(e,n,e,s))||(s.exports=i):this.tychei=o}(0,t=n.nmd(t),n.amdD)},3181:function(t,e,n){var i;!function(t,s){function r(t){var e=this,n="";e.x=0,e.y=0,e.z=0,e.w=0,e.next=function(){var t=e.x^e.x<<11;return e.x=e.y,e.y=e.z,e.z=e.w,e.w^=e.w>>>19^t^t>>>8},t===(0|t)?e.x=t:n+=t;for(var i=0;i>>0)/4294967296};return s.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},s.int32=n.next,s.quick=s,i&&("object"==typeof i&&a(i,n),s.state=function(){return a(n,{})}),s}s&&s.exports?s.exports=o:n.amdD&&n.amdO?void 0===(i=function(){return o}.call(e,n,e,s))||(s.exports=i):this.xor128=o}(0,t=n.nmd(t),n.amdD)},6833:function(t,e,n){var i;!function(t,s){function r(t){var e=this;e.next=function(){var t,n,i=e.w,s=e.X,r=e.i;return e.w=i=i+1640531527|0,n=s[r+34&127],t=s[r=r+1&127],n^=n<<13,t^=t<<17,n^=n>>>15,t^=t>>>12,n=s[r]=n^t,e.i=r,n+(i^i>>>16)|0},function(t,e){var n,i,s,r,a,o=[],l=128;for(e===(0|e)?(i=e,e=null):(e+="\0",i=0,l=Math.max(l,e.length)),s=0,r=-32;r>>15,i^=i<<4,i^=i>>>13,r>=0&&(a=a+1640531527|0,s=0==(n=o[127&r]^=i+a)?s+1:0);for(s>=128&&(o[127&(e&&e.length||0)]=-1),s=127,r=512;r>0;--r)i=o[s+34&127],n=o[s=s+1&127],i^=i<<13,n^=n<<17,i^=i>>>15,n^=n>>>12,o[s]=i^n;t.w=a,t.X=o,t.i=s}(e,t)}function a(t,e){return e.i=t.i,e.w=t.w,e.X=t.X.slice(),e}function o(t,e){null==t&&(t=+new Date);var n=new r(t),i=e&&e.state,s=function(){return(n.next()>>>0)/4294967296};return s.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},s.int32=n.next,s.quick=s,i&&(i.X&&a(i,n),s.state=function(){return a(n,{})}),s}s&&s.exports?s.exports=o:n.amdD&&n.amdO?void 0===(i=function(){return o}.call(e,n,e,s))||(s.exports=i):this.xor4096=o}(0,t=n.nmd(t),n.amdD)},9067:function(t,e,n){var i;!function(t,s){function r(t){var e=this;e.next=function(){var t,n,i=e.x,s=e.i;return t=i[s],n=(t^=t>>>7)^t<<24,n^=(t=i[s+1&7])^t>>>10,n^=(t=i[s+3&7])^t>>>3,n^=(t=i[s+4&7])^t<<7,t=i[s+7&7],n^=(t^=t<<13)^t<<9,i[s]=n,e.i=s+1&7,n},function(t,e){var n,i=[];if(e===(0|e))i[0]=e;else for(e=""+e,n=0;n0;--n)t.next()}(e,t)}function a(t,e){return e.x=t.x.slice(),e.i=t.i,e}function o(t,e){null==t&&(t=+new Date);var n=new r(t),i=e&&e.state,s=function(){return(n.next()>>>0)/4294967296};return s.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},s.int32=n.next,s.quick=s,i&&(i.x&&a(i,n),s.state=function(){return a(n,{})}),s}s&&s.exports?s.exports=o:n.amdD&&n.amdO?void 0===(i=function(){return o}.call(e,n,e,s))||(s.exports=i):this.xorshift7=o}(0,t=n.nmd(t),n.amdD)},3031:function(t,e,n){var i;!function(t,s){function r(t){var e=this,n="";e.next=function(){var t=e.x^e.x>>>2;return e.x=e.y,e.y=e.z,e.z=e.w,e.w=e.v,(e.d=e.d+362437|0)+(e.v=e.v^e.v<<4^t^t<<1)|0},e.x=0,e.y=0,e.z=0,e.w=0,e.v=0,t===(0|t)?e.x=t:n+=t;for(var i=0;i>>4),e.next()}function a(t,e){return e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e.v=t.v,e.d=t.d,e}function o(t,e){var n=new r(t),i=e&&e.state,s=function(){return(n.next()>>>0)/4294967296};return s.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},s.int32=n.next,s.quick=s,i&&("object"==typeof i&&a(i,n),s.state=function(){return a(n,{})}),s}s&&s.exports?s.exports=o:n.amdD&&n.amdO?void 0===(i=function(){return o}.call(e,n,e,s))||(s.exports=i):this.xorwow=o}(0,t=n.nmd(t),n.amdD)},4801:function(t,e,n){var i;!function(s,r,a){var o,l=256,u=a.pow(l,6),h=a.pow(2,52),p=2*h,c=l-1;function d(t,e,n){var i=[],c=_(g((e=1==e?{entropy:!0}:e||{}).entropy?[t,T(r)]:null==t?function(){try{var t;return o&&(t=o.randomBytes)?t=t(l):(t=new Uint8Array(l),(s.crypto||s.msCrypto).getRandomValues(t)),T(t)}catch(t){var e=s.navigator,n=e&&e.plugins;return[+new Date,s,n,s.screen,T(r)]}}():t,3),i),d=new f(i),y=function(){for(var t=d.g(6),e=u,n=0;t=p;)t/=2,e/=2,n>>>=1;return(t+n)/e};return y.int32=function(){return 0|d.g(4)},y.quick=function(){return d.g(4)/4294967296},y.double=y,_(T(d.S),r),(e.pass||n||function(t,e,n,i){return i&&(i.S&&m(i,d),t.state=function(){return m(d,{})}),n?(a.random=t,e):t})(y,c,"global"in e?e.global:this==a,e.state)}function f(t){var e,n=t.length,i=this,s=0,r=i.i=i.j=0,a=i.S=[];for(n||(t=[n++]);s{"use strict";t.exports=path},5817:()=>{},8590:()=>{},4530:()=>{},8108:()=>{},551:()=>{},7425:()=>{},9496:()=>{},6786:()=>{},8884:()=>{},8001:()=>{},1613:()=>{},5312:()=>{},9032:()=>{},574:()=>{},2672:()=>{},8215:()=>{},1417:()=>{},9391:()=>{},3220:()=>{},3985:()=>{},32:()=>{},5650:()=>{},6644:()=>{},1234:()=>{},1045:t=>{"use strict";t.exports={rE:"3.0.8"}}},__webpack_module_cache__={},leafPrototypes,getProto,inProgress,dataWebpackPrefix;function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={id:t,loaded:!1,exports:{}};return __webpack_modules__[t].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdD=function(){throw new Error("define cannot be used indirect")},__webpack_require__.amdO={},__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},getProto=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,__webpack_require__.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var n=Object.create(null);__webpack_require__.r(n);var i={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var s=2&e&&t;"object"==typeof s&&!~leafPrototypes.indexOf(s);s=getProto(s))Object.getOwnPropertyNames(s).forEach((e=>i[e]=()=>t[e]));return i.default=()=>t,__webpack_require__.d(n,i),n},__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.f={},__webpack_require__.e=t=>Promise.all(Object.keys(__webpack_require__.f).reduce(((e,n)=>(__webpack_require__.f[n](t,e),e)),[])),__webpack_require__.u=t=>t+".bundle."+{38:"8f8d27e0",97:"2c190343",195:"9cae47ea",211:"788652b1",317:"a52389ac",837:"202ac045",950:"f4a05602",960:"35ce71c3",974:"0d9230d6"}[t]+".js",__webpack_require__.miniCssF=t=>"styles/"+t+".45554be0.css",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),inProgress={},dataWebpackPrefix="@mixly/python-pyodide:",__webpack_require__.l=(t,e,n,i)=>{if(inProgress[t])inProgress[t].push(e);else{var s,r;if(void 0!==n)for(var a=document.getElementsByTagName("script"),o=0;o{s.onerror=s.onload=null,clearTimeout(h);var i=inProgress[t];if(delete inProgress[t],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((t=>t(n))),e)return e(n)},h=setTimeout(u.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=u.bind(null,s.onerror),s.onload=u.bind(null,s.onload),r&&document.head.appendChild(s)}},__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;__webpack_require__.g.importScripts&&(t=__webpack_require__.g.location+"");var e=__webpack_require__.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&(!t||!/^http(s?):/.test(t));)t=n[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=t})(),(()=>{if("undefined"!=typeof document){var t=t=>new Promise(((e,n)=>{var i=__webpack_require__.miniCssF(t),s=__webpack_require__.p+i;if(((t,e)=>{for(var n=document.getElementsByTagName("link"),i=0;i{var r=document.createElement("link");r.rel="stylesheet",r.type="text/css",__webpack_require__.nc&&(r.nonce=__webpack_require__.nc),r.onerror=r.onload=n=>{if(r.onerror=r.onload=null,"load"===n.type)i();else{var a=n&&n.type,o=n&&n.target&&n.target.href||e,l=new Error("Loading CSS chunk "+t+" failed.\n("+a+": "+o+")");l.name="ChunkLoadError",l.code="CSS_CHUNK_LOAD_FAILED",l.type=a,l.request=o,r.parentNode&&r.parentNode.removeChild(r),s(l)}},r.href=e,n?n.parentNode.insertBefore(r,n.nextSibling):document.head.appendChild(r)})(t,s,null,e,n)})),e={792:0};__webpack_require__.f.miniCss=(n,i)=>{e[n]?i.push(e[n]):0!==e[n]&&{317:1}[n]&&i.push(e[n]=t(n).then((()=>{e[n]=0}),(t=>{throw delete e[n],t})))}}})(),(()=>{var t={792:0};__webpack_require__.f.j=(e,n)=>{var i=__webpack_require__.o(t,e)?t[e]:void 0;if(0!==i)if(i)n.push(i[2]);else{var s=new Promise(((n,s)=>i=t[e]=[n,s]));n.push(i[2]=s);var r=__webpack_require__.p+__webpack_require__.u(e),a=new Error;__webpack_require__.l(r,(n=>{if(__webpack_require__.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var s=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+s+": "+r+")",a.name="ChunkLoadError",a.type=s,a.request=r,i[1](a)}}),"chunk-"+e,e)}};var e=(e,n)=>{var i,s,[r,a,o]=n,l=0;if(r.some((e=>0!==t[e]))){for(i in a)__webpack_require__.o(a,i)&&(__webpack_require__.m[i]=a[i]);if(o)o(__webpack_require__)}for(e&&e(n);l{"use strict";var t={};__webpack_require__.r(t),__webpack_require__.d(t,{controls_type:()=>ue,controls_typeLists:()=>he,lists_zip:()=>pe,lists_zip_container:()=>ce,lists_zip_item:()=>de,unpack_iterable_object:()=>fe,variables_change:()=>oe,variables_get:()=>re,variables_global:()=>le,variables_set:()=>ae});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{base_setup:()=>_e,controls_delay:()=>Te,controls_end_program:()=>ye,controls_except:()=>Ne,controls_finally:()=>ke,controls_flow_statements:()=>Se,controls_for:()=>xe,controls_forEach:()=>be,controls_for_range:()=>Re,controls_if:()=>Ie,controls_if_else:()=>Me,controls_if_elseif:()=>Ae,controls_if_if:()=>Oe,controls_lambda:()=>Le,controls_main:()=>ge,controls_pass:()=>Fe,controls_range:()=>Ee,controls_repeat_ext:()=>De,controls_thread:()=>Pe,controls_try:()=>Ce,controls_try_finally:()=>we,controls_whileUntil:()=>ve,datetime_fromtimestamp:()=>Ge,do_while:()=>$e,garbage_collection:()=>Be,gene_unique_identifier:()=>He,get_mem_alloc:()=>Ve,get_mem_free:()=>Ue,get_unique_identifier:()=>Ye});var n={};__webpack_require__.r(n),__webpack_require__.d(n,{base_map:()=>cn,generate_cartesian_product:()=>fn,math_arithmetic:()=>qe,math_bit:()=>Qe,math_constant:()=>Xe,math_constant_mp:()=>je,math_constrain:()=>rn,math_dec:()=>Ze,math_degree_to_radian:()=>gn,math_indexer_number:()=>on,math_map:()=>an,math_max_min:()=>en,math_number:()=>ze,math_number_base_conversion:()=>nn,math_radian_to_degree:()=>mn,math_random:()=>sn,math_random_seed:()=>ln,math_round:()=>un,math_selfcalcu:()=>Ke,math_to_int:()=>tn,math_trig:()=>Je,text_to_number:()=>hn,text_to_number_skulpt:()=>pn,turn_to_int:()=>dn});var i={};__webpack_require__.r(i),__webpack_require__.d(i,{ascii_to_char:()=>bn,char_to_ascii:()=>vn,number_to_text:()=>wn,os_system:()=>qn,text:()=>Tn,text_capital:()=>kn,text_center:()=>Dn,text_char:()=>In,text_char_at:()=>Rn,text_char_at2:()=>xn,text_char_at3:()=>Wn,text_compareTo:()=>Hn,text_compare_to:()=>Nn,text_create_with_container:()=>Un,text_create_with_item:()=>Yn,text_encode:()=>Xn,text_equals_starts_ends:()=>Cn,text_eval:()=>jn,text_find:()=>Ln,text_format:()=>Vn,text_format_noreturn:()=>zn,text_join:()=>En,text_join_seq:()=>Fn,text_length:()=>Sn,text_random_char:()=>On,text_replace:()=>Pn,text_split:()=>$n,text_strip:()=>Bn,text_substring:()=>Mn,text_substring2:()=>An,text_substring3:()=>Gn,text_textarea:()=>yn});var s={};__webpack_require__.r(s),__webpack_require__.d(s,{ENUMERATE:()=>Ci,content_in_lists:()=>ki,enumerate:()=>Ni,list_many_input:()=>Ti,list_tolist:()=>bi,list_tolist2:()=>Mi,list_trig:()=>mi,lists_2d_get_col_row_data:()=>ti,lists_2d_get_data_with_col_row:()=>Zn,lists_append_extend:()=>ai,lists_change_to:()=>_i,lists_change_to_general:()=>Ii,lists_clear:()=>pi,lists_create_with:()=>ei,lists_create_with2:()=>vi,lists_create_with_container:()=>ii,lists_create_with_item:()=>si,lists_create_with_noreturn:()=>yi,lists_create_with_text:()=>ni,lists_create_with_text2:()=>wi,lists_del_general:()=>Ei,lists_find:()=>fi,lists_getIndex3:()=>Si,lists_getSublist3:()=>xi,lists_get_index:()=>Qn,lists_get_random_item:()=>oi,lists_get_random_sublist:()=>li,lists_get_sublist:()=>Jn,lists_insert_value:()=>ui,lists_insert_value2:()=>Oi,lists_pop:()=>di,lists_remove_at:()=>ci,lists_remove_at2:()=>Ai,lists_reverse:()=>hi,lists_setIndex3:()=>Ri,lists_set_index:()=>ri,lists_sort:()=>gi});var r={};__webpack_require__.r(r),__webpack_require__.d(r,{dicts_add_change_del:()=>qi,dicts_add_or_change:()=>Ui,dicts_clear:()=>Hi,dicts_create_with:()=>Li,dicts_create_with_container:()=>Fi,dicts_create_with_item:()=>Pi,dicts_create_with_noreturn:()=>Ji,dicts_deldict:()=>ji,dicts_delete:()=>Yi,dicts_get:()=>Bi,dicts_get_default:()=>Vi,dicts_items:()=>Wi,dicts_keys:()=>$i,dicts_length:()=>Xi,dicts_pop:()=>Ki,dicts_setdefault:()=>Qi,dicts_to_json:()=>ts,dicts_to_json2:()=>is,dicts_to_to:()=>ns,dicts_todict:()=>Zi,dicts_update:()=>Gi,dicts_values:()=>zi,json_to_dicts:()=>es});var a={};__webpack_require__.r(a),__webpack_require__.d(a,{logic_boolean:()=>us,logic_compare:()=>rs,logic_compare_continous:()=>as,logic_is:()=>ds,logic_is_in:()=>cs,logic_negate:()=>ls,logic_null:()=>hs,logic_operation:()=>os,logic_tobool:()=>fs,logic_true_or_false:()=>ps});var o={};__webpack_require__.r(o),__webpack_require__.d(o,{sdcard_mount:()=>Ps,sdcard_use_spi_init:()=>Fs,storage_can_write_ornot:()=>vs,storage_change_dir:()=>Ds,storage_close_file:()=>Ss,storage_delete_file:()=>Rs,storage_file_seek:()=>Ms,storage_file_tell:()=>As,storage_file_write:()=>ys,storage_fileopen:()=>gs,storage_fileopen_new:()=>_s,storage_fileopen_new_encoding:()=>Ts,storage_get_a_line:()=>bs,storage_get_contents:()=>Es,storage_get_contents_without_para:()=>Is,storage_get_current_dir:()=>Cs,storage_get_file_size:()=>Os,storage_get_filename:()=>ws,storage_is_file:()=>Ls,storage_list_all_files:()=>xs,storage_make_dir:()=>Ns,storage_open_file_with_os:()=>ms,storage_rename:()=>ks});var l={};__webpack_require__.r(l),__webpack_require__.d(l,{procedures_callnoreturn:()=>Ys,procedures_callreturn:()=>Gs,procedures_defnoreturn:()=>$s,procedures_defreturn:()=>Bs,procedures_ifreturn:()=>Hs,procedures_mutatorarg:()=>Us,procedures_mutatorcontainer:()=>Vs,procedures_return:()=>Ws});var u={};__webpack_require__.r(u),__webpack_require__.d(u,{tuple_change_to:()=>ir,tuple_create_with:()=>Xs,tuple_create_with_container:()=>js,tuple_create_with_item:()=>qs,tuple_create_with_noreturn:()=>or,tuple_create_with_text2:()=>Ks,tuple_create_with_text_return:()=>Qs,tuple_del:()=>tr,tuple_find:()=>sr,tuple_getIndex:()=>Js,tuple_getSublist:()=>ar,tuple_get_random_item:()=>ur,tuple_get_sublist:()=>lr,tuple_input:()=>pr,tuple_join:()=>er,tuple_length:()=>Zs,tuple_max:()=>nr,tuple_totuple:()=>hr,tuple_trig:()=>rr});var h={};__webpack_require__.r(h),__webpack_require__.d(h,{set_add_discard:()=>Er,set_clear:()=>Tr,set_create_with:()=>dr,set_create_with_container:()=>fr,set_create_with_item:()=>mr,set_create_with_text_return:()=>wr,set_length:()=>gr,set_operate:()=>yr,set_operate_update:()=>Ir,set_pop:()=>_r,set_sub:()=>br,set_toset:()=>Sr,set_update:()=>vr});var p={};__webpack_require__.r(p),__webpack_require__.d(p,{html_content:()=>Mr,html_content_more:()=>Cr,html_document:()=>Rr,html_form:()=>kr,html_head_body:()=>Ar,html_style:()=>Nr,html_style_color:()=>Lr,html_style_content:()=>Dr,html_text:()=>Fr,html_title:()=>Or});var c={};__webpack_require__.r(c),__webpack_require__.d(c,{attribute_access:()=>Kr,function_call:()=>Xr,function_call_container:()=>jr,function_call_item:()=>qr,raw_block:()=>Br,raw_empty:()=>Ur,raw_expression:()=>Vr,raw_table:()=>$r,text_comment:()=>Yr,text_print_multiple:()=>Hr,text_print_multiple_container:()=>Wr,text_print_multiple_item:()=>zr,type_check:()=>Gr});var d={};__webpack_require__.r(d),__webpack_require__.d(d,{controls_type:()=>ea,controls_typeLists:()=>na,lists_zip:()=>ia,unpack_iterable_object:()=>sa,variables_change:()=>Zr,variables_get:()=>Qr,variables_global:()=>ta,variables_set:()=>Jr});var f={};__webpack_require__.r(f),__webpack_require__.d(f,{Panic_with_status_code:()=>fa,base_setup:()=>aa,controls_delay:()=>da,controls_flow_statements:()=>ca,controls_for:()=>ua,controls_forEach:()=>ya,controls_for_range:()=>ha,controls_if:()=>oa,controls_interrupts:()=>_a,controls_lambda:()=>Ea,controls_main:()=>ra,controls_millis:()=>ma,controls_nointerrupts:()=>Ta,controls_pass:()=>va,controls_range:()=>Ia,controls_repeat:()=>Ca,controls_repeat_ext:()=>xa,controls_thread:()=>wa,controls_try_finally:()=>la,controls_whileUntil:()=>pa,datetime_fromtimestamp:()=>Na,do_while:()=>Sa,garbage_collection:()=>Ra,gene_unique_identifier:()=>ka,get_mem_alloc:()=>Oa,get_mem_free:()=>Aa,get_unique_identifier:()=>Ma,reset:()=>ga,time_sleep:()=>ba});var m={};__webpack_require__.r(m),__webpack_require__.d(m,{base_map:()=>to,generate_cartesian_product:()=>no,math_arithmetic:()=>$a,math_bit:()=>Pa,math_constant:()=>La,math_constant_mp:()=>Fa,math_constrain:()=>Xa,math_dec:()=>Ya,math_degree_to_radian:()=>so,math_indexer_number:()=>Ka,math_map:()=>za,math_max_min:()=>Ha,math_number:()=>Da,math_number_base_conversion:()=>ja,math_radian_to_degree:()=>io,math_random:()=>Wa,math_random_seed:()=>qa,math_round:()=>Qa,math_selfcalcu:()=>Ba,math_single:()=>Va,math_to_int:()=>Ga,math_trig:()=>Ua,text_to_number:()=>Ja,text_to_number_skulpt:()=>Za,turn_to_int:()=>eo});var g={};__webpack_require__.r(g),__webpack_require__.d(g,{ascii_to_char:()=>uo,char_to_ascii:()=>ho,number_to_text:()=>po,os_system:()=>Lo,text:()=>ro,text_capital:()=>Eo,text_center:()=>bo,text_char:()=>oo,text_char_at:()=>mo,text_char_at2:()=>fo,text_char_at3:()=>No,text_compareTo:()=>Co,text_compare_to:()=>To,text_encode:()=>ko,text_equals_starts_ends:()=>_o,text_eval:()=>Do,text_find:()=>vo,text_format:()=>Oo,text_format_noreturn:()=>Ao,text_join:()=>lo,text_join_seq:()=>wo,text_length:()=>co,text_random_char:()=>go,text_replace:()=>So,text_split:()=>xo,text_strip:()=>Ro,text_substring:()=>Io,text_substring2:()=>yo,text_substring3:()=>Mo,text_textarea:()=>ao});var _={};__webpack_require__.r(_),__webpack_require__.d(_,{content_in_lists:()=>ml,enumerate:()=>fl,list_many_input:()=>el,list_tolist:()=>cl,list_tolist2:()=>dl,list_trig:()=>Jo,lists_2d_get_col_row_data:()=>$o,lists_2d_get_data_with_col_row:()=>Po,lists_append_extend:()=>Go,lists_change_to:()=>tl,lists_change_to_general:()=>il,lists_clear:()=>jo,lists_create_with:()=>Bo,lists_create_with2:()=>rl,lists_create_with_noreturn:()=>nl,lists_create_with_text:()=>Vo,lists_create_with_text2:()=>al,lists_del_general:()=>sl,lists_find:()=>qo,lists_getIndex3:()=>ol,lists_getSublist3:()=>ll,lists_get_index:()=>Uo,lists_get_random_item:()=>Ho,lists_get_random_sublist:()=>Wo,lists_get_sublist:()=>Fo,lists_insert_value:()=>zo,lists_insert_value2:()=>hl,lists_pop:()=>Qo,lists_remove_at:()=>Ko,lists_remove_at2:()=>pl,lists_reverse:()=>Xo,lists_setIndex3:()=>ul,lists_set_index:()=>Yo,lists_sort:()=>Zo});var T={};__webpack_require__.r(T),__webpack_require__.d(T,{dicts_add_change_del:()=>Ol,dicts_add_or_change:()=>Il,dicts_clear:()=>vl,dicts_create_with:()=>gl,dicts_create_with_noreturn:()=>Cl,dicts_deldict:()=>Rl,dicts_delete:()=>El,dicts_get:()=>Tl,dicts_get_default:()=>yl,dicts_items:()=>wl,dicts_keys:()=>_l,dicts_length:()=>xl,dicts_pop:()=>Al,dicts_setdefault:()=>Ml,dicts_to_json:()=>kl,dicts_to_json2:()=>Fl,dicts_to_to:()=>Ll,dicts_todict:()=>Nl,dicts_update:()=>bl,dicts_values:()=>Sl,json_to_dicts:()=>Dl});var y={};__webpack_require__.r(y),__webpack_require__.d(y,{logic_boolean:()=>Ul,logic_compare:()=>Pl,logic_compare_continous:()=>$l,logic_is:()=>Wl,logic_is_in:()=>Hl,logic_negate:()=>Vl,logic_null:()=>Yl,logic_operation:()=>Bl,logic_tobool:()=>zl,logic_true_or_false:()=>Gl});var I={};__webpack_require__.r(I),__webpack_require__.d(I,{sdcard_mount:()=>mu,sdcard_use_spi_init:()=>fu,storage_can_write_ornot:()=>eu,storage_change_dir:()=>uu,storage_close_file:()=>iu,storage_delete_file:()=>ru,storage_file_seek:()=>lu,storage_file_tell:()=>ou,storage_file_write:()=>Ql,storage_fileopen:()=>jl,storage_fileopen_new:()=>ql,storage_fileopen_new_encoding:()=>Kl,storage_get_a_line:()=>tu,storage_get_contents:()=>Zl,storage_get_contents_without_para:()=>Jl,storage_get_current_dir:()=>hu,storage_get_file_size:()=>au,storage_get_filename:()=>nu,storage_is_file:()=>du,storage_list_all_files:()=>su,storage_make_dir:()=>pu,storage_open_file_with_os:()=>Xl,storage_rename:()=>cu});var E={};__webpack_require__.r(E),__webpack_require__.d(E,{procedures_callnoreturn:()=>yu,procedures_callreturn:()=>Tu,procedures_defnoreturn:()=>_u,procedures_defreturn:()=>gu,procedures_ifreturn:()=>Iu,procedures_return:()=>Eu});var b={};__webpack_require__.r(b),__webpack_require__.d(b,{tuple_change_to:()=>Mu,tuple_create_with:()=>bu,tuple_create_with_noreturn:()=>Du,tuple_create_with_text2:()=>vu,tuple_create_with_text_return:()=>wu,tuple_del:()=>Ru,tuple_find:()=>Cu,tuple_getIndex:()=>Su,tuple_getSublist:()=>ku,tuple_get_random_item:()=>Fu,tuple_get_sublist:()=>Lu,tuple_input:()=>$u,tuple_join:()=>Ou,tuple_length:()=>xu,tuple_max:()=>Au,tuple_totuple:()=>Pu,tuple_trig:()=>Nu});var v={};__webpack_require__.r(v),__webpack_require__.d(v,{set_add_discard:()=>Wu,set_clear:()=>Yu,set_create_with:()=>Bu,set_create_with_text_return:()=>ju,set_length:()=>Vu,set_operate:()=>Gu,set_operate_update:()=>Hu,set_pop:()=>Uu,set_sub:()=>zu,set_toset:()=>qu,set_update:()=>Xu});var w={};__webpack_require__.r(w),__webpack_require__.d(w,{html_content:()=>Zu,html_content_more:()=>th,html_document:()=>Ku,html_form:()=>nh,html_head_body:()=>Ju,html_style:()=>eh,html_style_content:()=>ih,html_text:()=>sh,html_title:()=>Qu});var S={};__webpack_require__.r(S),__webpack_require__.d(S,{attribute_access:()=>ph,function_call:()=>hh,raw_block:()=>rh,raw_empty:()=>oh,raw_expression:()=>ah,raw_table:()=>lh,type_check:()=>uh});var x={};__webpack_require__.r(x),__webpack_require__.d(x,{AI_ChooseAndGet:()=>gh,AI_Face_match:()=>bh,AI_ImageClassify:()=>Ih,AI_ImageClassify_Func:()=>Eh,AI_Nlp:()=>Sh,AI_Nlp_Func:()=>Rh,AI_Nlp_Func_sim:()=>Oh,AI_Nlp_Sim:()=>xh,AI_Nlp_Topic:()=>Ah,AI_Nlp_newsSummary:()=>Mh,AI_Ocr:()=>vh,AI_Ocr_Func:()=>wh,AI_Speech_asr:()=>yh,AI_Speech_synthesis:()=>Th,AI_audio:()=>Ch,AI_client:()=>_h,AI_photo:()=>Nh,AI_result:()=>kh});var R={};__webpack_require__.r(R),__webpack_require__.d(R,{algorithm_add_path:()=>Vh,algorithm_add_school:()=>Fh,algorithm_all_books:()=>np,algorithm_all_books_sequence:()=>ip,algorithm_book_scale:()=>mp,algorithm_check_feet:()=>xp,algorithm_chick_calculate:()=>Sp,algorithm_color_seclet:()=>Hp,algorithm_current_school:()=>zh,algorithm_del_path:()=>Uh,algorithm_delete_book:()=>pp,algorithm_delete_books:()=>cp,algorithm_delete_books2:()=>dp,algorithm_divide_books:()=>up,algorithm_find_path:()=>Ph,algorithm_first_book:()=>sp,algorithm_fz_calc:()=>Mp,algorithm_fz_calc_first_min:()=>Cp,algorithm_fz_compare:()=>Np,algorithm_fz_move:()=>Dp,algorithm_fz_set_min:()=>kp,algorithm_get_book_num:()=>yp,algorithm_get_current_location:()=>Yp,algorithm_get_half_books:()=>hp,algorithm_hxdb_add:()=>Bp,algorithm_hxdb_init_soldier:()=>Fp,algorithm_hxdb_last_line:()=>$p,algorithm_hxdb_result:()=>Vp,algorithm_hxdb_stand_in_line:()=>Pp,algorithm_init_fzsf:()=>Ap,algorithm_init_hxdb:()=>Lp,algorithm_init_jttl:()=>bp,algorithm_move_recent:()=>Kh,algorithm_new_path:()=>$h,algorithm_next_book:()=>op,algorithm_no_left:()=>Gh,algorithm_no_path:()=>Xh,algorithm_no_ring2:()=>rp,algorithm_not_home:()=>Qh,algorithm_not_school:()=>Jh,algorithm_number_add:()=>_p,algorithm_number_zero:()=>gp,algorithm_prepare:()=>Lh,algorithm_prepare2:()=>Wh,algorithm_prepare_2_1:()=>jh,algorithm_prepare_2_2:()=>qh,algorithm_print_book2:()=>fp,algorithm_print_divide:()=>Ep,algorithm_print_jttl_answer:()=>Rp,algorithm_print_number:()=>Tp,algorithm_print_path:()=>Hh,algorithm_print_path2:()=>Zh,algorithm_print_sequence:()=>Ip,algorithm_rabbit_add:()=>Op,algorithm_rabbit_number_in_range:()=>wp,algorithm_rabbit_zero:()=>vp,algorithm_return_path:()=>Yh,algorithm_set_path:()=>Bh,algorithm_two_left:()=>lp,algorithm_void_path:()=>Gp,algorithm_yes_ring2:()=>ap,hanoi_init:()=>tp,hanoi_init_offline:()=>Up,hanoi_move:()=>ep});var O={};__webpack_require__.r(O),__webpack_require__.d(O,{requests_attribute:()=>qp,requests_get:()=>Xp,requests_get_old:()=>zp,requests_method:()=>Kp,requests_post:()=>jp});var A={};__webpack_require__.r(A),__webpack_require__.d(A,{cv_destroy_all:()=>nc,cv_face_classifier:()=>rc,cv_face_detect:()=>ac,cv_face_detect_all:()=>oc,cv_line_rect:()=>ic,cv_read_image:()=>Jp,cv_show_image:()=>Zp,cv_text:()=>sc,cv_waitkey:()=>ec,cv_write_image:()=>tc});var M={};__webpack_require__.r(M),__webpack_require__.d(M,{array_create:()=>wc,array_toarray:()=>$c,dataframe_aggregate_func:()=>kd,dataframe_create:()=>pc,dataframe_create_from_index:()=>dc,dataframe_create_from_one_index:()=>cc,dataframe_fillna:()=>yd,dataframe_get:()=>Lc,dataframe_groupby:()=>Nd,dataframe_head_tail:()=>Md,dataframe_info:()=>Id,dataframe_median:()=>Td,dataframe_select:()=>Cd,dataframe_sort_values:()=>Ad,matrix_multiplication:()=>gd,matrix_transpose:()=>md,numpy_argmin_template_match:()=>od,numpy_astype:()=>sd,numpy_c_:()=>dd,numpy_dot:()=>wd,numpy_linalg_det:()=>fd,numpy_linalg_inv:()=>_d,numpy_max:()=>bd,numpy_mean:()=>ld,numpy_mean_digit:()=>ad,numpy_min:()=>Ed,numpy_ones:()=>cd,numpy_random_random:()=>Rd,numpy_reshape:()=>id,numpy_shape:()=>nd,numpy_size:()=>vd,numpy_square:()=>Sd,numpy_std:()=>ud,numpy_sum:()=>xd,numpy_trig:()=>Nc,pandas_drop_columns:()=>pd,pandas_dropna:()=>hd,pandas_readcsv:()=>Dc,pl_axes:()=>Ic,pl_bar:()=>Oc,pl_hist:()=>Mc,pl_label:()=>vc,pl_legend:()=>Ec,pl_pie:()=>Ac,pl_plot:()=>Tc,pl_plot_bar:()=>Sc,pl_plot_easy:()=>_c,pl_plot_scatter:()=>xc,pl_plot_xy:()=>Rc,pl_savefig:()=>Fc,pl_show:()=>yc,pl_subplot:()=>kc,pl_text:()=>Pc,pl_ticks:()=>Cc,pl_title:()=>bc,plot_axes:()=>Yc,plot_bar:()=>qc,plot_cla:()=>Dd,plot_hist:()=>Qc,plot_label:()=>Wc,plot_legend:()=>Gc,plot_pie:()=>Kc,plot_plot:()=>Vc,plot_plot_bar:()=>zc,plot_plot_easy:()=>Bc,plot_plot_scatter:()=>Xc,plot_plot_xy:()=>jc,plot_savefig:()=>td,plot_show:()=>Uc,plot_subplot:()=>Zc,plot_text:()=>ed,plot_ticks:()=>Jc,plot_title:()=>Hc,py_sum:()=>Od,pylab_imshow:()=>rd,series_create:()=>uc,series_create_from_index:()=>hc,series_create_from_text:()=>fc,series_get_num:()=>gc,series_index_value:()=>mc});var C={};__webpack_require__.r(C),__webpack_require__.d(C,{ds_add_node_by_attr:()=>Gd,ds_add_node_by_name:()=>Yd,ds_create_linkedlist:()=>Fd,ds_create_linkedlist_container:()=>Pd,ds_create_linkedlist_item:()=>$d,ds_create_node:()=>Bd,ds_del_node_by_attr:()=>Wd,ds_del_node_by_name:()=>Hd,ds_get_node_attr:()=>Vd,ds_reverse_linkedlist:()=>zd,ds_set_node_attr:()=>Ud});var N={};__webpack_require__.r(N),__webpack_require__.d(N,{factory_block:()=>sf,factory_block_return:()=>rf,factory_block_return_with_textarea:()=>of,factory_block_with_textarea:()=>af,factory_callMethod_noreturn:()=>ef,factory_callMethod_return:()=>nf,factory_create_with_container:()=>Qd,factory_create_with_item:()=>Jd,factory_declare:()=>tf,factory_from_import:()=>jd,factory_function_noreturn:()=>Kd,factory_function_return:()=>Zd,factory_import:()=>qd});var k={};__webpack_require__.r(k),__webpack_require__.d(k,{hardware_arduino_analog_read:()=>ff,hardware_arduino_analog_write:()=>df,hardware_arduino_digital_read:()=>cf,hardware_arduino_digital_write:()=>pf,hardware_arduino_start:()=>uf,inout_highlow:()=>hf});var D={};__webpack_require__.r(D),__webpack_require__.d(D,{inout_input:()=>mf,inout_print:()=>gf,inout_print_container:()=>bf,inout_print_end:()=>Tf,inout_print_inline:()=>_f,inout_print_item:()=>vf,inout_print_many:()=>Ef,inout_type_input:()=>yf,pyinout_type_input:()=>If});var L={};__webpack_require__.r(L),__webpack_require__.d(L,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>Xf,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>zf,IOT_EMQX_PING:()=>Hf,IOT_FORMATTING:()=>Yf,IOT_FORMAT_STRING:()=>Gf,IOT_MIXIO_NTP:()=>Wf,IOT_MIXIO_PUBLISH:()=>Df,IOT_MIXIO_SUBSCRIBE:()=>Lf,IOT_MIXIO_UNSUBSCRIBE:()=>Ff,iot_checkonenet:()=>im,iot_client_onboard:()=>Kf,iot_create_with_item:()=>Nf,iot_http_client:()=>Qf,iot_http_data:()=>Jf,iot_mixio_check:()=>Bf,iot_mixio_connect:()=>kf,iot_mixio_connect_only:()=>$f,iot_mixio_disconnect:()=>Pf,iot_mixio_format_msg:()=>Uf,iot_mixio_format_topic:()=>Vf,iot_mixly_key:()=>qf,iot_mixly_key_py:()=>jf,iot_mqtt_client:()=>Zf,iot_mqtt_data:()=>tm,iot_onenet_check:()=>Rf,iot_onenet_connect:()=>Sf,iot_onenet_disconnect:()=>xf,iot_onenet_publish:()=>Af,iot_onenet_publish_dict:()=>Of,iot_onenetconnect:()=>em,iot_onenetdisconnect:()=>nm,iot_publish:()=>sm,iot_publish_container:()=>Mf,iot_publish_item:()=>Cf});var F={};__webpack_require__.r(F),__webpack_require__.d(F,{pins_analog_read:()=>um,pins_analog_write:()=>lm,pins_digital_read:()=>om,pins_digital_write:()=>am});var P={};__webpack_require__.r(P),__webpack_require__.d(P,{serial_close:()=>dm,serial_open:()=>hm,serial_read_b:()=>cm,serial_write:()=>pm});var B={};__webpack_require__.r(B),__webpack_require__.d(B,{sklearn_DecisionTreeClassifier_Regressor:()=>wm,sklearn_GaussianNB:()=>Rm,sklearn_KMeans:()=>Mm,sklearn_KMeans_fit:()=>Cm,sklearn_KNeighborsClassifier_Regressor:()=>xm,sklearn_LinearRegression:()=>bm,sklearn_RandomForestClassifier_Regressor:()=>Sm,sklearn_Ridge:()=>vm,sklearn_cluster_centers_labels_inertia:()=>$m,sklearn_coef_intercept:()=>Pm,sklearn_data_target:()=>ym,sklearn_fit:()=>Nm,sklearn_fit_no_target:()=>km,sklearn_load:()=>Tm,sklearn_make_blobs:()=>_m,sklearn_make_classification:()=>mm,sklearn_make_regression:()=>gm,sklearn_pca:()=>Om,sklearn_pca_fit_transform:()=>Am,sklearn_predict:()=>Dm,sklearn_save_load_model:()=>Bm,sklearn_score:()=>Lm,sklearn_score_no_target:()=>Fm,sklearn_train_test_split:()=>Im,sklearn_train_test_split_no_target:()=>Em});var V={};__webpack_require__.r(V),__webpack_require__.d(V,{Panic_with_status_code:()=>Hm,base_delay:()=>Um,controls_millis:()=>Ym,controls_mstimer2:()=>zm,controls_mstimer2_start:()=>Xm,controls_mstimer2_stop:()=>jm,reset:()=>Wm,time_localtime:()=>Gm,time_sleep:()=>qm});var U={};__webpack_require__.r(U),__webpack_require__.d(U,{turtle_bgcolor:()=>gg,turtle_bgcolor_hex:()=>Sg,turtle_bgcolor_hex_new:()=>Ig,turtle_circle:()=>dg,turtle_circle_advanced:()=>fg,turtle_clear:()=>og,turtle_clone:()=>yg,turtle_color:()=>vg,turtle_color_hex:()=>wg,turtle_color_seclet:()=>Lg,turtle_create:()=>Qm,turtle_done:()=>Jm,turtle_exitonclick:()=>Zm,turtle_fill:()=>ug,turtle_fillcolor:()=>Tg,turtle_fillcolor_hex:()=>Rg,turtle_fillcolor_hex_new:()=>bg,turtle_getscreen:()=>Fg,turtle_goto:()=>sg,turtle_listen:()=>Vg,turtle_move:()=>tg,turtle_numinput:()=>Mg,turtle_onclick:()=>$g,turtle_onkey:()=>Pg,turtle_ontimer:()=>Bg,turtle_pencolor:()=>_g,turtle_pencolor_hex:()=>xg,turtle_pencolor_hex_new:()=>Eg,turtle_penup:()=>lg,turtle_pos_shape:()=>ag,turtle_rotate:()=>eg,turtle_screen_delay:()=>ig,turtle_screen_savefig:()=>Ug,turtle_setheading:()=>ng,turtle_setxy:()=>rg,turtle_shape:()=>Og,turtle_shapesize:()=>Ag,turtle_size:()=>pg,turtle_size_speed:()=>hg,turtle_speed:()=>cg,turtle_textinput:()=>Cg,turtle_visible:()=>mg,turtle_write:()=>Ng,turtle_write_format:()=>kg,turtle_write_format_skulpt:()=>Dg});var Y={};__webpack_require__.r(Y),__webpack_require__.d(Y,{AI_ChooseAndGet:()=>Yg,AI_Face_match:()=>Xg,AI_ImageClassify:()=>zg,AI_ImageClassify_Func:()=>Zg,AI_Nlp:()=>qg,AI_Nlp_Func:()=>e_,AI_Nlp_Func_sim:()=>n_,AI_Nlp_Sim:()=>Kg,AI_Nlp_Topic:()=>Qg,AI_Nlp_newsSummary:()=>Jg,AI_Ocr:()=>jg,AI_Ocr_Func:()=>t_,AI_Speech_asr:()=>Wg,AI_Speech_synthesis:()=>Hg,AI_audio:()=>i_,AI_client:()=>Gg,AI_photo:()=>s_,AI_result:()=>r_});var G={};__webpack_require__.r(G),__webpack_require__.d(G,{algorithm_add_path:()=>p_,algorithm_add_school:()=>o_,algorithm_all_books:()=>O_,algorithm_all_books_sequence:()=>R_,algorithm_book_scale:()=>$_,algorithm_check_feet:()=>z_,algorithm_chick_calculate:()=>W_,algorithm_color_seclet:()=>uT,algorithm_current_school:()=>__,algorithm_del_path:()=>c_,algorithm_delete_book:()=>F_,algorithm_divide_books:()=>D_,algorithm_find_path:()=>l_,algorithm_first_book:()=>A_,algorithm_fz_calc:()=>K_,algorithm_fz_compare:()=>Q_,algorithm_fz_move:()=>Z_,algorithm_fz_set_min:()=>J_,algorithm_get_current_location:()=>oT,algorithm_get_half_books:()=>L_,algorithm_hxdb_add:()=>sT,algorithm_hxdb_init_soldier:()=>eT,algorithm_hxdb_last_line:()=>iT,algorithm_hxdb_result:()=>rT,algorithm_hxdb_stand_in_line:()=>nT,algorithm_init_fzsf:()=>q_,algorithm_init_hxdb:()=>tT,algorithm_init_jttl:()=>Y_,algorithm_move_recent:()=>E_,algorithm_new_path:()=>u_,algorithm_next_book:()=>N_,algorithm_no_left:()=>f_,algorithm_no_path:()=>T_,algorithm_no_ring2:()=>M_,algorithm_not_home:()=>b_,algorithm_not_school:()=>v_,algorithm_number_add:()=>V_,algorithm_number_zero:()=>B_,algorithm_prepare:()=>a_,algorithm_prepare2:()=>g_,algorithm_prepare_2_1:()=>y_,algorithm_prepare_2_2:()=>I_,algorithm_print_book2:()=>P_,algorithm_print_jttl_answer:()=>X_,algorithm_print_number:()=>U_,algorithm_print_path:()=>m_,algorithm_print_path2:()=>w_,algorithm_rabbit_add:()=>j_,algorithm_rabbit_number_in_range:()=>H_,algorithm_rabbit_zero:()=>G_,algorithm_return_path:()=>d_,algorithm_set_path:()=>h_,algorithm_two_left:()=>k_,algorithm_void_path:()=>lT,algorithm_yes_ring2:()=>C_,hanoi_init:()=>S_,hanoi_init_offline:()=>aT,hanoi_move:()=>x_});var H={};__webpack_require__.r(H),__webpack_require__.d(H,{requests_attribute:()=>dT,requests_get:()=>pT,requests_get_old:()=>hT,requests_method:()=>fT,requests_post:()=>cT});var W={};__webpack_require__.r(W),__webpack_require__.d(W,{array_create:()=>CT,array_toarray:()=>WT,dataframe_aggregate_func:()=>Vy,dataframe_create:()=>TT,dataframe_create_from_index:()=>yT,dataframe_create_from_one_index:()=>IT,dataframe_fillna:()=>xy,dataframe_get:()=>YT,dataframe_groupby:()=>By,dataframe_head_tail:()=>Py,dataframe_info:()=>Ry,dataframe_median:()=>Sy,dataframe_select:()=>$y,dataframe_sort_values:()=>Fy,matrix_multiplication:()=>vy,matrix_transpose:()=>by,numpy_argmin_template_match:()=>fy,numpy_astype:()=>py,numpy_c_:()=>Iy,numpy_dot:()=>Cy,numpy_linalg_det:()=>Ey,numpy_linalg_inv:()=>wy,numpy_max:()=>Ay,numpy_mean:()=>my,numpy_mean_digit:()=>dy,numpy_min:()=>Oy,numpy_ones:()=>yy,numpy_random_random:()=>Dy,numpy_reshape:()=>hy,numpy_shape:()=>uy,numpy_size:()=>My,numpy_square:()=>Ny,numpy_std:()=>gy,numpy_sum:()=>ky,numpy_trig:()=>BT,pandas_drop_columns:()=>Ty,pandas_dropna:()=>_y,pandas_readcsv:()=>UT,pl_axes:()=>ST,pl_bar:()=>LT,pl_hist:()=>PT,pl_label:()=>MT,pl_legend:()=>OT,pl_pie:()=>FT,pl_plot:()=>RT,pl_plot_bar:()=>NT,pl_plot_easy:()=>xT,pl_plot_scatter:()=>kT,pl_plot_xy:()=>DT,pl_savefig:()=>GT,pl_show:()=>wT,pl_subplot:()=>VT,pl_text:()=>HT,pl_ticks:()=>$T,pl_title:()=>AT,plot_axes:()=>XT,plot_bar:()=>ny,plot_cla:()=>Uy,plot_hist:()=>sy,plot_label:()=>JT,plot_legend:()=>KT,plot_pie:()=>iy,plot_plot:()=>qT,plot_plot_bar:()=>ZT,plot_plot_easy:()=>jT,plot_plot_scatter:()=>ty,plot_plot_xy:()=>ey,plot_savefig:()=>oy,plot_show:()=>zT,plot_subplot:()=>ay,plot_text:()=>ly,plot_ticks:()=>ry,plot_title:()=>QT,py_sum:()=>Ly,pylab_imshow:()=>cy,series_create:()=>gT,series_create_from_index:()=>_T,series_create_from_text:()=>ET,series_get_num:()=>vT,series_index_value:()=>bT});var z={};__webpack_require__.r(z),__webpack_require__.d(z,{ds_add_node_by_attr:()=>Xy,ds_add_node_by_name:()=>zy,ds_create_linkedlist:()=>Yy,ds_create_node:()=>Gy,ds_del_node_by_attr:()=>qy,ds_del_node_by_name:()=>jy,ds_get_node_attr:()=>Hy,ds_reverse_linkedlist:()=>Ky,ds_set_node_attr:()=>Wy});var X={};__webpack_require__.r(X),__webpack_require__.d(X,{factory_block:()=>sI,factory_block_return:()=>rI,factory_block_return_with_textarea:()=>oI,factory_block_with_textarea:()=>aI,factory_callMethod_noreturn:()=>nI,factory_callMethod_return:()=>iI,factory_declare:()=>eI,factory_from_import:()=>Qy,factory_function_noreturn:()=>Zy,factory_function_return:()=>tI,factory_import:()=>Jy});var j={};__webpack_require__.r(j),__webpack_require__.d(j,{hardware_arduino_analog_read:()=>cI,hardware_arduino_analog_write:()=>dI,hardware_arduino_digital_read:()=>pI,hardware_arduino_digital_write:()=>hI,hardware_arduino_start:()=>lI,inout_highlow:()=>uI});var q={};__webpack_require__.r(q),__webpack_require__.d(q,{inout_input:()=>fI,inout_print:()=>mI,inout_print_end:()=>_I,inout_print_inline:()=>gI,inout_print_many:()=>II,inout_type_input:()=>TI,pyinout_type_input:()=>yI});var K={};__webpack_require__.r(K),__webpack_require__.d(K,{IOT_EMQX_INIT_AND_CONNECT_BY_MIXLY_CODE:()=>NI,IOT_EMQX_INIT_AND_CONNECT_BY_SHARE_CODE:()=>LI,IOT_EMQX_PING:()=>FI,IOT_FORMATTING:()=>MI,IOT_FORMAT_STRING:()=>CI,IOT_MIXIO_NTP:()=>PI,IOT_MIXIO_PUBLISH:()=>bI,IOT_MIXIO_SUBSCRIBE:()=>vI,IOT_MIXIO_UNSUBSCRIBE:()=>wI,iot_mixio_check:()=>RI,iot_mixio_connect:()=>EI,iot_mixio_connect_only:()=>xI,iot_mixio_disconnect:()=>SI,iot_mixio_format_msg:()=>AI,iot_mixio_format_topic:()=>OI,iot_mixly_key:()=>kI,iot_mixly_key_py:()=>DI});var Q={};__webpack_require__.r(Q),__webpack_require__.d(Q,{pins_analog_read:()=>YI,pins_analog_write:()=>UI,pins_digital:()=>$I,pins_digital_read:()=>VI,pins_digital_write:()=>BI});var J={};__webpack_require__.r(J),__webpack_require__.d(J,{serial_close:()=>zI,serial_open:()=>GI,serial_read_b:()=>WI,serial_write:()=>HI});var Z={};__webpack_require__.r(Z),__webpack_require__.d(Z,{sklearn_DecisionTreeClassifier_Regressor:()=>nE,sklearn_GaussianNB:()=>rE,sklearn_KMeans:()=>lE,sklearn_KMeans_fit:()=>uE,sklearn_KNeighborsClassifier_Regressor:()=>sE,sklearn_LinearRegression:()=>tE,sklearn_RandomForestClassifier_Regressor:()=>iE,sklearn_Ridge:()=>eE,sklearn_cluster_centers_labels_inertia:()=>gE,sklearn_coef_intercept:()=>mE,sklearn_data_target:()=>QI,sklearn_fit:()=>hE,sklearn_fit_no_target:()=>pE,sklearn_load:()=>KI,sklearn_make_blobs:()=>qI,sklearn_make_classification:()=>XI,sklearn_make_regression:()=>jI,sklearn_pca:()=>aE,sklearn_pca_fit_transform:()=>oE,sklearn_predict:()=>cE,sklearn_save_load_model:()=>_E,sklearn_score:()=>dE,sklearn_score_no_target:()=>fE,sklearn_train_test_split:()=>JI,sklearn_train_test_split_no_target:()=>ZI});var tt={};__webpack_require__.r(tt),__webpack_require__.d(tt,{controls_end_program:()=>yE,controls_millis:()=>TE,time_localtime:()=>IE});var et={};__webpack_require__.r(et),__webpack_require__.d(et,{turtle_bgcolor:()=>VE,turtle_bgcolor_hex:()=>HE,turtle_bgcolor_hex_new:()=>XE,turtle_circle:()=>FE,turtle_circle_advanced:()=>$E,turtle_clear:()=>ME,turtle_clone:()=>GE,turtle_color:()=>QE,turtle_color_hex:()=>KE,turtle_color_seclet:()=>rb,turtle_create:()=>EE,turtle_done:()=>bE,turtle_exitonclick:()=>vE,turtle_fill:()=>NE,turtle_fillcolor:()=>YE,turtle_fillcolor_hex:()=>zE,turtle_fillcolor_hex_new:()=>qE,turtle_getscreen:()=>ab,turtle_goto:()=>OE,turtle_listen:()=>hb,turtle_move:()=>wE,turtle_numinput:()=>eb,turtle_onclick:()=>lb,turtle_onkey:()=>ob,turtle_ontimer:()=>ub,turtle_pencolor:()=>UE,turtle_pencolor_hex:()=>WE,turtle_pencolor_hex_new:()=>jE,turtle_penup:()=>CE,turtle_pos_shape:()=>AE,turtle_rotate:()=>SE,turtle_screen_delay:()=>RE,turtle_screen_savefig:()=>pb,turtle_setheading:()=>xE,turtle_setxy:()=>PE,turtle_shape:()=>JE,turtle_shapesize:()=>ZE,turtle_size:()=>DE,turtle_size_speed:()=>kE,turtle_speed:()=>LE,turtle_textinput:()=>tb,turtle_visible:()=>BE,turtle_write:()=>nb,turtle_write_format:()=>ib,turtle_write_format_skulpt:()=>sb});var nt={};__webpack_require__.r(nt),__webpack_require__.d(nt,{COPYFILE_EXCL:()=>Kb,COPYFILE_FICLONE:()=>Qb,COPYFILE_FICLONE_FORCE:()=>Jb,F_OK:()=>zb,O_APPEND:()=>av,O_CREAT:()=>nv,O_DIRECT:()=>dv,O_DIRECTORY:()=>ov,O_DSYNC:()=>pv,O_EXCL:()=>iv,O_NOATIME:()=>lv,O_NOCTTY:()=>sv,O_NOFOLLOW:()=>uv,O_NONBLOCK:()=>fv,O_RDONLY:()=>Zb,O_RDWR:()=>ev,O_SYMLINK:()=>cv,O_SYNC:()=>hv,O_TRUNC:()=>rv,O_WRONLY:()=>tv,R_OK:()=>Xb,S_IFBLK:()=>yv,S_IFCHR:()=>Ev,S_IFDIR:()=>Iv,S_IFIFO:()=>bv,S_IFLNK:()=>_v,S_IFMT:()=>mv,S_IFREG:()=>Tv,S_IFSOCK:()=>gv,S_IRGRP:()=>Cv,S_IROTH:()=>Lv,S_IRUSR:()=>Rv,S_IRWXG:()=>Mv,S_IRWXO:()=>Dv,S_IRWXU:()=>xv,S_ISGID:()=>wv,S_ISUID:()=>vv,S_ISVTX:()=>Sv,S_IWGRP:()=>Nv,S_IWOTH:()=>Fv,S_IWUSR:()=>Ov,S_IXGRP:()=>kv,S_IXOTH:()=>Pv,S_IXUSR:()=>Av,UV_FS_O_FILEMAP:()=>$v,W_OK:()=>jb,X_OK:()=>qb,size_max:()=>Bv});var it={};__webpack_require__.r(it),__webpack_require__.d(it,{FileHandle:()=>ax,access:()=>Nx,appendFile:()=>_x,chmod:()=>xx,chown:()=>wx,constants:()=>nt,copyFile:()=>Lx,cp:()=>Px,exists:()=>lx,lchmod:()=>Rx,lchown:()=>Sx,link:()=>Ex,lstat:()=>hx,lutimes:()=>Ax,mkdir:()=>yx,mkdtemp:()=>Dx,open:()=>fx,opendir:()=>Fx,readFile:()=>mx,readdir:()=>Ix,readlink:()=>vx,realpath:()=>Mx,rename:()=>ox,rm:()=>kx,rmdir:()=>Tx,stat:()=>ux,statfs:()=>$x,symlink:()=>bx,truncate:()=>px,unlink:()=>cx,utimes:()=>Ox,watch:()=>Cx,writeFile:()=>gx});var st={};__webpack_require__.r(st),__webpack_require__.d(st,{BigIntStatsFs:()=>zv,Dir:()=>tx,Dirent:()=>ZS,ReadStream:()=>nx,Stats:()=>Gv,StatsFs:()=>Wv,WriteStream:()=>ix,_synced:()=>qw,access:()=>yR,accessSync:()=>HS,appendFile:()=>qx,appendFileSync:()=>IS,chmod:()=>fR,chmodSync:()=>BS,chown:()=>cR,chownSync:()=>PS,chroot:()=>tS,close:()=>Qx,closeSync:()=>bS,constants:()=>nt,copyFile:()=>OR,copyFileSync:()=>XS,cp:()=>NR,cpSync:()=>QS,createReadStream:()=>wR,createWriteStream:()=>SR,exists:()=>Ux,existsSync:()=>uS,fchmod:()=>sR,fchmodSync:()=>AS,fchown:()=>iR,fchownSync:()=>OS,fdatasync:()=>tR,fdatasyncSync:()=>SS,fstat:()=>Kx,fstatSync:()=>ES,fsync:()=>Zx,fsyncSync:()=>wS,ftruncate:()=>Jx,ftruncateSync:()=>vS,futimes:()=>rR,futimesSync:()=>MS,lchmod:()=>mR,lchmodSync:()=>VS,lchown:()=>dR,lchownSync:()=>$S,link:()=>uR,linkSync:()=>DS,lopenSync:()=>gS,lstat:()=>Gx,lstatSync:()=>pS,lutimes:()=>_R,lutimesSync:()=>YS,mkdir:()=>oR,mkdirSync:()=>NS,mkdtemp:()=>RR,mkdtempSync:()=>zS,mount:()=>zw,mountObject:()=>Jw,mounts:()=>Ww,open:()=>zx,openAsBlob:()=>DR,openSync:()=>mS,opendir:()=>CR,opendirSync:()=>KS,promises:()=>it,read:()=>nR,readFile:()=>Xx,readFileSync:()=>TS,readSync:()=>RS,readdir:()=>lR,readdirSync:()=>kS,readlink:()=>pR,readlinkSync:()=>FS,readv:()=>AR,readvSync:()=>jS,realpath:()=>TR,realpathSync:()=>GS,rename:()=>Vx,renameSync:()=>lS,rm:()=>xR,rmSync:()=>WS,rmdir:()=>aR,rmdirSync:()=>CS,stat:()=>Yx,statSync:()=>hS,statfs:()=>kR,statfsSync:()=>JS,symlink:()=>hR,symlinkSync:()=>LS,truncate:()=>Hx,truncateSync:()=>cS,umount:()=>Xw,unlink:()=>Wx,unlinkSync:()=>dS,unwatchFile:()=>bR,utimes:()=>gR,utimesSync:()=>US,watch:()=>vR,watchFile:()=>ER,write:()=>eR,writeFile:()=>jx,writeFileSync:()=>yS,writeSync:()=>xS,writev:()=>MR,writevSync:()=>qS});var rt={};__webpack_require__.r(rt),__webpack_require__.d(rt,{arraysEqual:()=>vO,arraysEqualWithNull:()=>bO,assert:()=>_O,assertNonNegativeIntegerDimensions:()=>ZO,assertNonNull:()=>yO,assertShapesMatch:()=>TO,bytesFromStringArray:()=>BO,bytesPerElement:()=>$O,checkConversionForErrors:()=>LO,clamp:()=>pO,computeStrides:()=>zO,convertBackendValuesAndArrayBuffer:()=>qO,createScalarValue:()=>ik,createShuffledIndices:()=>RO,decodeString:()=>lk,distSquared:()=>gO,encodeString:()=>ok,fetch:()=>ak,fingerPrint64:()=>nk,flatten:()=>hk,getArrayFromDType:()=>DO,getTypedArrayFromDType:()=>kO,hasEncodingLoss:()=>PO,hexToLong:()=>WN,indexToLoc:()=>eA,inferDtype:()=>GO,inferFromImplicitShape:()=>MO,isBoolean:()=>UO,isFunction:()=>HO,isInt:()=>wO,isNumber:()=>YO,isPromise:()=>nA,isScalarShape:()=>EO,isString:()=>VO,isTypedArray:()=>uk,isValidDtype:()=>FO,locToIndex:()=>tA,makeOnesTypedArray:()=>KO,makeZerosNestedTypedArray:()=>JO,makeZerosTypedArray:()=>QO,nearestDivisor:()=>WO,nearestLargerEven:()=>cO,now:()=>rk,parseAxisParam:()=>CO,randUniform:()=>mO,repeatedTry:()=>AO,rightPad:()=>OO,shuffle:()=>uO,shuffleCombo:()=>hO,sizeFromShape:()=>IO,sizeToSquarishShape:()=>xO,squeezeShape:()=>NO,sum:()=>fO,swap:()=>dO,tanh:()=>SO,toNestedArray:()=>jO,toTypedArray:()=>sk});var at={};__webpack_require__.r(at),__webpack_require__.d(at,{assertTypesMatch:()=>Vk,getTensorsInContainer:()=>Yk,isTensorInList:()=>Uk,makeTypesMatch:()=>Bk});var ot={};__webpack_require__.r(ot),__webpack_require__.d(ot,{isBrowser:()=>Zk,isMobile:()=>Jk,mockIsMobile:()=>Qk});var lt={};__webpack_require__.r(lt),__webpack_require__.d(lt,{Serializable:()=>iF,SerializationMap:()=>sF,getRegisteredName:()=>aF,registerClass:()=>rF});var ut={};__webpack_require__.r(ut),__webpack_require__.d(ut,{assertAndGetBroadcastShape:()=>_F,getBroadcastDims:()=>mF,getReductionAxes:()=>gF});var ht={};__webpack_require__.r(ht),__webpack_require__.d(ht,{CompositeArrayBuffer:()=>cD,browserFiles:()=>RF,browserHTTPRequest:()=>FF,concatenateArrayBuffers:()=>WD,copyModel:()=>ML,decodeWeights:()=>FD,decodeWeightsStream:()=>UD,encodeWeights:()=>LD,fromMemory:()=>VF,fromMemorySync:()=>UF,getLoadHandlers:()=>nL,getModelArtifactsForJSON:()=>qD,getModelArtifactsForJSONSync:()=>jD,getModelArtifactsInfoForJSON:()=>KD,getSaveHandlers:()=>eL,getWeightSpecs:()=>QD,http:()=>LF,isHTTPScheme:()=>kF,listModels:()=>OL,loadWeights:()=>MF,moveModel:()=>CL,registerLoadRouter:()=>tL,registerSaveRouter:()=>ZD,removeModel:()=>AL,weightsLoaderFactory:()=>CF,withSaveHandler:()=>YF,withSaveHandlerSync:()=>GF});var pt={};__webpack_require__.r(pt),__webpack_require__.d(pt,{confusionMatrix:()=>KF});var ct={};__webpack_require__.r(ct),__webpack_require__.d(ct,{draw:()=>rP,fromPixels:()=>aP,fromPixelsAsync:()=>nP,toPixels:()=>sP});var dt={};__webpack_require__.r(dt),__webpack_require__.d(dt,{prepareAndValidate:()=>oP});var ft={};__webpack_require__.r(ft),__webpack_require__.d(ft,{calculateShapes:()=>hP,validateInput:()=>uP,validateUpdateShape:()=>lP});var mt={};__webpack_require__.r(mt),__webpack_require__.d(mt,{assertParamsValid:()=>dP,computeFlatOffset:()=>xP,computeOutShape:()=>mP,getNormalizedAxes:()=>yP,isSliceContinous:()=>SP,maskToAxes:()=>fP,parseSliceParams:()=>RP,sliceInfo:()=>OP,startForAxis:()=>vP,startIndicesWithElidedDims:()=>IP,stopForAxis:()=>wP,stopIndicesWithElidedDims:()=>EP,stridesForAxis:()=>bP,stridesWithElidedDims:()=>gP});var gt={};__webpack_require__.r(gt),__webpack_require__.d(gt,{TEST_EPSILON_FLOAT16:()=>CP,createVideoElement:()=>YP,encodeStrings:()=>UP,expectArrayBuffersEqual:()=>VP,expectArraysClose:()=>NP,expectArraysEqual:()=>FP,expectNumbersClose:()=>PP,expectPromiseToFail:()=>LP,expectValuesInRange:()=>BP,play:()=>GP,testEpsilon:()=>kP});var _t={};__webpack_require__.r(_t),__webpack_require__.d(_t,{conv2d:()=>jU,depthwiseConv2d:()=>QU,matMul:()=>JU});var Tt={};__webpack_require__.r(Tt),__webpack_require__.d(Tt,{collectGatherOpShapeInfo:()=>lH,computeOutShape:()=>oH,segOpComputeOptimalWindowSize:()=>aH});var yt={};__webpack_require__.r(yt),__webpack_require__.d(yt,{ERF_A1:()=>wG,ERF_A2:()=>SG,ERF_A3:()=>xG,ERF_A4:()=>RG,ERF_A5:()=>OG,ERF_P:()=>vG,PARALLELIZE_THRESHOLD:()=>dG,RowPartitionType:()=>lG,SELU_SCALE:()=>bG,SELU_SCALEALPHA:()=>EG,applyActivation:()=>zU,assertAndGetBroadcastShape:()=>_F,assertAxesAreInnerMostDims:()=>gB,assertParamsConsistent:()=>aG,assignToTypedArray:()=>DG,axesAreInnerMostDims:()=>cB,calculateShapes:()=>hP,checkEinsumDimSizes:()=>GG,checkPadOnDimRoundingMode:()=>T$,combineLocations:()=>dB,combineRaggedTensorToTensorShapes:()=>uG,complexWithEvenIndex:()=>CG,complexWithOddIndex:()=>NG,computeConv2DInfo:()=>o$,computeConv3DInfo:()=>l$,computeDefaultPad:()=>u$,computeDilation2DInfo:()=>s$,computeOptimalWindowSize:()=>fG,computeOutAndReduceShapes:()=>fB,computeOutShape:()=>oG,computePool2DInfo:()=>r$,computePool3DInfo:()=>a$,convertConv2DDataFormat:()=>_$,decodeEinsumEquation:()=>UG,eitherStridesOrDilationsAreOne:()=>m$,expandShapeToKeepDim:()=>mB,exponent:()=>FG,exponents:()=>LG,fromStringArrayToUint8:()=>hH,fromUint8ToStringArray:()=>uH,getAxesPermutation:()=>_B,getBroadcastDims:()=>mF,getComplexWithIndex:()=>kG,getEinsumComputePath:()=>HG,getEinsumPermutation:()=>YG,getFusedBiasGradient:()=>WU,getFusedDyActivation:()=>HU,getImageCenter:()=>mG,getInnerMostAxes:()=>yB,getPermuted:()=>_G,getRaggedRank:()=>pG,getReductionAxes:()=>gF,getReshaped:()=>gG,getReshapedPermuted:()=>TG,getRowPartitionTypesHelper:()=>hG,getSliceBeginCoords:()=>yG,getSliceSize:()=>IG,getSparseFillEmptyRowsIndicesDenseShapeMismatch:()=>jG,getSparseFillEmptyRowsNegativeIndexErrorMessage:()=>qG,getSparseFillEmptyRowsOutOfRangeIndexErrorMessage:()=>KG,getSparseReshapeEmptyTensorZeroOutputDimErrorMessage:()=>ZG,getSparseReshapeInputOutputMismatchErrorMessage:()=>eH,getSparseReshapeInputOutputMultipleErrorMessage:()=>tH,getSparseReshapeMultipleNegativeOneOutputDimErrorMessage:()=>QG,getSparseReshapeNegativeOutputDimErrorMessage:()=>JG,getSparseSegmentReductionIndicesOutOfRangeErrorMessage:()=>rH,getSparseSegmentReductionNegativeSegmentIdsErrorMessage:()=>nH,getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage:()=>iH,getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage:()=>sH,getUndoAxesPermutation:()=>TB,isIdentityPermutation:()=>WG,log:()=>MN,mergeRealAndImagArrays:()=>AG,prepareAndValidate:()=>oP,prepareSplitSize:()=>XG,segment_util:()=>Tt,shouldFuse:()=>XU,slice_util:()=>mt,splitRealAndImagArrays:()=>MG,stridesOrDilationsArePositive:()=>g$,tupleValuesAreOne:()=>f$,upcastType:()=>Lk,validateDefaultValueShape:()=>cG,validateInput:()=>uP,validateUpdateShape:()=>lP,warn:()=>AN});var It={};__webpack_require__.r(It),__webpack_require__.d(It,{nonMaxSuppressionV3Impl:()=>cY,nonMaxSuppressionV4Impl:()=>dY,nonMaxSuppressionV5Impl:()=>fY,whereImpl:()=>NU});var Et={};__webpack_require__.r(Et),__webpack_require__.d(Et,{maxNorm:()=>GX,minMaxNorm:()=>zX,nonNeg:()=>WX,unitNorm:()=>HX});var bt={};__webpack_require__.r(bt),__webpack_require__.d(bt,{constant:()=>qX,glorotNormal:()=>nj,glorotUniform:()=>ej,heNormal:()=>ij,heUniform:()=>sj,identity:()=>ZX,leCunNormal:()=>rj,leCunUniform:()=>aj,ones:()=>jX,orthogonal:()=>oj,randomNormal:()=>QX,randomUniform:()=>KX,truncatedNormal:()=>JX,varianceScaling:()=>tj,zeros:()=>XX});var vt={};__webpack_require__.r(vt),__webpack_require__.d(vt,{Layer:()=>bX,RNN:()=>MK,RNNCell:()=>CK,activation:()=>hJ,add:()=>yJ,alphaDropout:()=>uZ,average:()=>IJ,averagePooling1d:()=>AJ,averagePooling2d:()=>NJ,averagePooling3d:()=>LJ,avgPool1d:()=>MJ,avgPool2d:()=>kJ,avgPool3d:()=>FJ,avgPooling1d:()=>CJ,avgPooling2d:()=>DJ,avgPooling3d:()=>PJ,batchNormalization:()=>xJ,bidirectional:()=>eZ,categoryEncoding:()=>fZ,centerCrop:()=>cZ,concatenate:()=>EJ,conv1d:()=>eJ,conv2d:()=>nJ,conv2dTranspose:()=>iJ,conv3d:()=>sJ,conv3dTranspose:()=>rJ,convLstm2d:()=>QJ,convLstm2dCell:()=>JJ,cropping2D:()=>oJ,dense:()=>pJ,depthwiseConv2d:()=>uJ,dot:()=>SJ,dropout:()=>cJ,elu:()=>qQ,embedding:()=>TJ,flatten:()=>fJ,gaussianDropout:()=>lZ,gaussianNoise:()=>oZ,globalAveragePooling1d:()=>$J,globalAveragePooling2d:()=>BJ,globalMaxPool1d:()=>iZ,globalMaxPool2d:()=>sZ,globalMaxPooling1d:()=>VJ,globalMaxPooling2d:()=>UJ,gru:()=>WJ,gruCell:()=>zJ,input:()=>Rq,inputLayer:()=>jQ,layerNormalization:()=>RJ,leakyReLU:()=>QQ,lstm:()=>XJ,lstmCell:()=>jJ,masking:()=>hZ,maxPool1d:()=>rZ,maxPool2d:()=>aZ,maxPooling1d:()=>YJ,maxPooling2d:()=>GJ,maxPooling3d:()=>HJ,maximum:()=>bJ,minimum:()=>vJ,multiply:()=>wJ,permute:()=>_J,prelu:()=>JQ,randomWidth:()=>mZ,reLU:()=>KQ,repeatVector:()=>mJ,rescaling:()=>pZ,reshape:()=>gJ,resizing:()=>dZ,rnn:()=>ZJ,separableConv2d:()=>aJ,simpleRNN:()=>qJ,simpleRNNCell:()=>KJ,softmax:()=>ZQ,spatialDropout1d:()=>dJ,stackedRNNCells:()=>tZ,thresholdedReLU:()=>tJ,timeDistributed:()=>nZ,upSampling2d:()=>lJ,zeroPadding2d:()=>OJ});var wt={};__webpack_require__.r(wt),__webpack_require__.d(wt,{MAPE:()=>xZ,MSE:()=>AZ,binaryAccuracy:()=>gZ,binaryCrossentropy:()=>_Z,categoricalAccuracy:()=>yZ,categoricalCrossentropy:()=>IZ,cosineProximity:()=>vZ,mape:()=>RZ,meanAbsoluteError:()=>wZ,meanAbsolutePercentageError:()=>SZ,meanSquaredError:()=>OZ,mse:()=>MZ,precision:()=>EZ,r2Score:()=>CZ,recall:()=>bZ,sparseCategoricalAccuracy:()=>TZ});var St={};__webpack_require__.r(St),__webpack_require__.d(St,{modelFromJSON:()=>bq});var xt={};__webpack_require__.r(xt),__webpack_require__.d(xt,{l1:()=>kZ,l1l2:()=>NZ,l2:()=>DZ});var Rt={};__webpack_require__.r(Rt),__webpack_require__.d(Rt,{json:()=>t0});var Ot={};__webpack_require__.r(Ot),__webpack_require__.d(Ot,{json:()=>e0});var At={};__webpack_require__.r(At),__webpack_require__.d(At,{json:()=>n0});var Mt={};__webpack_require__.r(Mt),__webpack_require__.d(Mt,{json:()=>i0});var Ct={};__webpack_require__.r(Ct),__webpack_require__.d(Ct,{json:()=>s0});var Nt={};__webpack_require__.r(Nt),__webpack_require__.d(Nt,{json:()=>r0});var kt={};__webpack_require__.r(kt),__webpack_require__.d(kt,{json:()=>a0});var Dt={};__webpack_require__.r(Dt),__webpack_require__.d(Dt,{json:()=>o0});var Lt={};__webpack_require__.r(Lt),__webpack_require__.d(Lt,{json:()=>l0});var Ft={};__webpack_require__.r(Ft),__webpack_require__.d(Ft,{json:()=>u0});var Pt={};__webpack_require__.r(Pt),__webpack_require__.d(Pt,{json:()=>h0});var $t={};__webpack_require__.r($t),__webpack_require__.d($t,{json:()=>p0});var Bt={};__webpack_require__.r(Bt),__webpack_require__.d(Bt,{json:()=>c0});var Vt={};__webpack_require__.r(Vt),__webpack_require__.d(Vt,{json:()=>d0});var Ut={};__webpack_require__.r(Ut),__webpack_require__.d(Ut,{json:()=>f0});var Yt={};__webpack_require__.r(Yt),__webpack_require__.d(Yt,{json:()=>m0});var Gt={};__webpack_require__.r(Gt),__webpack_require__.d(Gt,{json:()=>g0});var Ht={};__webpack_require__.r(Ht),__webpack_require__.d(Ht,{json:()=>_0});var Wt={};__webpack_require__.r(Wt),__webpack_require__.d(Wt,{json:()=>T0});var zt={};__webpack_require__.r(zt),__webpack_require__.d(zt,{OP_SCOPE_SUFFIX:()=>aD,abs:()=>fF,acos:()=>zP,acosh:()=>XP,add:()=>VL,addN:()=>jP,all:()=>qP,any:()=>KP,argMax:()=>QP,argMin:()=>JP,asin:()=>ZP,asinh:()=>t$,atan:()=>e$,atan2:()=>n$,atanh:()=>i$,avgPool:()=>I$,avgPool3d:()=>E$,basicLSTMCell:()=>x$,batchNorm:()=>O$,batchNorm2d:()=>A$,batchNorm3d:()=>M$,batchNorm4d:()=>C$,batchToSpaceND:()=>R$,bincount:()=>N$,bitwiseAnd:()=>k$,booleanMaskAsync:()=>DU,broadcastArgs:()=>D$,broadcastTo:()=>L$,buffer:()=>FL,cast:()=>PL,ceil:()=>F$,clipByValue:()=>P$,clone:()=>$L,complex:()=>lD,concat:()=>b$,concat1d:()=>$$,concat2d:()=>B$,concat3d:()=>V$,concat4d:()=>U$,conv1d:()=>G$,conv2d:()=>Y$,conv2dTranspose:()=>W$,conv3d:()=>z$,conv3dTranspose:()=>j$,cos:()=>q$,cosh:()=>K$,cosineWindow:()=>UU,cumprod:()=>Q$,cumsum:()=>J$,denseBincount:()=>Z$,depthToSpace:()=>tB,depthwiseConv2d:()=>eB,diag:()=>nB,dilation2d:()=>iB,div:()=>YL,divNoNan:()=>aB,dot:()=>oB,dropout:()=>BU,einsum:()=>lB,elu:()=>uB,enclosingPowerOfTwo:()=>VU,ensureShape:()=>hB,equal:()=>sB,erf:()=>pB,euclideanNorm:()=>SB,exp:()=>xB,expandDims:()=>RB,expm1:()=>OB,eye:()=>MB,fft:()=>lU,fill:()=>uF,floor:()=>CB,floorDiv:()=>UL,fused:()=>_t,gather:()=>NB,gatherND:()=>$U,greater:()=>kB,greaterEqual:()=>DB,ifft:()=>uU,imag:()=>zF,image:()=>JY,inTopKAsync:()=>YU,irfft:()=>hU,isFinite:()=>LB,isInf:()=>FB,isNaN:()=>PB,leakyRelu:()=>$B,less:()=>BB,lessEqual:()=>VB,linalg:()=>ZY,linspace:()=>UB,localResponseNormalization:()=>YB,log:()=>GB,log1p:()=>HB,logSigmoid:()=>zB,logSoftmax:()=>XB,logSumExp:()=>jB,logicalAnd:()=>qB,logicalNot:()=>KB,logicalOr:()=>QB,logicalXor:()=>JB,losses:()=>tG,lowerBound:()=>eV,matMul:()=>HF,max:()=>IB,maxPool:()=>nV,maxPool3d:()=>iV,maxPoolWithArgmax:()=>sV,maximum:()=>TF,mean:()=>rV,meshgrid:()=>lV,min:()=>EB,minimum:()=>uV,mirrorPad:()=>hV,mod:()=>pV,moments:()=>cV,movingAverage:()=>LU,mul:()=>GL,multiRNNCell:()=>dV,multinomial:()=>fV,neg:()=>XF,norm:()=>wB,notEqual:()=>mV,oneHot:()=>WF,ones:()=>oV,onesLike:()=>gV,op:()=>oD,outerProduct:()=>_V,pad:()=>TV,pad1d:()=>yV,pad2d:()=>IV,pad3d:()=>EV,pad4d:()=>bV,pool:()=>wV,pow:()=>pF,prelu:()=>SV,print:()=>BL,prod:()=>xV,raggedGather:()=>RV,raggedRange:()=>OV,raggedTensorToTensor:()=>AV,rand:()=>MV,randomGamma:()=>LV,randomNormal:()=>FV,randomStandardNormal:()=>PV,randomUniform:()=>$V,randomUniformInt:()=>BV,range:()=>VV,real:()=>jF,reciprocal:()=>UV,relu:()=>YV,relu6:()=>GV,reshape:()=>y$,reverse:()=>HV,reverse1d:()=>WV,reverse2d:()=>zV,reverse3d:()=>XV,reverse4d:()=>jV,rfft:()=>cU,round:()=>qV,rsqrt:()=>KV,scalar:()=>tF,scatterND:()=>FU,searchSorted:()=>tV,selu:()=>QV,separableConv2d:()=>JV,setdiff1dAsync:()=>ZV,sigmoid:()=>v$,sign:()=>tU,signal:()=>QY,sin:()=>eU,sinh:()=>nU,slice:()=>w$,slice1d:()=>iU,slice2d:()=>sU,slice3d:()=>rU,slice4d:()=>aU,softmax:()=>oU,softplus:()=>WB,spaceToBatchND:()=>vV,sparse:()=>eG,sparseToDense:()=>PU,spectral:()=>KY,split:()=>pU,sqrt:()=>HL,square:()=>WL,squaredDifference:()=>dU,squeeze:()=>fU,stack:()=>mU,step:()=>gU,stridedSlice:()=>_U,string:()=>nG,sub:()=>cF,sum:()=>bB,tan:()=>TU,tanh:()=>S$,tensor:()=>hD,tensor1d:()=>yU,tensor2d:()=>IU,tensor3d:()=>QF,tensor4d:()=>EU,tensor5d:()=>bU,tensor6d:()=>vU,tensorScatterUpdate:()=>wU,tile:()=>AB,topk:()=>SU,transpose:()=>qF,truncatedNormal:()=>xU,unique:()=>RU,unsortedSegmentSum:()=>OU,unstack:()=>AU,upperBound:()=>MU,variable:()=>CU,where:()=>rB,whereAsync:()=>kU,zeros:()=>aV,zerosLike:()=>zL});var Xt={};__webpack_require__.r(Xt),__webpack_require__.d(Xt,{CSVDataset:()=>Z1,Dataset:()=>U1,FileDataSource:()=>c2,TextLineDataset:()=>z1,URLDataSource:()=>d2,array:()=>G1,csv:()=>f2,func:()=>m2,generator:()=>g2,microphone:()=>T2,version_data:()=>y2,webcam:()=>_2,zip:()=>H1});var jt={};__webpack_require__.r(jt),__webpack_require__.d(jt,{addImpl:()=>$2,bincountImpl:()=>Y2,bincountReduceImpl:()=>G2,bitwiseAndImpl:()=>H2,castImpl:()=>k2,ceilImpl:()=>K2,concatImpl:()=>Z2,equalImpl:()=>t3,expImpl:()=>i3,expm1Impl:()=>a3,floorDivImpl:()=>c3,floorImpl:()=>u3,gatherNdImpl:()=>m3,gatherV2Impl:()=>g3,greaterEqualImpl:()=>I3,greaterImpl:()=>_3,lessEqualImpl:()=>x3,lessImpl:()=>v3,linSpaceImpl:()=>A3,logImpl:()=>M3,maxImpl:()=>k3,maximumImpl:()=>D3,minimumImpl:()=>P3,multiplyImpl:()=>V3,negImpl:()=>H3,notEqualImpl:()=>z3,prodImpl:()=>J3,raggedGatherImpl:()=>i4,raggedRangeImpl:()=>r4,raggedTensorToTensorImpl:()=>h4,rangeImpl:()=>p4,rsqrtImpl:()=>c4,scatterImpl:()=>m4,sigmoidImpl:()=>g4,simpleAbsImpl:()=>v2,sliceImpl:()=>y4,sparseFillEmptyRowsImpl:()=>b4,sparseReshapeImpl:()=>v4,sparseSegmentReductionImpl:()=>w4,sqrtImpl:()=>S4,squaredDifferenceImpl:()=>O4,staticRegexReplaceImpl:()=>C4,stridedSliceImpl:()=>D4,stringNGramsImpl:()=>F4,stringSplitImpl:()=>$4,stringToHashBucketFastImpl:()=>B4,subImpl:()=>V4,tileImpl:()=>H4,topKImpl:()=>X4,transposeImpl:()=>q3,uniqueImpl:()=>j4});var qt={};__webpack_require__.r(qt),__webpack_require__.d(qt,{assertNotComplex:()=>utt,bindCanvasToFramebuffer:()=>P7,bindColorTextureToFramebuffer:()=>$7,bindTextureToProgramUniformSampler:()=>F7,bindTextureUnit:()=>N7,bindVertexBufferToProgramAttribute:()=>C7,callAndCheck:()=>c7,canBeRepresented:()=>m7,createFragmentShader:()=>y7,createFramebuffer:()=>M7,createProgram:()=>b7,createStaticIndexBuffer:()=>x7,createStaticVertexBuffer:()=>S7,createTexture:()=>O7,createVertexShader:()=>T7,getBatchDim:()=>H7,getExtensionOrThrow:()=>_7,getFramebufferErrorMessage:()=>U7,getMaxTexturesInShader:()=>ett,getNumChannels:()=>R7,getProgramUniformLocation:()=>L7,getProgramUniformLocationOrThrow:()=>D7,getRowsCols:()=>W7,getShapeAs3D:()=>z7,getTextureShapeFromLogicalShape:()=>X7,getWebGLDisjointQueryTimerVersion:()=>ntt,getWebGLErrorMessage:()=>g7,getWebGLMaxTextureSize:()=>J7,hasExtension:()=>itt,isCapableOfRenderingToFloatTexture:()=>rtt,isDownloadFloatTextureEnabled:()=>att,isReshapeFree:()=>q7,isWebGLFenceEnabled:()=>ltt,isWebGLVersionEnabled:()=>stt,linkProgram:()=>v7,logShaderSourceAndInfoLog:()=>E7,resetMaxTextureSize:()=>Z7,resetMaxTexturesInShader:()=>ttt,unbindColorTextureFromFramebuffer:()=>B7,unbindTextureUnit:()=>k7,validateFramebuffer:()=>V7,validateProgram:()=>w7,validateTextureSize:()=>A7});var Kt={};__webpack_require__.r(Kt),__webpack_require__.d(Kt,{bindVertexProgramAttributeStreams:()=>net,createBufferFromOutputTexture:()=>ret,createFloat16MatrixTexture:()=>qtt,createFloat16PackedMatrixTexture:()=>eet,createFloat32MatrixTexture:()=>Xtt,createIndexBuffer:()=>Htt,createPackedMatrixTexture:()=>Ztt,createUnsignedBytesMatrixTexture:()=>Qtt,createVertexBuffer:()=>Gtt,createVertexShader:()=>Ytt,downloadByteEncodedFloatMatrixFromOutputTexture:()=>oet,downloadFloat32MatrixFromBuffer:()=>aet,downloadMatrixFromPackedOutputTexture:()=>het,downloadPackedMatrixFromBuffer:()=>uet,getInternalFormatForFloat16MatrixTexture:()=>jtt,getInternalFormatForFloat16PackedMatrixTexture:()=>tet,getInternalFormatForFloat32MatrixTexture:()=>ztt,getInternalFormatForPackedMatrixTexture:()=>Jtt,getInternalFormatForUnsignedBytesMatrixTexture:()=>Ktt,uploadDenseMatrixToTexture:()=>iet,uploadPixelDataToTexture:()=>set});var Qt={};__webpack_require__.r(Qt),__webpack_require__.d(Qt,{Abs:()=>pA,Acos:()=>cA,Acosh:()=>dA,AdadeltaOptimizer:()=>lF,AdagradOptimizer:()=>hF,AdamOptimizer:()=>dF,AdamaxOptimizer:()=>yF,Add:()=>fA,AddN:()=>mA,All:()=>gA,Any:()=>_A,ArgMax:()=>TA,ArgMin:()=>yA,Asin:()=>IA,Asinh:()=>EA,Atan:()=>bA,Atan2:()=>wA,Atanh:()=>vA,AvgPool:()=>SA,AvgPool3D:()=>RA,AvgPool3DGrad:()=>OA,AvgPoolGrad:()=>xA,BatchMatMul:()=>AA,BatchToSpaceND:()=>MA,Bincount:()=>CA,BitwiseAnd:()=>NA,BroadcastArgs:()=>DA,BroadcastTo:()=>kA,Callback:()=>LZ,CallbackList:()=>cj,Cast:()=>LA,Ceil:()=>FA,ClipByValue:()=>PA,Complex:()=>$A,ComplexAbs:()=>BA,Concat:()=>VA,Conv2D:()=>UA,Conv2DBackpropFilter:()=>YA,Conv2DBackpropInput:()=>GA,Conv3D:()=>HA,Conv3DBackpropFilterV2:()=>WA,Conv3DBackpropInputV2:()=>zA,Cos:()=>XA,Cosh:()=>jA,CropAndResize:()=>QA,Cumprod:()=>qA,Cumsum:()=>KA,CustomCallback:()=>mj,DataStorage:()=>aO,DenseBincount:()=>JA,DepthToSpace:()=>ZA,DepthwiseConv2dNative:()=>tM,DepthwiseConv2dNativeBackpropFilter:()=>eM,DepthwiseConv2dNativeBackpropInput:()=>nM,Diag:()=>iM,Dilation2D:()=>sM,Dilation2DBackpropFilter:()=>aM,Dilation2DBackpropInput:()=>rM,Draw:()=>oM,ENV:()=>lA,EarlyStopping:()=>$Z,Einsum:()=>uM,Elu:()=>hM,EluGrad:()=>pM,Environment:()=>sA,Equal:()=>dM,Erf:()=>cM,Exp:()=>fM,ExpandDims:()=>mM,Expm1:()=>gM,FFT:()=>_M,Fill:()=>TM,FlipLeftRight:()=>yM,Floor:()=>IM,FloorDiv:()=>EM,FromPixels:()=>wN,FusedBatchNorm:()=>bM,FusedConv2D:()=>RN,FusedDepthwiseConv2D:()=>ON,GPGPUContext:()=>pet,GatherNd:()=>wM,GatherV2:()=>vM,GraphModel:()=>a1,Greater:()=>SM,GreaterEqual:()=>xM,History:()=>fj,IFFT:()=>OM,Identity:()=>RM,Imag:()=>AM,InputSpec:()=>_X,IsFinite:()=>MM,IsInf:()=>CM,IsNan:()=>NM,KernelBackend:()=>oO,LRN:()=>WM,LRNGrad:()=>zM,LayerVariable:()=>fX,LayersModel:()=>Iq,LeakyRelu:()=>kM,Less:()=>DM,LessEqual:()=>LM,LinSpace:()=>FM,Log:()=>PM,Log1p:()=>$M,LogSoftmax:()=>GM,LogicalAnd:()=>BM,LogicalNot:()=>VM,LogicalOr:()=>UM,LogicalXor:()=>YM,LowerBound:()=>HM,MathBackendCPU:()=>b2,MathBackendWebGL:()=>Lnt,MatrixBandPart:()=>XM,Max:()=>jM,MaxPool:()=>KM,MaxPool3D:()=>JM,MaxPool3DGrad:()=>ZM,MaxPoolGrad:()=>QM,MaxPoolWithArgmax:()=>tC,Maximum:()=>qM,Mean:()=>eC,Min:()=>nC,Minimum:()=>iC,MirrorPad:()=>sC,Mod:()=>rC,MomentumOptimizer:()=>EF,Multinomial:()=>aC,Multiply:()=>oC,Neg:()=>lC,NonMaxSuppressionV3:()=>hC,NonMaxSuppressionV4:()=>pC,NonMaxSuppressionV5:()=>cC,NotEqual:()=>uC,OP_SCOPE_SUFFIX:()=>aD,OneHot:()=>fC,OnesLike:()=>dC,Optimizer:()=>oF,OptimizerConstructors:()=>WP,Pack:()=>mC,PadV2:()=>gC,Pool:()=>_C,Pow:()=>TC,Prelu:()=>yC,Prod:()=>IC,RMSPropOptimizer:()=>bF,RNN:()=>MK,RaggedGather:()=>EC,RaggedRange:()=>bC,RaggedTensorToTensor:()=>vC,Range:()=>wC,Rank:()=>Ak,Real:()=>SC,RealDiv:()=>lM,Reciprocal:()=>xC,Reduction:()=>NY,Relu:()=>RC,Relu6:()=>kC,Reshape:()=>OC,ResizeBilinear:()=>CC,ResizeBilinearGrad:()=>NC,ResizeNearestNeighbor:()=>AC,ResizeNearestNeighborGrad:()=>MC,Reverse:()=>DC,RotateWithOffset:()=>SN,Round:()=>LC,Rsqrt:()=>FC,SGDOptimizer:()=>IF,ScatterNd:()=>PC,SearchSorted:()=>BC,Select:()=>VC,Selu:()=>UC,Sequential:()=>wq,Sigmoid:()=>zC,Sign:()=>WC,Sin:()=>GC,Sinh:()=>HC,Slice:()=>YC,Softmax:()=>JC,Softplus:()=>XC,SpaceToBatchND:()=>KC,SparseFillEmptyRows:()=>ZC,SparseReshape:()=>tN,SparseSegmentMean:()=>eN,SparseSegmentSum:()=>nN,SparseToDense:()=>iN,SplitV:()=>QC,Sqrt:()=>jC,Square:()=>rN,SquaredDifference:()=>sN,StaticRegexReplace:()=>aN,Step:()=>vN,StridedSlice:()=>oN,StringNGrams:()=>lN,StringSplit:()=>uN,StringToHashBucketFast:()=>hN,Sub:()=>pN,Sum:()=>qC,SymbolicTensor:()=>TX,Tan:()=>cN,Tanh:()=>dN,Tensor:()=>xk,TensorBuffer:()=>bk,TensorScatterUpdate:()=>$C,Tile:()=>fN,TopK:()=>mN,Transform:()=>gN,Transpose:()=>_N,Unique:()=>TN,Unpack:()=>yN,UnsortedSegmentSum:()=>IN,UpperBound:()=>EN,Variable:()=>Ok,ZerosLike:()=>bN,_FusedMatMul:()=>xN,abs:()=>fF,acos:()=>zP,acosh:()=>XP,add:()=>VL,addN:()=>jP,all:()=>qP,any:()=>KP,argMax:()=>QP,argMin:()=>JP,asin:()=>ZP,asinh:()=>t$,atan:()=>e$,atan2:()=>n$,atanh:()=>i$,avgPool:()=>I$,avgPool3d:()=>E$,backend:()=>ND,backend_util:()=>yt,basicLSTMCell:()=>x$,batchNorm:()=>O$,batchNorm2d:()=>A$,batchNorm3d:()=>M$,batchNorm4d:()=>C$,batchToSpaceND:()=>R$,bincount:()=>N$,bitwiseAnd:()=>k$,booleanMaskAsync:()=>DU,broadcastArgs:()=>D$,broadcastTo:()=>L$,broadcast_util:()=>ut,browser:()=>ct,buffer:()=>FL,callbacks:()=>BZ,cast:()=>PL,ceil:()=>F$,clipByValue:()=>P$,clone:()=>$L,complex:()=>lD,concat:()=>b$,concat1d:()=>$$,concat2d:()=>B$,concat3d:()=>V$,concat4d:()=>U$,constraints:()=>Et,conv1d:()=>G$,conv2d:()=>Y$,conv2dTranspose:()=>W$,conv3d:()=>z$,conv3dTranspose:()=>j$,copyRegisteredKernels:()=>VN,cos:()=>q$,cosh:()=>K$,cosineWindow:()=>UU,cumprod:()=>Q$,cumsum:()=>J$,customGrad:()=>JL,data:()=>Xt,denseBincount:()=>Z$,deprecationWarn:()=>gD,depthToSpace:()=>tB,depthwiseConv2d:()=>eB,deregisterOp:()=>WZ,device_util:()=>ot,diag:()=>nB,dilation2d:()=>iB,disableDeprecationWarnings:()=>mD,dispose:()=>bD,disposeVariables:()=>_D,div:()=>YL,divNoNan:()=>aB,dot:()=>oB,dropout:()=>BU,einsum:()=>lB,elu:()=>uB,enableDebugMode:()=>fD,enableProdMode:()=>dD,enclosingPowerOfTwo:()=>VU,engine:()=>TD,ensureShape:()=>hB,env:()=>aA,equal:()=>sB,erf:()=>pB,euclideanNorm:()=>SB,exp:()=>xB,expandDims:()=>RB,expm1:()=>OB,eye:()=>MB,fft:()=>lU,fill:()=>uF,findBackend:()=>AD,findBackendFactory:()=>MD,floor:()=>CB,floorDiv:()=>UL,forceHalfFloat:()=>Pnt,fused:()=>_t,gather:()=>NB,gatherND:()=>$U,gather_util:()=>dt,getBackend:()=>RD,getGradient:()=>DN,getKernel:()=>kN,getKernelsForBackend:()=>LN,gpgpu_util:()=>Kt,grad:()=>XL,grads:()=>jL,greater:()=>kB,greaterEqual:()=>DB,ifft:()=>uU,imag:()=>zF,image:()=>JY,inTopKAsync:()=>YU,initializers:()=>bt,input:()=>Rq,io:()=>ht,irfft:()=>hU,isFinite:()=>LB,isInf:()=>FB,isNaN:()=>PB,keep:()=>vD,kernel_impls:()=>It,layers:()=>vt,leakyRelu:()=>$B,less:()=>BB,lessEqual:()=>VB,linalg:()=>ZY,linspace:()=>UB,loadGraphModel:()=>o1,loadGraphModelSync:()=>l1,loadLayersModel:()=>vq,localResponseNormalization:()=>YB,log:()=>GB,log1p:()=>HB,logSigmoid:()=>zB,logSoftmax:()=>XB,logSumExp:()=>jB,logicalAnd:()=>qB,logicalNot:()=>KB,logicalOr:()=>QB,logicalXor:()=>JB,losses:()=>tG,lowerBound:()=>eV,matMul:()=>HF,math:()=>pt,max:()=>IB,maxPool:()=>nV,maxPool3d:()=>iV,maxPoolWithArgmax:()=>sV,maximum:()=>TF,mean:()=>rV,memory:()=>yD,meshgrid:()=>lV,metrics:()=>wt,min:()=>EB,minimum:()=>uV,mirrorPad:()=>hV,mod:()=>pV,model:()=>Sq,models:()=>St,moments:()=>cV,movingAverage:()=>LU,mul:()=>GL,multiRNNCell:()=>dV,multinomial:()=>fV,neg:()=>XF,nextFrame:()=>rG,norm:()=>wB,notEqual:()=>mV,oneHot:()=>WF,ones:()=>oV,onesLike:()=>gV,op:()=>oD,outerProduct:()=>_V,pad:()=>TV,pad1d:()=>yV,pad2d:()=>IV,pad3d:()=>EV,pad4d:()=>bV,pool:()=>wV,pow:()=>pF,prelu:()=>SV,print:()=>BL,prod:()=>xV,profile:()=>ID,raggedGather:()=>RV,raggedRange:()=>OV,raggedTensorToTensor:()=>AV,rand:()=>MV,randomGamma:()=>LV,randomNormal:()=>FV,randomStandardNormal:()=>PV,randomUniform:()=>$V,randomUniformInt:()=>BV,range:()=>VV,ready:()=>xD,real:()=>jF,reciprocal:()=>UV,registerBackend:()=>CD,registerCallbackConstructor:()=>Oq,registerGradient:()=>PN,registerKernel:()=>FN,registerOp:()=>GZ,regularizers:()=>xt,relu:()=>YV,relu6:()=>GV,removeBackend:()=>OD,reshape:()=>y$,reverse:()=>HV,reverse1d:()=>WV,reverse2d:()=>zV,reverse3d:()=>XV,reverse4d:()=>jV,rfft:()=>cU,round:()=>qV,rsqrt:()=>KV,scalar:()=>tF,scatterND:()=>FU,scatter_util:()=>ft,searchSorted:()=>tV,selu:()=>QV,separableConv2d:()=>JV,sequential:()=>xq,serialization:()=>lt,setBackend:()=>SD,setPlatform:()=>kD,setWebGLContext:()=>i7,setdiff1dAsync:()=>ZV,shared:()=>jt,sigmoid:()=>v$,sign:()=>tU,signal:()=>QY,sin:()=>eU,sinh:()=>nU,slice:()=>w$,slice1d:()=>iU,slice2d:()=>sU,slice3d:()=>rU,slice4d:()=>aU,slice_util:()=>mt,softmax:()=>oU,softplus:()=>WB,spaceToBatchND:()=>vV,sparse:()=>eG,sparseToDense:()=>PU,spectral:()=>KY,split:()=>pU,sqrt:()=>HL,square:()=>WL,squaredDifference:()=>dU,squeeze:()=>fU,stack:()=>mU,step:()=>gU,stridedSlice:()=>_U,string:()=>nG,sub:()=>cF,sum:()=>bB,sumOutType:()=>Fk,tan:()=>TU,tanh:()=>S$,tensor:()=>hD,tensor1d:()=>yU,tensor2d:()=>IU,tensor3d:()=>QF,tensor4d:()=>EU,tensor5d:()=>bU,tensor6d:()=>vU,tensorScatterUpdate:()=>wU,tensor_util:()=>at,test_util:()=>gt,tidy:()=>ED,tile:()=>AB,time:()=>wD,topk:()=>SU,train:()=>iG,transpose:()=>qF,truncatedNormal:()=>xU,unique:()=>RU,unregisterGradient:()=>BN,unregisterKernel:()=>$N,unsortedSegmentSum:()=>OU,unstack:()=>AU,upcastType:()=>Lk,upperBound:()=>MU,util:()=>rt,valueAndGrad:()=>qL,valueAndGrads:()=>KL,variable:()=>CU,variableGrads:()=>QL,version:()=>Nut,version_converter:()=>u1,version_core:()=>HP,version_cpu:()=>q4,version_layers:()=>tq,version_webgl:()=>Fnt,webgl:()=>$nt,webgl_util:()=>qt,where:()=>rB,whereAsync:()=>kU,zeros:()=>aV,zerosLike:()=>zL});const Jt=Blockly;Object.assign(Jt.Lang.ZhHans,{PYTHON_PYODIDE_IMAGE:"图像",PYTHON_PYODIDE_LOADING:"Python3内核载入中...",PYTHON_PYODIDE_FILE_SYSTEM:"本地文件系统",PYTHON_PYODIDE_LOAD_FILE_SYSTEM:"载入本地文件夹"}),Object.assign(Jt.Lang.ZhHant,{PYTHON_PYODIDE_IMAGE:"影像",PYTHON_PYODIDE_LOADING:"Python3核心載入...",PYTHON_PYODIDE_FILE_SYSTEM:"本機檔案系統",PYTHON_PYODIDE_LOAD_FILE_SYSTEM:"載入本機資料夾"}),Object.assign(Jt.Lang.En,{PYTHON_PYODIDE_IMAGE:"Image",PYTHON_PYODIDE_LOADING:"Python3 kernel loading...",PYTHON_PYODIDE_FILE_SYSTEM:"Local File System",PYTHON_PYODIDE_LOAD_FILE_SYSTEM:"Load Local Folder"}),Object.assign(Jt.Lang.ZhHans.MSG,{}),Object.assign(Jt.Lang.ZhHant.MSG,{}),Object.assign(Jt.Lang.En.MSG,{});const Zt=Mixly,te={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var n=Object.create(null),i=0;i1&&(a+=i)):n=a}else n="i";return n}},ee=te; +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class ne{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var n=t.split(","),i=0;i0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?n[s]=e.getInputTargetBlock("IF"+s).previousConnection:n[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?i[s]=e.getInputTargetBlock("DO"+s).previousConnection:i[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Jt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Jt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Jt.Msg.CONTROLS_IF_MSG_ELSE);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"IF"+s);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var n=e.getInput("STACK").connection,i=1;i<=this.elseifCount_;i++){var s=t.newBlock("controls_if_elseif");s.initSvg(),n.connect(s.previousConnection),n=s.nextConnection}if(this.elseCount_){var r=t.newBlock("controls_if_else");r.initSvg(),n.connect(r.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var n=t.getInputTargetBlock("STACK"),i=[null],s=[null],r=null;n;){switch(n.type){case"controls_if_elseif":this.elseifCount_++,i.push(n.valueConnection_),s.push(n.statementConnection_);break;case"controls_if_else":this.elseCount_++,r=n.statementConnection_;break;default:throw Error("Unknown block type: "+n.type)}n=n.nextConnection&&n.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(i,s,r)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),n=1;e;){switch(e.type){case"controls_if_elseif":var i=this.getInput("IF"+n),s=this.getInput("DO"+n);e.valueConnection_=i&&i.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,n++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],n=null;this.getInput("ELSE")&&(n=this.getInput("ELSE").connection.targetConnection);for(var i=1;this.getInput("IF"+i);){var s=this.getInput("IF"+i),r=this.getInput("DO"+i);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(r.connection.targetConnection),i++}this.updateShape_(),this.reconnectChildBlocks_(t,e,n)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Jt.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(Jt.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Jt.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,n){for(var i=1;i<=this.elseifCount_;i++)t[i]&&t[i].reconnect(this,"IF"+i),e[i]&&e[i].reconnect(this,"DO"+i);n&&n.reconnect(this,"ELSE")}},Ee={init:function(){this.setColour(me),this.appendValueInput("FROM").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.PYTHON_RANGE).appendField(Jt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Jt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},be={init:function(){this.setColour(me),this.appendValueInput("LIST").setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Jt.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Jt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Jt.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},ve={init:function(){this.setColour(me),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Jt.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Jt.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Jt.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Jt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Jt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Jt.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},we={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Jt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Jt.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Jt.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,n=[],i=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?n[s]=e.getInputTargetBlock("IF"+s).previousConnection:n[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?i[s]=e.getInputTargetBlock("DO"+s).previousConnection:i[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Jt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Jt.Msg.MIXLY_PYTHON_FINALLY);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"IF"+s);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var n=e.getInput("STACK").connection,i=1;i<=this.elseifCount_;i++){var s=t.newBlock("controls_except");s.initSvg(),n.connect(s.previousConnection),n=s.nextConnection}if(this.elseCount_){var r=t.newBlock("controls_finally");r.initSvg(),n.connect(r.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var n=t.getInputTargetBlock("STACK"),i=[null],s=[null],r=null;n;){switch(n.type){case"controls_except":this.elseifCount_++,i.push(n.valueConnection_),s.push(n.statementConnection_);break;case"controls_finally":this.elseCount_++,r=n.statementConnection_;break;default:throw Error("Unknown block type: "+n.type)}n=n.nextConnection&&n.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(i,s,r)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),n=1;e;){switch(e.type){case"controls_except":var i=this.getInput("IF"+n),s=this.getInput("DO"+n);e.valueConnection_=i&&i.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,n++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],n=null;this.getInput("ELSE")&&(n=this.getInput("ELSE").connection.targetConnection);for(var i=1;this.getInput("IF"+i);){var s=this.getInput("IF"+i),r=this.getInput("DO"+i);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(r.connection.targetConnection),i++}this.updateShape_(),this.reconnectChildBlocks_(t,e,n)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Jt.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Jt.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,n){for(var i=1;i<=this.elseifCount_;i++)t[i]&&t[i].reconnect(this,"IF"+i),e[i]&&e[i].reconnect(this,"DO"+i);n&&n.reconnect(this,"ELSE")}},Se={init:function(){this.setColour(me);var t=new Jt.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Jt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Jt.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Jt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Jt.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Jt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},xe={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Jt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Jt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Jt.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Re={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Jt.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Jt.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Jt.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};ve.OPERATORS=[[Jt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Jt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],Se.OPERATORS=[[Jt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Jt.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Oe={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Jt.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Ae={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Me={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Jt.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},Ce={init:function(){this.setColour(me),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},Ne={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Jt.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},ke={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Jt.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},De={init:function(){this.jsonInit({message0:Jt.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:me,tooltip:Jt.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Jt.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Le={init:function(){this.setColour(me),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Jt.Msg.MIXLY_STAT),this.setOutput(!0)}},Fe={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},Pe={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Jt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},$e={init:function(){this.appendDummyInput().appendField(Jt.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Jt.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Jt.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Jt.FieldDropdown([[Jt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Jt.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(me),this.setTooltip("do-while loop"),this.setHelpUrl("")}},Be={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ve={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},Ue={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},Ye={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.MIXLY_GET+Jt.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Jt.Msg.PROCEDURES_DEFRETURN_RETURN+Jt.Msg.MIXLY_GET_UNIQUE_IDEN)}},Ge={init:function(){this.setColour(me),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Jt.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},He={init:function(){this.setColour(me),this.appendDummyInput().appendField(Jt.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},We=230;Jt.FieldTextInput.math_number_validator=function(t){return String(t)},Jt.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const ze={init:function(){this.setColour(We),this.appendDummyInput().appendField(new Jt.FieldTextInput("0",Jt.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Jt.Msg.MATH_NUMBER_TOOLTIP)}},Xe={init:function(){this.setColour(We);this.appendDummyInput("").appendField(Jt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Jt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Jt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Jt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},je={init:function(){this.setColour(We);this.appendDummyInput("").appendField(Jt.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Jt.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Jt.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Jt.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},qe={init:function(){this.setColour(We),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Jt.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Jt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Jt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Jt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Jt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Jt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Jt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Jt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Ke={init:function(){this.setColour(We),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Jt.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Jt.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Jt.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Jt.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Jt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Jt.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Jt.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Jt.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Qe={init:function(){this.setColour(We),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Jt.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Je={init:function(){this.setColour(We),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Jt.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Jt.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Jt.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Jt.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Jt.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Jt.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Jt.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Jt.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Ze={init:function(){var t=[[Jt.Msg.MATH_BIN,"bin"],[Jt.Msg.MATH_OCT,"oct"],[Jt.Msg.MATH_HEX,"hex"]];this.setColour(We),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Jt.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:Jt.Msg.MATH_DEC_TOOLTIP_BIN,oct:Jt.Msg.MATH_DEC_TOOLTIP_OCT,hex:Jt.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},tn={init:function(){var t=[[Jt.Msg.LANG_MATH_TO_ROUND,"round"],[Jt.Msg.LANG_MATH_TO_CEIL,"ceil"],[Jt.Msg.LANG_MATH_TO_FLOOR,"floor"],[Jt.Msg.MATH_ABS,"fabs"],[Jt.Msg.MATH_SQRT,"sqrt"]];this.setColour(We),this.appendValueInput("A").setCheck(Number).appendField(new Jt.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Jt.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Jt.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Jt.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Jt.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Jt.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Jt.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},en={init:function(){var t=[[Jt.Msg.MIXLY_MAX,"max"],[Jt.Msg.MIXLY_MIN,"min"]];this.setColour(We),this.appendValueInput("A").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(new Jt.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Jt.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Jt.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Jt.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},nn={init:function(){var t=[[Jt.Msg.MATH_TWO,"two"],[Jt.Msg.MATH_EIGHT,"eight"],[Jt.Msg.MATH_TEN,"ten"],[Jt.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(We),this.appendDummyInput("").appendField(Jt.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Jt.FieldDropdown(t),"OP").appendField(Jt.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Jt.Msg.MATH_ZHW).appendField(new Jt.FieldDropdown(t),"OP2").appendField(Jt.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),n={two:Jt.Msg.MATH_Before_two,eight:Jt.Msg.MATH_Before_eight,ten:Jt.Msg.MATH_Before_ten,sixteen:Jt.Msg.MATH_Before_sixteen},i=e.getFieldValue("OP2"),s={two:Jt.Msg.MATH_Behind_two,eight:Jt.Msg.MATH_Behind_eight,ten:Jt.Msg.MATH_Behind_ten,sixteen:Jt.Msg.MATH_Behind_sixteen};return n[t]+s[i]}))}},sn={init:function(){var t=[[Jt.Msg.LANG_MATH_INT,"int"],[Jt.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(We),this.setOutput(!0,Number),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Jt.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Jt.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),n={int:Jt.Msg.LANG_MATH_INT,float:Jt.Msg.LANG_MATH_FLOAT_RANDOM};return Jt.Msg.MATH_RANDOM_INT_TOOLTIP+n[t]}))}},rn={init:function(){this.setColour(We),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Jt.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Jt.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Jt.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MATH_CONSTRAIN_TOOLTIP)}},an={init:function(){this.setColour(We),this.appendValueInput("NUM",Number).appendField(Jt.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Jt.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Jt.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_MATH_MAP)}},on={init:function(){this.setColour(We),this.appendDummyInput().appendField(new Jt.FieldTextInput("0",Jt.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Jt.Msg.MATH_NUMBER_TOOLTIP)}},ln={init:function(){this.setColour(We),this.appendValueInput("NUM").setCheck(Number).appendField(Jt.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},un={init:function(){this.setColour(We),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Jt.Msg.MATH_ROUND).appendField(Jt.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Jt.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MATH_ROUND_NEW_TOOLTIP)}},hn={init:function(){var t=[[Jt.Msg.MIXLY_TO_INT,"int"],[Jt.Msg.MIXLY_TO_FLOAT,"float"],[Jt.Msg.MIXLY_TO_BITES,"b"],[Jt.Msg.LANG_MATH_BYTE+Jt.Msg.MIXLY_TO_INT,"bti"]];this.setColour(We),this.appendValueInput("VAR").appendField(new Jt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Jt.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Jt.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Jt.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},pn={init:function(){var t=[[Jt.Msg.MIXLY_TO_INT,"int"],[Jt.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(We),this.appendValueInput("VAR").appendField(new Jt.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Jt.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Jt.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},cn=an,dn={init:function(){this.setColour(We),this.appendValueInput("VAR").appendField(Jt.Msg.LANG_MATH_BYTE+Jt.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Jt.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},fn={init:function(){this.setColour(We),this.itemCount_=1,this.setMutator(new Jt.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(Jt.Msg.MIXLY_PRODUCT+Jt.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(Jt.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(Jt.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(Jt.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;i1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const In={init:function(){this.setColour(_n),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Jt.FieldTextInput("",Jt.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Jt.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new Jt.FieldImage(e,7,12,'"')}},En={init:function(){this.setColour(_n),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Jt.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},bn={init:function(){this.setColour(_n),this.appendValueInput("VAR").setCheck(Number).appendField(Jt.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},vn={init:function(){this.setColour(_n),this.appendValueInput("VAR").setCheck(String).appendField(Jt.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},wn={init:function(){this.setColour(_n),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Jt.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Sn={init:function(){this.setColour(_n),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},xn={init:function(){this.WHERE_OPTIONS=[[Jt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Jt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Jt.Msg.TEXT_GET_INDEX_RANDOM+1+Jt.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Jt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(_n),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Jt.Msg.LISTS_GET_INDEX_GET,"MODE"),Jt.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Jt.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=t.getFieldValue("WHERE"),i="";switch(e+" "+n){case"GET FROM_START":case"GET FROM_END":i=Jt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":i=Jt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":i=Jt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":i=Jt.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=n&&"FROM_END"!=n||(i+=" "+Jt.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Jt.Msg.ONE_BASED_INDEXING?"#1":"#0")),i}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),n={FROM_START:Jt.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Jt.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Jt.Msg.TEXT_GET_INDEX_RANDOM};return Jt.Msg.PROCEDURES_DEFRETURN_RETURN+Jt.Msg.MIXLY_MICROBIT_TYPE_STRING+n[t]+"n"+Jt.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==Jt.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),Jt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Jt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new Jt.FieldDropdown(this.WHERE_OPTIONS,(function(e){var n="FROM_START"==e||"FROM_END"==e;if(n!=t){var i=this.sourceBlock_;return i.updateAt_(n),i.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),Jt.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Rn={init:function(){this.setHelpUrl(Jt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(_n),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Jt.Msg.LISTS_GET_INDEX_GET+" "+Jt.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Jt.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Jt.Msg.PROCEDURES_DEFRETURN_RETURN+Jt.Msg.MIXLY_MICROBIT_TYPE_STRING+Jt.Msg.LISTS_GET_INDEX_FROM_START+"n"+Jt.Msg.TEXT_CHARAT2)}},On={init:function(){this.setHelpUrl(Jt.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(_n),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Jt.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Jt.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},An={init:function(){this.WHERE_OPTIONS_1=[[Jt.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Jt.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Jt.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Jt.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Jt.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Jt.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Jt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(_n),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(Jt.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==Jt.INPUT_VALUE;t.setAttribute("at1",e);var n=this.getInput("AT2").type==Jt.INPUT_VALUE;return t.setAttribute("at2",n),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),n="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,n)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),Jt.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(Jt.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var n=new Jt.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(n){var i="FROM_START"==n||"FROM_END"==n;if(i!=e){var s=this.sourceBlock_;return s.updateAt_(t,i),s.setFieldValue(n,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(n,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Mn={init:function(){this.setHelpUrl(Jt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(_n),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Jt.Msg.LISTS_GET_INDEX_GET+" "+Jt.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Jt.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Jt.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Jt.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},Cn={init:function(){var t=[[Jt.Msg.MIXLY_EQUALS,"==="],[Jt.Msg.MIXLY_STARTSWITH,"startswith"],[Jt.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(_n),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Jt.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},Nn={init:function(){this.setColour(_n),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Jt.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_COMPARETO_HELP)}},kn={init:function(){var t=[[Jt.Msg.TEXT_UPPER,"upper"],[Jt.Msg.TEXT_TITLE,"title"],[Jt.Msg.TEXT_CAPITALIZE,"capitalize"],[Jt.Msg.TEXT_SWAPCASE,"swapcase"],[Jt.Msg.TEXT_LOWER,"lower"]];this.setColour(_n),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Jt.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:Jt.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Jt.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Jt.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Jt.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Jt.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Dn={init:function(){var t=[[Jt.Msg.TEXT_LJUST,"ljust"],[Jt.Msg.TEXT_CENTER,"center"],[Jt.Msg.TEXT_RJUST,"rjust"]];this.setColour(_n),this.appendValueInput("VAR").appendField(new Jt.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Jt.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Jt.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Jt.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Ln={init:function(){this.setColour(_n),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Jt.Msg.MIXLY_MID+Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Jt.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Jt.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Fn={init:function(){this.setColour(_n),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Jt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Jt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Jt.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Pn={init:function(){this.setColour(_n),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Jt.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Jt.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Jt.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},$n={init:function(){this.setColour(_n),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Jt.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Jt.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Jt.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},Bn={init:function(){var t=[[Jt.Msg.TEXT_TRIM_BOTH,"strip"],[Jt.Msg.TEXT_TRIM_LEFT,"lstrip"],[Jt.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(_n),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Jt.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Jt.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(Jt.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:Jt.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Jt.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Jt.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},Vn={init:function(){this.setColour(_n),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Jt.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Jt.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Jt.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;ie?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Fi={init:function(){this.setColour(Di),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Jt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Pi={init:function(){this.setColour(Di),this.appendDummyInput().appendField(Jt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},$i={init:function(){this.setColour(Di),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Jt.Msg.DICT_KEYS),this.setTooltip(Jt.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Bi={init:function(){this.setColour(Di),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Jt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Jt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Jt.Msg.DICTS_GET_TOOLTIP)}},Vi={init:function(){this.setColour(Di),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Jt.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Jt.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Jt.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Jt.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},Ui={init:function(){this.setColour(Di),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Jt.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Jt.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Yi={init:function(){this.setColour(Di),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Jt.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Jt.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.DICTS_DELETE_TOOLTIP)}},Gi={init:function(){this.setColour(Di),this.appendValueInput("DICT2").setCheck("Dict").appendField(Jt.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Jt.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_MID),this.setTooltip(Jt.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Hi={init:function(){this.setColour(Di),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Jt.Msg.DICT_CLEAR),this.setTooltip(Jt.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Wi={init:function(){this.setColour(Di),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Jt.Msg.DICT_ITEMS),this.setTooltip(Jt.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},zi={init:function(){this.setColour(Di),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Jt.Msg.DICT_VALUES),this.setTooltip(Jt.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Xi={init:function(){this.setColour(Di),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_LENGTH),this.setTooltip(Jt.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},ji={init:function(){this.setColour(Di),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Jt.Msg.DICT_DELDICT),this.setTooltip(Jt.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qi={init:function(){this.MODE=[[Jt.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Jt.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Jt.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Di),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Jt.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=Jt.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=Jt.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==Jt.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new Jt.FieldDropdown(this.MODE,(function(e){var n="INSERT"==e;if(n!=t){var i=this.sourceBlock_;return i.updateAt_(n),i.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},Ki={init:function(){this.setColour(Di),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Jt.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Jt.Msg.DICTS_ADD_VALUE),this.setTooltip(Jt.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},Qi={init:function(){this.setColour(Di),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Jt.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Jt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Ji={init:function(){this.setColour(Di),this.appendDummyInput("").appendField(new Jt.FieldLabel(Jt.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new Jt.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Jt.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;ie?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Zi={init:function(){this.setColour(Di),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Jt.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},ts={init:function(){this.setColour(Di),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_TO_JSON),this.setTooltip(Jt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},es={init:function(){this.setColour(Di),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Jt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},ns={init:function(){this.setColour(Di),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},is={init:function(){this.setColour(Di),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_TO_JSON),this.setTooltip(Jt.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},ss=210,rs={init:function(){var t=Jt.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(ss),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Jt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:Jt.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Jt.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Jt.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Jt.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Jt.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Jt.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},as={init:function(){var t=Jt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=Jt.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(ss),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Jt.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new Jt.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},os={init:function(){var t=[[Jt.Msg.LOGIC_OPERATION_AND,"AND"],[Jt.Msg.LOGIC_OPERATION_OR,"OR"],[Jt.Msg.LOGIC_OPERATION_NOR,"NOR"],[Jt.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(ss),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Jt.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:Jt.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Jt.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Jt.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Jt.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},ls={init:function(){this.setColour(ss),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Jt.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Jt.Msg.LOGIC_NEGATE_TOOLTIP)}},us={init:function(){var t=[[Jt.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Jt.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(ss),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Jt.FieldDropdown(t),"BOOL"),this.setTooltip(Jt.Msg.LOGIC_BOOLEAN_TOOLTIP)}},hs={init:function(){this.setColour(ss),this.setOutput(!0),this.appendDummyInput().appendField(Jt.Msg.LOGIC_NULL),this.setTooltip(Jt.Msg.LOGIC_NULL_TOOLTIP)}},ps={init:function(){this.setColour(ss),this.appendValueInput("A"),this.appendValueInput("B").appendField(Jt.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Jt.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},cs={init:function(){var t=[[Jt.Msg.TEXT_APPEND_TO,"in"],[Jt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(ss),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Jt.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(Jt.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Jt.Msg.IN)}},ds={init:function(){var t=[[Jt.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Jt.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(ss),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Jt.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},fs={init:function(){this.setColour(ss),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Jt.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},ms={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Jt.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},gs={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Jt.Msg.MIXLY_USE,i=Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,r=Jt.Msg.MIXLY_BELONG;return n+{r:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+r+i+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},_s={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Jt.Msg.MIXLY_USE,i=Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,r=Jt.Msg.MIXLY_BELONG,a=Jt.Msg.PY_STORAGE_FILE_OBJECT;return n+{r:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+r+i+s+a}))}},Ts={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Jt.Msg.MIXPY_TEXT_ENCODE).appendField(new Jt.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Jt.Msg.MIXLY_USE,i=Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,r=Jt.Msg.MIXLY_BELONG,a=Jt.Msg.PY_STORAGE_FILE_OBJECT;return n+{r:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+r+i+s+a}))}},ys={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Jt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Jt.Msg.MIXLY_MICROBIT_TYPE_STRING+Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},Is={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},Es={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,i=Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return n+{read:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+i}))}},bs={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Jt.Msg.MICROBIT_PYTHON_TYPE)}},vs={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Jt.Msg.HTML_FILE),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},ws={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},Ss={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},xs={init:function(){this.setColour(0),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const Rs={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Os={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},As={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Ms={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,i=Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return n+" "+{start:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+i}))}},Cs={init:function(){this.setColour(0),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Ns={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Jt.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Jt.Msg.MIXLY_ESP32_SET+{mkdir:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Jt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},ks={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Jt.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Ds={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Ls={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Jt.FieldDropdown([[Jt.Msg.HTML_FILE,"isfile"],[Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Jt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Fs={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Jt.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Jt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_SETUP+Jt.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Jt.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Ps={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Jt.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},$s={init:function(){var t=Jt.Procedures.findLegalName("",this),e=new Jt.FieldTextInput(t,Jt.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new Jt.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Jt.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Jt.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(Jt.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(Jt.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(Jt.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=Jt.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),Jt.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{Jt.Events.enable()}},mutationToDom:function(t){var e=Jt.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var n=0;n"),this.appendValueInput("style").appendField(Jt.Msg.MIXLY_AIP_ATTR).setAlign(Jt.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Nr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(Jt.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},kr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(Jt.Msg.HTML_FORM_CONTENT).appendField(new Jt.FieldDropdown([[Jt.Msg.HTML_TEXT,"text"],[Jt.Msg.HTML_EMAIL,"email"],[Jt.Msg.HTML_NUMBER,"number"],[Jt.Msg.HTML_PASSWORD,"password"],[Jt.Msg.HTML_CHECKBOX,"checkbox"],[Jt.Msg.HTML_RADIOBUTTON,"radiobutton"],[Jt.Msg.HTML_BUTTON,"button"],[Jt.Msg.HTML_COLOUR,"colour"],[Jt.Msg.HTML_DATE,"date"],[Jt.Msg.HTML_LOCALTIME,"local time"],[Jt.Msg.HTML_FILE,"file"],[Jt.Msg.HTML_HIDDEN,"hidden"],[Jt.Msg.HTML_IMAGE,"image"],[Jt.Msg.HTML_MONTH,"month"],[Jt.Msg.HTML_RANGE,"range"],[Jt.Msg.HTML_RESET,"reset"],[Jt.Msg.HTML_SEARCH,"search"],[Jt.Msg.HTML_SUBMIT,"submit"],[Jt.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Jt.Msg.HTML_TIME,"time"],[Jt.Msg.HTML_URL,"url"],[Jt.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Jt.Msg.HTML_NAME).appendField(new Jt.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Jt.Msg.HTML_VALUE).appendField(new Jt.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Jt.Msg.MIXLY_AIP_ATTR).setAlign(Jt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Dr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(new Jt.FieldTextInput("property"),"KEY").appendField(":").appendField(new Jt.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Lr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(new Jt.FieldTextInput("property"),"KEY").appendField(":").appendField(new Jt.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fr={init:function(){this.setColour(xr),this.appendDummyInput().appendField(Jt.Msg.HTML_TEXT).appendField(new Jt.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pr=160,$r={init:function(){this.setColour(Pr),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Jt.FieldTable(""),"TEXT")}},Br={init:function(){this.setColour(Pr),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Jt.FieldMultilineInput(""),"TEXT")}},Vr={init:function(){this.setColour(Pr),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Jt.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Ur={init:function(){this.setColour(Pr),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Yr={init:function(){this.setColour(Pr),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Jt.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Gr={init:function(){this.setColour(Pr),this.appendValueInput("VALUE").appendField(Jt.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Hr={init:function(){this.setColour(Pr),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Jt.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Jt.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=Jt.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;i= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,n){return"("+t+" <= "+e+") and "+l()+"("+t+", "+e+", "+n+") or "+u()+"("+t+", "+e+", "+n+")"},Jt.isNumber(i)&&Jt.isNumber(s)&&Jt.isNumber(r))i=parseFloat(i),s=parseFloat(s),r=Math.abs(parseFloat(r)),0==i%1&&0==s%1&&0==r%1?(i<=s?(s++,t=0==i&&1==r?s:i+", "+s,1!=r&&(t+=", "+r)):t=i+", "+--s+", -"+r,t="range("+t+")"):(t=i",GTE:">="};const Bl=function(t,e){var n=this.getFieldValue("OP"),i="&&"==n?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",i)||"False",r=e.valueToCode(this,"B",i)||"False";if("AND"==n)var a=s+" and "+r;else if("OR"==n)a=s+" or "+r;else if("NOR"==n)a="not("+s+"^"+r+")";else a=s+"^"+r;return[a,i]},Vl=function(t,e){var n=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",n)||"False"),n]},Ul=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Yl=function(t,e){return["None",e.ORDER_ATOMIC]},Gl=function(t,e){var n=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+n+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},Hl=function(t,e){var n=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",i=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[n+" "+this.getFieldValue("BOOL")+" "+i,e.ORDER_ATOMIC]},Wl=function(t,e){var n=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",i=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[n+" "+this.getFieldValue("BOOL")+" "+i,e.ORDER_ATOMIC]},zl=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Xl=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},jl=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},ql=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Kl=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Ql=function(t,e){var n=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+n+")\n"},Jl=function(t,e){var n=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+n+"()",e.ORDER_ATOMIC]},Zl=function(t,e){var n=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+n+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},tu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},eu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},nu=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},iu=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},su=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},ru=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},au=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},ou=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},lu=function(t,e){var n=this.getFieldValue("MODE"),i=0;return i="start"==n?0:"current"==n?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+i+")\n"},uu=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},hu=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},pu=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},cu=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},du=function(t,e){e.definitions_.import_os="import os";var n=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+n+")",e.ORDER_ATOMIC]},fu=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},mu=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},gu=function(t,e){var n=e.variableDB_.getName(this.getFieldValue("NAME"),Jt.Procedures.NAME_TYPE),i=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(i=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+i);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var r=[],a=0;a\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},Qu=function(t,e){var n=e.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");return"\n"+n+"\n"},Ju=function(t,e){var n=e.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");if("head"==i)var s="<"+i+'>\n\t\n'+n+"\n";else s="<"+i+">\n"+n+"\n";return s},Zu=function(t,e){var n=e.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");return"<"+i+">\n"+n+"\n"},th=function(t,e){var n=e.statementToCode(this,"DO"),i=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+i+" >\n"+n+"\n"},eh=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},nh=function(t,e){return'"},ih=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},sh=function(){return this.getFieldValue("TEXT")+"\n"},rh=function(t){return t.getFieldValue("TEXT")+"\n"},ah=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},oh=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},lh=function(){return""},uh=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},hh=function(t,e){for(var n=t.getFieldValue("NAME"),i=t.hasReturn_,s=new Array(t.itemCount_),r=0;r0?e.join("\n")+n.join("\n")+i.join("\n")+a.join("\n")+o.join("")+t+"while True:\n"+l.join("")+u.join("\n"):e.join("\n")+n.join("\n")+i.join("\n")+a.join("\n")+o.join("")+t+u.join("\n")},fh.scrubNakedValue=function(t){return t+"\n"},fh.quote_=function(t){var e="'";return-1!==t.indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},fh.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},fh.scrub_=function(t,e,n){var i="";if(!t.outputConnection||!t.outputConnection.targetConnection){(r=t.getCommentText())&&(r=Jt.utils.string.wrap(r,fh.COMMENT_WRAP-3),i+=fh.prefixLines(r+"\n","# "));for(var s=0;s0?"int("+o+" + "+s+")":s<0?"int("+o+" - "+-s+")":"int("+o+")",i&&(o="-"+o)),o};const mh=205,gh={init:function(){this.setColour(mh),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_CHOOSE_AND_GET).appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_CHOOSE_AND_GET_ONE_FILE_NAME,"getOneFile"],[Jt.Msg.MIXLY_CHOOSE_AND_GET_MANY_FILE_NAMES,"getManyFiles"],[Jt.Msg.MIXLY_CHOOSE_AND_GET_DIR,"getDirectory"]]),"TYPE"),this.setInputsInline(!0),this.setOutput(!0)}},_h={init:function(){this.setColour(mh),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_SETUP).appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_AipImageClassify,"AipImageClassify"],[Jt.Msg.MIXLY_AipSpeech,"AipSpeech"],[Jt.Msg.MIXLY_AipImageCensor,"AipImageCensor"],[Jt.Msg.MIXLY_AipFace,"AipFace"],[Jt.Msg.MIXLY_AipOcr,"AipOcr"],[Jt.Msg.MIXLY_AipNlp,"AipNlp"]]),"CTYPE"),this.appendValueInput("SUB").appendField(Jt.Msg.MIXLY_Client).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("API_KEY").appendField("API_KEY").setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("SECRET_KEY").appendField("SECRET_KEY").setAlign(Jt.inputs.Align.RIGHT),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Th={init:function(){this.setColour(mh),this.appendValueInput("SUB").appendField(Jt.Msg.MIXLY_AipSpeech_synthesis).appendField(Jt.Msg.MIXLY_Client).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("STR").appendField(Jt.Msg.OLED_STRING).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(Jt.Msg.MIXLY_AIP_ATTR).setAlign(Jt.inputs.Align.RIGHT),this.setTooltip(Jt.Msg.MIXLY_AipSpeech_synthesis_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},yh={init:function(){this.setColour(mh),this.appendValueInput("SUB").appendField(Jt.Msg.MIXLY_AipSpeech_asr).appendField(Jt.Msg.MIXLY_Client).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("FILE").appendField(Jt.Msg.MIXLY_AipSpeech_File).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(Jt.Msg.MIXLY_AIP_ATTR).setAlign(Jt.inputs.Align.RIGHT),this.setTooltip(Jt.Msg.MIXLY_AipSpeech_ASR_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},Ih={init:function(){this.setColour(mh),this.appendValueInput("SUB").appendField(Jt.Msg.MIXLY_AipImageClassify).appendField(Jt.Msg.MIXLY_Client).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(Jt.Msg.MIXLY_AIP_FUNC).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("ADDR").appendField(Jt.Msg.MIXLY_AipImageClassify_Image).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(Jt.Msg.MIXLY_AIP_ATTR).setAlign(Jt.inputs.Align.RIGHT),this.setTooltip(Jt.Msg.MIXLY_AipImageClassify_advancedGeneral_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},Eh={init:function(){this.setColour(mh),this.appendDummyInput("").appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_AipImageClassify_advancedGeneral,"advancedGeneral"],[Jt.Msg.MIXLY_AipImageClassify_dishDetect,"dishDetect"],[Jt.Msg.MIXLY_AipImageClassify_carDetect,"carDetect"],[Jt.Msg.MIXLY_AipImageClassify_animalDetect,"animalDetect"],[Jt.Msg.MIXLY_AipImageClassify_plantDetect,"plantDetect"],[Jt.Msg.MIXLY_AipImageClassify_logoSearch,"logoSearch"]]),"TYPE"),this.setOutput(!0)}},bh={init:function(){this.setColour(mh),this.appendValueInput("SUB").appendField(Jt.Msg.MIXLY_AipFace_match).appendField(Jt.Msg.MIXLY_Client).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_AipImageClassify_Image+"1"+Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("VAR2").appendField(Jt.Msg.MIXLY_AipImageClassify_Image+"2"+Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(Jt.Msg.MIXLY_AIP_ATTR).setAlign(Jt.inputs.Align.RIGHT),this.setTooltip(Jt.Msg.MIXLY_AipFace_match_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},vh={init:function(){this.setColour(mh),this.appendValueInput("SUB").appendField(Jt.Msg.MIXLY_AipOcr).appendField(Jt.Msg.MIXLY_Client).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(Jt.Msg.MIXLY_AIP_FUNC).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("ADDR").appendField(Jt.Msg.MIXLY_AipImageClassify_Image).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(Jt.Msg.MIXLY_AIP_ATTR).setAlign(Jt.inputs.Align.RIGHT),this.setTooltip(Jt.Msg.MIXLY_AipOcr_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},wh={init:function(){this.setColour(mh),this.appendDummyInput("").appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_AipOcr_basicGeneral,"basicGeneral"],[Jt.Msg.MIXLY_AipOcr_webImage,"webImage"],[Jt.Msg.MIXLY_AipOcr_idcard,"idcard"],[Jt.Msg.MIXLY_AipOcr_bankcard,"bankcard"],[Jt.Msg.MIXLY_AipOcr_drivingLicense,"drivingLicense"],[Jt.Msg.MIXLY_AipOcr_vehicleLicense,"vehicleLicense"],[Jt.Msg.MIXLY_AipOcr_licensePlate,"licensePlate"],[Jt.Msg.MIXLY_AipOcr_businessLicense,"businessLicense"],[Jt.Msg.MIXLY_AipOcr_receipt,"receipt"],[Jt.Msg.MIXLY_AipOcr_trainTicket,"trainTicket"],[Jt.Msg.MIXLY_AipOcr_taxiReceipt,"taxiReceipt"],[Jt.Msg.MIXLY_AipOcr_form,"tableRecognition"],[Jt.Msg.MIXLY_AipOcr_vatInvoice,"vatInvoice"],[Jt.Msg.MIXLY_AipOcr_passport,"passport"],[Jt.Msg.MIXLY_AipOcr_handwriting,"handwriting"]]),"TYPE"),this.setOutput(!0)}},Sh={init:function(){this.setColour(mh),this.appendValueInput("SUB").appendField(Jt.Msg.MIXLY_AipNlp).appendField(Jt.Msg.MIXLY_Client).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(Jt.Msg.MIXLY_AIP_FUNC).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("STR").appendField(Jt.Msg.OLED_STRING).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(Jt.Msg.MIXLY_AIP_ATTR).setAlign(Jt.inputs.Align.RIGHT),this.setTooltip(Jt.Msg.MIXLY_AipNlp_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},xh={init:function(){this.setColour(mh),this.appendValueInput("SUB").appendField(Jt.Msg.MIXLY_AipNlp_Sim).appendField(Jt.Msg.MIXLY_Client).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("FUNC").appendField(Jt.Msg.MIXLY_AIP_FUNC).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("STR1").appendField(Jt.Msg.OLED_STRING+"1").setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("STR2").appendField(Jt.Msg.OLED_STRING+"2").setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(Jt.Msg.MIXLY_AIP_ATTR).setAlign(Jt.inputs.Align.RIGHT),this.setTooltip(Jt.Msg.MIXLY_AipNlp_Sim_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},Rh={init:function(){this.setColour(mh),this.appendDummyInput("").appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_AipNlp_lexer,"lexer"],[Jt.Msg.MIXLY_AipNlp_depParser,"depParser"],[Jt.Msg.MIXLY_AipNlp_wordEmbedding,"wordEmbedding"],[Jt.Msg.MIXLY_AipNlp_dnnlm,"dnnlm"],[Jt.Msg.MIXLY_AipNlp_commentTag,"commentTag"],[Jt.Msg.MIXLY_AipNlp_sentimentClassify,"sentimentClassify"],[Jt.Msg.MIXLY_AipNlp_keyword,"keyword"],[Jt.Msg.MIXLY_AipNlp_topic,"topic"],[Jt.Msg.MIXLY_AipNlp_ecnet,"ecnet"],[Jt.Msg.MIXLY_AipNlp_emotion,"emotion"]]),"TYPE"),this.setOutput(!0)}},Oh={init:function(){this.setColour(mh),this.appendDummyInput("").appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_AipNlp_wordSimEmbedding,"wordSimEmbedding"],[Jt.Msg.MIXLY_AipNlp_simnet,"simnet"]]),"TYPE"),this.setOutput(!0)}},Ah={init:function(){this.setColour(mh),this.appendValueInput("SUB").appendField(Jt.Msg.MIXLY_AipNlp_topic).appendField(Jt.Msg.MIXLY_Client).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("STR1").appendField(Jt.Msg.MIXLY_AipNlp_Topic_Title).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("STR2").appendField(Jt.Msg.MIXLY_AipNlp_Topic_Content).setAlign(Jt.inputs.Align.RIGHT),this.setTooltip(Jt.Msg.MIXLY_AipNlp_Topic_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},Mh={init:function(){this.setColour(mh),this.appendValueInput("SUB").appendField(Jt.Msg.MIXLY_AipNlp_summary).appendField(Jt.Msg.MIXLY_Client).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("STR").appendField(Jt.Msg.MIXLY_AipNlp_Topic_Content).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("LEN").appendField(Jt.Msg.MIXLY_LIST_LEN).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("ATTR").appendField(Jt.Msg.MIXLY_AIP_ATTR).setAlign(Jt.inputs.Align.RIGHT),this.setTooltip(Jt.Msg.MIXLY_AipNlp_Summary_TOOLTIP),this.setInputsInline(!1),this.setOutput(!0)}},Ch={init:function(){this.setColour(mh),this.appendValueInput("VAR").appendField(Jt.Msg.MIXPY_AI_AUDIO),this.appendValueInput("TIME").appendField(Jt.Msg.MIXPY_AI_AUDIO_TIME),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXPY_AI_AUDIO_TOOLTIP)}},Nh={init:function(){this.setColour(mh),this.appendValueInput("VAR").appendField(Jt.Msg.MIXPY_AI_PHOTO),this.appendValueInput("BUT").appendField(Jt.Msg.MIXPY_AI_PHOTO_BUTTON),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXPY_AI_PHOTO_TOOLTIP)}},kh={init:function(){this.setColour(mh),this.appendValueInput("AI").appendField(Jt.Msg.MIXPY_AI_RESULT).appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_AipImageClassify,"Image"],[Jt.Msg.MIXLY_AipSpeech_asr,"Speech"],[Jt.Msg.MIXLY_AipFace_match,"Face"],[Jt.Msg.MIXLY_AipOcr,"Ocr"],[Jt.Msg.MIXLY_AipNlp_simnet,"OcrSimilarity"],[Jt.Msg.MIXLY_AipNlp_sentimentClassify,"Emotion"]]),"CTYPE"),this.setOutput(!0),this.setTooltip(Jt.Msg.LOGIC_NEGATE_TOOLTIP)}},Dh="#526FC3",Lh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Fh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_ADD_SCHOOL),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Ph={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_FIND_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},$h={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_NEW_PATH),this.setOutput(!0)}},Bh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_SET_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Vh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_ADD_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Uh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_DEL_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Yh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_RETURN_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Gh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_NO_LEFT),this.setOutput(!0)}},Hh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Wh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},zh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_CURRENT_SCHOOL),this.setOutput(!0)}},Xh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_NO_PATH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},jh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE_2_1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},qh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_PREPARE_2_2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Kh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_MOVE_RECENT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Qh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_NOT_HOME),this.setOutput(!0)}},Jh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_NOT_SCHOOL),this.setOutput(!0)}},Zh={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_PATH2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},tp={init:function(){this.appendDummyInput().appendField("准备").appendField(new Jt.FieldNumber(3,0,100,1),"NUM").appendField("层汉诺塔"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},ep={init:function(){this.appendDummyInput().appendField("移动圆盘从"),this.appendValueInput("FROM_NUM").setCheck(null).appendField("柱"),this.appendDummyInput().appendField("到"),this.appendValueInput("TO_NUM").setCheck(null).appendField("柱"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},np={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_ALL_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},ip={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_ALL_BOOKS2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},sp={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_FIRST_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},rp={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_NO_RING),this.setOutput(!0)}},ap={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_YES_RING),this.setOutput(!0)}},op={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_NEXT_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},lp={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_TWO_LEFT),this.setOutput(!0)}},up={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_DIVIDE_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},hp={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_GET_HALF_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},pp={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_DELETE_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},cp={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_DELETE_BOOKS),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},dp={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_DELETE_BOOKS2),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},fp={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_BOOK),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},mp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("设置待查书总数 N=").appendField(new Jt.FieldDropdown([["5","5"],["10","10"],["20","20"],["50","50"]]),"NUM"),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},gp={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_NUMBER_ZERO),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},_p={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_NUMBER_ADD),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Tp={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_NUMBER),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},yp={init:function(){this.setColour(Dh),this.appendDummyInput().appendField("n"+Jt.Msg.MIXLY_VALUE2).appendField(new Jt.FieldTextInput("50"),"NUM"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Ip={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_SEQUENCE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Ep={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_PRINT_DIVIDE),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},bp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("初始化鸡兔同笼问题:"),this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("有若干只鸡、兔在同一个笼子里。"),this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("从上面数鸡兔有10个头,"),this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("从下面数鸡兔有32只脚。"),this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("问笼中有多少只鸡和多少只兔?"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},vp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("假设兔子的数量为0只"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},wp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("兔子的数量在范围之内"),this.setOutput(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},Sp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("根据(头数-兔子数)计算出鸡的数量"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},xp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("计算得到脚的数量正确"),this.setOutput(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},Rp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("输出鸡、兔的数量"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},Op={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("假设兔子数量要更多一只"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},Ap={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("加载路线图"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},Mp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("计算").appendField(new Jt.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME").appendField("长度"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},Cp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("设置S1为Smin"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},Np={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField(new Jt.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME").appendField("的长度比").appendField(new Jt.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME2").appendField("短"),this.setOutput(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},kp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("设置").appendField(new Jt.FieldDropdown([["S1","1"],["S2","2"],["S3","3"],["S4","4"]]),"PATHNAME").appendField("为Smin"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},Dp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("按照Smin移动"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},Lp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("初始化韩信点兵问题:"),this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("有未知数量的若干士兵。"),this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("若3人一排列队,多1人;"),this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("若5人一排列队,多2人;"),this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("若7人一排列队,多2人;"),this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("问士兵的数量最少是多少人?"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},Fp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("初始化士兵为").appendField(new Jt.FieldTextInput("7"),"NUM").appendField("个"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},Pp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("使士兵").appendField(new Jt.FieldDropdown([["3","3"],["5","5"],["7","7"]]),"NUM").appendField("人一排列队"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},$p={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("剩余").appendField(new Jt.FieldTextInput("1"),"NUM").appendField("个士兵"),this.setOutput(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},Bp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("增加1个士兵"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},Vp={init:function(){this.appendDummyInput().setAlign(Jt.inputs.Align.LEFT).appendField("输出士兵数量"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setTooltip(""),this.setHelpUrl("")}},Up={init:function(){this.appendDummyInput().appendField("准备").appendField(new Jt.FieldNumber(3,0,100,1),"NUM").appendField("层汉诺塔"),this.appendValueInput("VAR").setCheck(String).appendField(Jt.Msg.HTML_COLOUR),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(Dh),this.setInputsInline(!0),this.setTooltip(""),this.setHelpUrl("")}},Yp={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_GET_CURRENT_LOCATION),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Gp={init:function(){this.setColour(Dh),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MIXPY_ALGORITHM_VOID_PATH),this.setOutput(!0)}},Hp={init:function(){this.setColour(Dh),this.appendDummyInput("").setAlign(Jt.inputs.Align.RIGHT).appendField(new Jt.FieldColour("ff0000"),"COLOR"),this.setInputsInline(!0),this.setOutput(!0,String)}},Wp="#3288dd",zp={init:function(){this.setColour(Wp),this.appendValueInput("DOMAIN").appendField(Jt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Jt.Msg.blockpy_REQUESTS_GET).appendField(new Jt.FieldTextInput("response"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.blockpy_REQUESTS_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Xp={init:function(){this.setColour(Wp),this.appendValueInput("URL").appendField(Jt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Jt.Msg.blockpy_CONDUCT).appendField(new Jt.FieldDropdown([["get","get"],["head","head"],["delete","delete"]]),"TYPE").appendField(Jt.Msg.blockpy_REQUESTS).appendField(Jt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},jp={init:function(){this.setColour(Wp),this.appendValueInput("URL").appendField(Jt.Msg.DISPLAY_IMAGE_LET2).setCheck(String),this.appendDummyInput("").appendField(Jt.Msg.blockpy_CONDUCT).appendField(new Jt.FieldDropdown([["post","post"],["put","put"],["patch","patch"]]),"TYPE").appendField(Jt.Msg.blockpy_REQUESTS),this.appendValueInput("data").appendField(Jt.Msg.blockpy_REQUESTS+Jt.Msg.OLED_STRING),this.appendDummyInput("").appendField(Jt.Msg.MIXPY_REQUESTS_GET_RESULT),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("")}},qp={init:function(){this.appendValueInput("VAL");var t=[[Jt.Msg.blockpy_REQUESTS_GET_ATTR_STATUS_CODE,"status_code"],[Jt.Msg.blockpy_REQUESTS_GET_ATTR_TEXT,"text"],[Jt.Msg.blockpy_REQUESTS_GET_ATTR_COOKIES,"cookies"],[Jt.Msg.blockpy_REQUESTS_GET_ATTR_CONTENT,"content"],[Jt.Msg.MIXPY_TEXT_ENCODE,"encoding"]];this.setColour(Wp),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_MICROBIT_JS_GET).appendField(new Jt.FieldDropdown(t),"ATTR"),this.setInputsInline(!0),this.setOutput(!0,String)}},Kp={init:function(){this.appendValueInput("VAR").appendField(Jt.Msg.DISPLAY_IMAGE_LET2).setCheck(String);this.setColour(Wp),this.appendDummyInput("").appendField(Jt.Msg.blockpy_CONDUCT).appendField(new Jt.FieldDropdown([["post","post"],["put","put"],["delete","delete"],["head","head"],["option","option"]]),"DIR"),this.appendDummyInput("").appendField(Jt.Msg.blockpy_REQUESTS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{forward:Jt.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:Jt.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[e]}))}},Qp="f0a559",Jp={init:function(){this.setColour(Qp),this.appendValueInput("FILE").setCheck(String).appendField(Jt.Msg.MIXLY_CV_IMREAD),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},Zp={init:function(){this.setColour(Qp),this.appendValueInput("FILE").appendField(Jt.Msg.OLED_BITMAP),this.appendValueInput("data").setCheck(String).appendField(Jt.Msg.MIXLY_AipNlp_Topic_Title),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},tc={init:function(){this.setColour(Qp),this.appendValueInput("FILE").appendField(Jt.Msg.MIXLY_CV_IMWRITE),this.appendValueInput("data").setCheck(String).appendField(Jt.Msg.HTML_NAME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ec={init:function(){this.setColour(Qp),this.appendValueInput("data").setCheck(Number).appendField(Jt.Msg.MIXLY_DELAY),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MILLIS+Jt.Msg.MIXLY_CV_OR_PRESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_CV_WAITKEY_TOOLTIP)}},nc={init:function(){this.setColour(Qp),this.appendDummyInput().appendField(Jt.Msg.MIXLY_CV_DESTROY_ALL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ic={init:function(){this.setColour(Qp),this.appendValueInput("FILE").appendField(Jt.Msg.MIXLY_MICROBIT_IMAGE);var t=[[Jt.Msg.MIXLY_CV_RECT,"rectangle"],[Jt.Msg.MIXLY_CV_LINE,"line"]];this.appendValueInput("x1").setCheck(Number).appendField(Jt.Msg.MIXLY_DISPLAY_DRAW).appendField(new Jt.FieldDropdown(t),"DIR").appendField(Jt.Msg.MIXLY_CV_DRAWLINE_BEGIN+"(x1"),this.appendValueInput("y1").setCheck(Number).appendField(",y1"),this.appendValueInput("x2").setCheck(Number).appendField(") "+Jt.Msg.MIXLY_CV_DRAWLINE_END+"(x2"),this.appendValueInput("y2").setCheck(Number).appendField(",y2"),this.appendDummyInput().appendField(") "+Jt.Msg.MIXLY_CV_DRAWLINE_COLOR).appendField(new Jt.FieldColour("#ff0000"),"FIELDNAME"),this.appendValueInput("thick").setCheck(Number).appendField(Jt.Msg.MIXLY_CV_DRAWLINE_THICKNESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_CV_DRAWLINE_RECT_TOOLTIP)}},sc={init:function(){this.setColour(Qp),this.appendValueInput("FILE").appendField(Jt.Msg.MIXLY_MICROBIT_IMAGE);this.appendValueInput("data").setCheck(String).appendField(Jt.Msg.MIXLY_CV_DRAWTEXT),this.appendValueInput("x1").setCheck(Number).appendField(Jt.Msg.MIXLY_CV_DRAWLINE_BEGIN+"(x1"),this.appendValueInput("y1").setCheck(Number).appendField(",y1"),this.appendDummyInput().appendField(") "+Jt.Msg.MIXLY_TURTLE_WRITE_FONT_NAME).appendField(new Jt.FieldDropdown([["SIMPLEX","SIMPLEX"],["PLAIN","PLAIN"],["DUPLEX","DUPLEX"],["COMPLEX","COMPLEX"],["COMPLEX_SMALL","COMPLEX_SMALL"],["TRIPLEX","TRIPLEX"],["SCRIPT_SIMPLEX","SCRIPT_SIMPLEX"],["SCRIPT_COMPLEX","SCRIPT_COMPLEX"]]),"font"),this.appendValueInput("size").setCheck(Number).appendField(Jt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendDummyInput().appendField(") "+Jt.Msg.MIXLY_CV_DRAWLINE_COLOR).appendField(new Jt.FieldColour("#ff0000"),"FIELDNAME"),this.appendValueInput("thick").setCheck(Number).appendField(Jt.Msg.MIXLY_CV_DRAWLINE_THICKNESS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_CV_DRAWLINE_RECT_TOOLTIP)}},rc={init:function(){this.setColour(Qp),this.appendValueInput("FILE").setCheck(String).appendField(Jt.Msg.MIXLY_CV_FACE_CLASSIFIER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},ac={init:function(){this.setColour(Qp),this.appendValueInput("FILE").appendField(Jt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("FACE").appendField(Jt.Msg.MIXLY_CV_FACE_DETECT),this.appendValueInput("SCALE").setCheck(Number).appendField(Jt.Msg.MIXLY_CV_FACE_DETECT_SCALE),this.appendValueInput("NEIGHBOR").setCheck(Number).appendField(Jt.Msg.MIXLY_CV_FACE_DETECT_NEIGHBOR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},oc={init:function(){this.setColour(Qp),this.appendValueInput("FILE").appendField(Jt.Msg.MIXLY_MICROBIT_IMAGE),this.appendValueInput("FACE").appendField(Jt.Msg.MIXLY_CV_FACE_DETECT),this.appendValueInput("SCALE").setCheck(Number).appendField(Jt.Msg.MIXLY_CV_FACE_DETECT_SCALE),this.appendValueInput("NEIGHBOR").setCheck(Number).appendField(Jt.Msg.MIXLY_CV_FACE_DETECT_NEIGHBOR),this.appendValueInput("x1").setCheck(Number).appendField(Jt.Msg.MIXLY_CV_FACE_DETECT_RANGE).appendField(Jt.Msg.blockpy_TUPLE_MIN),this.appendValueInput("y1").setCheck(Number).appendField("×"),this.appendValueInput("x2").setCheck(Number).appendField(Jt.Msg.blockpy_TUPLE_MAX),this.appendValueInput("y2").setCheck(Number).appendField("×"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)}},lc=170,uc={init:function(){this.setColour(lc),this.appendDummyInput("").appendField(Jt.Msg.blockpy_series_create).appendField(new Jt.FieldTextInput("ser1"),"VAR"),this.appendValueInput("SER").appendField(Jt.Msg.blockpy_series_via),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.blockpy_series_create_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},hc={init:function(){this.setColour(lc),this.appendDummyInput("").appendField(Jt.Msg.blockpy_series_create).appendField(new Jt.FieldTextInput("ser1"),"VAR"),this.appendValueInput("SER").appendField(Jt.Msg.blockpy_series_via),this.appendValueInput("INDEX").setCheck([String,"List"]).appendField(Jt.Msg.blockpy_series_set_index),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.blockpy_series_create_index_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},pc={init:function(){this.setColour(lc),this.appendDummyInput("").appendField(Jt.Msg.blockpy_dataframe_create).appendField(new Jt.FieldTextInput("df1"),"VAR"),this.appendValueInput("SER").appendField(Jt.Msg.blockpy_series_via),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.blockpy_dataframe_create_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},cc={init:function(){this.setColour(lc);var t=[[Jt.Msg.DATAFRAME_RAW,"index"],[Jt.Msg.DATAFRAME_COLUMN,"columns"]];this.appendDummyInput("").appendField(Jt.Msg.blockpy_dataframe_create).appendField(new Jt.FieldTextInput("df1"),"VAR"),this.appendValueInput("SER").appendField(Jt.Msg.blockpy_series_via),this.appendDummyInput("").appendField(new Jt.FieldDropdown(t),"COLUMN_RAW"),this.appendValueInput("INDEX").setCheck([String,"List"]).appendField(Jt.Msg.blockpy_series_set_index),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.blockpy_dataframe_create_index_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},dc={init:function(){this.setColour(lc),this.appendDummyInput("").appendField(Jt.Msg.blockpy_dataframe_create).appendField(new Jt.FieldTextInput("df1"),"VAR"),this.appendValueInput("SER").appendField(Jt.Msg.blockpy_series_via),this.appendValueInput("INDEX_COLUMN").setCheck([String,"List"]).appendField(Jt.Msg.blockpy_dataframe_set_index_column),this.appendValueInput("INDEX_RAW").setCheck([String,"List"]).appendField(Jt.Msg.blockpy_dataframe_set_index_raw),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.blockpy_dataframe_create_index_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},fc={init:function(){this.setColour(lc),this.appendDummyInput("").appendField(new Jt.FieldTextInput("ser1"),"VAR").appendField(" = [").appendField(new Jt.FieldTextInput("1,2,3"),"TEXT").appendField("]"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_SERIES_CREATE_FROM_TEXT)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},mc={init:function(){this.setColour(lc);var t=[[Jt.Msg.SERIES_INDEX,"index"],[Jt.Msg.HTML_VALUE,"value"]];this.appendValueInput("SERIES").setCheck("Series"),this.appendDummyInput("").appendField(Jt.Msg.SERIES_INDEX_VALUE).appendField(new Jt.FieldDropdown(t),"INDEX_VALUE"),this.setOutput(!0,"List");var e=this;this.setTooltip((function(){var t=e.getFieldValue("INDEX_VALUE");return{index:Jt.Msg.SERIES_INDEX_TOOLTIP,value:Jt.Msg.HTML_VALUE_TOOLTIP}[t]}))}},gc={init:function(){this.setColour(lc),this.setOutput(!0),this.appendValueInput("SER").setCheck("Series"),this.appendValueInput("AT").setCheck(Number).appendField(Jt.Msg.LANG_LISTS_GET_INDEX1),this.appendDummyInput("").appendField(Jt.Msg.LANG_LISTS_GET_INDEX2),this.setInputsInline(!0),this.setTooltip(Jt.Msg.TUPLE_GET_INDEX_TOOLTIP)}},_c={init:function(){this.setColour(lc),this.appendValueInput("SER").setCheck("Series").appendField(Jt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(Jt.Msg.blockpy_PYLAB_PLOT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tc={init:function(){this.setColour(lc);var t=[[Jt.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[Jt.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[Jt.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[Jt.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[Jt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[Jt.Msg.COLOUR_RGB_BLUE,"b"],[Jt.Msg.COLOUR_RGB_GREEN,"g"],[Jt.Msg.COLOUR_RGB_RED,"r"],[Jt.Msg.COLOUR_CYAN,"c"],[Jt.Msg.COLOUR_MAGENTA,"m"],[Jt.Msg.COLOUR_YELLOW,"y"],[Jt.Msg.COLOUR_BLACK,"k"],[Jt.Msg.COLOUR_WHITE,"w"]],n=[[Jt.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("SER").setCheck("Series").appendField(Jt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(Jt.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(Jt.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Jt.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(Jt.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new Jt.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(Jt.Msg.HTML_COLOUR).appendField(new Jt.FieldDropdown(e),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yc={init:function(){this.setColour(lc),this.appendDummyInput().appendField(Jt.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ic={init:function(){this.setColour(lc),this.appendDummyInput().appendField(Jt.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ec={init:function(){this.setColour(lc),this.appendDummyInput().appendField(Jt.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bc={init:function(){this.setColour(lc),this.appendDummyInput().appendField(Jt.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vc={init:function(){this.setColour(lc);var t=[[Jt.Msg.PYLAB_LABEL_X,"x"],[Jt.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(Jt.Msg.blockpy_PYLAB_SET_LABEL).appendField(new Jt.FieldDropdown(t),"DIR"),this.appendValueInput("LABEL").appendField(Jt.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wc={init:function(){this.setColour(lc),this.appendValueInput("FROM").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MIXLY_SPLITBYDOU).appendField(Jt.Msg.MIXPY_DATA_ARRAY_CREATE_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MIXPY_DATA_ARRAY_CREATE_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MIXLY_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Jt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Sc={init:function(){this.setColour(lc);var t=[[Jt.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[Jt.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(Jt.Msg.MIXLY_DISPLAY_DRAW).appendField(new Jt.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(Jt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Jt.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{plot:Jt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:Jt.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[t]}))}},xc={init:function(){this.setColour(lc);var t=[[Jt.Msg.COLOUR_RGB_BLUE,"b"],[Jt.Msg.COLOUR_RGB_GREEN,"g"],[Jt.Msg.COLOUR_RGB_RED,"r"],[Jt.Msg.COLOUR_CYAN,"c"],[Jt.Msg.COLOUR_MAGENTA,"m"],[Jt.Msg.COLOUR_YELLOW,"y"],[Jt.Msg.COLOUR_BLACK,"k"],[Jt.Msg.COLOUR_WHITE,"w"]],e=[[Jt.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(Jt.Msg.mixpy_PYLAB_SCATTER).appendField(Jt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Jt.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(Jt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(Jt.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Jt.FieldDropdown(e),"DOT"),this.appendDummyInput("").appendField(Jt.Msg.HTML_COLOUR).appendField(new Jt.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Jt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},Rc={init:function(){this.setColour(lc);var t=[[Jt.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[Jt.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[Jt.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[Jt.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[Jt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[Jt.Msg.COLOUR_RGB_BLUE,"b"],[Jt.Msg.COLOUR_RGB_GREEN,"g"],[Jt.Msg.COLOUR_RGB_RED,"r"],[Jt.Msg.COLOUR_CYAN,"c"],[Jt.Msg.COLOUR_MAGENTA,"m"],[Jt.Msg.COLOUR_YELLOW,"y"],[Jt.Msg.COLOUR_BLACK,"k"],[Jt.Msg.COLOUR_WHITE,"w"]],n=[[Jt.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(Jt.Msg.mixpy_PYLAB_PLOT_XY).appendField(Jt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Jt.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(Jt.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Jt.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(Jt.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new Jt.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(Jt.Msg.HTML_COLOUR).appendField(new Jt.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Jt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Oc={init:function(){this.setColour(lc);var t=[[Jt.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[Jt.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(Jt.Msg.mixpy_PYLAB_BAR).appendField(Jt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Jt.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(Jt.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(Jt.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new Jt.FieldDropdown(t),"ALIGN"),this.appendDummyInput().appendField(Jt.Msg.HTML_COLOUR).appendField(new Jt.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Jt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Ac={init:function(){this.setColour(lc);var t=[[Jt.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[Jt.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],e=[[Jt.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[Jt.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[Jt.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[Jt.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(Jt.Msg.mixpy_PYLAB_PIE).appendField(Jt.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(Jt.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(Jt.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(Jt.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new Jt.FieldDropdown(e),"autopct"),this.appendDummyInput("").appendField(Jt.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new Jt.FieldDropdown(t),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Mc={init:function(){this.setColour(lc),this.appendValueInput("A").appendField(Jt.Msg.mixpy_PYLAB_HIST).appendField(Jt.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(Jt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Cc={init:function(){this.setColour(lc);var t=[[Jt.Msg.PYLAB_LABEL_X,"x"],[Jt.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(Jt.Msg.MIXLY_SETTING).appendField(new Jt.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(Jt.Msg.mixpy_PYLAB_TICKS).appendField(Jt.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(Jt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},Nc={init:function(){var t=[["sin","sin"],["cos","cos"],["tan","tan"],["arcsin","arcsin"],["arccos","arccos"],["arctan","arctan"],[Jt.Msg.LANG_MATH_TO_ROUND,"round"],[Jt.Msg.LANG_MATH_TO_CEIL,"ceil"],[Jt.Msg.LANG_MATH_TO_FLOOR,"floor"]];this.setColour(lc),this.setOutput(!0),this.setInputsInline(!0),this.appendDummyInput().appendField(Jt.Msg.mixpy_NUMPY_TRIG),this.appendValueInput("NUM").setCheck(Number).appendField(new Jt.FieldDropdown(t),"OP"),this.setTooltip(Jt.Msg.mixpy_NUMPY_TRIG_TOOLTIP)}},kc={init:function(){this.setColour(lc),this.appendValueInput("VET").setCheck(Number).appendField(Jt.Msg.mixpy_SUBPLOT).appendField(Jt.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(Jt.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(Jt.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Dc={init:function(){this.setColour(lc),this.appendValueInput("FILENAME").appendField(Jt.Msg.MIXPY_PANDAS_READ_CSV),this.appendDummyInput().appendField(new Jt.FieldDropdown([[Jt.Msg.mixpy_PANDAS_READCSV_HEADER_Y,"0"],[Jt.Msg.mixpy_PANDAS_READCSV_HEADER_N,"None"]]),"MODE"),this.appendDummyInput().appendField(Jt.Msg.mixpy_PANDAS_READCSV_TITLE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.mixpy_PANDAS_READCSV_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Lc={init:function(){this.setColour(lc),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Jt.Msg.mixpy_DATAFRAME_GET),this.appendDummyInput("").appendField(Jt.Msg.mixpy_DATAFRAME_GET_INDEX).appendField(new Jt.FieldDropdown([[Jt.Msg.DATAFRAME_COLUMN,"column"],[Jt.Msg.DATAFRAME_RAW,"raw"]]),"MODE"),this.setOutput(!0),this.setTooltip(Jt.Msg.mixpy_DATAFRAME_GET_TOOLTIP)}},Fc={init:function(){this.setColour(lc),this.appendValueInput("FILE").setCheck(String).appendField(Jt.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Jt.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},Pc={init:function(){this.setColour(lc);var t=[[Jt.Msg.TEXT_TRIM_LEFT,"right"],[Jt.Msg.mixpy_PL_TEXT_CENTER,"center"],[Jt.Msg.TEXT_TRIM_RIGHT,"left"]],e=[[Jt.Msg.mixpy_PL_TEXT_TOP,"bottom"],[Jt.Msg.mixpy_PL_TEXT_CENTER,"center"],[Jt.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(Jt.Msg.MIXLY_SETTING).appendField(Jt.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(Jt.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(Jt.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(Jt.Msg.mixpy_PL_TEXT_HOR).appendField(new Jt.FieldDropdown(t),"HALIGN"),this.appendDummyInput("").appendField(Jt.Msg.mixpy_PL_TEXT_VER).appendField(new Jt.FieldDropdown(e),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(Jt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.mixpy_PL_TEXT_TOOLTIP)}},$c={init:function(){this.setColour(lc),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_TOARRAY),this.setOutput(!0,"List"),this.setTooltip(Jt.Msg.MIXLY_PYTHON_TOOLTIP_TOARRAY)}},Bc={init:function(){this.setColour(lc),this.appendValueInput("SER").setCheck("Series").appendField(Jt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(Jt.Msg.blockpy_PYLAB_PLOT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vc={init:function(){this.setColour(lc);var t=[[Jt.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[Jt.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[Jt.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[Jt.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[Jt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[Jt.Msg.COLOUR_RGB_BLUE,"b"],[Jt.Msg.COLOUR_RGB_GREEN,"g"],[Jt.Msg.COLOUR_RGB_RED,"r"],[Jt.Msg.COLOUR_CYAN,"c"],[Jt.Msg.COLOUR_MAGENTA,"m"],[Jt.Msg.COLOUR_YELLOW,"y"],[Jt.Msg.COLOUR_BLACK,"k"],[Jt.Msg.COLOUR_WHITE,"w"]],n=[[Jt.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("SER").setCheck("Series").appendField(Jt.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(Jt.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(Jt.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Jt.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(Jt.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new Jt.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(Jt.Msg.HTML_COLOUR).appendField(new Jt.FieldDropdown(e),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Uc={init:function(){this.setColour(lc),this.appendDummyInput().appendField(Jt.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yc={init:function(){this.setColour(lc),this.appendDummyInput().appendField(Jt.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Gc={init:function(){this.setColour(lc),this.appendDummyInput().appendField(Jt.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Hc={init:function(){this.setColour(lc),this.appendDummyInput().appendField(Jt.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Wc={init:function(){this.setColour(lc);var t=[[Jt.Msg.PYLAB_LABEL_X,"x"],[Jt.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(Jt.Msg.blockpy_PYLAB_SET_LABEL).appendField(new Jt.FieldDropdown(t),"DIR"),this.appendValueInput("LABEL").appendField(Jt.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zc={init:function(){this.setColour(lc);var t=[[Jt.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[Jt.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(Jt.Msg.MIXLY_DISPLAY_DRAW).appendField(new Jt.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(Jt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Jt.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{plot:Jt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:Jt.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[t]}))}},Xc={init:function(){this.setColour(lc);var t=[[Jt.Msg.COLOUR_RGB_BLUE,"b"],[Jt.Msg.COLOUR_RGB_GREEN,"g"],[Jt.Msg.COLOUR_RGB_RED,"r"],[Jt.Msg.COLOUR_CYAN,"c"],[Jt.Msg.COLOUR_MAGENTA,"m"],[Jt.Msg.COLOUR_YELLOW,"y"],[Jt.Msg.COLOUR_BLACK,"k"],[Jt.Msg.COLOUR_WHITE,"w"]],e=[[Jt.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(Jt.Msg.mixpy_PYLAB_SCATTER).appendField(Jt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Jt.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(Jt.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(Jt.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Jt.FieldDropdown(e),"DOT"),this.appendDummyInput("").appendField(Jt.Msg.HTML_COLOUR).appendField(new Jt.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Jt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},jc={init:function(){this.setColour(lc);var t=[[Jt.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[Jt.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[Jt.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[Jt.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[Jt.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[Jt.Msg.COLOUR_RGB_BLUE,"b"],[Jt.Msg.COLOUR_RGB_GREEN,"g"],[Jt.Msg.COLOUR_RGB_RED,"r"],[Jt.Msg.COLOUR_CYAN,"c"],[Jt.Msg.COLOUR_MAGENTA,"m"],[Jt.Msg.COLOUR_YELLOW,"y"],[Jt.Msg.COLOUR_BLACK,"k"],[Jt.Msg.COLOUR_WHITE,"w"]],n=[[Jt.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[Jt.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(Jt.Msg.mixpy_PYLAB_PLOT_XY).appendField(Jt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Jt.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(Jt.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Jt.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(Jt.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new Jt.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(Jt.Msg.HTML_COLOUR).appendField(new Jt.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Jt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},qc={init:function(){this.setColour(lc);var t=[[Jt.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[Jt.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(Jt.Msg.mixpy_PYLAB_BAR).appendField(Jt.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Jt.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(Jt.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(Jt.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new Jt.FieldDropdown(t),"ALIGN"),this.appendDummyInput().appendField(Jt.Msg.HTML_COLOUR).appendField(new Jt.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Jt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Kc={init:function(){this.setColour(lc);var t=[[Jt.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[Jt.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],e=[[Jt.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[Jt.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[Jt.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[Jt.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(Jt.Msg.mixpy_PYLAB_PIE).appendField(Jt.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(Jt.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(Jt.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(Jt.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new Jt.FieldDropdown(e),"autopct"),this.appendDummyInput("").appendField(Jt.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new Jt.FieldDropdown(t),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Qc={init:function(){this.setColour(lc),this.appendValueInput("A").appendField(Jt.Msg.mixpy_PYLAB_HIST).appendField(Jt.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(Jt.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Jc={init:function(){this.setColour(lc);var t=[[Jt.Msg.PYLAB_LABEL_X,"x"],[Jt.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(Jt.Msg.MIXLY_SETTING).appendField(new Jt.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(Jt.Msg.mixpy_PYLAB_TICKS).appendField(Jt.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(Jt.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},Zc={init:function(){this.setColour(lc),this.appendValueInput("VET").setCheck(Number).appendField(Jt.Msg.mixpy_SUBPLOT).appendField(Jt.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(Jt.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(Jt.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},td={init:function(){this.setColour(lc),this.appendDummyInput("").appendField(Jt.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Jt.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},ed={init:function(){this.setColour(lc);var t=[[Jt.Msg.TEXT_TRIM_LEFT,"right"],[Jt.Msg.mixpy_PL_TEXT_CENTER,"center"],[Jt.Msg.TEXT_TRIM_RIGHT,"left"]],e=[[Jt.Msg.mixpy_PL_TEXT_TOP,"bottom"],[Jt.Msg.mixpy_PL_TEXT_CENTER,"center"],[Jt.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(Jt.Msg.MIXLY_SETTING).appendField(Jt.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(Jt.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(Jt.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(Jt.Msg.mixpy_PL_TEXT_HOR).appendField(new Jt.FieldDropdown(t),"HALIGN"),this.appendDummyInput("").appendField(Jt.Msg.mixpy_PL_TEXT_VER).appendField(new Jt.FieldDropdown(e),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(Jt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.mixpy_PL_TEXT_TOOLTIP)}},nd={init:function(){this.setColour(lc),this.appendValueInput("ARRAY").appendField("获取维度"),this.setOutput(!0),this.setTooltip("Returns the shape of the array.")}},id={init:function(){this.setColour(lc),this.appendValueInput("ARRAY").appendField("变形"),this.appendValueInput("DIMENSIONS").appendField("后维度为"),this.setOutput(!0),this.setTooltip("Reshapes the array to the specified dimensions.")}},sd={init:function(){this.setColour(lc),this.appendValueInput("ARRAY").appendField("把"),this.appendDummyInput().appendField("转换为").appendField(new Jt.FieldDropdown([["uint8","numpy.uint8"],["int32","numpy.int32"],["float32","numpy.float32"],["float64","numpy.float64"]]),"TYPE"),this.setOutput(!0),this.setTooltip("Converts array to specified type.")}},rd={init:function(){this.setColour(lc),this.appendValueInput("ARRAY").appendField("创建二维图"),this.appendDummyInput().appendField("颜色").appendField(new Jt.FieldDropdown([["gray","gray"],["viridis","viridis"],["plasma","plasma"],["inferno","inferno"],["magma","magma"],["cividis","cividis"],["hot","hot"],["cool","cool"],["spring","spring"],["summer","summer"],["autumn","autumn"],["winter","winter"],["jet","jet"]]),"COLORMAP"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("Displays an image with the specified colormap.")}},ad={init:function(){this.setColour(lc),this.appendValueInput("X").appendField("从数据集"),this.appendValueInput("Y").appendField("获取平均图像,标签"),this.appendValueInput("DIGIT").appendField("为"),this.setOutput(!0),this.setTooltip("Computes the mean of X where y equals the specified digit.")}},od={init:function(){this.setColour(lc),this.appendValueInput("IMAGE").appendField("获取模板匹配结果,图片:"),this.appendValueInput("TEMPLATES").appendField("模板:"),this.setOutput(!0),this.setTooltip("Finds the index of the template that minimizes the sum of absolute differences with the image.")}},ld={init:function(){this.setColour(lc),this.appendValueInput("ARRAY").appendField("获取平均值"),this.appendDummyInput().appendField("沿着axis").appendField(new Jt.FieldDropdown([["None","NONE"],["0","0"],["1","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Computes the mean of the array along the specified axis.")}},ud={init:function(){this.setColour(lc),this.appendValueInput("ARRAY").appendField("获取标准差"),this.appendDummyInput().appendField("沿着axis").appendField(new Jt.FieldDropdown([["None","NONE"],["0","0"],["1","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Computes the standard deviation of the array along the specified axis.")}},hd={init:function(){this.setColour(lc),this.appendValueInput("DF").appendField("丢弃缺省值"),this.setOutput(!0),this.setTooltip("Drops rows with NaN values from the dataframe.")}},pd={init:function(){this.setColour(lc),this.appendValueInput("DATAFRAME").appendField("从数据集"),this.appendValueInput("COLUMNS").appendField("中删除列").setCheck(String),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip("从数据框中删除指定的列。用逗号分隔多个列名。")}},cd={init:function(){this.setColour(lc),this.appendValueInput("NUM").appendField("生成单位行向量"),this.setOutput(!0),this.setTooltip("Creates an array of ones with the specified length.")}},dd={init:function(){this.setColour(lc),this.appendValueInput("ARRAY1").appendField("列拼接:数组1"),this.appendValueInput("ARRAY2").appendField("数组2"),this.setOutput(!0),this.setTooltip("Concatenates two arrays along the second axis using numpy.c_.")}},fd={init:function(){this.setColour(lc),this.appendValueInput("ARRAY").appendField("获取行列式"),this.setOutput(!0),this.setTooltip("Computes the determinant of an array using numpy.linalg.det.")}},md={init:function(){this.setColour(lc),this.appendValueInput("MATRIX").appendField("获取转置"),this.setOutput(!0),this.setTooltip("Computes the transpose of the given matrix.")}},gd={init:function(){this.setColour(lc),this.appendValueInput("MATRIX1"),this.appendValueInput("MATRIX2").appendField("@"),this.setOutput(!0),this.setTooltip("Multiplies two matrices.")}},_d={init:function(){this.setColour(lc),this.appendValueInput("ARRAY").appendField("获取逆矩阵"),this.setOutput(!0),this.setTooltip("Computes the inverse of the given matrix using numpy.linalg.inv.")}},Td={init:function(){this.setColour(lc),this.appendValueInput("DATAFRAME").appendField("获取中位数"),this.setOutput(!0),this.setTooltip("Computes the median of the given dataframe.")}},yd={init:function(){this.setColour(lc),this.appendValueInput("DATAFRAME").appendField("填充缺失值"),this.appendValueInput("VALUE").appendField("填充值"),this.appendDummyInput().appendField("是否修改原数据").appendField(new Jt.FieldDropdown([["True","True"],["False","False"]]),"INPLACE"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip("Fills NaN values in the dataframe with the specified value.")}},Id={init:function(){this.setColour(lc),this.appendValueInput("DATAFRAME").appendField("获取DataFrame信息"),this.setOutput(!0),this.setTooltip("Displays information about the DataFrame.")}},Ed={init:function(){this.setColour(lc),this.appendValueInput("ARRAY").appendField("获取最小值"),this.appendDummyInput().appendField("沿着axis").appendField(new Jt.FieldDropdown([["None","None"],["行","0"],["列","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Returns the minimum value along the specified axis.")}},bd={init:function(){this.setColour(lc),this.appendValueInput("ARRAY").appendField("获取最大值"),this.appendDummyInput().appendField("沿着axis").appendField(new Jt.FieldDropdown([["None","None"],["行","0"],["列","1"]]),"AXIS"),this.setOutput(!0),this.setTooltip("Returns the maximum value along the specified axis.")}},vd={init:function(){this.setColour(lc),this.appendValueInput("ARRAY").appendField("获取数组大小"),this.setOutput(!0),this.setTooltip("Returns the size of the array.")}},wd={init:function(){this.setColour(lc),this.appendValueInput("ARRAY1").appendField("点乘数组1"),this.appendValueInput("ARRAY2").appendField("点乘数组2"),this.setOutput(!0),this.setTooltip("Returns the dot product of two arrays.")}},Sd={init:function(){this.setColour(lc),this.appendValueInput("ARRAY").appendField("获取平方数组"),this.setOutput(!0),this.setTooltip("Returns the element-wise square of the array.")}},xd={init:function(){this.setColour(lc),this.appendValueInput("ARRAY").appendField("获取数组元素和"),this.setOutput(!0),this.setTooltip("Returns the sum of the array.")}},Rd={init:function(){this.setColour(lc),this.appendValueInput("SIZE").appendField("生成随机数组"),this.setOutput(!0),this.setTooltip("Returns a random array of the specified size.")}},Od={init:function(){this.setColour(lc),this.appendValueInput("ARRAY").appendField("Python求和"),this.setOutput(!0),this.setTooltip("Returns the sum of the iterable.")}},Ad={init:function(){this.setColour(lc),this.appendValueInput("DICT").setAlign(Jt.inputs.Align.RIGHT).setCheck("Dict"),this.appendDummyInput().setAlign(Jt.inputs.Align.RIGHT).appendField("值排序"),this.appendValueInput("KEY").setAlign(Jt.inputs.Align.RIGHT).appendField("标签"),this.appendDummyInput().setAlign(Jt.inputs.Align.RIGHT).appendField("排序方式").appendField(new Jt.FieldDropdown([["升序","True"],["降序","False"]]),"AS_CENDING"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},Md={init:function(){this.setColour(lc),this.appendValueInput("DICT").setAlign(Jt.inputs.Align.RIGHT).setCheck("Dict"),this.appendDummyInput().setAlign(Jt.inputs.Align.RIGHT).appendField("获取").appendField(new Jt.FieldDropdown([["前几行","head"],["最后几行","tail"]]),"TYPE"),this.appendValueInput("LINES").setAlign(Jt.inputs.Align.RIGHT).appendField("行数"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},Cd={init:function(){this.setColour(lc),this.appendValueInput("DICT").setAlign(Jt.inputs.Align.RIGHT).setCheck("Dict"),this.appendDummyInput().setAlign(Jt.inputs.Align.RIGHT).appendField("筛选数据"),this.appendValueInput("KEY").setAlign(Jt.inputs.Align.RIGHT).appendField("满足条件"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},Nd={init:function(){this.setColour(lc),this.appendValueInput("DICT").setAlign(Jt.inputs.Align.RIGHT).setCheck("Dict"),this.appendValueInput("KEY").setAlign(Jt.inputs.Align.RIGHT).appendField("通过标签"),this.appendDummyInput().setAlign(Jt.inputs.Align.RIGHT).appendField("分组"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},kd={init:function(){this.setColour(lc),this.appendDummyInput().setAlign(Jt.inputs.Align.RIGHT).appendField(new Jt.FieldDropdown([["求最小值","min"],["求最大值","max"],["求和","sum"],["求平均值","mean"],["求中位数","median"],["求标准差","std"]]),"TYPE"),this.appendValueInput("DICT").setAlign(Jt.inputs.Align.RIGHT).setCheck("Dict"),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip("")}},Dd={init:function(){this.setColour(lc),this.appendDummyInput().appendField("清除已有图像"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ld=80,Fd={init:function(){this.setColour(Ld),this.appendDummyInput("").appendField(new Jt.FieldLabel(Jt.Msg.DS_CREATE_LINKEDLIST_NEW)),this.appendDummyInput("").appendField(new Jt.FieldLabel(Jt.Msg.DS_CREATE_LINKEDLIST_HEAD)).appendField(new Jt.FieldTextInput("head"),"VAR"),this.appendDummyInput("").appendField(new Jt.FieldLabel(Jt.Msg.DS_CREATE_LINKEDLIST_TYPE)).appendField(new Jt.FieldTextInput("tag"),"TYPE"),this.appendDummyInput().appendField(Jt.Msg.DS_CREATE_LINKEDLIST_ATTRIBUTE),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Jt.icons.MutatorIcon(["ds_create_linkedlist_item"],this)),this.setTooltip(Jt.Msg.DS_CREATE_LINKEDLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("ds_create_linkedlist_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;ie?t[e]:"name"),"KEY"+e).appendField("=")},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Pd={init:function(){this.setColour(Ld),this.appendDummyInput().appendField(Jt.Msg.DS_CREATE_LINKEDLIST_CONTAINER_TITLE),this.appendStatementInput("STACK"),this.setTooltip(Jt.Msg.DS_CREATE_LINKEDLIST_CONTAINER_TOOLTIP),this.contextMenu=!1}},$d={init:function(){this.setColour(Ld),this.appendDummyInput().appendField(Jt.Msg.DS_CREATE_LINKEDLIST_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.DS_CREATE_LINKEDLIST_ITEM_TOOLTIP),this.contextMenu=!1}},Bd={init:function(){this.setColour(Ld),this.appendDummyInput("").appendField(Jt.Msg.DS_CREATE_NODE_USE).appendField(new Jt.FieldTextInput("tag"),"TYPE"),this.appendDummyInput("").appendField(Jt.Msg.DS_CREATE_NODE_NEW),this.appendValueInput("NODE"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.DS_CREATE_NODE_TOOLTIP)}},Vd={init:function(){this.setColour(Ld),this.appendDummyInput("").appendField(Jt.Msg.DS_GET_NODE_ATTR_NODE),this.appendValueInput("NODE"),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_AIP_ATTR).appendField(new Jt.FieldTextInput("name"),"TYPE"),this.appendDummyInput("").appendField(Jt.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.DS_GET_NODE_ATTR_TOOLTIP)}},Ud={init:function(){this.setColour(Ld),this.appendDummyInput("").appendField(Jt.Msg.DS_SET_NODE_ATTR_NODE),this.appendValueInput("NODE"),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_AIP_ATTR).appendField(new Jt.FieldTextInput("name"),"TYPE"),this.appendValueInput("VAR").appendField(Jt.Msg.DS_SET_NODE_ATTR_SET),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.DS_SET_NODE_ATTR_TOOLTIP)}},Yd={init:function(){this.setColour(Ld),this.appendValueInput("NODE").appendField(Jt.Msg.DS_ADD_NODE_HEAD_NODE);var t=[[Jt.Msg.DS_ADD_NODE_BEFORE,"before"],[Jt.Msg.DS_ADD_NODE_AFTER,"after"]];this.appendDummyInput("").appendField(Jt.Msg.DS_ADD_NODE_LINKEDLIST),this.appendValueInput("NODE2").appendField(Jt.Msg.DS_SET_NODE_ATTR_NODE),this.appendValueInput("NODE3").appendField(new Jt.FieldDropdown(t),"DIR").appendField(Jt.Msg.DS_ADD_NODE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.DS_ADD_NODE_TOOLTIP)}},Gd={init:function(){this.setColour(Ld),this.appendValueInput("NODE").appendField(Jt.Msg.DS_ADD_NODE_HEAD_NODE);var t=[[Jt.Msg.DS_ADD_NODE_BEFORE,"before"],[Jt.Msg.DS_ADD_NODE_AFTER,"after"]];this.appendDummyInput("").appendField(Jt.Msg.DS_ADD_NODE_LINKEDLIST),this.appendDummyInput("").appendField(Jt.Msg.DS_CREATE_LINKEDLIST_ITEM_TITLE).appendField(new Jt.FieldTextInput("name"),"TYPE"),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_AS),this.appendDummyInput("").appendField(Jt.Msg.DS_ADD_NODE_ATTR),this.appendValueInput("NODE3").appendField(new Jt.FieldDropdown(t),"DIR").appendField(Jt.Msg.DS_ADD_NODE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.DS_ADD_NODE_TOOLTIP)}},Hd={init:function(){this.setColour(Ld),this.appendValueInput("NODE").appendField(Jt.Msg.DS_ADD_NODE_HEAD_NODE),this.appendDummyInput("").appendField(Jt.Msg.DS_ADD_NODE_LINKEDLIST),this.appendValueInput("NODE2").appendField(Jt.Msg.DS_DEL_NODE_NAME),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.DS_DEL_NODE_TOOLTIP)}},Wd={init:function(){this.setColour(Ld),this.appendValueInput("NODE").appendField(Jt.Msg.DS_ADD_NODE_HEAD_NODE),this.appendDummyInput("").appendField(Jt.Msg.DS_ADD_NODE_LINKEDLIST),this.appendDummyInput("").appendField(Jt.Msg.DS_DEL_NODE_ATTR).appendField(new Jt.FieldTextInput("name"),"TYPE"),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_AS),this.appendDummyInput("").appendField(Jt.Msg.DS_ADD_NODE_ATTR),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.DS_DEL_NODE_TOOLTIP)}},zd={init:function(){this.setColour(Ld),this.appendValueInput("NODE").appendField(Jt.Msg.DS_ADD_NODE_HEAD_NODE),this.appendDummyInput("").appendField(Jt.Msg.DS_REVERSE_LINKEDLIST),this.appendValueInput("NODE2").appendField(Jt.Msg.DS_REVERSE_LINKEDLIST_NEW_HEAD),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.DS_DEL_NODE_TOOLTIP)}},Xd="#777777",jd={init:function(){this.setColour(Xd),this.appendDummyInput("").appendField("from ").appendField(new Jt.FieldTextInput("ESP32"),"path").appendField(" import ").appendField(new Jt.FieldTextInput("*"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qd={init:function(){this.setColour(Xd),this.appendDummyInput("").appendField("import ").appendField(new Jt.FieldTextInput("module"),"module"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Kd={init:function(){this.setColour(Xd),this.appendDummyInput("").appendField(new Jt.FieldTextInput("my_function"),"NAME"),this.itemCount_=1,this.arguments_=["x"],this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Jt.icons.MutatorIcon(["factory_create_with_item"],this))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("items",this.itemCount_);for(var e=0;ee?t[e]:'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Mf={init:function(){this.setColour(wf),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Jt.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Cf={init:function(){this.setColour(wf),this.appendDummyInput().appendField(Jt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Nf={init:function(){this.setColour(wf),this.appendDummyInput().appendField(Jt.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},kf={init:function(){this.setColour(wf),this.appendDummyInput().appendField(Jt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").setCheck(String).appendField(Jt.Msg.MIXLY_EMQX_SERVER).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("USERNAME").setCheck(String).appendField(Jt.Msg.MIXLY_WIFI_USERNAME).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("PASSWORD").setCheck(String).appendField(Jt.Msg.MIXLY_IOT_PASSWORD).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("PROJECT").setCheck(String).appendField(Jt.Msg.MIXLY_EMQX_PROJECT).setAlign(Jt.inputs.Align.RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Df={init:function(){this.setColour(wf),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Jt.Msg.MIXLY_EMQX_PUBLISH_NEW).appendField(Jt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("MSG").appendField(Jt.Msg.HTML_BODY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.MIXLY_ESP32_IOT_EMQX_PUBLISH_TOOLTIP)}},Lf={init:function(){this.setColour(wf),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Jt.Msg.MIXLY_EMQX_SUBSCRIBE+Jt.Msg.MIXLY_MICROBIT_MSG).appendField(Jt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.appendValueInput("METHOD").appendField(Jt.Msg.MIXLY_EMQX_SET_METHOD),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},Ff={init:function(){this.setColour(wf),this.appendDummyInput().appendField("MixIO"),this.appendValueInput("TOPIC").appendField(Jt.Msg.MSG.stop+Jt.Msg.MIXLY_EMQX_SUBSCRIBE).appendField(Jt.Msg.MIXLY_EMQX_PUBLISH_TOPIC),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.MIXLY_ESP32_IOT_EMQX_SUBSCRIBE_TOOLTIP)}},Pf={init:function(){this.setColour(wf),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Jt.Msg.MIXLY_ESP32_DISCONNECT_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$f={init:function(){this.setColour(wf),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Jt.Msg.MIXLY_EMQX_CONNECT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bf={init:function(){this.setColour(wf),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Jt.Msg.MIXLY_ESP32_CHECK_ONENET),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Vf={init:function(){this.setColour(wf),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Jt.MQTT_Topic),this.setInputsInline(!0),this.setOutput(!0)}},Uf={init:function(){this.setColour(wf),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROPYTHON_FORMAT).appendField(Jt.Msg.MIXLY_EMQX_PUBLISH_MSG),this.setInputsInline(!0),this.setOutput(!0)}},Yf={init:function(){this.setColour(wf),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_ESP32_IOT_MAP_FORMATING),this.setOutput(!0)}},Gf={init:function(){this.setColour(wf),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_MICROPYTHON_FORMAT+"(Json)"),this.setOutput(!0)}},Hf={init:function(){this.setColour(wf),this.appendDummyInput().appendField("MixIO"),this.appendDummyInput().appendField(Jt.Msg.MIXLY_EMQX_PING),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Jt.Msg.MIXLY_ESP32_IOT_EMQX_PING_TOOLTIP)}},Wf={init:function(){this.setColour(wf),this.appendDummyInput().appendField("MixIO").appendField(Jt.Msg.MIXLY_GET_NTP),this.appendValueInput("addr").appendField(Jt.blynk_SERVER_ADD),this.setInputsInline(!0),this.setOutput(!0)}},zf={init:function(){this.setColour(wf),this.appendDummyInput().appendField(Jt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Jt.Msg.MIXLY_EMQX_SERVER).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Jt.Msg.CONTROLS_FOR_INPUT_WITH+Jt.Msg.MIXLY_MIXIO_SHARE_KEY).setAlign(Jt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Xf={init:function(){this.setColour(wf),this.appendDummyInput().appendField(Jt.Msg.MIXLY_CREATE_MQTT_CLIENT_AND_CONNECT),this.appendValueInput("SERVER").appendField(Jt.Msg.MIXLY_EMQX_SERVER).setAlign(Jt.inputs.Align.RIGHT),this.appendValueInput("KEY").appendField(Jt.Msg.CONTROLS_FOR_INPUT_WITH+"Mixly Key").setAlign(Jt.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},jf={init:function(){this.VISITOR_ID=Zt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(wf),this.appendDummyInput("").appendField(this.newQuote_(!0)).appendField(new Jt.FieldTextInput(this.visitorId),"VISITOR_ID").appendField(this.newQuote_(!1)),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")},newQuote_:function(t){if(t==this.RTL)var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAqUlEQVQI1z3KvUpCcRiA8ef9E4JNHhI0aFEacm1o0BsI0Slx8wa8gLauoDnoBhq7DcfWhggONDmJJgqCPA7neJ7p934EOOKOnM8Q7PDElo/4x4lFb2DmuUjcUzS3URnGib9qaPNbuXvBO3sGPHJDRG6fGVdMSeWDP2q99FQdFrz26Gu5Tq7dFMzUvbXy8KXeAj57cOklgA+u1B5AoslLtGIHQMaCVnwDnADZIFIrXsoXrgAAAABJRU5ErkJggg==";else e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAn0lEQVQI1z3OMa5BURSF4f/cQhAKjUQhuQmFNwGJEUi0RKN5rU7FHKhpjEH3TEMtkdBSCY1EIv8r7nFX9e29V7EBAOvu7RPjwmWGH/VuF8CyN9/OAdvqIXYLvtRaNjx9mMTDyo+NjAN1HNcl9ZQ5oQMM3dgDUqDo1l8DzvwmtZN7mnD+PkmLa+4mhrxVA9fRowBWmVBhFy5gYEjKMfz9AylsaRRgGzvZAAAAAElFTkSuQmCC";return new Jt.FieldImage(e,12,12,'"')}},qf={init:function(){this.VISITOR_ID=Zt.Config.BOARD.visitorId.str32.substring(0,8).toUpperCase(),this.setColour(wf),this.appendDummyInput("").appendField(new Jt.FieldTextInput(this.visitorId),"VISITOR_ID"),this.setOutput(!0,null)},onchange:function(){const t=this.getFieldValue("VISITOR_ID");this.VISITOR_ID!==t&&this.setFieldValue(this.VISITOR_ID,"VISITOR_ID")}},Kf={init:function(){this.setColour(wf),this.appendDummyInput().appendField("MixIO").appendField(Jt.Msg.MSG.catEthernet_clinet),this.setOutput(!0),this.setInputsInline(!0)}},Qf={init:function(){this.setColour(wf),this.appendDummyInput().appendField("HTTP"+Jt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Jt.Msg.DISPLAY_IMAGE_LET2),this.appendDummyInput().appendField(Jt.Msg.MIXLY_REQUESTS_GET).appendField(Jt.Msg.MIXLY_GET_CURRENT_TIME).appendField(Jt.Msg.MIXLY_OPEN_DEBUG).appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Jt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Jf={init:function(){this.setColour(wf),this.appendDummyInput().appendField("HTTP"+Jt.Msg.MIXLY_Client).appendField(Jt.Msg.MIXLY_GET).appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Jt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Jt.Msg.MIXLY_REQUESTS_MESSAGE,"text"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},Zf={init:function(){this.setColour(wf),this.appendDummyInput().appendField("MQTT"+Jt.Msg.MIXLY_Client),this.appendValueInput("addr").appendField(Jt.Msg.MIXLY_CONNECTTO),this.appendDummyInput().appendField(Jt.Msg.MIXLY_INIT_SUBSCRIBE).appendField(Jt.MQTT_Topic).appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_GET_CURRENT_TIME,""]]),"key").appendField(Jt.Msg.MIXLY_OPEN_DEBUG).appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"],[Jt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"]]),"key2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},tm={init:function(){this.setColour(wf),this.appendDummyInput().appendField("MQTT"+Jt.Msg.MIXLY_Client).appendField(Jt.Msg.MIXLY_GET).appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_REQUESTS_LEN,"client_len"],[Jt.Msg.MIXLY_REQUESTS_GET_LEN,"server_len"],[Jt.Msg.MIXLY_REQUESTS_MESSAGE,"time_msg()"]]),"key"),this.setOutput(!0),this.setInputsInline(!0)}},em=Sf,nm=xf,im=Rf,sm=Af,rm=230,am={init:function(){this.setColour(rm),this.appendDummyInput("").appendField(new Jt.FieldDropdown(Zt.Profile.default.digital_write),"PIN"),this.setOutput(!0)}},om={init:function(){this.setColour(rm),this.appendDummyInput("").appendField(new Jt.FieldDropdown(Zt.Profile.default.digital_read),"PIN"),this.setOutput(!0)}},lm={init:function(){this.setColour(rm),this.appendDummyInput("").appendField(new Jt.FieldDropdown(Zt.Profile.default.analog_write),"PIN"),this.setOutput(!0)}},um={init:function(){this.setColour(rm),this.appendDummyInput("").appendField(new Jt.FieldDropdown(Zt.Profile.default.analog_read),"PIN"),this.setOutput(!0)}},hm={init:function(){this.setColour(40),this.appendDummyInput("").appendField(new Jt.FieldLabel(Jt.Msg.MIXPY_SERIAL_OPEN)).appendField(new Jt.FieldTextInput("ser"),"SER"),this.appendDummyInput().appendField(Jt.Msg.MIXLY_SERIAL_BEGIN).appendField(new Jt.FieldDropdown([["115200","115200"],["256000","256000"],["128000","128000"],["57600","57600"],["56000","56000"],["43000","43000"],["38400","38400"],["28800","28800"],["19200","19200"],["9600","9600"],["4800","4800"],["2400","2400"],["1200","1200"],["600","600"],["300","300"],["110","110"]]),"BPS"),this.appendValueInput("VAR").appendField(Jt.Msg.MIXPY_SERIAL_OPEN_TIMEOUT),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Jt.Msg.MIXPY_SERIAL_OPEN_TOOLTIP)}},pm={init:function(){this.setColour(40),this.appendValueInput("SER"),this.appendValueInput("VAR").appendField(Jt.Msg.MIXPY_SERIAL_WRITE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Jt.Msg.MIXPY_SERIAL_WRITE_TOOLTIP)}},cm={init:function(){this.setColour(40),this.appendValueInput("SER"),this.appendValueInput("VAR").setCheck(Number).appendField(Jt.Msg.MIXPY_SERIAL_READ),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Jt.Msg.MIXPY_SERIAL_READ_TOOLTIP)}},dm={init:function(){this.setColour(40),this.appendValueInput("SER"),this.appendDummyInput().appendField(Jt.Msg.MIXPY_SERIAL_CLOSE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Jt.Msg.MIXPY_SERIAL_CLOSE_TOOLTIP)}},fm=80,mm={init:function(){this.appendDummyInput().appendField(Jt.Msg.SKLEARN_CLASSIFICATION_GENERATION),this.appendValueInput("n_samples").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_SAMPLES),this.appendValueInput("n_features").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_FEATURES),this.appendValueInput("n_informative").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_EFFECTIVE_FEATURES),this.appendValueInput("n_redundant").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_REDUNDANT_FEATURES),this.appendValueInput("n_repeated").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_REPEATED_FEATURES),this.appendValueInput("n_classes").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_CLASSES),this.appendValueInput("n_clusters_per_class").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_CLUSTERS_PER_CLASSES),this.appendValueInput("random_state").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},gm={init:function(){this.appendDummyInput().appendField(Jt.Msg.SKLEARN_REGRESSION_GENERATION),this.appendValueInput("n_samples").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_SAMPLES),this.appendValueInput("n_features").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_FEATURES),this.appendValueInput("n_informative").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_EFFECTIVE_FEATURES),this.appendValueInput("n_targets").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_LABELS),this.appendValueInput("bias").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.DEVIATION),this.appendValueInput("noise").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NOISE),this.appendValueInput("random_state").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},_m={init:function(){this.appendDummyInput().appendField(Jt.Msg.SKLEARN_CLUSTERING_GENERATION),this.appendValueInput("n_samples").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_SAMPLES),this.appendValueInput("n_features").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_FEATURES),this.appendValueInput("centers").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_CLUSTERS),this.appendValueInput("cluster_std").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.STANDARD_DEVIATION_OF_CLUSTER),this.appendValueInput("center_box").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.CLUSTER_BOUNDING_BOX),this.appendValueInput("shuffle").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.SHUFFLE_SAMPLES),this.appendValueInput("random_state").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Tm={init:function(){var t=[[Jt.Msg.SKLEARN_LOAD_IRIS,"load_iris"],[Jt.Msg.SKLEARN_LOAD_BOSTON,"load_boston"],[Jt.Msg.SKLEARN_LOAD_DIABETES,"load_diabetes"],[Jt.Msg.SKLEARN_LOAD_BREAST_CANCER,"load_breast_cancer"],[Jt.Msg.SKLEARN_LOAD_LINNERUD,"load_linnerud"],[Jt.Msg.SKLEARN_LOAD_DIGITS,"load_digits"]];this.appendDummyInput().appendField("sklearn "+Jt.Msg.LOAD).appendField(new Jt.FieldDropdown(t),"type").appendField(new Jt.FieldTextInput("iris"),"name"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")},getVars:function(){return[this.getFieldValue("name")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("name"))&&this.setTitleValue(e,"name")}},ym={init:function(){this.appendValueInput("name").setCheck(null).appendField("sklearn "+Jt.Msg.DATA_SET),this.appendDummyInput().setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MIXLY_GET).appendField(new Jt.FieldDropdown([[Jt.Msg.EIGENVALUES,"data"],[Jt.Msg.LABEL_VALUE,"target"],[Jt.Msg.FEATURE,"feature_names"],[Jt.Msg.mixpy_PYLAB_TICKS_TAG,"target_names"]]),"type"),this.setOutput(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Im={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.DATA_SEGMENTATION),this.appendValueInput("train_data").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.EIGENVALUES),this.appendValueInput("train_target").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.LABEL_VALUE),this.appendValueInput("test_size").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.TEST_SET_PROPORTION),this.appendValueInput("rondom_state").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Em={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.DATA_SEGMENTATION),this.appendValueInput("train_data").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.EIGENVALUES),this.appendValueInput("test_size").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.TEST_SET_PROPORTION),this.appendValueInput("rondom_state").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setOutput(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},bm={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.SKLEARN_LINEARREGRESSION_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendValueInput("fit_intercept").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.SKLEARN_CALCULATE_MODEL_INTERRUPT),this.appendValueInput("normalize").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.SKLEARN_REGRESSION_NORMIALIZATION),this.appendValueInput("n_jobs").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.SKLEARN_THREADS),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},vm={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.SKLEARN_RIDGE_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendValueInput("alpha").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.SKLEARN_REGULA_INTENSITY),this.appendValueInput("fit_intercept").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.SKLEARN_CALCULATE_MODEL_INTERRUPT),this.appendValueInput("normalize").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.SKLEARN_REGRESSION_NORMIALIZATION),this.appendValueInput("max_iter").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.SKLEARN_MAX_ITER),this.appendValueInput("random_state").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},wm={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.SKLEARN_DECISIONTREE_INIT).appendField(new Jt.FieldDropdown([[Jt.Msg.SKLEARN_CLASSIFICATION_ALGORITHM,"DecisionTreeClassifier"],[Jt.Msg.SKLEARN_REGRESSION_ALGORITHM,"DecisionTreeRegressor"]]),"type"),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendValueInput("max_depth").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.SKLEARN_MAXIMUM_TREE_DEPTH),this.appendValueInput("random_state").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Sm={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.SKLEARN_RANDOMFOREST_INIT).appendField(new Jt.FieldDropdown([[Jt.Msg.SKLEARN_CLASSIFICATION_ALGORITHM,"RandomForestClassifier"],[Jt.Msg.SKLEARN_REGRESSION_ALGORITHM,"RandomForestRegressor"]]),"type"),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendValueInput("n_estimators").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_TREES),this.appendValueInput("max_depth").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.SKLEARN_MAXIMUM_TREE_DEPTH),this.appendValueInput("n_jobs").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.SKLEARN_THREADS),this.appendValueInput("random_state").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},xm={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.SKLEARN_KNN_INIT).appendField(new Jt.FieldDropdown([[Jt.Msg.SKLEARN_CLASSIFICATION_ALGORITHM,"KNeighborsClassifier"],[Jt.Msg.SKLEARN_REGRESSION_ALGORITHM,"KNeighborsRegressor"]]),"type"),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendValueInput("K").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField("K"),this.appendValueInput("n_jobs").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.SKLEARN_THREADS),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Rm={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.SKLEARN_GAUSSINNB_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Om={init:function(){this.appendDummyInput().appendField("sklearn 初始化 PCA 算法"),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendValueInput("n_components").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.SKLEARN_PCA_N_COMPONENTS),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Am={init:function(){this.appendDummyInput().appendField("sklearn PCA 降维"),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.EIGENVALUES),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Mm={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.SKLEARN_KMEANS_INIT),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendValueInput("n_clusters").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.NUMBER_OF_CLUSTERS_JUST),this.appendValueInput("max_iter").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.SKLEARN_MAX_ITER),this.appendValueInput("random_state").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.RANDOM_SEED),this.setInputsInline(!1),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Cm={init:function(){this.appendDummyInput().appendField("sklearn K-均值聚类"),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.EIGENVALUES),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Nm={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.TRAINING_MODEL),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.EIGENVALUES),this.appendValueInput("train_target").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.LABEL_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},km={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.TRAINING_MODEL),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.EIGENVALUES),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Dm={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.MODEL_PRODICTION),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.EIGENVALUES),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Lm={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.CALCULATE_THE_SCORE),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.EIGENVALUES),this.appendValueInput("train_target").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.LABEL_VALUE),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Fm={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.CALCULATE_THE_SCORE),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendValueInput("train_data").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.EIGENVALUES),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Pm={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.SKLEARN_GENERALIZED_LINEAR_REGRESSION),this.appendValueInput("model_name").setAlign(Jt.inputs.Align.RIGHT).setCheck(null).appendField(Jt.Msg.MODEL_NAME),this.appendDummyInput().setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MIXLY_GET).appendField(new Jt.FieldDropdown([[Jt.Msg.SKLEARN_COEF,"coef_"],[Jt.Msg.SKLEARN_INTERCEPT,"intercept_"]]),"type"),this.setOutput(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},$m={init:function(){this.appendDummyInput().appendField("sklearn "+Jt.Msg.SKLEARN_CLUSTERING),this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MODEL_NAME),this.appendDummyInput().appendField(Jt.Msg.MIXLY_GET).appendField(new Jt.FieldDropdown([[Jt.Msg.SKLEARN_CLUSTER_CENTER,"cluster_centers_"],[Jt.Msg.SKLEARN_LABELS_AFTER_CLUSTERING,"labels_"],[Jt.Msg.SKLEARN_CLUSTERING_SUM_OF_SQUARED_DISTANCES,"inertia_"]]),"type"),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Bm={init:function(){this.appendValueInput("model_name").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField("sklearn").appendField(new Jt.FieldDropdown([[Jt.Msg.SKLEARN_SAVE_MODEL,"dump"],[Jt.Msg.SKLEARN_LOAD_MODEL,"load"]]),"type").appendField(" "+Jt.Msg.MODEL_NAME),this.appendValueInput("address").setCheck(null).setAlign(Jt.inputs.Align.RIGHT).appendField(Jt.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(fm),this.setTooltip(""),this.setHelpUrl("")}},Vm=120,Um={init:function(){this.setColour(Vm),this.appendValueInput("DELAY_TIME",Number).appendField(Jt.Msg.MIXLY_DELAY+"("+Jt.Msg.MIXLY_MILLIS+")").setCheck(Number),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_CONTROL_DELAY)}},Ym={init:function(){this.setColour(Vm),this.appendDummyInput().appendField(Jt.Msg.blockpy_time_time),this.setOutput(!0,Number),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_CONTROL_MILLIS)}},Gm={init:function(){this.setColour(Vm),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME),this.appendDummyInput().appendField(new Jt.FieldDropdown([[Jt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_ALL,"all"],[Jt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_YEAR,"0"],[Jt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_MONTH,"1"],[Jt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_DATE,"2"],[Jt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_HOUR,"3"],[Jt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_MINUTE,"4"],[Jt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_SECOND,"5"],[Jt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_INWEEK,"6"],[Jt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_INYEAR,"7"],[Jt.Msg.MIXLY_SYSTEM_TIME_LOCALTIME_DST,"8"]]),"op"),this.setOutput(!0),this.setInputsInline(!0)}},Hm={init:function(){this.setColour(Vm),this.appendValueInput("STATUS_CODE",Number).appendField(Jt.Msg.MIXLY_MICROBIT_Panic_with_status_code).setCheck(Number),this.setPreviousStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_CONTROL_DELAY)}},Wm={init:function(){this.setColour(Vm),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MICROBIT_Reset_micro),this.setPreviousStatement(!0)}},zm={init:function(){this.setColour(Vm),this.appendValueInput("TIME").setCheck(Number).setAlign(Jt.inputs.Align.RIGHT).appendField("MsTimer2").appendField(Jt.Msg.MIXLY_MSTIMER2_EVERY),this.appendDummyInput().appendField("ms"),this.appendStatementInput("DO").appendField(Jt.Msg.MIXLY_MSTIMER2_DO),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Xm={init:function(){this.setColour(Vm),this.appendDummyInput().appendField("MsTimer2").appendField(Jt.Msg.MIXLY_MSTIMER2_START),this.setPreviousStatement(!0),this.setNextStatement(!0)}},jm={init:function(){this.setColour(Vm),this.appendDummyInput().appendField("MsTimer2").appendField(Jt.Msg.MIXLY_STOP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},qm={init:function(){this.setColour(Vm),this.appendValueInput("DELAY_TIME",Number).appendField(Jt.Msg.MIXLY_DELAY).setCheck(Number),this.appendDummyInput().appendField(Jt.Msg.MIXLY_SECOND),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_CONTROL_DELAY)}},Km=180,Qm={init:function(){this.setColour(Km),this.appendDummyInput("").appendField(Jt.Msg.blockpy_turtle_create).appendField(new Jt.FieldTextInput("tina"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.blockpy_turtle_create_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Jm={init:function(){this.setColour(Km),this.appendDummyInput().appendField(Jt.Msg.blockpy_TURTLE_DONE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zm={init:function(){this.setColour(Km),this.appendDummyInput().appendField(Jt.Msg.MIXLY_PYTHON_TURTLE_EXITONCLICK),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},tg={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[Jt.Msg.blockpy_forward,"forward"],[Jt.Msg.blockpy_backward,"backward"]];this.setColour(Km),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_MICROBIT_JS_MOVE_BY).appendField(new Jt.FieldDropdown(t),"DIR").appendField(Jt.Msg.MIXLY_MICROBIT_JS_MOVE_BY_num),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{forward:Jt.Msg.MIXLY_TOOLTIP_TURTEL_FORWARD,backward:Jt.Msg.MIXLY_TOOLTIP_TURTEL_BACKWARD}[t]}))}},eg={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[Jt.Msg.blockpy_left,"left"],[Jt.Msg.blockpy_right,"right"]];this.setColour(Km),this.appendValueInput("VAR").appendField(Jt.Msg.blockpy_turtle_rotate).appendField(new Jt.FieldDropdown(t),"DIR").appendField(Jt.Msg.MIXLY_MICROBIT_JS_BY_ANGLE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{left:Jt.Msg.MIXLY_TOOLTIP_TURTEL_LEFT,right:Jt.Msg.MIXLY_TOOLTIP_TURTEL_RIGHT}[t]}))}},ng={init:function(){this.setColour(Km),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(Jt.Msg.blockpy_setheading),this.appendDummyInput().appendField(Jt.Msg.blockpy_setheading_degree),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ig={init:function(){this.setColour(Km),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(Jt.Msg.MIXLY_TURTLE_SCREEN_DELAY),this.appendDummyInput().appendField(Jt.Msg.MIXLY_MILLIS),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_TURTEL_SCREEN_DELAY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},sg={init:function(){this.setColour(Km),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(Jt.Msg.blockpy_turtle_goto),this.appendValueInput("val").setCheck(Number).appendField(Jt.Msg.blockpy_turtle_goto_y),this.appendDummyInput().appendField(Jt.Msg.blockpy_turtle_goto_position),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},rg={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[Jt.Msg.PYLAB_LABEL_X,"x"],[Jt.Msg.PYLAB_LABEL_Y,"y"]];this.setColour(Km),this.appendValueInput("VAR").appendField(new Jt.FieldDropdown(t),"DIR").appendField(Jt.Msg.MIXLY_MIXPY_TURTLE_SETXY),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.MIXLY_MIXPY_TURTLE_SETXY_TOOLTIP)}},ag={init:function(){this.setColour(Km);var t=[[Jt.Msg.TURTLE_POS,"pos"],[Jt.Msg.TURTLE_SHAPE,"shape"],[Jt.Msg.TURTLE_HEADING,"heading"],[Jt.Msg.MIXLY_MIXPY_TURTLE_WIDTH,"width"],[Jt.Msg.MIXLY_TURTEL_GET_SHAPESIZE,"shapesize"],[Jt.Msg.MIXLY_SPEED,"speed"]];this.appendValueInput("TUR").setCheck("Turtle"),this.appendDummyInput("").appendField(Jt.Msg.TURTLE_POS_SHAPE).appendField(new Jt.FieldDropdown(t),"DIR");var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{pos:Jt.Msg.MIXLY_TOOLTIP_TURTEL_POS,shape:Jt.Msg.MIXLY_TOOLTIP_TURTEL_SHAPE,heading:Jt.Msg.MIXLY_TOOLTIP_TURTEL_HEADING,width:Jt.Msg.MIXLY_TOOLTIP_TURTEL_WIDTH,speed:Jt.Msg.MIXLY_TOOLTIP_TURTEL_GET_SPEED,shapesize:Jt.Msg.MIXLY_TURTEL_GET_SHAPESIZE_TOOLTIP}[t]})),this.setOutput(!0),this.setInputsInline(!0)}},og={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[Jt.Msg.MIXLY_LCD_STAT_CLEAR,"clear"],[Jt.Msg.blockpy_turtle_reset,"reset"],[Jt.Msg.blockpy_turtle_home,"home"]];this.setColour(Km),this.appendDummyInput("").appendField(new Jt.FieldDropdown(t),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{clear:Jt.Msg.MIXLY_TOOLTIP_TURTEL_CLEAR,reset:Jt.Msg.MIXLY_TOOLTIP_TURTEL_RESET,home:Jt.Msg.MIXLY_TOOLTIP_TURTEL_HOME}[t]}))}},lg={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[Jt.Msg.blockpy_turtle_penup,"penup"],[Jt.Msg.blockpy_turtle_pendown,"pendown"]];this.setColour(Km),this.appendDummyInput("").appendField(new Jt.FieldDropdown(t),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{penup:Jt.Msg.MIXLY_TOOLTIP_TURTEL_PENUP,pendown:Jt.Msg.MIXLY_TOOLTIP_TURTEL_PENDOWN}[t]}))}},ug={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[Jt.Msg.blockpy_turtle_beginfill,"begin"],[Jt.Msg.blockpy_turtle_endfill,"end"]];this.setColour(Km),this.appendDummyInput("").appendField(new Jt.FieldDropdown(t),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{begin:Jt.Msg.MIXLY_TOOLTIP_TURTEL_BEGINFILL,end:Jt.Msg.MIXLY_TOOLTIP_TURTEL_ENDFILL}[t]}))}},hg={init:function(){this.appendDummyInput("").appendField(new Jt.FieldTextInput("tina"),"TUR");var t=[[Jt.Msg.blockpy_turtle_size,"pensize"],[Jt.Msg.MIXLY_SPEED,"speed"]];this.setColour(Km),this.appendValueInput("VAR").appendField(Jt.Msg.blockpy_turtle_set).appendField(new Jt.FieldDropdown(t),"DIR").appendField(Jt.Msg.blockpy_turtle_set_num),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{pensize:Jt.Msg.MIXLY_TOOLTIP_TURTEL_SIZE,speed:Jt.Msg.MIXLY_TOOLTIP_TURTEL_SPEED}[t]}))}},pg={init:function(){this.setColour(Km),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(Jt.Msg.blockpy_turtle_set_size),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_TURTEL_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},cg={init:function(){this.setColour(Km),this.appendValueInput("TUR").setCheck("Turtle"),this.appendValueInput("data").setCheck(Number).appendField(Jt.Msg.blockpy_turtle_set_speed),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_TURTEL_SPEED),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},dg={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[Jt.Msg.blockpy_turtle_circle,"circle"],[Jt.Msg.blockpy_turtle_dot,"dot"]];this.setColour(Km),this.appendValueInput("VAR").appendField(Jt.Msg.blockpy_turtle_draw).appendField(new Jt.FieldDropdown(t),"DIR").appendField(Jt.Msg.blockpy_turtle_radius),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{circle:Jt.Msg.MIXLY_TOOLTIP_TURTEL_CIRCLE,dot:Jt.Msg.MIXLY_TOOLTIP_TURTEL_DOT}[t]}))}},fg={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(Km),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_MIXPY_TURTLE_DRAW_CIRCLE).appendField(Jt.Msg.blockpy_turtle_radius),this.appendValueInput("data").setCheck(Number).appendField(Jt.Msg.blockpy_turtle_angle),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_TURTEL_CIRCLE)}},mg={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[Jt.Msg.blockpy_turtle_hide,"hideturtle"],[Jt.Msg.blockpy_turtle_show,"showturtle"]];this.setColour(Km),this.appendDummyInput("").appendField(new Jt.FieldDropdown(t),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{hideturtle:Jt.Msg.MIXLY_TOOLTIP_TURTEL_HIDE,showturtle:Jt.Msg.MIXLY_TOOLTIP_TURTEL_SHOW}[t]}))}},gg={init:function(){this.setColour(Km),this.appendDummyInput().appendField(Jt.Msg.blockpy_turtle_bgcolor).appendField(new Jt.FieldColour("#ff0000"),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},_g={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(Km),this.appendDummyInput().appendField(Jt.Msg.blockpy_turtle_pencolor).appendField(new Jt.FieldColour("#ff0000"),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tg={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(Km),this.appendDummyInput().appendField(Jt.Msg.blockpy_turtle_fillcolor).appendField(new Jt.FieldColour("#ff0000"),"FIELDNAME"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yg={init:function(){this.setColour(Km),this.appendValueInput("TUR").setCheck("Turtle"),this.appendDummyInput("").appendField(Jt.Msg.TURTLE_CLONE),this.setTooltip(Jt.Msg.TURTLE_CLONE_TOOLTIP),this.setOutput(!0)}},Ig={init:function(){this.setColour(Km),this.appendValueInput("VAR").setCheck(String).appendField(Jt.Msg.blockpy_turtle_bgcolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Eg={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(Km),this.appendValueInput("VAR").setCheck(String).appendField(Jt.Msg.blockpy_turtle_pencolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bg={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(Km),this.appendValueInput("VAR").setCheck(String).appendField(Jt.Msg.blockpy_turtle_fillcolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vg={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(Km),this.appendDummyInput().appendField(Jt.Msg.blockpy_turtle_pencolor).appendField(new Jt.FieldColour("#ff0000"),"FIELDNAME"),this.appendDummyInput().appendField(Jt.Msg.blockpy_turtle_fillcolor).appendField(new Jt.FieldColour("#ff0000"),"FIELDNAME2"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wg={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(Km),this.appendValueInput("VAR1").setCheck(String).appendField(Jt.Msg.blockpy_turtle_pencolor),this.appendValueInput("VAR2").setCheck(String).appendField(Jt.Msg.blockpy_turtle_fillcolor),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Sg={init:function(){this.setColour(Km),this.appendValueInput("VAR").setCheck(String).appendField(Jt.Msg.blockpy_turtle_bgcolor_hex),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},xg={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(Km),this.appendValueInput("VAR").setCheck(String).appendField(Jt.Msg.blockpy_turtle_pencolor_hex),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rg={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(Km),this.appendValueInput("VAR").setCheck(String).appendField(Jt.Msg.blockpy_turtle_fillcolor_hex),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Og={init:function(){this.appendValueInput("TUR").setCheck("Turtle");var t=[[Jt.Msg.blockpy_turtle_shape_arrow,"arrow"],[Jt.Msg.blockpy_turtle_shape_turtle,"turtle"],[Jt.Msg.blockpy_turtle_shape_circle,"circle"],[Jt.Msg.blockpy_turtle_shape_square,"square"],[Jt.Msg.blockpy_turtle_shape_triangle,"triangle"],[Jt.Msg.blockpy_turtle_shape_classic,"classic"]];this.setColour(Km),this.appendDummyInput("").appendField(Jt.Msg.blockpy_turtle_shape).appendField(new Jt.FieldDropdown(t),"DIR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.TURTLE_SHAPE_TOOLTIP)}},Ag={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(Km),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_TURTEL_SHAPESIZE),this.appendValueInput("WID").setCheck(Number).appendField(Jt.Msg.MIXLY_TURTEL_SHAPESIZE_WID),this.appendValueInput("LEN").setCheck(Number).appendField(Jt.Msg.MIXLY_TURTEL_SHAPESIZE_LEN),this.appendValueInput("OUTLINE").setCheck(Number).appendField(Jt.Msg.MIXLY_TURTEL_SHAPESIZE_OUTLINE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.MIXLY_TOOLTIP_SHAPESIZE)}},Mg={init:function(){this.appendDummyInput("").appendField(Jt.Msg.MIXLY_MIXPY_TURTLE_NUMINPUT),this.setColour(Km),this.appendValueInput("TITLE").setCheck(String).appendField(Jt.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_TITLE),this.appendValueInput("PROMPT").setCheck(String).appendField(Jt.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_PROMPT),this.appendValueInput("DEFAULT").setCheck(Number).appendField(Jt.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("MIN").setCheck(Number).appendField(Jt.Msg.MATH_ONLIST_OPERATOR_MIN),this.appendValueInput("MAX").setCheck(Number).appendField(Jt.Msg.MATH_ONLIST_OPERATOR_MAX),this.setInputsInline(!0),this.setOutput(!0,Number),this.setTooltip(Jt.Msg.TURTLE_NUMINPUT_TOOLTIP)}},Cg={init:function(){this.appendDummyInput("").appendField(Jt.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT),this.setColour(Km),this.appendValueInput("TITLE").setCheck(String).appendField(Jt.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_TITLE),this.appendValueInput("PROMPT").setCheck(String).appendField(Jt.Msg.MIXLY_MIXPY_TURTLE_TEXTINPUT_PROMPT),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Jt.Msg.TURTLE_TEXTINPUT_TOOLTIP)}},Ng={init:function(){this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(Km),this.appendValueInput("VAR").setCheck(String).appendField(Jt.Msg.blockpy_turtle_write),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.TURTLE_WRITE_TOOLTIP)}},kg={init:function(){var t=[[Jt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"],[Jt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"]],e=[[Jt.Msg.MIXLY_TURTLE_WRITE_ALIGN_LEFT,"left"],[Jt.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[Jt.Msg.MIXLY_TURTLE_WRITE_ALIGN_RIGHT,"right"]],n=[[Jt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_NORMAL,"normal"],[Jt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_BOLD,"bold"],[Jt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_ITALIC,"italic"],[Jt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_BOLD_ITALIC,'bold","italic']];this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(Km),this.appendValueInput("VAR").setCheck(String).appendField(Jt.Msg.blockpy_turtle_write),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_TURTLE_WRITE_MOVE).appendField(new Jt.FieldDropdown(t),"MOVE"),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_TURTLE_WRITE_ALIGN).appendField(new Jt.FieldDropdown(e),"ALIGN"),this.appendValueInput("FONTNAME").setCheck(String).appendField(Jt.Msg.MIXLY_TURTLE_WRITE_FONT_NAME),this.appendValueInput("FONTNUM").setCheck(Number).appendField(Jt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE).appendField(new Jt.FieldDropdown(n),"FONTTYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.TURTLE_WRITE_TOOLTIP)}},Dg={init:function(){var t=[[Jt.Msg.MIXLY_TURTLE_WRITE_MOVE_FALSE,"False"],[Jt.Msg.MIXLY_TURTLE_WRITE_MOVE_TRUE,"True"]],e=[[Jt.Msg.MIXLY_TURTLE_WRITE_ALIGN_LEFT,"left"],[Jt.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[Jt.Msg.MIXLY_TURTLE_WRITE_ALIGN_RIGHT,"right"]],n=[[Jt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_NORMAL,"normal"],[Jt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_BOLD,"bold"],[Jt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE_ITALIC,"italic"]];this.appendValueInput("TUR").setCheck("Turtle"),this.setColour(Km),this.appendValueInput("VAR").setCheck(String).appendField(Jt.Msg.blockpy_turtle_write),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_TURTLE_WRITE_MOVE).appendField(new Jt.FieldDropdown(t),"MOVE"),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_TURTLE_WRITE_ALIGN).appendField(new Jt.FieldDropdown(e),"ALIGN"),this.appendValueInput("FONTNAME").setCheck(String).appendField(Jt.Msg.MIXLY_TURTLE_WRITE_FONT_NAME),this.appendValueInput("FONTNUM").setCheck(Number).appendField(Jt.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_TURTLE_WRITE_FONT_TYPE).appendField(new Jt.FieldDropdown(n),"FONTTYPE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.TURTLE_WRITE_TOOLTIP)}},Lg={init:function(){this.setColour(Km),this.appendDummyInput("").setAlign(Jt.inputs.Align.RIGHT).appendField(new Jt.FieldColour("ff0000"),"COLOR"),this.setInputsInline(!0),this.setOutput(!0,String)}},Fg={init:function(){this.setColour(Km),this.appendValueInput("TUR").setCheck("Turtle"),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_TURTEL_GETSCREEN).appendField(new Jt.FieldTextInput("screen"),"VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Jt.Msg.MIXLY_TURTEL_GETSCREEN_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Jt.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Pg={init:function(){this.setColour(Km),this.appendValueInput("TUR"),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_TURTEL_EVENT_ONKEY),this.appendValueInput("callback").appendField(Jt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_TURTEL_EVENT_ONKEY_TOOLTIP)}},$g={init:function(){this.setColour(Km),this.appendValueInput("TUR"),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_TURTEL_EVENT_ONCLICK),this.appendValueInput("callback").appendField(Jt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_TURTEL_EVENT_ONCLICK_TOOLTIP)}},Bg={init:function(){this.setColour(Km),this.appendValueInput("TUR"),this.appendValueInput("VAR").appendField(Jt.Msg.MIXLY_TURTEL_EVENT_ONTIMER),this.appendDummyInput("").appendField(Jt.Msg.MIXLY_mSecond),this.appendValueInput("callback").appendField(Jt.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Jt.Msg.MIXLY_TURTEL_EVENT_ONTIMER_TOOLTIP)}},Vg={init:function(){this.setColour(Km),this.appendValueInput("TUR"),this.appendDummyInput().appendField(Jt.Msg.MIXLY_TURTEL_SCREEN_LISTEN),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ug={init:function(){this.setColour(Km),this.appendValueInput("TUR"),this.appendValueInput("FILE").setCheck(String).appendField(Jt.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Jt.Msg.mixpy_TURTLE_SAVEFIG_TOOLTIP)}},Yg=function(t,e){var n=this.getFieldValue("TYPE");return e.definitions_.import_FileDialog="import FileDialog",["FileDialog."+n+"()",e.ORDER_ATOMIC]},Gg=function(t,e){var n=this.getFieldValue("CTYPE");return e.definitions_.import_aip="import aip",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = aip."+n+"("+e.valueToCode(this,"API_KEY",e.ORDER_ATOMIC)+", "+e.valueToCode(this,"SECRET_KEY",e.ORDER_ATOMIC)+")\n"},Hg=function(t,e){return e.definitions_.import_aip="import aip",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".synthesis("+e.valueToCode(this,"STR",e.ORDER_ATOMIC)+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},Wg=function(t,e){return e.definitions_.import_aip="import aip",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".asr("+(e.valueToCode(this,"FILE",e.ORDER_ATOMIC)||'""')+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},zg=function(t,e){e.definitions_.import_aip="import aip";var n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),i=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return[n+"."+e.valueToCode(this,"FUNC",e.ORDER_ATOMIC)+"("+i+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},Xg=function(t,e){return e.definitions_.import_aip="import aip",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".match("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"VAR2",e.ORDER_ATOMIC)+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},jg=function(t,e){e.definitions_.import_aip="import aip";var n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),i=e.valueToCode(this,"ADDR",e.ORDER_ATOMIC);return[n+"."+e.valueToCode(this,"FUNC",e.ORDER_ATOMIC)+"("+i+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},qg=function(t,e){e.definitions_.import_aip="import aip";var n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),i=e.valueToCode(this,"STR",e.ORDER_ATOMIC);return[n+"."+e.valueToCode(this,"FUNC",e.ORDER_ATOMIC)+"("+i+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},Kg=function(t,e){e.definitions_.import_aip="import aip";var n=e.valueToCode(this,"SUB",e.ORDER_ATOMIC),i=e.valueToCode(this,"STR1",e.ORDER_ATOMIC),s=e.valueToCode(this,"STR2",e.ORDER_ATOMIC);return[n+"."+e.valueToCode(this,"FUNC",e.ORDER_ATOMIC)+"("+i+","+s+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},Qg=function(t,e){return e.definitions_.import_aip="import aip",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".topic("+e.valueToCode(this,"STR1",e.ORDER_ATOMIC)+","+e.valueToCode(this,"STR2",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Jg=function(t,e){return e.definitions_.import_aip="import aip",[e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+".newsSummary("+e.valueToCode(this,"STR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"LEN",e.ORDER_ATOMIC)+", options="+(e.valueToCode(this,"ATTR",e.ORDER_ATOMIC)||"{}")+")",e.ORDER_ATOMIC]},Zg=function(t,e){return[this.getFieldValue("TYPE"),e.ORDER_ATOMIC]},t_=function(t,e){return[this.getFieldValue("TYPE"),e.ORDER_ATOMIC]},e_=function(t,e){return[this.getFieldValue("TYPE"),e.ORDER_ATOMIC]},n_=function(t,e){return[this.getFieldValue("TYPE"),e.ORDER_ATOMIC]},i_=function(t,e){return e.definitions_.import_audio="import audio","audio.audio_record("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+","+(e.valueToCode(this,"TIME",e.ORDER_ATOMIC)||"0")+")\n"},s_=function(t,e){return e.definitions_.import_audio="import cam","cam.photo_capture("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||'""')+","+(e.valueToCode(this,"BUT",e.ORDER_ATOMIC)||'""')+")\n"},r_=function(t,e){var n=e.valueToCode(this,"AI",e.ORDER_ASSIGNMENT)||"0",i=this.getFieldValue("CTYPE");if("Image"==i)var s=n+'["result"][0]["keyword"]';if("Speech"==i)s=n+'["result"][0]';if("Face"==i||"OcrSimilarity"==i)s=n+'["score"]';if("Ocr"==i)s=n+'["words_result"]';return[s,e.ORDER_ATOMIC]},a_=function(t,e){e.definitions_.import_sprite="import sprite";return"g = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,1,0,0,0,0,0,0], [0,0,0,1,0,0,1,0,0,0], [0,1,1,0,1,1,0,0,0,0], [0,0,0,1,0,0,0,1,0,0], [0,0,0,1,0,0,1,1,0,0], [0,0,1,0,0,1,0,1,0,0], [0,0,0,0,1,1,1,0,0,0]]\nmark = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0]]\nvis = [0,1,0,0,0,0,0,0,0]\nposition = [[0, 0], [200, 200], [250, 60], [320, 200], [280, 380], [470, 250], [670, 90], [650, 340]]\nsprite.clearAllSprites()\nsprite.createBackground('ditu')\nmask = sprite.Sprite('white', 96, 354)\nmask.hide()\nhouse = [\n sprite.Sprite('mark', 150, 380),\n sprite.Sprite('xtxn', 96, 170),\n sprite.Sprite('xnvijx', 270, 45),\n sprite.Sprite('xnxbjx', 310, 182),\n sprite.Sprite('xnsijx', 300, 370),\n sprite.Sprite('xnkejx', 495, 220),\n sprite.Sprite('bwbwjx', 716, 85),\n sprite.Sprite('lelejx', 686, 314)\n]\nfor i in house:\n i.filterBrighter()\n i.hide()\n"},o_=function(){return"path = [1]\nmask.show()\ncar = sprite.Sprite('xnie', position[1][0], position[1][1])\nhouse[1].show()\ncar.nowPos = 1\ndef drive(n):\n if g[car.nowPos][n]==1:\n car.slideTo(position[n][0], position[n][1], 1)\n car.nowPos = n\n else:\n print('移动失败!程序有误!')\n exit()\n"},l_=function(t,e){e.definitions_.import_random="import random";return"f = path[(len(path) - 1)]\nflag = 0\nfor _my_variable in [6,5,4,3,2,1,0]:\n if vis[_my_variable+1] == 0 and g[f][_my_variable+1] == 1:\n if mark[f][_my_variable+1] == 0:\n flag = 1\n break\n"},u_=function(t,e){return["flag == 1",e.ORDER_ATOMIC]},h_=function(){return"mark[f][_my_variable+1] = 1\nvis[_my_variable+1] = 1\n"},p_=function(){return"path.append(_my_variable+1)\ndrive(path[len(path) - 1])\nhouse[_my_variable+1].show()\n"},c_=function(t,e){e.definitions_.import_time="import time";return"del path[len(path) - 1]\nhouse[0].show()\ntime.sleep(0.5)\nhouse[0].hide()\n"},d_=function(){var t="for i in range(7):\n mark[f][i+1] = 0\n vis[f] = 0\n";return t="house[f].hide()\ndrive(path[len(path) - 1])\n"+t},f_=function(t,e){return["len(path) == 7",e.ORDER_ATOMIC]},m_=function(){return'name = ["","学校","小智家","小欣家","小思家","小科家","贝贝家","乐乐家"]\nres = ""\nfor i in path:\n res = res + name[i] + "-"\nprint(res[:-1])\n'},g_=function(t,e){e.definitions_.import_sprite="import sprite";return"g = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,1,0,0,0,0,0,0], [0,0,0,1,0,0,1,0,0,0], [0,1,1,0,1,0,0,0,0,0], [0,0,0,1,0,0,0,1,0,0], [0,0,0,1,0,0,0,1,0,0], [0,0,1,0,0,0,0,1,0,0], [0,0,0,0,1,1,1,0,0,0]]\nmark = [[0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0]]\nvis = [0,1,0,0,0,0,0,0,0]\nposition = [[0, 0], [200, 200], [250, 60], [320, 200], [280, 380], [470, 250], [670, 90], [650, 340]]\nsprite.clearAllSprites()\nsprite.createBackground('ditu')\nmask = sprite.Sprite('white', 96, 354)\nmask.hide()\nhouse = [\n sprite.Sprite('mark', 150, 380),\n sprite.Sprite('xtxn', 96, 170),\n sprite.Sprite('xnvijx', 270, 45),\n sprite.Sprite('xnxbjx', 310, 182),\n sprite.Sprite('xnsijx', 300, 370),\n sprite.Sprite('xnkejx', 495, 220),\n sprite.Sprite('bwbwjx', 716, 85),\n sprite.Sprite('lelejx', 686, 314)\n]\nbarricade = sprite.Sprite('barricade', 610, 170)\nbarricade.enlargeTo(100)\nfor i in house:\n i.filterBrighter()\n i.hide()\n"},__=function(t,e){return["f == 1",e.ORDER_ATOMIC]},T_=function(){return"print('没有符合条件的路线')\n"},y_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return'g = [[10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000],[10000,10000,500,300,10000,10000,10000,10000,10000,10000,10000],[10000,500,10000,10000,100,10000,10000,10000,10000,10000,10000],[10000,300,10000,10000,400,300,10000,10000,10000,10000,10000],[10000,10000,100,400,10000,10000,200,10000,10000,10000,10000],[10000,10000,10000,300,10000,10000,100,200,10000,10000,10000],[10000,10000,10000,10000,200,100,10000,10000,100,10000,10000],[10000,10000,10000,10000,10000,200,10000,10000,100,10000,10000],[10000,10000,10000,10000,10000,10000,100,100,10000,10000,10000]]\nnow=1\nlast=1\npath=[]\npath.append(1)\nname = ["","小思家","银行","邮局","餐厅","书店","医院","超市","小科家"]\nposition = [[0, 0], [60, 320], [510, 390], [240, 200], [750, 330], [410, 90], [540, 190], [550, 30], [720, 120]]\nsprite.clearAllSprites()\nsprite.createBackground(\'map_si_ke\')\nstu = sprite.Sprite(\'girl\', 60, 320)\nstu.enlargeTo(100)\ntime.sleep(1)\n\n'},I_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return'g =[[10000,10000,10000,10000,10000,10000,10000],[10000,10000,300,500,10000,10000,10000],[10000,300,10000,10000,300,700,10000],[10000,500,10000,10000,10000,100,10000],[10000,10000,300,10000,10000,10000,200],[10000,10000,700,100,10000,10000,100],[10000,10000,10000,10000,200,100,10000]]\nnow=1\nlast=1\npath=[]\npath.append(1)\nname = ["","小智家","邮局","银行","书店","餐厅","学校"]\nposition = [[0, 0], [70, 340], [70, 90], [550, 310], [420, 70], [730, 250], [650, 130]]\nsprite.clearAllSprites()\nsprite.createBackground(\'map_zhi_xue\')\nstu = sprite.Sprite(\'boy\', 70, 340)\nstu.enlargeTo(100)\ntime.sleep(1)\n\n'},E_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return'tmp=10000\nfor i in range(0, len(g), 1):\n if g[now][i]6:\n print("路线错乱!程序有误!")\n exit()\n'},b_=function(t,e){return["name[now] != '小科家'",e.ORDER_ATOMIC]},v_=function(t,e){return["name[now] != '学校'",e.ORDER_ATOMIC]},w_=function(){return'res = ""\nfor i in path:\n res = res + name[i] + "→"\nprint(res[:-1])\n'},S_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n=this.getFieldValue("NUM");if(n>=7)var i="print('层数过高!不得高于6层!')\nexit()\n";else i="sprite.clearAllSprites()\n_Hanoicolor = ['blue', 'red', 'yellow', 'green', 'purple', 'black']\n_Hanoi = [[], [], []]\nA = 0\nB = 1\nC = 2\n_n = "+n+"\n_HanoiColumn = [\n sprite.Sprite('HanoiColumn', 200, 320),\n sprite.Sprite('HanoiColumn', 400, 320),\n sprite.Sprite('HanoiColumn', 600, 320)\n]\n_HanoiColumnNumber = [\n sprite.Text('A', 190, 120),\n sprite.Text('B', 390, 120),\n sprite.Text('C', 590, 120)\n]\n_HanoiBlock = []\nfor i in range(0, _n, 1):\n _HanoiBlock.append(sprite.Sprite(_Hanoicolor[i], 200, 400-(_n-i-1)*27))\n _HanoiBlock[i].setScale(25, 30*i+30)\n _Hanoi[0].insert(0, _HanoiBlock[i])\n_steptext = sprite.Text('步数:0', 30, 30)\n_steps = {'steps' : 0}\ntime.sleep(1)\n";return i},x_=function(t,e){var n=e.valueToCode(this,"FROM_NUM",e.ORDER_ATOMIC)||"0",i=e.valueToCode(this,"TO_NUM",e.ORDER_ATOMIC)||"0";return`if len(_Hanoi[${n}])>0 :\n _HanoiBlockMoved = _Hanoi[${n}].pop()\n if len(_Hanoi[${i}]) > 0 :\n _HanoiBlockSuppressed = _Hanoi[${i}].pop()\n if _HanoiBlock.index(_HanoiBlockMoved) > _HanoiBlock.index(_HanoiBlockSuppressed):\n print('非法移动!程序有误!')\n exit()\n else:\n _Hanoi[${i}].append(_HanoiBlockSuppressed)\n _HanoiBlockMoved.slideTo(${n}*200+200, 180, 0.2)\n _HanoiBlockMoved.slideTo(${i}*200+200, 180, 0.5)\n _HanoiBlockMoved.slideTo(${i}*200+200, 400-len(_Hanoi[${i}])*27, 0.2)\n _Hanoi[${i}].append(_HanoiBlockMoved)\n _steps['steps'] += 1\n _steptext.changeText('步数:'+str(_steps['steps']))\nelse :\n print('非法移动!程序有误!')\n exit()\n`},R_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"if 'mode' not in globals() or mode == 0:\n sprite.clearAllSprites()\n ring=[0,0,0,0,0,0,0,0,0,0]\n mode=1\n n=5\n ring[5]=1\n name=['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\n Books = []\n for i in range(1, 11, 1):\n Books.append(sprite.Sprite('books/book'+str(i), (130*i-650) if i>5 else 130*i, 320 if i>5 else 120))\nelse:\n mode=2\n n=len(ring)-1\nring[n]=1\ntime.sleep(1)\n"},O_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"if 'mode' not in globals() or mode == 0:\n sprite.clearAllSprites()\n ring=[0,0,0,0,0,0,0,0,0,0]\n mode=2\n n=5\n name=['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\n Books = []\n for i in range(1, 11, 1):\n Books.append(sprite.Sprite('books/book'+str(i), (130*i-650) if i>5 else 130*i, 320 if i>5 else 120))\nelse:\n mode=1\n n=len(ring)-1\nring[n]=n\nlist=ring\ntemp=Books\ntime.sleep(1)\n"},A_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"res=0\nflag=ring[res]\nBooks[res].filterBrighter()\ntime.sleep(0.1)\nBooks[res].filterOrigin()\n"},M_=function(t,e){return["(('mode' not in globals())or(mode==1 and flag==0)or(mode==2 and not any(value > 0 for value in qian))or(mode==0))",e.ORDER_ATOMIC]},C_=function(t,e){return["(('mode' in globals())and((mode==1 and flag!=0)or(mode==2 and any(value > 0 for value in qian))))",e.ORDER_ATOMIC]},N_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n="res+=1\nflag=ring[res]\n";return n="Books[res].filterGray()\ntime.sleep(0.3)\n"+(n+="Books[res].filterBrighter()\ntime.sleep(0.1)\nBooks[res].filterOrigin()\n")},k_=function(t,e){return["len(list)>=2",e.ORDER_ATOMIC]},D_=function(){return"mid = int(len(list)/2)\nqian = list[0:mid]\nhou = list[mid:]\nqiantemp = temp[0:mid]\nhoutemp = temp[mid:]\n"},L_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"quchu = qian\nlist = hou\nquchutemp = qiantemp\ntemp = houtemp\nfor i in qiantemp:\n i.filterBrighter()\ntime.sleep(0.5)\nfor i in qiantemp:\n i.filterGray()\ntime.sleep(0.5)\n"},F_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"list = quchu\ntemp = quchutemp\nfor i in qiantemp:\n i.filterBrighter()\ntime.sleep(0.5)\nfor i in qiantemp:\n i.filterOrigin()\nfor i in houtemp:\n\ti.filterBrighter()\ntime.sleep(0.5)\nfor i in houtemp:\n i.filterGray()\ntime.sleep(0.5)\n"},P_=function(){return"if 'list' in globals():\n res = list[0]\nBooks[res].filterBrighter()\nprint('未消磁的书籍是第'+str(res+1)+'本《'+name[res%10]+'》。')\nif res!=n:\n print('答案错误!请检查程序!')\nmode=0\n"},$_=function(t,e){var n=this.getFieldValue("NUM");return e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite",`sprite.clearAllSprites()\nring = []\nname = ['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\nBooks = []\nfor i in range(${n}):\n ring.append(0)\nfor i in range(1, ${n}+1, 1):\n Books.append(sprite.Sprite('books/book'+str(i%10 if i%10!=0 else 10), ${{5:"130*i, 120",10:"(130*i-650) if i>5 else 130*i, 320 if i>5 else 120",20:"(65*i-650)+30 if i>10 else 65*i+30, 320 if i>10 else 120",50:"(26*i-650)+50 if i>25 else 26*i+50, 320 if i>25 else 120"}[n]}))\ntime.sleep(1)\nmode=3\n`},B_=function(t,e){e.definitions_.import_sprite="import sprite";return"cnt=0\ncntText = sprite.Text('计数器:0', 30, 200)\n"},V_=function(t,e){e.definitions_.import_sprite="import sprite";return"cnt+=1\ncntText.changeText('计数器:'+str(cnt))\n"},U_=function(t,e){e.definitions_.import_sprite="import sprite";return"print('计数器大小:'+str(cnt))\n"},Y_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\n_head = 10\n_foot = 32\n_footText = sprite.Text('脚的数量:', 20, 10)\n_sprite = []\n"},G_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_rabbit = 0\ntime.sleep(1)\n"},H_=function(t,e){return["_rabbit < _head",e.ORDER_ATOMIC]},W_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_chick = _head - _rabbit\nfor i in range(0, _chick, 1):\n _sprite.append(sprite.Sprite('jttl/chick', len(_sprite)*130+130 if len(_sprite)<5 else len(_sprite)*130+130-650, 120 if len(_sprite)<5 else 320))\n\ntime.sleep(0.5)\n_footText.changeText('脚的数量:'+str(_rabbit*4 + _chick*2))\ntime.sleep(1)\n"},z_=function(t,e){return["_rabbit*4 + _chick*2 == _foot",e.ORDER_ATOMIC]},X_=function(t,e){e.definitions_.import_sprite="import sprite";return"print('鸡的数量:'+str(_chick)+'只;\\n兔的数量:'+str(_rabbit)+'只。')\n"},j_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_rabbit += 1\nsprite.clearAllSprites()\n_sprite = []\n_footText = sprite.Text('脚的数量:', 20, 10)\nfor i in range(0, _rabbit, 1):\n _sprite.append(sprite.Sprite('jttl/rabbit', len(_sprite)*130+130 if len(_sprite)<5 else len(_sprite)*130+130-650, 120 if len(_sprite)<5 else 320))\ntime.sleep(0.5)\n"},q_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\nsprite.createBackground('/fzsf/map_ck_xxjsjs')\n_S1 = sprite.Sprite('/fzsf/S1',400,225,'S1')\n_S2 = sprite.Sprite('/fzsf/S2',400,225,'S2')\n_S3 = sprite.Sprite('/fzsf/S3',400,225,'S3')\n_S4 = sprite.Sprite('/fzsf/S4',400,225,'S4')\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\n_text_1 = sprite.Text('S1:',0,0,'text')\n_text_2 = sprite.Text('S2:',0,30,'text2')\n_text_3 = sprite.Text('S3:',0,60,'text3')\n_text_4 = sprite.Text('S4:',0,90,'text4')\n_position = [[60, 270], [240, 50], [260, 380], [440, 190], [730, 60], [700, 400]]\n_Llen = [0, 170, 230, 100, 150, 10, 30, 50]\n_Slen = [0, 0, 0, 0, 0]\n_tag = [0, [0, 1, 3], [0, 2, 3], [3, 4, 5], [3, 5]]\nbear = sprite.Sprite('mixbear',60,270,'bear')\nbear.enlargeTo(80)\n_pos = 0\ntime.sleep(1)\n"},K_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n=this.getFieldValue("PATHNAME");const i=[0,[1,3],[2,4],[5,7],[6]];var s="";return s+=`_S${n}.show()\ntime.sleep(1)\n`,s+=4!=n?`_Slen[${n}] = _Llen[${i[n][0]}] + _Llen[${i[n][1]}]\n_text_${n}.changeText('S${n}:'+str(_Slen[${n}])+'m')\ntime.sleep(1)\n_S${n}.hide()\ntime.sleep(1)\n`:"_Slen[4] = _Llen[6]\n_text_4.changeText('S4:'+str(_Slen[4])+'m')\ntime.sleep(1)\n_S4.hide()\ntime.sleep(1)\n"},Q_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n="";return[n+=`_Slen[${this.getFieldValue("PATHNAME")}] < _Slen[${this.getFieldValue("PATHNAME2")}]`,e.ORDER_ATOMIC]},J_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n=this.getFieldValue("PATHNAME"),i="";return i+=`\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\n_Smin = ${n}\n_S${n}.show()\ntime.sleep(0.5)\n_S${n}.hide()\ntime.sleep(0.5)\n_S${n}.show()\ntime.sleep(1)\n`},Z_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"if(_pos == _tag[_Smin][0]):\n for i in range(1, len(_tag[_Smin]), 1):\n bear.slideTo(_position[_tag[_Smin][i]][0], _position[_tag[_Smin][i]][1], 1)\n _pos = _tag[_Smin][len(_tag[_Smin])-1]\nelse:\n print('移动错误!程序有误!')\n exit()\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\nif(_pos == 5):\n print('成功抵达信息科技教室!')\n"},tT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\nsprite.createBackground('/hxdb/hxdbbg')\n_soldier = []\n_num = sprite.Text('目前士兵数量:0',0,0,'num')\n_last = sprite.Text('剩余:0',500,0,'last')\n_line = 3\n"},eT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n="";return n+=`for i in range(0, ${this.getFieldValue("NUM")}, 1):\n _soldier.append(sprite.Sprite('/hxdb/soldier', 30 + (len(_soldier)%_line)*50 + (len(_soldier)//(4*_line))*(_line+1)*50 +(len(_soldier)%3-2), 80+(len(_soldier)//_line)*100-(len(_soldier)//(4*_line))*4*100+(len(_soldier)%2)))\n_num.changeText('目前士兵数量:'+str(len(_soldier)))\n`},nT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n=this.getFieldValue("NUM");return`for i in range(0, len(_soldier), 1):\n _soldier[i].slideTo(30 + (i%${n})*50 + (i//(4*${n}))*(${n}+1)*50 +(i%3-2), 80+(i//${n})*100-(i//(4*${n}))*4*100+(i%2), 0.05)\n_line = ${n}\n_last.changeText('剩余:'+str(len(_soldier)%_line))\ntime.sleep(2)\n`},iT=function(t,e){return e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite",[`len(_soldier)%_line == ${this.getFieldValue("NUM")}`,e.ORDER_ATOMIC]},sT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_num.changeText('目前士兵数量:'+str(len(_soldier)+1))\n_last.changeText('剩余:')\ntime.sleep(0.5)\n_soldier.append(sprite.Sprite('/hxdb/soldier', 30 + (len(_soldier)%_line)*50 + (len(_soldier)//(4*_line))*(_line+1)*50 +(len(_soldier)%3-2), 80+(len(_soldier)//_line)*100-(len(_soldier)//(4*_line))*4*100+(len(_soldier)%2)))\ntime.sleep(1)\n"},rT=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"print('符合要求的士兵数量为:'+str(len(_soldier)))\n"},aT=function(t,e){e.definitions_.import_turtle="import turtle",e.definitions_.import_time="import time",e.definitions_.import_math="import math";var n=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),i=this.getFieldValue("NUM");return e.setups_.init_Hanoi="\ndef init_Hanoi():\n pen = turtle.Turtle()\n pen.hideturtle()\n pen.speed(0)\n for i in range(0, 3, 1):\n pen.penup()\n pen.setheading(0)\n pen.goto(150 * i - 200,-100)\n pen.pendown()\n pen.pensize(5)\n pen.forward(100)\n pen.goto(150 * i - 150,-100)\n pen.setheading(90)\n pen.forward(200)",e.setups_.begin="\ndef begin(): \n s = turtle.Turtle()\n s.hideturtle()\n s.penup()\n s.speed(0)\n s.goto(0,-150)\n s.write('3')\n time.sleep(1)\n s.clear()\n s.write('2')\n time.sleep(1)\n s.clear()\n s.write('1')\n time.sleep(1)\n s.clear()\n s.write('Start!')\n time.sleep(1)\n s.clear()\n",e.setups_.move="\ndef move(x, y):\n try:\n t = tower[x].pop(-1)\n a = tower_num[x].pop(-1)\n if tower_num[y]!=[]:\n b = tower_num[y][-1]\n if a 1"}]`,e.ORDER_ATOMIC]},By=function(t,e){return[`${e.valueToCode(t,"DICT",e.ORDER_ATOMIC)||"df"}.groupby(by=${e.valueToCode(t,"KEY",e.ORDER_ATOMIC)||"'tag'"})`,e.ORDER_ATOMIC]},Vy=function(t,e){return[`${e.valueToCode(t,"DICT",e.ORDER_ATOMIC)||"df"}.${t.getFieldValue("TYPE")}()`,e.ORDER_ATOMIC]},Uy=function(t,e){e.definitions_.import_matplotlib_pyplot="import matplotlib.pyplot as plt";return"plt.cla()\n"},Yy=function(t,e){var n=e.variableDB_.getName(this.getFieldValue("VAR"),Jt.Variables.NAME_TYPE),i=e.variableDB_.getName(this.getFieldValue("TYPE"),Jt.Variables.NAME_TYPE),s="class "+i+":\n";s+=" def __init__(self):\n";for(var r=new Array(this.itemCount_),a=0;a{},displayTag:!1,processingDisplayEvent:null,successDisplayEvents:[],successProcessingDisplayEvents:[],startTime:performance.now(),timer:0,lastFrameTime:null,lastSecond:null,targetFPS:60,frameCount:0,currentFPS:60,canvasHeight:450,canvasWidth:800,gameLoop:()=>{1==_b.state&&(_b.repeatPlay(),_b.gameLoopDisplay()),_b.timer=performance.now()-_b.startTime},animate:t=>{t-_b.lastFrameTime>=1e3/_b.targetFPS&&(_b.frameCount++,_b.gameLoop(),_b.renderer.render(_b.stage),_b.lastFrameTime=t),t-_b.lastSecond>=1e3&&(_b.currentFPS=_b.frameCount,_b.frameCount=0,_b.lastSecond=t),requestAnimationFrame(_b.animate)}};_b.createBackground=(t,e=0)=>{var n;return 0==e&&(n=new(gb().Sprite.fromImage)(`../common/media/spriteimg/${t}.png`)),n.name="background",n.anchor.set(.5),n.x=_b.canvasWidth/2,n.y=_b.canvasHeight/2,n.width=_b.canvasWidth,n.height=_b.canvasHeight,n.interactive=!0,n.buttonMode=!0,n.isDown=!1,n.isUp=!0,n.on("mousedown",(function(){this.isDown=!0,this.isUp=!1,_b.state&&this.runningMouseDown()})).on("mouseup",(function(){this.isDown=!1,this.isUp=!0})).on("mouseupoutside",(function(){this.isDown=!1,this.isUp=!0})),n.runningMouseDown=new Function(""),_b.backgroundSprite&&_b.backgroundSprite.parent&&_b.stage.removeChild(_b.backgroundSprite),_b.backgroundSprite=n,_b.stage.addChildAt(_b.backgroundSprite,0),0},_b.createASprite=(t,e=_b.canvasWidth/2,n=_b.canvasHeight/2,i="",s=0)=>{var r;return""==i&&(i="sprite"+ ++_b.counter),0==s&&(r=new(gb().Sprite.fromImage)(`../common/media/spriteimg/${t}.png`)),_b.sprites[i]||_b.texts[i]||(r.name=i,r.anchor.set(.5),r.x=e,r.y=n,r.interactive=!0,r.buttonMode=!0,r.isDown=!1,r.isUp=!0,r.on("mousedown",(function(t){this.isDown=!0,this.isUp=!1,_b.state?this.runningMouseDown():(this.data=t.data,this.alpha=.5,this.dragging=!0)})).on("mouseup",(function(){this.isDown=!1,this.isUp=!0,_b.state||(this.alpha=1,this.dragging=!1,this.data=null)})).on("mouseupoutside",(function(){this.isDown=!1,this.isUp=!0,_b.state||(this.alpha=1,this.dragging=!1,this.data=null)})).on("mousemove",(function(){if(!_b.state&&this.dragging){var t=this.data.getLocalPosition(this.parent);this.position.x=t.x,this.position.y=t.y}})),r.runningMouseDown=new Function(""),r.show=function(){this.visible=!0},r.hide=function(){this.visible=!1},r.enlarge=function(t){const e=this.height/this.width;var n=Math.sqrt(this.height*this.width);n+=t,this.width=Math.sqrt(n*n/e),this.height=this.width*e},r.enlargeTo=function(t){var e=this.height/this.width;this.width=Math.sqrt(t*t/e),this.height=this.width*e},r.expandTo=async function(t,e=1){if(_b.running){_b.displayTag=!0,_b.processingDisplayEvent={sprite:this,targetS:t,totalTime:1e3*e,startTime:performance.now(),displayType:"expand"};var n=new Promise((t=>{if(!1===_b.displayTag)t();else{const e=setInterval((()=>{!1===_b.displayTag&&(clearInterval(e),t())}),10)}}));return await n}return _b.successProcessingDisplayEvents.push({sprite:this,targetS:t,totalTime:1e3*e,startTime:performance.now(),displayType:"expand"}),0},r.move=function(t){this.x+=t*Math.cos(this.rotation),this.y+=t*Math.sin(this.rotation)},r.moveTo=function(t,e){this.x=t,this.y=e},r.slideTo=async function(t,e,n=1){if(_b.running){_b.displayTag=!0,_b.processingDisplayEvent={sprite:this,targetX:t,targetY:e,totalTime:1e3*n,startTime:performance.now(),displayType:"slide"};var i=new Promise((t=>{const e=setInterval((()=>{!1===_b.displayTag&&(clearInterval(e),t())}),10)}));return await i}return _b.successProcessingDisplayEvents.push({sprite:this,targetX:t,targetY:e,totalTime:1e3*n,startTime:performance.now(),displayType:"slide"}),0},r.addX=function(t){this.x+=t},r.addY=function(t){this.y+=t},r.rotate=function(t){this.rotation+=Math.PI/180*t},r.rotateTo=function(t){this.rotation=Math.PI/180*t},r.circleTo=async function(t,e=1){if(_b.running){_b.displayTag=!0,_b.processingDisplayEvent={sprite:this,targetDegree:t,totalTime:1e3*e,startTime:performance.now(),displayType:"circle"};var n=new Promise((t=>{if(!1===_b.displayTag)t();else{const e=setInterval((()=>{!1===_b.displayTag&&(clearInterval(e),t())}),10)}}));return await n}return _b.successProcessingDisplayEvents.push({sprite:this,targetDegree:t,totalTime:1e3*e,startTime:performance.now(),displayType:"circle"}),0},r.hit=function(t){return _b.hitTestRectangle(this,t)},r.outOfScreen=function(){return this.y>=_b.renderer.height||this.y<=0||this.x<=0||this.x>=_b.renderer.width},r.mouseAction=function(t){this.runningMouseDown=t},r.setScale=function(t=0,e=0){0==t&&(t=this.height),0==e&&(e=this.width),this.height=t,this.width=e},r.filterGray=function(){const t=new(gb().filters.ColorMatrixFilter);t.blackAndWhite(),this.filters=[t]},r.filterBrighter=function(){const t=new(gb().filters.ColorMatrixFilter);t.brightness(1.25),this.filters=[t]},r.filterOrigin=function(){this.filters=null},_b.stage.addChild(r),_b.sprites[i]=r),i},_b.clearAllSprites=()=>{_b.backgroundSprite&&_b.backgroundSprite.parent&&_b.backgroundSprite.parent.removeChild(_b.backgroundSprite);for(const t in _b.sprites)_b.sprites[t].parent.removeChild(_b.sprites[t]),delete _b.sprites[t];for(const t in _b.texts)_b.texts[t].parent.removeChild(_b.texts[t]),delete _b.texts[t];return _b.counter=0,_b.clearTimer(),0},_b.createText=(t,e=_b.canvasWidth/2,n=_b.canvasHeight/2,i="")=>{if(""==i&&(i="text"+ ++_b.counter),!_b.sprites[i]&&!_b.texts[i]){var s=new(gb().Text)(t);s.name=i,s.x=e,s.y=n,s.interactive=!0,s.buttonMode=!0,s.on("mousedown",(function(t){this.isDown=!0,this.isUp=!1,_b.state?this.runningMouseDown():(this.data=t.data,this.alpha=.5,this.dragging=!0)})).on("mouseup",(function(){this.isDown=!1,this.isUp=!0,_b.state||(this.alpha=1,this.dragging=!1,this.data=null)})).on("mouseupoutside",(function(){this.isDown=!1,this.isUp=!0,_b.state||(this.alpha=1,this.dragging=!1,this.data=null)})).on("mousemove",(function(){if(!_b.state&&this.dragging){var t=this.data.getLocalPosition(this.parent);this.position.x=t.x,this.position.y=t.y}})),s.runningMouseDown=new Function(""),s.changeText=function(t){this.text=t},s.show=function(){this.visible=!0},s.hide=function(){this.visible=!1},_b.stage.addChild(s),_b.texts[i]=s}return i},_b.hitTestRectangle=(t,e)=>{let n,i,s,r,a;return n=!1,t.centerX=t.x+t.width/2,t.centerY=t.y+t.height/2,e.centerX=e.x+e.width/2,e.centerY=e.y+e.height/2,t.halfWidth=t.width/2,t.halfHeight=t.height/2,e.halfWidth=e.width/2,e.halfHeight=e.height/2,r=t.centerX-e.centerX,a=t.centerY-e.centerY,i=t.halfWidth+e.halfWidth,s=t.halfHeight+e.halfHeight,n=Math.abs(r){_b.repeatPlay=t},_b.isKeyboardHit=t=>{if(!_b.keys[t]){let e=_b.keyboard(t);_b.keys[t]=e}return _b.keys[t].isDown},_b.keyboardListener=(t,e)=>{if(_b.keys[t])_b.keys[t].press=function(){_b.state&&e()};else{let n=_b.keyboard(t);n.press=function(){_b.state&&e()},_b.keys[t]=n}},_b.keyboard=t=>{let e={};e.value=t,e.isDown=!1,e.isUp=!0,e.press=void 0,e.release=void 0,e.downHandler=t=>{t.key===e.value&&(e.isUp&&e.press&&e.press(),e.isDown=!0,e.isUp=!1,t.preventDefault())},e.upHandler=t=>{t.key===e.value&&(e.isDown&&e.release&&e.release(),e.isDown=!1,e.isUp=!0,t.preventDefault())};const n=e.downHandler.bind(e),i=e.upHandler.bind(e);return window.addEventListener("keydown",n,!1),window.addEventListener("keyup",i,!1),e.unsubscribe=()=>{window.removeEventListener("keydown",n),window.removeEventListener("keyup",i)},e},_b.clearTimer=()=>{_b.startTime=performance.now()},_b.gameLoopDisplay=()=>{if(_b.processingDisplayEvent){const t=_b.processingDisplayEvent;switch(t.displayType){case"slide":if(performance.now()>=t.totalTime+t.startTime)t.sprite.moveTo(t.targetX,t.targetY),_b.displayTag=!1,_b.processingDisplayEvent=null;else(e=_b.currentFPS*(t.totalTime+t.startTime-performance.now())/1e3)>=1&&(t.sprite.addX((t.targetX-t.sprite.x)/e),t.sprite.addY((t.targetY-t.sprite.y)/e));break;case"expand":if(performance.now()>=t.totalTime+t.startTime)t.sprite.enlargeTo(t.targetS),_b.displayTag=!1,_b.processingDisplayEvent=null;else(e=_b.currentFPS*(t.totalTime+t.startTime-performance.now())/1e3)>=1&&t.sprite.enlarge((t.targetS-Math.sqrt(t.sprite.height*t.sprite.width))/e);break;case"circle":if(performance.now()>=t.totalTime+t.startTime)t.sprite.rotateTo(t.targetDegree),_b.displayTag=!1,_b.processingDisplayEvent=null;else(e=_b.currentFPS*(t.totalTime+t.startTime-performance.now())/1e3)>=1&&t.sprite.rotate((t.targetDegree-180*t.sprite.rotation/Math.PI)/e)}}if(!_b.running&&_b.successProcessingDisplayEvents.length)for(var t=_b.successProcessingDisplayEvents.length-1;t>=0;t--){const n=_b.successProcessingDisplayEvents[t];switch(n.displayType){case"slide":if(performance.now()>=n.totalTime+n.startTime)n.sprite.moveTo(n.targetX,n.targetY),_b.successProcessingDisplayEvents.splice(t,1);else(e=_b.currentFPS*(n.totalTime+n.startTime-performance.now())/1e3)>=1&&(n.sprite.addX((n.targetX-n.sprite.x)/e),n.sprite.addY((n.targetY-n.sprite.y)/e));break;case"expand":if(performance.now()>=n.totalTime+n.startTime)n.sprite.enlargeTo(n.targetS),_b.successProcessingDisplayEvents.splice(t,1);else(e=_b.currentFPS*(n.totalTime+n.startTime-performance.now())/1e3)>=1&&n.sprite.enlarge((n.targetS-Math.sqrt(n.sprite.height*n.sprite.width))/e);break;case"circle":var e;if(performance.now()>=n.totalTime+n.startTime)n.sprite.rotateTo(n.targetDegree),_b.successProcessingDisplayEvents.splice(t,1);else(e=_b.currentFPS*(n.totalTime+n.startTime-performance.now())/1e3)>=1&&n.sprite.rotate((n.targetDegree-180*n.sprite.rotation/Math.PI)/e)}}},_b.changeWidth=t=>{const e=fb()(_b.renderer.view),n=e.width(),i=e.height();e.width(t),e.height(t/n*i)},_b.kill=()=>{_b.state=!1,_b.repeatPlay=new Function;for(let t in _b.keys)_b.keys[t].unsubscribe(),delete _b.keys[t];_b.processingDisplayEvent=null,_b.displayTag=!1,_b.running=!1,_b.clearTimer()},_b.runit=t=>{const e=fb()(t);e.empty(),gb().SCALE_MODES.DEFAULT=gb().SCALE_MODES.NEAREST,_b.renderer=gb().autoDetectRenderer(_b.canvasWidth,_b.canvasHeight,{backgroundColor:16777215}),e.append(_b.renderer.view),_b.pointer={x:0,y:0},_b.stage.sortableChildren=!0,_b.stage.interactive=!0,_b.stage.on("mousemove",((t=gb().InteractionEvent)=>{_b.pointer.x=t.data.global.x,_b.pointer.y=t.data.global.y})),_b.lastFrameTime=0,_b.running=!0,_b.lastFrameTime||(_b.lastFrameTime=performance.now(),_b.lastSecond=performance.now()),_b.animate(performance.now()),_b.repeatPlay=new Function;for(let t in _b.keys)_b.keys[t].unsubscribe(),delete _b.keys[t];_b.backgroundSprite&&(_b.backgroundSprite.runningMouseDown=new Function);for(let t in _b.sprites)_b.sprites[t].runningMouseDown=new Function;for(let t in _b.texts)_b.texts[t].runningMouseDown=new Function;_b.processingDisplayEvent=null,_b.displayTag=!1,_b.clearTimer(),_b.changeWidth(fb()("body").width()/2),_b.state=!0},window.mixlySprite=_b;const Tb=_b;var yb=__webpack_require__(9610);class Ib{constructor(t,e){this._pageLoad=new yb.D,this._kernelAvailable=new yb.D,this._loaderId="basthon-loader",this._doNotHideLoader=!0;const n=t.language;if(null!=e&&(this._loaderId=e),"loading"===document.readyState){const t=()=>{document.removeEventListener("DOMContentLoaded",t),this._pageLoad.resolve()};document.addEventListener("DOMContentLoaded",t)}else this._pageLoad.resolve();(async()=>{switch(n){case"python":case"python3":case"python3.11":const{KernelPython3:e}=await __webpack_require__.e(211).then(__webpack_require__.bind(__webpack_require__,211));this._kernel=new e(t);break;case"python3-old":case"python3.8":const{KernelPython3Old:i}=await __webpack_require__.e(195).then(__webpack_require__.bind(__webpack_require__,5195));this._kernel=new i(t);break;case"js":case"javascript":const{KernelJavaScript:s}=await __webpack_require__.e(97).then(__webpack_require__.bind(__webpack_require__,4097));this._kernel=new s(t);break;case"sql":const{KernelSQL:r}=await Promise.all([__webpack_require__.e(960),__webpack_require__.e(837)]).then(__webpack_require__.bind(__webpack_require__,592));this._kernel=new r(t);break;case"ocaml":const{KernelOCaml:a}=await __webpack_require__.e(38).then(__webpack_require__.bind(__webpack_require__,38));this._kernel=new a(t);break;default:return window.console.error(`Kernel '${n}' not supported.`),void this._kernelAvailable.reject()}window.Basthon=this._kernel,this._kernelAvailable.resolve(this._kernel)})()}async pageLoad(){await this._pageLoad.promise}async kernelAvailable(){return await this._kernelAvailable.promise}async kernelLoaded(){const t=await this.kernelAvailable();return await t.loaded(),t}get kernel(){return this._kernel}get kernelSafe(){var t;return(null===(t=this.kernel)||void 0===t?void 0:t.ready)?this.kernel:null}async showLoader(t,e=!1,n=!0){this.kernelAvailable().then((()=>{var t;return null===(t=this.kernel)||void 0===t?void 0:t.init()})),__webpack_require__.e(317).then(__webpack_require__.bind(__webpack_require__,1317));const i="basthon-loader-"+(e?"full":"foot"),s=document.createElement("div");s.id=this._loaderId,s.classList.add("darklighted"),s.classList.add("basthon-loader-root"),s.classList.add(i);const r=document.createElement("div");r.classList.add("basthon-loader-container"),r.classList.add(i),s.appendChild(r);const a=document.createElement("div");a.classList.add("basthon-loader-spinner"),a.classList.add(i),a.innerHTML="",r.appendChild(a);const o=document.createElement("div");o.classList.add("basthon-loader-break"),o.classList.add(i),r.appendChild(o);const l=document.createElement("div");l.classList.add("basthon-loader-text"),l.classList.add(i),l.innerHTML=t,r.appendChild(l),this._loaderTextElem=l;const u=document.createElement("div");u.classList.add("basthon-loader-text"),u.classList.add(i),u.style.display="none",r.appendChild(u),this._loaderTextError=u,await this.pageLoad(),document.body.appendChild(s),this._rootLoader=s;try{await this.kernelLoaded()}catch(t){const e=this.browser();this.setErrorText(`Erreur de chargement de Basthon !!!
Vérifiez que votre navigateur est à jour.
Version détectée : ${e.name} ${e.version}.`);for(const t of document.body.querySelectorAll(".basthon-loader-foot"))t.classList.remove("basthon-loader-foot"),t.classList.add("basthon-loader-full");return a.classList.remove("basthon-loader-spinner"),a.classList.add("basthon-loader-error"),void(this._doNotHideLoader=!0)}this._doNotHideLoader=!1,n&&this.hideLoader()}setLoaderText(t){null!=this._loaderTextElem&&(this._loaderTextElem.innerHTML=t)}setErrorText(t){null!=this._loaderTextElem&&(this._loaderTextElem.style.display="none"),null!=this._loaderTextError&&(this._loaderTextError.style.display="",this._loaderTextError.innerHTML=t)}hideLoader(){if(this._doNotHideLoader)return;const t=this._rootLoader;null!=t&&(t.classList.add("basthon-loader-hide"),window.setTimeout((()=>{this._rootLoader=void 0,t.remove()}),1100))}browser(){var t,e=navigator.userAgent,n=e.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?{name:"IE",version:(t=/\brv[ :]+(\d+)/g.exec(e)||[])[1]||""}:"Chrome"===n[1]&&null!=(t=e.match(/\bOPR|Edge\/(\d+)/))?{name:"Opera",version:t[1]}:(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(t=e.match(/version\/(\d+)/i))&&n.splice(1,1,t[1]),{name:n[0],version:n[1]})}}class Eb extends Zt.PageBase{static{Zt.HTMLTemplate.add("html/statusbar/statusbar-image.html",new Zt.HTMLTemplate('\r\n
')),this.init=function(){Zt.StatusBarsManager.typesRegistry.register(["images"],Eb);const t=Zt.Workspace.getMain().getStatusBarsManager();return t.add({type:"images",id:"images",name:Jt.Msg.PYTHON_PYODIDE_IMAGE,title:Jt.Msg.PYTHON_PYODIDE_IMAGE}),t.changeTo("output"),t.get("images")}}constructor(){super();const t=fb()(Zt.HTMLTemplate.get("html/statusbar/statusbar-image.html").render());this.setContent(t)}init(){super.init(),this.hideCloseBtn()}clean(){this.getContent().empty()}display(t){const e=this.getContent(),n=function(t){t.style.width="auto",t.style.height="auto",t.style.maxWidth="100%",t.style.maxHeight="100%"};this.clean();let i=t.content,s=null,r=null;switch(t.display_type){case"p5":i.style.width="100%",i.style.height="100%",i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center",new MutationObserver((function(t){t.forEach((t=>t.addedNodes.forEach((t=>{const e=t;null!=e.tagName&&["canvas","video"].includes(e.tagName.toLowerCase())&&n(e)}))))})).observe(i,{childList:!0}),i.querySelectorAll("canvas,video").forEach(n),e.append(i);break;case"matplotlib":s=i.querySelector("canvas"),s&&(i=s),i.style.width="",i.style.height="",i.style.maxWidth="100%",i.style.maxHeight="100%",e.append(i);break;case"ocaml-canvas":i.style.width="",i.style.height="",i.style.maxWidth="100%",i.style.maxHeight="100%",e.append(i);break;case"turtle":i.setAttribute("width","100%"),i.setAttribute("height","100%"),e.append(i.outerHTML);break;case"sympy":e.append(t.content),void 0===window.MathJax?(console.log("Loading MathJax (Sympy expression needs it)."),function(){let t=document.createElement("script");t.type="text/javascript",t.src="https://cdn.jsdelivr.net/npm/mathjax@3.0.5/es5/tex-mml-chtml.js",document.getElementsByTagName("head")[0].appendChild(t)}()):window.MathJax.typeset();break;case"multiple":for(let n of["image/svg+xml","image/png","text/html","text/plain"])if(n in t.content){let i=t.content[n];"image/png"===n&&(i=''),e.append(i);break}break;case"tutor":if(e.append(fb()(t.content.replace("overflow-y%3A%20hidden%3B",""))),r=this.getContent()[0].getElementsByTagName("iframe")[0],null==r)return;r.style.maxHeight=r.style.minHeight="100%",new IntersectionObserver(((t,e)=>{const n=t[0];n&&!n.isIntersecting||(r.contentWindow?.postMessage({type:"redraw"},"*"),e.disconnect())})).observe(r);break;default:console.error(`Not supported node type '${t.display_type}' in eval.display result processing.`)}}}const bb=layui;var vb;!function(t){t[t.EPERM=1]="EPERM",t[t.ENOENT=2]="ENOENT",t[t.EINTR=4]="EINTR",t[t.EIO=5]="EIO",t[t.ENXIO=6]="ENXIO",t[t.EBADF=9]="EBADF",t[t.EAGAIN=11]="EAGAIN",t[t.ENOMEM=12]="ENOMEM",t[t.EACCES=13]="EACCES",t[t.EFAULT=14]="EFAULT",t[t.ENOTBLK=15]="ENOTBLK",t[t.EBUSY=16]="EBUSY",t[t.EEXIST=17]="EEXIST",t[t.EXDEV=18]="EXDEV",t[t.ENODEV=19]="ENODEV",t[t.ENOTDIR=20]="ENOTDIR",t[t.EISDIR=21]="EISDIR",t[t.EINVAL=22]="EINVAL",t[t.ENFILE=23]="ENFILE",t[t.EMFILE=24]="EMFILE",t[t.ETXTBSY=26]="ETXTBSY",t[t.EFBIG=27]="EFBIG",t[t.ENOSPC=28]="ENOSPC",t[t.ESPIPE=29]="ESPIPE",t[t.EROFS=30]="EROFS",t[t.EMLINK=31]="EMLINK",t[t.EPIPE=32]="EPIPE",t[t.EDOM=33]="EDOM",t[t.ERANGE=34]="ERANGE",t[t.EDEADLK=35]="EDEADLK",t[t.ENAMETOOLONG=36]="ENAMETOOLONG",t[t.ENOLCK=37]="ENOLCK",t[t.ENOSYS=38]="ENOSYS",t[t.ENOTEMPTY=39]="ENOTEMPTY",t[t.ELOOP=40]="ELOOP",t[t.ENOMSG=42]="ENOMSG",t[t.EBADE=52]="EBADE",t[t.EBADR=53]="EBADR",t[t.EXFULL=54]="EXFULL",t[t.ENOANO=55]="ENOANO",t[t.EBADRQC=56]="EBADRQC",t[t.ENOSTR=60]="ENOSTR",t[t.ENODATA=61]="ENODATA",t[t.ETIME=62]="ETIME",t[t.ENOSR=63]="ENOSR",t[t.ENONET=64]="ENONET",t[t.EREMOTE=66]="EREMOTE",t[t.ENOLINK=67]="ENOLINK",t[t.ECOMM=70]="ECOMM",t[t.EPROTO=71]="EPROTO",t[t.EBADMSG=74]="EBADMSG",t[t.EOVERFLOW=75]="EOVERFLOW",t[t.EBADFD=77]="EBADFD",t[t.ESTRPIPE=86]="ESTRPIPE",t[t.ENOTSOCK=88]="ENOTSOCK",t[t.EDESTADDRREQ=89]="EDESTADDRREQ",t[t.EMSGSIZE=90]="EMSGSIZE",t[t.EPROTOTYPE=91]="EPROTOTYPE",t[t.ENOPROTOOPT=92]="ENOPROTOOPT",t[t.EPROTONOSUPPORT=93]="EPROTONOSUPPORT",t[t.ESOCKTNOSUPPORT=94]="ESOCKTNOSUPPORT",t[t.ENOTSUP=95]="ENOTSUP",t[t.ENETDOWN=100]="ENETDOWN",t[t.ENETUNREACH=101]="ENETUNREACH",t[t.ENETRESET=102]="ENETRESET",t[t.ETIMEDOUT=110]="ETIMEDOUT",t[t.ECONNREFUSED=111]="ECONNREFUSED",t[t.EHOSTDOWN=112]="EHOSTDOWN",t[t.EHOSTUNREACH=113]="EHOSTUNREACH",t[t.EALREADY=114]="EALREADY",t[t.EINPROGRESS=115]="EINPROGRESS",t[t.ESTALE=116]="ESTALE",t[t.EREMOTEIO=121]="EREMOTEIO",t[t.EDQUOT=122]="EDQUOT"}(vb||(vb={}));const wb={[vb.EPERM]:"Operation not permitted",[vb.ENOENT]:"No such file or directory",[vb.EINTR]:"Interrupted system call",[vb.EIO]:"Input/output error",[vb.ENXIO]:"No such device or address",[vb.EBADF]:"Bad file descriptor",[vb.EAGAIN]:"Resource temporarily unavailable",[vb.ENOMEM]:"Cannot allocate memory",[vb.EACCES]:"Permission denied",[vb.EFAULT]:"Bad address",[vb.ENOTBLK]:"Block device required",[vb.EBUSY]:"Resource busy or locked",[vb.EEXIST]:"File exists",[vb.EXDEV]:"Invalid cross-device link",[vb.ENODEV]:"No such device",[vb.ENOTDIR]:"File is not a directory",[vb.EISDIR]:"File is a directory",[vb.EINVAL]:"Invalid argument",[vb.ENFILE]:"Too many open files in system",[vb.EMFILE]:"Too many open files",[vb.ETXTBSY]:"Text file busy",[vb.EFBIG]:"File is too big",[vb.ENOSPC]:"No space left on disk",[vb.ESPIPE]:"Illegal seek",[vb.EROFS]:"Cannot modify a read-only file system",[vb.EMLINK]:"Too many links",[vb.EPIPE]:"Broken pipe",[vb.EDOM]:"Numerical argument out of domain",[vb.ERANGE]:"Numerical result out of range",[vb.EDEADLK]:"Resource deadlock would occur",[vb.ENAMETOOLONG]:"File name too long",[vb.ENOLCK]:"No locks available",[vb.ENOSYS]:"Function not implemented",[vb.ENOTEMPTY]:"Directory is not empty",[vb.ELOOP]:"Too many levels of symbolic links",[vb.ENOMSG]:"No message of desired type",[vb.EBADE]:"Invalid exchange",[vb.EBADR]:"Invalid request descriptor",[vb.EXFULL]:"Exchange full",[vb.ENOANO]:"No anode",[vb.EBADRQC]:"Invalid request code",[vb.ENOSTR]:"Device not a stream",[vb.ENODATA]:"No data available",[vb.ETIME]:"Timer expired",[vb.ENOSR]:"Out of streams resources",[vb.ENONET]:"Machine is not on the network",[vb.EREMOTE]:"Object is remote",[vb.ENOLINK]:"Link has been severed",[vb.ECOMM]:"Communication error on send",[vb.EPROTO]:"Protocol error",[vb.EBADMSG]:"Bad message",[vb.EOVERFLOW]:"Value too large for defined data type",[vb.EBADFD]:"File descriptor in bad state",[vb.ESTRPIPE]:"Streams pipe error",[vb.ENOTSOCK]:"Socket operation on non-socket",[vb.EDESTADDRREQ]:"Destination address required",[vb.EMSGSIZE]:"Message too long",[vb.EPROTOTYPE]:"Protocol wrong type for socket",[vb.ENOPROTOOPT]:"Protocol not available",[vb.EPROTONOSUPPORT]:"Protocol not supported",[vb.ESOCKTNOSUPPORT]:"Socket type not supported",[vb.ENOTSUP]:"Operation is not supported",[vb.ENETDOWN]:"Network is down",[vb.ENETUNREACH]:"Network is unreachable",[vb.ENETRESET]:"Network dropped connection on reset",[vb.ETIMEDOUT]:"Connection timed out",[vb.ECONNREFUSED]:"Connection refused",[vb.EHOSTDOWN]:"Host is down",[vb.EHOSTUNREACH]:"No route to host",[vb.EALREADY]:"Operation already in progress",[vb.EINPROGRESS]:"Operation now in progress",[vb.ESTALE]:"Stale file handle",[vb.EREMOTEIO]:"Remote I/O error",[vb.EDQUOT]:"Disk quota exceeded"};class Sb extends Error{static fromJSON(t){const e=new Sb(t.errno,t.message,t.path,t.syscall);return e.code=t.code,e.stack=t.stack,e}static With(t,e,n){return new Sb(vb[t],wb[vb[t]],e,n)}constructor(t,e=wb[t],n,i=""){super(e),this.errno=t,this.path=n,this.syscall=i,this.code=vb[t],this.message=this.code+": "+e+(this.path?`, '${this.path}'`:"")}toString(){return this.message}toJSON(){return{errno:this.errno,code:this.code,path:this.path,stack:this.stack,message:this.message,syscall:this.syscall}}bufferSize(){return 4+JSON.stringify(this.toJSON()).length}}let xb="/";function Rb(t,e){let n="",i=0,s=-1,r=0,a="\0";for(let o=0;o<=t.length;++o){if(o2){const t=n.lastIndexOf("/");-1===t?(n="",i=0):(n=n.slice(0,t),i=n.length-1-n.lastIndexOf("/")),s=o,r=0;continue}if(0!==n.length){n="",i=0,s=o,r=0;continue}}e&&(n+=n.length>0?"/..":"..",i=2)}else n.length>0?n+="/"+t.slice(s+1,o):n=t.slice(s+1,o),i=o-s-1;s=o,r=0}else"."===a&&-1!==r?++r:r=-1}return n}function Ob(...t){let e="";for(const n of[...t.reverse(),xb])if(n.length&&(e=`${n}/${e}`,n.startsWith("/")))break;const n=e.startsWith("/");return e=Rb(e,!n),n?`/${e}`:e.length?e:"/"}function Ab(...t){if(!t.length)return".";const e=t.join("/");return e?.length?function(t){if(!t.length)return".";const e=t.startsWith("/"),n=t.endsWith("/");return(t=Rb(t,!e)).length?(n&&(t+="/"),e?`/${t}`:t):e?"/":n?"./":"."}(e):"."}function Mb(t){if(0===t.length)return".";const e="/"===t[0];let n=-1,i=!0;for(let e=t.length-1;e>=1;--e)if("/"===t[e]){if(!i){n=e;break}}else i=!1;return-1===n?e?"/":".":e&&1===n?"//":t.slice(0,n)}function Cb(t,e){let n=0,i=-1,s=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e===t)return"";let r=e.length-1,a=-1;for(let o=t.length-1;o>=0;--o)if("/"===t[o]){if(!s){n=o+1;break}}else-1===a&&(s=!1,a=o+1),r>=0&&(t[o]===e[r]?-1==--r&&(i=o):(r=-1,i=a));return n===i?i=a:-1===i&&(i=t.length),t.slice(n,i)}for(let e=t.length-1;e>=0;--e)if("/"===t[e]){if(!s){n=e+1;break}}else-1===i&&(s=!1,i=e+1);return-1===i?"":t.slice(n,i)}function Nb(t){const e=t.startsWith("/"),n={root:e?"/":"",dir:"",base:"",ext:"",name:""};if(0===t.length)return n;const i=e?1:0;let s=-1,r=0,a=-1,o=!0,l=t.length-1,u=0;for(;l>=i;--l)if("/"!==t[l])-1===a&&(o=!1,a=l+1),"."===t[l]?-1===s?s=l:1!==u&&(u=1):-1!==s&&(u=-1);else if(!o){r=l+1;break}if(-1!==a){const i=0===r&&e?1:r;-1===s||0===u||1===u&&s===a-1&&s===r+1?n.base=n.name=t.slice(i,a):(n.name=t.slice(i,s),n.base=t.slice(i,a),n.ext=t.slice(s,a))}return r>0?n.dir=t.slice(0,r-1):e&&(n.dir="/"),n}const kb=new TextEncoder;function Db(t){if("string"!=typeof t)throw new Sb(vb.EINVAL,"Can not encode a non-string");return kb.encode(t)}const Lb=new TextDecoder;function Fb(t){if(!(t instanceof Uint8Array))throw new Sb(vb.EINVAL,"Can not decode a non-Uint8Array");return Lb.decode(t)}function Pb(t){return JSON.parse(Fb(t),((t,e)=>""==t?e:BigInt(e)))}function $b(t){return Db(JSON.stringify(t,((t,e)=>""==t?e:e.toString())))}function Bb(t,e){if("number"==typeof t)return t;if("string"==typeof t){const e=parseInt(t,8);if(!isNaN(e))return e}if("number"==typeof e)return e;throw new Sb(vb.EINVAL,"Invalid mode: "+t?.toString())}function Vb(t){if(t instanceof Date)return t;try{return new Date(t)}catch{throw new Sb(vb.EINVAL,"Invalid time.")}}function Ub(t){if((t=t.toString()).includes("\0"))throw new Sb(vb.EINVAL,"Path can not contain null character");if(0==t.length)throw new Sb(vb.EINVAL,"Path can not be empty");return Ob(t.replaceAll(/[/\\]+/g,"/"))}function Yb(t,e="utf8",n,i=0){return"object"!=typeof t||null===t?{encoding:"string"==typeof t?t:e??null,flag:n,mode:i}:{encoding:"string"==typeof t?.encoding?t.encoding:e??null,flag:"string"==typeof t?.flag?t.flag:n,mode:Bb("mode"in t?t?.mode:null,i)}}function Gb(){return crypto.getRandomValues(new BigUint64Array(1))[0]}const Hb={uid:0,gid:0,suid:0,sgid:0,euid:0,egid:0,groups:[]};function Wb(t){return{suid:t.uid,sgid:t.gid,euid:t.uid,egid:t.gid,groups:[],...t}}const zb=0,Xb=4,jb=2,qb=1,Kb=1,Qb=2,Jb=4,Zb=0,tv=1,ev=2,nv=64,iv=128,sv=256,rv=512,av=1024,ov=65536,lv=262144,uv=131072,hv=1052672,pv=4096,cv=32768,dv=16384,fv=2048,mv=61440,gv=49152,_v=40960,Tv=32768,yv=24576,Iv=16384,Ev=8192,bv=4096,vv=2048,wv=1024,Sv=512,xv=448,Rv=256,Ov=128,Av=64,Mv=56,Cv=32,Nv=16,kv=8,Dv=7,Lv=4,Fv=2,Pv=1,$v=0,Bv=2**32-1,Vv={checkAccess:!0,updateOnRead:!0,syncImmediately:!0,unsafeBufferReplace:!1};Promise.withResolvers??(Promise.withResolvers=function(){let t,e;const n=new Promise(((n,i)=>{t=n,e=i}));return{promise:n,resolve:t,reject:e}}),Symbol.dispose??(Symbol.dispose=Symbol("Symbol.dispose")),Symbol.asyncDispose??(Symbol.asyncDispose=Symbol("Symbol.asyncDispose"));class Uv{_convert(t){return this._isBigint?BigInt(t):Number(t)}get blocks(){return this._convert(Math.ceil(Number(this.size)/512))}get atime(){return new Date(Number(this.atimeMs))}set atime(t){this.atimeMs=this._convert(t.getTime())}get mtime(){return new Date(Number(this.mtimeMs))}set mtime(t){this.mtimeMs=this._convert(t.getTime())}get ctime(){return new Date(Number(this.ctimeMs))}set ctime(t){this.ctimeMs=this._convert(t.getTime())}get birthtime(){return new Date(Number(this.birthtimeMs))}set birthtime(t){this.birthtimeMs=this._convert(t.getTime())}constructor({atimeMs:t,mtimeMs:e,ctimeMs:n,birthtimeMs:i,uid:s,gid:r,size:a,mode:o,ino:l}={}){this.dev=this._convert(0),this.ino=this._convert(0),this.rdev=this._convert(0),this.nlink=this._convert(1),this.blksize=this._convert(4096),this.uid=this._convert(0),this.gid=this._convert(0);const u=Date.now();this.atimeMs=this._convert(t??u),this.mtimeMs=this._convert(e??u),this.ctimeMs=this._convert(n??u),this.birthtimeMs=this._convert(i??u),this.uid=this._convert(s??0),this.gid=this._convert(r??0),this.size=this._convert(a??0),this.ino=this._convert(l??0),this.mode=this._convert(o??420&Tv),this.mode&mv||(this.mode=this.mode|this._convert(Tv))}isFile(){return(this.mode&mv)===Tv}isDirectory(){return(this.mode&mv)===Iv}isSymbolicLink(){return(this.mode&mv)===_v}isSocket(){return(this.mode&mv)===gv}isBlockDevice(){return(this.mode&mv)===yv}isCharacterDevice(){return(this.mode&mv)===Ev}isFIFO(){return(this.mode&mv)===bv}hasAccess(t,e){const n=e?.credentials||Hb;if(this.isSymbolicLink()||0===n.euid||0===n.egid)return!0;let i=0;return n.uid===this.uid&&(this.mode&Rv&&(i|=Xb),this.mode&Ov&&(i|=jb),this.mode&Av&&(i|=qb)),(n.gid===this.gid||n.groups.includes(Number(this.gid)))&&(this.mode&Cv&&(i|=Xb),this.mode&Nv&&(i|=jb),this.mode&kv&&(i|=qb)),this.mode&Lv&&(i|=Xb),this.mode&Fv&&(i|=jb),this.mode&Pv&&(i|=qb),(i&t)===t}chmod(t){this.mode=this._convert(this.mode&mv|t)}chown(t,e){t=Number(t),e=Number(e),!isNaN(t)&&0<=t&&t<2**32&&(this.uid=this._convert(t)),!isNaN(e)&&0<=e&&e<2**32&&(this.gid=this._convert(e))}get atimeNs(){return 1000n*BigInt(this.atimeMs)}get mtimeNs(){return 1000n*BigInt(this.mtimeMs)}get ctimeNs(){return 1000n*BigInt(this.ctimeMs)}get birthtimeNs(){return 1000n*BigInt(this.birthtimeMs)}}function Yv(t,e,n){!isNaN(e)&&0<=e&&e<2**32&&(t.uid=e),!isNaN(n)&&0<=n&&n<2**32&&(t.gid=n)}class Gv extends Uv{constructor(){super(...arguments),this._isBigint=!1}}class Hv extends Uv{constructor(){super(...arguments),this._isBigint=!0}}class Wv{constructor(){this.type=525687744115,this.bsize=4096,this.blocks=0,this.bfree=0,this.bavail=0,this.files=Bv,this.ffree=Bv}}class zv{constructor(){this.type=0x7a656e6673n,this.bsize=4096n,this.blocks=0n,this.bfree=0n,this.bavail=0n,this.files=BigInt(Bv),this.ffree=BigInt(Bv)}}const Xv=["r","r+","rs","rs+","w","wx","w+","wx+","a","ax","a+","ax+"];function jv(t){if("number"==typeof t)return function(t){switch(t){case Zb:return"r";case Zb|hv:return"rs";case ev:return"r+";case ev|hv:return"rs+";case rv|nv|tv:return"w";case rv|nv|tv|iv:return"wx";case rv|nv|ev:return"w+";case rv|nv|ev|iv:return"wx+";case av|nv|tv:return"a";case av|nv|tv|iv:return"ax";case av|nv|ev:return"a+";case av|nv|ev|iv:return"ax+";default:throw new Error("Invalid flag number: "+t)}}(t);if(!Xv.includes(t))throw new Error("Invalid flag string: "+t);return t}function qv(t){let e=0;return e<<=1,e+=+Kv(t),e<<=1,e+=+Qv(t),e<<=1,e}function Kv(t){return-1!==t.indexOf("r")||-1!==t.indexOf("+")}function Qv(t){return-1!==t.indexOf("w")||-1!==t.indexOf("a")||-1!==t.indexOf("+")}function Jv(t){return-1!==t.indexOf("w")}function Zv(t){return-1!==t.indexOf("a")}function tw(t){return-1!==t.indexOf("x")}class ew{constructor(t,e){this.fs=t,this.path=e}async[Symbol.asyncDispose](){await this.close()}[Symbol.dispose](){this.closeSync()}datasync(){return this.sync()}datasyncSync(){return this.syncSync()}}class nw extends ew{constructor(t,e,n,i,s=new Uint8Array(new ArrayBuffer(0,t.metadata().noResizableBuffers?{}:{maxByteLength:Bv}))){if(super(t,e),this.flag=n,this.stats=i,this._buffer=s,this._position=0,this.dirty=!1,this.closed=!1,this.stats.size!=s.byteLength){if(Kv(this.flag))throw new Error(`Size mismatch: buffer length ${s.byteLength}, stats size ${this.stats.size}`);this.dirty=!0}}get buffer(){return this._buffer}get position(){return Zv(this.flag)?this.stats.size:this._position}set position(t){this._position=t}async sync(){if(this.closed)throw Sb.With("EBADF",this.path,"File.sync");this.dirty&&(await this.fs.sync(this.path,this._buffer,this.stats),this.dirty=!1)}syncSync(){if(this.closed)throw Sb.With("EBADF",this.path,"File.sync");this.dirty&&(this.fs.syncSync(this.path,this._buffer,this.stats),this.dirty=!1)}async close(){if(this.closed)throw Sb.With("EBADF",this.path,"File.close");await this.sync(),this.dispose()}closeSync(){if(this.closed)throw Sb.With("EBADF",this.path,"File.close");this.syncSync(),this.dispose()}dispose(t){if(this.closed)throw Sb.With("EBADF",this.path,"File.dispose");if(this.dirty&&!t)throw Sb.With("EBUSY",this.path,"File.dispose");delete this._buffer,delete this.stats,this.closed=!0}stat(){if(this.closed)throw Sb.With("EBADF",this.path,"File.stat");return Promise.resolve(new Gv(this.stats))}statSync(){if(this.closed)throw Sb.With("EBADF",this.path,"File.stat");return new Gv(this.stats)}_truncate(t){if(this.closed)throw Sb.With("EBADF",this.path,"File.truncate");if(this.dirty=!0,!Qv(this.flag))throw new Sb(vb.EPERM,"File not opened with a writeable mode.");if(this.stats.mtimeMs=Date.now(),t>this._buffer.length){const e=new Uint8Array(t-this._buffer.length);this._write(e,0,e.length,this._buffer.length)}else this.stats.size=t,this._buffer=t?this._buffer.slice(0,t):new Uint8Array}async truncate(t){this._truncate(t),Vv.syncImmediately&&await this.sync()}truncateSync(t){this._truncate(t),Vv.syncImmediately&&this.syncSync()}_write(t,e=0,n=this.stats.size,i=this.position){if(this.closed)throw Sb.With("EBADF",this.path,"File.write");if(!Qv(this.flag))throw new Sb(vb.EPERM,"File not opened with a writeable mode.");this.dirty=!0;const s=i+n,r=t.slice(e,e+n);if(s>this.stats.size&&(this.stats.size=s,s>this._buffer.byteLength))if(this._buffer.buffer.resizable&&this._buffer.buffer.maxByteLength<=s)this._buffer.buffer.resize(s);else if(Vv.unsafeBufferReplace)this._buffer=r;else{const t=new Uint8Array(new ArrayBuffer(s,this.fs.metadata().noResizableBuffers?{}:{maxByteLength:Bv}));t.set(this._buffer),this._buffer=t}return this._buffer.set(r,i),this.stats.mtimeMs=Date.now(),this.position=i+r.byteLength,r.byteLength}async write(t,e,n,i){const s=this._write(t,e,n,i);return Vv.syncImmediately&&await this.sync(),s}writeSync(t,e=0,n=this.stats.size,i=this.position){const s=this._write(t,e,n,i);return Vv.syncImmediately&&this.syncSync(),s}_read(t,e=0,n=this.stats.size,i){if(this.closed)throw Sb.With("EBADF",this.path,"File.read");if(!Kv(this.flag))throw new Sb(vb.EPERM,"File not opened with a readable mode.");Vv.updateOnRead&&(this.dirty=!0),this.stats.atimeMs=Date.now(),i??(i=this.position);let s=i+n;s>this.stats.size&&(s=i+Math.max(this.stats.size-i,0)),this._position=s;const r=s-i;return 0==r||new Uint8Array(t.buffer,e,n).set(this._buffer.slice(i,s)),r}async read(t,e,n,i){const s=this._read(t,e,n,i);return Vv.syncImmediately&&await this.sync(),{bytesRead:s,buffer:t}}readSync(t,e,n,i){const s=this._read(t,e,n,i);return Vv.syncImmediately&&this.syncSync(),s}async chmod(t){if(this.closed)throw Sb.With("EBADF",this.path,"File.chmod");this.dirty=!0,this.stats.mode=this.stats.mode&(t>mv?~mv:mv)|t,(Vv.syncImmediately||t>mv)&&await this.sync()}chmodSync(t){if(this.closed)throw Sb.With("EBADF",this.path,"File.chmod");this.dirty=!0,this.stats.mode=this.stats.mode&(t>mv?~mv:mv)|t,(Vv.syncImmediately||t>mv)&&this.syncSync()}async chown(t,e){if(this.closed)throw Sb.With("EBADF",this.path,"File.chown");this.dirty=!0,Yv(this.stats,t,e),Vv.syncImmediately&&await this.sync()}chownSync(t,e){if(this.closed)throw Sb.With("EBADF",this.path,"File.chown");this.dirty=!0,Yv(this.stats,t,e),Vv.syncImmediately&&this.syncSync()}async utimes(t,e){if(this.closed)throw Sb.With("EBADF",this.path,"File.utimes");this.dirty=!0,this.stats.atime=t,this.stats.mtime=e,Vv.syncImmediately&&await this.sync()}utimesSync(t,e){if(this.closed)throw Sb.With("EBADF",this.path,"File.utimes");this.dirty=!0,this.stats.atime=t,this.stats.mtime=e,Vv.syncImmediately&&this.syncSync()}}class iw{metadata(){return{name:this.constructor.name.toLowerCase(),readonly:!1,totalSpace:0,freeSpace:0,noResizableBuffers:!1,noAsyncCache:this._disableSync??!1,type:525687744115}}constructor(...t){}async ready(){}async exists(t){try{return await this.stat(t),!0}catch(t){return"ENOENT"!=t.code}}existsSync(t){try{return this.statSync(t),!0}catch(t){return"ENOENT"!=t.code}}}var sw=__webpack_require__(228);Symbol.toStringTag,Symbol.iterator;const rw=Intl.NumberFormat("en",{notation:"compact"});rw.format.bind(rw);function aw(t){return t.at(0).toUpperCase()+t.slice(1)}const ow=["int8","uint8","int16","uint16","int32","uint32","int64","uint64","float32","float64"],lw=[...ow,...ow.map((t=>aw(t))),"char"],uw=/^(u?int|float)(8|16|32|64)$/i;function hw(t){return"char"==t?"uint8":t.toLowerCase()}function pw(t){return uw.test(t.toString())}function cw(t){return"char"==t||uw.test(t.toString().toLowerCase())}Symbol.struct_init||=Symbol("struct_init"),Symbol.struct_metadata||=Symbol("struct_metadata");Symbol.struct_init,Symbol.struct_metadata;function dw(t){const e=Symbol.metadata||Object.getOwnPropertySymbols(t).find((t=>"Symbol.metadata"==t.description));var n;if(n=t,Symbol?.metadata&&(Symbol.metadata in n||Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:Object.create(null)})),!e)throw new ReferenceError("Could not get a reference to Symbol.metadata");return e}function fw(t){return"function"==typeof t&&dw(t)in t&&function(t){return null!=t&&"object"==typeof t&&Symbol.struct_metadata in t}(t[dw(t)])}function mw(t){return null!=t&&"object"==typeof t&&fw(t.constructor)}function gw(t){if(!mw(t))throw new TypeError(("function"==typeof t?t.name:"object"==typeof t&&t?t.constructor.name:t)+" is not a struct instance")}function _w(t){if(!function(t){return mw(t)||fw(t)}(t))throw new TypeError(("function"==typeof t?t.name:"object"==typeof t&&t?t.constructor.name:t)+" is not a struct")}function Tw(t){if("string"==typeof t)return function(t){if(!cw(t))throw new TypeError("Not a valid primitive type: "+t)}(t),+hw(t).match(uw)[2]/8;_w(t);const e=fw(t)?t:t.constructor;return e[dw(e)][Symbol.struct_metadata].size}function yw(t={}){return function(e,n){n.metadata??={},n.metadata[Symbol.struct_init]||=[];let i=0;const s=new Map;for(const e of n.metadata[Symbol.struct_init]){const{name:n,type:o,length:l}=e;if(!cw(o)&&!fw(o))throw new TypeError("Not a valid type: "+o);s.set(n,{offset:i,type:cw(o)?hw(o):o,length:l}),i+=Tw(o)*(l||1),r=i,a=t.align||1,i=Math.ceil(r/a)*a}var r,a;return n.metadata[Symbol.struct_metadata]={options:t,members:s,size:i},e}}function Iw(t,e){return function(n,i){let s=i.name;if("symbol"==typeof s&&(console.warn("Symbol used for struct member name will be coerced to string: "+s.toString()),s=s.toString()),!s)throw new ReferenceError("Invalid name for struct member");return i.metadata??={},i.metadata[Symbol.struct_init]||=[],i.metadata[Symbol.struct_init].push({name:s,type:t,length:e}),n}}function Ew(t){gw(t);const{options:e,members:n}=t.constructor[dw(t.constructor)][Symbol.struct_metadata],i=new Uint8Array(Tw(t)),s=new DataView(i.buffer);for(const[r,{type:a,length:o,offset:l}]of n)for(let n=0;n<(o||1);n++){const u=l+Tw(a)*n;let h=o>0?t[r][n]:t[r];if("string"==typeof h&&(h=h.charCodeAt(0)),!pw(a)){i.set(h?Ew(h):new Uint8Array(Tw(a)),u);continue}const p="set"+aw(a);"setInt64"!=p?"setUint64"!=p?s[p](u,Number(h),!e.bigEndian):s.setBigUint64(u,BigInt(h),!e.bigEndian):s.setBigInt64(u,BigInt(h),!e.bigEndian)}return i}function bw(t,e){gw(t);const{options:n,members:i}=t.constructor[dw(t.constructor)][Symbol.struct_metadata],s=e instanceof Uint8Array?e:new Uint8Array("buffer"in e?e.buffer:e),r=new DataView(s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength));for(const[e,{type:a,offset:o,length:l}]of i)for(let i=0;i<(l||1);i++){let u=l>0?t[e]:t;const h=l>0?i:e,p=o+Tw(a)*i;if("string"==typeof t[e]){t[e]=t[e].slice(0,i)+String.fromCharCode(r.getUint8(p))+t[e].slice(i+1);continue}if(!pw(a)){if(null===u[h]||void 0===u[h])continue;bw(u[h],new Uint8Array(s.slice(p,p+Tw(a))));continue}l>0&&(u||=[]);const c="get"+aw(a);"getInt64"!=c?u[h]="getUint64"!=c?r[c](p,!n.bigEndian):r.getBigUint64(p,!n.bigEndian):u[h]=r.getBigInt64(p,!n.bigEndian)}}Symbol.metadata??=Symbol.for("Symbol.metadata");const vw=Object.fromEntries(lw.map((t=>{return[t,(e=t,function(t,n){return"number"==typeof t?Iw(e,t):Iw(e)(t,n)})];var e})));var ww=function(t,e,n,i,s,r){function a(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var o,l=i.kind,u="getter"===l?"get":"setter"===l?"set":"value",h=!e&&t?i.static?t:t.prototype:null,p=e||(h?Object.getOwnPropertyDescriptor(h,i.name):{}),c=!1,d=n.length-1;d>=0;d--){var f={};for(var m in i)f[m]="access"===m?{}:i[m];for(var m in i.access)f.access[m]=i.access[m];f.addInitializer=function(t){if(c)throw new TypeError("Cannot add initializers after decoration has completed");r.push(a(t||null))};var g=(0,n[d])("accessor"===l?{get:p.get,set:p.set}:p[u],f);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(o=a(g.get))&&(p.get=o),(o=a(g.set))&&(p.set=o),(o=a(g.init))&&s.unshift(o)}else(o=a(g))&&("field"===l?s.unshift(o):p[u]=o)}h&&Object.defineProperty(h,i.name,p),c=!0},Sw=function(t,e,n){for(var i=arguments.length>2,s=0;s{var t,e,n,i,s,r,a,o,l,u,h;let p,c,d,f,m,g,_,T,y,I,E,b,v,w=[yw()],S=[],x=[],R=[],O=[],A=[],M=[],C=[],N=[],k=[],D=[],L=[],F=[],P=[],$=[],B=[],V=[],U=[],Y=[],G=[],H=[],W=[],z=[],X=[];var j=c=class{constructor(t){if(this.data=Sw(this,x,void 0),this.size=(Sw(this,R),Sw(this,O,void 0)),this.mode=(Sw(this,A),Sw(this,M,void 0)),this.nlink=(Sw(this,C),Sw(this,N,void 0)),this.uid=(Sw(this,k),Sw(this,D,void 0)),this.gid=(Sw(this,L),Sw(this,F,void 0)),this.atimeMs=(Sw(this,P),Sw(this,$,void 0)),this.birthtimeMs=(Sw(this,B),Sw(this,V,void 0)),this.mtimeMs=(Sw(this,U),Sw(this,Y,void 0)),this.ctimeMs=(Sw(this,G),Sw(this,H,void 0)),this.ino=(Sw(this,W),Sw(this,z,void 0)),Sw(this,X),t){const e=Tw(j),n=e-Tw("uint64");if(t.byteLength{const q="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;d=[(t=vw).uint64.bind(t)],f=[(e=vw).uint32.bind(e)],m=[(n=vw).uint16.bind(n)],g=[(i=vw).uint32.bind(i)],_=[(s=vw).uint32.bind(s)],T=[(r=vw).uint32.bind(r)],y=[(a=vw).float64.bind(a)],I=[(o=vw).float64.bind(o)],E=[(l=vw).float64.bind(l)],b=[(u=vw).float64.bind(u)],v=[(h=vw).uint64.bind(h)],ww(null,null,d,{kind:"field",name:"data",static:!1,private:!1,access:{has:t=>"data"in t,get:t=>t.data,set:(t,e)=>{t.data=e}},metadata:q},x,R),ww(null,null,f,{kind:"field",name:"size",static:!1,private:!1,access:{has:t=>"size"in t,get:t=>t.size,set:(t,e)=>{t.size=e}},metadata:q},O,A),ww(null,null,m,{kind:"field",name:"mode",static:!1,private:!1,access:{has:t=>"mode"in t,get:t=>t.mode,set:(t,e)=>{t.mode=e}},metadata:q},M,C),ww(null,null,g,{kind:"field",name:"nlink",static:!1,private:!1,access:{has:t=>"nlink"in t,get:t=>t.nlink,set:(t,e)=>{t.nlink=e}},metadata:q},N,k),ww(null,null,_,{kind:"field",name:"uid",static:!1,private:!1,access:{has:t=>"uid"in t,get:t=>t.uid,set:(t,e)=>{t.uid=e}},metadata:q},D,L),ww(null,null,T,{kind:"field",name:"gid",static:!1,private:!1,access:{has:t=>"gid"in t,get:t=>t.gid,set:(t,e)=>{t.gid=e}},metadata:q},F,P),ww(null,null,y,{kind:"field",name:"atimeMs",static:!1,private:!1,access:{has:t=>"atimeMs"in t,get:t=>t.atimeMs,set:(t,e)=>{t.atimeMs=e}},metadata:q},$,B),ww(null,null,I,{kind:"field",name:"birthtimeMs",static:!1,private:!1,access:{has:t=>"birthtimeMs"in t,get:t=>t.birthtimeMs,set:(t,e)=>{t.birthtimeMs=e}},metadata:q},V,U),ww(null,null,E,{kind:"field",name:"mtimeMs",static:!1,private:!1,access:{has:t=>"mtimeMs"in t,get:t=>t.mtimeMs,set:(t,e)=>{t.mtimeMs=e}},metadata:q},Y,G),ww(null,null,b,{kind:"field",name:"ctimeMs",static:!1,private:!1,access:{has:t=>"ctimeMs"in t,get:t=>t.ctimeMs,set:(t,e)=>{t.ctimeMs=e}},metadata:q},H,W),ww(null,null,v,{kind:"field",name:"ino",static:!1,private:!1,access:{has:t=>"ino"in t,get:t=>t.ino,set:(t,e)=>{t.ino=e}},metadata:q},z,X),ww(null,p={value:c},w,{kind:"class",name:c.name,metadata:q},null,S),j=c=p.value,q&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:q}),Sw(c,S)})(),j=c})();var Ow=function(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var i,s;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=e[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=e[Symbol.dispose],n&&(s=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");s&&(i=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:i,async:n})}else n&&t.stack.push({async:!0});return e},Aw=function(t){return function(e){function n(n){e.error=e.hasError?new t(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}return function t(){for(;e.stack.length;){var i=e.stack.pop();try{var s=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(s).then(t,(function(e){return n(e),t()}))}catch(t){n(t)}}if(e.hasError)throw e.error}()}}("function"==typeof SuppressedError?SuppressedError:function(t,e,n){var i=new Error(n);return i.name="SuppressedError",i.error=t,i.suppressed=e,i});class Mw extends iw{async ready(){this._initialized||(await this.checkRoot(),this._initialized=!0)}constructor(t){super(),this.store=t,this._initialized=!1}metadata(){return{...super.metadata(),name:this.store.name}}async empty(){await this.store.clear(),await this.checkRoot()}emptySync(){this.store.clearSync(),this.checkRootSync()}async rename(t,e){const n={stack:[],error:void 0,hasError:!1};try{const i=Ow(n,this.store.transaction(),!0),s=Nb(t),r=Nb(e),a=await this.findInode(i,s.dir,"rename"),o=Pb(await this.get(i,a.data,s.dir,"rename"));if(!o[s.base])throw Sb.With("ENOENT",t,"rename");const l=o[s.base];if(delete o[s.base],0===(r.dir+"/").indexOf(t+"/"))throw new Sb(vb.EBUSY,s.dir);const u=r.dir==s.dir,h=u?a:await this.findInode(i,r.dir,"rename"),p=u?o:Pb(await this.get(i,h.data,r.dir,"rename"));if(p[r.base]){const t=new Rw(await this.get(i,p[r.base],e,"rename"));if(!t.toStats().isFile())throw Sb.With("EPERM",e,"rename");await i.remove(t.data),await i.remove(p[r.base])}p[r.base]=l,await i.set(a.data,$b(o)),await i.set(h.data,$b(p)),await i.commit()}catch(t){n.error=t,n.hasError=!0}finally{const t=Aw(n);t&&await t}}renameSync(t,e){const n={stack:[],error:void 0,hasError:!1};try{const i=Ow(n,this.store.transaction(),!1),s=Nb(t),r=Nb(e),a=this.findInodeSync(i,s.dir,"rename"),o=Pb(this.getSync(i,a.data,s.dir,"rename"));if(!o[s.base])throw Sb.With("ENOENT",t,"rename");const l=o[s.base];if(delete o[s.base],0==(r.dir+"/").indexOf(t+"/"))throw new Sb(vb.EBUSY,s.dir);const u=r.dir===s.dir,h=u?a:this.findInodeSync(i,r.dir,"rename"),p=u?o:Pb(this.getSync(i,h.data,r.dir,"rename"));if(p[r.base]){const t=new Rw(this.getSync(i,p[r.base],e,"rename"));if(!t.toStats().isFile())throw Sb.With("EPERM",e,"rename");i.removeSync(t.data),i.removeSync(p[r.base])}p[r.base]=l,i.setSync(a.data,$b(o)),i.setSync(h.data,$b(p)),i.commitSync()}catch(t){n.error=t,n.hasError=!0}finally{Aw(n)}}async stat(t){const e={stack:[],error:void 0,hasError:!1};try{const n=Ow(e,this.store.transaction(),!0);return(await this.findInode(n,t,"stat")).toStats()}catch(t){e.error=t,e.hasError=!0}finally{const t=Aw(e);t&&await t}}statSync(t){const e={stack:[],error:void 0,hasError:!1};try{const n=Ow(e,this.store.transaction(),!1);return this.findInodeSync(n,t,"stat").toStats()}catch(t){e.error=t,e.hasError=!0}finally{Aw(e)}}async createFile(t,e,n){const i=await this.commitNew(t,Tv,n,new Uint8Array,"createFile");return new nw(this,t,e,i.toStats(),new Uint8Array)}createFileSync(t,e,n){const i=this.commitNewSync(t,Tv,n,new Uint8Array,"createFile");return new nw(this,t,e,i.toStats(),new Uint8Array)}async openFile(t,e){const n={stack:[],error:void 0,hasError:!1};try{const i=Ow(n,this.store.transaction(),!0),s=await this.findInode(i,t,"openFile"),r=await this.get(i,s.data,t,"openFile");return new nw(this,t,e,s.toStats(),r)}catch(t){n.error=t,n.hasError=!0}finally{const t=Aw(n);t&&await t}}openFileSync(t,e){const n={stack:[],error:void 0,hasError:!1};try{const i=Ow(n,this.store.transaction(),!1),s=this.findInodeSync(i,t,"openFile"),r=this.getSync(i,s.data,t,"openFile");return new nw(this,t,e,s.toStats(),r)}catch(t){n.error=t,n.hasError=!0}finally{Aw(n)}}async unlink(t){return this.remove(t,!1,"unlink")}unlinkSync(t){this.removeSync(t,!1,"unlink")}async rmdir(t){if((await this.readdir(t)).length)throw Sb.With("ENOTEMPTY",t,"rmdir");await this.remove(t,!0,"rmdir")}rmdirSync(t){if(this.readdirSync(t).length)throw Sb.With("ENOTEMPTY",t,"rmdir");this.removeSync(t,!0,"rmdir")}async mkdir(t,e){await this.commitNew(t,Iv,e,Db("{}"),"mkdir")}mkdirSync(t,e){this.commitNewSync(t,Iv,e,Db("{}"),"mkdir")}async readdir(t){const e={stack:[],error:void 0,hasError:!1};try{const n=Ow(e,this.store.transaction(),!0),i=await this.findInode(n,t,"readdir");return Object.keys(Pb(await this.get(n,i.data,t,"readdir")))}catch(t){e.error=t,e.hasError=!0}finally{const t=Aw(e);t&&await t}}readdirSync(t){const e={stack:[],error:void 0,hasError:!1};try{const n=Ow(e,this.store.transaction(),!1),i=this.findInodeSync(n,t,"readdir");return Object.keys(Pb(this.getSync(n,i.data,t,"readdir")))}catch(t){e.error=t,e.hasError=!0}finally{Aw(e)}}async sync(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{const s=Ow(i,this.store.transaction(),!0),r=await this._findInode(s,t,"sync"),a=new Rw(await this.get(s,r,t,"sync")),o=a.update(n);await s.set(a.data,e),o&&await s.set(r,Ew(a)),await s.commit()}catch(t){i.error=t,i.hasError=!0}finally{const t=Aw(i);t&&await t}}syncSync(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{const s=Ow(i,this.store.transaction(),!1),r=this._findInodeSync(s,t,"sync"),a=new Rw(this.getSync(s,r,t,"sync")),o=a.update(n);s.setSync(a.data,e),o&&s.setSync(r,Ew(a)),s.commitSync()}catch(t){i.error=t,i.hasError=!0}finally{Aw(i)}}async link(t,e){const n={stack:[],error:void 0,hasError:!1};try{const i=Ow(n,this.store.transaction(),!0),s=Mb(e),r=await this.findInode(i,s,"link"),a=Pb(await this.get(i,r.data,s,"link")),o=await this._findInode(i,t,"link"),l=new Rw(await this.get(i,o,t,"link"));l.nlink++,a[Cb(e)]=o,i.setSync(o,Ew(l)),i.setSync(r.data,$b(a)),i.commitSync()}catch(t){n.error=t,n.hasError=!0}finally{const t=Aw(n);t&&await t}}linkSync(t,e){const n={stack:[],error:void 0,hasError:!1};try{const i=Ow(n,this.store.transaction(),!1),s=Mb(e),r=this.findInodeSync(i,s,"link"),a=Pb(this.getSync(i,r.data,s,"link")),o=this._findInodeSync(i,t,"link"),l=new Rw(this.getSync(i,o,t,"link"));l.nlink++,a[Cb(e)]=o,i.setSync(o,Ew(l)),i.setSync(r.data,$b(a)),i.commitSync()}catch(t){n.error=t,n.hasError=!0}finally{Aw(n)}}async checkRoot(){const t={stack:[],error:void 0,hasError:!1};try{const e=Ow(t,this.store.transaction(),!0);if(await e.get(0n))return;const n=new Rw;n.ino=0n,n.mode=511|Iv,await e.set(n.data,Db("{}")),await e.set(0n,Ew(n)),await e.commit()}catch(e){t.error=e,t.hasError=!0}finally{const e=Aw(t);e&&await e}}checkRootSync(){const t={stack:[],error:void 0,hasError:!1};try{const e=Ow(t,this.store.transaction(),!1);if(e.getSync(0n))return;const n=new Rw;n.ino=0n,n.mode=511|Iv,e.setSync(n.data,Db("{}")),e.setSync(0n,Ew(n)),e.commitSync()}catch(e){t.error=e,t.hasError=!0}finally{Aw(t)}}async _findInode(t,e,n,i=new Set){if(i.has(e))throw new Sb(vb.EIO,"Infinite loop detected while finding inode",e);if(i.add(e),"/"==e)return 0n;const{dir:s,base:r}=Nb(e),a="/"==s?new Rw(await this.get(t,0n,s,n)):await this.findInode(t,s,n,i),o=Pb(await this.get(t,a.data,s,n));if(!(r in o))throw Sb.With("ENOENT",Ob(s,r),n);return o[r]}_findInodeSync(t,e,n,i=new Set){if(i.has(e))throw new Sb(vb.EIO,"Infinite loop detected while finding inode",e);if(i.add(e),"/"==e)return 0n;const{dir:s,base:r}=Nb(e),a="/"==s?new Rw(this.getSync(t,0n,s,n)):this.findInodeSync(t,s,n,i),o=Pb(this.getSync(t,a.data,s,n));if(!(r in o))throw Sb.With("ENOENT",Ob(s,r),n);return o[r]}async findInode(t,e,n,i=new Set){const s=await this._findInode(t,e,n,i);return new Rw(await this.get(t,s,e,n))}findInodeSync(t,e,n,i=new Set){const s=this._findInodeSync(t,e,n,i);return new Rw(this.getSync(t,s,e,n))}async get(t,e,n,i){const s=await t.get(e);if(!s)throw Sb.With("ENOENT",n,i);return s}getSync(t,e,n,i){const s=t.getSync(e);if(!s)throw Sb.With("ENOENT",n,i);return s}async allocNew(t,e,n){for(let e=0;e<5;e++){const e=Gb();if(!await t.get(e))return e}throw new Sb(vb.ENOSPC,"No IDs available",e,n)}allocNewSync(t,e,n){for(let e=0;e<5;e++){const e=Gb();if(!t.getSync(e))return e}throw new Sb(vb.ENOSPC,"No IDs available",e,n)}async commitNew(t,e,n,i,s){const r={stack:[],error:void 0,hasError:!1};try{if("/"==t)throw Sb.With("EEXIST",t,s);const a=Ow(r,this.store.transaction(),!0),{dir:o,base:l}=Nb(t),u=await this.findInode(a,o,s),h=Pb(await this.get(a,u.data,o,s));if(h[l])throw Sb.With("EEXIST",t,s);const p=new Rw;return p.ino=await this.allocNew(a,t,s),p.data=await this.allocNew(a,t,s),p.mode=n|e,p.uid=u.mode&vv?u.uid:Hb.uid,p.gid=u.mode&wv?u.gid:Hb.gid,p.size=i.length,await a.set(p.ino,Ew(p)),await a.set(p.data,i),h[l]=p.ino,await a.set(u.data,$b(h)),await a.commit(),p}catch(t){r.error=t,r.hasError=!0}finally{const t=Aw(r);t&&await t}}commitNewSync(t,e,n,i,s){const r={stack:[],error:void 0,hasError:!1};try{if("/"==t)throw Sb.With("EEXIST",t,s);const a=Ow(r,this.store.transaction(),!1),{dir:o,base:l}=Nb(t),u=this.findInodeSync(a,o,s),h=Pb(this.getSync(a,u.data,o,s));if(h[l])throw Sb.With("EEXIST",t,s);const p=new Rw;return p.ino=this.allocNewSync(a,t,s),p.data=this.allocNewSync(a,t,s),p.size=i.length,p.mode=n|e,p.uid=u.mode&vv?u.uid:Hb.uid,p.gid=u.mode&wv?u.gid:Hb.gid,a.setSync(p.ino,Ew(p)),a.setSync(p.data,i),h[l]=p.ino,a.setSync(u.data,$b(h)),a.commitSync(),p}catch(t){r.error=t,r.hasError=!0}finally{Aw(r)}}async remove(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{const s=Ow(i,this.store.transaction(),!0),{dir:r,base:a}=Nb(t),o=await this.findInode(s,r,n),l=Pb(await this.get(s,o.data,r,n));if(!l[a])throw Sb.With("ENOENT",t,"remove");const u=l[a],h=new Rw(await this.get(s,u,t,n));if(delete l[a],!e&&h.toStats().isDirectory())throw Sb.With("EISDIR",t,"remove");await s.set(o.data,$b(l)),--h.nlink<1&&(await s.remove(h.data),await s.remove(u)),await s.commit()}catch(t){i.error=t,i.hasError=!0}finally{const t=Aw(i);t&&await t}}removeSync(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{const s=Ow(i,this.store.transaction(),!1),{dir:r,base:a}=Nb(t),o=this.findInodeSync(s,r,n),l=Pb(this.getSync(s,o.data,r,n)),u=l[a];if(!u)throw Sb.With("ENOENT",t,"remove");const h=new Rw(this.getSync(s,u,t,n));if(delete l[a],!e&&h.toStats().isDirectory())throw Sb.With("EISDIR",t,"remove");s.setSync(o.data,$b(l)),--h.nlink<1&&(s.removeSync(h.data),s.removeSync(u)),s.commitSync()}catch(t){i.error=t,i.hasError=!0}finally{Aw(i)}}}class Cw{constructor(t){this.store=t,this.done=!1}async[Symbol.asyncDispose](){this.done||await this.abort()}[Symbol.dispose](){this.done||this.abortSync()}}class Nw extends Cw{async keys(){return this.keysSync()}async get(t){return this.getSync(t)}async set(t,e){return this.setSync(t,e)}async remove(t){return this.removeSync(t)}async commit(){return this.commitSync()}async abort(){return this.abortSync()}}class kw extends Nw{constructor(){super(...arguments),this.originalData=new Map,this.modifiedKeys=new Set}keysSync(){return this.store.keys()}getSync(t){const e=this.store.get(t);return this.stashOldValue(t,e),e}setSync(t,e){return this.markModified(t),this.store.set(t,e)}removeSync(t){this.markModified(t),this.store.delete(t)}commitSync(){this.done=!0}abortSync(){if(this.done){for(const t of this.modifiedKeys){const e=this.originalData.get(t);e?this.store.set(t,e):this.store.delete(t)}this.done=!0}}stashOldValue(t,e){this.originalData.has(t)||this.originalData.set(t,e)}markModified(t){this.modifiedKeys.add(t),this.originalData.has(t)||this.originalData.set(t,this.store.get(t))}}class Dw extends Map{constructor(t="tmp"){super(),this.name=t}async sync(){}clearSync(){this.clear()}transaction(){return new kw(this)}}const Lw={name:"InMemory",isAvailable:()=>!0,options:{name:{type:"string",required:!1}},create({name:t}){const e=new Mw(new Dw(t));return e.checkRootSync(),e}};"function"==typeof SuppressedError&&SuppressedError;class Fw{constructor(){this.isEnabled=!1,this.sync=new Map,this.async=new Map}has(t){return this.isEnabled&&this.sync.has(t)}get(t){if(this.isEnabled)return this.sync.get(t)}set(t,e){this.isEnabled&&(this.sync.set(t,e),this.async.set(t,Promise.resolve(e)))}hasAsync(t){return this.isEnabled&&this.async.has(t)}getAsync(t){if(this.isEnabled)return this.async.get(t)}setAsync(t,e){this.isEnabled&&(this.async.set(t,e),e.then((e=>this.sync.set(t,e))))}clear(){this.isEnabled&&(this.sync.clear(),this.async.clear())}}const Pw=new Fw,$w=new Fw;var Bw=__webpack_require__(8287);function Vw(t,e){return Object.fromEntries(Object.entries(t).map((([t,n])=>[t,"function"==typeof n?n.bind(e):n])))}const Uw=new Map;let Yw=100;function Gw(t){const e=Yw++;return Uw.set(e,t),e}function Hw(t){if(!Uw.has(t))throw new Sb(vb.EBADF);return Uw.get(t)}const Ww=new Map;function zw(t,e){if("/"!==t[0]&&(t="/"+t),t=Ob(t),Ww.has(t))throw new Sb(vb.EINVAL,"Mount point "+t+" is already in use.");Ww.set(t,e),$w.clear()}function Xw(t){if("/"!==t[0]&&(t="/"+t),t=Ob(t),!Ww.has(t))throw new Sb(vb.EINVAL,"Mount point "+t+" is already unmounted.");Ww.delete(t),$w.clear()}function jw(t,e){const n=e?.root||"/";t=Ub(Ab(n,t));const i=[...Ww].sort(((t,e)=>t[0].length>e[0].length?-1:1));for(const[e,s]of i)if(e.length<=t.length&&t.startsWith(e))return""===(t=t.slice(e.length>1?e.length:0))&&(t=n),{fs:s,path:t,mountPoint:e,root:n};throw new Sb(vb.EIO,"No file system")}async function qw(){await Promise.all([...Ww.values()].map((t=>t.ready())))}function Kw(t,e){for(const[n,i]of Object.entries(e))t=t?.replaceAll(n,i);return t}function Qw(t,e){"string"==typeof t.stack&&(t.stack=Kw(t.stack,e));try{t.message=Kw(t.message,e)}catch{}return t.path&&(t.path=Kw(t.path,e)),t}function Jw(t){"/"in t&&Xw("/");for(const[e,n]of Object.entries(t))zw(e,n)}function Zw(t,e){const n=t.metadata(),i=n.blockSize||4096;return{type:(e?BigInt:Number)(n.type),bsize:(e?BigInt:Number)(i),ffree:(e?BigInt:Number)(n.freeNodes||Bv),files:(e?BigInt:Number)(n.totalNodes||Bv),bavail:(e?BigInt:Number)(n.freeSpace/i),bfree:(e?BigInt:Number)(n.freeSpace/i),blocks:(e?BigInt:Number)(n.totalSpace/i)}}function tS(t,e){const n=this?.credentials;if(n?.uid&&n?.gid&&n?.euid&&n?.egid)throw new Sb(vb.EPERM,"Can not chroot() as non-root user");return e&&this?(this.root+=t,this):function(t,e=structuredClone(Hb)){const n={root:t,credentials:Wb(e)},i=Vw(st,n),s=Vw(it,n);return{...n,...i,promises:s}}(Ab(this?.root||"/",t),n)}zw("/",Lw.create({name:"root"}));class eS extends sw{off(t,e,n,i){return super.off(t,e,n,i)}removeListener(t,e,n,i){return super.removeListener(t,e,n,i)}constructor(t){super(),this.path=t}setMaxListeners(){throw Sb.With("ENOSYS",this.path,"Watcher.setMaxListeners")}getMaxListeners(){throw Sb.With("ENOSYS",this.path,"Watcher.getMaxListeners")}prependListener(){throw Sb.With("ENOSYS",this.path,"Watcher.prependListener")}prependOnceListener(){throw Sb.With("ENOSYS",this.path,"Watcher.prependOnceListener")}rawListeners(){throw Sb.With("ENOSYS",this.path,"Watcher.rawListeners")}ref(){return this}unref(){return this}}class nS extends eS{constructor(t,e){super(t),this.options=e,function(t,e){const n=Ub(t);sS.has(n)||sS.set(n,new Set);sS.get(n).add(e)}(t.toString(),this)}close(){super.emit("close"),function(t,e){const n=Ub(t);sS.has(n)&&(sS.get(n).delete(e),0===sS.get(n).size&&sS.delete(n))}(this.path.toString(),this)}[Symbol.dispose](){this.close()}}class iS extends eS{constructor(t,e){super(t),this.options=e,this.start()}onInterval(){try{const n=hS(this.path);t=this.previous,e=n,(t.size!=e.size||+t.atime!=+e.atime||+t.mtime!=+e.mtime||+t.ctime!=+e.ctime||t.mode!=e.mode)&&(this.emit("change",n,this.previous),this.previous=n)}catch(t){this.emit("error",t)}var t,e}start(){const t=this.options.interval||5e3;try{this.previous=hS(this.path)}catch(t){return void this.emit("error",t)}this.intervalId=setInterval(this.onInterval.bind(this),t),this.options.persistent||"object"!=typeof this.intervalId||this.intervalId.unref()}stop(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this.removeAllListeners()}}const sS=new Map;function rS(t,e){if(e=Ub(e),sS.has(e))for(const n of sS.get(e))n.emit("change",t,Cb(e));let n,i=e;for(;i!==n;)if(n=i,i=Mb(i),sS.has(i))for(const n of sS.get(i))n.emit("change",t,e.slice(i.length+("/"==i?0:1)))}var aS=function(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var i,s;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=e[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=e[Symbol.dispose],n&&(s=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");s&&(i=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:i,async:n})}else n&&t.stack.push({async:!0});return e},oS=function(t){return function(e){function n(n){e.error=e.hasError?new t(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}return function t(){for(;e.stack.length;){var i=e.stack.pop();try{var s=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(s).then(t,(function(e){return n(e),t()}))}catch(t){n(t)}}if(e.hasError)throw e.error}()}}("function"==typeof SuppressedError?SuppressedError:function(t,e,n){var i=new Error(n);return i.name="SuppressedError",i.error=t,i.suppressed=e,i});function lS(t,e){t=Ub(t),e=Ub(e);const n=jw(t,this),i=jw(e,this);if(Vv.checkAccess&&!hS.call(this,Mb(t)).hasAccess(jb,this))throw Sb.With("EACCES",t,"rename");try{if(n===i)return n.fs.renameSync(n.path,i.path),rS("rename",t.toString()),void rS("change",e.toString());yS.call(this,e,TS(t)),dS.call(this,t),rS("rename",t.toString())}catch(s){throw Qw(s,{[n.path]:t,[i.path]:e})}}function uS(t){t=Ub(t);try{const{fs:e,path:n}=jw(GS.call(this,t),this);return e.existsSync(n)}catch(t){if(t.errno==vb.ENOENT)return!1;throw t}}function hS(t,e){t=Ub(t);const{fs:n,path:i}=jw(GS.call(this,t),this);try{const t=n.statSync(i);if(Vv.checkAccess&&!t.hasAccess(Xb,this))throw Sb.With("EACCES",i,"stat");return e?.bigint?new Hv(t):t}catch(e){throw Qw(e,{[i]:t})}}function pS(t,e){t=Ub(t);const{fs:n,path:i}=jw(t,this);try{const t=n.statSync(i);return e?.bigint?new Hv(t):t}catch(e){throw Qw(e,{[i]:t})}}function cS(t,e=0){const n={stack:[],error:void 0,hasError:!1};try{const i=aS(n,fS.call(this,t,"r+"),!1);if(e||(e=0),e<0)throw new Sb(vb.EINVAL);i.truncateSync(e)}catch(t){n.error=t,n.hasError=!0}finally{oS(n)}}function dS(t){t=Ub(t);const{fs:e,path:n}=jw(t,this);try{if(Vv.checkAccess&&!(Pw.get(t)||e.statSync(n)).hasAccess(jb,this))throw Sb.With("EACCES",n,"unlink");e.unlinkSync(n),rS("rename",t.toString())}catch(e){throw Qw(e,{[n]:t})}}function fS(t,e,n,i=!0){t=Ub(t);const s=Bb(n,420),r=jv(e);t=i?GS.call(this,t):t;const{fs:a,path:o}=jw(t,this);let l;try{l=a.statSync(o)}catch{}if(!l){if(!Qv(r)&&!Zv(r)||"r+"==r)throw Sb.With("ENOENT",t,"_open");const e=a.statSync(Mb(o));if(Vv.checkAccess&&!e.hasAccess(jb,this))throw Sb.With("EACCES",Mb(t),"_open");if(!e.isDirectory())throw Sb.With("ENOTDIR",Mb(t),"_open");return a.createFileSync(o,r,s)}if(Vv.checkAccess&&(!l.hasAccess(s,this)||!l.hasAccess(qv(r),this)))throw Sb.With("EACCES",t,"_open");if(tw(r))throw Sb.With("EEXIST",t,"_open");const u=a.openFileSync(o,r);return Jv(r)&&u.truncateSync(0),u}function mS(t,e,n=zb){return Gw(fS.call(this,t,e,n,!0))}function gS(t,e,n){return Gw(fS.call(this,t,e,n,!1))}function _S(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{const s=aS(i,fS.call(this,t,e,420,n),!1),r=s.statSync(),a=new Uint8Array(r.size);return s.readSync(a,0,r.size,0),a}catch(t){i.error=t,i.hasError=!0}finally{oS(i)}}function TS(t,e={}){const n=Yb(e,null,"r",420);if(!Kv(jv(n.flag)))throw new Sb(vb.EINVAL,"Flag passed to readFile must allow for reading.");const i=Bw.Buffer.from(_S.call(this,"number"==typeof t?Hw(t).path:t.toString(),n.flag,!0));return n.encoding?i.toString(n.encoding):i}function yS(t,e,n={}){const i={stack:[],error:void 0,hasError:!1};try{const s=Yb(n,"utf8","w+",420),r=jv(s.flag);if(!Qv(r))throw new Sb(vb.EINVAL,"Flag passed to writeFile must allow for writing.");if("string"!=typeof e&&!s.encoding)throw new Sb(vb.EINVAL,"Encoding not specified");const a="string"==typeof e?Bw.Buffer.from(e,s.encoding):new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(!a)throw new Sb(vb.EINVAL,"Data not specified");aS(i,fS.call(this,"number"==typeof t?Hw(t).path:t.toString(),r,s.mode,!0),!1).writeSync(a,0,a.byteLength,0),rS("change",t.toString())}catch(t){i.error=t,i.hasError=!0}finally{oS(i)}}function IS(t,e,n={}){const i={stack:[],error:void 0,hasError:!1};try{const s=Yb(n,"utf8","a+",420),r=jv(s.flag);if(!Zv(r))throw new Sb(vb.EINVAL,"Flag passed to appendFile must allow for appending.");if("string"!=typeof e&&!s.encoding)throw new Sb(vb.EINVAL,"Encoding not specified");const a="string"==typeof e?Bw.Buffer.from(e,s.encoding):new Uint8Array(e.buffer,e.byteOffset,e.byteLength);aS(i,fS.call(this,"number"==typeof t?Hw(t).path:t.toString(),r,s.mode,!0),!1).writeSync(a,0,a.byteLength)}catch(t){i.error=t,i.hasError=!0}finally{oS(i)}}function ES(t,e){const n=Hw(t).statSync();return e?.bigint?new Hv(n):n}function bS(t){Hw(t).closeSync(),Uw.delete(t)}function vS(t,e=0){if(e||(e=0),e<0)throw new Sb(vb.EINVAL);Hw(t).truncateSync(e)}function wS(t){Hw(t).syncSync()}function SS(t){Hw(t).datasyncSync()}function xS(t,e,n,i,s){let r,a,o,l;if("string"==typeof e){l="number"==typeof n?n:null;const t="string"==typeof i?i:"utf8";a=0,r=Bw.Buffer.from(e,t),o=r.byteLength}else r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),a=n,o=i,l="number"==typeof s?s:null;const u=Hw(t);l??(l=u.position);const h=u.writeSync(r,a,o,l);return rS("change",u.path),h}function RS(t,e,n,i,s){const r=Hw(t),a="object"==typeof n?n.offset:n;return"object"==typeof n&&(i=n.length,s=n.position),s=Number(s),isNaN(s)&&(s=r.position),r.readSync(e,a,i,s)}function OS(t,e,n){Hw(t).chownSync(e,n)}function AS(t,e){const n=Bb(e,-1);if(n<0)throw new Sb(vb.EINVAL,"Invalid mode.");Hw(t).chmodSync(n)}function MS(t,e,n){Hw(t).utimesSync(Vb(e),Vb(n))}function CS(t){t=Ub(t);const{fs:e,path:n}=jw(GS.call(this,t),this);try{const i=Pw.get(t)||e.statSync(n);if(!i.isDirectory())throw Sb.With("ENOTDIR",n,"rmdir");if(Vv.checkAccess&&!i.hasAccess(jb,this))throw Sb.With("EACCES",n,"rmdir");e.rmdirSync(n),rS("rename",t.toString())}catch(e){throw Qw(e,{[n]:t})}}function NS(t,e){e="object"==typeof e?e:{mode:e};const n=Bb(e?.mode,511);t=GS.call(this,t);const{fs:i,path:s,root:r}=jw(t,this),a={[s]:t};try{if(!e?.recursive){if(Vv.checkAccess&&!i.statSync(Mb(s)).hasAccess(jb,this))throw Sb.With("EACCES",Mb(s),"mkdir");return i.mkdirSync(s,n)}const o=[];for(let e=s,n=t;!i.existsSync(e);e=Mb(e),n=Mb(n))o.unshift(e),a[e]=n;for(const t of o){if(Vv.checkAccess&&!i.statSync(Mb(t)).hasAccess(jb,this))throw Sb.With("EACCES",Mb(t),"mkdir");i.mkdirSync(t,n),rS("rename",t)}return 1==r.length?o[0]:o[0]?.slice(r.length)}catch(t){throw Qw(t,a)}}function kS(t,e){e="object"==typeof e?e:{encoding:e},t=Ub(t);const{fs:n,path:i}=jw(GS.call(this,t),this);let s;try{const e=Pw.get(t)||n.statSync(i);if(Pw.set(t,e),Vv.checkAccess&&!e.hasAccess(Xb,this))throw Sb.With("EACCES",i,"readdir");if(!e.isDirectory())throw Sb.With("ENOTDIR",i,"readdir");s=n.readdirSync(i)}catch(e){throw Qw(e,{[i]:t})}const r=[];for(const a of s){const s=Pw.get(Ab(t,a))||n.statSync(Ab(i,a));if(Pw.set(Ab(t,a),s),e?.withFileTypes?r.push(new ZS(a,s)):"buffer"==e?.encoding?r.push(Bw.Buffer.from(a)):r.push(a),s.isDirectory()&&e?.recursive)for(const n of kS.call(this,Ab(t,a),{...e,_isIndirect:!0}))n instanceof ZS?(n.path=Ab(a,n.path),r.push(n)):Bw.Buffer.isBuffer(n)?r.push(Bw.Buffer.from(Ab(a,Fb(n)))):r.push(Ab(a,n))}return e?._isIndirect||Pw.clear(),r}function DS(t,e){if(t=Ub(t),Vv.checkAccess&&!hS(Mb(t)).hasAccess(Xb,this))throw Sb.With("EACCES",Mb(t),"link");if(e=Ub(e),Vv.checkAccess&&!hS(Mb(e)).hasAccess(jb,this))throw Sb.With("EACCES",Mb(e),"link");const{fs:n,path:i}=jw(t,this),s=jw(e,this);if(n!=s.fs)throw Sb.With("EXDEV",e,"link");try{if(Vv.checkAccess&&!n.statSync(i).hasAccess(Xb,this))throw Sb.With("EACCES",i,"link");return n.linkSync(i,e)}catch(n){throw Qw(n,{[i]:t,[s.path]:e})}}function LS(t,e,n="file"){if(!["file","dir","junction"].includes(n))throw new Sb(vb.EINVAL,"Invalid type: "+n);if(uS.call(this,e))throw Sb.With("EEXIST",e.toString(),"symlink");yS.call(this,e,t.toString());fS.call(this,e,"r+",420,!1).chmodSync(_v)}function FS(t,e){const n=Bw.Buffer.from(_S.call(this,t.toString(),"r",!1)),i="object"==typeof e?e?.encoding:e;return"buffer"==i?n:n.toString(i)}function PS(t,e,n){const i=mS.call(this,t,"r+");OS(i,e,n),bS(i)}function $S(t,e,n){const i=gS.call(this,t,"r+");OS(i,e,n),bS(i)}function BS(t,e){const n=mS.call(this,t,"r+");AS(n,e),bS(n)}function VS(t,e){const n=gS.call(this,t,"r+");AS(n,e),bS(n)}function US(t,e,n){const i=mS.call(this,t,"r+");MS(i,e,n),bS(i)}function YS(t,e,n){const i=gS.call(this,t,"r+");MS(i,e,n),bS(i)}function GS(t,e){t=Ub(t);const n=(this?.root||"")+t;if($w.has(n))return $w.get(n);const{base:i,dir:s}=Nb(t),r="/"==s?"/":$w.get((this?.root||"")+s)||GS.call(this,s),a=Ab(r,i),{fs:o,path:l}=jw(a,this);try{const i=Pw.get(a)||o.statSync(l);if(Pw.set(a,i),!i.isSymbolicLink())return $w.set(t,a),a;const s=Ob(r,FS.call(this,a,e).toString()),u=$w.get((this?.root||"")+s)||GS.call(this,s);return $w.set(n,u),u}catch(e){if("ENOENT"==e.code)return t;throw Qw(e,{[l]:a})}}function HS(t,e=384){if(Vv.checkAccess&&!hS.call(this,t).hasAccess(e,this))throw new Sb(vb.EACCES)}function WS(t,e){let n;t=Ub(t);try{n=Pw.get(t)||pS.bind(this)(t)}catch(t){if("ENOENT"!=t.code||!e?.force)throw t}if(n){switch(Pw.set(t,n),n.mode&mv){case Iv:if(e?.recursive)for(const n of kS.call(this,t,{_isIndirect:!0}))WS.call(this,Ab(t,n),{...e,_isIndirect:!0});CS.call(this,t);break;case Tv:case _v:case yv:case Ev:dS.call(this,t);break;default:throw Pw.clear(),new Sb(vb.EPERM,"File type not supported",t,"rm")}e?._isIndirect||Pw.clear()}}function zS(t,e){const n="object"==typeof e?e?.encoding:e||"utf8",i="/tmp/"+`${t}${Date.now()}-${Math.random().toString(36).slice(2)}`;return NS.call(this,i),"buffer"==n?Bw.Buffer.from(i):i}function XS(t,e,n){if(t=Ub(t),e=Ub(e),n&&n&Kb&&uS(e))throw new Sb(vb.EEXIST,"Destination file already exists.",e,"copyFile");yS.call(this,e,TS(t)),rS("rename",e.toString())}function jS(t,e,n){const i=Hw(t);let s=0;for(const t of e)s+=i.readSync(t,0,t.byteLength,n+s);return s}function qS(t,e,n){const i=Hw(t);let s=0;for(const t of e)s+=i.writeSync(new Uint8Array(t.buffer),0,t.byteLength,n+s);return s}function KS(t,e){return t=Ub(t),new tx(t,this)}function QS(t,e,n){t=Ub(t),e=Ub(e);const i=pS.call(this,t);if(n?.errorOnExist&&uS.call(this,e))throw new Sb(vb.EEXIST,"Destination file or directory already exists.",e,"cp");switch(i.mode&mv){case Iv:if(!n?.recursive)throw new Sb(vb.EISDIR,t+" is a directory (not copied)",t,"cp");NS.call(this,e,{recursive:!0});for(const i of kS.call(this,t,{withFileTypes:!0}))n.filter&&!n.filter(Ab(t,i.name),Ab(e,i.name))||QS.call(this,Ab(t,i.name),Ab(e,i.name),n);break;case Tv:case _v:XS.call(this,t,e);break;default:throw new Sb(vb.EPERM,"File type not supported",t,"rm")}n?.preserveTimestamps&&US.call(this,e,i.atime,i.mtime)}function JS(t,e){t=Ub(t);const{fs:n}=jw(t,this);return Zw(n,e?.bigint)}class ZS{get name(){return Cb(this.path)}constructor(t,e){this.path=t,this.stats=e}get parentPath(){return this.path}isFile(){return this.stats.isFile()}isDirectory(){return this.stats.isDirectory()}isBlockDevice(){return this.stats.isBlockDevice()}isCharacterDevice(){return this.stats.isCharacterDevice()}isSymbolicLink(){return this.stats.isSymbolicLink()}isFIFO(){return this.stats.isFIFO()}isSocket(){return this.stats.isSocket()}}class tx{checkClosed(){if(this.closed)throw new Sb(vb.EBADF,"Can not use closed Dir")}constructor(t,e){this.path=t,this.context=e,this.closed=!1}close(t){if(this.closed=!0,!t)return Promise.resolve();t()}closeSync(){this.closed=!0}async _read(){return this.checkClosed(),this._entries??(this._entries=await Ix.call(this.context,this.path,{withFileTypes:!0})),this._entries.length?this._entries.shift()??null:null}read(t){if(!t)return this._read();this._read().then((e=>t(void 0,e)))}readSync(){return this.checkClosed(),this._entries??(this._entries=kS.call(this.context,this.path,{withFileTypes:!0})),this._entries.length?this._entries.shift()??null:null}async next(){const t=await this._read();return t?{done:!1,value:t}:(await this.close(),{done:!0,value:void 0})}[Symbol.asyncIterator](){return this}}var ex=__webpack_require__(6248);class nx extends ex.Readable{close(t=()=>null){try{super.destroy(),super.emit("close"),t()}catch(e){t(new Sb(vb.EIO,e.toString()))}}}class ix extends ex.Writable{close(t=()=>null){try{super.destroy(),super.emit("close"),t()}catch(e){t(new Sb(vb.EIO,e.toString()))}}}var sx=function(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var i,s;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=e[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=e[Symbol.dispose],n&&(s=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");s&&(i=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:i,async:n})}else n&&t.stack.push({async:!0});return e},rx=function(t){return function(e){function n(n){e.error=e.hasError?new t(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}return function t(){for(;e.stack.length;){var i=e.stack.pop();try{var s=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(s).then(t,(function(e){return n(e),t()}))}catch(t){n(t)}}if(e.hasError)throw e.error}()}}("function"==typeof SuppressedError?SuppressedError:function(t,e,n){var i=new Error(n);return i.name="SuppressedError",i.error=t,i.suppressed=e,i});class ax{constructor(t,e){this.context=e;const n="number"!=typeof t;this.fd=n?Gw(t):t,this.file=n?t:Hw(t)}async chown(t,e){await this.file.chown(t,e),rS("change",this.file.path)}async chmod(t){const e=Bb(t,-1);if(e<0)throw new Sb(vb.EINVAL,"Invalid mode.");await this.file.chmod(e),rS("change",this.file.path)}datasync(){return this.file.datasync()}sync(){return this.file.sync()}async truncate(t){if(t||(t=0),t<0)throw new Sb(vb.EINVAL);await this.file.truncate(t),rS("change",this.file.path)}async utimes(t,e){await this.file.utimes(Vb(t),Vb(e)),rS("change",this.file.path)}async appendFile(t,e={}){const n=Yb(e,"utf8","a",420);if(!Zv(jv(n.flag)))throw new Sb(vb.EINVAL,"Flag passed to appendFile must allow for appending.");if("string"!=typeof t&&!n.encoding)throw new Sb(vb.EINVAL,"Encoding not specified");const i="string"==typeof t?Bw.Buffer.from(t,n.encoding):t;await this.file.write(i,0,i.length),rS("change",this.file.path)}read(t,e,n,i){return isNaN(+i)&&(i=this.file.position),this.file.read(t,e,n,i)}async readFile(t){const e=Yb(t,null,"r",292);if(!Kv(jv(e.flag)))throw new Sb(vb.EINVAL,"Flag passed must allow for reading.");const{size:n}=await this.stat(),{buffer:i}=await this.file.read(new Uint8Array(n),0,n,0),s=Bw.Buffer.from(i);return e.encoding?s.toString(e.encoding):s}readableWebStream(t={}){const e=globalThis;if(!("ReadableStream"in e))throw new Sb(vb.ENOSYS,"ReadableStream is missing on globalThis");return new e.ReadableStream({start:async t=>{try{const e=65536,n=1e7;let i=0,s=0,r=NaN;for(;r>0;){const a=await this.read(new Uint8Array(e),0,e,s);if(!a.bytesRead)return void t.close();if(t.enqueue(a.buffer.slice(0,a.bytesRead)),s+=a.bytesRead,++i>=n)throw new Sb(vb.EFBIG,"Too many iterations on readable stream",this.file.path,"FileHandle.readableWebStream");r=a.bytesRead}}catch(e){t.error(e)}},type:t.type})}readLines(t){throw Sb.With("ENOSYS",this.file.path,"FileHandle.readLines")}[Symbol.asyncDispose](){return this.close()}async stat(t){const e=await this.file.stat();if(Vv.checkAccess&&!e.hasAccess(Xb,this.context))throw Sb.With("EACCES",this.file.path,"stat");return t?.bigint?new Hv(e):e}async write(t,e,n,i){let s,r,a;if("string"==typeof t){i="number"==typeof e?e:null;const o="string"==typeof n?n:"utf8";r=0,s=Bw.Buffer.from(t,o),a=s.length}else s=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),r=e,a=n,i="number"==typeof i?i:null;i??(i=this.file.position);const o=await this.file.write(s,r,a,i);return rS("change",this.file.path),{buffer:s,bytesWritten:o}}async writeFile(t,e={}){const n=Yb(e,"utf8","w",420);if(!Qv(jv(n.flag)))throw new Sb(vb.EINVAL,"Flag passed must allow for writing.");if("string"!=typeof t&&!n.encoding)throw new Sb(vb.EINVAL,"Encoding not specified");const i="string"==typeof t?Bw.Buffer.from(t,n.encoding):t;await this.file.write(i,0,i.length,0),rS("change",this.file.path)}async close(){await this.file.close(),Uw.delete(this.fd)}async writev(t,e){let n=0;for(const i of t)n+=(await this.write(i,0,i.length,e+n)).bytesWritten;return{bytesWritten:n,buffers:t}}async readv(t,e){let n=0;for(const i of t)n+=(await this.read(i,0,i.byteLength,e+n)).bytesRead;return{bytesRead:n,buffers:t}}createReadStream(t){const e=new nx({highWaterMark:t?.highWaterMark||65536,encoding:t.encoding,read:async t=>{try{const n=await this.read(new Uint8Array(t),0,t,this.file.position);e.push(n.bytesRead?n.buffer.slice(0,n.bytesRead):null),this.file.position+=n.bytesRead}catch(t){e.destroy(t)}}});return e.path=this.file.path,e}createWriteStream(t){const e=new ix({highWaterMark:t?.highWaterMark,encoding:t?.encoding,write:async(t,e,n)=>{try{const{bytesWritten:i}=await this.write(t,null,e);n(i==t.length?null:new Error("Failed to write full chunk"))}catch(t){n(t)}}});return e.path=this.file.path,e}}async function ox(t,e){t=Ub(t),e=Ub(e);const n=jw(t,this),i=jw(e,this);if(Vv.checkAccess&&!(await ux.call(this,Mb(t))).hasAccess(jb,this))throw Sb.With("EACCES",t,"rename");try{if(n.mountPoint==i.mountPoint)return await n.fs.rename(n.path,i.path),rS("rename",t.toString()),void rS("change",e.toString());await gx.call(this,e,await mx(t)),await cx.call(this,t),rS("rename",t.toString())}catch(s){throw Qw(s,{[n.path]:t,[i.path]:e})}}async function lx(t){try{const{fs:e,path:n}=jw(await Mx.call(this,t),this);return await e.exists(n)}catch(t){if(t instanceof Sb&&"ENOENT"==t.code)return!1;throw t}}async function ux(t,e){t=Ub(t);const{fs:n,path:i}=jw(await Mx.call(this,t),this);try{const t=await n.stat(i);if(Vv.checkAccess&&!t.hasAccess(Xb,this))throw Sb.With("EACCES",i,"stat");return e?.bigint?new Hv(t):t}catch(e){throw Qw(e,{[i]:t})}}async function hx(t,e){t=Ub(t);const{fs:n,path:i}=jw(t,this);try{const t=await n.stat(i);return e?.bigint?new Hv(t):t}catch(e){throw Qw(e,{[i]:t})}}async function px(t,e=0){const n={stack:[],error:void 0,hasError:!1};try{const i=sx(n,await fx.call(this,t,"r+"),!0);await i.truncate(e)}catch(t){n.error=t,n.hasError=!0}finally{const t=rx(n);t&&await t}}async function cx(t){t=Ub(t);const{fs:e,path:n}=jw(t,this);try{if(Vv.checkAccess&&!(await(Pw.getAsync(t)||e.stat(n))).hasAccess(jb,this))throw Sb.With("EACCES",n,"unlink");await e.unlink(n),rS("rename",t.toString())}catch(e){throw Qw(e,{[n]:t})}}async function dx(t,e,n=420,i){t=Ub(t);const s=Bb(n,420),r=jv(e);t=i?await Mx.call(this,t):t;const{fs:a,path:o}=jw(t,this),l=await a.stat(o).catch((()=>null));if(!l){if(!Qv(r)&&!Zv(r)||"r+"==r)throw Sb.With("ENOENT",t,"_open");const e=await a.stat(Mb(o));if(Vv.checkAccess&&!e.hasAccess(jb,this))throw Sb.With("EACCES",Mb(t),"_open");if(!e.isDirectory())throw Sb.With("ENOTDIR",Mb(t),"_open");return new ax(await a.createFile(o,r,s),this)}if(Vv.checkAccess&&!l.hasAccess(qv(r),this))throw Sb.With("EACCES",t,"_open");if(tw(r))throw Sb.With("EEXIST",t,"_open");const u=new ax(await a.openFile(o,r),this);return Jv(r)&&await u.truncate(0),u}async function fx(t,e="r",n=420){return await dx.call(this,t,e,n,!0)}async function mx(t,e){const n={stack:[],error:void 0,hasError:!1};try{const i=Yb(e,null,"r",420),s=sx(n,"object"==typeof t&&"fd"in t?t:await fx.call(this,t,i.flag,i.mode),!0);return await s.readFile(i)}catch(t){n.error=t,n.hasError=!0}finally{const t=rx(n);t&&await t}}async function gx(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{const s=Yb(n,"utf8","w+",420),r=sx(i,t instanceof ax?t:await fx.call(this,t.toString(),s.flag,s.mode),!0),a=e;if("string"!=typeof a&&!(a instanceof Uint8Array))throw new Sb(vb.EINVAL,"Iterables and streams not supported",r.file.path,"writeFile");await r.writeFile(a,s)}catch(t){i.error=t,i.hasError=!0}finally{const t=rx(i);t&&await t}}async function _x(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{const s=Yb(n,"utf8","a",420);if(!Zv(jv(s.flag)))throw new Sb(vb.EINVAL,"Flag passed to appendFile must allow for appending.");if("string"!=typeof e&&!s.encoding)throw new Sb(vb.EINVAL,"Encoding not specified");const r="string"==typeof e?Bw.Buffer.from(e,s.encoding):new Uint8Array(e.buffer,e.byteOffset,e.byteLength),a=sx(i,"object"==typeof t&&"fd"in t?t:await fx.call(this,t,s.flag,s.mode),!0);await a.appendFile(r,s)}catch(t){i.error=t,i.hasError=!0}finally{const t=rx(i);t&&await t}}async function Tx(t){t=await Mx.call(this,t);const{fs:e,path:n}=jw(t,this);try{const i=await(Pw.getAsync(t)||e.stat(n));if(!i)throw Sb.With("ENOENT",t,"rmdir");if(!i.isDirectory())throw Sb.With("ENOTDIR",n,"rmdir");if(Vv.checkAccess&&!i.hasAccess(jb,this))throw Sb.With("EACCES",n,"rmdir");await e.rmdir(n),rS("rename",t.toString())}catch(e){throw Qw(e,{[n]:t})}}async function yx(t,e){e="object"==typeof e?e:{mode:e};const n=Bb(e?.mode,511);t=await Mx.call(this,t);const{fs:i,path:s,root:r}=jw(t,this),a={[s]:t};try{if(!e?.recursive){if(Vv.checkAccess&&!(await i.stat(Mb(s))).hasAccess(jb,this))throw Sb.With("EACCES",Mb(s),"mkdir");return await i.mkdir(s,n),void rS("rename",t.toString())}const o=[];for(let e=s,n=t;!await i.exists(e);e=Mb(e),n=Mb(n))o.unshift(e),a[e]=n;for(const t of o){if(Vv.checkAccess&&!(await i.stat(Mb(t))).hasAccess(jb,this))throw Sb.With("EACCES",Mb(t),"mkdir");await i.mkdir(t,n),rS("rename",t)}return 1==r.length?o[0]:o[0]?.slice(r.length)}catch(t){throw Qw(t,a)}}async function Ix(t,e){e="object"==typeof e?e:{encoding:e},t=await Mx.call(this,t);const n=e=>{throw Qw(e,{[s]:t})},{fs:i,path:s}=jw(t,this),r=Pw.getAsync(t)||i.stat(s).catch(n);Pw.setAsync(t,r);const a=await r;if(!a)throw Sb.With("ENOENT",t,"readdir");if(Vv.checkAccess&&!a.hasAccess(Xb,this))throw Sb.With("EACCES",t,"readdir");if(!a.isDirectory())throw Sb.With("ENOTDIR",t,"readdir");const o=await i.readdir(s).catch(n),l=[];return await Promise.all(o.map((async r=>{let a;if(e?.recursive||e?.withFileTypes){const e=Pw.getAsync(Ab(t,r))||i.stat(Ab(s,r)).catch(n);Pw.setAsync(Ab(t,r),e),a=await e}if(e?.withFileTypes?l.push(new ZS(r,a)):"buffer"==e?.encoding?l.push(Bw.Buffer.from(r)):l.push(r),e?.recursive&&a?.isDirectory())for(const n of await Ix.call(this,Ab(t,r),{...e,_isIndirect:!0}))n instanceof ZS?(n.path=Ab(r,n.path),l.push(n)):Bw.Buffer.isBuffer(n)?l.push(Bw.Buffer.from(Ab(r,Fb(n)))):l.push(Ab(r,n))}))),e?._isIndirect||Pw.clear(),l}async function Ex(t,e){t=Ub(t),e=Ub(e);const{fs:n,path:i}=jw(t,this),s=jw(e,this);if(n!=s.fs)throw Sb.With("EXDEV",e,"link");try{if(Vv.checkAccess&&!(await n.stat(Mb(t))).hasAccess(Xb,this))throw Sb.With("EACCES",Mb(i),"link");if(Vv.checkAccess&&!(await ux.call(this,Mb(e))).hasAccess(jb,this))throw Sb.With("EACCES",Mb(e),"link");if(Vv.checkAccess&&!(await n.stat(i)).hasAccess(Xb,this))throw Sb.With("EACCES",i,"link");return await n.link(i,s.path)}catch(n){throw Qw(n,{[s.path]:e,[i]:t})}}async function bx(t,e,n="file"){const i={stack:[],error:void 0,hasError:!1};try{if(!["file","dir","junction"].includes(n))throw new Sb(vb.EINVAL,"Invalid symlink type: "+n);if(await lx.call(this,e))throw Sb.With("EEXIST",e.toString(),"symlink");const s=sx(i,await dx.call(this,e,"w+",420,!1),!0);await s.writeFile(t.toString()),await s.file.chmod(_v)}catch(t){i.error=t,i.hasError=!0}finally{const t=rx(i);t&&await t}}async function vx(t,e){const n={stack:[],error:void 0,hasError:!1};try{const i=sx(n,await dx.call(this,Ub(t),"r",420,!1),!0),s=await i.readFile(),r="object"==typeof e?e?.encoding:e;return"buffer"==r?s:s.toString(r)}catch(t){n.error=t,n.hasError=!0}finally{const t=rx(n);t&&await t}}async function wx(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{const s=sx(i,await fx.call(this,t,"r+"),!0);await s.chown(e,n)}catch(t){i.error=t,i.hasError=!0}finally{const t=rx(i);t&&await t}}async function Sx(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{const s=sx(i,await dx.call(this,t,"r+",420,!1),!0);await s.chown(e,n)}catch(t){i.error=t,i.hasError=!0}finally{const t=rx(i);t&&await t}}async function xx(t,e){const n={stack:[],error:void 0,hasError:!1};try{const i=sx(n,await fx.call(this,t,"r+"),!0);await i.chmod(e)}catch(t){n.error=t,n.hasError=!0}finally{const t=rx(n);t&&await t}}async function Rx(t,e){const n={stack:[],error:void 0,hasError:!1};try{const i=sx(n,await dx.call(this,t,"r+",420,!1),!0);await i.chmod(e)}catch(t){n.error=t,n.hasError=!0}finally{const t=rx(n);t&&await t}}async function Ox(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{const s=sx(i,await fx.call(this,t,"r+"),!0);await s.utimes(e,n)}catch(t){i.error=t,i.hasError=!0}finally{const t=rx(i);t&&await t}}async function Ax(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{const s=sx(i,await dx.call(this,t,"r+",420,!1),!0);await s.utimes(new Date(e),new Date(n))}catch(t){i.error=t,i.hasError=!0}finally{const t=rx(i);t&&await t}}async function Mx(t,e){t=Ub(t);const n=(this?.root||"")+t;if($w.hasAsync(n))return $w.getAsync(n);const{base:i,dir:s}=Nb(t),r="/"==s?"/":await($w.getAsync((this?.root||"")+s)||Mx.call(this,s)),a=Ab(r,i),{fs:o,path:l}=jw(a,this);try{const e=Pw.getAsync(a)||o.stat(l);if(Pw.setAsync(a,e),!(await e).isSymbolicLink())return $w.set(t,a),a;const i=Ob(r,(await vx.call(this,a)).toString()),s=$w.getAsync((this?.root||"")+i)||Mx.call(this,i);return $w.setAsync(n,s),await s}catch(e){if("ENOENT"==e.code)return t;throw Qw(e,{[l]:a})}}function Cx(t,e={}){return{[Symbol.asyncIterator](){const n=new nS(t.toString(),"string"!=typeof e?e:{encoding:e}),i=[];function s(){n.close();for(const t of i)t({value:null,done:!0});return i.length=0,Promise.resolve({value:null,done:!0})}return n.on("change",((t,e)=>{i.shift()?.({value:{eventType:t,filename:e},done:!1})})),{async next(){const{promise:t,resolve:e}=Promise.withResolvers();return i.push(e),t},return:s,throw:s}}}}async function Nx(t,e=zb){if(!Vv.checkAccess)return;if(!(await ux.call(this,t)).hasAccess(e,this))throw new Sb(vb.EACCES)}async function kx(t,e){t=Ub(t);const n=await(Pw.getAsync(t)||hx.call(this,t).catch((t=>{if("ENOENT"!=t.code||!e?.force)throw t})));if(n){switch(Pw.set(t,n),n.mode&mv){case Iv:if(e?.recursive)for(const n of await Ix.call(this,t,{_isIndirect:!0}))await kx.call(this,Ab(t,n),{...e,_isIndirect:!0});await Tx.call(this,t);break;case Tv:case _v:case yv:case Ev:await cx.call(this,t);break;default:throw Pw.clear(),new Sb(vb.EPERM,"File type not supported",t,"rm")}e?._isIndirect||Pw.clear()}}async function Dx(t,e){const n="object"==typeof e?e?.encoding:e||"utf8",i="/tmp/"+`${t}${Date.now()}-${Math.random().toString(36).slice(2)}`;return await yx.call(this,i),"buffer"==n?Bw.Buffer.from(i):i}async function Lx(t,e,n){if(t=Ub(t),e=Ub(e),n&&n&Kb&&await lx.call(this,e))throw new Sb(vb.EEXIST,"Destination file already exists.",e,"copyFile");await gx.call(this,e,await mx.call(this,t)),rS("rename",e.toString())}function Fx(t,e){return t=Ub(t),Promise.resolve(new tx(t,this))}async function Px(t,e,n){t=Ub(t),e=Ub(e);const i=await hx.call(this,t);if(n?.errorOnExist&&await lx.call(this,e))throw new Sb(vb.EEXIST,"Destination file or directory already exists.",e,"cp");switch(i.mode&mv){case Iv:{if(!n?.recursive)throw new Sb(vb.EISDIR,t+" is a directory (not copied)",t,"cp");const[i]=await Promise.all([Ix.call(this,t,{withFileTypes:!0}),yx.call(this,e,{recursive:!0})]),s=async i=>{n.filter&&!n.filter(Ab(t,i.name),Ab(e,i.name))||await Px.call(this,Ab(t,i.name),Ab(e,i.name),n)};await Promise.all(i.map(s));break}case Tv:case _v:await Lx.call(this,t,e);break;default:throw new Sb(vb.EPERM,"File type not supported",t,"rm")}n?.preserveTimestamps&&await Ox.call(this,e,i.atime,i.mtime)}async function $x(t,e){t=Ub(t);const{fs:n}=jw(t,this);return Promise.resolve(Zw(n,e?.bigint))}const Bx=()=>{};function Vx(t,e,n=Bx){ox.call(this,t,e).then((()=>n())).catch(n)}function Ux(t,e=Bx){lx.call(this,t).then(e).catch((()=>e(!1)))}function Yx(t,e,n=Bx){n="function"==typeof e?e:n,ux.call(this,t,"function"!=typeof e?e:{}).then((t=>n(void 0,t))).catch(n)}function Gx(t,e,n=Bx){n="function"==typeof e?e:n,hx.call(this,t,"function"!=typeof e?e:{}).then((t=>n(void 0,t))).catch(n)}function Hx(t,e=0,n=Bx){n="function"==typeof e?e:n;const i="number"==typeof e?e:0;px.call(this,t,i).then((()=>n())).catch(n)}function Wx(t,e=Bx){cx.call(this,t).then((()=>e())).catch(e)}function zx(t,e,n,i=Bx){const s=Bb(n,420);i="function"==typeof n?n:i,fx.call(this,t,e,s).then((t=>i(void 0,t.fd))).catch(i)}function Xx(t,e,n=Bx){n="function"==typeof e?e:n,mx.call(this,t,"function"==typeof e?null:e).then((t=>n(void 0,t))).catch(n)}function jx(t,e,n,i=Bx){i="function"==typeof n?n:i,gx.call(this,t,e,"function"!=typeof n?n:null).then((()=>i(void 0))).catch(i)}function qx(t,e,n,i=Bx){const s="function"!=typeof n?n:void 0;i="function"==typeof n?n:i,_x.call(this,t,e,s).then((()=>i())).catch(i)}function Kx(t,e,n=Bx){n="function"==typeof e?e:n,Hw(t).stat().then((t=>n(void 0,"object"==typeof e&&e?.bigint?new Hv(t):t))).catch(n)}function Qx(t,e=Bx){const n=Hw(t).close();Uw.delete(t),n.then((()=>e())).catch(e)}function Jx(t,e,n=Bx){const i="number"==typeof e?e:0;n="function"==typeof e?e:n;const s=Hw(t);if(i<0)throw new Sb(vb.EINVAL);s.truncate(i).then((()=>n())).catch(n)}function Zx(t,e=Bx){Hw(t).sync().then((()=>e())).catch(e)}function tR(t,e=Bx){Hw(t).datasync().then((()=>e())).catch(e)}function eR(t,e,n,i,s,r=Bx){let a,o,l,u,h;const p=new ax(t,this);if("string"==typeof e){switch(h="utf8",typeof n){case"function":r=n;break;case"number":u=n,h="string"==typeof i?i:"utf8",r="function"==typeof s?s:r;break;default:return void(r="function"==typeof i?i:"function"==typeof s?s:r)(new Sb(vb.EINVAL,"Invalid arguments."))}a=Bw.Buffer.from(e),o=0,l=a.length;const t=r;p.write(a,o,l,u).then((({bytesWritten:e})=>t(void 0,e,a.toString(h)))).catch(t)}else{a=Bw.Buffer.from(e.buffer),o=n,l=i,u="number"==typeof s?s:null;const t="function"==typeof s?s:r;p.write(a,o,l,u).then((({bytesWritten:e})=>t(void 0,e,a))).catch(t)}}function nR(t,e,n,i,s,r=Bx){new ax(t,this).read(e,n,i,s).then((({bytesRead:t,buffer:e})=>r(void 0,t,e))).catch(r)}function iR(t,e,n,i=Bx){new ax(t,this).chown(e,n).then((()=>i())).catch(i)}function sR(t,e,n){new ax(t,this).chmod(e).then((()=>n())).catch(n)}function rR(t,e,n,i=Bx){new ax(t,this).utimes(e,n).then((()=>i())).catch(i)}function aR(t,e=Bx){Tx.call(this,t).then((()=>e())).catch(e)}function oR(t,e,n=Bx){yx.call(this,t,e).then((()=>n())).catch(n)}function lR(t,e,n=Bx){n="function"==typeof e?e:n;const i="function"!=typeof e?e:{};Ix.call(this,t,i).then((t=>n(void 0,t))).catch(n)}function uR(t,e,n=Bx){Ex.call(this,t,e).then((()=>n())).catch(n)}function hR(t,e,n,i=Bx){const s="string"==typeof n?n:"file";i="function"==typeof n?n:i,bx.call(this,t,e,s).then((()=>i())).catch(i)}function pR(t,e,n=Bx){n="function"==typeof e?e:n,vx.call(this,t).then((t=>n(void 0,t))).catch(n)}function cR(t,e,n,i=Bx){wx.call(this,t,e,n).then((()=>i())).catch(i)}function dR(t,e,n,i=Bx){Sx.call(this,t,e,n).then((()=>i())).catch(i)}function fR(t,e,n=Bx){xx.call(this,t,e).then((()=>n())).catch(n)}function mR(t,e,n=Bx){Rx.call(this,t,e).then((()=>n())).catch(n)}function gR(t,e,n,i=Bx){Ox.call(this,t,e,n).then((()=>i())).catch(i)}function _R(t,e,n,i=Bx){Ax.call(this,t,e,n).then((()=>i())).catch(i)}function TR(t,e,n=Bx){n="function"==typeof e?e:n,Mx.call(this,t,"function"==typeof e?null:e).then((t=>n(void 0,t))).catch(n)}function yR(t,e,n=Bx){const i="number"==typeof e?e:Xb;n="function"==typeof e?e:n,Nx.call(this,t,i).then((()=>n())).catch(n)}const IR=new Map;function ER(t,e,n){const i=Ub(t.toString()),s="function"!=typeof e?e:{};if("function"==typeof e&&(n=e),!n)throw new Sb(vb.EINVAL,"No listener specified",t.toString(),"watchFile");if(IR.has(i)){const t=IR.get(i);return void(t&&t.listeners.add(n))}const r=new iS(i,s);r.on("change",((t,e)=>{const n=IR.get(i);if(n)for(const i of n.listeners)i(t,e)})),IR.set(i,{watcher:r,listeners:new Set})}function bR(t,e=Bx){const n=Ub(t.toString()),i=IR.get(n);i&&(e&&e!==Bx?i.listeners.delete(e):i.listeners.clear(),0===i.listeners.size&&(i.watcher.stop(),IR.delete(n)))}function vR(t,e,n){const i=new nS(Ub(t),"object"==typeof e?e:{});return n="function"==typeof e?e:n,i.on("change",n||Bx),i}function wR(t,e){const n=this;let i;const s=new nx({highWaterMark:(e="object"==typeof e?e:{encoding:e}).highWaterMark||65536,encoding:e.encoding||"utf8",async read(r){try{i||(i=await fx.call(n,t,"r",e?.mode));const a=await i.read(new Uint8Array(r),0,r,i.file.position);s.push(a.bytesRead?a.buffer.slice(0,a.bytesRead):null),i.file.position+=a.bytesRead,a.bytesRead||await i.close()}catch(t){await(i?.close()),s.destroy(t)}},destroy(t,e){i?.close().then((()=>e(t))).catch(Bx)}});return s.path=t.toString(),s}function SR(t,e){const n=this;let i;e="object"==typeof e?e:{encoding:e};const s=new ix({highWaterMark:e?.highWaterMark,async write(s,r,a){try{i||(i=await fx.call(n,t,"w",e?.mode||438)),await i.write(s,0,r),a(void 0)}catch(t){await(i?.close()),a(t)}},destroy(t,e){e(t),i?.close().then((()=>e(t))).catch(e)},final(t){i?.close().then((()=>t())).catch(t)}});return s.path=t.toString(),s}function xR(t,e,n=Bx){n="function"==typeof e?e:n,kx.call(this,t,"function"==typeof e?void 0:e).then((()=>n(void 0))).catch(n)}function RR(t,e,n=Bx){n="function"==typeof e?e:n,Dx.call(this,t,"function"!=typeof e?e:null).then((t=>n(void 0,t))).catch(n)}function OR(t,e,n,i=Bx){i="function"==typeof n?n:i,Lx.call(this,t,e,"function"==typeof n?void 0:n).then((()=>i(void 0))).catch(i)}function AR(t,e,n,i=Bx){i="function"==typeof n?n:i,new ax(t,this).readv(e,"function"==typeof n?void 0:n).then((({buffers:t,bytesRead:e})=>i(void 0,e,t))).catch(i)}function MR(t,e,n,i=Bx){i="function"==typeof n?n:i,new ax(t,this).writev(e,"function"==typeof n?void 0:n).then((({buffers:t,bytesWritten:e})=>i(void 0,e,t))).catch(i)}function CR(t,e,n=Bx){n="function"==typeof e?e:n,Fx.call(this,t,"function"==typeof e?void 0:e).then((t=>n(void 0,t))).catch(n)}function NR(t,e,n,i=Bx){i="function"==typeof n?n:i,Px.call(this,t,e,"function"==typeof n?void 0:n).then((()=>i(void 0))).catch(i)}function kR(t,e,n=Bx){n="function"==typeof e?e:n,$x.call(this,t,"function"==typeof e?void 0:e).then((t=>n(void 0,t))).catch(n)}async function DR(t,e){const n=await fx.call(this,t.toString(),"r"),i=await n.readFile();return await n.close(),new Blob([i],e)}var LR=function(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var i,s;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=e[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=e[Symbol.dispose],n&&(s=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");s&&(i=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:i,async:n})}else n&&t.stack.push({async:!0});return e},FR=function(t){return function(e){function n(n){e.error=e.hasError?new t(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}return function t(){for(;e.stack.length;){var i=e.stack.pop();try{var s=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(s).then(t,(function(e){return n(e),t()}))}catch(t){n(t)}}if(e.hasError)throw e.error}()}}("function"==typeof SuppressedError?SuppressedError:function(t,e,n){var i=new Error(n);return i.name="SuppressedError",i.error=t,i.suppressed=e,i});function PR(t){return class extends t{constructor(){super(...arguments),this._queue=[],this._isInitialized=!1}get _queueRunning(){return!!this._queue.length}queueDone(){return new Promise((t=>{const e=()=>this._queueRunning?setTimeout(e):t();e()}))}async ready(){if(await super.ready(),await this.queueDone(),!this._isInitialized&&!this._disableSync){if(this.checkSync(),await this._sync.ready(),this._sync instanceof Mw&&this instanceof Mw){const t=this._sync.store.transaction(),e=this.store.transaction(),n=[];for(const i of await e.keys())n.push(e.get(i).then((e=>t.setSync(i,e))));return await Promise.all(n),void(this._isInitialized=!0)}try{await this.crossCopy("/"),this._isInitialized=!0}catch(t){throw this._isInitialized=!1,t}}}checkSync(t,e){if(this._disableSync)throw new Sb(vb.ENOTSUP,"Sync caching has been disabled for this async file system",t,e);if(!this._sync)throw new Sb(vb.ENOTSUP,"No sync cache is attached to this async file system",t,e)}renameSync(t,e){this.checkSync(t,"rename"),this._sync.renameSync(t,e),this.queue("rename",t,e)}statSync(t){return this.checkSync(t,"stat"),this._sync.statSync(t)}createFileSync(t,e,n){return this.checkSync(t,"createFile"),this._sync.createFileSync(t,e,n),this.queue("createFile",t,e,n),this.openFileSync(t,e)}openFileSync(t,e){this.checkSync(t,"openFile");const n=this._sync.openFileSync(t,e+"+"),i=n.statSync(),s=new Uint8Array(i.size);return n.readSync(s),new nw(this,t,e,i,s)}unlinkSync(t){this.checkSync(t,"unlinkSync"),this._sync.unlinkSync(t),this.queue("unlink",t)}rmdirSync(t){this.checkSync(t,"rmdir"),this._sync.rmdirSync(t),this.queue("rmdir",t)}mkdirSync(t,e){this.checkSync(t,"mkdir"),this._sync.mkdirSync(t,e),this.queue("mkdir",t,e)}readdirSync(t){return this.checkSync(t,"readdir"),this._sync.readdirSync(t)}linkSync(t,e){this.checkSync(t,"link"),this._sync.linkSync(t,e),this.queue("link",t,e)}syncSync(t,e,n){this.checkSync(t,"sync"),this._sync.syncSync(t,e,n),this.queue("sync",t,e,n)}existsSync(t){return this.checkSync(t,"exists"),this._sync.existsSync(t)}async crossCopy(t){this.checkSync(t,"crossCopy");const e=await this.stat(t);if(!e.isDirectory()){const n={stack:[],error:void 0,hasError:!1};try{const i=LR(n,await this.openFile(t,jv("r")),!0),s=LR(n,this._sync.createFileSync(t,jv("w"),e.mode),!1),r=new Uint8Array(e.size);return await i.read(r),void s.writeSync(r,0,e.size)}catch(t){n.error=t,n.hasError=!0}finally{const t=FR(n);t&&await t}}if("/"!==t){const e=await this.stat(t);this._sync.mkdirSync(t,e.mode)}const n=[];for(const e of await this.readdir(t))n.push(this.crossCopy(Ab(t,e)));await Promise.all(n)}async _next(){if(!this._queueRunning)return;const[t,...e]=this._queue.shift();await this[t](...e),await this._next()}queue(...t){this._queue.push(t),this._next()}}}new Map;PR(iw);new Map;Map;$R=iw;var $R;var BR=function(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var i,s;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=e[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=e[Symbol.dispose],n&&(s=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");s&&(i=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:i,async:n})}else n&&t.stack.push({async:!0});return e},VR=function(t){return function(e){function n(n){e.error=e.hasError?new t(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}return function t(){for(;e.stack.length;){var i=e.stack.pop();try{var s=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(s).then(t,(function(e){return n(e),t()}))}catch(t){n(t)}}if(e.hasError)throw e.error}()}}("function"==typeof SuppressedError?SuppressedError:function(t,e,n){var i=new Error(n);return i.name="SuppressedError",i.error=t,i.suppressed=e,i});class UR{get isLocked(){return this._isLocked}constructor(t){this.previous=t,this.current=Promise.withResolvers(),this._isLocked=!0}async done(){await(this.previous?.done()),await this.current.promise}unlock(){this.current.resolve(),this._isLocked=!1}[Symbol.dispose](){this.unlock()}}class YR{async ready(){return await this._fs.ready()}metadata(){return this._fs.metadata()}addLock(){const t=new UR(this.currentLock);return this.currentLock=t,t}async lock(t,e){const n=this.currentLock,i=this.addLock(),s=(new Error).stack;return setTimeout((()=>{if(i.isLocked){const n=Sb.With("EDEADLK",t,e);throw n.stack+=s?.slice(5),n}}),5e3),await(n?.done()),i}lockSync(t,e){if(this.currentLock?.isLocked)throw Sb.With("EBUSY",t,e);return this.addLock()}get isLocked(){return!!this.currentLock?.isLocked}async rename(t,e){const n={stack:[],error:void 0,hasError:!1};try{BR(n,await this.lock(t,"rename"),!1);await this._fs.rename(t,e)}catch(t){n.error=t,n.hasError=!0}finally{VR(n)}}renameSync(t,e){const n={stack:[],error:void 0,hasError:!1};try{BR(n,this.lockSync(t,"rename"),!1);return this._fs.renameSync(t,e)}catch(t){n.error=t,n.hasError=!0}finally{VR(n)}}async stat(t){const e={stack:[],error:void 0,hasError:!1};try{BR(e,await this.lock(t,"stat"),!1);return await this._fs.stat(t)}catch(t){e.error=t,e.hasError=!0}finally{VR(e)}}statSync(t){const e={stack:[],error:void 0,hasError:!1};try{BR(e,this.lockSync(t,"stat"),!1);return this._fs.statSync(t)}catch(t){e.error=t,e.hasError=!0}finally{VR(e)}}async openFile(t,e){const n={stack:[],error:void 0,hasError:!1};try{BR(n,await this.lock(t,"openFile"),!1);const i=await this._fs.openFile(t,e);return i.fs=this,i}catch(t){n.error=t,n.hasError=!0}finally{VR(n)}}openFileSync(t,e){const n={stack:[],error:void 0,hasError:!1};try{BR(n,this.lockSync(t,"openFile"),!1);const i=this._fs.openFileSync(t,e);return i.fs=this,i}catch(t){n.error=t,n.hasError=!0}finally{VR(n)}}async createFile(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{BR(i,await this.lock(t,"createFile"),!1);const s=await this._fs.createFile(t,e,n);return s.fs=this,s}catch(t){i.error=t,i.hasError=!0}finally{VR(i)}}createFileSync(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{BR(i,this.lockSync(t,"createFile"),!1);const s=this._fs.createFileSync(t,e,n);return s.fs=this,s}catch(t){i.error=t,i.hasError=!0}finally{VR(i)}}async unlink(t){const e={stack:[],error:void 0,hasError:!1};try{BR(e,await this.lock(t,"unlink"),!1);await this._fs.unlink(t)}catch(t){e.error=t,e.hasError=!0}finally{VR(e)}}unlinkSync(t){const e={stack:[],error:void 0,hasError:!1};try{BR(e,this.lockSync(t,"unlink"),!1);return this._fs.unlinkSync(t)}catch(t){e.error=t,e.hasError=!0}finally{VR(e)}}async rmdir(t){const e={stack:[],error:void 0,hasError:!1};try{BR(e,await this.lock(t,"rmdir"),!1);await this._fs.rmdir(t)}catch(t){e.error=t,e.hasError=!0}finally{VR(e)}}rmdirSync(t){const e={stack:[],error:void 0,hasError:!1};try{BR(e,this.lockSync(t,"rmdir"),!1);return this._fs.rmdirSync(t)}catch(t){e.error=t,e.hasError=!0}finally{VR(e)}}async mkdir(t,e){const n={stack:[],error:void 0,hasError:!1};try{BR(n,await this.lock(t,"mkdir"),!1);await this._fs.mkdir(t,e)}catch(t){n.error=t,n.hasError=!0}finally{VR(n)}}mkdirSync(t,e){const n={stack:[],error:void 0,hasError:!1};try{BR(n,this.lockSync(t,"mkdir"),!1);return this._fs.mkdirSync(t,e)}catch(t){n.error=t,n.hasError=!0}finally{VR(n)}}async readdir(t){const e={stack:[],error:void 0,hasError:!1};try{BR(e,await this.lock(t,"readdir"),!1);return await this._fs.readdir(t)}catch(t){e.error=t,e.hasError=!0}finally{VR(e)}}readdirSync(t){const e={stack:[],error:void 0,hasError:!1};try{BR(e,this.lockSync(t,"readdir"),!1);return this._fs.readdirSync(t)}catch(t){e.error=t,e.hasError=!0}finally{VR(e)}}async exists(t){const e={stack:[],error:void 0,hasError:!1};try{BR(e,await this.lock(t,"exists"),!1);return await this._fs.exists(t)}catch(t){e.error=t,e.hasError=!0}finally{VR(e)}}existsSync(t){const e={stack:[],error:void 0,hasError:!1};try{BR(e,this.lockSync(t,"exists"),!1);return this._fs.existsSync(t)}catch(t){e.error=t,e.hasError=!0}finally{VR(e)}}async link(t,e){const n={stack:[],error:void 0,hasError:!1};try{BR(n,await this.lock(t,"link"),!1);await this._fs.link(t,e)}catch(t){n.error=t,n.hasError=!0}finally{VR(n)}}linkSync(t,e){const n={stack:[],error:void 0,hasError:!1};try{BR(n,this.lockSync(t,"link"),!1);return this._fs.linkSync(t,e)}catch(t){n.error=t,n.hasError=!0}finally{VR(n)}}async sync(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{BR(i,await this.lock(t,"sync"),!1);await this._fs.sync(t,e,n)}catch(t){i.error=t,i.hasError=!0}finally{VR(i)}}syncSync(t,e,n){const i={stack:[],error:void 0,hasError:!1};try{BR(i,this.lockSync(t,"sync"),!1);return this._fs.syncSync(t,e,n)}catch(t){i.error=t,i.hasError=!0}finally{VR(i)}}}var GR=function(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var i,s;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=e[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=e[Symbol.dispose],n&&(s=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");s&&(i=function(){try{s.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:i,async:n})}else n&&t.stack.push({async:!0});return e},HR=function(t){return function(e){function n(n){e.error=e.hasError?new t(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}return function t(){for(;e.stack.length;){var i=e.stack.pop();try{var s=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(s).then(t,(function(e){return n(e),t()}))}catch(t){n(t)}}if(e.hasError)throw e.error}()}}("function"==typeof SuppressedError?SuppressedError:function(t,e,n){var i=new Error(n);return i.name="SuppressedError",i.error=t,i.suppressed=e,i});const WR="/.deleted";class zR extends iw{async ready(){await this.readable.ready(),await this.writable.ready(),await this._ready}constructor({writable:t,readable:e}){if(super(),this._isInitialized=!1,this._deletedFiles=new Set,this._deleteLog="",this._deleteLogUpdatePending=!1,this._deleteLogUpdateNeeded=!1,this.writable=t,this.readable=e,this.writable.metadata().readonly)throw new Sb(vb.EINVAL,"Writable file system must be writable.");this._ready=this._initialize()}metadata(){return{...super.metadata(),name:XR.name}}async sync(t,e,n){await this.copyForWrite(t),await this.writable.exists(t)||await this.writable.createFile(t,"w",420),await this.writable.sync(t,e,n)}syncSync(t,e,n){this.copyForWriteSync(t),this.writable.syncSync(t,e,n)}async _initialize(){if(!this._isInitialized){try{const t=await this.writable.openFile(WR,jv("r")),{size:e}=await t.stat(),{buffer:n}=await t.read(new Uint8Array(e));this._deleteLog=Fb(n)}catch(t){if(t.errno!==vb.ENOENT)throw t}this._isInitialized=!0,this._reparseDeletionLog()}}getDeletionLog(){return this._deleteLog}async restoreDeletionLog(t){this._deleteLog=t,this._reparseDeletionLog(),await this.updateLog("")}async rename(t,e){this.checkInitialized(),this.checkPath(t),this.checkPath(e),await this.copyForWrite(t);try{await this.writable.rename(t,e)}catch{if(this._deletedFiles.has(t))throw Sb.With("ENOENT",t,"rename")}}renameSync(t,e){this.checkInitialized(),this.checkPath(t),this.checkPath(e),this.copyForWriteSync(t);try{this.writable.renameSync(t,e)}catch{if(this._deletedFiles.has(t))throw Sb.With("ENOENT",t,"rename")}}async stat(t){this.checkInitialized();try{return await this.writable.stat(t)}catch{if(this._deletedFiles.has(t))throw Sb.With("ENOENT",t,"stat");const e=await this.readable.stat(t);return e.mode|=146,e}}statSync(t){this.checkInitialized();try{return this.writable.statSync(t)}catch{if(this._deletedFiles.has(t))throw Sb.With("ENOENT",t,"stat");const e=this.readable.statSync(t);return e.mode|=146,e}}async openFile(t,e){if(await this.writable.exists(t))return this.writable.openFile(t,e);const n=await this.readable.openFile(t,jv("r")),i=await n.stat(),{buffer:s}=await n.read(new Uint8Array(i.size));return new nw(this,t,e,i,s)}openFileSync(t,e){if(this.writable.existsSync(t))return this.writable.openFileSync(t,e);const n=this.readable.openFileSync(t,jv("r")),i=n.statSync(),s=new Uint8Array(i.size);return n.readSync(s),new nw(this,t,e,i,s)}async createFile(t,e,n){return this.checkInitialized(),await this.writable.createFile(t,e,n),this.openFile(t,e)}createFileSync(t,e,n){return this.checkInitialized(),this.writable.createFileSync(t,e,n),this.openFileSync(t,e)}async link(t,e){this.checkInitialized(),await this.copyForWrite(t),await this.writable.link(t,e)}linkSync(t,e){this.checkInitialized(),this.copyForWriteSync(t),this.writable.linkSync(t,e)}async unlink(t){if(this.checkInitialized(),this.checkPath(t),!await this.exists(t))throw Sb.With("ENOENT",t,"unlink");await this.writable.exists(t)&&await this.writable.unlink(t),await this.exists(t)&&await this.deletePath(t)}unlinkSync(t){if(this.checkInitialized(),this.checkPath(t),!this.existsSync(t))throw Sb.With("ENOENT",t,"unlink");this.writable.existsSync(t)&&this.writable.unlinkSync(t),this.existsSync(t)&&this.deletePath(t)}async rmdir(t){if(this.checkInitialized(),!await this.exists(t))throw Sb.With("ENOENT",t,"rmdir");if(await this.writable.exists(t)&&await this.writable.rmdir(t),await this.exists(t)){if((await this.readdir(t)).length)throw Sb.With("ENOTEMPTY",t,"rmdir");await this.deletePath(t)}}rmdirSync(t){if(this.checkInitialized(),!this.existsSync(t))throw Sb.With("ENOENT",t,"rmdir");if(this.writable.existsSync(t)&&this.writable.rmdirSync(t),this.existsSync(t)){if(this.readdirSync(t).length)throw Sb.With("ENOTEMPTY",t,"rmdir");this.deletePath(t)}}async mkdir(t,e){if(this.checkInitialized(),await this.exists(t))throw Sb.With("EEXIST",t,"mkdir");await this.createParentDirectories(t),await this.writable.mkdir(t,e)}mkdirSync(t,e){if(this.checkInitialized(),this.existsSync(t))throw Sb.With("EEXIST",t,"mkdir");this.createParentDirectoriesSync(t),this.writable.mkdirSync(t,e)}async readdir(t){this.checkInitialized();const e=[];try{e.push(...await this.writable.readdir(t))}catch{}try{e.push(...(await this.readable.readdir(t)).filter((e=>!this._deletedFiles.has(`${t}/${e}`))))}catch{}const n={};return e.filter((t=>{const e=!n[t];return n[t]=!0,e}))}readdirSync(t){this.checkInitialized();let e=[];try{e=e.concat(this.writable.readdirSync(t))}catch{}try{e=e.concat(this.readable.readdirSync(t).filter((e=>!this._deletedFiles.has(`${t}/${e}`))))}catch{}const n={};return e.filter((t=>{const e=!n[t];return n[t]=!0,e}))}async deletePath(t){this._deletedFiles.add(t),await this.updateLog(`d${t}\n`)}async updateLog(t){if(this._deleteLog+=t,this._deleteLogUpdatePending)return void(this._deleteLogUpdateNeeded=!0);this._deleteLogUpdatePending=!0;const e=await this.writable.openFile(WR,jv("w"));try{await e.write(Db(this._deleteLog)),this._deleteLogUpdateNeeded&&(this._deleteLogUpdateNeeded=!1,await this.updateLog(""))}catch(t){this._deleteLogError=t}finally{this._deleteLogUpdatePending=!1}}_reparseDeletionLog(){this._deletedFiles.clear();for(const t of this._deleteLog.split("\n"))t.startsWith("d")&&this._deletedFiles.add(t.slice(1))}checkInitialized(){if(!this._isInitialized)throw new Sb(vb.EPERM,"OverlayFS is not initialized. Please initialize OverlayFS using its initialize() method before using it.");if(!this._deleteLogError)return;const t=this._deleteLogError;throw delete this._deleteLogError,t}checkPath(t){if(t==WR)throw Sb.With("EPERM",t,"checkPath")}createParentDirectoriesSync(t){let e=Mb(t);const n=[];for(;!this.writable.existsSync(e);)n.push(e),e=Mb(e);for(const t of n.reverse())this.writable.mkdirSync(t,this.statSync(t).mode)}async createParentDirectories(t){let e=Mb(t);const n=[];for(;!await this.writable.exists(e);)n.push(e),e=Mb(e);for(const t of n.reverse()){const e=await this.stat(t);await this.writable.mkdir(t,e.mode)}}copyForWriteSync(t){if(!this.existsSync(t))throw Sb.With("ENOENT",t,"copyForWrite");this.writable.existsSync(Mb(t))||this.createParentDirectoriesSync(t),this.writable.existsSync(t)||this.copyToWritableSync(t)}async copyForWrite(t){if(!await this.exists(t))throw Sb.With("ENOENT",t,"copyForWrite");if(await this.writable.exists(Mb(t))||await this.createParentDirectories(t),!await this.writable.exists(t))return this.copyToWritable(t)}copyToWritableSync(t){const e={stack:[],error:void 0,hasError:!1};try{const n=this.statSync(t);if(n.isDirectory())return void this.writable.mkdirSync(t,n.mode);const i=new Uint8Array(n.size);GR(e,this.readable.openFileSync(t,"r"),!1).readSync(i);GR(e,this.writable.createFileSync(t,"w",146|n.mode),!1).writeSync(i)}catch(t){e.error=t,e.hasError=!0}finally{HR(e)}}async copyToWritable(t){const e={stack:[],error:void 0,hasError:!1};try{const n=await this.stat(t);if(n.isDirectory())return void await this.writable.mkdir(t,n.mode);const i=new Uint8Array(n.size),s=GR(e,await this.readable.openFile(t,"r"),!0);await s.read(i);const r=GR(e,await this.writable.createFile(t,"w",146|n.mode),!0);await r.write(i)}catch(t){e.error=t,e.hasError=!0}finally{const t=HR(e);t&&await t}}}class XR extends(function(t){return class extends YR{constructor(...e){super(),this._fs=new t(...e)}}}(zR)){}function jR(t,e,n){if(t instanceof Sb)return t;const i=t instanceof DOMException?vb[function(t){switch(t.name){case"IndexSizeError":case"HierarchyRequestError":case"InvalidCharacterError":case"InvalidStateError":case"SyntaxError":case"NamespaceError":case"TypeMismatchError":case"ConstraintError":case"VersionError":case"URLMismatchError":case"InvalidNodeTypeError":return"EINVAL";case"WrongDocumentError":return"EXDEV";case"NoModificationAllowedError":case"InvalidModificationError":case"InvalidAccessError":case"SecurityError":case"NotAllowedError":return"EACCES";case"NotFoundError":return"ENOENT";case"NotSupportedError":return"ENOTSUP";case"InUseAttributeError":return"EBUSY";case"NetworkError":return"ENETDOWN";case"AbortError":return"EINTR";case"QuotaExceededError":return"ENOSPC";case"TimeoutError":return"ETIMEDOUT";case"ReadOnlyError":return"EROFS";default:return"EIO"}}(t)]:vb.EIO,s=new Sb(i,t.message,e,n);return s.stack=t.stack,s.cause=t.cause,s}globalThis.__zenfs__=st;class qR extends(PR(iw)){constructor(t){super(),this._handles=new Map,this._sync=Lw.create({name:"accessfs-cache"}),this._handles.set("/",t)}metadata(){return{...super.metadata(),name:"WebAccess",noResizableBuffers:!0}}async sync(t,e){await this.writeFile(t,e)}async rename(t,e){const n=await this.getHandle(t);if(n instanceof FileSystemDirectoryHandle){const n=await this.readdir(t);if(await this.mkdir(e),!n.length)return void await this.unlink(t);for(const i of n)await this.rename(Ab(t,i),Ab(e,i)),await this.unlink(t);return}if(!(n instanceof FileSystemFileHandle))throw new Sb(vb.ENOTSUP,"Not a file or directory handle",t,"rename");const i=await n.getFile().catch((e=>{throw jR(e,t,"rename")})),s=await this.getHandle(Mb(e));if(!(s instanceof FileSystemDirectoryHandle))return;const r=await s.getFileHandle(Cb(e),{create:!0}).catch((t=>{throw jR(t,e,"rename")})),a=await r.createWritable();await a.write(await i.arrayBuffer()),await a.close(),await this.unlink(t)}async writeFile(t,e){if(e.buffer.resizable)throw new Sb(vb.EINVAL,"Resizable buffers can not be written",t,"write");const n=await this.getHandle(Mb(t));if(!(n instanceof FileSystemDirectoryHandle))return;const i=await n.getFileHandle(Cb(t),{create:!0}),s=await i.createWritable();await s.write(e),await s.close()}async createFile(t,e){return await this.writeFile(t,new Uint8Array),this.openFile(t,e)}async stat(t){const e=await this.getHandle(t);if(!e)throw Sb.With("ENOENT",t,"stat");if(e instanceof FileSystemDirectoryHandle)return new Gv({mode:511|Iv,size:4096});if(e instanceof FileSystemFileHandle){const{lastModified:t,size:n}=await e.getFile();return new Gv({mode:511|Tv,size:n,mtimeMs:t})}throw new Sb(vb.EBADE,"Handle is not a directory or file",t,"stat")}async openFile(t,e){const n=await this.getHandle(t);if(!(n instanceof FileSystemFileHandle))throw Sb.With("EISDIR",t,"openFile");const i=await n.getFile().catch((e=>{throw jR(e,t,"openFile")})),s=new Uint8Array(await i.arrayBuffer()),r=new Gv({mode:511|Tv,size:i.size,mtimeMs:i.lastModified});return new nw(this,t,e,r,s)}async unlink(t){const e=await this.getHandle(Mb(t));if(!(e instanceof FileSystemDirectoryHandle))throw Sb.With("ENOTDIR",Mb(t),"unlink");await e.removeEntry(Cb(t),{recursive:!0}).catch((e=>{throw jR(e,t,"unlink")}))}async link(t){}async rmdir(t){return this.unlink(t)}async mkdir(t){if(await this.getHandle(t).catch((t=>{if("ENOENT"!=t.code)throw t})))throw Sb.With("EEXIST",t,"mkdir");const e=await this.getHandle(Mb(t));if(!(e instanceof FileSystemDirectoryHandle))throw Sb.With("ENOTDIR",t,"mkdir");await e.getDirectoryHandle(Cb(t),{create:!0})}async readdir(t){const e=await this.getHandle(t);if(!(e instanceof FileSystemDirectoryHandle))throw Sb.With("ENOTDIR",t,"readdir");const n=[];for await(const t of e.keys())n.push(t);return n}async getHandle(t){if(this._handles.has(t))return this._handles.get(t);let e="/";for(const n of t.split("/").slice(1)){const t=this._handles.get(e);if(!(t instanceof FileSystemDirectoryHandle))throw Sb.With("ENOTDIR",e,"getHandle");e=Ab(e,n);const i=await t.getDirectoryHandle(n).catch((i=>{switch(i.name){case"TypeMismatchError":return t.getFileHandle(n).catch((t=>{}));case"TypeError":throw new Sb(vb.ENOENT,i.message,e,"getHandle");default:throw jR(i,e,"getHandle")}}));i&&this._handles.set(e,i)}return this._handles.get(t)}}function KR(t){return new Promise(((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)}))}let QR;function JR(){return QR||(QR=function(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const i=KR(n);return(t,n)=>i.then((i=>n(i.transaction(e,t).objectStore(e))))}("keyval-store","keyval")),QR}class ZR extends qR{constructor(t){super(t)}async readFile(t){const e=await this.getHandle(t);if(e instanceof window.FileSystemFileHandle){const t=await e.getFile();return await t.text()}return""}}class tO extends Zt.FS{#t=null;#e=new TextEncoder;constructor(){super()}async showDirectoryPicker(){const t=await window.showDirectoryPicker({mode:"readwrite"});if("granted"!==await t.requestPermission({mode:"readwrite"}))throw new Error("readwrite access to directory not granted");return await this.setFSCache(t),this.#t=new ZR(t),t}async loadFS(){let t=await this.getFSCache();if(!t)return null;if("granted"!==await t.requestPermission({mode:"readwrite"}))throw new Error("readwrite access to directory not granted");return this.#t=new ZR(t),t}async getFSCache(){return function(t,e=JR()){return e("readonly",(e=>KR(e.get(t))))}("mixly-pyodide-fs")}async setFSCache(t){await function(t,e,n=JR()){return n("readwrite",(n=>(n.put(e,t),KR(n.transaction))))}("mixly-pyodide-fs",t)}async createFile(t){return this.#t.createFile(t,"")}async readFile(t){return this.#t.readFile(t)}async writeFile(t,e){const n=this.#e.encode(e);return this.#t.writeFile(t,n)}async isFile(t){const e=await this.#t.stat(t);return!(!e||33279!==e.mode)}async renameFile(t,e){return await this.#t.rename(t,e)}async moveFile(t,e){return this.renameFile(t,e)}async deleteFile(t){return this.#t.unlink(t)}async createDirectory(t){return this.#t.mkdir(t,511)}async readDirectory(t){return await this.#t.readdir(t)}async isDirectory(t){const e=await this.#t.stat(t);return!(!e||16895!==e.mode)}async isDirectoryEmpty(t){const e=await this.readDirectory(t);return!e?.length}async renameDirectory(t,e){return this.#t.rename(t,e)}async moveDirectory(t,e){return this.#t.rename(t,e)}async deleteDirectory(t){return this.#t.rmdir(t)}}class eO extends Zt.FileTree{constructor(){super(new tO)}async readFolder(t){let e=[];try{const n=this.getFS();if(!await n.isDirectory(t))return e;const i=await n.readDirectory(t);for(let s of i){const i=cb.join(t,s);if(await n.isDirectory(i)){const t=await n.isDirectoryEmpty(i);e.push({type:"folder",id:i,children:!t,title:`/${this.getRootFolderName()}${i}`})}else e.push({type:"file",id:i,children:!1,title:`/${this.getRootFolderName()}${i}`})}}catch(t){Zt.Debug.error(t)}return e}}class nO extends Zt.PageBase{static{Zt.HTMLTemplate.add("html/statusbar/statusbar-filesystem.html",new Zt.HTMLTemplate('\r\n
\r\n
\r\n
\r\n
')),Zt.HTMLTemplate.add("html/statusbar/statusbar-filesystem-open-fs.html",new Zt.HTMLTemplate('\r\n
\r\n \r\n
')),Zt.HTMLTemplate.add("html/statusbar/statusbar-filesystem-editor-empty.html",new Zt.HTMLTemplate('\r\n
\r\n
\r\n
')),this.init=function(){Zt.StatusBarsManager.typesRegistry.register(["file-system"],nO);const t=Zt.Workspace.getMain().getStatusBarsManager();return t.add({type:"file-system",id:"file-system",name:Jt.Msg.PYTHON_PYODIDE_FILE_SYSTEM,title:Jt.Msg.PYTHON_PYODIDE_FILE_SYSTEM}),t.changeTo("output"),t.get("file-system")}}#n=null;#i=null;#s=null;#r=null;#a=null;#o=null;#l=null;#u=null;#h=!1;#p=!1;#c=!1;#d=null;constructor(){super();const t=fb()(Zt.HTMLTemplate.get("html/statusbar/statusbar-filesystem.html").render());this.setContent(t),this.#l=new eO,this.#i=t.children(".file-tree"),this.#r=fb()(Zt.HTMLTemplate.get("html/statusbar/statusbar-filesystem-open-fs.html").render({msg:{loadFS:Jt.Msg.PYTHON_PYODIDE_LOAD_FILE_SYSTEM}})),this.#i.append(this.#r),this.#o=new Zt.StatusBar,this.#s=t.children(".editor"),this.#a=fb()(Zt.HTMLTemplate.get("html/statusbar/statusbar-filesystem-editor-empty.html").render()),this.#s.append(this.#a)}#f(){this.#u=new Zt.DragV(this.getContent()[0],{min:"150px",startSize:"15%",full:[!1,!1]}),this.#u.bind("sizeChanged",(()=>{this.resize()})),this.#r.children("button").click((()=>{this.selectFS().catch(Zt.Debug.error)})),this.#l.bind("beforeSelectLeaf",(t=>{const e=t[0].id,n=this.#o.getFileMode(cb.extname(e));return n?(this.#o.setMode(n),!0):(bb.layer.msg(Zt.Msg.Lang["statusbar.ampy.cannotEdit"],{time:1e3}),!1)})),this.#l.bind("afterSelectLeaf",(async t=>{const e=t[0].id;this.#l.showProgress();const n=this.#l.getFS();try{const t=await n.readFile(e);this.showEditor(),this.#o.setValue(t),this.#o.scrollToTop(),this.#o.focus(),this.setStatus(!1)}catch(t){Zt.Debug.error(t),this.hideEditor(),this.#l.deselectAll()}this.#l.hideProgress()})),this.#l.bind("afterCreateNode",(t=>{this.#l.refreshFolder(t)})),this.#l.bind("afterDeleteNode",(t=>{this.#l.refreshFolder(t)})),this.#l.bind("afterRenameNode",(t=>{this.#l.refreshFolder(t)})),this.#l.bind("afterRefreshNode",(()=>{this.#l.getSelectedNodeId()||this.hideEditor()}));const t=this.#l.getContextMenu().getItem("menu");t.add({weight:7,id:"copy_path",data:{isHtmlName:!0,name:Zt.Menu.getItem(Zt.Msg.Lang["fileTree.copyPath"]),callback:(t,{$trigger:e})=>{let n=null;n="root"===e.attr("type")?this.#l.getRootFolderTitle():e.attr("title"),navigator.clipboard.writeText(n).catch(Zt.Debug.error)}}}),t.add({weight:14,id:"sep5",preconditionFn:t=>{const e=this.#l.getSelectedNodeId();let n=t.attr("type"),i=t.attr("id");return"file"!==n||e===i},data:"---------"}),t.add({weight:15,id:"refresh",preconditionFn:t=>{const e=this.#l.getSelectedNodeId();let n=t.attr("type"),i=t.attr("id");return"file"!==n||e===i},data:{isHtmlName:!0,name:Zt.Menu.getItem(Zt.Msg.Lang["statusbar.ampy.refresh"]),callback:(t,{$trigger:e})=>{let n=e.attr("type");if("root"===n)this.#l.openRootFolder(),this.#l.refreshFolder("/");else if("folder"===n){let t=e.attr("id");this.#l.openNode(t),this.#l.refreshFolder(t)}else{const t=this.#l.getSelectedNodes();this.#l.runEvent("afterSelectLeaf",t)}}}}),t.add({weight:16,id:"sep6",preconditionFn:t=>{let e=t.attr("type");return["root"].includes(e)},data:"---------"}),t.add({weight:17,id:"exit",preconditionFn:t=>{let e=t.attr("type");return["root"].includes(e)},data:{isHtmlName:!0,name:Zt.Menu.getItem(Zt.Msg.Lang["statusbar.ampy.exit"]),callback:()=>{this.closeFS()}}}),t.remove("copy"),t.remove("cut"),t.remove("paste"),t.remove("sep2");const e=this.#o.getContextMenu().getItem("code");e.empty(),e.add({weight:0,id:"cut",data:{isHtmlName:!0,name:Zt.Menu.getItem(Zt.Msg.Lang["editor.contextMenu.cut"],"Ctrl+X"),callback:()=>this.#o.cut()}}),e.add({weight:1,id:"copy",data:{isHtmlName:!0,name:Zt.Menu.getItem(Zt.Msg.Lang["editor.contextMenu.copy"],"Ctrl+C"),callback:()=>this.#o.copy()}}),e.add({weight:2,id:"paste",data:{isHtmlName:!0,name:Zt.Menu.getItem(Zt.Msg.Lang["editor.contextMenu.paste"],"Ctrl+V"),callback:()=>this.#o.paste()}}),e.add({weight:3,id:"sep1",data:"---------"}),e.add({weight:4,id:"togglecomment",data:{isHtmlName:!0,name:Zt.Menu.getItem(Zt.Msg.Lang["editor.contextMenu.togglecomment"],"Ctrl+/"),callback:()=>this.#o.commentLine()}}),e.add({weight:6,id:"sep2",preconditionFn:()=>this.#c,data:"---------"}),e.add({weight:7,id:"save",preconditionFn:()=>this.#c,data:{isHtmlName:!0,name:Zt.Menu.getItem(Zt.Msg.Lang["file.save"],"Ctrl+S"),callback:async()=>{await this.put()}}});const{commands:n}=this.#o.getEditor();n.addCommand({name:"save",bindKey:"Ctrl-S",exec:async()=>{this.#c&&await this.put()}})}async put(){this.#l.showProgress();const t=this.#l.getSelectedNodeId(),e=this.#l.getFS();try{await e.writeFile(t,this.#o.getValue()),this.setStatus(!1)}catch(t){Zt.Debug.error(t)}finally{this.#l.hideProgress()}}showFileTree(){this.#h||(this.#r.detach(),this.#i.empty(),this.#i.append(this.#l.getContent()),this.#h=!0)}hideFileTree(){this.#h&&(this.#l.getContent().detach(),this.#i.empty(),this.#i.append(this.#r),this.#h=!1)}showEditor(){this.#p||(this.#a.detach(),this.#s.empty(),this.#s.append(this.#o.getContent()),this.#p=!0)}hideEditor(){this.#p&&(this.#o.getContent().detach(),this.#s.empty(),this.#s.append(this.#a),this.#p=!1,this.setStatus(!1))}getDrag(){return this.#u}init(){super.init(),this.hideCloseBtn(),this.#o.init(),this.#f();const t=this.#o.getEditor();t.setReadOnly(!1),t.renderer.setShowGutter(!0),t.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0,newLineMode:"unix"}),t.on("change",(()=>{this.setStatus(!0)})),this.loadFS().catch(Zt.Debug.error)}async loadFS(){const t=this.#l.getFS(),e=await t.loadFS();await this.openFS(e)}async selectFS(){const t=this.#l.getFS(),e=await t.showDirectoryPicker();await this.openFS(e)}async openFS(t){if(!t?.name)return;const e="/"+t.name;this.#l.setFolderPath("/"),this.#l.setRootFolderTitle(e),this.#l.setRootFolderName(t.name),this.#l.openRootFolder(),this.showFileTree(),this.#d=await window.pyodide.mountNativeFS(e,t)}closeFS(){const t=this.#l.getRootFolderTitle();if(Object.keys(window.pyodide.FS.root.contents).includes(cb.basename(t))){const e=window.pyodide.FS.lookupPath(t,{follow_mount:!1});window.pyodide.FS.isMountpoint(e.node)&&window.pyodide.FS.unmount(t)}this.#l.getFS().setFSCache(null),this.#l.deselectAll(),this.hideFileTree(),this.hideEditor(),this.setStatus(!1)}onMounted(){super.onMounted(),this.#o.onMounted(),this.#l.onMounted()}onUnmounted(){super.onUnmounted(),this.#o.onUnmounted(),this.#l.onUnmounted()}resize(){super.resize(),this.#o.resize(),this.#l.resize()}setStatus(t){this.#c!==t&&(this.#c=t)}getNativeFS(){return this.#d}dispose(){this.#o.dispose(),this.#o=null,this.#l.dispose(),this.#l=null,super.dispose()}}class iO{static{Zt.HTMLTemplate.add("html/statusbar/loader.html",new Zt.HTMLTemplate('\r\n
\r\n
\r\n

{{d.msg.loading}}

\r\n
')),this.pythonShell=null,this.kernelLoaded=!1,this.$loader=fb()(Zt.HTMLTemplate.get("html/statusbar/loader.html").render({msg:{loading:Jt.Msg.PYTHON_PYODIDE_LOADING}})),this.statusBarImage=null,this.statusBarFileSystem=null,this.init=async function(){Zt.app.getFooterBar().getContent().after(this.$loader);const t=cb.relative(Zt.Env.indexDirPath,Zt.Env.boardDirPath),e=new Ib({rootPath:cb.join(t,"deps"),language:"python3"}),n=await e.kernelAvailable();n&&(await n.init(),await n.loaded(),this.loader=e,this.kernel=n,this.statusBarImage=Eb.init(),this.statusBarFileSystem=nO.init(),this.pythonShell=new iO,this.pyodide=window.pyodide,this.interruptBuffer=new Uint8Array(new ArrayBuffer(1)),this.pyodide.setInterruptBuffer(this.interruptBuffer),this.kernelLoaded=!0,this.$loader.remove(),this.$loader=null)},this.run=async function(){if(!this.kernelLoaded)return;const t=Zt.Workspace.getMain().getEditorsManager().getActive().getCode();return this.pythonShell.run(t)},this.stop=async function(){if(this.kernelLoaded)return this.pythonShell.stop()}}#m=null;#g=null;#_=null;#T={row:0,column:0};#y="";#I=null;#E=null;#b=!1;#v=!1;#w=null;#S=()=>this.#x();#R=[{name:"REPL-Enter",bindKey:"Enter",exec:t=>{if(t.getSession().selection.getCursor().row===this.#T.row){const t=this.#m.getEndPos();let e=this.#m.getValueRange(this.#T,t);e=e.replace(this.#y,""),this.#I?.(e),this.#I=null,this.#E=null,this.#m.addValue("\n"),this.#O()}return!1}},{name:"REPL-ChangeEditor",bindKey:"Delete|Ctrl-X|Backspace",exec:t=>{const e=t.getSession().selection.getCursor();return e.row{this.#v=!1,this.#m.addValue(`\n==${Zt.Msg.Lang["shell.finish"]}==`),this.syncfs(!1).catch(Zt.Debug.error)})),this.#w.addEventListener("eval.output",(t=>{this.#m.addValue(t.content)})),this.#w.addEventListener("eval.error",(()=>{this.#v=!1,this.#m.addValue(`\n==${Zt.Msg.Lang["shell.finish"]}==`)})),this.#w.addEventListener("eval.input",(t=>{const e=String(t?.content?.prompt);this.#m.addValue(e),this.#y=e,this.#I=t.resolve,this.#E=t.reject,this.#A()})),this.#w.addEventListener("eval.display",(t=>{this.#_.changeTo("images"),this.#g.display(t)}))}#x(){const t=this.#m.getEditor(),e=t.getSession().selection.getCursor();t.setReadOnly(e.row{window.pyodide.FS.syncfs(t,e)}))}sleep(t){return new Promise((e=>setTimeout(e,t)))}}const sO={init:async function(){const t=Zt.app.getNav();t.register({icon:"icon-play-circled",title:"",id:"python-run-btn",displayText:Jt.Msg.MSG.run,preconditionFn:()=>!0,callback:()=>{iO.run().catch(Zt.Debug.error)},scopeType:Zt.Nav.Scope.LEFT,weight:4}),t.register({icon:"icon-cancel",title:"",id:"python-stop-btn",displayText:Jt.Msg.MSG.stop,preconditionFn:()=>!0,callback:()=>{iO.stop().catch(Zt.Debug.error)},scopeType:Zt.Nav.Scope.LEFT,weight:5}),await iO.init()}},rO=sO;class aO{constructor(t,e){this.backend=t,this.dataMover=e,this.data=new WeakMap,this.dataIdsCount=0}get(t){return this.data.has(t)||this.dataMover.moveData(this.backend,t),this.data.get(t)}set(t,e){this.dataIdsCount++,this.data.set(t,e)}has(t){return this.data.has(t)}delete(t){return this.dataIdsCount--,this.data.delete(t)}numDataIds(){return this.dataIdsCount}}class oO{refCount(t){return lO("refCount")}incRef(t){return lO("incRef")}timerAvailable(){return!0}time(t){return lO("time")}read(t){return lO("read")}readSync(t){return lO("readSync")}readToGPU(t,e){return lO("readToGPU")}numDataIds(){return lO("numDataIds")}disposeData(t,e){return lO("disposeData")}write(t,e,n){return lO("write")}move(t,e,n,i,s){return lO("move")}createTensorFromGPUData(t,e,n){return lO("createTensorFromGPUData")}memory(){return lO("memory")}floatPrecision(){return lO("floatPrecision")}epsilon(){return 32===this.floatPrecision()?1e-7:1e-4}dispose(){return lO("dispose")}}function lO(t){throw new Error(`'${t}' not yet implemented or not found in the registry. This kernel may not be supported by the tfjs backend you have chosen`)} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function uO(t){let e=t.length,n=0;for(;e>0;)n=Math.random()*e|0,e--,dO(t,e,n)}function hO(t,e){if(t.length!==e.length)throw new Error(`Array sizes must match to be shuffled together First array length was ${t.length}Second array length was ${e.length}`);let n=t.length,i=0;for(;n>0;)i=Math.random()*n|0,n--,dO(t,n,i),dO(e,n,i)}function pO(t,e,n){return Math.max(t,Math.min(e,n))}function cO(t){return t%2==0?t:t+1}function dO(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function fO(t){let e=0;for(let n=0;nn+` Shapes ${t} and ${e} must match`))}function yO(t){_O(null!=t,(()=>"The input to the tensor constructor must be a non-null value."))}function IO(t){if(0===t.length)return 1;let e=t[0];for(let n=1;n0,n,i){return new Promise(((s,r)=>{let a=0;const o=()=>{if(t())return void s();a++;const l=e(a);null!=n&&a>=n?r():null!=i?i(o,l):setTimeout(o,l)};o()}))}function MO(t,e){let n=1,i=-1;for(let e=0;e=0)n*=t[e];else if(-1===t[e]){if(-1!==i)throw Error(`Shapes can only have 1 implicit size. Found -1 at dim ${i} and dim ${e}`);i=e}else if(t[e]<0)throw Error(`Shapes can not be < 0. Found ${t[e]} at dim ${e}`);if(-1===i){if(e>0&&e!==n)throw Error(`Size(${e}) must match the product of shape ${t}`);return t}if(0===n)throw Error(`Cannot infer the missing size in [${t}] when there are 0 elements`);if(e%n!=0)throw Error(`The implicit shape can't be a fractional number. Got ${e} / ${n}`);const s=t.slice();return s[i]=e/n,s}function CO(t,e){const n=e.length;return _O((t=null==t?e.map(((t,e)=>e)):[].concat(t)).every((t=>t>=-n&&t`All values in axis param must be in range [-${n}, ${n}) but got axis ${t}`)),_O(t.every((t=>wO(t))),(()=>`All values in axis param must be integers but got axis ${t}`)),t.map((t=>t<0?n+t:t))}function NO(t,e){const n=[],i=[],s=null!=e&&Array.isArray(e)&&0===e.length,r=null==e||s?null:CO(e,t).sort();let a=0;for(let e=0;ee)&&1===t[e]&&(n.push(t[e]),i.push(e)),r[a]<=e&&a++}1!==t[e]&&(n.push(t[e]),i.push(e))}return{newShape:n,keptDims:i}}function kO(t,e){return DO(t,e)}function DO(t,e){let n=null;if(null==t||"float32"===t)n=new Float32Array(e);else if("int32"===t)n=new Int32Array(e);else if("bool"===t)n=new Uint8Array(e);else{if("string"!==t)throw new Error(`Unknown data type ${t}`);n=new Array(e)}return n}function LO(t,e){for(let n=0;ne+=t.length)),e}function VO(t){return"string"==typeof t||t instanceof String}function UO(t){return"boolean"==typeof t}function YO(t){return"number"==typeof t}function GO(t){return Array.isArray(t)?GO(t[0]):t instanceof Float32Array?"float32":t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray?"int32":YO(t)?"float32":VO(t)?"string":UO(t)?"bool":"float32"}function HO(t){return!!(t&&t.constructor&&t.call&&t.apply)}function WO(t,e){for(let n=e;n=0;--i)n[i]=n[i+1]*t[i+1];return n}function XO(t,e,n,i=!1){const s=new Array;if(1===e.length){const r=e[0]*(i?2:1);for(let e=0;et*e))*(i?2:1);for(let e=0;et*e))*(n?2:1);if(0===i)return[];if(i!==e.length)throw new Error(`[${t}] does not match the input size ${e.length}${n?" for a complex tensor":""}.`);return XO(0,t,e,n)}function qO(t,e){if(Array.isArray(t))return t;if("float32"===e)return t instanceof Float32Array?t:new Float32Array(t);if("int32"===e)return t instanceof Int32Array?t:new Int32Array(t);if("bool"===e||"string"===e)return Uint8Array.from(new Int32Array(t));throw new Error(`Unknown dtype ${e}`)}function KO(t,e){const n=QO(t,e);for(let t=0;tt*e),1);if(null==e||"float32"===e)return jO(t,new Float32Array(n));if("int32"===e)return jO(t,new Int32Array(n));if("bool"===e)return jO(t,new Uint8Array(n));throw new Error(`Unknown data type ${e}`)}function ZO(t){t.forEach((e=>{_O(Number.isInteger(e)&&e>=0,(()=>`Tensor must have a shape comprised of positive integers but got shape [${t}].`))}))}function tA(t,e,n){if(0===e)return 0;if(1===e)return t[0];let i=t[t.length-1];for(let e=0;e{const[e,n]=t.split(":");this.urlFlags[e]=function(t,e){const n=e.toLowerCase();return"true"===n||"false"===n?"true"===n:""+ +n===n?+n:e}(0,n)}))}}}function rA(t){const e={};return t.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g,((t,...n)=>(function(t,e,n){t[decodeURIComponent(e)]=decodeURIComponent(n||"")}(e,n[0],n[1]),n.join("=")))),e}function aA(){return lA}let oA,lA=null;function uA(){if(null==oA){let t;if("undefined"!=typeof window)t=window;else if(void 0!==__webpack_require__.g)t=__webpack_require__.g;else if("undefined"!=typeof process)t=process;else{if("undefined"==typeof self)throw new Error("Could not find a global object");t=self}oA=t}return oA}function hA(t,e){const n=function(){const t=uA();return null==t._tfGlobals&&(t._tfGlobals=new Map),t._tfGlobals}();if(n.has(t))return n.get(t);{const i=e();return n.set(t,i),n.get(t)}}const pA="Abs",cA="Acos",dA="Acosh",fA="Add",mA="AddN",gA="All",_A="Any",TA="ArgMax",yA="ArgMin",IA="Asin",EA="Asinh",bA="Atan",vA="Atanh",wA="Atan2",SA="AvgPool",xA="AvgPoolGrad",RA="AvgPool3D",OA="AvgPool3DGrad",AA="BatchMatMul",MA="BatchToSpaceND",CA="Bincount",NA="BitwiseAnd",kA="BroadcastTo",DA="BroadcastArgs",LA="Cast",FA="Ceil",PA="ClipByValue",$A="Complex",BA="ComplexAbs",VA="Concat",UA="Conv2D",YA="Conv2DBackpropFilter",GA="Conv2DBackpropInput",HA="Conv3D",WA="Conv3DBackpropFilterV2",zA="Conv3DBackpropInputV2",XA="Cos",jA="Cosh",qA="Cumprod",KA="Cumsum",QA="CropAndResize",JA="DenseBincount",ZA="DepthToSpace",tM="DepthwiseConv2dNative",eM="DepthwiseConv2dNativeBackpropFilter",nM="DepthwiseConv2dNativeBackpropInput",iM="Diag",sM="Dilation2D",rM="Dilation2DBackpropInput",aM="Dilation2DBackpropFilter",oM="Draw",lM="RealDiv",uM="Einsum",hM="Elu",pM="EluGrad",cM="Erf",dM="Equal",fM="Exp",mM="ExpandDims",gM="Expm1",_M="FFT",TM="Fill",yM="FlipLeftRight",IM="Floor",EM="FloorDiv",bM="FusedBatchNorm",vM="GatherV2",wM="GatherNd",SM="Greater",xM="GreaterEqual",RM="Identity",OM="IFFT",AM="Imag",MM="IsFinite",CM="IsInf",NM="IsNan",kM="LeakyRelu",DM="Less",LM="LessEqual",FM="LinSpace",PM="Log",$M="Log1p",BM="LogicalAnd",VM="LogicalNot",UM="LogicalOr",YM="LogicalXor",GM="LogSoftmax",HM="LowerBound",WM="LRN",zM="LRNGrad",XM="MatrixBandPart",jM="Max",qM="Maximum",KM="MaxPool",QM="MaxPoolGrad",JM="MaxPool3D",ZM="MaxPool3DGrad",tC="MaxPoolWithArgmax",eC="Mean",nC="Min",iC="Minimum",sC="MirrorPad",rC="Mod",aC="Multinomial",oC="Multiply",lC="Neg",uC="NotEqual",hC="NonMaxSuppressionV3",pC="NonMaxSuppressionV4",cC="NonMaxSuppressionV5",dC="OnesLike",fC="OneHot",mC="Pack",gC="PadV2",_C="Pool",TC="Pow",yC="Prelu",IC="Prod",EC="RaggedGather",bC="RaggedRange",vC="RaggedTensorToTensor",wC="Range",SC="Real",xC="Reciprocal",RC="Relu",OC="Reshape",AC="ResizeNearestNeighbor",MC="ResizeNearestNeighborGrad",CC="ResizeBilinear",NC="ResizeBilinearGrad",kC="Relu6",DC="Reverse",LC="Round",FC="Rsqrt",PC="ScatterNd",$C="TensorScatterUpdate",BC="SearchSorted",VC="Select",UC="Selu",YC="Slice",GC="Sin",HC="Sinh",WC="Sign",zC="Sigmoid",XC="Softplus",jC="Sqrt",qC="Sum",KC="SpaceToBatchND",QC="SplitV",JC="Softmax",ZC="SparseFillEmptyRows",tN="SparseReshape",eN="SparseSegmentMean",nN="SparseSegmentSum",iN="SparseToDense",sN="SquaredDifference",rN="Square",aN="StaticRegexReplace",oN="StridedSlice",lN="StringNGrams",uN="StringSplit",hN="StringToHashBucketFast",pN="Sub",cN="Tan",dN="Tanh",fN="Tile",mN="TopK",gN="Transform",_N="Transpose",TN="Unique",yN="Unpack",IN="UnsortedSegmentSum",EN="UpperBound",bN="ZerosLike",vN="Step",wN="FromPixels",SN="RotateWithOffset",xN="_FusedMatMul",RN="FusedConv2D",ON="FusedDepthwiseConv2D"; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function AN(...t){aA().getBool("IS_TEST")||aA().getBool("PROD")||console.warn(...t)}function MN(...t){aA().getBool("IS_TEST")||aA().getBool("PROD")||console.log(...t)} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const CN=hA("kernelRegistry",(()=>new Map)),NN=hA("gradRegistry",(()=>new Map));function kN(t,e){const n=UN(t,e);return CN.get(n)}function DN(t){return NN.get(t)}function LN(t){const e=CN.entries(),n=[];for(;;){const{done:i,value:s}=e.next();if(i)break;const[r,a]=s,[o]=r.split("_");o===t&&n.push(a)}return n}function FN(t){const{kernelName:e,backendName:n}=t,i=UN(e,n);CN.has(i)&&AN(`The kernel '${e}' for backend '${n}' is already registered`),CN.set(i,t)}function PN(t){const{kernelName:e}=t;NN.has(e)&&aA().getBool("DEBUG")&&AN(`Overriding the gradient for '${e}'`),NN.set(e,t)}function $N(t,e){const n=UN(t,e);if(!CN.has(n))throw new Error(`The kernel '${t}' for backend '${e}' is not registered`);CN.delete(n)}function BN(t){if(!NN.has(t))throw new Error(`The gradient '${t}' for backend is not registered`);NN.delete(t)}function VN(t,e){LN(t).forEach((t=>{FN(Object.assign({},t,{backendName:e}))}))}function UN(t,e){return`${e}_${t}`} +/** + * @license + * Copyright 2023 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function YN(t){return t instanceof Float32Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray}var GN=__webpack_require__(8570); +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const HN=__webpack_require__.n(GN)()||GN;function WN(t){return HN.fromString(t,!0,16)}const zN=WN("c3a5c85c97cb3127"),XN=WN("b492b66fbe98f273"),jN=WN("9ae16a3b2f90404f");function qN(t){return t.xor(t.shru(47))}function KN(t,e,n){const i=t.slice(e,e+n);return HN.fromBytes(Array.from(i),!0,!0)}function QN(t,e){return KN(t,e,8)}function JN(t,e){return KN(t,e,4)}function ZN(t,e){return 0===e?t:t.shru(e).or(t.shl(64-e))}function tk(t,e,n=WN("9ddfea08eb382d69")){let i=t.xor(e).mul(n);i=i.xor(i.shru(47));let s=e.xor(i).mul(n);return s=s.xor(s.shru(47)),s=s.mul(n),s}function ek(t,e,n,i){return function(t,e,n,i,s,r){s=s.add(t),r=ZN(r.add(s).add(i),21);const a=s;return s=(s=s.add(e)).add(n),r=r.add(ZN(s,44)),[s.add(i),r.add(a)]}(QN(t,e),QN(t,e+8),QN(t,e+16),QN(t,e+24),n,i)}function nk(t,e=t.length){const n=HN.fromNumber(81,!0);if(e<=32)return e<=16?function(t,e=t.length){if(e>=8){const n=jN.add(2*e),i=QN(t,0).add(jN),s=QN(t,e-8);return tk(ZN(s,37).mul(n).add(i),ZN(i,25).add(s).mul(n),n)}if(e>=4){const n=jN.add(2*e);return tk(JN(t,0).shl(3).add(e),JN(t,e-4),n)}if(e>0){const n=t[0]+(t[e>>1]<<8),i=e+(t[e-1]<<2);return qN(jN.mul(n).xor(zN.mul(i))).mul(jN)}return jN}(t,e):function(t,e=t.length){const n=jN.add(2*e),i=QN(t,0).mul(XN),s=QN(t,8),r=QN(t,e-8).mul(n),a=QN(t,e-16).mul(jN);return tk(ZN(i.add(s),43).add(ZN(r,30)).add(a),i.add(ZN(s.add(jN),18)).add(r),n)}(t,e);if(e<=64)return function(t,e=t.length){const n=jN.add(2*e),i=QN(t,0).mul(jN),s=QN(t,8),r=QN(t,e-8).mul(n),a=QN(t,e-16).mul(jN),o=ZN(i.add(s),43).add(ZN(r,30)).add(a),l=tk(o,i.add(ZN(s.add(jN),18)).add(r),n),u=QN(t,16).mul(n),h=QN(t,24),p=o.add(QN(t,e-32)).mul(n),c=l.add(QN(t,e-24)).mul(n);return tk(ZN(u.add(h),43).add(ZN(p,30)).add(c),u.add(ZN(h.add(i),18)).add(p),n)}(t,e);let i=n,s=n.mul(XN).add(113),r=qN(s.mul(jN).add(113)).mul(jN),a=[HN.UZERO,HN.UZERO],o=[HN.UZERO,HN.UZERO];i=i.mul(jN).add(QN(t,0));let l=0;const u=64*(e-1>>6),h=u+(e-1&63)-63;do{i=ZN(i.add(s).add(a[0]).add(QN(t,l+8)),37).mul(XN),s=ZN(s.add(a[1]).add(QN(t,l+48)),42).mul(XN),i=i.xor(o[1]),s=s.add(a[0]).add(QN(t,l+40)),r=ZN(r.add(o[0]),33).mul(XN),a=ek(t,l,a[1].mul(XN),i.add(o[0])),o=ek(t,l+32,r.add(o[1]),s.add(QN(t,l+16))),[r,i]=[i,r],l+=64}while(l!==u);const p=XN.add(r.and(255).shl(1));return l=h,o[0]=o[0].add(e-1&63),a[0]=a[0].add(o[0]),o[0]=o[0].add(a[0]),i=ZN(i.add(s).add(a[0]).add(QN(t,l+8)),37).mul(p),s=ZN(s.add(a[1]).add(QN(t,l+48)),42).mul(p),i=i.xor(o[1].mul(9)),s=s.add(a[0].mul(9).add(QN(t,l+40))),r=ZN(r.add(o[0]),33).mul(p),a=ek(t,l,a[1].mul(p),i.add(o[0])),o=ek(t,l+32,r.add(o[1]),s.add(QN(t,l+16))),[r,i]=[i,r],tk(tk(a[0],o[0],p).add(qN(s).mul(zN)).add(r),tk(a[1],o[1],p).add(i),p)} +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function ik(t,e){return"string"===e?ok(t):sk([t],e)}function sk(t,e){if("string"===e)throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(t)&&(t=hk(t)),aA().getBool("DEBUG")&&LO(t,e),function(t,e){return t instanceof Float32Array&&"float32"===e||t instanceof Int32Array&&"int32"===e||t instanceof Uint8Array&&"bool"===e}(t,e))return t;if(null==e||"float32"===e||"complex64"===e)return new Float32Array(t);if("int32"===e)return new Int32Array(t);if("bool"===e){const e=new Uint8Array(t.length);for(let n=0;n{i=n()};let r;const a=rk();if(this.backendTimer.timerAvailable())r=this.backendTimer.time(s);else{s();for(const t of i)t.dataSync();r=Promise.resolve({kernelMs:rk()-a})}if(aA().getBool("CHECK_COMPUTATION_FOR_ERRORS"))for(let e=0;e{ck(e,n.dtype,t)}))}return{kernelName:t,outputs:i,inputs:e,timeMs:r.then((t=>t.kernelMs)),extraInfo:r.then((t=>null!=t.getExtraProfileInfo?t.getExtraProfileInfo():""))}}logKernelProfile(t){const{kernelName:e,outputs:n,timeMs:i,inputs:s,extraInfo:r}=t;n.forEach((t=>{Promise.all([t.data(),i,r]).then((n=>{this.logger.logKernelProfile(e,t,n[0],n[1],s,n[2])}))}))}}function ck(t,e,n){if("float32"!==e)return!1;for(let e=0;e0?i:""} `}}console.log(`%c${o}\t%c${a}\t%c${l}D ${h}\t%c${u}\t%c${p}\t%c${r}`,"font-weight:bold","color:red","color:blue","color: orange","color: green","color: steelblue")}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const fk=20,mk=3,gk=7;function _k(t,e,n,i){const s=zO(e),r=function(t,e,n,i){const s=IO(e),r=i[i.length-1],a=new Array(r).fill(0),o=e.length,l="complex64"===n?Ek(t):t;if(o>1)for(let t=0;t" "+t)).join("\n")),l.join("\n")}function Tk(t,e,n){let i;return i=Array.isArray(t)?`${parseFloat(t[0].toFixed(gk))} + ${parseFloat(t[1].toFixed(gk))}j`:VO(t)?`'${t}'`:"bool"===n?yk(t):parseFloat(t.toFixed(gk)).toString(),OO(i,e)}function yk(t){return 0===t?"false":"true"}function Ik(t,e,n,i,s,r=!0){const a="complex64"===n?2:1,o=e[0],l=e.length;if(0===l){if("complex64"===n){return[Tk(Ek(t)[0],0,n)]}return"bool"===n?[yk(t[0])]:[t[0].toString()]}if(1===l){if(o>fk){const e=mk*a;let i=Array.from(t.slice(0,e)),r=Array.from(t.slice((o-mk)*a,o*a));return"complex64"===n&&(i=Ek(i),r=Ek(r)),["["+i.map(((t,e)=>Tk(t,s[e],n))).join(", ")+", ..., "+r.map(((t,e)=>Tk(t,s[o-mk+e],n))).join(", ")+"]"]}return["["+("complex64"===n?Ek(t):Array.from(t)).map(((t,e)=>Tk(t,s[e],n))).join(", ")+"]"]}const u=e.slice(1),h=i.slice(1),p=i[0]*a,c=[];if(o>fk){for(let e=0;e0?c[0]+d:"");for(let t=1;t`Length of values '${t}' does not match the size inferred by the shape '${this.size}'.`))}if("complex64"===e)throw new Error("complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).");this.values=n||DO(e,this.size),this.strides=zO(t)}set(t,...e){0===e.length&&(e=[0]),_O(e.length===this.rank,(()=>`The number of provided coordinates (${e.length}) must match the rank (${this.rank})`));const n=this.locToIndex(e);this.values[n]=t}get(...t){0===t.length&&(t=[0]);let e=0;for(const n of t){if(n<0||n>=this.shape[e]){const e=`Requested out of range element at ${t}. Buffer shape=${this.shape}`;throw new Error(e)}e++}let n=t[t.length-1];for(let e=0;elk(t)))}catch(t){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}}return t}dataToGPU(t){return this.throwIfDisposed(),vk().readToGPU(this.dataId,t)}dataSync(){this.throwIfDisposed();const t=vk().readSync(this.dataId);if("string"===this.dtype)try{return t.map((t=>lk(t)))}catch(t){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}return t}async bytes(){this.throwIfDisposed();const t=await vk().read(this.dataId);return"string"===this.dtype?t:new Uint8Array(t.buffer)}dispose(){this.isDisposed||(this.kerasMask&&this.kerasMask.dispose(),vk().disposeTensor(this),this.isDisposedInternal=!0)}get isDisposed(){return this.isDisposedInternal}throwIfDisposed(){if(this.isDisposed)throw new Error("Tensor is disposed.")}print(t=!1){return wk.print(this,t)}clone(){return this.throwIfDisposed(),wk.clone(this)}toString(t=!1){return _k(this.dataSync(),this.shape,this.dtype,t)}cast(t){return this.throwIfDisposed(),wk.cast(this,t)}variable(t=!0,e,n){return this.throwIfDisposed(),vk().makeVariable(this,t,e,n)}}function Rk(){return hA("Tensor",(()=>xk))}Object.defineProperty(xk,Symbol.hasInstance,{value:t=>!!t&&null!=t.data&&null!=t.dataSync&&null!=t.throwIfDisposed}),Rk();class Ok extends xk{constructor(t,e,n,i){super(t.shape,t.dtype,t.dataId,i),this.trainable=e,this.name=n}assign(t){if(t.dtype!==this.dtype)throw new Error(`dtype of the new value (${t.dtype}) and previous value (${this.dtype}) must match`);if(!vO(t.shape,this.shape))throw new Error(`shape of the new value (${t.shape}) and previous value (${this.shape}) must match`);vk().disposeTensor(this),this.dataId=t.dataId,vk().incRef(this,null)}dispose(){vk().disposeVariable(this),this.isDisposedInternal=!0}} +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +var Ak,Mk,Ck,Nk,kk;Object.defineProperty(Ok,Symbol.hasInstance,{value:t=>t instanceof xk&&null!=t.assign&&t.assign instanceof Function}),function(t){t.R0="R0",t.R1="R1",t.R2="R2",t.R3="R3",t.R4="R4",t.R5="R5",t.R6="R6"}(Ak||(Ak={})),function(t){t.float32="float32",t.int32="int32",t.bool="int32",t.complex64="complex64"}(Mk||(Mk={})),function(t){t.float32="float32",t.int32="int32",t.bool="bool",t.complex64="complex64"}(Ck||(Ck={})),function(t){t.float32="float32",t.int32="float32",t.bool="float32",t.complex64="complex64"}(Nk||(Nk={})),function(t){t.float32="complex64",t.int32="complex64",t.bool="complex64",t.complex64="complex64"}(kk||(kk={}));const Dk={float32:Nk,int32:Mk,bool:Ck,complex64:kk};function Lk(t,e){if("string"===t||"string"===e){if("string"===t&&"string"===e)return"string";throw new Error(`Can not upcast ${t} with ${e}`)}return Dk[t][e]}function Fk(t){return Lk(t,"int32")}function Pk(t){return null!=t&&"object"==typeof t&&"texture"in t&&t.texture instanceof WebGLTexture}function $k(t){return"undefined"!=typeof GPUBuffer&&null!=t&&"object"==typeof t&&"buffer"in t&&t.buffer instanceof GPUBuffer} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Bk(t,e){if(t.dtype===e.dtype)return[t,e];const n=Lk(t.dtype,e.dtype);return[t.cast(n),e.cast(n)]}function Vk(t,e){_O(t.dtype===e.dtype,(()=>`The dtypes of the first(${t.dtype}) and second(${e.dtype}) input must match`))}function Uk(t,e){return e.some((e=>e.id===t.id))}function Yk(t){const e=[];return Gk(t,e,new Set),e}function Gk(t,e,n){if(null==t)return;if(t instanceof xk)return void e.push(t);if(i=t,!Array.isArray(i)&&"object"!=typeof i)return;var i;const s=t;for(const t in s){const i=s[t];n.has(i)||(n.add(i),Gk(i,e,n))}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Hk(t){return null!=t.kernelName}class Wk{constructor(){this.registeredVariables={},this.nextTapeNodeId=0,this.numBytes=0,this.numTensors=0,this.numStringTensors=0,this.numDataBuffers=0,this.gradientDepth=0,this.kernelDepth=0,this.scopeStack=[],this.numDataMovesStack=[],this.nextScopeId=0,this.tensorInfo=new WeakMap,this.profiling=!1,this.activeProfile={newBytes:0,newTensors:0,peakBytes:0,kernels:[],result:null,get kernelNames(){return Array.from(new Set(this.kernels.map((t=>t.name))))}}}dispose(){for(const t in this.registeredVariables)this.registeredVariables[t].dispose()}}class zk{constructor(t){this.ENV=t,this.registry={},this.registryFactory={},this.pendingBackendInitId=0,this.state=new Wk}async ready(){if(null!=this.pendingBackendInit)return this.pendingBackendInit.then((()=>{}));if(null!=this.backendInstance)return;const t=this.getSortedBackends();for(let e=0;e{null!=t.setupFunc&&t.setupFunc(this.backendInstance)}))}disposeRegisteredKernels(t){LN(t).forEach((e=>{null!=e.disposeFunc&&e.disposeFunc(this.registry[t])}))}initializeBackend(t){const e=this.registryFactory[t];if(null==e)throw new Error(`Cannot initialize backend ${t}, no registration found.`);try{const n=e.factory();if(!n||n instanceof oO||"function"!=typeof n.then)return this.registry[t]=n,{success:!0,asyncInit:!1};{const e=++this.pendingBackendInitId,i=n.then((n=>!(e(ethis.registryFactory[e].priority-this.registryFactory[t].priority))}initializeBackendsAndReturnBest(){const t=this.getSortedBackends();for(let e=0;ethis.startScope(i)),(()=>this.endScope(n)),(()=>(n=e(),n instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),n)))}scopedRun(t,e,n){t();try{const t=n();return e(),t}catch(t){throw e(),t}}nextTensorId(){return zk.nextTensorId++}nextVariableId(){return zk.nextVariableId++}clone(t){const e=jk.runKernel(RM,{x:t}),n={x:t};return this.addTapeNode(this.state.activeScope.name,n,[e],(t=>({x:()=>{const e={x:t},n={dtype:"float32"};return jk.runKernel(LA,e,n)}})),[],{}),e}runKernel(t,e,n){null==this.backendName&&this.backend;if(!(null!=kN(t,this.backendName)))throw new Error(`Kernel '${t}' not registered for backend '${this.backendName}'`);return this.runKernelFunc({kernelName:t,inputs:e,attrs:n})}shouldCheckForMemLeaks(){return this.ENV.getBool("IS_TEST")}checkKernelForMemLeak(t,e,n){const i=this.backend.numDataIds();let s=0;n.forEach((t=>{s+="complex64"===t.dtype?3:1}));const r=this.state.numDataMovesStack[this.state.numDataMovesStack.length-1],a=i-e-s-r;if(a>0)throw new Error(`Backend '${this.backendName}' has an internal memory leak (${a} data ids) after running '${t}'`)}runKernelFunc(t){let e,n=[];const i=this.isTapeOn(),s=this.state.numBytes,r=this.state.numTensors;let a,o;this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack.push(0),null==this.backendName&&this.backend;const l=Hk(t)?t.kernelName:null!=this.state.activeScope?this.state.activeScope.name:"";if(Hk(t)){const{kernelName:e,inputs:s,attrs:r}=t;null==this.backendName&&this.backend;const l=kN(e,this.backendName);_O(null!=l,(()=>`Cannot find registered kernel '${e}' for backend '${this.backendName}'`)),a=()=>{const t=this.backend.numDataIds();o=l.kernelFunc({inputs:s,attrs:r,backend:this.backend});const a=Array.isArray(o)?o:[o];this.shouldCheckForMemLeaks()&&this.checkKernelForMemLeak(e,t,a);const u=a.map((t=>null!=t.rank?t:this.makeTensorFromTensorInfo(t)));if(i){const t=this.getTensorsForGradient(e,s,u);n=this.saveTensorsForBackwardMode(t)}return u}}else{const{forwardFunc:e}=t,s=t=>{i&&(n=t.map((t=>this.keep(this.clone(t)))))};a=()=>{const t=this.backend.numDataIds();o=this.tidy((()=>e(this.backend,s)));const n=Array.isArray(o)?o:[o];return this.shouldCheckForMemLeaks()&&this.checkKernelForMemLeak(l,t,n),n}}const{inputs:u,attrs:h}=t,p=Hk(t)?null:t.backwardsFunc;let c;return this.scopedRun((()=>this.state.kernelDepth++),(()=>this.state.kernelDepth--),(()=>{this.ENV.getBool("DEBUG")||this.state.profiling?(c=this.profiler.profileKernel(l,u,(()=>a())),this.ENV.getBool("DEBUG")&&this.profiler.logKernelProfile(c),e=c.outputs):e=a()})),i&&this.addTapeNode(l,u,e,p,n,h),this.state.profiling&&this.state.activeProfile.kernels.push({name:l,bytesAdded:this.state.numBytes-s,totalBytesSnapshot:this.state.numBytes,tensorsAdded:this.state.numTensors-r,totalTensorsSnapshot:this.state.numTensors,inputShapes:Object.keys(u).map((t=>null!=u[t]?u[t].shape:null)),outputShapes:e.map((t=>t.shape)),kernelTimeMs:c.timeMs,extraInfo:c.extraInfo}),Array.isArray(o)?e:e[0]}saveTensorsForBackwardMode(t){const e=t.map((t=>this.keep(this.clone(t))));return e}getTensorsForGradient(t,e,n){const i=DN(t);if(null!=i){const t=i.inputsToSave||[],s=i.outputsToSave||[];let r;i.saveAllInputs?(_O(Array.isArray(e),(()=>"saveAllInputs is true, expected inputs to be an array.")),r=Object.keys(e).map((t=>e[t]))):r=t.map((t=>e[t]));const a=n.filter(((t,e)=>s[e]));return r.concat(a)}return[]}makeTensor(t,e,n,i){if(null==t)throw new Error("Values passed to engine.makeTensor() are null");n=n||"float32",i=i||this.backend;let s=t;"string"===n&&VO(t[0])&&(s=t.map((t=>ok(t))));const r=i.write(s,e,n),a=new xk(e,n,r,this.nextTensorId());if(this.trackTensor(a,i),"string"===n){const t=this.state.tensorInfo.get(r),e=BO(s);this.state.numBytes+=e-t.bytes,t.bytes=e}return a}makeTensorFromDataId(t,e,n,i){const s={dataId:t,shape:e,dtype:n=n||"float32"};return this.makeTensorFromTensorInfo(s,i)}makeTensorFromTensorInfo(t,e){const{dataId:n,shape:i,dtype:s}=t,r=new xk(i,s,n,this.nextTensorId());return this.trackTensor(r,e),r}makeVariable(t,e=!0,n,i){n=n||this.nextVariableId().toString(),null!=i&&i!==t.dtype&&(t=t.cast(i));const s=new Ok(t,e,n,this.nextTensorId());if(null!=this.state.registeredVariables[s.name])throw new Error(`Variable with name ${s.name} was already registered`);return this.state.registeredVariables[s.name]=s,this.incRef(s,this.backend),s}trackTensor(t,e){this.state.numTensors++,"string"===t.dtype&&this.state.numStringTensors++;let n=0;"complex64"!==t.dtype&&"string"!==t.dtype&&(n=t.size*$O(t.dtype)),this.state.numBytes+=n,this.state.tensorInfo.has(t.dataId)||(this.state.numDataBuffers++,this.state.tensorInfo.set(t.dataId,{backend:e||this.backend,dtype:t.dtype,shape:t.shape,bytes:n})),t instanceof Ok||this.track(t)}incRef(t,e){this.trackTensor(t,e),this.backend.incRef(t.dataId)}removeDataId(t,e){this.state.tensorInfo.has(t)&&this.state.tensorInfo.get(t).backend===e&&(this.state.tensorInfo.delete(t),this.state.numDataBuffers--)}disposeTensor(t){if(!this.state.tensorInfo.has(t.dataId))return;const e=this.state.tensorInfo.get(t.dataId);if(this.state.numTensors--,"string"===t.dtype&&(this.state.numStringTensors--,this.state.numBytes-=e.bytes),"complex64"!==t.dtype&&"string"!==t.dtype){const e=t.size*$O(t.dtype);this.state.numBytes-=e}e.backend.disposeData(t.dataId)&&this.removeDataId(t.dataId,e.backend)}disposeVariables(){for(const t in this.state.registeredVariables){const e=this.state.registeredVariables[t];this.disposeVariable(e)}}disposeVariable(t){this.disposeTensor(t),null!=this.state.registeredVariables[t.name]&&delete this.state.registeredVariables[t.name]}memory(){const t=this.backend.memory();return t.numTensors=this.state.numTensors,t.numDataBuffers=this.state.numDataBuffers,t.numBytes=this.state.numBytes,this.state.numStringTensors>0&&(t.unreliable=!0,null==t.reasons&&(t.reasons=[]),t.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),t}async profile(t){this.state.profiling=!0;const e=this.state.numBytes,n=this.state.numTensors;this.state.activeProfile.kernels=[],this.state.activeProfile.result=await t(),this.state.profiling=!1,this.state.activeProfile.peakBytes=Math.max(...this.state.activeProfile.kernels.map((t=>t.totalBytesSnapshot))),this.state.activeProfile.newBytes=this.state.numBytes-e,this.state.activeProfile.newTensors=this.state.numTensors-n;for(const t of this.state.activeProfile.kernels)t.kernelTimeMs=await t.kernelTimeMs,t.extraInfo=await t.extraInfo;return this.state.activeProfile}isTapeOn(){return this.state.gradientDepth>0&&0===this.state.kernelDepth}addTapeNode(t,e,n,i,s,r){const a={id:this.state.nextTapeNodeId++,kernelName:t,inputs:e,outputs:n,saved:s},o=DN(t);null!=o&&(i=o.gradFunc),null!=i&&(a.gradient=t=>(t=t.map(((t,e)=>{if(null==t){const t=n[e],i=QO(t.size,t.dtype);return this.makeTensor(i,t.shape,t.dtype)}return t})),i(t.length>1?t:t[0],s,r))),this.state.activeTape.push(a)}keep(t){return t.kept=!0,t}startTape(){0===this.state.gradientDepth&&(this.state.activeTape=[]),this.state.gradientDepth++}endTape(){this.state.gradientDepth--}startScope(t){const e={track:[],name:"unnamed scope",id:this.state.nextScopeId++};t&&(e.name=t),this.state.scopeStack.push(e),this.state.activeScope=e}endScope(t){const e=Yk(t),n=new Set(e.map((t=>t.id)));for(let t=0;t{t.kept||t.scopeId!==i.id||this.track(t)}))}gradients(t,e,n,i=!1){if(_O(e.length>0,(()=>"gradients() received an empty list of xs.")),null!=n&&"float32"!==n.dtype)throw new Error(`dy must have 'float32' dtype, but has '${n.dtype}'`);const s=this.scopedRun((()=>this.startTape()),(()=>this.endTape()),(()=>this.tidy("forward",t)));_O(s instanceof xk,(()=>"The result y returned by f() must be a tensor."));const r= +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i={},s={};for(let t=0;ti[t.id]=!0)),o=!0,s[r.id]=!0;break}if(o)break}}const r={};r[n.id]=!0;const a={};for(let e=t.length-1;e>=0;e--){const n=t[e],i=n.inputs;for(let t=0;t0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.");return this.tidy("backward",(()=>{const t={};t[s.id]=null==n?function(t){const e=KO(IO(t),"float32");return jk.makeTensor(e,t,"float32")}(s.shape):n,function(t,e,n,i){for(let s=e.length-1;s>=0;s--){const r=e[s],a=[];if(r.outputs.forEach((e=>{const n=t[e.id];null!=n?a.push(n):a.push(null)})),null==r.gradient)throw new Error(`Cannot compute gradient: gradient function not found for ${r.kernelName}.`);const o=r.gradient(a);for(const e in r.inputs){if(!(e in o))throw new Error(`Cannot backprop through input ${e}. Available gradients found: ${Object.keys(o)}.`);const s=n((()=>o[e]()));if("float32"!==s.dtype)throw new Error(`Error in gradient for op ${r.kernelName}. The gradient of input ${e} must have 'float32' dtype, but has '${s.dtype}'`);const a=r.inputs[e];if(!vO(s.shape,a.shape))throw new Error(`Error in gradient for op ${r.kernelName}. The gradient of input '${e}' has shape '${s.shape}', which does not match the shape of the input '${a.shape}'`);if(null==t[a.id])t[a.id]=s;else{const e=t[a.id];t[a.id]=i(e,s),e.dispose()}}}}(t,r,(t=>this.tidy(t)),qk);const i=e.map((e=>t[e.id]));return 0===this.state.gradientDepth&&(this.state.activeTape.forEach((t=>{for(const e of t.saved)e.dispose()})),this.state.activeTape=null),{value:s,grads:i}}))}customGrad(t){return _O(HO(t),(()=>"The f passed in customGrad(f) must be a function.")),(...e)=>{let n;_O(e.every((t=>t instanceof xk)),(()=>"The args passed in customGrad(f)(x1, x2,...) must all be tensors"));const i={};e.forEach(((t,e)=>{i[e]=t}));return this.runKernelFunc({forwardFunc:(i,s)=>(n=t(...e,s),_O(n.value instanceof xk,(()=>"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor")),_O(HO(n.gradFunc),(()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function.")),n.value),backwardsFunc:(t,i)=>{const s=n.gradFunc(t,i),r=Array.isArray(s)?s:[s];_O(r.length===e.length,(()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...).")),_O(r.every((t=>t instanceof xk)),(()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors."));const a={};return r.forEach(((t,e)=>{a[e]=()=>t})),a},inputs:i})}}readSync(t){return this.state.tensorInfo.get(t).backend.readSync(t)}read(t){return this.state.tensorInfo.get(t).backend.read(t)}readToGPU(t,e){return this.state.tensorInfo.get(t).backend.readToGPU(t,e)}async time(t){const e=rk(),n=await this.backend.time(t);return n.wallMs=rk()-e,n}track(t){return null!=this.state.activeScope&&(t.scopeId=this.state.activeScope.id,this.state.activeScope.track.push(t)),t}get registeredVariables(){return this.state.registeredVariables}reset(){this.pendingBackendInitId++,this.state.dispose(),this.ENV.reset(),this.state=new Wk;for(const t in this.registry)this.disposeRegisteredKernels(t),this.registry[t].dispose(),delete this.registry[t];this.backendName=null,this.backendInstance=null,this.pendingBackendInit=null}}function Xk(){const t=uA();if(null==t._tfengine){const e=new sA(t);t._tfengine=new zk(e)}var e;return e=t._tfengine.ENV,lA=e,vk=()=>t._tfengine,t._tfengine}zk.nextTensorId=0,zk.nextVariableId=0;const jk=Xk();function qk(t,e){const n={a:t,b:e};return jk.runKernel(fA,n)}let Kk;function Qk(t){Kk=t}function Jk(t){if(void 0!==Kk)return Kk;if(t||"undefined"!=typeof navigator&&null!=navigator){if(t||(t=navigator),"ReactNative"===t.product)return!0;const e=t.userAgent||t.vendor||("undefined"!=typeof window?window.opera:"");if(!e){const e=t;return e.userAgentData&&e.userAgentData.mobile}return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}return!1}function Zk(){return"undefined"!=typeof window&&null!=window.document||"undefined"!=typeof WorkerGlobalScope} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const tD=aA(); +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function eD(t,e){let n=t;if(uk(t))return"string"===e?[]:[t.length];if(Pk(t)){const e=t.channels||"RGBA";return[t.height,t.width*e.length]}if($k(t))return[t.buffer.size/(null==e?4:$O(e))];if(!Array.isArray(t))return[];const i=[];for(;Array.isArray(n)||uk(n)&&"string"!==e;)i.push(n.length),n=n[0];return Array.isArray(t)&&aA().getBool("TENSORLIKE_CHECK_SHAPE_CONSISTENCY")&&nD(t,i,[]),i}function nD(t,e,n){if(n=n||[],!Array.isArray(t)&&!uk(t))return void _O(0===e.length,(()=>`Element arr[${n.join("][")}] is a primitive, but should be an array/TypedArray of ${e[0]} elements`));_O(e.length>0,(()=>`Element arr[${n.join("][")}] should be a primitive, but is an array of ${t.length} elements`)),_O(t.length===e[0],(()=>`Element arr[${n.join("][")}] should have ${e[0]} elements, but has ${t.length} elements`));const i=e.slice(1);for(let e=0;e=0&&(s=i),iD(i,s,e,n),null==t||!uk(t)&&!Array.isArray(t)&&"number"!=typeof t&&"boolean"!=typeof t&&"string"!=typeof t){const i=null==t?"null":t.constructor.name;throw new Error(`Argument '${e}' passed to '${n}' must be a Tensor or TensorLike, but got '${i}'`)}const r=eD(t,s);uk(t)||Array.isArray(t)||(t=[t]);const a="string"!==s?sk(t,s):hk(t,[],!0);return jk.makeTensor(a,r,s)}function rD(t,e,n,i="numeric"){if(!Array.isArray(t))throw new Error(`Argument ${e} passed to ${n} must be a \`Tensor[]\` or \`TensorLike[]\``);return t.map(((t,s)=>sD(t,`${e}[${s}]`,n,i)))}tD.registerFlag("DEBUG",(()=>!1),(t=>{t&&console.warn("Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.")})),tD.registerFlag("IS_BROWSER",(()=>Zk())),tD.registerFlag("IS_NODE",(()=>"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node)),tD.registerFlag("IS_CHROME",(()=>"undefined"!=typeof navigator&&null!=navigator&&null!=navigator.userAgent&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor))),tD.registerFlag("IS_SAFARI",(()=>"undefined"!=typeof navigator&&null!=navigator&&null!=navigator.userAgent&&/Safari/.test(navigator.userAgent)&&/Apple/.test(navigator.vendor))),tD.registerFlag("PROD",(()=>!1)),tD.registerFlag("TENSORLIKE_CHECK_SHAPE_CONSISTENCY",(()=>tD.getBool("DEBUG"))),tD.registerFlag("DEPRECATION_WARNINGS_ENABLED",(()=>!0)),tD.registerFlag("IS_TEST",(()=>!1)),tD.registerFlag("CHECK_COMPUTATION_FOR_ERRORS",(()=>tD.getBool("DEBUG"))),tD.registerFlag("WRAP_TO_IMAGEBITMAP",(()=>!1)),tD.registerFlag("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU",(()=>!1)),tD.registerFlag("USE_SETTIMEOUTCUSTOM",(()=>!1)); +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const aD="__op";function oD(t){const e=Object.keys(t);if(1!==e.length)throw new Error(`Please provide an object with a single key (operation name) mapping to a function. Got an object with ${e.length} keys.`);let n=e[0];const i=t[n];n.endsWith("_")&&(n=n.substring(0,n.length-1)),n+=aD;const s=(...t)=>{jk.startScope(n);try{const e=i(...t);return nA(e)&&console.error("Cannot return a Promise inside of tidy."),jk.endScope(e),e}catch(t){throw jk.endScope(null),t}};return Object.defineProperty(s,"name",{value:n,configurable:!0}),s}const lD=oD({complex_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"real","complex"),i=sD(e,"imag","complex");TO(n.shape,i.shape,`real and imag shapes, ${n.shape} and ${i.shape}, must match in call to tf.complex().`);const s={real:n,imag:i};return jk.runKernel($A,s)}}); +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function uD(t,e,n,i){if(null==i)i=GO(t);else if("complex64"===i)throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if($k(t)||Pk(t)){if("float32"!==i&&"int32"!==i)throw new Error(`Creating tensor from GPU data only supports 'float32'|'int32' dtype, while the dtype is ${i}.`);return jk.backend.createTensorFromGPUData(t,e||n,i)}if(!uk(t)&&!Array.isArray(t)&&"number"!=typeof t&&"boolean"!=typeof t&&"string"!=typeof t)throw new Error("values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray");if(null!=e){ZO(e);const t=IO(e),i=IO(n);_O(t===i,(()=>`Based on the provided shape, [${e}], the tensor should have ${t} values but has ${i}`));for(let t=0;t`Error creating a new Tensor. Inferred shape (${n}) does not match the provided shape (${e}). `))}}return uk(t)||Array.isArray(t)||(t=[t]),e=e||n,t="string"!==i?sk(t,i):hk(t,[],!0),jk.makeTensor(t,e,i)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function hD(t,e,n){return uD(t,e,eD(t,n),n)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const pD={float32:4,float16:2,int32:4,uint16:2,uint8:1,bool:1,complex64:8};class cD{static join(t){return new cD(t).slice()}constructor(t){if(this.shards=[],this.previousShardIndex=0,null==t)return;if(t instanceof Array||(t=[t]),0===(t=t.map((t=>uk(t)?t.buffer:t))).length)return;this.bufferUniformSize=t[0].byteLength;let e=0;for(let n=0;n=this.byteLength)return-1;if(null!=this.bufferUniformSize)return this.previousShardIndex=Math.floor(t/this.bufferUniformSize),this.previousShardIndex;function e(e){return t=e.end?1:0}if(0===e(this.shards[this.previousShardIndex]))return this.previousShardIndex;const n=function(t,e){let n=0,i=t.length;for(;n<=i;){const s=Math.floor((i-n)/2)+n,r=e(t[s]);if(0===r)return s;r<0?i=s:n=s+1}return-1}(this.shards,e);return-1===n?-1:(this.previousShardIndex=n,this.previousShardIndex)}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function dD(){aA().set("PROD",!0)}function fD(){aA().set("DEBUG",!0)}function mD(){aA().set("DEPRECATION_WARNINGS_ENABLED",!1),console.warn("TensorFlow.js deprecation warnings have been disabled.")}function gD(t){aA().getBool("DEPRECATION_WARNINGS_ENABLED")&&console.warn(t+" You can disable deprecation warnings with tf.disableDeprecationWarnings().")}function _D(){jk.disposeVariables()}function TD(){return jk}function yD(){return jk.memory()}function ID(t){return jk.profile(t)}function ED(t,e){return jk.tidy(t,e)}function bD(t){Yk(t).forEach((t=>t.dispose()))}function vD(t){return jk.keep(t)}function wD(t){return jk.time(t)}function SD(t){return jk.setBackend(t)}function xD(){return jk.ready()}function RD(){return jk.backendName}function OD(t){jk.removeBackend(t)}function AD(t){return jk.findBackend(t)}function MD(t){return jk.findBackendFactory(t)}function CD(t,e,n=1){return jk.registerBackend(t,e,n)}function ND(){return jk.backend}function kD(t,e){aA().setPlatform(t,e)}Sk=gD; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const DD=4;async function LD(t,e){const n=[],i=[],s=Array.isArray(t)?t.map((t=>t.name)):Object.keys(t);for(let r=0;r{const e=await o.bytes(),n=e.reduce(((t,e)=>t+e.length),0)+DD*e.length,i=new Uint8Array(n);let s=0;for(let t=0;tn.slice(s+t,s+e)));i[t.name]=BD(t,n.slice(s,s+e)),s+=e}return i}function PD(t,e){const n=IO(t.shape);let i;if("quantization"in t){const e=t.quantization;i=pD[e.dtype]}else{if("string"===t.dtype){let t=0;for(let i=0;i{let e=t<<13,n=0;for(;!(8388608&e);)n-=8388608,e<<=1;return e&=-8388609,n+=947912704,e|n},e=new Uint32Array(2048);e[0]=0;for(let n=1;n<1024;n++)e[n]=t(n);for(let t=1024;t<2048;t++)e[t]=939524096+(t-1024<<13);return e}(),e=function(){const t=new Uint32Array(64);t[0]=0,t[31]=1199570944,t[32]=2147483648,t[63]=3347054592;for(let e=1;e<31;e++)t[e]=e<<23;for(let e=33;e<63;e++)t[e]=2147483648+(e-32<<23);return t}(),n=function(){const t=new Uint32Array(64);for(let e=0;e<64;e++)t[e]=1024;return t[0]=t[32]=0,t}();return i=>{const s=new ArrayBuffer(4*i.length),r=new Uint32Array(s);for(let s=0;s>10]+(1023&a)]+e[a>>10];r[s]=o}return new Float32Array(s)}}();a=t(u)}}else{if("int32"!==i)throw new Error(`Unsupported dtype in weight '${n}': ${i}`);if("uint8"!==s.dtype&&"uint16"!==s.dtype)throw new Error(`Unsupported quantization type ${s.dtype} for weight type int32.`);a=new Int32Array(u.length);for(let t=0;t(s=await VD(i,s,e),s.slice(t,e))));s=await VD(i,s,e);const r=s.slice(0,e);s=s.slice(e);const a=BD(t,r);if(n[t.name]=a,"webgpu"===RD()){const t=ND();"uploadToGPU"in t&&IO(a.shape)>=aA().get("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD")&&t.uploadToGPU(a.dataId)}}return n}function YD(t){if(null===t)throw new Error(`Invalid input value: ${JSON.stringify(t)}`);let e=0;const n=[];t.forEach((t=>{if(e+=t.byteLength,n.push(t.byteLength===t.buffer.byteLength?t:new t.constructor(t)),!(t instanceof Float32Array||t instanceof Int32Array||t instanceof Uint8Array))throw new Error(`Unsupported TypedArray subtype: ${t.constructor.name}`)}));const i=new Uint8Array(e);let s=0;return n.forEach((t=>{i.set(new Uint8Array(t.buffer),s),s+=t.byteLength})),i.buffer}const GD="undefined"!=typeof Buffer&&("undefined"==typeof Blob||"undefined"==typeof atob||"undefined"==typeof btoa);function HD(t){return GD?Buffer.byteLength(t,"utf8"):new Blob([t]).size}function WD(t){return cD.join(t)}function zD(t){for(t=t.trim();t.endsWith("/");)t=t.slice(0,t.length-1);const e=t.split("/");return e[e.length-1]}function XD(t,e){const n={modelTopology:t.modelTopology,format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,weightsManifest:e};return null!=t.signature&&(n.signature=t.signature),null!=t.userDefinedMetadata&&(n.userDefinedMetadata=t.userDefinedMetadata),null!=t.modelInitializer&&(n.modelInitializer=t.modelInitializer),null!=t.initializerSignature&&(n.initializerSignature=t.initializerSignature),null!=t.trainingConfig&&(n.trainingConfig=t.trainingConfig),n}function jD(t,e,n){const i={modelTopology:t.modelTopology,format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy};if(null!=t.trainingConfig&&(i.trainingConfig=t.trainingConfig),null!=t.weightsManifest){if(!e)throw new Error("modelJSON has weightsManifest but weightSpecs is null");if(!n)throw new Error("modelJSON has weightsManifest but weightData is null");i.weightSpecs=e,i.weightData=n}return null!=t.signature&&(i.signature=t.signature),null!=t.userDefinedMetadata&&(i.userDefinedMetadata=t.userDefinedMetadata),null!=t.modelInitializer&&(i.modelInitializer=t.modelInitializer),null!=t.initializerSignature&&(i.initializerSignature=t.initializerSignature),i}async function qD(t,e){let n,i;return null!=t.weightsManifest&&([n,i]=await e(t.weightsManifest)),jD(t,n,i)}function KD(t){if(t.modelTopology instanceof ArrayBuffer)throw new Error("Expected JSON model topology, received ArrayBuffer.");return{dateSaved:new Date,modelTopologyType:"JSON",modelTopologyBytes:null==t.modelTopology?0:HD(JSON.stringify(t.modelTopology)),weightSpecsBytes:null==t.weightSpecs?0:HD(JSON.stringify(t.weightSpecs)),weightDataBytes:null==t.weightData?0:new cD(t.weightData).byteLength}}function QD(t){const e=[];for(const n of t)e.push(...n.weights);return e} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class JD{constructor(){this.saveRouters=[],this.loadRouters=[]}static getInstance(){return null==JD.instance&&(JD.instance=new JD),JD.instance}static registerSaveRouter(t){JD.getInstance().saveRouters.push(t)}static registerLoadRouter(t){JD.getInstance().loadRouters.push(t)}static getSaveHandlers(t){return JD.getHandlers(t,"save")}static getLoadHandlers(t,e){return JD.getHandlers(t,"load",e)}static getHandlers(t,e,n){const i=[];return("load"===e?JD.getInstance().loadRouters:JD.getInstance().saveRouters).forEach((e=>{const s=e(t,n);null!==s&&i.push(s)})),i}}const ZD=t=>JD.registerSaveRouter(t),tL=t=>JD.registerLoadRouter(t),eL=t=>JD.getSaveHandlers(t),nL=(t,e)=>JD.getLoadHandlers(t,e),iL="tensorflowjs",sL="models_store",rL="model_info_store";function aL(){if(!aA().getBool("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");const t="undefined"==typeof window?self:window,e=t.indexedDB||t.mozIndexedDB||t.webkitIndexedDB||t.msIndexedDB||t.shimIndexedDB;if(null==e)throw new Error("The current browser does not appear to support IndexedDB.");return e}function oL(t){const e=t.result;e.createObjectStore(sL,{keyPath:"modelPath"}),e.createObjectStore(rL,{keyPath:"modelPath"})}class lL{constructor(t){if(this.indexedDB=aL(),null==t||!t)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=t}async save(t){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return this.databaseAction(this.modelPath,t)}async load(){return this.databaseAction(this.modelPath)}databaseAction(t,e){return new Promise(((t,n)=>{const i=this.indexedDB.open(iL,1);i.onupgradeneeded=()=>oL(i),i.onsuccess=()=>{const s=i.result;if(null==e){const e=s.transaction(sL,"readonly"),i=e.objectStore(sL).get(this.modelPath);i.onsuccess=()=>{if(null==i.result)return s.close(),n(new Error(`Cannot find model with path '${this.modelPath}' in IndexedDB.`));t(i.result.modelArtifacts)},i.onerror=t=>(s.close(),n(i.error)),e.oncomplete=()=>s.close()}else{e.weightData=cD.join(e.weightData);const i=KD(e),r=s.transaction(rL,"readwrite");let a,o,l=r.objectStore(rL);try{a=l.put({modelPath:this.modelPath,modelArtifactsInfo:i})}catch(t){return n(t)}a.onsuccess=()=>{o=s.transaction(sL,"readwrite");const a=o.objectStore(sL);let u;try{u=a.put({modelPath:this.modelPath,modelArtifacts:e,modelArtifactsInfo:i})}catch(t){return n(t)}u.onsuccess=()=>t({modelArtifactsInfo:i}),u.onerror=t=>{l=r.objectStore(rL);const e=l.delete(this.modelPath);e.onsuccess=()=>(s.close(),n(u.error)),e.onerror=t=>(s.close(),n(u.error))}},a.onerror=t=>(s.close(),n(a.error)),r.oncomplete=()=>{null==o?s.close():o.oncomplete=()=>s.close()}}},i.onerror=t=>n(i.error)}))}}lL.URL_SCHEME="indexeddb://";const uL=t=>{return aA().getBool("IS_BROWSER")&&!Array.isArray(t)&&t.startsWith(lL.URL_SCHEME)?(e=t.slice(lL.URL_SCHEME.length),new lL(e)):null;var e};JD.registerSaveRouter(uL),JD.registerLoadRouter(uL);class hL{constructor(){this.indexedDB=aL()}async listModels(){return new Promise(((t,e)=>{const n=this.indexedDB.open(iL,1);n.onupgradeneeded=()=>oL(n),n.onsuccess=()=>{const i=n.result,s=i.transaction(rL,"readonly"),r=s.objectStore(rL).getAll();r.onsuccess=()=>{const e={};for(const t of r.result)e[t.modelPath]=t.modelArtifactsInfo;t(e)},r.onerror=t=>(i.close(),e(r.error)),s.oncomplete=()=>i.close()},n.onerror=t=>e(n.error)}))}async removeModel(t){var e;return t=(e=t).startsWith(lL.URL_SCHEME)?e.slice(lL.URL_SCHEME.length):e,new Promise(((e,n)=>{const i=this.indexedDB.open(iL,1);i.onupgradeneeded=()=>oL(i),i.onsuccess=()=>{const s=i.result,r=s.transaction(rL,"readwrite"),a=r.objectStore(rL),o=a.get(t);let l;o.onsuccess=()=>{if(null==o.result)return s.close(),n(new Error(`Cannot find model with path '${t}' in IndexedDB.`));{const i=a.delete(t),r=()=>{l=s.transaction(sL,"readwrite");const i=l.objectStore(sL).delete(t);i.onsuccess=()=>e(o.result.modelArtifactsInfo),i.onerror=t=>n(o.error)};i.onsuccess=r,i.onerror=t=>(r(),s.close(),n(o.error))}},o.onerror=t=>(s.close(),n(o.error)),r.oncomplete=()=>{null==l?s.close():l.oncomplete=()=>s.close()}},i.onerror=t=>n(i.error)}))}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const pL="/",cL="tensorflowjs_models",dL="info",fL="model_topology",mL="weight_specs",gL="weight_data",_L="model_metadata";function TL(t){return{info:[cL,t,dL].join(pL),topology:[cL,t,fL].join(pL),weightSpecs:[cL,t,mL].join(pL),weightData:[cL,t,gL].join(pL),modelMetadata:[cL,t,_L].join(pL)}}function yL(t){for(const e of Object.values(t))window.localStorage.removeItem(e)}function IL(t){const e=t.split(pL);if(e.length<3)throw new Error(`Invalid key format: ${t}`);return e.slice(1,e.length-1).join(pL)}class EL{constructor(t){if(!aA().getBool("IS_BROWSER")||"undefined"==typeof window||void 0===window.localStorage)throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,null==t||!t)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=t,this.keys=TL(this.modelPath)}async save(t){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");{const e=JSON.stringify(t.modelTopology),n=JSON.stringify(t.weightSpecs),i=KD(t),s=cD.join(t.weightData);try{this.LS.setItem(this.keys.info,JSON.stringify(i)),this.LS.setItem(this.keys.topology,e),this.LS.setItem(this.keys.weightSpecs,n),this.LS.setItem(this.keys.weightData,function(t){if(GD)return Buffer.from(t).toString("base64");const e=new Uint8Array(t);let n="";for(let t=0,i=e.length;t{return aA().getBool("IS_BROWSER")&&!Array.isArray(t)&&t.startsWith(EL.URL_SCHEME)?(e=t.slice(EL.URL_SCHEME.length),new EL(e)):null;var e};JD.registerSaveRouter(bL),JD.registerLoadRouter(bL);class vL{constructor(){_O(aA().getBool("IS_BROWSER"),(()=>"Current environment is not a web browser")),_O("undefined"==typeof window||void 0!==window.localStorage,(()=>"Current browser does not appear to support localStorage")),this.LS=window.localStorage}async listModels(){const t={},e=cL+pL,n=pL+dL;for(let i=0;i"scheme must not be undefined or null.")),t.endsWith(wL)&&(t=t.slice(0,t.indexOf(wL))),_O(t.length>0,(()=>"scheme must not be an empty string."));const n=SL.getInstance();_O(null==n.managers[t],(()=>`A model store manager is already registered for scheme '${t}'.`)),n.managers[t]=e}static getManager(t){const e=SL.getInstance().managers[t];if(null==e)throw new Error(`Cannot find model manager for scheme '${t}'`);return e}static getSchemes(){return Object.keys(SL.getInstance().managers)}}function xL(t){if(-1===t.indexOf(wL))throw new Error(`The url string provided does not contain a scheme. Supported schemes are: ${SL.getSchemes().join(",")}`);return{scheme:t.split(wL)[0],path:t.split(wL)[1]}}async function RL(t,e,n=!1){_O(t!==e,(()=>`Old path and new path are the same: '${t}'`));const i=JD.getLoadHandlers(t);_O(i.length>0,(()=>`Copying failed because no load handler is found for source URL ${t}.`)),_O(i.length<2,(()=>`Copying failed because more than one (${i.length}) load handlers for source URL ${t}.`));const s=i[0],r=JD.getSaveHandlers(e);_O(r.length>0,(()=>`Copying failed because no save handler is found for destination URL ${e}.`)),_O(r.length<2,(()=>`Copying failed because more than one (${i.length}) save handlers for destination URL ${e}.`));const a=r[0],o=xL(t).scheme,l=xL(t).path,u=o===xL(t).scheme,h=await s.load();n&&u&&await SL.getManager(o).removeModel(l);const p=await a.save(h);return n&&!u&&await SL.getManager(o).removeModel(l),p.modelArtifactsInfo}async function OL(){const t=SL.getSchemes(),e={};for(const n of t){const t=await SL.getManager(n).listModels();for(const i in t){e[n+wL+i]=t[i]}}return e}async function AL(t){const e=xL(t);return SL.getManager(e.scheme).removeModel(e.path)}async function ML(t,e){return RL(t,e,!1)}async function CL(t,e){return RL(t,e,!0)} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class NL{constructor(){this.messageName="setTimeoutCustom",this.functionRefs=[],this.handledMessageCount=0,this.hasEventListener=!1}fetch(t,e){return fetch(t,e)}now(){return performance.now()}encode(t,e){if("utf-8"!==e&&"utf8"!==e)throw new Error(`Browser's encoder only supports utf-8, but got ${e}`);return null==this.textEncoder&&(this.textEncoder=new TextEncoder),this.textEncoder.encode(t)}decode(t,e){return new TextDecoder(e).decode(t)}setTimeoutCustom(t,e){"undefined"!=typeof window&&aA().getBool("USE_SETTIMEOUTCUSTOM")?(this.functionRefs.push(t),setTimeout((()=>{window.postMessage({name:this.messageName,index:this.functionRefs.length-1},"*")}),e),this.hasEventListener||(this.hasEventListener=!0,window.addEventListener("message",(t=>{if(t.source===window&&t.data.name===this.messageName){t.stopPropagation();(0,this.functionRefs[t.data.index])(),this.handledMessageCount++,this.handledMessageCount===this.functionRefs.length&&(this.functionRefs=[],this.handledMessageCount=0)}}),!0))):setTimeout(t,e)}isTypedArray(t){return YN(t)}}if(aA().get("IS_BROWSER")){aA().setPlatform("browser",new NL);try{SL.registerManager(EL.URL_SCHEME,new vL)}catch(t){}try{SL.registerManager(lL.URL_SCHEME,new hL)}catch(t){}} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const kL=()=>__webpack_require__(5817);let DL;class LL{constructor(){this.util=__webpack_require__(8590),this.textEncoder=new this.util.TextEncoder}fetch(t,e){return null!=aA().global.fetch?aA().global.fetch(t,e):(null==DL&&(DL=kL()),DL(t,e))}now(){const t=process.hrtime();return 1e3*t[0]+t[1]/1e6}encode(t,e){if("utf-8"!==e&&"utf8"!==e)throw new Error(`Node built-in encoder only supports utf-8, but got ${e}`);return this.textEncoder.encode(t)}decode(t,e){return 0===t.length?"":new this.util.TextDecoder(e).decode(t)}isTypedArray(t){return this.util.types.isFloat32Array(t)||this.util.types.isInt32Array(t)||this.util.types.isUint8Array(t)||this.util.types.isUint8ClampedArray(t)}} +/** + * @license + * Copyright 2020 Google Inc. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function FL(t,e="float32",n){return e=e||"float32",ZO(t),new bk(t,e,n)}aA().get("IS_NODE")&&!aA().get("IS_BROWSER")&&aA().setPlatform("node",new LL);const PL=oD({cast_: +/** + * @license + * Copyright 2020 Google Inc. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"x","cast");if(!FO(e))throw new Error(`Failed to cast to unknown dtype ${e}`);if("string"===e&&"string"!==n.dtype||"string"!==e&&"string"===n.dtype)throw new Error("Only strings can be casted to strings");const i={x:n},s={dtype:e};return jk.runKernel(LA,i,s)}});const $L=oD({clone_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","clone","string_or_numeric")};return jk.runKernel(RM,e)}}); +/** + * @license + * Copyright 2020 Google Inc. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function BL(t,e=!1){console.log(t.toString(e))} +/** + * @license + * Copyright 2020 Google Inc. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Xk();wk={buffer:FL,cast:PL,clone:$L,print:BL};const VL=oD({add_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){let n=sD(t,"a","add"),i=sD(e,"b","add");[n,i]=Bk(n,i);const s={a:n,b:i};return jk.runKernel(fA,s)}});const UL=oD({floorDiv_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){let n=sD(t,"a","floorDiv"),i=sD(e,"b","floorDiv");[n,i]=Bk(n,i);const s={a:n,b:i};return jk.runKernel(EM,s)}});const YL=oD({div_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){let n=sD(t,"a","div"),i=sD(e,"b","div");if([n,i]=Bk(n,i),"int32"===n.dtype&&"int32"===i.dtype)return UL(n,i);const s={a:n,b:i};return jk.runKernel(lM,s,{})}});const GL=oD({mul_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){let n=sD(t,"a","mul"),i=sD(e,"b","mul");[n,i]=Bk(n,i);const s={a:n,b:i};return jk.runKernel(oC,s)}});const HL=oD({sqrt_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","sqrt","float32")};return jk.runKernel(jC,e)}});const WL=oD({square_: +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e=sD(t,"x","square");return jk.runKernel("Square",{x:e},{})}});const zL=oD({zerosLike_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","zerosLike")};return jk.runKernel(bN,e)}}); +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function XL(t){return _O(HO(t),(()=>"The f passed in grad(f) must be a function")),(e,n)=>{const i=sD(e,"x","tf.grad","string_or_numeric"),s=null!=n?sD(n,"dy","tf.grad"):null;return jk.tidy((()=>{const{value:e,grads:n}=jk.gradients((()=>t(i)),[i],s);return null!=s&&TO(e.shape,s.shape,"The shape of dy passed in grad(f)(x, dy) must match the shape returned by f(x)"),ZL(n),n[0]}))}}function jL(t){return _O(HO(t),(()=>"The f passed in grads(f) must be a function")),(e,n)=>{_O(Array.isArray(e),(()=>"The args passed in grads(f)(args) must be an array of `Tensor`s or `TensorLike`s"));const i=rD(e,"args","tf.grads","string_or_numeric"),s=null!=n?sD(n,"dy","tf.grads"):null;return jk.tidy((()=>{const{value:e,grads:n}=jk.gradients((()=>t(...i)),i,s);return null!=s&&TO(e.shape,s.shape,"The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),ZL(n),n}))}}function qL(t){return _O(HO(t),(()=>"The f passed in valueAndGrad(f) must be a function")),(e,n)=>{_O(e instanceof xk,(()=>"The x passed in valueAndGrad(f)(x) must be a tensor")),_O(null==n||n instanceof xk,(()=>"The dy passed in valueAndGrad(f)(x, dy) must be a tensor"));const{grads:i,value:s}=jk.gradients((()=>t(e)),[e],n);return ZL(i),{grad:i[0],value:s}}}function KL(t){return _O(HO(t),(()=>"The f passed in valueAndGrads(f) must be a function")),(e,n)=>{_O(Array.isArray(e)&&e.every((t=>t instanceof xk)),(()=>"The args passed in valueAndGrads(f)(args) must be array of tensors")),_O(null==n||n instanceof xk,(()=>"The dy passed in valueAndGrads(f)(args, dy) must be a tensor"));const i=jk.gradients((()=>t(...e)),e,n);return null!=n&&TO(i.value.shape,n.shape,"The shape of dy passed in valueAndGrads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),ZL(i.grads),i}}function QL(t,e){_O(HO(t),(()=>"The f passed in variableGrads(f) must be a function")),_O(null==e||Array.isArray(e)&&e.every((t=>t instanceof Ok)),(()=>"The varList passed in variableGrads(f, varList) must be an array of variables"));const n=null!=e;if(!n){e=[];for(const t in jk.registeredVariables)e.push(jk.registeredVariables[t])}const i=n?e.filter((t=>!t.trainable)):null,s=e.length;e=e.filter((t=>t.trainable)),_O(e.length>0,(()=>`variableGrads() expects at least one of the input variables to be trainable, but none of the ${s} variables is trainable.`));const{value:r,grads:a}=jk.gradients(t,e,null,!0);_O(a.some((t=>null!=t)),(()=>"Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize().")),_O(0===r.rank,(()=>`The f passed in variableGrads(f) must return a scalar, but it returned a rank-${r.rank} tensor`));const o={};return e.forEach(((t,e)=>{null!=a[e]&&(o[t.name]=a[e])})),null!=i&&i.forEach((t=>o[t.name]=null)),{value:r,grads:o}}function JL(t){return jk.customGrad(t)}function ZL(t){if(t.filter((t=>null==t)).length>0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that\n the f you passed encloses all operations that lead from x to y.")} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function tF(t,e){if((uk(t)&&"string"!==e||Array.isArray(t))&&"complex64"!==e)throw new Error("Error creating a new Scalar: value must be a primitive (number|boolean|string)");if("string"===e&&uk(t)&&!(t instanceof Uint8Array))throw new Error("When making a scalar from encoded string, the value must be `Uint8Array`.");return uD(t,[],[],e)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const eF=new Map,nF=new Map;class iF{getClassName(){return this.constructor.className}static fromConfig(t,e){return new t(e)}}class sF{constructor(){this.classNameMap={}}static getMap(){return null==sF.instance&&(sF.instance=new sF),sF.instance}static register(t){sF.getMap().classNameMap[t.className]=[t,t.fromConfig]}}function rF(t,e,n){_O(null!=t.className,(()=>"Class being registered does not have the static className property defined.")),_O("string"==typeof t.className,(()=>"className is required to be a string, but got type "+typeof t.className)),_O(t.className.length>0,(()=>"Class being registered has an empty-string as its className, which is disallowed.")),void 0===e&&(e="Custom"),void 0===n&&(n=t.className);const i=e+">"+n;return sF.register(t),eF.set(i,t),nF.set(t,i),t}function aF(t){return nF.has(t)?nF.get(t):t.className} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class oF extends iF{minimize(t,e=!1,n){const{value:i,grads:s}=this.computeGradients(t,n);if(null!=n){const t=n.map((t=>({name:t.name,tensor:s[t.name]})));this.applyGradients(t)}else this.applyGradients(s);return bD(s),e?i:(i.dispose(),null)}get iterations(){return null==this.iterations_&&(this.iterations_=0),this.iterations_}incrementIterations(){this.iterations_=this.iterations+1}computeGradients(t,e){return QL(t,e)}dispose(){null!=this.iterations_&&bD(this.iterations_)}async saveIterations(){return null==this.iterations_&&(this.iterations_=0),{name:"iter",tensor:tF(this.iterations_,"int32")}}async getWeights(){throw new Error("getWeights() is not implemented for this optimizer yet.")}async setWeights(t){throw new Error(`setWeights() is not implemented for this optimizer class ${this.getClassName()}`)}async extractIterations(t){return this.iterations_=(await t[0].tensor.data())[0],t.slice(1)}}Object.defineProperty(oF,Symbol.hasInstance,{value:t=>null!=t.minimize&&null!=t.computeGradients&&null!=t.applyGradients}); +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class lF extends oF{static get className(){return"Adadelta"}constructor(t,e,n=null){super(),this.learningRate=t,this.rho=e,this.epsilon=n,this.accumulatedGrads=[],this.accumulatedUpdates=[],null==n&&(this.epsilon=jk.backend.epsilon())}applyGradients(t){(Array.isArray(t)?t.map((t=>t.name)):Object.keys(t)).forEach(((e,n)=>{const i=jk.registeredVariables[e],s=!1;null==this.accumulatedGrads[n]&&(this.accumulatedGrads[n]={originalName:`${e}/accum_grad`,variable:ED((()=>zL(i).variable(s)))}),null==this.accumulatedUpdates[n]&&(this.accumulatedUpdates[n]={originalName:`${e}/accum_var`,variable:ED((()=>zL(i).variable(s)))});const r=Array.isArray(t)?t[n].tensor:t[e];if(null==r)return;const a=this.accumulatedGrads[n].variable,o=this.accumulatedUpdates[n].variable;ED((()=>{const t=VL(GL(a,this.rho),GL(WL(r),1-this.rho)),e=GL(YL(HL(VL(o,this.epsilon)),HL(VL(a,this.epsilon))),r),n=VL(GL(o,this.rho),GL(WL(e),1-this.rho));a.assign(t),o.assign(n);const s=VL(GL(e,-this.learningRate),i);i.assign(s)}))})),this.incrementIterations()}dispose(){null!=this.accumulatedUpdates&&(bD(this.accumulatedGrads.map((t=>t.variable))),bD(this.accumulatedUpdates.map((t=>t.variable))))}async getWeights(){const t=[...this.accumulatedGrads,...this.accumulatedUpdates];return[await this.saveIterations()].concat(t.map((t=>({name:t.originalName,tensor:t.variable}))))}async setWeights(t){const e=(t=await this.extractIterations(t)).length/2,n=!1;this.accumulatedGrads=t.slice(0,e).map((t=>({originalName:t.name,variable:t.tensor.variable(n)}))),this.accumulatedUpdates=t.slice(e,2*e).map((t=>({originalName:t.name,variable:t.tensor.variable(n)})))}getConfig(){return{learningRate:this.learningRate,rho:this.rho,epsilon:this.epsilon}}static fromConfig(t,e){return new t(e.learningRate,e.rho,e.epsilon)}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function uF(t,e,n){ZO(t);const i={shape:t,value:e,dtype:n=n||GO(e)};return jk.runKernel(TM,{},i)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class hF extends oF{static get className(){return"Adagrad"}constructor(t,e=.1){super(),this.learningRate=t,this.initialAccumulatorValue=e,this.accumulatedGrads=[]}applyGradients(t){(Array.isArray(t)?t.map((t=>t.name)):Object.keys(t)).forEach(((e,n)=>{const i=jk.registeredVariables[e];if(null==this.accumulatedGrads[n]){const t=!1;this.accumulatedGrads[n]={originalName:`${e}/accumulator`,variable:ED((()=>uF(i.shape,this.initialAccumulatorValue).variable(t)))}}const s=Array.isArray(t)?t[n].tensor:t[e];if(null==s)return;const r=this.accumulatedGrads[n].variable;ED((()=>{const t=VL(r,WL(s));r.assign(t);const e=VL(GL(YL(s,HL(VL(t,jk.backend.epsilon()))),-this.learningRate),i);i.assign(e)}))})),this.incrementIterations()}dispose(){null!=this.accumulatedGrads&&bD(this.accumulatedGrads.map((t=>t.variable)))}async getWeights(){return[await this.saveIterations()].concat(this.accumulatedGrads.map((t=>({name:t.originalName,tensor:t.variable}))))}async setWeights(t){t=await this.extractIterations(t);this.accumulatedGrads=t.map((t=>({originalName:t.name,variable:t.tensor.variable(false)})))}getConfig(){return{learningRate:this.learningRate,initialAccumulatorValue:this.initialAccumulatorValue}}static fromConfig(t,e){return new t(e.learningRate,e.initialAccumulatorValue)}}const pF=oD({pow_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){let n=sD(t,"base","pow"),i=sD(e,"exp","pow");[n,i]=Bk(n,i);const s={a:n,b:i};return jk.runKernel(TC,s)}});const cF=oD({sub_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){let n=sD(t,"a","sub"),i=sD(e,"b","sub");[n,i]=Bk(n,i);const s={a:n,b:i};return jk.runKernel(pN,s)}}); +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class dF extends oF{static get className(){return"Adam"}constructor(t,e,n,i=null){super(),this.learningRate=t,this.beta1=e,this.beta2=n,this.epsilon=i,this.accumulatedFirstMoment=[],this.accumulatedSecondMoment=[],ED((()=>{this.accBeta1=tF(e).variable(),this.accBeta2=tF(n).variable()})),null==i&&(this.epsilon=jk.backend.epsilon())}applyGradients(t){const e=Array.isArray(t)?t.map((t=>t.name)):Object.keys(t);ED((()=>{const n=cF(1,this.accBeta1),i=cF(1,this.accBeta2);e.forEach(((e,s)=>{const r=jk.registeredVariables[e],a=!1;null==this.accumulatedFirstMoment[s]&&(this.accumulatedFirstMoment[s]={originalName:`${e}/m`,variable:ED((()=>zL(r).variable(a)))}),null==this.accumulatedSecondMoment[s]&&(this.accumulatedSecondMoment[s]={originalName:`${e}/v`,variable:ED((()=>zL(r).variable(a)))});const o=Array.isArray(t)?t[s].tensor:t[e];if(null==o)return;const l=this.accumulatedFirstMoment[s].variable,u=this.accumulatedSecondMoment[s].variable,h=VL(GL(l,this.beta1),GL(o,1-this.beta1)),p=VL(GL(u,this.beta2),GL(WL(o),1-this.beta2)),c=YL(h,n),d=YL(p,i);l.assign(h),u.assign(p);const f=VL(GL(YL(c,VL(HL(d),this.epsilon)),-this.learningRate),r);r.assign(f)})),this.accBeta1.assign(GL(this.accBeta1,this.beta1)),this.accBeta2.assign(GL(this.accBeta2,this.beta2))})),this.incrementIterations()}dispose(){this.accBeta1.dispose(),this.accBeta2.dispose(),null!=this.accumulatedFirstMoment&&bD(this.accumulatedFirstMoment.map((t=>t.variable))),null!=this.accumulatedSecondMoment&&bD(this.accumulatedSecondMoment.map((t=>t.variable)))}async getWeights(){const t=[...this.accumulatedFirstMoment,...this.accumulatedSecondMoment];return[await this.saveIterations()].concat(t.map((t=>({name:t.originalName,tensor:t.variable}))))}async setWeights(t){t=await this.extractIterations(t),ED((()=>{this.accBeta1.assign(pF(this.beta1,this.iterations_+1)),this.accBeta2.assign(pF(this.beta2,this.iterations_+1))}));const e=t.length/2,n=!1;this.accumulatedFirstMoment=t.slice(0,e).map((t=>({originalName:t.name,variable:t.tensor.variable(n)}))),this.accumulatedSecondMoment=t.slice(e,2*e).map((t=>({originalName:t.name,variable:t.tensor.variable(n)})))}getConfig(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon}}static fromConfig(t,e){return new t(e.learningRate,e.beta1,e.beta2,e.epsilon)}}const fF=oD({abs_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e=sD(t,"x","abs");if("complex64"===e.dtype){const t={x:e};return jk.runKernel(BA,t)}{const t={x:e};return jk.runKernel(pA,t)}}}); +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function mF(t,e){const n=t.length,i=[];for(let s=0;s1&&1===a&&i.unshift(r)}return i}function gF(t,e){const n=[];for(let i=0;i1)&&n.unshift(r)}return n}function _F(t,e){const n=Math.max(t.length,e.length),i=new Array(n);for(let s=0;s{this.iteration=tF(0).variable(),this.accBeta1=tF(e).variable()})),null==i&&(this.epsilon=jk.backend.epsilon())}applyGradients(t){const e=Array.isArray(t)?t.map((t=>t.name)):Object.keys(t);ED((()=>{const n=cF(1,this.accBeta1),i=YL(-this.learningRate,VL(GL(this.iteration,this.decay),1));e.forEach(((e,s)=>{const r=jk.registeredVariables[e],a=!1;null==this.accumulatedFirstMoment[s]&&(this.accumulatedFirstMoment[s]={originalName:`${e}/m`,variable:zL(r).variable(a)}),null==this.accumulatedWeightedInfNorm[s]&&(this.accumulatedWeightedInfNorm[s]={originalName:`${e}/v`,variable:zL(r).variable(a)});const o=Array.isArray(t)?t[s].tensor:t[e];if(null==o)return;const l=this.accumulatedFirstMoment[s].variable,u=this.accumulatedWeightedInfNorm[s].variable,h=VL(GL(l,this.beta1),GL(o,1-this.beta1)),p=GL(u,this.beta2),c=fF(o),d=TF(p,c);l.assign(h),u.assign(d);const f=VL(GL(YL(i,n),YL(h,VL(d,this.epsilon))),r);r.assign(f)})),this.iteration.assign(VL(this.iteration,1)),this.accBeta1.assign(GL(this.accBeta1,this.beta1))})),this.incrementIterations()}dispose(){this.accBeta1.dispose(),this.iteration.dispose(),null!=this.accumulatedFirstMoment&&bD(this.accumulatedFirstMoment.map((t=>t.variable))),null!=this.accumulatedWeightedInfNorm&&bD(this.accumulatedWeightedInfNorm.map((t=>t.variable)))}async getWeights(){throw new Error("getWeights() is not implemented for Adamax yet.")}async setWeights(t){throw new Error("setWeights() is not implemented for Adamax yet.")}getConfig(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon,decay:this.decay}}static fromConfig(t,e){return new t(e.learningRate,e.beta1,e.beta2,e.epsilon,e.decay)}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class IF extends oF{static get className(){return"SGD"}constructor(t){super(),this.learningRate=t,this.setLearningRate(t)}applyGradients(t){(Array.isArray(t)?t.map((t=>t.name)):Object.keys(t)).forEach(((e,n)=>{const i=Array.isArray(t)?t[n].tensor:t[e];if(null==i)return;const s=jk.registeredVariables[e];ED((()=>{const t=VL(GL(this.c,i),s);s.assign(t)}))})),this.incrementIterations()}setLearningRate(t){this.learningRate=t,null!=this.c&&this.c.dispose(),this.c=vD(tF(-t))}dispose(){this.c.dispose()}async getWeights(){return[await this.saveIterations()]}async setWeights(t){if(0!==(t=await this.extractIterations(t)).length)throw new Error("SGD optimizer does not have settable weights.")}getConfig(){return{learningRate:this.learningRate}}static fromConfig(t,e){return new t(e.learningRate)}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class EF extends IF{static get className(){return"Momentum"}constructor(t,e,n=!1){super(t),this.learningRate=t,this.momentum=e,this.useNesterov=n,this.accumulations=[],this.m=tF(this.momentum)}applyGradients(t){(Array.isArray(t)?t.map((t=>t.name)):Object.keys(t)).forEach(((e,n)=>{const i=jk.registeredVariables[e];if(null==this.accumulations[n]){const t=!1;this.accumulations[n]={originalName:`${e}/momentum`,variable:ED((()=>zL(i).variable(t)))}}const s=this.accumulations[n].variable,r=Array.isArray(t)?t[n].tensor:t[e];null!=r&&ED((()=>{let t;const e=VL(GL(this.m,s),r);t=this.useNesterov?VL(GL(this.c,VL(r,GL(e,this.m))),i):VL(GL(this.c,e),i),s.assign(e),i.assign(t)}))})),this.incrementIterations()}dispose(){this.m.dispose(),null!=this.accumulations&&bD(this.accumulations.map((t=>t.variable)))}setMomentum(t){this.momentum=t}async getWeights(){return[await this.saveIterations()].concat(this.accumulations.map((t=>({name:t.originalName,tensor:t.variable}))))}async setWeights(t){t=await this.extractIterations(t);this.accumulations=t.map((t=>({originalName:t.name,variable:t.tensor.variable(false)})))}getConfig(){return{learningRate:this.learningRate,momentum:this.momentum,useNesterov:this.useNesterov}}static fromConfig(t,e){return new t(e.learningRate,e.momentum,e.useNesterov)}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class bF extends oF{static get className(){return"RMSProp"}constructor(t,e=.9,n=0,i=null,s=!1){if(super(),this.learningRate=t,this.decay=e,this.momentum=n,this.epsilon=i,this.accumulatedMeanSquares=[],this.accumulatedMoments=[],this.accumulatedMeanGrads=[],this.centered=s,null==i&&(this.epsilon=jk.backend.epsilon()),null==t)throw new Error("learningRate for RMSPropOptimizer must be defined.")}applyGradients(t){(Array.isArray(t)?t.map((t=>t.name)):Object.keys(t)).forEach(((e,n)=>{const i=jk.registeredVariables[e],s=!1;null==this.accumulatedMeanSquares[n]&&(this.accumulatedMeanSquares[n]={originalName:`${e}/rms`,variable:ED((()=>zL(i).variable(s)))}),null==this.accumulatedMoments[n]&&(this.accumulatedMoments[n]={originalName:`${e}/momentum`,variable:ED((()=>zL(i).variable(s)))}),null==this.accumulatedMeanGrads[n]&&this.centered&&(this.accumulatedMeanGrads[n]={originalName:`${e}/mg`,variable:ED((()=>zL(i).variable(s)))});const r=Array.isArray(t)?t[n].tensor:t[e];if(null==r)return;const a=this.accumulatedMeanSquares[n].variable,o=this.accumulatedMoments[n].variable;ED((()=>{const t=VL(GL(a,this.decay),GL(WL(r),1-this.decay));if(this.centered){const e=this.accumulatedMeanGrads[n].variable,s=VL(GL(e,this.decay),GL(r,1-this.decay)),l=YL(GL(r,this.learningRate),HL(cF(t,VL(WL(s),this.epsilon)))),u=VL(GL(o,this.momentum),l);a.assign(t),e.assign(s),o.assign(u);const h=cF(i,u);i.assign(h)}else{const t=VL(GL(a,this.decay),GL(WL(r),1-this.decay)),e=VL(GL(o,this.momentum),YL(GL(r,this.learningRate),HL(VL(t,this.epsilon))));a.assign(t),o.assign(e);const n=cF(i,e);i.assign(n)}}))})),this.incrementIterations()}dispose(){null!=this.accumulatedMeanSquares&&bD(this.accumulatedMeanSquares.map((t=>t.variable))),null!=this.accumulatedMeanGrads&&this.centered&&bD(this.accumulatedMeanGrads.map((t=>t.variable))),null!=this.accumulatedMoments&&bD(this.accumulatedMoments.map((t=>t.variable)))}async getWeights(){const t=[...this.accumulatedMeanSquares,...this.accumulatedMoments];return this.centered&&t.push(...this.accumulatedMeanGrads),[await this.saveIterations()].concat(t.map((t=>({name:t.originalName,tensor:t.variable}))))}async setWeights(t){t=await this.extractIterations(t);const e=this.centered?t.length/3:t.length/2,n=!1;this.accumulatedMeanSquares=t.slice(0,e).map((t=>({originalName:t.name,variable:t.tensor.variable(n)}))),this.accumulatedMoments=t.slice(e,2*e).map((t=>({originalName:t.name,variable:t.tensor.variable(n)}))),this.centered&&(this.accumulatedMeanGrads=t.slice(2*e,3*e).map((t=>({originalName:t.name,variable:t.tensor.variable(n)}))))}getConfig(){return{learningRate:this.learningRate,decay:this.decay,momentum:this.momentum,epsilon:this.epsilon,centered:this.centered}}static fromConfig(t,e){return new t(e.learningRate,e.decay,e.momentum,e.epsilon,e.centered)}} +/** + * @license + * Copyright 2022 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const vF=[lF,hF,dF,yF,EF,bF,IF];function wF(t){return new Promise((t=>setTimeout(t))).then(t)}class SF{constructor(t){if(!aA().getBool("IS_BROWSER"))throw new Error("browserDownloads() cannot proceed because the current environment is not a browser.");t.startsWith(SF.URL_SCHEME)&&(t=t.slice(SF.URL_SCHEME.length)),null!=t&&0!==t.length||(t="model"),this.modelJsonFileName=t+".json",this.weightDataFileName=t+".weights.bin"}async save(t){if("undefined"==typeof document)throw new Error("Browser downloads are not supported in this environment since `document` is not present");const e=cD.join(t.weightData),n=window.URL.createObjectURL(new Blob([e],{type:"application/octet-stream"}));if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");{const e=XD(t,[{paths:["./"+this.weightDataFileName],weights:t.weightSpecs}]),i=window.URL.createObjectURL(new Blob([JSON.stringify(e)],{type:"application/json"})),s=null==this.modelJsonAnchor?document.createElement("a"):this.modelJsonAnchor;if(s.download=this.modelJsonFileName,s.href=i,await wF((()=>s.dispatchEvent(new MouseEvent("click")))),null!=t.weightData){const t=null==this.weightDataAnchor?document.createElement("a"):this.weightDataAnchor;t.download=this.weightDataFileName,t.href=n,await wF((()=>t.dispatchEvent(new MouseEvent("click"))))}return{modelArtifactsInfo:KD(t)}}}}SF.URL_SCHEME="downloads://";class xF{constructor(t){if(null==t||t.length<1)throw new Error(`When calling browserFiles, at least 1 file is required, but received ${t}`);this.jsonFile=t[0],this.weightsFiles=t.slice(1)}async load(){return new Promise(((t,e)=>{const n=new FileReader;n.onload=n=>{const i=JSON.parse(n.target.result),s=i.modelTopology;if(null==s)return void e(new Error(`modelTopology field is missing from file ${this.jsonFile.name}`));if(null==i.weightsManifest)return void e(new Error(`weightManifest field is missing from file ${this.jsonFile.name}`));if(0===this.weightsFiles.length)return void t({modelTopology:s});const r=qD(i,(t=>this.loadWeights(t)));t(r)},n.onerror=t=>e(`Failed to read model topology and weights manifest JSON from file '${this.jsonFile.name}'. BrowserFiles supports loading Keras-style tf.Model artifacts only.`),n.readAsText(this.jsonFile)}))}loadWeights(t){const e=[],n=[];for(const i of t)e.push(...i.weights),n.push(...i.paths);const i=this.checkManifestAndWeightFiles(t),s=n.map((t=>this.loadWeightsFile(t,i[t])));return Promise.all(s).then((t=>[e,t]))}loadWeightsFile(t,e){return new Promise(((n,i)=>{const s=new FileReader;s.onload=t=>{const e=t.target.result;n(e)},s.onerror=e=>i(`Failed to weights data from file of path '${t}'.`),s.readAsArrayBuffer(e)}))}checkManifestAndWeightFiles(t){const e=[],n=this.weightsFiles.map((t=>zD(t.name))),i={};for(const s of t)s.paths.forEach((t=>{const s=zD(t);if(-1!==e.indexOf(s))throw new Error(`Duplicate file basename found in weights manifest: '${s}'`);if(e.push(s),-1===n.indexOf(s))throw new Error(`Weight file with basename '${s}' is not provided.`);i[t]=this.weightsFiles[n.indexOf(s)]}));if(e.length!==this.weightsFiles.length)throw new Error(`Mismatch in the number of files in weights manifest (${e.length}) and the number of weight files provided (${this.weightsFiles.length}).`);return i}}function RF(t){return new xF(t)} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function OF(t,e,n,i){!function(t){_O(null!=t&&Array.isArray(t)&&t.length>0,(()=>"promises must be a none empty array"))}(t),function(t,e){_O(t>=0&&t<=1,(()=>`Progress fraction must be in range [0, 1], but got startFraction ${t}`)),_O(e>=0&&e<=1,(()=>`Progress fraction must be in range [0, 1], but got endFraction ${e}`)),_O(e>=t,(()=>`startFraction must be no more than endFraction, but got startFraction ${t} and endFraction ${e}`))}(n=null==n?0:n,i=null==i?1:i);let s=0;return Promise.all(t.map((r=>(r.then((r=>{const a=n+ ++s/t.length*(i-n);return e(a),r})),r))))} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +async function AF(t,e){null==e&&(e={});const n=null==e.fetchFunc?aA().platform.fetch:e.fetchFunc,i=t.map((t=>n(t,e.requestInit,{isBinary:!0}))),s=(null==e.onProgress?await Promise.all(i):await OF(i,e.onProgress,0,.5)).map((t=>t.arrayBuffer()));return null==e.onProgress?await Promise.all(s):await OF(s,e.onProgress,.5,1)}async function MF(t,e="",n,i){return CF((t=>AF(t,{requestInit:i})))(t,e,n)}function CF(t){return async(e,n="",i)=>{const s=e.map((()=>!1)),r={},a=null!=i?i.map((()=>!1)):[],o=[];if(e.forEach(((t,e)=>{let n=0;t.weights.forEach((t=>{const l="quantization"in t?t.quantization.dtype:t.dtype,u=pD[l]*IO(t.shape),h=()=>{s[e]=!0,null==r[e]&&(r[e]=[]),r[e].push({manifestEntry:t,groupOffset:n,sizeBytes:u})};null!=i?i.forEach(((e,n)=>{e===t.name&&(h(),a[n]=!0)})):h(),o.push(t.name),n+=u}))})),!a.every((t=>t))){const t=i.filter(((t,e)=>!a[e]));throw new Error(`Could not find weights in manifest with names: ${t.join(", ")}. \nManifest JSON has weights with names: ${o.join(", ")}.`)}const l=s.reduce(((t,e,n)=>(e&&t.push(n),t)),[]),u=[];l.forEach((t=>{e[t].paths.forEach((t=>{const e=n+(n.endsWith("/")?"":"/")+t;u.push(e)}))}));const h=await t(u),p={};let c=0;return l.forEach((t=>{const n=e[t].paths.length,i=new cD(h.slice(c,c+n));r[t].forEach((t=>{const e=FD(i.slice(t.groupOffset,t.groupOffset+t.sizeBytes),[t.manifestEntry]);for(const t in e)p[t]=e[t]})),c+=n})),p}}JD.registerSaveRouter((t=>aA().getBool("IS_BROWSER")&&!Array.isArray(t)&&t.startsWith(SF.URL_SCHEME)?function(t="model"){return new SF(t)}(t.slice(SF.URL_SCHEME.length)):null));class NF{constructor(t,e){if(this.DEFAULT_METHOD="POST",null==e&&(e={}),this.weightPathPrefix=e.weightPathPrefix,this.weightUrlConverter=e.weightUrlConverter,null!=e.fetchFunc?(_O("function"==typeof e.fetchFunc,(()=>"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)")),this.fetch=e.fetchFunc):this.fetch=aA().platform.fetch,_O(null!=t&&t.length>0,(()=>"URL path for http must not be null, undefined or empty.")),Array.isArray(t)&&_O(2===t.length,(()=>`URL paths for http must have a length of 2, (actual length is ${t.length}).`)),this.path=t,null!=e.requestInit&&null!=e.requestInit.body)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=e.requestInit||{},this.loadOptions=e}async save(t){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");const e=Object.assign({method:this.DEFAULT_METHOD},this.requestInit);e.body=new FormData;const n=XD(t,[{paths:["./model.weights.bin"],weights:t.weightSpecs}]);if(e.body.append("model.json",new Blob([JSON.stringify(n)],{type:"application/json"}),"model.json"),null!=t.weightData){const n=cD.join(t.weightData);e.body.append("model.weights.bin",new Blob([n],{type:"application/octet-stream"}),"model.weights.bin")}const i=await this.fetch(this.path,e);if(i.ok)return{modelArtifactsInfo:KD(t),responses:[i]};throw new Error(`BrowserHTTPRequest.save() failed due to HTTP response status ${i.status}.`)}async loadModelJSON(){const t=await this.fetch(this.path,this.requestInit);if(!t.ok)throw new Error(`Request to ${this.path} failed with status code ${t.status}. Please verify this URL points to the model JSON of the model to load.`);let e;try{e=await t.json()}catch(t){let e=`Failed to parse model JSON of response from ${this.path}.`;throw this.path.endsWith(".pb")?e+=" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.":e+=" Please make sure the server is serving valid JSON for this request.",new Error(e)}const n=e.modelTopology,i=e.weightsManifest;if(null==n&&null==i)throw new Error(`The JSON from HTTP path ${this.path} contains neither model topology or manifest for weights.`);return e}async load(){if(this.loadOptions.streamWeights)return this.loadStream();return qD(await this.loadModelJSON(),(t=>this.loadWeights(t)))}async loadStream(){const t=await this.loadModelJSON(),e=await this.getWeightUrls(t.weightsManifest),n=QD(t.weightsManifest);return Object.assign(Object.assign({},t),{weightSpecs:n,getWeightStream:()=>function(t,e){var n;const i=null==e.fetchFunc?aA().platform.fetch:e.fetchFunc;let s,r=0;return null===(n=e.onProgress)||void 0===n||n.call(e,0),new ReadableStream({pull:async n=>{for(var a;re?t.substring(n):"";return[i+"/",s]}(e),s=this.weightPathPrefix||n,r=[],a=[];for(const e of t)for(const t of e.paths)null!=this.weightUrlConverter?a.push(this.weightUrlConverter(t)):r.push(s+t+i);return this.weightUrlConverter&&r.push(...await Promise.all(a)),r}async loadWeights(t){const e=await this.getWeightUrls(t);return[QD(t),await AF(e,this.loadOptions)]}}function kF(t){return null!=t.match(NF.URL_SCHEME_REGEX)}NF.URL_SCHEME_REGEX=/^https?:\/\//;const DF=(t,e)=>{if("undefined"==typeof fetch&&(null==e||null==e.fetchFunc))return null;{let n=!0;if(n=Array.isArray(t)?t.every((t=>kF(t))):kF(t),n)return LF(t,e)}return null};function LF(t,e){return new NF(t,e)}function FF(t,e){return LF(t,e)}JD.registerSaveRouter(DF),JD.registerLoadRouter(DF); +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class PF{constructor(t){this.modelArtifacts=t}load(){return this.modelArtifacts}}class $F{constructor(t){this.saveHandler=t}save(t){return this.saveHandler(t)}}class BF{constructor(t){t.load&&(this.load=()=>Promise.resolve(t.load())),t.save&&(this.save=e=>Promise.resolve(t.save(e)))}}function VF(t,e,n,i){return new BF(UF(...arguments))}function UF(t,e,n,i){if(1===arguments.length){return null!=t.modelTopology||null!=t.weightSpecs?new PF(t):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new PF({modelTopology:t}))}return console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new PF({modelTopology:t,weightSpecs:e,weightData:n,trainingConfig:i})}function YF(t){return new $F(t)}function GF(t){return new $F(t)}const HF=oD({matMul_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n=!1,i=!1){let s=sD(t,"a","matMul"),r=sD(e,"b","matMul");[s,r]=Bk(s,r);const a={a:s,b:r},o={transposeA:n,transposeB:i};return jk.runKernel(AA,a,o)}});const WF=oD({oneHot_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n=1,i=0,s="int32"){if(e<2)throw new Error(`Error in oneHot: depth must be >=2, but it is ${e}`);const r={indices:sD(t,"indices","oneHot","int32")},a={dtype:s,depth:e,onValue:n,offValue:i};return jk.runKernel(fC,r,a)}});const zF=oD({imag_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={input:sD(t,"input","imag")};return jk.runKernel(AM,e)}});const XF=oD({neg_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","neg")};return jk.runKernel(lC,e)}});const jF=oD({real_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={input:sD(t,"input","real")};return jk.runKernel(SC,e)}});const qF=oD({transpose_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"x","transpose");if(null==e&&(e=i.shape.map(((t,e)=>e)).reverse()),_O(i.rank===e.length,(()=>`Error in transpose: rank of input ${i.rank} must match length of perm ${e}.`)),e.forEach((t=>{_O(t>=0&&t"All entries in 'perm' must be between 0 and "+(i.rank-1)+` but got ${e}`))})),i.rank<=1)return i.clone();const s={x:i},r={perm:e};return"complex64"===i.dtype?ED((()=>{let t=jF(i),e=zF(i);return t=jk.runKernel(_N,{x:t},r),e=jk.runKernel(_N,{x:e},r),n&&(e=XF(e)),lD(t,e)})):jk.runKernel(_N,s,r)}});const KF=oD({confusionMatrix_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"labels","confusionMatrix"),s=sD(e,"predictions","confusionMatrix");_O(null==n||n>0&&Number.isInteger(n),(()=>`If provided, numClasses must be a positive integer, but got ${n}`)),_O(1===i.rank,(()=>`Expected the rank of labels to be 1, but got ${i.rank}`)),_O(1===s.rank,(()=>`Expected the rank of predictions to be 1, but got ${s.rank}`)),_O(i.shape[0]===s.shape[0],(()=>`Mismatch in the number of examples: ${i.shape[0]} vs. ${s.shape[0]}. Labels and predictions should have the same number of elements.`)),_O(n>0&&Number.isInteger(n),(()=>`numClasses is required to be a positive integer, but got ${n}`));const r=WF(PL(i,"int32"),n),a=WF(PL(s,"int32"),n),o=qF(r),l=HF(o,a);return PL(l,"int32")}}); +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function QF(t,e,n){if(yO(t),null!=e&&3!==e.length)throw new Error("tensor3d() requires shape to have three numbers");const i=eD(t,n);if(3!==i.length&&1!==i.length)throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");if(1===i.length&&null==e)throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");return uD(t,e,i,n)} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +let JF,ZF=!1;function tP(t,e=3){if(e>4)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");if(null==t)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");let n=!1,i=!1,s=!1,r=!1,a=!1,o=!1;if(t.data instanceof Uint8Array)n=!0;else if("undefined"!=typeof ImageData&&t instanceof ImageData)i=!0;else if("undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement)s=!0;else if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement)r=!0;else if(null!=t.getContext)a=!0;else{if(!("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap))throw new Error(`pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement, ImageData in browser, or OffscreenCanvas, ImageData in webworker or {data: Uint32Array, width: number, height: number}, but was ${t.constructor.name}`);o=!0}if(null!=kN(wN,jk.backendName)){const n={pixels:t},i={numChannels:e};return jk.runKernel(wN,n,i)}const[l,u]=s?[t.videoWidth,t.videoHeight]:[t.width,t.height];let h,p;if(a)h=t.getContext("2d").getImageData(0,0,l,u).data;else if(i||n)h=t.data;else if(r||s||o){if(null==JF)if("undefined"==typeof document){if("undefined"==typeof OffscreenCanvas||"undefined"==typeof OffscreenCanvasRenderingContext2D)throw new Error("Cannot parse input in current context. Reason: OffscreenCanvas Context2D rendering is not supported.");JF=new OffscreenCanvas(1,1).getContext("2d")}else JF=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});JF.canvas.width=l,JF.canvas.height=u,JF.drawImage(t,0,0,l,u),h=JF.getImageData(0,0,l,u).data}if(4===e)p=new Int32Array(h);else{const t=l*u;p=new Int32Array(t*e);for(let n=0;n4||2===e)throw new Error(`toPixels only supports depth of size 1, 3 or 4 but got ${e}`);if("float32"!==t.dtype&&"int32"!==t.dtype)throw new Error(`Unsupported type for toPixels: ${t.dtype}. Please use float32 or int32 tensors.`)}async function sP(t,e){let n=sD(t,"img","toPixels");if(!(t instanceof xk)){const t=n;n=PL(t,"int32"),t.dispose()}iP(n);const[i,s]=n.shape.slice(0,2),r=2===n.rank?1:n.shape[2],a=await n.data(),o="float32"===n.dtype?255:1,l=new Uint8ClampedArray(s*i*4);for(let t=0;t1)throw new Error(`Tensor values for a float32 Tensor must be in the range [0 - 1] but encountered ${s}.`)}else if("int32"===n.dtype&&(s<0||s>255))throw new Error(`Tensor values for a int32 Tensor must be in the range [0 - 255] but encountered ${s}.`);1===r?(e[0]=s*o,e[1]=s*o,e[2]=s*o):e[i]=s*o}const i=4*t;l[i+0]=Math.round(e[0]),l[i+1]=Math.round(e[1]),l[i+2]=Math.round(e[2]),l[i+3]=Math.round(e[3])}if(null!=e){if(!ZF){null!=kN(oM,jk.backendName)&&(console.warn("tf.browser.toPixels is not efficient to draw tensor on canvas. Please try tf.browser.draw instead."),ZF=!0)}e.width=s,e.height=i;const t=e.getContext("2d"),n=new ImageData(l,s,i);t.putImageData(n,0,0)}return n!==t&&n.dispose(),l}function rP(t,e,n){let i=sD(t,"img","draw");if(!(t instanceof xk)){const t=i;i=PL(t,"int32"),t.dispose()}iP(i),function(t){const e=(null==t?void 0:t.alpha)||1;if(e>1||e<0)throw new Error(`Alpha value ${e} is suppoed to be in range [0 - 1].`)}(null==n?void 0:n.imageOptions);const s={image:i},r={canvas:e,options:n};jk.runKernel(oM,s,r)}const aP=oD({fromPixels_:tP});function oP(t,e){const n=t.shape.length,i=e.shape.length;if(n<1)throw new Error(`tf.gatherND() expects the input to be rank 1 or higher, but the rank was ${n}.`);if(i<1)throw new Error(`tf.gatherND() expects the indices to be rank 1 or higher, but the rank was ${i}.`);if("int32"!==e.dtype)throw new Error(`tf.gatherND() expects the indices to be int32 type, but the dtype was ${e.dtype}.`);if(e.shape[i-1]>n)throw new Error(`index innermost dimension length must be <= tensor rank; saw: ${e.shape[i-1]} vs. ${n}`);if(0===IO(t.shape))throw new Error(`Requested more than 0 entries, but input is empty. Input shape: ${t.shape}.`);const s=e.shape,r=s[s.length-1];let a=1;for(let t=0;tt/u)),1].slice(0,r);return[l,a,u,h]}function lP(t,e,n){const i=e.rank>1?e.shape[e.rank-1]:1,s=e.rank>1?e.rank-1:1,r=`Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: ${n.shape}, indices.shape: ${e.shape}, shape: ${t}, sliceDim: ${i}, and batchDim: ${s}.`;if(n.rank1?e.shape[i-1]:1,r=n.length;let a=1;for(let t=s;t`Error in slice${i}D: Length of begin ${e} must match the rank of the array (${i}).`)),_O(i===n.length,(()=>`Error in slice${i}D: Length of size ${n} must match the rank of the array (${i}).`));for(let s=0;s`Error in slice${i}D: begin[${s}] + size[${s}] (${e[s]+n[s]}) would overflow input.shape[${s}] (${t.shape[s]})`))}function fP(t){const e=[];let n=0;for(;t>0;)1&t&&e.push(n),t/=2,n++;return e}function mP(t,e,n){const i=[];for(let s=0;s0){const l=e[0],u=n+1;h=IP(a,l,u,i,t),p=EP(o,l,u,s,t),c=gP(r,l,u,t)}else for(let e=0;e-1)r[s]=0;else{const a=_P(e,n,s);let o=i[a];t&1<-1)r[s]=Number.MAX_SAFE_INTEGER;else{const a=_P(e,n,s);let o=i[a];t&1<0?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER);const l=i[s];return a<0&&(a+=l),a=pO(0,a,l-1),a}function wP(t,e,n,i,s,r){let a=e[s];const o=n[s]||1;(t&1<0?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER);const l=i[s];return a<0&&(a+=l),a=o>0?pO(0,a,l):pO(-1,a,l-1),a}function SP(t,e,n){let i=n.length;for(let t=0;t1){i=t;break}for(let s=i+1;s0||n[s]!==t[s])return!1;return!0}function xP(t,e){let n=t.length>0?t[t.length-1]:1;for(let i=0;i{_O(-1!==t,(()=>"slice() does not support negative begin indexing."))})),r=null==n?new Array(s).fill(-1):"number"==typeof n?[n,...new Array(s-1).fill(-1)]:n.lengthe>=0?e:(_O(-1===e,(()=>`Negative size values should be exactly -1 but got ${e} for the slice() size at index ${n}.`)),t.shape[n]-i[n]))),[i,r]}function OP(t,e,n,i,s,r,a,o,l){let u;if(null==i?(u=new Array(e.length),u.fill(1)):u=i,null!=a&&a&a-1)throw new Error("Multiple ellipses in slice is not allowed.");let h=!1;const p={dims:u.length,numAddAxisAfterEllipsis:0,begin:e.slice(),end:n.slice(),strides:u.slice(),beginMask:s,endMask:r,ellipsisMask:a,newAxisMask:o,shrinkAxisMask:l};for(let t=0;t0?0:-1,c.strides[e]>0?i:i-1];if(n&&c.strides[e]<=0)throw Error("only stride 1 allowed on non-range indexing.");m=m&&1===c.strides[e];const a=!!(c.beginMask&1<=i)throw Error(`slice index ${c.begin[e]} of dimension ${e} out of bounds.`)}else c.begin[e]=AP(c.begin[e],0,c.strides[e],i,s,r),c.end[e]=AP(c.end[e],1,c.strides[e],i,s,r);const t=1===c.strides[e]&&0===c.begin[e]&&c.end[e]===i;d=d&&t,f=f&&(0===e&&1===c.strides[e]||t)}else d=d&&1===c.strides[e]&&a,f=f&&(0===e&&1===c.strides[e]||a);let o,l=!1;if(c.beginValid&&c.endValid?(o=c.end[e]-c.begin[e],l=!0):n?(o=1,l=!0):a&&i>=0&&(o=c.strides[e]<0?-i:i,l=!0),l){let t;t=0===o||o<0!=c.strides[e]<0?0:Math.trunc(o/c.strides[e])+(o%c.strides[e]!=0?1:0),g.push(t)}else g.push(-1)}for(let t=0;t=0?_.push(g[e]):e===pP&&_.push(1)}return{finalShapeSparse:_.filter(((t,e)=>c.finalShapeGatherIndices[e]!==pP)),finalShape:_,isIdentity:d,sliceDim0:f,isSimpleSlice:m,begin:c.begin,end:c.end,strides:c.strides}}function AP(t,e,n,i,s,r){if(s[e])return n>0?r[e]:r[e+1&1];{const e=t<0?i+t:t;return er[1]?r[1]:e}} +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const MP=.001,CP=.1;function NP(t,e,n){return null==n&&(n=kP()),DP(t,e,((t,e)=>$P(t,e,n)))}function kP(){return 32===jk.backend.floatPrecision()?MP:CP}function DP(t,e,n){let i=!0;if((uk(t)||uk(e))&&(i=!1),uk(t)&&uk(e)&&(i=!0),i){const n=t.constructor.name,i=e.constructor.name;if(n!==i)throw new Error(`Arrays are of different type. Actual: ${n}. Expected: ${i}`)}if(Array.isArray(t)&&Array.isArray(e)){const n=eD(t),i=eD(e);if(!vO(n,i))throw new Error(`Arrays have different shapes. Actual: [${n}]. Expected: [${i}]`)}const s=uk(t)?t:hk(t),r=uk(e)?e:hk(e);if(s.length!==r.length)throw new Error(`Arrays have different lengths actual: ${s.length} vs expected: ${r.length}.\nActual: ${s}.\nExpected: ${r}.`);for(let t=0;te.fail()),(()=>e())),"undefined"!=typeof expect&&expect().nothing()}function FP(t,e){const n="string"==typeof e||"number"==typeof e||"boolean"==typeof e?[e]:e;return VO(t)||VO(t[0])||VO(e)||VO(e[0])?DP(t,n,((t,e)=>t==e)):DP(t,e,((t,e)=>$P(t,e,0)))}function PP(t,e,n){if(null==n&&(n=kP()),!$P(t,e,n))throw new Error(`Numbers differ: actual === ${t}, expected === ${e}`);"undefined"!=typeof expect&&expect().nothing()}function $P(t,e,n){return!isFinite(t)&&!isFinite(e)||!(isNaN(t)||isNaN(e)||Math.abs(t-e)>n)}function BP(t,e,n){for(let i=0;in)throw new Error(`Value out of range:${t[i]} low: ${e}, high: ${n}`)}function VP(t,e){const n=new Float32Array(t),i=new Float32Array(e);if(n.length!==i.length)throw new Error(`Expected ArrayBuffer to be of length ${i.length}, but it was ${n.length}`);for(let t=0;t{e.addEventListener("loadeddata",(n=>t(e))),e.load()}))}async function GP(t){await t.play(),"requestVideoFrameCallback"in t&&await new Promise((e=>{t.requestVideoFrameCallback(e)}))} +/** @license See the LICENSE file. */ +const HP="4.22.0"; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class WP{static sgd(t){return new IF(t)}static momentum(t,e,n=!1){return new EF(t,e,n)}static rmsprop(t,e=.9,n=0,i=null,s=!1){return new bF(t,e,n,i,s)}static adam(t=.001,e=.9,n=.999,i=null){return new dF(t,e,n,i)}static adadelta(t=.001,e=.95,n=null){return new lF(t,e,n)}static adamax(t=.002,e=.9,n=.999,i=null,s=0){return new yF(t,e,n,i,s)}static adagrad(t,e=.1){return new hF(t,e)}}const zP=oD({acos_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","acos")};return jk.runKernel(cA,e)}});const XP=oD({acosh_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","acosh")};return jk.runKernel(dA,e)}});const jP=oD({addN_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){_O(Array.isArray(t),(()=>"The argument passed to tf.addN() must be a list of tensors")),_O(t.length>=1,(()=>`Must pass at least one tensor to tf.addN(), but got ${t.length}`));const e=t.map(((t,e)=>sD(t,`tensors${e}`,"addN"))),n=e[0];e.forEach((t=>{if(t.dtype!==n.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")})),e.forEach((t=>{if(!vO(t.shape,n.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")}));const i=e;return jk.runKernel(mA,i)}});const qP=oD({all_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=null,n=!1){const i={x:sD(t,"x","all","bool")},s={axis:e,keepDims:n};return jk.runKernel(gA,i,s)}});const KP=oD({any_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=null,n=!1){const i={x:sD(t,"x","any","bool")},s={axis:e,keepDims:n};return jk.runKernel(_A,i,s)}});const QP=oD({argMax_: +/** + * @license + * Copyright 2020 Google Inc. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=0){const n={x:sD(t,"x","argMax")},i={axis:e};return jk.runKernel(TA,n,i)}});const JP=oD({argMin_: +/** + * @license + * Copyright 2020 Google Inc. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=0){const n={x:sD(t,"x","argMin")},i={axis:e};return jk.runKernel(yA,n,i)}});const ZP=oD({asin_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","asin")};return jk.runKernel(IA,e)}});const t$=oD({asinh_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","asinh")};return jk.runKernel(EA,e)}});const e$=oD({atan_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","atan")};return jk.runKernel(bA,e)}});const n$=oD({atan2_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){let n=sD(t,"a","atan2"),i=sD(e,"b","atan2");[n,i]=Bk(n,i);const s={a:n,b:i};return jk.runKernel(wA,s)}});const i$=oD({atanh_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","atanh")};return jk.runKernel(vA,e)}}); +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function s$(t,e,n,i,s="NHWC",r){return o$(t,[...e,t[3]],n,r,i,null,null,_$(s))}function r$(t,e,n,i,s,r,a="channelsLast"){const[o,l]=h$(e);let u;if("channelsLast"===a)u=[o,l,t[3],t[3]];else{if("channelsFirst"!==a)throw new Error(`Unknown dataFormat ${a}`);u=[o,l,t[1],t[1]]}return o$(t,u,n,i,s,r,!1,a)}function a$(t,e,n,i,s,r,a="NDHWC"){const[o,l,u]=p$(e);let h,p;if("NDHWC"===a)p="channelsLast",h=[o,l,u,t[4],t[4]];else{if("NCDHW"!==a)throw new Error(`Unknown dataFormat ${a}`);p="channelsFirst",h=[o,l,u,t[1],t[1]]}return l$(t,h,n,i,s,!1,p,r)}function o$(t,e,n,i,s,r,a=!1,o="channelsLast"){let[l,u,h,p]=[-1,-1,-1,-1];if("channelsLast"===o)[l,u,h,p]=t;else{if("channelsFirst"!==o)throw new Error(`Unknown dataFormat ${o}`);[l,p,u,h]=t}const[c,d,,f]=e,[m,g]=h$(n),[_,T]=h$(i),y=c$(c,_),I=c$(d,T),{padInfo:E,outHeight:b,outWidth:v}=function(t,e,n,i,s,r,a,o,l){let u,h,p;if("number"==typeof t){u={top:t,bottom:t,left:t,right:t,type:0===t?"VALID":"NUMBER"};const s=function(t,e,n,i,s){null==i&&(i=u$(t,e,n));const r=t[0],a=t[1],o=d$((r-e+2*i)/n+1,s),l=d$((a-e+2*i)/n+1,s);return[o,l]}([e,n],r,i,t,o);h=s[0],p=s[1]}else if("same"===t){h=Math.ceil(e/i),p=Math.ceil(n/s);const t=Math.max(0,(h-1)*i+r-e),o=Math.max(0,(p-1)*s+a-n),l=Math.floor(t/2),c=t-l,d=Math.floor(o/2);u={top:l,bottom:c,left:d,right:o-d,type:"SAME"}}else if("valid"===t)u={top:0,bottom:0,left:0,right:0,type:"VALID"},h=Math.ceil((e-r+1)/i),p=Math.ceil((n-a+1)/s);else{if("object"!=typeof t)throw Error(`Unknown padding parameter: ${t}`);{const c="channelsLast"===l?t[1][0]:t[2][0],d="channelsLast"===l?t[1][1]:t[2][1],f="channelsLast"===l?t[2][0]:t[3][0],m="channelsLast"===l?t[2][1]:t[3][1];u={top:c,bottom:d,left:f,right:m,type:0===c&&0===d&&0===f&&0===m?"VALID":"EXPLICIT"},h=d$((e-r+c+d)/i+1,o),p=d$((n-a+f+m)/s+1,o)}}return{padInfo:u,outHeight:h,outWidth:p}}(s,u,h,m,g,y,I,r,o),w=a?f*p:f;let S;return"channelsFirst"===o?S=[l,w,b,v]:"channelsLast"===o&&(S=[l,b,v,w]),{batchSize:l,dataFormat:o,inHeight:u,inWidth:h,inChannels:p,outHeight:b,outWidth:v,outChannels:w,padInfo:E,strideHeight:m,strideWidth:g,filterHeight:c,filterWidth:d,effectiveFilterHeight:y,effectiveFilterWidth:I,dilationHeight:_,dilationWidth:T,inShape:t,outShape:S,filterShape:e}}function l$(t,e,n,i,s,r=!1,a="channelsLast",o){let[l,u,h,p,c]=[-1,-1,-1,-1,-1];if("channelsLast"===a)[l,u,h,p,c]=t;else{if("channelsFirst"!==a)throw new Error(`Unknown dataFormat ${a}`);[l,c,u,h,p]=t}const[d,f,m,,g]=e,[_,T,y]=p$(n),[I,E,b]=p$(i),v=c$(d,I),w=c$(f,E),S=c$(m,b),{padInfo:x,outDepth:R,outHeight:O,outWidth:A}=function(t,e,n,i,s,r,a,o,l,u,h){let p,c,d,f;"valid"===t&&(t=0);if("number"==typeof t){p={top:t,bottom:t,left:t,right:t,front:t,back:t,type:0===t?"VALID":"NUMBER"};const m=function(t,e,n,i,s,r){null==s&&(s=u$(t,e[0],i[0]));const a=[0,0,0,n];for(let n=0;n<3;n++)t[n]+2*s>=e[n]&&(a[n]=d$((t[n]-e[n]+2*s)/i[n]+1,r));return a}([e,n,i,1],[o,l,u],1,[s,r,a],t,h);c=m[0],d=m[1],f=m[2]}else{if("same"!==t)throw Error(`Unknown padding parameter: ${t}`);{c=Math.ceil(e/s),d=Math.ceil(n/r),f=Math.ceil(i/a);const t=(c-1)*s+o-e,h=(d-1)*r+l-n,m=(f-1)*a+u-i,g=Math.floor(t/2),_=t-g,T=Math.floor(h/2),y=h-T,I=Math.floor(m/2);p={top:T,bottom:y,left:I,right:m-I,front:g,back:_,type:"SAME"}}}return{padInfo:p,outDepth:c,outHeight:d,outWidth:f}}(s,u,h,p,_,T,y,v,w,S,o),M=r?g*c:g;let C;return"channelsFirst"===a?C=[l,M,R,O,A]:"channelsLast"===a&&(C=[l,R,O,A,M]),{batchSize:l,dataFormat:a,inDepth:u,inHeight:h,inWidth:p,inChannels:c,outDepth:R,outHeight:O,outWidth:A,outChannels:M,padInfo:x,strideDepth:_,strideHeight:T,strideWidth:y,filterDepth:d,filterHeight:f,filterWidth:m,effectiveFilterDepth:v,effectiveFilterHeight:w,effectiveFilterWidth:S,dilationDepth:I,dilationHeight:E,dilationWidth:b,inShape:t,outShape:C,filterShape:e}}function u$(t,e,n,i=1){const s=c$(e,i);return Math.floor((t[0]*(n-1)-n+s)/2)}function h$(t){return"number"==typeof t?[t,t,t]:2===t.length?[t[0],t[1],1]:t}function p$(t){return"number"==typeof t?[t,t,t]:t}function c$(t,e){return e<=1?t:t+(t-1)*(e-1)}function d$(t,e){if(!e)return Math.trunc(t);switch(e){case"round":return Math.round(t);case"ceil":return Math.ceil(t);case"floor":return Math.floor(t);default:throw new Error(`Unknown roundingMode ${e}`)}}function f$(t){const[e,n,i]=h$(t);return 1===e&&1===n&&1===i}function m$(t,e){return f$(t)||f$(e)}function g$(t){return h$(t).every((t=>t>0))}function _$(t){if("NHWC"===t)return"channelsLast";if("NCHW"===t)return"channelsFirst";throw new Error(`Unknown dataFormat ${t}`)}function T$(t,e,n){if(null!=n){if("string"==typeof e)throw Error(`Error in ${t}: pad must be an integer when using dimRoundingMode ${n} but got pad ${e}.`);if("number"==typeof e)_O(wO(e),(()=>`Error in ${t}: pad must be an integer when using dimRoundingMode ${n} but got pad ${e}.`));else{if("object"!=typeof e)throw Error(`Error in ${t}: Unknown padding parameter: ${e}`);e.forEach((e=>{e.forEach((e=>{_O(wO(e),(()=>`Error in ${t}: pad must be an integer when using dimRoundingMode ${n} but got pad ${e}.`))}))}))}}}const y$=oD({reshape_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n={x:sD(t,"x","reshape","string_or_numeric")},i={shape:e};return jk.runKernel(OC,n,i)}});const I$=oD({avgPool_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s){const r=sD(t,"x","avgPool","float32");_O(m$(n,1),(()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${n} and dilations '1'`));let a=r,o=!1;3===r.rank&&(o=!0,a=y$(r,[1,r.shape[0],r.shape[1],r.shape[2]])),_O(4===a.rank,(()=>`Error in avgPool: x must be rank 4 but got rank ${a.rank}.`)),T$("avgPool",i,s);const l={x:a},u={filterSize:e,strides:n,pad:i,dimRoundingMode:s};let h=jk.runKernel(SA,l,u);return h=PL(h,r.dtype),o?y$(h,[h.shape[1],h.shape[2],h.shape[3]]):h}});const E$=oD({avgPool3d_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s,r="NDHWC"){const a=sD(t,"x","avgPool3d","float32");let o=a,l=!1;4===a.rank&&(l=!0,o=y$(a,[1,a.shape[0],a.shape[1],a.shape[2],a.shape[3]])),_O(5===o.rank,(()=>`Error in avgPool3d: x must be rank 5 but got rank ${o.rank}.`)),_O("NDHWC"===r,(()=>`Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of ${r}`)),_O("number"==typeof n&&n>0||Array.isArray(n)&&n[0]>0&&n[1]>0&&n[2]>0,(()=>`Error in avgPool3d: Stride must be > 0, but got '${n}'`)),T$("avgPool3d",i,s);const u={x:o},h={filterSize:e,strides:n,pad:i,dimRoundingMode:s,dataFormat:r};let p=jk.runKernel(RA,u,h);return p=PL(p,o.dtype),l?y$(p,[p.shape[1],p.shape[2],p.shape[3],p.shape[4]]):p}});const b$=oD({concat_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=0){_O(t.length>=1,(()=>"Pass at least one tensor to concat"));const n=rD(t,"tensors","concat","string_or_numeric");if("complex64"===n[0].dtype&&n.forEach((t=>{if("complex64"!==t.dtype)throw new Error(`Cannot concatenate complex64 tensors with a tensor\n with dtype ${t.dtype}. `)})),1===n.length)return $L(n[0]);const i=n,s={axis:e};return jk.runKernel(VA,i,s)}});const v$=oD({sigmoid_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","sigmoid","float32")};return jk.runKernel(zC,e)}});const w$=oD({slice_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"x","slice","string_or_numeric");if(0===i.rank)throw new Error("Slicing scalar is not possible");const s={x:i},r={begin:e,size:n};return jk.runKernel(YC,s,r)}});const S$=oD({tanh_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","tanh","float32")};return jk.runKernel(dN,e)}});const x$=oD({basicLSTMCell_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s,r){const a=sD(t,"forgetBias","basicLSTMCell"),o=sD(e,"lstmKernel","basicLSTMCell"),l=sD(n,"lstmBias","basicLSTMCell"),u=sD(i,"data","basicLSTMCell"),h=sD(s,"c","basicLSTMCell"),p=sD(r,"h","basicLSTMCell"),c=b$([u,p],1),d=HF(c,o),f=VL(d,l),m=f.shape[0],g=f.shape[1]/4,_=[m,g],T=w$(f,[0,0],_),y=w$(f,[0,g],_),I=w$(f,[0,2*g],_),E=w$(f,[0,3*g],_),b=VL(GL(v$(T),S$(y)),GL(h,v$(VL(a,I))));return[b,GL(S$(b),v$(E))]}});const R$=oD({batchToSpaceND_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"x","batchToSpaceND"),s=e.reduce(((t,e)=>t*e));_O(i.rank>=1+e.length,(()=>`input rank is ${i.rank} but should be > than blockShape.length ${e.length}`)),_O(n.length===e.length,(()=>`crops.length is ${n.length} but should be equal to blockShape.length ${e.length}`)),_O(i.shape[0]%s==0,(()=>`input tensor batch is ${i.shape[0]} but is not divisible by the product of the elements of blockShape ${e.join(" * ")} === ${s}`));const r={x:i},a={blockShape:e,crops:n};return jk.runKernel(MA,r,a)}});const O$=oD({batchNorm_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s,r){null==r&&(r=.001);const a=sD(t,"x","batchNorm"),o=sD(e,"mean","batchNorm"),l=sD(n,"variance","batchNorm");let u,h;null!=s&&(u=sD(s,"scale","batchNorm")),null!=i&&(h=sD(i,"offset","batchNorm")),_O(o.rank===l.rank,(()=>"Batch normalization gradient requires mean and variance to have equal ranks.")),_O(null==h||o.rank===h.rank,(()=>"Batch normalization gradient requires mean and offset to have equal ranks.")),_O(null==u||o.rank===u.rank,(()=>"Batch normalization gradient requires mean and scale to have equal ranks."));const p={x:function(t){let e;return e=0===t.rank||1===t.rank?y$(t,[1,1,1,t.size]):2===t.rank?y$(t,[1,1,t.shape[0],t.shape[1]]):3===t.rank?y$(t,[1,t.shape[0],t.shape[1],t.shape[2]]):t,e}(a),scale:u,offset:h,mean:o,variance:l},c={varianceEpsilon:r},d=jk.runKernel(bM,p,c);return y$(d,a.shape)}});const A$=oD({batchNorm2d_:function(t,e,n,i,s,r){const a=sD(t,"x","batchNorm"),o=sD(e,"mean","batchNorm"),l=sD(n,"variance","batchNorm");let u,h;return null!=s&&(u=sD(s,"scale","batchNorm")),null!=i&&(h=sD(i,"offset","batchNorm")),_O(2===a.rank,(()=>`Error in batchNorm2D: x must be rank 2 but got rank ${a.rank}.`)),_O(2===o.rank||1===o.rank,(()=>`Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank ${o.rank}.`)),_O(2===l.rank||1===l.rank,(()=>`Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank ${l.rank}.`)),null!=u&&_O(2===u.rank||1===u.rank,(()=>`Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank ${u.rank}.`)),null!=h&&_O(2===h.rank||1===h.rank,(()=>`Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank ${h.rank}.`)),O$(a,o,l,h,u,r)}});const M$=oD({batchNorm3d_:function(t,e,n,i,s,r){const a=sD(t,"x","batchNorm"),o=sD(e,"mean","batchNorm"),l=sD(n,"variance","batchNorm");let u,h;return null!=s&&(u=sD(s,"scale","batchNorm")),null!=i&&(h=sD(i,"offset","batchNorm")),_O(3===a.rank,(()=>`Error in batchNorm3D: x must be rank 3 but got rank ${a.rank}.`)),_O(3===o.rank||1===o.rank,(()=>`Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank ${o.rank}.`)),_O(3===l.rank||1===l.rank,(()=>`Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank ${l.rank}.`)),null!=u&&_O(3===u.rank||1===u.rank,(()=>`Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank ${u.rank}.`)),null!=h&&_O(3===h.rank||1===h.rank,(()=>`Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank ${h.rank}.`)),O$(a,o,l,h,u,r)}});const C$=oD({batchNorm4d_:function(t,e,n,i,s,r){const a=sD(t,"x","batchNorm"),o=sD(e,"mean","batchNorm"),l=sD(n,"variance","batchNorm");let u,h;return null!=s&&(u=sD(s,"scale","batchNorm")),null!=i&&(h=sD(i,"offset","batchNorm")),_O(4===a.rank,(()=>`Error in batchNorm4D: x must be rank 4 but got rank ${a.rank}.`)),_O(4===o.rank||1===o.rank,(()=>`Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank ${o.rank}.`)),_O(4===l.rank||1===l.rank,(()=>`Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank ${l.rank}.`)),null!=u&&_O(4===u.rank||1===u.rank,(()=>`Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank ${u.rank}.`)),null!=h&&_O(4===h.rank||1===h.rank,(()=>`Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank ${h.rank}.`)),O$(a,o,l,h,u,r)}});const N$=oD({bincount_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"x","bincount"),s=sD(e,"weights","bincount");_O("int32"===i.dtype,(()=>`Error in bincount: input dtype must be int32, but got ${i.dtype}`)),_O(n>=0,(()=>`size must be non-negative, but got ${n}.`)),_O(s.size===i.size||0===s.size,(()=>`Error in bincount: weights must have the same size as input or0-length, but got input shape: ${i.shape}, weights shape: ${s.shape}.`));const r={x:i,weights:s},a={size:n};return jk.runKernel(CA,r,a)}});const k$=oD({bitwiseAnd_: +/** + * @license + * Copyright 2023 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"x","bitwiseAnd"),i=sD(e,"y","bitwiseAnd");if(!vO(n.shape,i.shape))throw new Error(`BitwiseAnd: Tensors must have the same shape. x: ${n.shape}, y: ${i.shape}`);if("int32"!==n.dtype||"int32"!==i.dtype)throw new Error(`BitwiseAnd: Only supports 'int32' values in tensor, found type of x: ${n.dtype} and type of y: ${i.dtype}`);const s={a:n,b:i};return jk.runKernel(NA,s)}});const D$=oD({broadcastArgs_: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"s0","broadcastArgs","int32"),i=sD(e,"s1","broadcastArgs","int32");if(1!==n.rank)throw new Error(`broadcastArgs(): first input must be a vector (rank=1). Has rank ${n.rank}`);if(1!==i.rank)throw new Error(`broadcastArgs(): second input must be a vector (rank=1). Has rank ${i.rank}`);const s={s0:n,s1:i};return jk.runKernel(DA,s)}});const L$=oD({broadcastTo_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){let n=sD(t,"broadcastTo","x");const i=n.shape;if(ZO(e),e.lengthn.rank){const t=n.shape.slice();for(;t.length=0;t--)if(s[t]===e[t])r[t]=1;else if(1!==n.shape[t])throw new Error(`broadcastTo(): [${i}] cannot be broadcast to [${e}].`);if(0===r.map(((t,e)=>t>1?e:-1)).filter((t=>t>=0)).length)return $L(n);const a={x:n},o={reps:r};return jk.runKernel(fN,a,o)}});const F$=oD({ceil_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","ceil","float32")};return jk.runKernel(FA,e)}});const P$=oD({clipByValue_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"x","clipByValue");if(_O(e<=n,(()=>`Error in clip: min (${e}) must be less than or equal to max (${n}).`)),e===n)return uF(i.shape,e,i.dtype);const s={x:i},r={clipValueMin:e,clipValueMax:n};return jk.runKernel(PA,s,r)}});const $$=oD({concat1d_:function(t){return b$(t,0)}});const B$=oD({concat2d_:function(t,e){return b$(t,e)}});const V$=oD({concat3d_:function(t,e){return b$(t,e)}});const U$=oD({concat4d_:function(t,e){return b$(t,e)}});const Y$=oD({conv2d_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s="NHWC",r=[1,1],a){const o=sD(t,"x","conv2d","float32"),l=sD(e,"filter","conv2d","float32");let u=o,h=!1;3===o.rank&&(h=!0,u=y$(o,[1,o.shape[0],o.shape[1],o.shape[2]])),_O(4===u.rank,(()=>`Error in conv2d: input must be rank 4, but got rank ${u.rank}.`)),_O(4===l.rank,(()=>`Error in conv2d: filter must be rank 4, but got rank ${l.rank}.`)),T$("conv2d",i,a);const p="NHWC"===s?u.shape[3]:u.shape[1];_O(p===l.shape[2],(()=>`Error in conv2d: depth of input (${p}) must match input depth for filter ${l.shape[2]}.`)),_O(m$(n,r),(()=>`Error in conv2D: Either strides or dilations must be 1. Got strides ${n} and dilations '${r}'`)),_O(g$(r),(()=>"Error in conv2D: Dilated rates should be larger than 0.")),_O(g$(n),(()=>"Error in conv2D: Strides should be larger than 0."));const c={x:u,filter:l},d={strides:n,pad:i,dataFormat:s,dilations:r,dimRoundingMode:a},f=jk.runKernel(UA,c,d);return h?y$(f,[f.shape[1],f.shape[2],f.shape[3]]):f}});const G$=oD({conv1d_:function(t,e,n,i,s="NWC",r=1,a){const o=sD(t,"x","conv1d"),l=sD(e,"filter","conv1d");let u=o,h=!1;2===o.rank&&(h=!0,u=y$(o,[1,o.shape[0],o.shape[1]])),_O(3===u.rank,(()=>`Error in conv1d: input must be rank 3, but got rank ${u.rank}.`)),_O(3===l.rank,(()=>`Error in conv1d: filter must be rank 3, but got rank ${l.rank}.`)),T$("conv1d",i,a),_O(u.shape[2]===l.shape[1],(()=>`Error in conv1d: depth of input (${u.shape[2]}) must match input depth for filter ${l.shape[1]}.`)),_O(m$(n,r),(()=>`Error in conv1D: Either stride or dilation must be 1. Got stride ${n} and dilation '${r}'`)),_O(g$(r),(()=>"Error in conv1D: Dilated rates should be larger than 0.")),_O(g$(n),(()=>"Error in conv1D: Stride should be larger than 0.")),_O("NWC"===s,(()=>`Error in conv1d: got dataFormat of ${s} but only NWC is currently supported.`));const p=y$(l,[1,l.shape[0],l.shape[1],l.shape[2]]),c=y$(u,[u.shape[0],1,u.shape[1],u.shape[2]]),d=Y$(c,p,[1,n],i,"NHWC",[1,r],a);return y$(d,h?[d.shape[2],d.shape[3]]:[d.shape[0],d.shape[2],d.shape[3]])}});const H$=oD({conv2DBackpropInput_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s,r="NHWC",a){_O(t.length===e.rank,(()=>`Length of inShape (${t.length}) and rank of dy (${e.rank}) must match`));let o=t,l=e,u=!1;3===e.rank&&(u=!0,l=y$(e,[1,e.shape[0],e.shape[1],e.shape[2]]),o=[1,t[0],t[1],t[2]]),_O(4===o.length,(()=>`Error in conv2dDerInput: inShape must be length 4, but got length ${o.length}.`)),_O(4===l.rank,(()=>`Error in conv2dDerInput: dy must be rank 4, but got rank ${l.rank}`)),_O(4===n.rank,(()=>`Error in conv2dDerInput: filter must be rank 4, but got rank ${n.rank}`));const h="NHWC"===r?o[3]:o[1],p="NHWC"===r?l.shape[3]:l.shape[1];_O(h===n.shape[2],(()=>`Error in conv2dDerInput: depth of input (${h}) must match input depth for filter ${n.shape[2]}.`)),_O(p===n.shape[3],(()=>`Error in conv2dDerInput: depth of output (${p}) must match output depth for filter ${n.shape[3]}.`)),T$("conv2dDerInput",s,a);const c={dy:l,filter:n},d={strides:i,pad:s,dataFormat:r,dimRoundingMode:a,inputShape:o},f=jk.runKernel(GA,c,d);return u?y$(f,[f.shape[1],f.shape[2],f.shape[3]]):f}});const W$=oD({conv2dTranspose_:function(t,e,n,i,s,r){const a=sD(t,"x","conv2dTranspose"),o=sD(e,"filter","conv2dTranspose");return H$(n,a,o,i,s,"NHWC",r)}});const z$=oD({conv3d_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s="NDHWC",r=[1,1,1]){const a=sD(t,"x","conv3d"),o=sD(e,"filter","conv3d");let l=a,u=!1;4===a.rank&&(u=!0,l=y$(a,[1,a.shape[0],a.shape[1],a.shape[2],a.shape[3]])),_O(5===l.rank,(()=>`Error in conv3d: input must be rank 5, but got rank ${l.rank}.`)),_O(5===o.rank,(()=>`Error in conv3d: filter must be rank 5, but got rank ${o.rank}.`)),_O(l.shape[4]===o.shape[3],(()=>`Error in conv3d: depth of input (${l.shape[4]}) must match input depth for filter ${o.shape[3]}.`)),_O(m$(n,r),(()=>`Error in conv3D: Either strides or dilations must be 1. Got strides ${n} and dilations '${r}'`)),_O("NDHWC"===s,(()=>`Error in conv3d: got dataFormat of ${s} but only NDHWC is currently supported.`)),_O(g$(r),(()=>"Error in conv3D: Dilated rates should be larger than 0.")),_O(g$(n),(()=>"Error in conv3D: Strides should be larger than 0."));const h={x:l,filter:o},p={strides:n,pad:i,dataFormat:s,dilations:r},c=jk.runKernel(HA,h,p);return u?y$(c,[c.shape[1],c.shape[2],c.shape[3],c.shape[4]]):c}});const X$=oD({conv3DBackpropInput_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s){_O(t.length===e.rank,(()=>`Length of inShape (${t.length}) and rank of dy (${e.rank}) must match`));let r=t,a=e,o=!1;4===e.rank&&(o=!0,a=y$(e,[1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]]),r=[1,t[0],t[1],t[2],t[3]]);const l=r[4],u=a.shape[4];_O(5===r.length,(()=>`Error in conv3dDerInput: inShape must be length 5, but got length ${r.length}.`)),_O(5===a.rank,(()=>`Error in conv3dDerInput: dy must be rank 5, but got rank ${a.rank}`)),_O(5===n.rank,(()=>`Error in conv3dDerInput: filter must be rank 5, but got rank ${n.rank}`)),_O(l===n.shape[3],(()=>`Error in conv3dDerInput: depth of input (${l}) must match input depth for filter ${n.shape[3]}.`)),_O(u===n.shape[4],(()=>`Error in conv3dDerInput: depth of output (${u}) must match output depth for filter ${n.shape[4]}.`));const h={dy:a,filter:n},p={pad:s,strides:i,inputShape:r},c=jk.runKernel(zA,h,p);return o?y$(c,[c.shape[1],c.shape[2],c.shape[3],c.shape[4]]):c}});const j$=oD({conv3dTranspose_:function(t,e,n,i,s){const r=sD(t,"x","conv3dTranspose"),a=sD(e,"filter","conv3dTranspose");return X$(n,r,a,i,s)}});const q$=oD({cos_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","cos","float32")};return jk.runKernel(XA,e)}});const K$=oD({cosh_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","cosh","float32")};return jk.runKernel(jA,e)}});const Q$=oD({cumprod_: +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=0,n=!1,i=!1){const s={x:sD(t,"x","cumprod")},r={axis:e,exclusive:n,reverse:i};return jk.runKernel(qA,s,r)}});const J$=oD({cumsum_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=0,n=!1,i=!1){const s={x:sD(t,"x","cumsum")},r={axis:e,exclusive:n,reverse:i};return jk.runKernel(KA,s,r)}});const Z$=oD({denseBincount_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i=!1){const s=sD(t,"x","denseBincount"),r=sD(e,"weights","denseBincount");_O("int32"===s.dtype,(()=>`Error in denseBincount: input dtype must be int32, but got ${s.dtype}`)),_O(s.rank<=2,(()=>`Error in denseBincount: input must be at most rank 2, but got rank ${s.rank}.`)),_O(n>=0,(()=>`size must be non-negative, but got ${n}.`)),_O(r.size===s.size||0===r.size,(()=>`Error in denseBincount: weights must have the same shape as x or 0-length, but got x shape: ${s.shape}, weights shape: ${r.shape}.`));const a={x:s,weights:r},o={size:n,binaryOutput:i};return jk.runKernel(JA,a,o)}});const tB=oD({depthToSpace_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n="NHWC"){const i=sD(t,"x","depthToSpace","float32"),s="NHWC"===n?i.shape[1]:i.shape[2],r="NHWC"===n?i.shape[2]:i.shape[3],a="NHWC"===n?i.shape[3]:i.shape[1];_O(e>1,(()=>`blockSize should be > 1 for depthToSpace, but was: ${e}`)),_O(s*e>=0,(()=>`Negative dimension size caused by overflow when multiplying\n ${s} and ${e} for depthToSpace with input shape\n ${i.shape}`)),_O(r*e>=0,(()=>`Negative dimension size caused by overflow when multiplying\n ${r} and ${e} for depthToSpace with input shape\n ${i.shape}`)),_O(a%(e*e)==0,(()=>`Dimension size must be evenly divisible by ${e*e} but is ${a} for depthToSpace with input shape ${i.shape}`));const o={x:i},l={blockSize:e,dataFormat:n};return jk.runKernel(ZA,o,l)}});const eB=oD({depthwiseConv2d_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s="NHWC",r=[1,1],a){const o=sD(t,"x","depthwiseConv2d","float32"),l=sD(e,"filter","depthwiseConv2d","float32");let u=o,h=!1;3===o.rank&&(h=!0,u=y$(o,[1,o.shape[0],o.shape[1],o.shape[2]])),_O(4===u.rank,(()=>`Error in depthwiseConv2d: input must be rank 4, but got rank ${u.rank}.`)),_O(4===l.rank,(()=>`Error in depthwiseConv2d: filter must be rank 4, but got rank ${l.rank}.`));const p="NHWC"===s?u.shape[3]:u.shape[1];_O(p===l.shape[2],(()=>`Error in depthwiseConv2d: number of input channels (${p}) must match the inChannels dimension in filter ${l.shape[2]}.`)),T$("depthwiseConv2d",i,a);const c={x:u,filter:l},d={strides:n,pad:i,dataFormat:s,dilations:r,dimRoundingMode:a},f=jk.runKernel(tM,c,d);return h?y$(f,[f.shape[1],f.shape[2],f.shape[3]]):f}});const nB=oD({diag_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","diag")};return jk.runKernel(iM,e)}});const iB=oD({dilation2d_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s=[1,1],r="NHWC"){const a=sD(t,"x","dilation2d"),o=sD(e,"filter","dilation2d");_O(3===a.rank||4===a.rank,(()=>`Error in dilation2d: input must be rank 3 or 4, but got rank ${a.rank}.`)),_O(3===o.rank,(()=>`Error in dilation2d: filter must be rank 3, but got rank ${o.rank}.`)),_O("NHWC"===r,(()=>`Error in dilation2d: Only NHWC is currently supported, but got dataFormat of ${r}`));let l=a,u=!1;3===a.rank&&(l=y$(a,[1,a.shape[0],a.shape[1],a.shape[2]]),u=!0),_O(l.shape[3]===o.shape[2],(()=>`Error in dilation2d: input and filter must have the same depth: ${l.shape[3]} vs ${o.shape[2]}`));const h={x:l,filter:o},p={strides:n,pad:i,dilations:s},c=jk.runKernel(sM,h,p);return u?y$(c,[c.shape[1],c.shape[2],c.shape[3]]):c}});const sB=oD({equal_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){let n=sD(t,"a","equal","string_or_numeric"),i=sD(e,"b","equal","string_or_numeric");[n,i]=Bk(n,i),_F(n.shape,i.shape);const s={a:n,b:i};return jk.runKernel(dM,s)}});const rB=oD({where_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(e,"a","where"),s=sD(n,"b","where"),r=sD(t,"condition","where","bool"),a=_F(_F(r.shape,i.shape),s.shape),o={condition:L$(r,a),t:L$(i,a),e:L$(s,a)};return jk.runKernel(VC,o)}});const aB=oD({divNoNan_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){let n=sD(t,"a","div"),i=sD(e,"b","div");[n,i]=Bk(n,i);const s=YL(n,i),r=zL(s),a=sB(i,r);return rB(a,r,s)}});const oB=oD({dot_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"t1","dot"),i=sD(e,"t2","dot");_O(!(1!==n.rank&&2!==n.rank||1!==i.rank&&2!==i.rank),(()=>`Error in dot: inputs must all be rank 1 or 2, but got ranks ${n.rank} and ${i.rank}.`));const s=1===n.rank?n.size:n.shape[1],r=1===i.rank?i.size:i.shape[0];if(_O(s===r,(()=>`Error in dot: inner dimensions of inputs must match, but got ${s} and ${r}.`)),1===n.rank&&1===i.rank){const t=y$(n,[1,-1]),e=y$(i,[-1,1]),s=HF(t,e);return y$(s,[])}if(1===n.rank&&2===i.rank){const t=y$(n,[1,-1]),e=y$(i,[i.shape[0],i.shape[1]]),s=HF(t,e);return y$(s,[s.size])}if(2===n.rank&&1===i.rank){const t=y$(i,[-1,1]),e=HF(n,t);return y$(e,[e.size])}{const t=y$(i,[i.shape[0],i.shape[1]]);return HF(n,t)}}});const lB=oD({einsum_: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,...e){const n=e.map(((t,e)=>sD(t,`tensors${e}`,"einsum"))),i={equation:t};return jk.runKernel(uM,n,i)}});const uB=oD({elu_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","elu","float32")};return jk.runKernel(hM,e)}});const hB=oD({ensureShape_: +/** + * @license + * Copyright 2023 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"x","ensureShape","string_or_numeric");if(!bO(n.shape,e))throw new Error(`EnsureShape: Shape of tensor ${n.shape} is not compatible with expected shape ${e}`);return t}});const pB=oD({erf_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){let e=sD(t,"x","erf");_O("int32"===e.dtype||"float32"===e.dtype,(()=>"Input dtype must be `int32` or `float32`.")),"int32"===e.dtype&&(e=PL(e,"float32"));const n={x:e};return jk.runKernel(cM,n)}}); +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function cB(t,e){for(let n=0;nt[e]))]}function mB(t,e){return dB(t,e.map((t=>1)),e)}function gB(t,e,n){_O(cB(e,n),(()=>`${t} supports only inner-most axes for now. Got axes ${e} and rank-${n} input.`))}function _B(t,e){if(cB(t,e))return null;const n=[];for(let i=0;in.push(t))),n}function TB(t){return t.map(((t,e)=>[e,t])).sort(((t,e)=>t[1]-e[1])).map((t=>t[0]))}function yB(t,e){const n=[];for(let i=e-t;i"Axis must be <= rank of the tensor"));const i={input:n},s={dim:e};return jk.runKernel(mM,i,s)}});const OB=oD({expm1_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","expm1")};return jk.runKernel(gM,e)}});const AB=oD({tile_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"x","tile","string_or_numeric");_O(n.rank===e.length,(()=>`Error in transpose: rank of input ${n.rank} must match length of reps ${e}.`));const i={x:n},s={reps:e};return jk.runKernel(fN,i,s)}});const MB=oD({eye_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i="float32"){null==e&&(e=t);const s=FL([t,e],i),r=t<=e?t:e;for(let t=0;t`Error in localResponseNormalization: x must be rank 3 or 4 but got\n rank ${r.rank}.`)),_O(wO(e),(()=>`Error in localResponseNormalization: depthRadius must be an integer but got depthRadius ${e}.`));let a=r,o=!1;3===r.rank&&(o=!0,a=y$(r,[1,r.shape[0],r.shape[1],r.shape[2]]));const l={x:a},u={depthRadius:e,bias:n,alpha:i,beta:s},h=jk.runKernel(WM,l,u);return o?y$(h,[h.shape[1],h.shape[2],h.shape[3]]):h}});const GB=oD({log_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","log","float32")};return jk.runKernel(PM,e)}});const HB=oD({log1p_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","log1p")};return jk.runKernel($M,e)}});const WB=oD({softplus_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","softplus")};return jk.runKernel(XC,e)}});const zB=oD({logSigmoid_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e=sD(t,"x","logSigmoid");return JL((t=>({value:XF(WB(XF(t))),gradFunc:e=>GL(e,v$(XF(t)))})))(e)}});const XB=oD({logSoftmax_: +/** + * @license + * Copyright 2020 Google Inc. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=-1){const n=sD(t,"logits","logSoftmax");if(-1===e&&(e=n.rank-1),e!==n.rank-1)throw Error(`Log Softmax along a non-last dimension is not yet supported. Logits was rank ${n.rank} and axis was ${e}`);const i=JL(((t,n)=>{const i=IB(t,e,!0),s=cF(t,i),r=cF(PL(s,"float32"),GB(bB(xB(s),e,!0)));n([r]);return{value:r,gradFunc:(t,n)=>{const[i]=n,s=xB(i);return cF(t,GL(bB(t,e,!0),s))}}}));return i(n)}});const jB=oD({logSumExp_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=null,n=!1){const i=sD(t,"x","logSumExp"),s=CO(e,i.shape),r=IB(i,s,!0),a=cF(i,r),o=xB(a),l=bB(o,s),u=GB(l),h=VL(y$(r,u.shape),u);if(n){const t=mB(h.shape,s);return y$(h,t)}return h}});const qB=oD({logicalAnd_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"a","logicalAnd","bool"),i=sD(e,"b","logicalAnd","bool");_F(n.shape,i.shape);const s={a:n,b:i};return jk.runKernel(BM,s)}});const KB=oD({logicalNot_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","logicalNot","bool")};return jk.runKernel(VM,e)}});const QB=oD({logicalOr_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"a","logicalOr","bool"),i=sD(e,"b","logicalOr","bool");_F(n.shape,i.shape);const s={a:n,b:i};return jk.runKernel(UM,s)}});const JB=oD({logicalXor_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"a","logicalXor","bool"),i=sD(e,"b","logicalXor","bool");return _F(n.shape,i.shape),qB(QB(t,e),KB(qB(t,e)))}}),ZB=2147483648;const tV=oD({searchSorted_:function(t,e,n="left"){const i=sD(t,"sortedSequence","searchSorted"),s=sD(e,"values","searchSorted"),r=i.shape[i.shape.length-1],a=s.shape[s.shape.length-1],o=y$(i,[-1,r]),l=y$(s,[-1,a]);if(o.rank<2)throw new Error("Sorted input argument must be at least 2-dimensional");if(o.shape[0]!==l.shape[0])throw new Error("Leading dimension of 'sortedSequence' and 'values' must match.");if(IO(l.shape)>=ZB)throw new Error("values tensor size must less than 2147483648");if(o.shape[1]>=ZB)throw new Error(`trailing dim_size must less than 2147483648 for int32 output type, was ${o.shape[1]}`);const u={sortedSequence:o,values:l},h={side:n};return jk.runKernel(BC,u,h)}}); +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function eV(t,e){return tV(t,e,"left")}const nV=oD({maxPool_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s){const r=sD(t,"x","maxPool");let a=r,o=!1;3===r.rank&&(o=!0,a=y$(r,[1,r.shape[0],r.shape[1],r.shape[2]])),_O(4===a.rank,(()=>`Error in maxPool: input must be rank 4 but got rank ${a.rank}.`)),_O(m$(n,1),(()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${n} and dilations '1'`)),T$("maxPool",i,s);const l={x:a},u={filterSize:e,strides:n,pad:i,dimRoundingMode:s},h=jk.runKernel(KM,l,u);return o?y$(h,[h.shape[1],h.shape[2],h.shape[3]]):h}});const iV=oD({maxPool3d_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=[1,1,1],n,i,s,r="NDHWC"){const a=sD(t,"x","maxPool3d");let o=a,l=!1;4===a.rank&&(l=!0,o=y$(a,[1,a.shape[0],a.shape[1],a.shape[2],a.shape[3]])),_O(5===o.rank,(()=>`Error in maxPool3d: x must be rank 5 but got rank ${o.rank}.`)),_O("NDHWC"===r,(()=>`Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of ${r}`)),T$("maxPool3d",i,s);const u={x:o},h={filterSize:e,strides:n,pad:i,dimRoundingMode:s,dataFormat:r},p=jk.runKernel(JM,u,h);return l?y$(p,[p.shape[1],p.shape[2],p.shape[3],p.shape[4]]):p}});const sV=oD({maxPoolWithArgmax_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s=!1){const r={x:sD(t,"x","maxPoolWithArgmax")},a={filterSize:e,strides:n,pad:i,includeBatchInIndex:s},o=jk.runKernel(tC,r,a);return{result:o[0],indexes:o[1]}}});const rV=oD({mean_: +/** + * @license + * Copyright 2020 Google Inc. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=null,n=!1){const i={x:sD(t,"x","mean")},s={axis:e,keepDims:n};return jk.runKernel(eC,i,s)}}); +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function aV(t,e="float32"){if(ZO(t),"complex64"===e){const e=aV(t,"float32"),n=aV(t,"float32");return lD(e,n)}const n=QO(IO(t),e);return jk.makeTensor(n,t,e)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function oV(t,e="float32"){if(ZO(t),"complex64"===e){const e=oV(t,"float32"),n=aV(t,"float32");return lD(e,n)}const n=KO(IO(t),e);return jk.makeTensor(n,t,e)} +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function lV(t,e,{indexing:n="xy"}={}){if("xy"!==n&&"ij"!==n)throw new TypeError(`${n} is not a valid third argument to meshgrid`);if(void 0===t)return[];let i=sD(t,"x","meshgrid",t instanceof xk?t.dtype:"float32");if(void 0===e)return[i];let s=sD(e,"y","meshgrid",e instanceof xk?e.dtype:"float32");const r=IO(i.shape),a=IO(s.shape);return"xy"===n?(i=y$(i,[1,-1]),s=y$(s,[-1,1]),[HF(oV([a,1],i.dtype),i),HF(s,oV([1,r],s.dtype))]):(i=y$(i,[-1,1]),s=y$(s,[1,-1]),[HF(i,oV([1,a],i.dtype)),HF(oV([r,1],s.dtype),s)])}const uV=oD({minimum_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){let n=sD(t,"a","minimum"),i=sD(e,"b","minimum");[n,i]=Bk(n,i),"bool"===n.dtype&&(n=PL(n,"int32"),i=PL(i,"int32")),_F(n.shape,i.shape);const s={a:n,b:i};return jk.runKernel(iC,s)}});const hV=oD({mirrorPad_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){_O("reflect"===n||"symmetric"===n,(()=>`Invalid mode. Mode must be either reflect or symmetric. Got ${n}.`));const i=sD(t,"x","mirrorPad");if(0===i.rank)throw new Error("mirrorPad(scalar) is not defined. Pass non-scalar to mirrorPad");_O(e.length===i.rank,(()=>`Padding doesn't match input. Must be ${i.rank}. Got ${e.length}.`));const s="reflect"===n?1:0;for(let t=0;t"Invalid number of paddings. Must be length of 2 each.")),_O(e[t][0]>=0&&e[t][0]<=i.shape[t]-s&&e[t][1]>=0&&e[t][1]<=i.shape[t]-s,(()=>`Padding in dimension ${t} cannot be greater than or equal to ${i.shape[t]-s} or less than 0 for input of shape ${i.shape}`));const r={paddings:e,mode:n},a={x:i};return jk.runKernel(sC,a,r)}});const pV=oD({mod_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){let n=sD(t,"a","mod"),i=sD(e,"b","mod");[n,i]=Bk(n,i);const s={a:n,b:i};return jk.runKernel(rC,s)}});const cV=oD({moments_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=null,n=!1){const i=CO(e,(t=sD(t,"x","moments")).shape),s=rV(t,i,n);let r=s.shape;n||(r=mB(s.shape,i));const a=WL(cF(PL(t,"float32"),y$(s,r)));return{mean:s,variance:rV(a,i,n)}}});const dV=oD({multiRNNCell_:function(t,e,n,i){const s=sD(e,"data","multiRNNCell"),r=rD(n,"c","multiRNNCell"),a=rD(i,"h","multiRNNCell");let o=s;const l=[];for(let e=0;e2)throw new Error(`Rank of probabilities must be 1 or 2, but is ${a}`);n=n||Math.random();const o={logits:1===a?y$(s,[1,-1]):s},l={numSamples:e,seed:n,normalized:i},u=jk.runKernel(aC,o,l);return 1===a?y$(u,[u.size]):u}});const mV=oD({notEqual_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){let n=sD(t,"a","notEqual","string_or_numeric"),i=sD(e,"b","notEqual","string_or_numeric");[n,i]=Bk(n,i),_F(n.shape,i.shape);const s={a:n,b:i};return jk.runKernel(uC,s)}});const gV=oD({onesLike_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","onesLike")};return jk.runKernel(dC,e)}});const _V=oD({outerProduct_:function(t,e){const n=sD(t,"v1","outerProduct"),i=sD(e,"v2","outerProduct");_O(1===n.rank&&1===i.rank,(()=>`Error in outerProduct: inputs must be rank 1, but got ranks ${n.rank} and ${i.rank}.`));const s=y$(n,[-1,1]),r=y$(i,[1,-1]);return HF(s,r)}});const TV=oD({pad_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n=0){const i=sD(t,"x","pad");if(0===i.rank)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");const s={paddings:e,constantValue:n},r={x:i};return jk.runKernel(gC,r,s)}});const yV=oD({pad1d_:function(t,e,n=0){return _O(2===e.length,(()=>"Invalid number of paddings. Must be length of 2.")),TV(t,[e],n)}});const IV=oD({pad2d_:function(t,e,n=0){return _O(2===e.length&&2===e[0].length&&2===e[1].length,(()=>"Invalid number of paddings. Must be length of 2 each.")),TV(t,e,n)}});const EV=oD({pad3d_:function(t,e,n=0){return _O(3===e.length&&2===e[0].length&&2===e[1].length&&2===e[2].length,(()=>"Invalid number of paddings. Must be length of 2 each.")),TV(t,e,n)}});const bV=oD({pad4d_:function(t,e,n=0){return _O(4===e.length&&2===e[0].length&&2===e[1].length&&2===e[2].length&&2===e[3].length,(()=>"Invalid number of paddings. Must be length of 2 each.")),TV(t,e,n)}});const vV=oD({spaceToBatchND_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"x","spaceToBatchND");_O(i.rank>=1+e.length,(()=>`input rank ${i.rank} should be > than [blockShape] ${e.length}`)),_O(n.length===e.length,(()=>`paddings.shape[0] ${n.length} must be equal to [blockShape] ${e.length}`)),_O(i.shape.reduce(((t,i,s)=>s>0&&s<=e.length?t&&(i+n[s-1][0]+n[s-1][1])%e[s-1]==0:t),!0),(()=>`input spatial dimensions ${i.shape.slice(1)} with paddings ${n.toString()} must be divisible by blockShapes ${e.toString()}`));const s={x:i},r={blockShape:e,paddings:n};return jk.runKernel(KC,s,r)}});const wV=oD({pool_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s,r,a){null==s&&(s=[1,1]),null==r&&(r=1),0===i&&(i="valid");const o=sD(t,"x","maxPool");let l=o,u=!1;3===o.rank&&(u=!0,l=y$(o,[1,o.shape[0],o.shape[1],o.shape[2]])),_O(m$(r,s),(()=>`Error in pool: Either strides or dilations must be 1. Got strides ${r} and dilations '${s}'`));const h=r$(l.shape,e,r,s,i),p=[h.dilationHeight,h.dilationWidth];let c;c="same"===i?function(t,e){const n=t.map(((t,n)=>t+(t-1)*(e[n]-1))),i=n.map((t=>t-1)),s=i.map((t=>Math.floor(t/2))),r=i.map(((t,e)=>t-s[e]));return i.map(((t,e)=>[s[e],r[e]]))}([h.filterHeight,h.filterWidth],p):[[0,0],[0,0]];const d=1===p[0]&&1===p[1],[f,m]=function(t,e,n){const i=n.map((t=>t[0])),s=n.map((t=>t[1])),r=t.concat(i,s),a=e.map(((t,e)=>(t-r[e]%t)%t)),o=s.map(((t,e)=>t+a[e])),l=e.map(((t,e)=>[i[e],o[e]])),u=e.map(((t,e)=>[0,a[e]]));return[l,u]}([h.inHeight,h.inWidth],p,c),g=d?i:"valid",_=d?l:vV(l,p,f),T=("avg"===n?()=>I$(_,e,r,g,a):()=>nV(_,e,r,g,a))(),y=d?T:R$(T,p,m);return u?y$(y,[y.shape[1],y.shape[2],y.shape[3]]):y}});const SV=oD({prelu_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n={x:sD(t,"x","prelu"),alpha:sD(e,"alpha","prelu")};return jk.runKernel(yC,n)}});const xV=oD({prod_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=null,n=!1){let i=sD(t,"x","prod");"bool"===i.dtype&&(i=PL(i,"int32"));const s={x:i},r={axis:e,keepDims:n};return jk.runKernel(IC,s,r)}});const RV=oD({raggedGather_: +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i){const s={paramsNestedSplits:t.map(((t,e)=>sD(t,`tensors${e}`,"raggedGather","int32"))),paramsDenseValues:sD(e,"paramsDenseValues","raggedGather"),indices:sD(n,"indices","raggedGather","int32")},r={outputRaggedRank:i},a=jk.runKernel(EC,s,r);return{outputNestedSplits:a.slice(0,a.length-1),outputDenseValues:a[a.length-1]}}});const OV=oD({raggedRange_: +/** + * @license + * Copyright 2022 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"starts","raggedRange"),s={starts:i,limits:sD(e,"limits","raggedRange",i.dtype),deltas:sD(n,"deltas","raggedRange",i.dtype)},r=jk.runKernel(bC,s);return{rtNestedSplits:r[0],rtDenseValues:r[1]}}});const AV=oD({raggedTensorToTensor_: +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s){const r=sD(t,"shape","raggedTensorToTensor","int32"),a=sD(e,"values","raggedTensorToTensor"),o={shape:r,values:a,defaultValue:sD(n,"defaultValue","raggedTensorToTensor",a.dtype),rowPartitionTensors:i.map(((t,e)=>sD(t,`tensors${e}`,"raggedTensorToTensor","int32")))},l={rowPartitionTypes:s};return jk.runKernel(vC,o,l)}});const MV=oD({rand_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){ZO(t);const i=IO(t);let s=null;if(null==n||"float32"===n)s=new Float32Array(i);else if("int32"===n)s=new Int32Array(i);else{if("bool"!==n)throw new Error(`Unknown data type ${n}`);s=new Uint8Array(i)}for(let t=0;t=1||0===r);const a=Math.sqrt(-2*Math.log(r)/r);t=this.mean+this.stdDev*i*a,e=this.mean+this.stdDev*s*a,this.truncated&&!this.isValidTruncated(t)||(n=!0)}return this.truncated&&!this.isValidTruncated(e)||(this.nextVal=this.convertValue(e)),this.convertValue(t)}convertValue(t){return null==this.dtype||"float32"===this.dtype?t:Math.round(t)}isValidTruncated(t){return t<=this.upper&&t>=this.lower}}class kV{constructor(t,e,n,i){this.alpha=t,this.beta=1/e,this.dtype=n;const s=i||Math.random();this.randu=CV.alea(s.toString()),this.randn=new NV(0,1,n,!1,this.randu()),this.d=t<1?t+2/3:t-1/3,this.c=1/Math.sqrt(9*this.d)}nextValue(){let t,e,n,i,s,r;for(;;){do{i=this.randn.nextValue(),r=1+this.c*i}while(r<=0);if(r*=r*r,t=i*i,e=1-.331*t*t,n=.5*t+this.d*(1-r+Math.log(r)),s=this.randu(),snull==this.dtype||"float32"===this.dtype,this.min=t,this.range=e-t,this.dtype=n,null==i&&(i=Math.random()),"number"==typeof i&&(i=i.toString()),!this.canReturnFloat()&&this.range<=1)throw new Error(`The difference between ${t} - ${e} <= 1 and dtype is not float`);this.random=CV.alea(i)}convertValue(t){return this.canReturnFloat()?t:Math.round(t)}nextValue(){return this.convertValue(this.min+this.range*this.random())}}const LV=oD({randomGamma_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n=1,i="float32",s){if(ZO(t),null==n&&(n=1),null==i&&(i="float32"),"float32"!==i&&"int32"!==i)throw new Error(`Unsupported data type ${i}`);const r=new kV(e,n,i,s),a=FL(t,i);for(let t=0;t`Error in reverse1D: x must be rank 1 but got rank ${e.rank}.`)),HV(e,0)}});const zV=oD({reverse2d_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"x","reverse");return _O(2===n.rank,(()=>`Error in reverse2D: x must be rank 2 but got rank ${n.rank}.`)),HV(n,e)}});const XV=oD({reverse3d_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"x","reverse");return _O(3===n.rank,(()=>`Error in reverse3D: x must be rank 3 but got rank ${n.rank}.`)),HV(n,e)}});const jV=oD({reverse4d_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"x","reverse");return _O(4===n.rank,(()=>`Error in reverse4D: x must be rank 4 but got rank ${n.rank}.`)),HV(n,e)}});const qV=oD({round_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","round")};return jk.runKernel(LC,e)}});const KV=oD({rsqrt_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","rsqrt","float32")};return jk.runKernel(FC,e)}});const QV=oD({selu_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","selu")};return jk.runKernel(UC,e)}});const JV=oD({separableConv2d_:function(t,e,n,i,s,r=[1,1],a="NHWC"){const o=sD(t,"x","separableConv2d"),l=sD(e,"depthwiseFilter","separableConv2d"),u=sD(n,"pointwiseFilter","separableConv2d");let h=o,p=!1;if(3===o.rank&&(p=!0,h=y$(o,[1,o.shape[0],o.shape[1],o.shape[2]])),"NCHW"===a)throw new Error("separableConv2d currently does not support dataFormat NCHW; only NHWC is supported");_O(4===h.rank,(()=>`Error in separableConv2d: input must be rank 4, but got rank ${h.rank}.`)),_O(4===l.rank,(()=>`Error in separableConv2d: depthwise filter must be rank 4, but got rank ${l.rank}.`)),_O(4===u.rank,(()=>`Error in separableConv2d: pointwise filter must be rank 4, but got rank ${l.rank}.`)),_O(1===u.shape[0],(()=>`Error in separableConv2d: the first dimension of pointwise filter must be 1, but got ${u.shape[0]}.`)),_O(1===u.shape[1],(()=>`Error in separableConv2d: the second dimension of pointwise filter must be 1, but got ${u.shape[1]}.`));const c=l.shape[2],d=l.shape[3];_O(u.shape[2]===c*d,(()=>`Error in separableConv2d: the third dimension of pointwise filter must be ${c*d}, but got ${u.shape[2]}.`));const f=eB(h,l,i,s,a,r),m=Y$(f,u,1,"valid",a);return p?y$(m,[m.shape[1],m.shape[2],m.shape[3]]):m}});const ZV= +/** + * @license + * Copyright 2020 Google Inc. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +async function(t,e){const n=sD(t,"x","setdiff1d"),i=sD(e,"y","setdiff1d");_O(n.dtype===i.dtype,(()=>`x and y should have the same dtype, but got x (${n.dtype}) and y (${i.dtype}).`)),_O(1===n.rank,(()=>`x should be 1D tensor, but got x (${n.shape}).`)),_O(1===i.rank,(()=>`y should be 1D tensor, but got y (${i.shape}).`));const s=await n.data(),r=await i.data(),a=new Set(r);let o=0;for(let t=0;t`slice1d expects a rank-1 tensor, but got a rank-${i.rank} tensor`)),w$(i,[e],[n])}});const sU=oD({slice2d_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"x","slice2d");return _O(2===i.rank,(()=>`slice2d expects a rank-2 tensor, but got a rank-${i.rank} tensor`)),w$(i,e,n)}});const rU=oD({slice3d_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"x","slice3d");return _O(3===i.rank,(()=>`slice3d expects a rank-3 tensor, but got a rank-${i.rank} tensor`)),w$(i,e,n)}});const aU=oD({slice4d_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"x","slice4d");return _O(4===i.rank,(()=>`slice4d expects a rank-4 tensor, but got a rank-${i.rank} tensor`)),w$(i,e,n)}});const oU=oD({softmax_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=-1){const n=sD(t,"logits","softmax","float32");if(-1===e&&(e=n.rank-1),e!==n.rank-1)throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${n.rank} and dim was ${e}`);const i={logits:n},s={dim:e};return jk.runKernel(JC,i,s)}});const lU=oD({fft_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){_O("complex64"===t.dtype,(()=>`The dtype for tf.spectral.fft() must be complex64 but got ${t.dtype}.`));const e={input:t};return jk.runKernel(_M,e)}});const uU=oD({ifft_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){_O("complex64"===t.dtype,(()=>`The dtype for tf.spectral.ifft() must be complex64 but got ${t.dtype}.`));const e={input:t};return jk.runKernel(OM,e)}});const hU=oD({irfft_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e=t.shape[t.shape.length-1],n=t.size/e;let i;if(e<=2){const s=y$(t,[n,e]);i=uU(s)}else{const s=[n,2*(e-1)],r=y$(jF(t),[n,e]),a=y$(zF(t),[n,e]),o=HV(w$(r,[0,1],[n,e-2]),1),l=GL(HV(w$(a,[0,1],[n,e-2]),1),tF(-1)),u=b$([r,o],1),h=b$([a,l],1),p=y$(lD(u,h),[s[0],s[1]]);i=uU(p)}if(i=jF(i),3===t.rank&&0!==t.shape[0]){const e=i,n=t.shape[0];i=y$(i,[n,i.shape[0]/n,i.shape[1]]),e.dispose()}return i}});const pU=oD({split_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n=0){const i={x:sD(t,"x","split")},s={numOrSizeSplits:e,axis:n};return jk.runKernel(QC,i,s)}});const cU=oD({rfft_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){_O("float32"===t.dtype,(()=>`The dtype for rfft() must be real value but got ${t.dtype}`));let n=t.shape[t.shape.length-1];const i=t.size/n;let s;if(null!=e&&e0)),r=t.shape.map((t=>t));r[t.shape.length-1]=e,s=w$(t,i,r),n=e}else if(null!=e&&e>n){const i=t.shape.map((t=>t));i[t.shape.length-1]=e-n,s=b$([t,aV(i)],t.shape.length-1),n=e}else s=t;const r=zL(s),a=y$(lD(s,r),[i,n]),o=lU(a),l=Math.floor(n/2)+1,u=jF(o),h=zF(o),p=pU(u,[l,n-l],u.shape.length-1),c=pU(h,[l,n-l],h.shape.length-1),d=s.shape.slice();return d[s.shape.length-1]=l,y$(lD(p[0],c[0]),d)}});const dU=oD({squaredDifference_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){let n=sD(t,"a","squaredDifference"),i=sD(e,"b","squaredDifference");[n,i]=Bk(n,i),_F(n.shape,i.shape);const s={a:n,b:i};return jk.runKernel(sN,s,{})}});const fU=oD({squeeze_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"x","squeeze","string_or_numeric");return y$(n,NO(n.shape,e).newShape)}});const mU=oD({stack_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=0){const n=rD(t,"tensors","stack","string_or_numeric");_O(n.length>=1,(()=>"Pass at least one tensor to tf.stack")),n.length>0&&_O(e<=n[0].rank,(()=>"Axis must be <= rank of the tensor"));const i=n,s={axis:e};return jk.runKernel(mC,i,s)}});const gU=oD({step_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=0){const n={x:sD(t,"x","step")},i={alpha:e};return jk.runKernel(vN,n,i)}});const _U=oD({stridedSlice_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s=0,r=0,a=0,o=0,l=0){const u={x:sD(t,"x","stridedSlice","string_or_numeric")},h={begin:e,end:n,strides:i,beginMask:s,endMask:r,ellipsisMask:a,newAxisMask:o,shrinkAxisMask:l};return jk.runKernel(oN,u,h)}});const TU=oD({tan_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e={x:sD(t,"x","tan","float32")};return jk.runKernel(cN,e)}}); +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function yU(t,e){yO(t);const n=eD(t,e);if(1!==n.length)throw new Error("tensor1d() requires values to be a flat/TypedArray");return uD(t,null,n,e)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function IU(t,e,n){if(yO(t),null!=e&&2!==e.length)throw new Error("tensor2d() requires shape to have two numbers");const i=eD(t,n);if(2!==i.length&&1!==i.length)throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");if(1===i.length&&null==e)throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");return uD(t,e,i,n)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function EU(t,e,n){if(yO(t),null!=e&&4!==e.length)throw new Error("tensor4d() requires shape to have four numbers");const i=eD(t,n);if(4!==i.length&&1!==i.length)throw new Error("tensor4d() requires values to be number[][][][] or flat/TypedArray");if(1===i.length&&null==e)throw new Error("tensor4d() requires shape to be provided when `values` are a flat array");return uD(t,e,i,n)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function bU(t,e,n){if(yO(t),null!=e&&5!==e.length)throw new Error("tensor5d() requires shape to have five numbers");const i=eD(t,n);if(5!==i.length&&1!==i.length)throw new Error("tensor5d() requires values to be number[][][][][] or flat/TypedArray");if(1===i.length&&null==e)throw new Error("tensor5d() requires shape to be provided when `values` are a flat array");return uD(t,e,i,n)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function vU(t,e,n){if(yO(t),null!=e&&6!==e.length)throw new Error("tensor6d() requires shape to have six numbers");const i=eD(t,n);if(6!==i.length&&1!==i.length)throw new Error("tensor6d() requires values to be number[][][][][][] or flat/TypedArray");if(1===i.length&&null==e)throw new Error("tensor6d() requires shape to be provided when `values` are a flat array");return uD(t,e=e||i,i,n)}const wU=oD({tensorScatterUpdate_: +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"tensor","tensorScatterupdate"),s=sD(e,"indices","tensorScatterupdate","int32"),r=sD(n,"updates","tensorScatterupdate");if(uP(r,s,i.shape),i.dtype!==r.dtype)throw new Error(`tensor and updates must have the same dtype, instead they are ${i.dtype} and ${r.dtype}.`);const a={tensor:i,indices:s,updates:r};return jk.runKernel($C,a,{})}});const SU=oD({topk_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=1,n=!0){const i=sD(t,"x","topk");if(0===i.rank)throw new Error("topk() expects the input to be of rank 1 or higher");const s=i.shape[i.shape.length-1];if(e<0)throw new Error(`'k' passed to topk() must be >= 0 but got ${e}`);if(e>s)throw new Error(`'k' passed to topk() must be <= the last dimension (${s}) but got ${e}`);const r={x:i},a={k:e,sorted:n},[o,l]=jk.runKernel(mN,r,a);return{values:o,indices:l}}});const xU=oD({truncatedNormal_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=0,n=1,i,s){if(ZO(t),null!=i&&"bool"===i)throw new Error("Unsupported data type $ { dtype }");const r=new NV(e,n,i,!0,s),a=FL(t,i);for(let t=0;t0,(()=>"The input tensor must be at least 1D"));const i={x:n},s={axis:e},[r,a]=jk.runKernel(TN,i,s);return{values:r,indices:a}}});const OU=oD({unsortedSegmentSum_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"x","unsortedSegmentSum"),s=sD(e,"segmentIds","unsortedSegmentSum","int32");_O(wO(n),(()=>"numSegments must be of dtype int"));const r={x:i,segmentIds:s},a={numSegments:n};return jk.runKernel(IN,r,a)}});const AU=oD({unstack_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=0){const n=sD(t,"x","unstack","string_or_numeric");_O(e>=-n.shape.length&&e`Axis = ${e} is not in [-${n.shape.length}, ${n.shape.length})`));const i={value:n},s={axis:e};return jk.runKernel(yN,i,s)}}); +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function MU(t,e){return tV(t,e,"right")} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function CU(t,e=!0,n,i){return jk.makeVariable(t,e,n,i)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function NU(t,e){const n=[];for(let t=0;t0,(()=>"mask cannot be scalar")),TO(o.slice(r,r+a),s.shape,"mask's shape must match the first K dimensions of tensor's shape,");let l=1;for(let t=r;t"Shape mismatch in v and x"));const l=tF(1),u=cF(l,o);let h=GL(cF(a,r),u);if(s){_O(null!=i,(()=>"When using zeroDebias: true, step is required."));const t=sD(i,"step","movingAverage");h=YL(h,cF(l,pF(o,t)))}return VL(r,h)}});const FU=oD({scatterND_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){ZO(n);const i=sD(t,"indices","scatterND","int32"),s=sD(e,"updates","scatterND");uP(s,i,n);const r={indices:i,updates:s},a={shape:n};return jk.runKernel(PC,r,a)}});const PU=oD({sparseToDense_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i=0){ZO(n);const s=sD(t,"sparseIndices","sparseToDense","int32"),r=sD(e,"sparseValues","sparseToDense","string_or_numeric"),a=sD(i,"defaultValue","sparseToDense",r.dtype);!function(t,e,n,i){if("int32"!==t.dtype)throw new Error(`tf.sparseToDense() expects the indices to be int32 type, but the dtype was ${t.dtype}.`);if(t.rank>2)throw new Error(`sparseIndices should be a scalar, vector, or matrix, but got shape ${t.shape}.`);const s=t.rank>0?t.shape[0]:1,r=t.rank>1?t.shape[1]:1;if(n.length!==r)throw new Error(`outputShape has incorrect number of elements:, ${n.length}, should be: ${r}.`);const a=e.size;if(0!==e.rank&&(1!==e.rank||a!==s))throw new Error(`sparseValues has incorrect shape ${e.shape}, should be [] or [${s}]`);if(e.dtype!==i.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype")}(s,r,n,a);const o={sparseIndices:s,sparseValues:r,defaultValue:a},l={outputShape:n};return jk.runKernel(iN,o,l)}});const $U=oD({gatherND_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(e,"indices","gatherND","int32"),i={params:sD(t,"x","gatherND","string_or_numeric"),indices:n};return jk.runKernel(wM,i)}});const BU=oD({dropout_: +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i){const s=sD(t,"x","dropout");if(_O("float32"===s.dtype,(()=>`x has to be a floating point tensor since it's going to be scaled, but got a ${s.dtype} tensor instead.`)),_O(e>=0&&e<1,(()=>`rate must be a float in the range [0, 1), but got ${e}.`)),0===e)return t instanceof xk?s.clone():s;const r= +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){if(null==e)return t.shape.slice();if(vO(t.shape,e))return e;if(t.shape.length===e.length){const n=[];for(let i=0;i1,(()=>`inTopK() expects the predictions to be of rank 2 or higher, but got ${i.rank}`)),_O(i.rank-1===s.rank,(()=>`predictions rank should be 1 larger than targets rank, but got predictions rank ${i.rank} and targets rank ${s.rank}`)),TO(i.shape.slice(0,i.shape.length-1),s.shape,"predictions's shape should be align with the targets' shape, except the last dimension.");const r=i.shape[i.shape.length-1];_O(n>0&&n<=r,(()=>`'k' passed to inTopK() must be > 0 && <= the predictions last dimension (${r}), but got ${n}`));const a=await i.data(),o=await s.data(),[l,u]=[a.length/r,r],h=kO("bool",l);for(let t=0;te.value-t.value)),h[t]=0;for(let e=0;e`Error in conv2dDerFilter: input must be rank 4, but got shape ${o.shape}.`)),_O(4===l.rank,(()=>`Error in conv2dDerFilter: dy must be rank 4, but got shape ${l.shape}.`)),_O(4===n.length,(()=>`Error in conv2dDerFilter: filterShape must be length 4, but got ${n}.`));const u="NHWC"===r?o.shape[3]:o.shape[1],h="NHWC"===r?l.shape[3]:l.shape[1];_O(u===n[2],(()=>`Error in conv2dDerFilter: depth of input ${u}) must match input depth in filter (${n[2]}.`)),_O(h===n[3],(()=>`Error in conv2dDerFilter: depth of dy (${h}) must match output depth for filter (${n[3]}).`)),T$("conv2dDerFilter",s,a);const p={x:o,dy:l},c={strides:i,pad:s,dataFormat:r,dimRoundingMode:a,filterShape:n};return jk.runKernel(YA,p,c)}}); +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function HU(t,e,n){if(null==n||"linear"===n)return t;if("relu"===n)return GL(t,gU(e));throw new Error(`Cannot compute gradient for fused activation ${n}.`)}function WU(t,e){let n=e;const i=gF(t.shape,e.shape);return i.length>0&&(n=bB(n,i)),y$(n,t.shape)}function zU(t,e,n,i){if("linear"===e)return t;if("relu"===e)return YV(t);if("elu"===e)return uB(t);if("relu6"===e)return GV(t);if("prelu"===e)return SV(t,n);if("leakyrelu"===e)return $B(t,i);if("sigmoid"===e)return v$(t);throw new Error(`Unknown fused activation ${e}.`)}const XU=(t,e)=>!(t>0)||"linear"===e;const jU=oD({fusedConv2d_: +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function({x:t,filter:e,strides:n,pad:i,dataFormat:s="NHWC",dilations:r=[1,1],dimRoundingMode:a,bias:o,activation:l="linear",preluActivationWeights:u,leakyreluAlpha:h}){if(l=l||"linear",!1===XU(jk.state.gradientDepth,l)){_O("NHWC"===s,(()=>`Error in fused conv2d: got dataFormat of ${s} but only NHWC is currently supported for the case of gradient depth is 0 and the activation is not linear.`));let p=Y$(t,e,n,i,s,r,a);return null!=o&&(p=VL(p,o)),zU(p,l,u,h)}const p=sD(t,"x","conv2d","float32"),c=sD(e,"filter","conv2d","float32");let d=p,f=!1;3===p.rank&&(f=!0,d=y$(p,[1,p.shape[0],p.shape[1],p.shape[2]])),_O(4===d.rank,(()=>`Error in fused conv2d: input must be rank 4, but got rank ${d.rank}.`)),_O(4===c.rank,(()=>`Error in fused conv2d: filter must be rank 4, but got rank ${c.rank}.`)),T$("fused conv2d",i,a);const m="NHWC"===s?d.shape[3]:d.shape[1];_O(c.shape[2]===m,(()=>`Error in conv2d: depth of input (${m}) must match input depth for filter ${c.shape[2]}.`)),_O(m$(n,r),(()=>`Error in conv2D: Either strides or dilations must be 1. Got strides ${n} and dilations '${r}'`));const g=o$(d.shape,c.shape,n,r,i,a);let _,T;if(null!=o&&(_=sD(o,"bias","fused conv2d"),[_]=Bk(_,p),"NHWC"===s?_F(g.outShape,_.shape):(_O(_.shape.length<=1,(()=>`Error in fused conv2d: only supports scalar or 1-D Tensor bias for NCHW format but got the bias of rank-${_.shape.length}.`)),_O(0===_.shape.length||_.shape[0]===g.outChannels||1===_.shape[0],(()=>`Error in fused conv2d: bias shape (${_.shape}) is not compatible with the number of output channels (${g.outChannels})`)))),null!=u){const t=u.shape;if(_O(t.length<=1||3===t.length,(()=>`Error in fused conv2d: only supports scalar, 1-D Tensor or 3-D Tensor PReLU activation weights but got a tensor of rank-${t.length}.`)),1===t.length)_O(1===t[0]||t[0]===g.outChannels,(()=>`Error in fused conv2d: PReLU activation weights (${t}) is not compatible with the number of output channels (${g.outChannels}).`));else if(3===t.length)try{_F(t,g.outShape)}catch(e){const n=`Error in fused conv2d: PReLU activation weights (${t}) is not compatible with the output shape of the conv2d (${g.outShape}).`;throw Error(n)}T=sD(u,"prelu weights","fused conv2d")}const y=(t,e)=>{_O("NHWC"===s,(()=>`Error in gradient of fused conv2D: got dataFormat of ${s} but only NHWC is currently supported.`));const[a,o,u,h]=e,p=HU(t,u,l);_O(f$(r),(()=>`Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${r}'`));const c=[H$(o.shape,p,a,n,i),GU(o,p,a.shape,n,i)];if(null!=h){const t=WU(h,p);c.push(t)}return c},I={x:d,filter:c,bias:_,preluActivationWeights:T},E={strides:n,pad:i,dataFormat:s,dilations:r,dimRoundingMode:a,activation:l,leakyreluAlpha:h};if(null==o){const t=JL(((t,e,n)=>{let i=jk.runKernel(RN,I,E);return n([e,t,i]),f&&(i=y$(i,[i.shape[1],i.shape[2],i.shape[3]])),{value:i,gradFunc:y}}));return t(d,c)}{const t=JL(((t,e,n,i)=>{let s=jk.runKernel(RN,I,E);return i([e,t,s,n]),f&&(s=y$(s,[s.shape[1],s.shape[2],s.shape[3]])),{value:s,gradFunc:y}}));return t(d,c,_)}}});const qU=oD({depthwiseConv2dNativeBackpropFilter_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s,r=[1,1],a){let o=t;3===t.rank&&(o=y$(t,[1,t.shape[0],t.shape[1],t.shape[2]]));let l=e;3===l.rank&&(l=y$(e,[1,e.shape[0],e.shape[1],e.shape[2]]));const u={x:o,dy:l},h={strides:i,pad:s,dimRoundingMode:a,dilations:r,filterShape:n};return jk.runKernel(eM,u,h)}});const KU=oD({depthwiseConv2dNativeBackpropInput_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s,r=[1,1],a){let o=e,l=!1;3===e.rank&&(l=!0,o=y$(e,[1,e.shape[0],e.shape[1],e.shape[2]]));const u={dy:o,filter:n},h={strides:i,pad:s,dimRoundingMode:a,dilations:r,inputShape:t},p=jk.runKernel(nM,u,h);return l?y$(p,[p.shape[1],p.shape[2],p.shape[3]]):p}});const QU=oD({fusedDepthwiseConv2d_: +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function({x:t,filter:e,strides:n,pad:i,dataFormat:s="NHWC",dilations:r=[1,1],dimRoundingMode:a,bias:o,activation:l="linear",preluActivationWeights:u,leakyreluAlpha:h}){if(!1===XU(jk.state.gradientDepth,l)){let p=eB(t,e,n,i,s,r,a);return null!=o&&(p=VL(p,o)),zU(p,l,u,h)}const p=sD(t,"x","depthwiseConv2d","float32"),c=sD(e,"filter","depthwiseConv2d","float32");let d=p,f=!1;3===p.rank&&(f=!0,d=y$(p,[1,p.shape[0],p.shape[1],p.shape[2]])),_O(4===d.rank,(()=>`Error in fused depthwiseConv2d: input must be rank 4, but got rank ${d.rank}.`)),_O(4===c.rank,(()=>`Error in fused depthwiseConv2d: filter must be rank 4, but got rank ${c.rank}.`)),_O(d.shape[3]===c.shape[2],(()=>`Error in fused depthwiseConv2d: number of input channels (${d.shape[3]}) must match the inChannels dimension in filter ${c.shape[2]}.`)),null==r&&(r=[1,1]),_O(m$(n,r),(()=>`Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides ${n} and dilations '${r}'`)),T$("fused depthwiseConv2d",i,a);const m=o$(d.shape,c.shape,n,r,i,a,!0);let g,_;null!=o&&(g=sD(o,"bias","fused conv2d"),[g]=Bk(g,p),_F(m.outShape,g.shape)),null!=u&&(_=sD(u,"prelu weights","fused depthwiseConv2d"));const T=(t,e)=>{_O(f$(r),(()=>`Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '${r}'`));const[s,o,u,h]=e,p=HU(t,u,l),c=KU(o.shape,p,s,n,i,r,a),d=qU(o,p,s.shape,n,i,r,a);if(null!=h){return[c,d,WU(g,p)]}return[c,d]},y={x:d,filter:c,bias:g,preluActivationWeights:_},I={strides:n,pad:i,dataFormat:s,dilations:r,dimRoundingMode:a,activation:l,leakyreluAlpha:h};if(null==o){const t=JL(((t,e,n)=>{let i=jk.runKernel(ON,y,I);return n([e,t,i]),f&&(i=y$(i,[i.shape[1],i.shape[2],i.shape[3]])),{value:i,gradFunc:T}}));return t(d,c)}{const t=JL(((t,e,n,i)=>{let s=jk.runKernel(ON,y,I);return i([e,t,s,n]),f&&(s=y$(s,[s.shape[1],s.shape[2],s.shape[3]])),{value:s,gradFunc:T}}));return t(d,c,g)}}});const JU=oD({fusedMatMul_: +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function({a:t,b:e,transposeA:n=!1,transposeB:i=!1,bias:s,activation:r="linear",preluActivationWeights:a,leakyreluAlpha:o=.2}){if(!1===XU(jk.state.gradientDepth,r)){let l=HF(t,e,n,i);return null!=s&&(l=VL(l,s)),zU(l,r,a,o)}let l=sD(t,"a","fused matMul"),u=sD(e,"b","fused matMul");[l,u]=Bk(l,u);const h=n?l.shape[l.rank-2]:l.shape[l.rank-1],p=i?u.shape[u.rank-1]:u.shape[u.rank-2],c=n?l.shape[l.rank-1]:l.shape[l.rank-2],d=i?u.shape[u.rank-2]:u.shape[u.rank-1],f=l.shape.slice(0,-2),m=u.shape.slice(0,-2),g=IO(f),_=IO(m);_O(h===p,(()=>`Error in fused matMul: inner shapes (${h}) and (${p}) of Tensors with shapes ${l.shape} and ${u.shape} and transposeA=${n} and transposeB=${i} must match.`));const T=_F(l.shape.slice(0,-2),u.shape.slice(0,-2)).concat([c,d]),y=y$(l,n?[g,h,c]:[g,c,h]),I=y$(u,i?[_,d,p]:[_,p,d]);let E,b;null!=s&&(E=sD(s,"bias","fused matMul"),[E]=Bk(E,l),_F(T,E.shape)),null!=a&&(b=sD(a,"prelu weights","fused matMul"));const v=(t,e)=>{const[a,o,l,u]=e,h=HU(y$(t,l.shape),l,r);let p,c;if(n||i?!n&&i?(p=HF(h,o,!1,!1),c=HF(h,a,!0,!1)):n&&!i?(p=HF(o,h,!1,!0),c=HF(a,h,!1,!1)):(p=HF(o,h,!0,!0),c=HF(h,a,!0,!0)):(p=HF(h,o,!1,!0),c=HF(a,h,!0,!1)),null!=s){return[p,c,WU(u,h)]}return[p,c]},w={a:y,b:I,bias:E,preluActivationWeights:b},S={transposeA:n,transposeB:i,activation:r,leakyreluAlpha:o};if(null==s){const t=JL(((t,e,n)=>{const i=jk.runKernel(xN,w,S);return n([t,e,i]),{value:y$(i,T),gradFunc:v}}));return t(y,I)}{const t=JL(((t,e,n,i)=>{const s=jk.runKernel(xN,w,S);return i([t,e,s,n]),{value:y$(s,T),gradFunc:v}}));return t(y,I,E)}}});const ZU=oD({hammingWindow_: +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){return UU(t,.54,.46)}});const tY=oD({hannWindow_: +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){return UU(t,.5,.5)}});const eY=oD({frame_: +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i=!1,s=0){let r=0;const a=[];for(;r+e<=t.size;)a.push(w$(t,r,e)),r+=n;if(i)for(;r`Error in cropAndResize: image must be rank 4,but got rank ${a.rank}.`)),_O(2===o.rank&&4===o.shape[1],(()=>`Error in cropAndResize: boxes must be have size [${u},4] but had shape ${o.shape}.`)),_O(1===l.rank&&l.shape[0]===u,(()=>`Error in cropAndResize: boxInd must be have size [${u}] but had shape ${o.shape}.`)),_O(2===i.length,(()=>`Error in cropAndResize: cropSize must be of length 2, but got length ${i.length}.`)),_O(i[0]>=1&&i[1]>=1,(()=>`cropSize must be atleast [1,1], but was ${i}`)),_O("bilinear"===s||"nearest"===s,(()=>`method must be bilinear or nearest, but was ${s}`));const h={image:a,boxes:o,boxInd:l},p={method:s,extrapolationValue:r,cropSize:i};return jk.runKernel(QA,h,p)}});const sY=oD({flipLeftRight_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e=sD(t,"image","flipLeftRight","float32");_O(4===e.rank,(()=>`Error in flipLeftRight: image must be rank 4,but got rank ${e.rank}.`));const n={image:e};return jk.runKernel(yM,n,{})}});const rY=oD({grayscaleToRGB_: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e=sD(t,"image","grayscaleToRGB"),n=e.rank-1,i=e.shape[n];_O(e.rank>=2,(()=>`Error in grayscaleToRGB: images must be at least rank 2, but got rank ${e.rank}.`)),_O(1===i,(()=>`Error in grayscaleToRGB: last dimension of a grayscale image should be size 1, but got size ${i}.`));const s=new Array(e.rank);return s.fill(1,0,n),s[n]=3,AB(e,s)}});const aY=oD({rgbToGrayscale_: +/** + * @license + * Copyright 2023 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e=sD(t,"image","RGBToGrayscale"),n=e.rank-1,i=e.shape[n];_O(e.rank>=2,(()=>`Error in RGBToGrayscale: images must be at least rank 2, but got rank ${e.rank}.`)),_O(3===i,(()=>`Error in RGBToGrayscale: last dimension of an RGB image should be size 3, but got size ${i}.`));const s=e.dtype,r=PL(e,"float32"),a=yU([.2989,.587,.114]);let o;switch(e.rank){case 2:o=lB("ij,j->i",r,a);break;case 3:o=lB("ijk,k->ij",r,a);break;case 4:o=lB("ijkl,l->ijk",r,a);break;case 5:o=lB("ijklm,m->ijkl",r,a);break;case 6:o=lB("ijklmn,n->ijklm",r,a);break;default:throw new Error("Not a valid tensor rank.")}return o=RB(o,-1),PL(o,s)}});const oY=oD({rotateWithOffset_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n=0,i=.5){const s=sD(t,"image","rotateWithOffset","float32");_O(4===s.rank,(()=>`Error in rotateWithOffset: image must be rank 4,but got rank ${s.rank}.`));const r={image:s},a={radians:e,fillValue:n,center:i};return jk.runKernel(SN,r,a)}}); +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function lY(t,e,n,i,s,r){null==i&&(i=.5),null==s&&(s=Number.NEGATIVE_INFINITY),null==r&&(r=0);const a=t.shape[0];return n=Math.min(n,a),_O(0<=i&&i<=1,(()=>`iouThreshold must be in [0, 1], but was '${i}'`)),_O(2===t.rank,(()=>`boxes must be a 2D tensor, but was of rank '${t.rank}'`)),_O(4===t.shape[1],(()=>`boxes must have 4 columns, but 2nd dimension was ${t.shape[1]}`)),_O(1===e.rank,(()=>"scores must be a 1D tensor")),_O(e.shape[0]===a,(()=>`scores has incompatible shape with boxes. Expected ${a}, but was ${e.shape[0]}`)),_O(0<=r&&r<=1,(()=>`softNmsSigma must be in [0, 1], but was '${r}'`)),{maxOutputSize:n,iouThreshold:i,scoreThreshold:s,softNmsSigma:r}}const uY=oD({nonMaxSuppression_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i=.5,s=Number.NEGATIVE_INFINITY){const r=sD(t,"boxes","nonMaxSuppression","float32"),a=sD(e,"scores","nonMaxSuppression","float32"),o=lY(r,a,n,i,s),l={maxOutputSize:n=o.maxOutputSize,iouThreshold:i=o.iouThreshold,scoreThreshold:s=o.scoreThreshold};return jk.runKernel(hC,{boxes:r,scores:a},l)}}); +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function hY(t,e,n){const i=function(t,e,n){return function(t,e,n){let i=0,s=t.length,r=0,a=!1;for(;i>>1);const o=n(e,t[r]);o>0?i=r+1:(s=r,a=!o)}return a?i:-i-1}(t,e,n||pY)}(t,e,n),s=i<0?-(i+1):i;t.splice(s,0,e)}function pY(t,e){return t>e?1:ts&&u.push({score:e[t],boxIndex:t,suppressBeginIndex:0});u.sort(TY);const h=r>0?-.5/r:0,p=[],c=[];for(;p.length0;){const e=u.pop(),{score:n,boxIndex:r,suppressBeginIndex:a}=e;if(n=a;--n){const a=gY(t,r,p[n]);if(a>=i){o=!0;break}if(e.score=e.score*_Y(i,h,a),e.score<=s)break}e.suppressBeginIndex=p.length,o||(e.score===n?(p.push(r),c.push(e.score)):e.score>s&&hY(u,e,TY))}const d=p.length,f=n-d;o&&f>0&&(p.push(...new Array(f).fill(0)),c.push(...new Array(f).fill(0)));const m={selectedIndices:p};return a&&(m.selectedScores=c),l&&(m.validOutputs=d),m}function gY(t,e,n){const i=t.subarray(4*e,4*e+4),s=t.subarray(4*n,4*n+4),r=Math.min(i[0],i[2]),a=Math.min(i[1],i[3]),o=Math.max(i[0],i[2]),l=Math.max(i[1],i[3]),u=Math.min(s[0],s[2]),h=Math.min(s[1],s[3]),p=Math.max(s[0],s[2]),c=Math.max(s[1],s[3]),d=(o-r)*(l-a),f=(p-u)*(c-h);if(d<=0||f<=0)return 0;const m=Math.max(r,u),g=Math.max(a,h),_=Math.min(o,p),T=Math.min(l,c),y=Math.max(_-m,0)*Math.max(T-g,0);return y/(d+f-y)}function _Y(t,e,n){const i=Math.exp(e*n*n);return n<=t?i:0}function TY(t,e){return t.score-e.score||t.score===e.score&&e.boxIndex-t.boxIndex}const yY= +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +async function(t,e,n,i=.5,s=Number.NEGATIVE_INFINITY){const r=sD(t,"boxes","nonMaxSuppressionAsync"),a=sD(e,"scores","nonMaxSuppressionAsync"),o=lY(r,a,n,i,s);n=o.maxOutputSize,i=o.iouThreshold,s=o.scoreThreshold;const l=await Promise.all([r.data(),a.data()]),u=l[0],h=l[1],{selectedIndices:p}=cY(u,h,n,i,s);return r!==t&&r.dispose(),a!==e&&a.dispose(),yU(p,"int32")};const IY=oD({nonMaxSuppressionWithScore_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i=.5,s=Number.NEGATIVE_INFINITY,r=0){const a=sD(t,"boxes","nonMaxSuppression"),o=sD(e,"scores","nonMaxSuppression"),l=lY(a,o,n,i,s,r),u={boxes:a,scores:o},h={maxOutputSize:n=l.maxOutputSize,iouThreshold:i=l.iouThreshold,scoreThreshold:s=l.scoreThreshold,softNmsSigma:r=l.softNmsSigma},p=jk.runKernel(cC,u,h);return{selectedIndices:p[0],selectedScores:p[1]}}});const EY= +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +async function(t,e,n,i=.5,s=Number.NEGATIVE_INFINITY,r=0){const a=sD(t,"boxes","nonMaxSuppressionAsync"),o=sD(e,"scores","nonMaxSuppressionAsync"),l=lY(a,o,n,i,s,r);n=l.maxOutputSize,i=l.iouThreshold,s=l.scoreThreshold,r=l.softNmsSigma;const u=await Promise.all([a.data(),o.data()]),h=u[0],p=u[1],{selectedIndices:c,selectedScores:d}=fY(h,p,n,i,s,r);return a!==t&&a.dispose(),o!==e&&o.dispose(),{selectedIndices:yU(c,"int32"),selectedScores:yU(d)}};const bY=oD({nonMaxSuppressionPadded_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i=.5,s=Number.NEGATIVE_INFINITY,r=!1){const a=sD(t,"boxes","nonMaxSuppression"),o=sD(e,"scores","nonMaxSuppression"),l=lY(a,o,n,i,s,null),u={boxes:a,scores:o},h={maxOutputSize:l.maxOutputSize,iouThreshold:l.iouThreshold,scoreThreshold:l.scoreThreshold,padToMaxOutputSize:r},p=jk.runKernel(pC,u,h);return{selectedIndices:p[0],validOutputs:p[1]}}});const vY= +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +async function(t,e,n,i=.5,s=Number.NEGATIVE_INFINITY,r=!1){const a=sD(t,"boxes","nonMaxSuppressionAsync"),o=sD(e,"scores","nonMaxSuppressionAsync"),l=lY(a,o,n,i,s,null),u=l.maxOutputSize,h=l.iouThreshold,p=l.scoreThreshold,[c,d]=await Promise.all([a.data(),o.data()]),{selectedIndices:f,validOutputs:m}=dY(c,d,u,h,p,r);return a!==t&&a.dispose(),o!==e&&o.dispose(),{selectedIndices:yU(f,"int32"),validOutputs:tF(m,"int32")}};const wY=oD({resizeBilinear_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n=!1,i=!1){const s=sD(t,"images","resizeBilinear");_O(3===s.rank||4===s.rank,(()=>`Error in resizeBilinear: x must be rank 3 or 4, but got rank ${s.rank}.`)),_O(2===e.length,(()=>`Error in resizeBilinear: new shape must 2D, but got shape ${e}.`)),_O(!1===i||!1===n,(()=>"Error in resizeBilinear: If halfPixelCenters is true, alignCorners must be false."));let r=s,a=!1;3===s.rank&&(a=!0,r=y$(s,[1,s.shape[0],s.shape[1],s.shape[2]]));const[]=e,o={images:r},l={alignCorners:n,halfPixelCenters:i,size:e},u=jk.runKernel(CC,o,l);return a?y$(u,[u.shape[1],u.shape[2],u.shape[3]]):u}});const SY=oD({resizeNearestNeighbor_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n=!1,i=!1){const s=sD(t,"images","resizeNearestNeighbor");_O(3===s.rank||4===s.rank,(()=>`Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank ${s.rank}.`)),_O(2===e.length,(()=>`Error in resizeNearestNeighbor: new shape must 2D, but got shape ${e}.`)),_O("float32"===s.dtype||"int32"===s.dtype,(()=>"`images` must have `int32` or `float32` as dtype")),_O(!1===i||!1===n,(()=>"Error in resizeNearestNeighbor: If halfPixelCenters is true, alignCorners must be false."));let r=s,a=!1;3===s.rank&&(a=!0,r=y$(s,[1,s.shape[0],s.shape[1],s.shape[2]]));const[]=e,o={images:r},l={alignCorners:n,halfPixelCenters:i,size:e},u=jk.runKernel(AC,o,l);return a?y$(u,[u.shape[1],u.shape[2],u.shape[3]]):u}});const xY=oD({threshold_: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e="binary",n=!1,i=.5){const s=sD(t,"image","threshold"),r=s.shape[0]*s.shape[1];let a,o,l,u,h=GL(yU([i]),255);if(_O(3===s.rank,(()=>`Error in threshold: image must be rank 3,but got rank ${s.rank}.`)),_O(3===s.shape[2]||1===s.shape[2],(()=>`Error in threshold: image color channel must be equal to 3 or 1but got ${s.shape[2]}.`)),_O("int32"===s.dtype||"float32"===s.dtype,(()=>`Error in dtype: image dtype must be int32 or float32,but got dtype ${s.dtype}.`)),_O("otsu"===e||"binary"===e,(()=>`Method must be binary or otsu, but was ${e}`)),3===s.shape[2]){[a,o,l]=pU(s,[1,1,1],-1);const t=GL(a,.2989),e=GL(o,.587),n=GL(l,.114);u=VL(VL(t,e),n)}else u=t;if("otsu"===e){h=function(t,e){let n,i,s,r,a,o,l=yU([-1]),u=yU([0]),h=yU([0]);for(let p=0;p`Error in transform: image must be rank 4,but got rank ${a.rank}.`)),_O(2===o.rank&&(o.shape[0]===a.shape[0]||1===o.shape[0])&&8===o.shape[1],(()=>"Error in transform: Input transform should be batch x 8 or 1 x 8")),_O(null==r||2===r.length,(()=>`Error in transform: outputShape must be [height, width] or null, but got ${r}.`));const l={image:a,transforms:o},u={interpolation:n,fillMode:i,fillValue:s,outputShape:r};return jk.runKernel(gN,l,u)}});const OY=oD({bandPart_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"a","bandPart");_O(i.rank>=2,(()=>`bandPart(): Rank must be at least 2, got ${i.rank}.`));const s=i.shape,[r,a]=i.shape.slice(-2);let o,l;"number"==typeof e?(_O(e%1==0,(()=>`bandPart(): numLower must be an integer, got ${e}.`)),_O(e<=r,(()=>`bandPart(): numLower (${e}) must not be greater than the number of rows (${r}).`)),o=sD(e<0?r:e,"numLower","bandPart")):(_O("int32"===e.dtype,(()=>"bandPart(): numLower's dtype must be an int32.")),o=rB(BB(e,0),r,uV(e,r))),"number"==typeof n?(_O(n%1==0,(()=>`bandPart(): numUpper must be an integer, got ${n}.`)),_O(n<=a,(()=>`bandPart(): numUpper (${n}) must not be greater than the number of columns (${a}).`)),l=sD(n<0?a:n,"numUpper","bandPart")):(_O("int32"===n.dtype,(()=>"bandPart(): numUpper's dtype must be an int32.")),l=rB(BB(n,0),a,uV(n,a)));const u=y$(VV(0,r,1,"int32"),[-1,1]),h=VV(0,a,1,"int32"),p=cF(u,h),c=qB(VB(p,o),DB(p,XF(l))),d=aV([r,a],i.dtype);return y$(mU(AU(y$(i,[-1,r,a])).map((t=>rB(c,t,d)))),s)}});const AY=oD({gramSchmidt_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){let e;if(Array.isArray(t)){e=!1,_O(null!=t&&t.length>0,(()=>"Gram-Schmidt process: input must not be null, undefined, or empty"));const n=t[0].shape[0];for(let e=1;e`Gram-Schmidt: Non-unique lengths found in the input vectors: (${t[e].shape[0]} vs. ${n})`))}else e=!0,t=pU(t,t.shape[0],0).map((t=>fU(t,[0])));_O(t.length<=t[0].shape[0],(()=>`Gram-Schmidt: Number of vectors (${t.length}) exceeds number of dimensions (${t[0].shape[0]}).`));const n=[],i=t;for(let e=0;e{let t=i[e];if(e>0)for(let i=0;i{_O(2===t.shape.length,(()=>`qr2d() requires a 2D Tensor, but got a ${t.shape.length}D Tensor.`));const n=t.shape[0],i=t.shape[1];let s=MB(n),r=$L(t);const a=IU([[1]],[1,1]);let o=$L(a);const l=n>=i?i:n;for(let t=0;t{const e=w$(r,[t,t],[n-t,1]),l=wB(e),u=w$(r,[t,t],[1,1]),h=rB(kB(u,0),IU([[-1]]),IU([[1]])),p=cF(u,GL(h,l)),c=YL(e,p);o=1===c.shape[0]?$L(a):b$([a,w$(c,[1,0],[c.shape[0]-1,c.shape[1]])],0);const d=XF(YL(HF(h,p),l)),f=w$(r,[t,0],[n-t,i]),m=GL(d,o),g=qF(o);if(0===t)r=cF(f,HF(m,HF(g,f)));else{const e=cF(f,HF(m,HF(g,f)));r=b$([w$(r,[0,0],[t,i]),e],0)}const _=qF(m),T=w$(s,[0,t],[n,s.shape[1]-t]);if(0===t)s=cF(T,HF(HF(T,o),_));else{const e=cF(T,HF(HF(T,o),_));s=b$([w$(s,[0,0],[n,t]),e],1)}return[o,r,s]})),bD([e,l,u])}return!e&&n>i&&(s=w$(s,[0,0],[n,i]),r=w$(r,[0,0],[i,i])),[s,r]}))}const CY=oD({qr_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e=!1){if(_O(t.rank>=2,(()=>`qr() requires input tensor to have a rank >= 2, but got rank ${t.rank}`)),2===t.rank)return MY(t,e);{const n=t.shape.slice(0,t.shape.length-2).reduce(((t,e)=>t*e)),i=AU(y$(t,[n,t.shape[t.shape.length-2],t.shape[t.shape.length-1]]),0),s=[],r=[];i.forEach((t=>{const[n,i]=MY(t,e);s.push(n),r.push(i)}));return[y$(mU(s,0),t.shape),y$(mU(r,0),t.shape)]}}}); +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +var NY;!function(t){t[t.NONE=0]="NONE",t[t.MEAN=1]="MEAN",t[t.SUM=2]="SUM",t[t.SUM_BY_NONZERO_WEIGHTS=3]="SUM_BY_NONZERO_WEIGHTS"}(NY||(NY={}));const kY=oD({computeWeightedLoss_:function(t,e,n=NY.SUM_BY_NONZERO_WEIGHTS){const i=sD(t,"losses","computeWeightedLoss");let s=null;null!=e&&(s=sD(e,"weights","computeWeightedLoss"));const r=null==s?i:GL(i,s);if(n===NY.NONE)return r;if(n===NY.SUM)return bB(r);if(n===NY.MEAN){if(null==s)return rV(r);{const t=i.size/s.size,e=YL(bB(r),bB(s));return t>1?YL(e,tF(t)):e}}if(n===NY.SUM_BY_NONZERO_WEIGHTS){if(null==s)return YL(bB(r),tF(i.size));{const t=GL(s,oV(i.shape)),e=PL(bB(mV(t,tF(0))),"float32");return YL(bB(r),e)}}throw Error(`Unknown reduction: ${n}`)}});const DY=oD({absoluteDifference_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i=NY.SUM_BY_NONZERO_WEIGHTS){const s=sD(t,"labels","absoluteDifference"),r=sD(e,"predictions","absoluteDifference");let a=null;null!=n&&(a=sD(n,"weights","absoluteDifference")),TO(s.shape,r.shape,"Error in absoluteDifference: ");const o=fF(cF(s,r));return kY(o,a,i)}});const LY=oD({cosineDistance_:function(t,e,n,i,s=NY.SUM_BY_NONZERO_WEIGHTS){const r=sD(t,"labels","cosineDistance"),a=sD(e,"predictions","cosineDistance");let o=null;null!=i&&(o=sD(i,"weights","cosineDistance")),TO(r.shape,a.shape,"Error in cosineDistance: ");const l=tF(1),u=cF(l,bB(GL(r,a),n,!0));return kY(u,o,s)}});const FY=oD({hingeLoss_:function(t,e,n,i=NY.SUM_BY_NONZERO_WEIGHTS){let s=sD(t,"labels","hingeLoss");const r=sD(e,"predictions","hingeLoss");let a=null;null!=n&&(a=sD(n,"weights","hingeLoss")),TO(s.shape,r.shape,"Error in hingeLoss: ");const o=tF(1);s=cF(GL(tF(2),s),o);const l=YV(cF(o,GL(s,r)));return kY(l,a,i)}});const PY=oD({huberLoss_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i=1,s=NY.SUM_BY_NONZERO_WEIGHTS){const r=sD(t,"labels","huberLoss"),a=sD(e,"predictions","huberLoss");let o=null;null!=n&&(o=sD(n,"weights","huberLoss")),TO(r.shape,a.shape,"Error in huberLoss: ");const l=tF(i),u=fF(cF(a,r)),h=uV(u,l),p=cF(u,h),c=VL(GL(tF(.5),WL(h)),GL(l,p));return kY(c,o,s)}});const $Y=oD({logLoss_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i=1e-7,s=NY.SUM_BY_NONZERO_WEIGHTS){const r=sD(t,"labels","logLoss"),a=sD(e,"predictions","logLoss");let o=null;null!=n&&(o=sD(n,"weights","logLoss")),TO(r.shape,a.shape,"Error in logLoss: ");const l=tF(1),u=tF(i),h=XF(GL(r,GB(VL(a,u)))),p=GL(cF(l,r),GB(VL(cF(l,a),u))),c=cF(h,p);return kY(c,o,s)}});const BY=oD({meanSquaredError_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i=NY.SUM_BY_NONZERO_WEIGHTS){const s=sD(t,"labels","meanSquaredError"),r=sD(e,"predictions","meanSquaredError");let a=null;null!=n&&(a=sD(n,"weights","meanSquaredError")),TO(s.shape,r.shape,"Error in meanSquaredError: ");const o=dU(s,r);return kY(o,a,i)}});const VY=oD({sigmoidCrossEntropy_:function(t,e,n,i=0,s=NY.SUM_BY_NONZERO_WEIGHTS){let r=sD(t,"multiClassLabels","sigmoidCrossEntropy");const a=sD(e,"logits","sigmoidCrossEntropy");let o=null;if(null!=n&&(o=sD(n,"weights","sigmoidCrossEntropy")),TO(r.shape,a.shape,"Error in sigmoidCrossEntropy: "),i>0){const t=tF(i),e=tF(1),n=tF(.5);r=VL(GL(r,cF(e,t)),GL(n,t))}const l= +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"labels","sigmoidCrossEntropyWithLogits"),i=sD(e,"logits","sigmoidCrossEntropyWithLogits");TO(n.shape,i.shape,"Error in sigmoidCrossEntropyWithLogits: ");const s=YV(i),r=GL(i,n),a=HB(xB(XF(fF(i))));return VL(cF(s,r),a)}(r,a);return kY(l,o,s)}});const UY=oD({softmaxCrossEntropy_:function(t,e,n,i=0,s=NY.SUM_BY_NONZERO_WEIGHTS){let r=sD(t,"onehotLabels","softmaxCrossEntropy");const a=sD(e,"logits","softmaxCrossEntropy");let o=null;if(null!=n&&(o=sD(n,"weights","softmaxCrossEntropy")),TO(r.shape,a.shape,"Error in softmaxCrossEntropy: "),i>0){const t=tF(i),e=tF(1),n=tF(r.shape[1]);r=VL(GL(r,cF(e,t)),YL(t,n))}const l= +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n=-1){if(-1===n&&(n=e.rank-1),n!==e.rank-1)throw Error(`Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank ${e.rank} and dim was ${n}`);const i=JL(((t,e,i)=>{const s=jB(e,[n],!0),r=cF(PL(e,"float32"),s);i([t,r]);const a=XF(GL(r,t));return{value:bB(a,[n]),gradFunc:(t,e)=>{const[i,s]=e,r=mB(t.shape,[n]);return[GL(y$(t,r),cF(PL(i,"float32"),xB(s))),GL(y$(t,r),cF(xB(s),PL(i,"float32")))]}}}));return i(t,e)}(r,a);return kY(l,o,s)}});const YY=oD({sparseFillEmptyRows_: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i){const s=sD(t,"indices","sparseFillEmptyRows","int32"),r=sD(e,"values","sparseFillEmptyRows"),a=sD(n,"denseShape","sparseFillEmptyRows","int32"),o=sD(i,"defaultValue","sparseFillEmptyRows",r.dtype);if(2!==s.rank)throw new Error(`Indices should be Tensor2D but received shape\n ${s.shape}`);if(1!==r.rank)throw new Error(`Values should be Tensor1D but received shape ${r.shape}`);if(1!==a.rank)throw new Error(`Dense shape should be Tensor1D but received shape ${a.shape}`);if(0!==o.rank)throw new Error(`Default value should be a scalar but received shape ${o.shape}`);const l={indices:s,values:r,denseShape:a,defaultValue:o},u=jk.runKernel(ZC,l);return{outputIndices:u[0],outputValues:u[1],emptyRowIndicator:u[2],reverseIndexMap:u[3]}}});const GY=oD({sparseReshape_: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"inputIndices","sparseReshape","int32"),s=sD(e,"inputShape","sparseReshape","int32"),r=sD(n,"newShape","sparseReshape","int32");if(2!==i.rank)throw new Error(`Input indices should be Tensor2D but received shape\n ${i.shape}`);if(1!==s.rank)throw new Error(`Input shape should be Tensor1D but received shape ${s.shape}`);if(1!==r.rank)throw new Error(`New shape should be Tensor1D but received shape ${r.shape}`);const a={inputIndices:i,inputShape:s,newShape:r},o=jk.runKernel(tN,a);return{outputIndices:o[0],outputShape:o[1]}}});const HY=oD({sparseSegmentMean_: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"data","sparseSegmentMean"),s=sD(e,"indices","sparseSegmentMean","int32"),r=sD(n,"segmentIds","sparseSegmentMean","int32");if(i.rank<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==s.rank)throw new Error(`Indices should be Tensor1D but received shape\n ${s.shape}`);if(1!==r.rank)throw new Error(`Segment ids should be Tensor1D but received shape\n ${r.shape}`);const a={data:i,indices:s,segmentIds:r};return jk.runKernel(eN,a)}});const WY=oD({sparseSegmentSum_: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=sD(t,"data","sparseSegmentSum"),s=sD(e,"indices","sparseSegmentSum","int32"),r=sD(n,"segmentIds","sparseSegmentSum","int32");if(i.rank<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==s.rank)throw new Error(`Indices should be Tensor1D but received shape\n ${s.shape}`);if(1!==r.rank)throw new Error(`Segment ids should be Tensor1D but received shape\n ${r.shape}`);const a={data:i,indices:s,segmentIds:r};return jk.runKernel(nN,a)}});const zY=oD({stringNGrams_: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s,r,a,o){const l=sD(t,"data","stringNGrams","string");if("string"!==l.dtype)throw new Error("Data must be of datatype string");if(1!==l.shape.length)throw new Error(`Data must be a vector, saw: ${l.shape}`);const u=sD(e,"dataSplits","stringNGrams");if("int32"!==u.dtype)throw new Error("Data splits must be of datatype int32");const h={separator:n,nGramWidths:i,leftPad:s,rightPad:r,padWidth:a,preserveShortSequences:o},p={data:l,dataSplits:u},c=jk.runKernel(lN,p,h);return{nGrams:c[0],nGramsSplits:c[1]}}});const XY=oD({stringSplit_: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n=!0){const i=sD(t,"input","stringSplit","string"),s=sD(e,"delimiter","stringSplit","string");if(1!==i.rank)throw new Error(`Input should be Tensor1D but received shape ${i.shape}`);if(0!==s.rank)throw new Error(`Delimiter should be a scalar but received shape ${s.shape}`);const r={skipEmpty:n},a={input:i,delimiter:s},o=jk.runKernel(uN,a,r);return{indices:o[0],values:o[1],shape:o[2]}}});const jY=oD({stringToHashBucketFast_: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e){const n=sD(t,"input","stringToHashBucketFast","string"),i={numBuckets:e};if(e<=0)throw new Error("Number of buckets must be at least 1");const s={input:n};return jk.runKernel(hN,s,i)}});const qY=oD({staticRegexReplace_: +/** + * @license + * Copyright 2023 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i=!0){const s=sD(t,"input","staticRegexReplace","string"),r={pattern:e,rewrite:n,replaceGlobal:i};return jk.runKernel(aN,{x:s},r)}}),KY={fft:lU,ifft:uU,rfft:cU,irfft:hU},QY={hammingWindow:ZU,hannWindow:tY,frame:eY,stft:nY},JY={flipLeftRight:sY,grayscaleToRGB:rY,resizeNearestNeighbor:SY,resizeBilinear:wY,rgbToGrayscale:aY,rotateWithOffset:oY,cropAndResize:iY,nonMaxSuppression:uY,nonMaxSuppressionAsync:yY,nonMaxSuppressionWithScore:IY,nonMaxSuppressionWithScoreAsync:EY,nonMaxSuppressionPadded:bY,nonMaxSuppressionPaddedAsync:vY,threshold:xY,transform:RY},ZY={bandPart:OY,gramSchmidt:AY,qr:CY},tG={absoluteDifference:DY,computeWeightedLoss:kY,cosineDistance:LY,hingeLoss:FY,huberLoss:PY,logLoss:$Y,meanSquaredError:BY,sigmoidCrossEntropy:VY,softmaxCrossEntropy:UY},eG={sparseFillEmptyRows:YY,sparseReshape:GY,sparseSegmentMean:HY,sparseSegmentSum:WY},nG={stringNGrams:zY,stringSplit:XY,stringToHashBucketFast:jY,staticRegexReplace:qY},iG=WP,sG="undefined"!=typeof requestAnimationFrame?requestAnimationFrame:"undefined"!=typeof setImmediate?setImmediate:t=>t();function rG(){return new Promise((t=>sG((()=>t()))))} +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function aG(t,e){const n=t[0].length;t.forEach(((t,e)=>{_O(t.length===n,(()=>`Error in concat${n}D: rank of tensors[${e}] must be the same as the rank of the rest (${n})`))})),_O(e>=0&&e`Error in concat${n}D: axis must be between 0 and ${n-1}.`));const i=t[0];t.forEach(((t,s)=>{for(let r=0;r`Error in concat${n}D: Shape of tensors[${s}] (${t}) does not match the shape of the rest (${i}) along the non-concatenated axis ${s}.`))}))}function oG(t,e){const n=t[0].slice();for(let i=1;i=0)if(o>=0){if(o!==r)throw new Error(`rt input.shape and shape=${e} are incompatible: rt input.shape[${s+t}] = ${r} but shape[${s+t}] = ${o}`)}else i[a]=r}return i}function hG(t){const e={FIRST_DIM_SIZE:lG.FIRST_DIM_SIZE,VALUE_ROWIDS:lG.VALUE_ROWIDS,ROW_LENGTHS:lG.ROW_LENGTHS,ROW_SPLITS:lG.ROW_SPLITS,ROW_LIMITS:lG.ROW_LIMITS,ROW_STARTS:lG.ROW_STARTS},n=[];for(const i of t){if(!(i in e))break;n.push(e[i])}return n}function pG(t){return 0===t.length?0:t[0]===lG.FIRST_DIM_SIZE?t.length-1:t.length}function cG(t,e){if(null==t||null==e)return;const n=t.length,i=e.length;if(n>=i)throw new Error(`defaultValue.shape=${t} and ragged tensor flatValues.shape=${e}, are incompatible: defaultValue.rank = ${n} must be less than ragged tensor input flatValues.rank = ${i})`);for(let s=0;s=0&&i>=0&&1!==n&&n!==i)throw new Error(`defaultValue.shape=${t}, and ragged tensor input flatValues.shape=${e} are incompatible: defaultValue.shape[${s-t.length}] = ${n} but ragged tensor input.flatValues.shape[${s-t.length}] = ${i}`)}}!function(t){t[t.FIRST_DIM_SIZE=0]="FIRST_DIM_SIZE",t[t.VALUE_ROWIDS=1]="VALUE_ROWIDS",t[t.ROW_LENGTHS=2]="ROW_LENGTHS",t[t.ROW_SPLITS=3]="ROW_SPLITS",t[t.ROW_LIMITS=4]="ROW_LIMITS",t[t.ROW_STARTS=5]="ROW_STARTS"}(lG||(lG={})); +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const dG=30;function fG(t){return t<=dG?t:WO(t,Math.floor(Math.sqrt(t)))} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function mG(t,e,n){return[n*("number"==typeof t?t:t[0]),e*("number"==typeof t?t:t[1])]} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function gG(t,e,n,i=!0){let s=[];if(i)s=s.concat(e.slice(0)),s.push(t[0]/n),s=s.concat(t.slice(1));else{s=s.concat(t[0]);const n=e.length;for(let i=0;i=2*e+1||i%2==1?s.push(i):n.push(i);i.push(...n),i.push(0),i.push(...s)}return i}function TG(t,e,n,i=!0){const s=[];i?s.push(t[0]/n):s.push(t[0]*n);for(let n=1;n/g,BG=",",VG="...";function UG(t,e){const n=((t=t.replace(/\s/g,"")).length-t.replace($G,"").length)/PG.length;if(n<1)throw new Error("Equations without an arrow are not supported.");if(n>1)throw new Error(`Equation must contain exactly one arrow ("${PG}").`);const[i,s]=t.split(PG);_O(-1===i.indexOf(VG),(()=>`The ellipsis notation ("${VG}") is not supported yet.`));const r=i.split(BG),a=r.length;if(e!==a)throw new Error(`Expected ${a} input tensors, received ${e}`);if(a>2)throw new Error("Support for more than 2 input tensors is not implemented yet.");const o=[];for(let t=0;t-1!==t.indexOf(e))))throw new Error(`Output subscripts contain the label ${e} not present in the input subscripts.`);-1===o.indexOf(e)&&o.push(e)}for(let t=0;t-1!==t)),{permutationIndices:n,expandDims:i}}function GG(t,e,n){const i=new Array(t);for(let t=0;t`Expected dimension ${i[e[t][n]]} at axis ${n} of input shaped ${JSON.stringify(s)}, but got dimension ${s[n]}`))}}function HG(t,e){const n=t,i=[];let s=0;0===t.length&&n.push(-1),s=t.length+1;for(let t=0;tt===e))}function zG(t,e){const n=[];for(let i=0;i"Number of splits must evenly divide the axis.")),i=new Array(e).fill(t.shape[n]/e);else{const s=e.reduce(((t,e)=>(-1===e&&(t+=1),t)),0);_O(s<=1,(()=>"There should be only one negative value in split array."));const r=e.indexOf(-1);if(-1!==r){const i=e.reduce(((t,e)=>e>0?t+e:t));e[r]=t.shape[n]-i}_O(t.shape[n]===e.reduce(((t,e)=>t+e)),(()=>"The sum of sizes must match the size of the axis dimension.")),i=e}return i} +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function jG(t){return`Received SparseTensor with denseShape[0] = 0 but\n indices.shape[0] = ${t}`}function qG(t,e){return`indices(${t}, 0) is invalid: ${e} < 0`}function KG(t,e,n){return`indices(${t}, 0) is invalid: ${e} >= ${n}`} +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function QG(t,e){return`only one output dimension may be -1, not both ${t} and ${e}`}function JG(t,e){return`size ${t} must be non-negative, not ${e}`}function ZG(){return"reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are non-zero"}function tH(t,e){return`Input to reshape is a SparseTensor with ${IO(t)}\n dense values, but the requested shape requires a multiple of ${IO(e)}. inputShape=${t} outputShape= ${e}`}function eH(t,e){return`Input to reshape is a tensor with ${IO(t)} dense values, but the requested shape has ${IO(e)}. inputShape=${t} outputShape=${e}`} +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function nH(){return"segment ids must be >= 0"}function iH(){return"segment ids are not increasing"}function sH(t,e){return`Segment id ${t} out of range [0, ${e}), possibly because segmentIds input is not sorted.`}function rH(t,e,n){return`Bad: indices[${t}] == ${e} out of range [0, ${n})`} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function aH(t,e){let n,i=!1;for(t<=dG?(n=t,i=!0):n=WO(t,Math.floor(Math.sqrt(t)));!i;)n>e||n===t?i=!0:n=WO(t,n+1);return n}function oH(t,e,n){const i=[],s=t.length;for(let r=0;rs))throw new Error(`Expect batchDims in the range of [-${s}, ${s}], but got ${i}`);if(i<0&&(i+=s),i>r)throw new Error(`batchDims (${i}) must be less than rank(x) (\n ${r}).`);if(nlk(t)))}catch(t){throw new Error(`Failed to decode encoded string bytes into utf-8, error: ${t}`)}}function hH(t){return t.map((t=>ok(t)))} +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +!function(){for(const t of vF)rF(t)}(); +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const pH={kernelName:pA,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>GL(t,gU(PL(n,"float32"),-1))}}},cH={kernelName:cA,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>{const e=WL(PL(n,"float32")),i=HL(cF(tF(1),e));return XF(YL(t,i))}}}},dH={kernelName:dA,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>{const e=HL(cF(WL(PL(n,"float32")),1));return YL(t,e)}}}},fH={kernelName:fA,inputsToSave:["a","b"],gradFunc:(t,e)=>{const[n,i]=e,s=_F(n.shape,i.shape);return{a:()=>{let e=t;const i=gF(n.shape,s);return i.length>0&&(e=bB(e,i)),y$(e,n.shape)},b:()=>{let e=t;const n=gF(i.shape,s);return n.length>0&&(e=bB(e,n)),y$(e,i.shape)}}}},mH={kernelName:mA,saveAllInputs:!0,gradFunc:(t,e)=>{const n={};return e.forEach(((e,i)=>{n[i]=()=>t.clone()})),n}},gH={kernelName:TA,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>zL(n)}}},_H={kernelName:yA,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>zL(n)}}},TH={kernelName:IA,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>YL(t,HL(cF(tF(1),WL(PL(n,"float32")))))}}},yH={kernelName:EA,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>{const e=HL(VL(tF(1),WL(PL(n,"float32"))));return YL(t,e)}}}},IH={kernelName:wA,inputsToSave:["a","b"],gradFunc:(t,e)=>{const[n,i]=e,s=_F(n.shape,i.shape);return{a:()=>{const e=VL(WL(n),WL(i));let r=GL(t,YL(i,e));const a=gF(n.shape,s);return a.length>0&&(r=bB(r,a)),y$(r,n.shape)},b:()=>{const e=VL(WL(n),WL(i));let r=XF(GL(t,YL(n,e)));const a=gF(i.shape,s);return a.length>0&&(r=bB(r,a)),y$(r,i.shape)}}}},EH={kernelName:bA,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>YL(t,VL(WL(PL(n,"float32")),1))}}},bH={kernelName:vA,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>YL(t,cF(tF(1),WL(PL(n,"float32"))))}}};const vH=oD({avgPool3dGrad_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s,r){const a=sD(t,"dy","avgPool3dGrad"),o=sD(e,"input","avgPool3dGrad");let l=a,u=o,h=!1;4===o.rank&&(h=!0,l=y$(a,[1,a.shape[0],a.shape[1],a.shape[2],a.shape[3]]),u=y$(o,[1,o.shape[0],o.shape[1],o.shape[2],o.shape[3]])),_O(5===l.rank,(()=>`Error in avgPool3dGrad: dy must be rank 5 but got rank ${l.rank}.`)),_O(5===u.rank,(()=>`Error in avgPool3dGrad: input must be rank 5 but got rank ${u.rank}.`)),T$("avgPool3dGrad",s,r);const p={dy:l,input:u},c={filterSize:n,strides:i,pad:s,dimRoundingMode:r},d=jk.runKernel(OA,p,c);return h?y$(d,[d.shape[1],d.shape[2],d.shape[3],d.shape[4]]):d}}),wH={kernelName:RA,inputsToSave:["x"],gradFunc:(t,e,n)=>{const[i]=e,{filterSize:s,strides:r,pad:a,dimRoundingMode:o}=n;return{x:()=>vH(t,i,s,r,a,o)}}};const SH=oD({avgPoolGrad_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s){const r=sD(t,"dy","avgPoolGrad"),a=sD(e,"input","avgPoolGrad");_O(a.rank===r.rank,(()=>`Rank of input (${a.rank}) does not match rank of dy (${r.rank})`));let o=a,l=r,u=!1;3===a.rank&&(u=!0,o=y$(a,[1,a.shape[0],a.shape[1],a.shape[2]]),l=y$(r,[1,r.shape[0],r.shape[1],r.shape[2]])),_O(4===l.rank,(()=>`Error in avgPoolGrad: dy must be rank 4 but got rank ${l.rank}.`)),_O(4===o.rank,(()=>`Error in avgPoolGrad: input must be rank 4 but got rank ${o.rank}.`));const h={dy:l,input:o},p={filterSize:n,strides:i,pad:s},c=jk.runKernel(xA,h,p);return u?y$(c,[c.shape[1],c.shape[2],c.shape[3]]):c}}),xH={kernelName:SA,inputsToSave:["x"],gradFunc:(t,e,n)=>{const[i]=e,{filterSize:s,strides:r,pad:a}=n;return{x:()=>SH(t,i,s,r,a)}}},RH={kernelName:AA,inputsToSave:["a","b"],gradFunc:(t,e,n)=>{const[i,s]=e,{transposeA:r,transposeB:a}=n;return r||a?!r&&a?{a:()=>HF(t,s,!1,!1),b:()=>HF(t,i,!0,!1)}:r&&!a?{a:()=>HF(s,t,!1,!0),b:()=>HF(i,t,!1,!1)}:{a:()=>HF(s,t,!0,!0),b:()=>HF(t,i,!0,!0)}:{a:()=>HF(t,s,!1,!0),b:()=>HF(i,t,!0,!1)}}},OH={kernelName:MA,gradFunc:(t,e,n)=>{const{blockShape:i,crops:s}=n;return{x:()=>vV(t,i,s)}}},AH={kernelName:kA,gradFunc:(t,e,n)=>{const i=n,s=i.inputShape,r=i.shape,a=Array.from(r);for(let t=s.length-1;t>=0;t--)if(s[t]===r[t])a[t]=1;else if(1!==s[t])throw new Error(`broadcastTo(): [${s}] cannot be broadcast to [${r}].`);const o=[];for(let t=0;t1&&o.push(t);return{x:()=>bB(t,o,!0)}}},MH={kernelName:LA,gradFunc:t=>({x:()=>t.clone()})},CH={kernelName:FA,gradFunc:t=>({x:()=>zL(t)})},NH={kernelName:PA,inputsToSave:["x"],gradFunc:(t,e,n)=>{const[i]=e,{clipValueMin:s,clipValueMax:r}=n;return{x:()=>rB(qB(DB(i,s),VB(i,r)),t,zL(t))}}},kH={kernelName:BA,inputsToSave:["x"],gradFunc:pH.gradFunc},DH={kernelName:VA,saveAllInputs:!0,gradFunc:(t,e,n)=>{const i=e.map((t=>t.shape)),{axis:s}=n,r=CO(s,e[0].shape)[0],a=i.map((t=>t[r]));return pU(t,a,r).map((t=>()=>t))}},LH={kernelName:UA,inputsToSave:["x","filter"],gradFunc:(t,e,n)=>{const[i,s]=e,{dilations:r,strides:a,pad:o,dataFormat:l}=n;return _O(f$(r),(()=>`Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${r}'`)),{x:()=>H$(i.shape,t,s,a,o,l),filter:()=>GU(i,t,s.shape,a,o,l)}}},FH={kernelName:GA,inputsToSave:["dy","filter"],gradFunc:(t,e,n)=>{const[i,s]=e,{strides:r,pad:a,dataFormat:o,dimRoundingMode:l}=n;return{dy:()=>Y$(t,s,r,a,o,1,l),filter:()=>GU(t,i,s.shape,r,a,o,l)}}};const PH=oD({conv3DBackpropFilter_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s){let r=t;4===t.rank&&(r=y$(t,[1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]]));let a=e;4===a.rank&&(a=y$(e,[1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]])),_O(5===r.rank,(()=>`Error in conv3dDerFilter: input must be rank 5, but got shape ${r.shape}.`)),_O(5===a.rank,(()=>`Error in conv3dDerFilter: dy must be rank 5, but got shape ${a.shape}.`)),_O(5===n.length,(()=>`Error in conv3dDerFilter: filterShape must be length 5, but got ${n}.`)),_O(r.shape[4]===n[3],(()=>`Error in conv3dDerFilter: depth of input ${r.shape[4]}) must match input depth in filter (${n[3]}.`)),_O(a.shape[4]===n[4],(()=>`Error in conv3dDerFilter: depth of dy (${a.shape[4]}) must match output depth for filter (${n[4]}).`));const o={x:r,dy:a},l={strides:i,pad:s,filterShape:n};return jk.runKernel(WA,o,l)}}),$H={kernelName:HA,inputsToSave:["x","filter"],gradFunc:(t,e,n)=>{const{dilations:i,strides:s,pad:r}=n;_O(f$(i),(()=>`Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${i}'`));const[a,o]=e;return{x:()=>X$(a.shape,t,o,s,r),filter:()=>PH(a,t,o.shape,s,r)}}},BH={kernelName:XA,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>GL(XF(eU(PL(n,"float32"))),t)}}},VH={kernelName:jA,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>GL(nU(PL(n,"float32")),t)}}},UH={kernelName:KA,inputsToSave:["x"],gradFunc:(t,e,n)=>{const[i]=e,{axis:s,exclusive:r,reverse:a}=n;return{x:()=>{const e=_B([s],i.rank);let n=J$(t,s,r,!a);return null!=e&&(n=qF(n,e)),n}}}},YH={kernelName:tM,inputsToSave:["x","filter"],gradFunc:(t,e,n)=>{const{dilations:i,strides:s,pad:r,dimRoundingMode:a}=n,o=null==i?[1,1]:i;_O(f$(o),(()=>`Error in gradient of depthwiseConv2dNative: dilation rates greater than 1 are not yet supported. Got dilations '${o}'`));const[l,u]=e;return _O(4===l.rank,(()=>`Error in gradient of depthwiseConv2dNative: input must be rank 4, but got rank ${l.rank}.`)),_O(4===u.rank,(()=>`Error in gradient of depthwiseConv2dNative: filter must be rank 4, but got rank ${u.rank}.`)),_O(l.shape[3]===u.shape[2],(()=>`Error in gradient of depthwiseConv2d: number of input channels (${l.shape[3]}) must match the inChannels dimension in filter ${u.shape[2]}.`)),_O(m$(s,o),(()=>`Error in gradient of depthwiseConv2d: Either strides or dilations must be 1. Got strides ${s} and dilations '${o}'.`)),T$("depthwiseConv2d",r,a),{x:()=>KU(l.shape,t,u,s,r,o,a),filter:()=>qU(l,t,u.shape,s,r,o,a)}}},GH={kernelName:sM,inputsToSave:["x","filter"],gradFunc:(t,e,n)=>{const[i,s]=e,r={x:i,filter:s,dy:t},a={x:i,filter:s,dy:t};return{x:()=>jk.runKernel(rM,r,n),filter:()=>jk.runKernel(aM,a,n)}}},HH={kernelName:hM,outputsToSave:[!0],gradFunc:(t,e)=>{const[n]=e,i={dy:t,y:n};return{x:()=>jk.runKernel(pM,i)}}},WH={kernelName:cM,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e,i=GL(xB(XF(WL(n))),2/Math.sqrt(Math.PI));return{x:()=>GL(t,i)}}},zH={kernelName:fM,outputsToSave:[!0],gradFunc:(t,e)=>{const[n]=e;return{x:()=>GL(t,n)}}},XH={kernelName:mM,inputsToSave:["input"],gradFunc:(t,e)=>{const[n]=e;return{input:()=>y$(t,n.shape)}}},jH={kernelName:gM,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>GL(t,xB(n))}}},qH={kernelName:IM,gradFunc:t=>({x:()=>zL(t)})},KH={kernelName:EM,inputsToSave:["a","b"],gradFunc:(t,e)=>{const[n,i]=e,s=_F(n.shape,i.shape);return{a:()=>{const e=YL(t,PL(i,"float32")),r=gF(n.shape,s);return r.length>0?y$(bB(e,r),n.shape):e},b:()=>{let e=GL(t,PL(n,"float32"));const r=gF(i.shape,s);r.length>0&&(e=y$(bB(e,r),i.shape));const a=WL(i);return XF(YL(e,PL(a,"float32")))}}}},QH={kernelName:bM,inputsToSave:["x","mean","variance","scale"],gradFunc:(t,e,n)=>{const{varianceEpsilon:i}=n,[s,r,a,o]=e,l=null==o?tF(1):o,u=gF(r.shape,s.shape),h=[];if(1===r.rank){for(let t=0;t1===r.rank?y$(GL(GL(t,AB(y$(d,[1,1,1,r.shape[0]]),h)),l),s.shape):y$(GL(GL(t,d),l),s.shape),mean:()=>{let t=GL(GL(d,tF(-1)),c);return 1===r.rank&&(t=bB(t,u)),y$(t,r.shape)},variance:()=>{let t=GL(GL(f,p),c);return 1===r.rank&&(t=bB(t,u)),y$(t,r.shape)},scale:()=>{const e=GL(p,d);let n=GL(t,e);return 1===r.rank&&(n=bB(n,u)),y$(n,r.shape)},offset:()=>{let e=t;return 1===r.rank&&(e=bB(e,u)),y$(e,r.shape)}}}},JH={kernelName:vM,inputsToSave:["x","indices"],gradFunc:(t,e,n)=>{const[i,s]=e,{axis:r,batchDims:a}=n,o=CO(r,i.shape)[0],l=(t,e,n)=>()=>{const i=t.shape,s=e.size,a=i.slice(0,o),l=a.length,u=i.slice(r,i.length).slice(1),h=u.length,p=ZH(0,l),c=ZH(l+1,l+1+h),d=tW([a,[s],u]),f=y$(n,d),m=y$(e,[s]),g=tW([[l],p,c]),_=qF(f,g);let T=OU(_,m,t.shape[o]);const y=TB(g);return T=qF(T,y),T};if(1===a){const e=i.shape[0],n=i.split(e,0);return{x:()=>{const e=mU(n.map(((e,n)=>l(e,s.slice(n,1),t.slice(n,1))())));return e.reshape(i.shape)},indices:()=>s}}return{x:l(i,s,t),indices:()=>s}}};function ZH(t,e){const n=[];for(let i=t;i{const[n,i]=e;return{a:()=>zL(n),b:()=>zL(i)}}},nW={kernelName:RM,gradFunc:t=>({x:()=>PL(t,"float32")})},iW={kernelName:MM,gradFunc:t=>({x:()=>zL(t)})},sW={kernelName:CM,gradFunc:t=>({x:()=>zL(t)})},rW={kernelName:NM,gradFunc:t=>({x:()=>zL(t)})},aW={kernelName:kM,inputsToSave:["x"],gradFunc:(t,e,n)=>{const[i]=e,{alpha:s}=n,r=kB(i,0);return{x:()=>rB(r,t,GL(t,s))}}},oW={kernelName:$M,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>YL(t,VL(n,1))}}},lW={kernelName:PM,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>YL(t,PL(n,"float32"))}}},uW={kernelName:GM,inputsToSave:[],outputsToSave:[!0],gradFunc:(t,e,n)=>{const[i]=e,{axis:s}=n;return{logits:()=>{const e=xB(i);return cF(t,GL(bB(t,s,!0),e))}}}};const hW=oD({localResponseNormalizationBackprop_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i=5,s=1,r=1,a=.5){const o={x:t,y:e,dy:n},l={depthRadius:i,bias:s,alpha:r,beta:a};return jk.runKernel(zM,o,l)}}),pW={kernelName:WM,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(t,e,n)=>{const[i,s]=e,{depthRadius:r,bias:a,alpha:o,beta:l}=n;return{x:()=>hW(i,s,t,r,a,o,l)}}}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function cW(t,e,n,i){return e.rankGL(t,PL(sB(n,e),t.dtype))}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const dW={kernelName:jM,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(t,e,n)=>{const i=n,{reductionIndices:s}=i,r=e[0],a=cW(t,e[1],r,CO(s,r.shape));return{x:()=>a.x()}}},fW={kernelName:qM,inputsToSave:["a","b"],gradFunc:(t,e)=>{const[n,i]=e;return{a:()=>GL(t,PL(DB(n,i),"float32")),b:()=>GL(t,PL(BB(n,i),"float32"))}}};const mW=oD({maxPool3dGrad_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s,r,a){const o=sD(t,"dy","maxPool3dGrad"),l=sD(e,"input","maxPool3dGrad"),u=sD(n,"output","maxPool3dGrad");let h=o,p=l,c=u,d=!1;4===l.rank&&(d=!0,h=y$(o,[1,o.shape[0],o.shape[1],o.shape[2],o.shape[3]]),p=y$(l,[1,l.shape[0],l.shape[1],l.shape[2],l.shape[3]]),c=y$(u,[1,u.shape[0],u.shape[1],u.shape[2],u.shape[3]])),_O(5===h.rank,(()=>`Error in maxPool3dGrad: dy must be rank 5 but got rank ${h.rank}.`)),_O(5===p.rank,(()=>`Error in maxPool3dGrad: input must be rank 5 but got rank ${p.rank}.`)),_O(5===c.rank,(()=>`Error in maxPool3dGrad: output must be rank 5 but got rank ${c.rank}.`)),T$("maxPool3dGrad",r,a);const f={dy:h,input:p,output:c},m={filterSize:i,strides:s,pad:r,dimRoundingMode:a},g=jk.runKernel(ZM,f,m);return d?y$(g,[g.shape[1],g.shape[2],g.shape[3],g.shape[4]]):g}}),gW={kernelName:JM,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(t,e,n)=>{const[i,s]=e,{filterSize:r,strides:a,pad:o,dimRoundingMode:l}=n;return{x:()=>mW(t,i,s,r,a,o,l)}}};const _W=oD({maxPoolGrad_: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s,r,a){const o=sD(t,"dy","maxPoolGrad"),l=sD(e,"input","maxPoolGrad"),u=sD(n,"output","maxPoolGrad");_O(l.rank===o.rank,(()=>`Rank of input (${l.rank}) does not match rank of dy (${o.rank})`)),_O(4===o.rank,(()=>`Error in maxPoolGrad: dy must be rank 4 but got rank ${o.rank}.`)),_O(4===l.rank,(()=>`Error in maxPoolGrad: input must be rank 4 but got rank ${l.rank}.`)),T$("maxPoolGrad",r,a);const h={dy:o,input:l,output:u},p={filterSize:i,strides:s,pad:r,dimRoundingMode:a};return jk.runKernel(QM,h,p)}}),TW={kernelName:KM,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(t,e,n)=>{const[i,s]=e,{filterSize:r,strides:a,pad:o}=n;return{x:()=>_W(t,i,s,r,a,o)}}},yW={kernelName:sC,inputsToSave:["x"],gradFunc:(t,e,n)=>{const i=e[0],{paddings:s}=n,r=s.map((t=>t[0]));return{x:()=>w$(t,r,i.shape)}}},IW={kernelName:gC,inputsToSave:["x"],gradFunc:(t,e,n)=>{const i=e[0],{paddings:s}=n,r=s.map((t=>t[0]));return{x:()=>w$(t,r,i.shape)}}},EW={kernelName:TC,inputsToSave:["a","b"],outputsToSave:[!0],gradFunc:(t,e)=>{const[n,i,s]=e,r=n,a=i,o=_F(r.shape,a.shape);return{a:()=>{const e=PL(a,"float32");let n=GL(t,GL(e,pF(r,cF(e,tF(1)))));const i=gF(r.shape,o);return i.length>0&&(n=bB(n,i)),y$(n,r.shape)},b:()=>{const e=kB(r,0),n=rB(e,GB(r),zL(r));let i=GL(t,GL(s,n));const l=gF(a.shape,o);return l.length>0&&(i=bB(i,l)),y$(i,a.shape)}}}};function bW(t,e,n){const i=t.shape.length,s=i-n.length,r=_B(n,i);let a=t;null!=r&&(a=qF(t,r));const o=a.shape.slice(),l=o.splice(i-n.length,n.length).reduce(((t,e)=>t*e),1);o.push(l);let u= +/** + * @license + * Copyright 2022 Google Inc. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=t.shape.slice();i[n]=1;const s=y$(e,i),r=Q$(t,n,!0,!1),a=Q$(t,n,!0,!0),o=GL(r,a);return GL(s,o)}(a.reshape(o),e,s);if(u=u.reshape(a.shape),null!=r){const t=TB(r);u=qF(u,t)}return u}const vW={kernelName:UC,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>{const e=kB(n,tF(0)),i=tF(EG),s=tF(bG),r=GL(t,s),a=GL(GL(t,i),xB(PL(n,"float32")));return rB(e,r,a)}}}},wW={kernelName:KC,gradFunc:(t,e,n)=>{const{blockShape:i,paddings:s}=n;return{x:()=>R$(t,i,s)}}},SW={kernelName:QC,gradFunc:(t,e,n)=>{const{axis:i}=n;return{x:()=>b$(t,i)}}}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const xW=[pH,cH,dH,fH,mH,gH,_H,TH,yH,IH,EH,bH,wH,xH,RH,OH,AH,MH,CH,NH,kH,DH,FH,LH,$H,BH,VH,UH,YH,GH,{kernelName:lM,inputsToSave:["a","b"],gradFunc:(t,e)=>{const[n,i]=e,s=_F(n.shape,i.shape);return{a:()=>{const e=YL(t,PL(i,"float32")),r=gF(n.shape,s);return r.length>0?y$(bB(e,r),n.shape):e},b:()=>{let e=GL(t,PL(n,"float32"));const r=gF(i.shape,s);r.length>0&&(e=y$(bB(e,r),i.shape));const a=WL(i);return XF(YL(e,PL(a,"float32")))}}}},HH,WH,zH,XH,jH,KH,qH,QH,JH,eW,nW,iW,sW,rW,aW,oW,lW,uW,pW,dW,dW,fW,gW,TW,{kernelName:eC,inputsToSave:["x"],gradFunc:(t,e,n)=>{const[i]=e,{axis:s}=n,r=CO(s,i.shape),a=IO(fB(i.shape,r)[1]);return{x:()=>{const e=i.shape.slice();r.forEach((t=>{e[t]=1}));const n=y$(t,e);return YL(GL(n,oV(i.shape,"float32")),a)}}}},{kernelName:nC,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(t,e,n)=>{const i=n,{axis:s}=i,[r,a]=e,o=cW(t,a,r,CO(s,r.shape));return{x:()=>o.x()}}},{kernelName:iC,inputsToSave:["a","b"],gradFunc:(t,e)=>{const[n,i]=e;return{a:()=>GL(t,PL(VB(n,i),"float32")),b:()=>GL(t,PL(kB(n,i),"float32"))}}},yW,{kernelName:rC,inputsToSave:["a","b"],gradFunc:(t,e)=>{const[n,i]=e,s=_F(n.shape,i.shape);return{a:()=>{const e=gF(n.shape,s);return e.length>0?y$(bB(t,e),n.shape):t},b:()=>{const e=GL(t,XF(CB(YL(n,i)))),r=gF(i.shape,s);return r.length>0?y$(bB(e,r),i.shape):e}}}},{kernelName:oC,inputsToSave:["a","b"],gradFunc:(t,e)=>{const[n,i]=e,s=_F(n.shape,i.shape);return{a:()=>{const e=GL(t,PL(i,"float32")),r=gF(n.shape,s);return r.length>0?y$(bB(e,r),n.shape):e},b:()=>{const e=GL(t,PL(n,"float32")),r=gF(i.shape,s);return r.length>0?y$(bB(e,r),i.shape):e}}}},{kernelName:lC,gradFunc:t=>({x:()=>XF(t)})},{kernelName:fC,inputsToSave:["indices"],gradFunc:(t,e)=>{const n=e[0];return{indices:()=>aV(n.shape,"float32")}}},{kernelName:dC,gradFunc:t=>({x:()=>zL(t)})},{kernelName:mC,saveAllInputs:!0,gradFunc:(t,e,n)=>{const{axis:i}=n;return AU(t,i).map((t=>()=>t))}},IW,IW,EW,{kernelName:yC,inputsToSave:["x","alpha"],gradFunc:(t,e)=>{const[n,i]=e,s=kB(n,0);return{x:()=>rB(s,t,GL(t,i)),alpha:()=>{let e=rB(s,zL(t),GL(t,n));const r=gF(i.shape,t.shape);return r.length>0&&(e=bB(e,r)),y$(e,i.shape)}}}},{kernelName:IC,inputsToSave:["x"],gradFunc:(t,e,n)=>{const[i]=e,{axis:s}=n;let r=[];return r=null==s?i.shape.map(((t,e)=>e)):"number"==typeof s?[s]:s,{x:()=>bW(i,t,r)}}},{kernelName:xC,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>YL(t,XF(WL(n)))}}},{kernelName:kC,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e,i=GL(VB(n,6),gU(n));return{x:()=>GL(t,PL(i,"float32"))}}},{kernelName:RC,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>GL(t,PL(gU(n),"float32"))}}},{kernelName:OC,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>y$(t,n.shape)}}},{kernelName:CC,inputsToSave:["images"],gradFunc:(t,e,n)=>{const[i]=e,s={dy:t,images:i};return{images:()=>jk.runKernel(NC,s,n)}}},{kernelName:AC,inputsToSave:["images"],gradFunc:(t,e,n)=>{const[i]=e,s={dy:t,images:i};return{images:()=>jk.runKernel(MC,s,n)}}},{kernelName:DC,gradFunc:(t,e,n)=>{const{dims:i}=n,s=CO(i,t.shape);return{x:()=>HV(t,s)}}},{kernelName:LC,gradFunc:t=>({x:()=>zL(t)})},{kernelName:FC,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>XF(YL(t,GL(pF(n,1.5),2)))}}},{kernelName:VC,inputsToSave:["condition"],gradFunc:(t,e)=>{const[n]=e;return{condition:()=>PL(zL(n),"float32"),t:()=>GL(t,PL(n,t.dtype)),e:()=>GL(t,PL(KB(n),t.dtype))}}},vW,{kernelName:zC,outputsToSave:[!0],gradFunc:(t,e)=>{const[n]=e;return{x:()=>GL(t,GL(n,cF(tF(1),n)))}}},{kernelName:WC,gradFunc:t=>({x:()=>zL(t)})},{kernelName:GC,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>GL(q$(PL(n,"float32")),t)}}},{kernelName:HC,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>GL(K$(PL(n,"float32")),t)}}},{kernelName:YC,inputsToSave:["x"],gradFunc:(t,e,n)=>{const[i]=e,{begin:s,size:r}=n,a=i.shape,[o,l]=RP(i,s,r),u=[];for(let e=0;eTV(t,u)}}},{kernelName:JC,outputsToSave:[!0],gradFunc:(t,e,n)=>{const[i]=e,{dim:s}=n,r=GL(t,i);return{logits:()=>cF(r,GL(bB(r,[s],true),i))}}},{kernelName:XC,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>GL(t,v$(n))}}},wW,wW,SW,SW,{kernelName:jC,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>YL(t,GL(HL(PL(n,"float32")),2))}}},{kernelName:sN,inputsToSave:["a","b"],gradFunc:(t,e)=>{const[n,i]=e,s=tF(2);return{a:()=>GL(t,GL(s,cF(n,i))),b:()=>GL(t,GL(s,cF(i,n)))}}},{kernelName:rN,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>GL(t,GL(PL(n,"float32"),2))}}},{kernelName:vN,gradFunc:t=>({x:()=>zL(t)})},{kernelName:pN,inputsToSave:["a","b"],gradFunc:(t,e)=>{const[n,i]=e,s=_F(n.shape,i.shape);return{a:()=>{let e=t;const i=gF(n.shape,s);return i.length>0&&(e=bB(e,i)),y$(e,n.shape)},b:()=>{let e=t;const n=gF(i.shape,s);return n.length>0&&(e=bB(e,n)),y$(XF(e),i.shape)}}}},{kernelName:qC,inputsToSave:["x"],gradFunc:(t,e,n)=>{const[i]=e,s=i.shape.slice(),{axis:r}=n;CO(r,i.shape).forEach((t=>{s[t]=1}));const a=y$(t,s),o=GL(a,oV(i.shape,"float32"));return{x:()=>o}}},{kernelName:cN,inputsToSave:["x"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>YL(t,WL(q$(n)))}}},{kernelName:dN,outputsToSave:[!0],gradFunc:(t,e)=>{const[n]=e;return{x:()=>GL(cF(tF(1),WL(n)),t)}}},{kernelName:fN,inputsToSave:["x"],gradFunc:(t,e,n)=>{const[i]=e,{reps:s}=n;return{x:()=>{let e=zL(i);if(1===i.rank)for(let n=0;n{const i=n,{perm:s}=i,r=TB(s);return{x:()=>qF(t,r)}}},{kernelName:yN,gradFunc:(t,e,n)=>{const i=n,{axis:s}=i;return{value:()=>mU(t,s)}}},{kernelName:IN,inputsToSave:["segmentIds"],gradFunc:(t,e)=>{const[n]=e;return{x:()=>function(t,e){const n=TF(e,zL(e)),i=NB(t,n);let s=DB(e,tF(0,"int32"));const r=i.rank-s.rank;for(let t=0;t({x:()=>zL(t)})}];for(const t of xW)PN(t); +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.abs=function(){return this.throwIfDisposed(),fF(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.acos=function(){return this.throwIfDisposed(),zP(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.acosh=function(){return this.throwIfDisposed(),XP(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.add=function(t){return this.throwIfDisposed(),VL(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.all=function(t,e){return this.throwIfDisposed(),qP(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.any=function(t,e){return this.throwIfDisposed(),KP(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.argMax=function(t){return this.throwIfDisposed(),QP(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.argMin=function(t){return this.throwIfDisposed(),JP(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.asScalar=function(){return this.throwIfDisposed(),_O(1===this.size,(()=>"The array must have only 1 element.")),y$(this,[])}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.asType=function(t){return this.throwIfDisposed(),PL(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.as1D=function(){return this.throwIfDisposed(),y$(this,[this.size])}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.as2D=function(t,e){return this.throwIfDisposed(),y$(this,[t,e])}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.as3D=function(t,e,n){return this.throwIfDisposed(),y$(this,[t,e,n])}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.as4D=function(t,e,n,i){return this.throwIfDisposed(),y$(this,[t,e,n,i])}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.as5D=function(t,e,n,i,s){return this.throwIfDisposed(),y$(this,[t,e,n,i,s])}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.asin=function(){return this.throwIfDisposed(),ZP(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.asinh=function(){return this.throwIfDisposed(),t$(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.atan=function(){return this.throwIfDisposed(),e$(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.atan2=function(t){return this.throwIfDisposed(),n$(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.atanh=function(){return this.throwIfDisposed(),i$(this)},Rk().prototype.avgPool=function(t,e,n,i){return this.throwIfDisposed(),I$(this,t,e,n,i)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.batchToSpaceND=function(t,e){return this.throwIfDisposed(),R$(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.batchNorm=function(t,e,n,i,s){return this.throwIfDisposed(),O$(this,t,e,n,i,s)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.broadcastTo=function(t){return this.throwIfDisposed(),L$(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.cast=function(t){return this.throwIfDisposed(),PL(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.ceil=function(){return this.throwIfDisposed(),F$(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.clipByValue=function(t,e){return this.throwIfDisposed(),P$(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.concat=function(t,e){return this.throwIfDisposed(),t instanceof xk&&(t=[t]),b$([this,...t],e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.conv1d=function(t,e,n,i,s,r){return this.throwIfDisposed(),G$(this,t,e,n,i,s,r)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.conv2dTranspose=function(t,e,n,i,s){return this.throwIfDisposed(),W$(this,t,e,n,i,s)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.conv2d=function(t,e,n,i,s,r){return this.throwIfDisposed(),Y$(this,t,e,n,i,s,r)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.cos=function(){return this.throwIfDisposed(),q$(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.cosh=function(){return this.throwIfDisposed(),K$(this)}, +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.cumprod=function(t,e,n){return this.throwIfDisposed(),Q$(this,t,e,n)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.cumsum=function(t,e,n){return this.throwIfDisposed(),J$(this,t,e,n)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.depthToSpace=function(t,e){return this.throwIfDisposed(),tB(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.depthwiseConv2d=function(t,e,n,i,s,r){return this.throwIfDisposed(),eB(this,t,e,n,i,s,r)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.dilation2d=function(t,e,n,i,s){return this.throwIfDisposed(),iB(this,t,e,n,i,s)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.divNoNan=function(t){return this.throwIfDisposed(),aB(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.div=function(t){return this.throwIfDisposed(),YL(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.dot=function(t){return this.throwIfDisposed(),oB(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.elu=function(){return this.throwIfDisposed(),uB(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.equal=function(t){return this.throwIfDisposed(),sB(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.erf=function(){return this.throwIfDisposed(),pB(this)}, +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.euclideanNorm=function(t,e){return this.throwIfDisposed(),SB(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.exp=function(){return this.throwIfDisposed(),xB(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.expandDims=function(t){return this.throwIfDisposed(),RB(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.expm1=function(){return this.throwIfDisposed(),OB(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.fft=function(){return this.throwIfDisposed(),lU(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.flatten=function(){return this.throwIfDisposed(),y$(this,[this.size])}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.floor=function(){return this.throwIfDisposed(),CB(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.floorDiv=function(t){return this.throwIfDisposed(),UL(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.gather=function(t,e,n){return this.throwIfDisposed(),NB(this,t,e,n)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.greaterEqual=function(t){return this.throwIfDisposed(),DB(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.greater=function(t){return this.throwIfDisposed(),kB(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.ifft=function(){return this.throwIfDisposed(),uU(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.irfft=function(){return this.throwIfDisposed(),hU(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.isFinite=function(){return this.throwIfDisposed(),LB(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.isInf=function(){return this.throwIfDisposed(),FB(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.isNaN=function(){return this.throwIfDisposed(),PB(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.leakyRelu=function(t){return this.throwIfDisposed(),$B(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.lessEqual=function(t){return this.throwIfDisposed(),VB(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.less=function(t){return this.throwIfDisposed(),BB(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.localResponseNormalization=function(t,e,n,i){return this.throwIfDisposed(),YB(this,t,e,n,i)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.logSigmoid=function(){return this.throwIfDisposed(),zB(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.logSoftmax=function(t){return this.throwIfDisposed(),XB(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.logSumExp=function(t,e){return this.throwIfDisposed(),jB(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.log=function(){return this.throwIfDisposed(),GB(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.log1p=function(){return this.throwIfDisposed(),HB(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.logicalAnd=function(t){return this.throwIfDisposed(),qB(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.logicalNot=function(){return this.throwIfDisposed(),KB(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.logicalOr=function(t){return this.throwIfDisposed(),QB(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.logicalXor=function(t){return this.throwIfDisposed(),JB(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.matMul=function(t,e,n){return this.throwIfDisposed(),HF(this,t,e,n)},Rk().prototype.maxPool=function(t,e,n,i){return this.throwIfDisposed(),nV(this,t,e,n,i)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.max=function(t,e){return this.throwIfDisposed(),IB(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.maximum=function(t){return this.throwIfDisposed(),TF(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.mean=function(t,e){return this.throwIfDisposed(),rV(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.min=function(t,e){return this.throwIfDisposed(),EB(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.minimum=function(t){return this.throwIfDisposed(),uV(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.mirrorPad=function(t,e){return this.throwIfDisposed(),hV(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.mod=function(t){return this.throwIfDisposed(),pV(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.mul=function(t){return this.throwIfDisposed(),GL(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.neg=function(){return this.throwIfDisposed(),XF(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.norm=function(t,e,n){return this.throwIfDisposed(),wB(this,t,e,n)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.notEqual=function(t){return this.throwIfDisposed(),mV(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.oneHot=function(t,e=1,n=0){return this.throwIfDisposed(),WF(this,t,e,n)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.onesLike=function(){return this.throwIfDisposed(),gV(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.pad=function(t,e){return this.throwIfDisposed(),TV(this,t,e)},Rk().prototype.pool=function(t,e,n,i,s,r){return this.throwIfDisposed(),wV(this,t,e,n,i,s,r)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.pow=function(t){return this.throwIfDisposed(),pF(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.prelu=function(t){return this.throwIfDisposed(),SV(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.prod=function(t,e){return this.throwIfDisposed(),xV(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.reciprocal=function(){return this.throwIfDisposed(),UV(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.relu=function(){return this.throwIfDisposed(),YV(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.relu6=function(){return this.throwIfDisposed(),GV(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.reshapeAs=function(t){return this.throwIfDisposed(),y$(this,t.shape)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.reshape=function(t){return this.throwIfDisposed(),y$(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.resizeBilinear=function(t,e,n){return this.throwIfDisposed(),wY(this,t,e,n)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.resizeNearestNeighbor=function(t,e,n){return this.throwIfDisposed(),SY(this,t,e,n)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.reverse=function(t){return this.throwIfDisposed(),HV(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.rfft=function(){return this.throwIfDisposed(),cU(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.round=function(){return this.throwIfDisposed(),qV(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.rsqrt=function(){return this.throwIfDisposed(),KV(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.selu=function(){return this.throwIfDisposed(),QV(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.separableConv2d=function(t,e,n,i,s,r){return this.throwIfDisposed(),JV(this,t,e,n,i,s,r)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.sigmoid=function(){return this.throwIfDisposed(),v$(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.sign=function(){return this.throwIfDisposed(),tU(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.sin=function(){return this.throwIfDisposed(),eU(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.sinh=function(){return this.throwIfDisposed(),nU(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.slice=function(t,e){return this.throwIfDisposed(),w$(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.softmax=function(t){return this.throwIfDisposed(),oU(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.softplus=function(){return this.throwIfDisposed(),WB(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.spaceToBatchND=function(t,e){return this.throwIfDisposed(),vV(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.split=function(t,e){return this.throwIfDisposed(),pU(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.sqrt=function(){return this.throwIfDisposed(),HL(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.square=function(){return this.throwIfDisposed(),WL(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.squaredDifference=function(t){return this.throwIfDisposed(),dU(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.squeeze=function(t){return this.throwIfDisposed(),fU(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.stack=function(t,e){this.throwIfDisposed();const n=t instanceof xk?[this,t]:[this,...t];return mU(n,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.step=function(t){return this.throwIfDisposed(),gU(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.stridedSlice=function(t,e,n,i,s,r,a,o){return this.throwIfDisposed(),_U(this,t,e,n,i,s,r,a,o)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.sub=function(t){return this.throwIfDisposed(),cF(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.sum=function(t,e){return this.throwIfDisposed(),bB(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.tan=function(){return this.throwIfDisposed(),TU(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.tanh=function(){return this.throwIfDisposed(),S$(this)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.tile=function(t){return this.throwIfDisposed(),AB(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.toBool=function(){return this.throwIfDisposed(),PL(this,"bool")}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.toFloat=function(){return this.throwIfDisposed(),PL(this,"float32")}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.toInt=function(){return this.throwIfDisposed(),PL(this,"int32")}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.topk=function(t,e){return this.throwIfDisposed(),SU(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.transpose=function(t){return this.throwIfDisposed(),qF(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.unique=function(t){return this.throwIfDisposed(),RU(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.unsortedSegmentSum=function(t,e){return this.throwIfDisposed(),OU(this,t,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.unstack=function(t){return this.throwIfDisposed(),AU(this,t)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.where=function(t,e){return this.throwIfDisposed(),rB(t,this,e)}, +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Rk().prototype.zerosLike=function(){return this.throwIfDisposed(),zL(this)}; +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class RW extends Error{constructor(t){super(t),Object.setPrototypeOf(this,RW.prototype)}}class OW extends Error{constructor(t){super(t),Object.setPrototypeOf(this,OW.prototype)}}class AW extends Error{constructor(t){super(t),Object.setPrototypeOf(this,AW.prototype)}}class MW extends Error{constructor(t){super(t),Object.setPrototypeOf(this,MW.prototype)}}class CW extends Error{constructor(t){super(t),Object.setPrototypeOf(this,CW.prototype)}}Error; +/** + * @license + * Copyright 2022 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class NW{constructor(t){this.maxEntries=t||100,this.cache=new Map}get(t){let e;return this.cache.has(t)&&(e=this.cache.get(t),this.cache.delete(t),this.cache.set(t,e)),e}put(t,e){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxEntries){const t=this.cache.keys().next().value;this.cache.delete(t)}this.cache.set(t,e)}getMaxEntries(){return this.maxEntries}setMaxEntries(t){if(t<0)throw new Error(`The maxEntries of LRU caches must be at least 0, but got ${t}.`);if(this.maxEntries>t)for(let e=0;ee.toUpperCase()))}let VW={};function UW(t){if(null==t)return null;const e={};return e.className=t.getClassName(),e.config=t.getConfig(),e}function YW(t){if(null!=t&&"object"==typeof t)if(Array.isArray(t))t.forEach((t=>YW(t)));else{const e=Object.keys(t);for(const n of e){const e=t[n];null!=e&&"object"==typeof e&&(Array.isArray(e)||"ndarray"!==e.type||"number"!=typeof e.value?YW(e):t[n]=e.value)}}}function GW(t,e={},n={},i="object",s=!1){if("string"==typeof t){const s=t;let r;if(s in n)r=n[s];else if(s in VW)r=VW[s];else if(r=e[s],null==r)throw new AW(`Unknown ${i}: ${t}. This may be due to one of the following reasons:\n1. The ${i} is defined in Python, in which case it needs to be ported to TensorFlow.js or your JavaScript code.\n2. The custom ${i} is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().`);return r}{const r=t;if(null==r.className||null==r.config)throw new AW(`${i}: Improper config format: ${JSON.stringify(r)}.\n'className' and 'config' must set.`);const a=r.className;let o,l;if(a in n?[o,l]=n[a]:a in VW?[o,l]=VW.className:a in e&&([o,l]=e[a]),null==o)throw new AW(`Unknown ${i}: ${a}. This may be due to one of the following reasons:\n1. The ${i} is defined in Python, in which case it needs to be ported to TensorFlow.js or your JavaScript code.\n2. The custom ${i} is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().`);if(null!=l){const t={};for(const e of Object.keys(VW))t[e]=VW[e];for(const e of Object.keys(n))t[e]=n[e];r.config.customObjects=t;const e=Object.assign({},VW);for(const t of Object.keys(n))VW[t]=n[t];YW(r.config);const i=l(o,r.config,n,s);return VW=Object.assign({},e),i}{const t=Object.assign({},VW);for(const t of Object.keys(n))VW[t]=n[t];const e=new o(r.config);return VW=Object.assign({},t),e}}}function HW(t,e){return-1*function(t,e){return te?1:0}(t,e)}function WW(t){if(null==t)return t;const e=[];for(const n of t)-1===e.indexOf(n)&&e.push(n);return e}function zW(t){if(null==t)throw new AW(`Invalid value in obj: ${JSON.stringify(t)}`);for(const e in t)if(t.hasOwnProperty(e))return!1;return!0}function XW(t,e,n){if(null!=n&&t.indexOf(n)<0)throw new AW(`${n} is not a valid ${e}. Valid values are ${t} or null/undefined.`)}function jW(t,e,n=0,i=1/0){return DW(n>=0),DW(i>=n),Array.isArray(t)&&t.length>=n&&t.length<=i&&t.every((t=>typeof t===e))}function qW(t,e){Array.isArray(t)?(_O(t.length>0,(()=>`${e} is unexpectedly an empty array.`)),t.forEach(((t,n)=>qW(t,`element ${n+1} of ${e}`)))):_O(Number.isInteger(t)&&t>0,(()=>`Expected ${e} to be a positive integer, but got ${KW(t)}.`))}function KW(t){return null===t?"null":Array.isArray(t)?"["+t.map((t=>KW(t))).join(",")+"]":"string"==typeof t?`"${t}"`:`${t}`}function QW(t){return"relu"===t?"relu":"linear"===t?"linear":"elu"===t?"elu":null} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +let JW=0;function ZW(){return JW++}const tz={};function ez(t=""){return t in tz||(tz[t]=0),tz[t]+=1,t+tz[t].toString()} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +const nz=["channelsFirst","channelsLast"],iz=["nearest","bilinear"],sz=["valid","same","causal"],rz=["max","avg"],az=["sum","mul","concat","ave"],oz=new Map;function lz(t){XW(nz,"DataFormat",t)}function uz(t){XW(sz,"PaddingMode",t)}function hz(t){XW(rz,"PoolMode",t)}const pz=[],cz="/";function dz(t,e){pz.push(t);try{const t=e();return pz.pop(),t}catch(t){throw pz.pop(),t}}function fz(t){if(!_z(t))throw new Error("Not a valid tensor name: '"+t+"'");return(0===pz.length?"":pz.join(cz)+cz)+t}function mz(t){if(!_z(t))throw new Error("Not a valid tensor name: '"+t+"'");oz.has(t)||oz.set(t,0);const e=oz.get(t);if(oz.set(t,oz.get(t)+1),e>0){const n=`${t}_${e}`;return oz.set(n,1),n}return t}const gz=new RegExp(/^[A-Za-z0-9][-A-Za-z0-9\._\/]*$/);function _z(t){return!!t.match(gz)}function Tz(t,e,n){null==e&&(e=0),null==n&&(n=t.length);let i=1;for(let s=e;se&&(e=i)}return e}function Ez(t,e){if(e{switch(t.rank){case 1:return iU(t,e,n);case 2:return sU(t,[e,0],[n,t.shape[1]]);case 3:return rU(t,[e,0,0],[n,t.shape[1],t.shape[2]]);case 4:return aU(t,[e,0,0,0],[n,t.shape[1],t.shape[2],t.shape[3]]);case 5:return w$(t,[e,0,0,0,0],[n,t.shape[1],t.shape[2],t.shape[3],t.shape[4]]);case 6:return w$(t,[e,0,0,0,0,0],[n,t.shape[1],t.shape[2],t.shape[3],t.shape[4],t.shape[5]]);default:throw new AW(`sliceAlongFirstAxis() received an unsupported tensor rank: ${t.rank}`)}}))}function Rz(t,e,n){return ED((()=>{switch(t.rank){case 1:return iU(t,e,n);case 2:return sU(t,[0,e],[t.shape[0],n]);case 3:return rU(t,[0,0,e],[t.shape[0],t.shape[1],n]);case 4:return aU(t,[0,0,0,e],[t.shape[0],t.shape[1],t.shape[2],n]);default:throw new AW(`sliceAlongLastAxis() received an unsupported tensor rank: ${t.rank}`)}}))}function Oz(t,e,n,i){return ED((()=>{switch(t.rank){case 1:return iU(t,e,n);case 2:switch(i){case 1:return xz(t,e,n);case 2:return Rz(t,e,n);default:throw new AW(`The axis is not within the rank of the tensor ${i}`)}case 3:switch(i){case 1:return xz(t,e,n);case 2:return rU(t,[0,e,0],[t.shape[0],n,t.shape[2]]);case 3:return Rz(t,e,n);default:throw new AW(`The axis is not within the rank of the tensor ${i}`)}case 4:switch(i){case 1:return xz(t,e,n);case 2:return aU(t,[0,e,0,0],[t.shape[0],n,t.shape[2],t.shape[3]]);case 3:return aU(t,[0,0,e,0],[t.shape[0],t.shape[1],n,t.shape[3]]);case 4:return Rz(t,e,n);default:throw new AW(`The axis is not within the rank of the tensor ${i}`)}default:throw new AW(`sliceAlongLastAxis() received an unsupported tensor rank: ${t.rank}`)}}))}function Az(t,e=-1){let n;return e<0&&(n=t[0].rank,e=0!==n?n:0),e===t[0].rank&&(e=-1),b$(t,e)}function Mz(t,e){switch(t.rank){case 1:return $$([t,e]);case 2:return B$([t,e],0);case 3:return V$([t,e],0);case 4:return U$([t,e],0);default:throw new AW(`concatAlongFirstAxis() received an unsupported tensor rank: ${t.rank}`)}}function Cz(t,e){if(Array.isArray(e)||(e=[e]),t.rank!==e.length)throw new AW(`The length of input n (${e.length}) does not match the number of dimensions in input x (${t.rank})`);return AB(t,e)}function Nz(t,e=0,n=1,i,s){return FV(t,e,n,i,s)}function kz(t,e,n,i){if(t.rank<2||e.rank<2)throw new MW(`dot requires both inputs to be rank >= 2 but got x shape = ${t.shape} and y shape = ${e.shape}`);if(e.rank>=3){if(t.shape.slice(-1)[0]!==e.shape.slice(-2)[0])throw new MW(`If rank y >= 3, then the second last dim of y must equal the last dim of x but got x shape = ${t.shape} and y shape = ${e.shape}`)}if(2===t.rank&&2===e.rank){return JU({a:t,b:e,transposeA:!1,transposeB:!1,bias:i?Fz(t.rank,i,"channelsLast"):null,activation:n})}{const s=t.shape.slice(),r=s.pop();t=y$(t,[-1,r]);const a=e.shape.slice(),o=a.pop(),l=a.pop(),u=[...a,o],h=Array.from({length:e.rank},((t,n)=>0===n?e.rank-2:n<=e.rank-2?n-1:n));e=y$(qF(e,h),[l,-1]);const p=[...s,...u];return y$(JU({a:t,b:e,transposeA:!1,transposeB:!1,bias:i?Fz(t.rank,i,"channelsLast"):null,activation:n}),p)}}function Dz(t,e,n){return ED((()=>(e=Array.isArray(e)?yU(e,"int32"):PL(e,"int32"),NB(t,e,n))))}function Lz(t){return GL(t,t)}function Fz(t,e,n){const i=e.shape;if(1!==e.rank&&e.rank!==t)throw new AW(`Unexpected bias dimensions: ${e.rank}; expected it to be 1 or ${t}`);if(5===t){if("channelsFirst"===n)return 1===i.length?y$(e,[1,i[0],1,1,1]):y$(e,[1,i[3],i[0],i[1],i[2]]);if("channelsLast"===n)return 1===i.length?y$(e,[1,1,1,1,i[0]]):y$(e,[1].concat(i))}else if(4===t){if("channelsFirst"===n)return 1===i.length?y$(e,[1,i[0],1,1]):y$(e,[1,i[2],i[0],i[1]]);if("channelsLast"===n)return 1===i.length?y$(e,[1,1,1,i[0]]):y$(e,[1].concat(i))}else if(3===t){if("channelsFirst"===n)return 1===i.length?y$(e,[1,i[0],1]):y$(e,[1,i[1],i[0]]);if("channelsLast"===n)return 1===i.length?y$(e,[1,1,i[0]]):y$(e,[1].concat(i))}else if(t<3)return e;throw new AW(`Unsupported input rank by biasAdd: ${e.rank}`)}function Pz(t,e,n){return ED((()=>(null==n&&(n="channelsLast"),lz(n),VL(t,Fz(t.rank,e,n)))))}function $z(t,e,n,i){return ED((()=>BU(t,e,n,i)))}function Bz(t,e,n=!1){return n?t():e()} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +const Vz=["fanIn","fanOut","fanAvg"],Uz=["normal","uniform","truncatedNormal"];class Yz extends iF{fromConfigUsesCustomObjects(){return!1}getConfig(){return{}}}class Gz extends Yz{apply(t,e){return aV(t,e)}}Gz.className="Zeros",rF(Gz);class Hz extends Yz{apply(t,e){return oV(t,e)}}Hz.className="Ones",rF(Hz);class Wz extends Yz{constructor(t){if(super(),"object"!=typeof t)throw new AW(`Expected argument of type ConstantConfig but got ${t}`);if(void 0===t.value)throw new AW(`config must have value set but got ${t}`);this.value=t.value}apply(t,e){return ED((()=>GL(tF(this.value),oV(t,e))))}getConfig(){return{value:this.value}}}Wz.className="Constant",rF(Wz);class zz extends Yz{constructor(t){super(),this.DEFAULT_MINVAL=-.05,this.DEFAULT_MAXVAL=.05,this.minval=t.minval||this.DEFAULT_MINVAL,this.maxval=t.maxval||this.DEFAULT_MAXVAL,this.seed=t.seed}apply(t,e){return $V(t,this.minval,this.maxval,e,this.seed)}getConfig(){return{minval:this.minval,maxval:this.maxval,seed:this.seed}}}zz.className="RandomUniform",rF(zz);class Xz extends Yz{constructor(t){super(),this.DEFAULT_MEAN=0,this.DEFAULT_STDDEV=.05,this.mean=t.mean||this.DEFAULT_MEAN,this.stddev=t.stddev||this.DEFAULT_STDDEV,this.seed=t.seed}apply(t,e){if("float32"!==(e=e||"float32")&&"int32"!==e)throw new MW(`randomNormal does not support dType ${e}.`);return Nz(t,this.mean,this.stddev,e,this.seed)}getConfig(){return{mean:this.mean,stddev:this.stddev,seed:this.seed}}}Xz.className="RandomNormal",rF(Xz);class jz extends Yz{constructor(t){super(),this.DEFAULT_MEAN=0,this.DEFAULT_STDDEV=.05,this.mean=t.mean||this.DEFAULT_MEAN,this.stddev=t.stddev||this.DEFAULT_STDDEV,this.seed=t.seed}apply(t,e){if("float32"!==(e=e||"float32")&&"int32"!==e)throw new MW(`truncatedNormal does not support dType ${e}.`);return xU(t,this.mean,this.stddev,e,this.seed)}getConfig(){return{mean:this.mean,stddev:this.stddev,seed:this.seed}}}jz.className="TruncatedNormal",rF(jz);class qz extends Yz{constructor(t){super(),this.gain=null!=t.gain?t.gain:1}apply(t,e){return ED((()=>{if(2!==t.length||t[0]!==t[1])throw new AW("Identity matrix initializer can only be used for 2D square matrices.");return GL(this.gain,MB(t[0]))}))}getConfig(){return{gain:this.gain}}}qz.className="Identity",rF(qz);class Kz extends Yz{constructor(t){if(super(),t.scale<0)throw new AW(`scale must be a positive float. Got: ${t.scale}`); +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +var e;this.scale=null==t.scale?1:t.scale,this.mode=null==t.mode?"fanIn":t.mode,e=this.mode,XW(Vz,"FanMode",e),this.distribution=null==t.distribution?"normal":t.distribution,function(t){XW(Uz,"Distribution",t)}(this.distribution),this.seed=t.seed}apply(t,e){const n=function(t,e="channelsLast"){let n,i;if(lz(e),2===t.length)n=t[0],i=t[1];else if(-1!==[3,4,5].indexOf(t.length)){if("channelsFirst"===e){const e=Tz(t,2);n=t[1]*e,i=t[0]*e}else if("channelsLast"===e){const e=Tz(t,0,t.length-2);n=t[t.length-2]*e,i=t[t.length-1]*e}}else{const e=Tz(t);n=Math.sqrt(e),i=Math.sqrt(e)}return[n,i]}(t),i=n[0],s=n[1];let r=this.scale;if("fanIn"===this.mode?r/=Math.max(1,i):"fanOut"===this.mode?r/=Math.max(1,s):r/=Math.max(1,(i+s)/2),"normal"===this.distribution){const n=Math.sqrt(r);if("float32"!==(e=e||"float32")&&"int32"!==e)throw new MW(`${this.getClassName()} does not support dType ${e}.`);return xU(t,0,n,e,this.seed)}{const n=Math.sqrt(3*r);return $V(t,-n,n,e,this.seed)}}getConfig(){return{scale:this.scale,mode:this.mode,distribution:this.distribution,seed:this.seed}}}Kz.className="VarianceScaling",rF(Kz);class Qz extends Kz{constructor(t){super({scale:1,mode:"fanAvg",distribution:"uniform",seed:null==t?null:t.seed})}getClassName(){return Kz.className}}Qz.className="GlorotUniform",rF(Qz);class Jz extends Kz{constructor(t){super({scale:1,mode:"fanAvg",distribution:"normal",seed:null==t?null:t.seed})}getClassName(){return Kz.className}}Jz.className="GlorotNormal",rF(Jz);class Zz extends Kz{constructor(t){super({scale:2,mode:"fanIn",distribution:"normal",seed:null==t?null:t.seed})}getClassName(){return Kz.className}}Zz.className="HeNormal",rF(Zz);class tX extends Kz{constructor(t){super({scale:2,mode:"fanIn",distribution:"uniform",seed:null==t?null:t.seed})}getClassName(){return Kz.className}}tX.className="HeUniform",rF(tX);class eX extends Kz{constructor(t){super({scale:1,mode:"fanIn",distribution:"normal",seed:null==t?null:t.seed})}getClassName(){return Kz.className}}eX.className="LeCunNormal",rF(eX);class nX extends Kz{constructor(t){super({scale:1,mode:"fanIn",distribution:"uniform",seed:null==t?null:t.seed})}getClassName(){return Kz.className}}nX.className="LeCunUniform",rF(nX);class iX extends Yz{constructor(t){super(),this.DEFAULT_GAIN=1,this.ELEMENTS_WARN_SLOW=2e3,this.gain=null==t.gain?this.DEFAULT_GAIN:t.gain,this.seed=t.seed}apply(t,e){return ED((()=>{if(t.length<2)throw new MW("Shape must be at least 2D.");if("int32"!==e&&"float32"!==e&&void 0!==e)throw new TypeError(`Unsupported data type ${e}.`);const n=IO(t.slice(0,-1)),i=t[t.length-1],s=n*i;s>this.ELEMENTS_WARN_SLOW&&console.warn(`Orthogonal initializer is being called on a matrix with more than ${this.ELEMENTS_WARN_SLOW} (${s}) elements: Slowness may result.`);const r=Nz([Math.max(i,n),Math.min(i,n)],0,1,e,this.seed),a=ZY.qr(r,!1);let o=a[0];const l=a[1].flatten().stridedSlice([0],[Math.min(i,n)*Math.min(i,n)],[Math.min(i,n)+1]);return o=GL(o,l.sign()),nt*e));return e} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +const dX="Variable";class fX{constructor(t,e="float32",n=dX,i=!0,s=null){this.dtype=null==e?"float32":e,this.shape=t.shape,this.id=ZW(),n=null==n?dX:n,this.originalName=fz(n),this.name=mz(this.originalName),this.trainable_=i,this.constraint=s,this.val=CU(t,this.trainable_,this.name,this.dtype)}read(){return this.assertNotDisposed(),this.val}write(t){return this.assertNotDisposed(),function(t,e){if(t.shape.toString()!==e.shape.toString())throw new Error("Shape mismatch: "+JSON.stringify(t.shape)+" vs. "+JSON.stringify(e.shape))}(this.val,t),this.val.id!==t.id&&(this.val.assign(t),null!=this.constraint&&this.val.assign(this.constraint.apply(this.val))),this}dispose(){this.assertNotDisposed(),this.val.dispose()}assertNotDisposed(){if(this.val.isDisposed)throw new Error(`LayersVariable ${this.name} is already disposed.`)}get trainable(){return this.trainable_}set trainable(t){this.trainable_=t,this.val.trainable=t}}function mX(t){return t.map((t=>t.read()))}function gX(t){t.forEach((t=>{t[0].write(t[1])}))} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class _X{constructor(t){this.dtype=t.dtype,this.shape=t.shape,null!=t.shape?this.ndim=t.shape.length:this.ndim=t.ndim,this.maxNDim=t.maxNDim,this.minNDim=t.minNDim,this.axes=t.axes||{}}}class TX{constructor(t,e,n,i,s,r,a){this.dtype=t,this.shape=e,this.sourceLayer=n,this.inputs=i,this.callArgs=s,this.outputTensorIndex=a,this.id=ZW(),null!=r&&(this.originalName=fz(r),this.name=mz(this.originalName)),this.rank=e.length}}let yX=0;class IX{constructor(t,e){this.callArgs=e,this.id=yX++,this.outboundLayer=t.outboundLayer,this.inboundLayers=t.inboundLayers,this.nodeIndices=t.nodeIndices,this.tensorIndices=t.tensorIndices,this.inputTensors=t.inputTensors,this.outputTensors=t.outputTensors,this.inputMasks=t.inputMasks,this.outputMasks=t.outputMasks,this.inputShapes=t.inputShapes,this.outputShapes=t.outputShapes;for(const e of t.inboundLayers)null!=e&&e.outboundNodes.push(this);t.outboundLayer.inboundNodes.push(this)}getConfig(){const t=[];for(const e of this.inboundLayers)null!=e?t.push(e.name):t.push(null);return{outboundLayer:this.outboundLayer?this.outboundLayer.name:null,inboundLayers:t,nodeIndices:this.nodeIndices,tensorIndices:this.tensorIndices}}}let EX=0;class bX extends iF{constructor(t={}){super(),this._callHook=null,this._addedWeightNames=[],this._stateful=!1,this.id=EX++,this.activityRegularizer=null,this.inputSpec=null,this.supportsMasking=!1,this._trainableWeights=[],this._nonTrainableWeights=[],this._losses=[],this._updates=[],this._built=!1,this.inboundNodes=[],this.outboundNodes=[];let e=t.name;if(!e){const t=this.getClassName();e=$W(t)+"_"+ez(t)}if(this.name=e,this.trainable_=null==t.trainable||t.trainable,null!=t.inputShape||null!=t.batchInputShape){let e;if(null!=t.batchInputShape)e=t.batchInputShape;else if(null!=t.inputShape){let n=null;null!=t.batchSize&&(n=t.batchSize),e=[n].concat(t.inputShape)}this.batchInputShape=e;let n=t.dtype;null==n&&(n=t.inputDType),null==n&&(n="float32"),this.dtype=n}null!=t.weights?this.initialWeights=t.weights:this.initialWeights=null,this._refCount=null,this.fastWeightInitDuringBuild=!1}static nodeKey(t,e){return t.name+"_ib-"+e.toString()}getNodeAtIndex(t,e){if(0===this.inboundNodes.length)throw new OW(`The layer has never been called and thus has no defined ${e}.`);if(this.inboundNodes.length<=t)throw new AW(`Asked to get ${e} at node ${t}, but the layer has only ${this.inboundNodes.length} inbound nodes.`);return this.inboundNodes[t]}getInputAt(t){return FW(this.getNodeAtIndex(t,"input").inputTensors)}getOutputAt(t){return FW(this.getNodeAtIndex(t,"output").outputTensors)}get input(){if(this.inboundNodes.length>1)throw new RW(`Layer ${this.name} has multiple inbound nodes, hence the notion of "layer input" is ill-defined. Use \`getInputAt(nodeIndex)\` instead.`);if(0===this.inboundNodes.length)throw new RW(`Layer ${this.name} is not connected, no input to return.`);return FW(this.getNodeAtIndex(0,"input").inputTensors)}get output(){if(0===this.inboundNodes.length)throw new RW(`Layer ${this.name} has no inbound nodes.`);if(this.inboundNodes.length>1)throw new RW(`Layer ${this.name} has multiple inbound nodes, hence the notion of "layer output" is ill-defined. Use \`getOutputAt(nodeIndex)\` instead.`);return FW(this.getNodeAtIndex(0,"output").outputTensors)}get losses(){return this._losses}calculateLosses(){return this.losses.map((t=>t()))}get updates(){return this._updates}get built(){return this._built}set built(t){this._built=t}get trainable(){return this.trainable_}set trainable(t){this._trainableWeights.forEach((e=>e.trainable=t)),this.trainable_=t}get trainableWeights(){return this.trainable_?this._trainableWeights.filter((t=>t.trainable)):[]}set trainableWeights(t){this._trainableWeights=t}get nonTrainableWeights(){return this.trainable?this._trainableWeights.filter((t=>!t.trainable)).concat(this._nonTrainableWeights):this._trainableWeights.concat(this._nonTrainableWeights)}set nonTrainableWeights(t){this._nonTrainableWeights=t}get weights(){return this.trainableWeights.concat(this.nonTrainableWeights)}get stateful(){return this._stateful}resetStates(){if(!this.stateful)throw new Error("Cannot call the resetStates() method of a non-stateful Layer object.")}assertInputCompatibility(t){const e=PW(t);if(null==this.inputSpec||0===this.inputSpec.length)return;const n=PW(this.inputSpec);if(e.length!==n.length)throw new AW(`Layer ${this.name} expects ${n.length} inputs, but it received ${e.length} input tensors. Input received: ${t}`);for(let t=0;ts.maxNDim)throw new AW(`Input ${t} is incompatible with layer ${this.name}: expected max_ndim=${s.maxNDim}, found ndim=${r}`);if(null!=s.minNDim&&r=0?e[i]:e[e.length+i];if(null!=r&&-1===[r,null].indexOf(a))throw new AW(`Input ${t} is incompatible with layer ${this.name}: expected axis ${i} of input shape to have value ${r} but got shape ${e}.`)}}if(null!=s.shape)for(let e=0;e{if(!this.built){this.assertInputCompatibility(t);const e=[];for(const n of PW(t))e.push(n.shape);this.build(FW(e)),this.built=!0,this.initialWeights&&this.setWeights(this.initialWeights),null===this._refCount&&s&&(this._refCount=1)}if(this.assertInputCompatibility(t),s){let i=this.call(t,e);this.supportsMasking&&this.setMaskMetadata(t,i);const s=PW(i),r=[];for(let t of s)-1!==n.indexOf(t)&&(t=t.clone()),r.push(t);if(i=FW(r),null!=this.activityRegularizer)throw new MW("Layer invocation in the presence of activity regularizer(s) is not supported yet.");return i}{const n=function(t){t=PW(t);const e=[];for(const n of t)e.push(n.shape);return FW(e)}(t),i=this.computeOutputShape(n);let s;const r="float32";if(this.warnOnIncompatibleInputShape(Array.isArray(t)?n[0]:n),s=null!=i&&i.length>0&&Array.isArray(i[0])?i.map(((n,i)=>new TX(r,n,this,PW(t),e,this.name,i))):new TX(r,i,this,PW(t),e,this.name),this.addInboundNode(t,s,null,null,n,i,e),this._refCount++,null!=this.activityRegularizer)throw new MW("Layer invocation in the presence of activity regularizer(s) is not supported yet.");return s}}))}warnOnIncompatibleInputShape(t){if(null!=this.batchInputShape)if(t.length!==this.batchInputShape.length)console.warn(`The rank of the input tensor provided (shape: ${JSON.stringify(t)}) does not match that of the batchInputShape (${JSON.stringify(this.batchInputShape)}) of the layer ${this.name}`);else{let e=!1;this.batchInputShape.forEach(((n,i)=>{null!=n&&null!=t[i]&&t[i]!==n&&(e=!0)})),e&&console.warn(`The shape of the input tensor (${JSON.stringify(t)}) does not match the expectation of layer ${this.name}: ${JSON.stringify(this.batchInputShape)}`)}}get outputShape(){if(null==this.inboundNodes||0===this.inboundNodes.length)throw new RW(`The layer ${this.name} has never been called and thus has no defined output shape.`);const t=[];for(const e of this.inboundNodes){const n=JSON.stringify(e.outputShapes);-1===t.indexOf(n)&&t.push(n)}if(1===t.length){const t=this.inboundNodes[0].outputShapes;return Array.isArray(t)&&Array.isArray(t[0])&&1===t.length?t[0]:t}throw new RW(`The layer ${this.name} has multiple inbound nodes with different output shapes. Hence the notion of "output shape" is ill-defined for the layer.`)}countParams(){if(!this.built)throw new OW(`You tried to call countParams() on ${this.name}, but the layer is not built yet. Build it first by calling build(batchInputShape).`);return cX(this.weights)}build(t){this.built=!0}getWeights(t=!1){return mX(t?this.trainableWeights:this.weights)}setWeights(t){ED((()=>{const e=this.weights;if(e.length!==t.length)throw new AW(`You called setWeights(weights) on layer "${this.name}" with a weight list of length ${t.length}, but the layer was expecting ${e.length} weights. Provided weights: ${t}...`);if(0===e.length)return;const n=[],i=mX(e);for(let s=0;ss.apply(u.read()))),null==r&&(r=!0),r?this._trainableWeights.push(u):this._nonTrainableWeights.push(u),u}setFastWeightInitDuringBuild(t){this.fastWeightInitDuringBuild=t}addLoss(t){null==t||Array.isArray(t)&&0===t.length||(t=PW(t),void 0!==this._losses&&null!==this._losses&&this.losses.push(...t))}computeOutputShape(t){return t}computeMask(t,e){if(!this.supportsMasking){if(null!=e){if(!Array.isArray(e))throw new TypeError(`Layer ${this.name} does not support masking, but was passed an inputMask.`);e.forEach((t=>{if(null!=t)throw new TypeError(`Layer ${this.name} does not support masking, but was passed an inputMask.`)}))}return null}return e}setMaskMetadata(t,e,n){if(!this.supportsMasking)return;const i=this.computeMask(t,n),s=PW(e),r=PW(i);if(s.length!==r.length)throw new Error(`${this.name} outputs ${s.length} tensors but ${s.length} masks for those tensors`);for(let t=0;tt.dispose())),this.weights.length}assertNotDisposed(){if(0===this._refCount)throw new Error(`Layer '${this.name}' is already disposed.`)}dispose(){if(!this.built)throw new Error(`Cannot dispose Layer ${this.name} because it has not been built yet.`);if(null===this._refCount)throw new Error(`Cannot dispose Layer ${this.name} because it has not been used yet.`);this.assertNotDisposed();let t=0;return 0==--this._refCount&&(t=this.disposeWeights()),{refCountAfterDispose:this._refCount,numDisposedVariables:t}}}function vX(t,e,n){if((null==e||null!=n&&n>0)&&(e=t.sourceLayer,n=t.nodeIndex),0===e.inboundNodes.length)return[t];{const t=e.inboundNodes[n];if(0===t.inboundLayers.length)return t.inputTensors;{const e=[];for(let n=0;nt.name)),l=[],u=e.names();for(const t of o)-1!==u.indexOf(t)?l.push(e.getValue(t)):l.push(null);null!=i&&(i.maxNumTensors=-1/0,i.minNumTensors=1/0);const h=o.join(",")+"|"+e.names().sort().join(",");let p,c=RX.get(h);if(null==c){const t=function(t,e){_O(null!=t&&t.length>0,(()=>"Expected at least one fetch, got none"));let n=[],i={};if(1===t.length){const s=CX(t[0],e);n=s.sorted,i=s.recipientMap}else{const s=new Set;for(const r of t){const{sorted:t,recipientMap:a}=CX(r,e);for(const e of t)s.has(e.name)||(n.push(e),s.add(e.name));for(const t in a)null==i[t]&&(i[t]=new Set),a[t].forEach((e=>i[t].add(e)))}}return{sorted:n,recipientCounts:MX(i)}}(a,e);c=t.sorted,p=t.recipientCounts,RX.put(h,c),OX.put(h,p)}p={},s||Object.assign(p,OX.get(h));const d=new xX(e);for(let t=0;ti.maxNumTensors&&(i.maxNumTensors=t),t0;){const t=r[r.length-1];if(n.has(t.name)){r.pop();continue}const e=a[a.length-1]===r.length-1;if(0===t.inputs.length||e)r.pop(),i.push(t),n.add(t.name),e&&a.pop();else{a.push(r.length-1);for(const e of t.inputs)null==s[e.name]&&(s[e.name]=new Set),s[e.name].add(t.name),n.has(e.name)||r.push(e)}}return{sorted:i,recipientMap:s}}function NX(t){let e;if(1===t.sourceLayer.inboundNodes.length)e=t.sourceLayer.output;else{let n=null;for(let e=0;eHL(bB(GL(t,t),e,!0))))}aA().registerFlag("TOPOLOGICAL_SORT_CACHE_MAX_ENTRIES",(()=>100),(function(t){null!=RX&&RX.setMaxEntries(t),null!=OX&&OX.setMaxEntries(t)}));class DX extends iF{getConfig(){return{}}}class LX extends DX{constructor(t){super(),this.defaultMaxValue=2,this.defaultAxis=0,this.maxValue=null!=t.maxValue?t.maxValue:this.defaultMaxValue,this.axis=null!=t.axis?t.axis:this.defaultAxis}apply(t){return ED((()=>{const e=kX(t,this.axis),n=P$(e,0,this.maxValue);return GL(t,YL(n,VL(vz(),e)))}))}getConfig(){return{maxValue:this.maxValue,axis:this.axis}}}LX.className="MaxNorm",rF(LX);class FX extends DX{constructor(t){super(),this.defaultAxis=0,this.axis=null!=t.axis?t.axis:this.defaultAxis}apply(t){return ED((()=>YL(t,VL(vz(),kX(t,this.axis)))))}getConfig(){return{axis:this.axis}}}FX.className="UnitNorm",rF(FX);class PX extends DX{apply(t){return YV(t)}}PX.className="NonNeg",rF(PX);class $X extends DX{constructor(t){super(),this.defaultMinValue=0,this.defaultMaxValue=1,this.defaultRate=1,this.defaultAxis=0,this.minValue=null!=t.minValue?t.minValue:this.defaultMinValue,this.maxValue=null!=t.maxValue?t.maxValue:this.defaultMaxValue,this.rate=null!=t.rate?t.rate:this.defaultRate,this.axis=null!=t.axis?t.axis:this.defaultAxis}apply(t){return ED((()=>{const e=kX(t,this.axis),n=VL(GL(this.rate,P$(e,this.minValue,this.maxValue)),GL(1-this.rate,e));return GL(t,YL(n,VL(vz(),e)))}))}getConfig(){return{minValue:this.minValue,maxValue:this.maxValue,rate:this.rate,axis:this.axis}}}$X.className="MinMaxNorm",rF($X);const BX={maxNorm:"MaxNorm",minMaxNorm:"MinMaxNorm",nonNeg:"NonNeg",unitNorm:"UnitNorm"};function VX(t){return UW(t)}function UX(t,e={}){return GW(t,sF.getMap().classNameMap,e,"constraint")}function YX(t){if(null==t)return null;if("string"==typeof t){return UX({className:t in BX?BX[t]:t,config:{}})}return t instanceof DX?t:UX(t)} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function GX(t){return new LX(t)}function HX(t){return new FX(t)}function WX(){return new PX}function zX(t){return new $X(t)} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function XX(){return new Gz}function jX(){return new Hz}function qX(t){return new Wz(t)}function KX(t){return new zz(t)}function QX(t){return new Xz(t)}function JX(t){return new jz(t)}function ZX(t){return new qz(t)}function tj(t){return new Kz(t)}function ej(t){return new Qz(t)}function nj(t){return new Jz(t)}function ij(t){return new Zz(t)}function sj(t){return new tX(t)}function rj(t){return new eX(t)}function aj(t){return new nX(t)}function oj(t){return new iX(t)} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +async function lj(t){if(null==t)return;const e=[],n=[],i=[];for(const s in t){const r=t[s];if("number"!=typeof r){const t=r;e.push(t.data()),n.push(s),i.push(t)}}if(e.length>0){const s=await Promise.all(e);for(let e=0;eVL(this.totals[t],GL(i,n))));this.totals[t]=s,null!=e&&e.dispose()}}}async onEpochEnd(t,e){if(null!=e)for(const t of this.params.metrics)null!=this.totals[t]&&("number"==typeof this.totals[t]?e[t]=this.totals[t]/this.seen:ED((()=>{const n=GL(YL(1,this.seen),this.totals[t]);e[t]=n,this.totals[t].dispose(),vD(e[t])})))}}class fj extends pj{async onTrainBegin(t){this.epoch=[],this.history={}}async onEpochEnd(t,e){null==e&&(e={}),this.epoch.push(t);for(const t in e)null==this.history[t]&&(this.history[t]=[]),this.history[t].push(e[t])}async syncData(){const t=[],e=[],n=[];for(const i in this.history){const s=this.history[i];for(let r=0;r{const a=null!=n?n():rk();return a-snew mj(t,e)))}class _j{constructor(){}static registerCallbackConstructor(t,e){_O(t>=0&&Number.isInteger(t),(()=>`Verbosity level is expected to be an integer >= 0, but got ${t}`)),_j.checkForDuplicate(e),null==_j.constructors[t]&&(_j.constructors[t]=[]),_j.constructors[t].push(e)}static checkForDuplicate(t){for(const e in _j.constructors){_j.constructors[+e].forEach((e=>{if(e===t)throw new AW("Duplicate callback constructor.")}))}}static clear(){_j.constructors={}}static createCallbacks(t){const e=[];for(const n in _j.constructors){const i=+n;t>=i&&e.push(..._j.constructors[i])}return e.map((t=>new t))}}function Tj(t,e,n,i,s,r,a,o,l){const u=new fj,h=[new dj,..._j.createCallbacks(e)];null!=t&&h.push(...t),h.push(u);const p=new cj(h);return p.setParams({epochs:n,initialEpoch:i,samples:s,steps:r,batchSize:a,verbose:e,doValidation:o,metrics:l}),{callbackList:p,history:u}} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function yj(t,e={},n=!1){return GW(t,sF.getMap().classNameMap,e,"layer",n)} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function Ij(t,e){return ED((()=>{"float32"!==t.dtype&&(t=PL(t,"float32"));const n=bB(Lz(t),e,!0),i=uF(n.shape,vz()),s=HL(TF(n,i));return YL(t,s)}))}function Ej(t,e){return ED((()=>rV(Lz(cF(e,t)),-1)))}function bj(t,e){return ED((()=>rV(fF(cF(e,t)),-1)))}function vj(t,e){return ED((()=>{const n=cF(t,e),i=P$(fF(t),vz(),Number.MAX_VALUE),s=fF(YL(n,i));return GL(100,rV(s,-1))}))}function wj(t,e){return ED((()=>{const n=P$(e,vz(),Number.MAX_VALUE),i=GB(VL(1,n)),s=P$(t,vz(),Number.MAX_VALUE),r=GB(VL(1,s));return rV(Lz(cF(i,r)),-1)}))}function Sj(t,e,n=!1){return ED((()=>{if(n)e=oU(e);else{const t=bB(e,e.shape.length-1,!0);e=YL(e,t)}return e=P$(e,vz(),1-vz()),XF(bB(GL(PL(t,"float32"),GB(e)),e.shape.length-1))}))}function xj(t,e,n=!1){return ED((()=>{const i=PL(CB(function(t){const e=[Tz(t.shape)];return y$(t,e)}(t)),"int32"),s=(e=P$(e,vz(),1-vz())).shape;return Sj(y$(WF(i,s[s.length-1]),s),e,n)}))}function Rj(t,e){return ED((()=>{let n;return n=P$(e,vz(),1-vz()),n=GB(YL(n,cF(1,n))),rV(function(t,e){if(!vO(t.shape,e.shape))throw new AW(`logits and labels must have the same shape, but got shapes ${JSON.stringify(t.shape)} and ${JSON.stringify(e.shape)}`);return ED((()=>{const n=YV(e),i=XF(fF(e));return VL(cF(n,GL(e,t)),HB(xB(i)))}))}(t,n),-1)}))}function Oj(t,e){return ED((()=>{const n=P$(t,vz(),1),i=P$(e,vz(),1);return bB(GL(t,GB(YL(n,i))),-1)}))}function Aj(t,e){return ED((()=>{const n=Ij(t,-1),i=Ij(e,-1),s=GL(n,i);return XF(bB(s,-1))}))}_j.constructors={};const Mj={meanSquaredError:Ej,meanAbsoluteError:bj,meanAbsolutePercentageError:vj,meanSquaredLogarithmicError:wj,squaredHinge:function(t,e){return ED((()=>{const n=TF(0,cF(1,GL(t,e)));return rV(Lz(n),-1)}))},hinge:function(t,e){return ED((()=>{const n=TF(0,cF(1,GL(t,e)));return rV(n,-1)}))},categoricalHinge:function(t,e){return ED((()=>{const n=bB(GL(t,e),-1),i=IB(GL(cF(1,t),e),-1);return TF(0,VL(1,cF(i,n)))}))},logcosh:function(t,e){return ED((()=>{const n=Math.log(2),i=cF(e,t),s=cF(VL(i,WB(GL(-2,i))),n);return rV(s,-1)}))},categoricalCrossentropy:Sj,sparseCategoricalCrossentropy:xj,binaryCrossentropy:Rj,kullbackLeiblerDivergence:Oj,poisson:function(t,e){return ED((()=>{const n=GB(VL(vz(),e));return rV(cF(e,GL(t,n)),-1)}))},cosineProximity:Aj};function Cj(t){if("string"==typeof t){if(t in Mj)return Mj[t];let e=`Unknown loss ${t}`;throw t.toLowerCase().includes("softmaxcrossentropy")&&(e=`Unknown loss ${t}. Use "categoricalCrossentropy" as the string name for tf.losses.softmaxCrossEntropy`),new AW(e)}return t} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function Nj(t,e){return ED((()=>{const n=GL(.5,gV(e)),i=wz(kB(e,n),t.dtype);return rV(sB(t,i),-1)}))}function kj(t,e){return ED((()=>wz(sB(QP(t,-1),QP(e,-1)),"float32")))}function Dj(t,e){return ED((()=>PL(bB(qB(sB(t,1),sB(e,1))),"float32")))}function Lj(t,e){return ED((()=>{const n=Dj(t,e),i=function(t,e){return ED((()=>PL(bB(qB(sB(t,0),sB(e,1))),"float32")))}(t,e),s=VL(n,i);return PL(rB(kB(s,0),YL(n,s),0),"float32")}))}function Fj(t,e){return ED((()=>{const n=Dj(t,e),i=function(t,e){return ED((()=>PL(bB(qB(sB(t,1),sB(e,0))),"float32")))}(t,e),s=VL(n,i);return PL(rB(kB(s,0),YL(n,s),0),"float32")}))}function Pj(t,e){return Rj(t,e)}function $j(t,e){return t.rank===e.rank&&(t=fU(t,[t.rank-1])),(e=QP(e,-1)).dtype!==t.dtype&&(e=PL(e,t.dtype)),PL(sB(t,e),"float32")}const Bj=Sj,Vj=xj,Uj={binaryAccuracy:Nj,categoricalAccuracy:kj,precision:Lj,categoricalCrossentropy:Bj,sparseCategoricalCrossentropy:Vj,mse:Ej,MSE:Ej,mae:bj,MAE:bj,mape:vj,MAPE:vj,cosine:Aj};function Yj(t){if("string"==typeof t&&t in Uj)return Uj[t];if("string"!=typeof t&&null!=t)return t;throw new AW(`Unknown metric ${t}`)}function Gj(t){if(DW(null!==t,`Unknown LossOrMetricFn ${t}`),"string"==typeof t)return t;{let e;for(const n of Object.keys(Mj))if(Mj[n]===t){e=n;break}if(void 0!==e)return e;for(const n of Object.keys(Uj))if(Uj[n]===t){e=n;break}return void 0!==e?e:t.name}} +/** + * @license + * Copyright 2019 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +const Hj=1048576;function Wj(t,e,n=!1){if(null==t||"object"!=typeof t||Object.getPrototypeOf(t)!==Object.prototype||!zj(t))throw new Error("User-defined metadata is expected to be a JSON object, but is not.");if(n){const n=JSON.stringify(t);n.length>Hj&&console.warn(`User-defined metadata of model "${e}" is too large in size (length=${n.length} when serialized). It is not recommended to store such large objects in user-defined metadata. Please make sure its serialized length is <= 1048576.`)}}function zj(t){if(null===t)return!0;if("object"==typeof t){if(Object.getPrototypeOf(t)===Object.prototype){const e=Object.keys(t);for(const n of e){if("string"!=typeof n)return!1;if(!zj(t[n]))return!1}return!0}if(Array.isArray(t)){for(const e of t)if(!zj(e))return!1;return!0}return!1}{const e=typeof t;return"string"===e||"number"===e||"boolean"===e}} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function Xj(t,e,n,i=console.log){const s=function(t){let e=!0;const n=[],i=[];for(const e in t.nodesByDepth)n.push(t.nodesByDepth[e]);for(const t of n){if(t.length>1||1===t.length&&t[0].inboundLayers.length>1){e=!1;break}i.push(...t)}if(e)for(const n of t.layers){let t=!1;for(const s of n.inboundNodes)if(-1!==i.indexOf(s)){if(t){e=!1;break}t=!0}if(!e)break}return e}(t),r=["Layer (type)","Input Shape","Output shape","Param #"];let a;if(s?(e=e||90,n=n||[.32,.61,.89,1]):(e=e||115,n=n||[.24,.48,.7,.8,1]),n[n.length-1]<=1&&(n=n.map((t=>Math.floor(e*t)))),!s){r.push("Receives inputs"),a=[];for(const e in t.nodesByDepth)a.push(...t.nodesByDepth[e])}i("_".repeat(e)),jj(r,n,i),i("=".repeat(e));const o=t.layers;for(let t=0;t0&&(i=i.slice(0,i.length-1)+" "),i+=t[n],i=i.slice(0,e[n]),i+=" ".repeat(e[n]-i.length);n(i)}function qj(t,e,n){let i,s;try{s=t.inboundNodes.map((t=>JSON.stringify(t.inputShapes))).join(",")}catch(t){s="multiple"}try{i=JSON.stringify(t.outputShape)}catch(t){i="multiple"}jj([`${t.name} (${t.getClassName()})`,s,i,t.countParams().toString()],e,n)}function Kj(t,e,n,i){let s,r;try{r=t.inboundNodes.map((t=>JSON.stringify(t.inputShapes))).join(",")}catch(t){r="multiple"}try{s=JSON.stringify(t.outputShape)}catch(t){s="multiple"}const a=[];for(const e of t.inboundNodes)if(!(null!=n&&n.length>0&&-1===n.indexOf(e)))for(let t=0;tt.name))}`);WW(this.outputs).length!==this.outputs.length&&console.warn(`The list of outputs passed to the model is redundant. All outputs should only appear once. Found: ${this.outputs.map((t=>t.name))}`),this.inputLayers=[],this.inputLayersNodeIndices=[],this.inputLayersTensorIndices=[],this.outputLayers=[],this.outputLayersNodeIndices=[],this.outputLayersTensorIndices=[],this.layers=[],this.internalContainerRefs=[];for(const t of this.outputs){const e=t.sourceLayer,n=t.nodeIndex,i=t.tensorIndex;this.outputLayers.push(e),this.outputLayersNodeIndices.push(n),this.outputLayersTensorIndices.push(i)}for(const t of this.inputs){const e=t.sourceLayer,n=t.nodeIndex,i=t.tensorIndex;DW(0===n,"input layer has >1 nodes"),DW(0===i,"input layer has >1 tensors"),this.inputLayers.push(e),this.inputLayersNodeIndices.push(n),this.inputLayersTensorIndices.push(i)}this.inputNames=[],this.outputNames=[],this.feedInputShapes=[],this.feedInputNames=[],this.feedOutputNames=[];for(let e=0;et.shape)),this.internalOutputShapes=this.outputs.map((t=>t.shape));const e={},n={},i={},s={},r={},a=[],o=(t,e,n,i,s,l)=>{null!=i&&null!=s&&null!=l||(i=t.sourceLayer,s=t.nodeIndex,l=t.tensorIndex);const u=i.inboundNodes[s];if(-1!==n.indexOf(u))throw new OW(`The tensor ${t.name} at layer "${i.name}" is part of a cycle.`);if(-1!==e.indexOf(u))return;this.containerNodes.add(eq.nodeKey(i,s)),i.id in r||(r[i.id]=Object.keys(r).length),-1===n.indexOf(u)&&n.push(u);const h=u.inboundLayers.length;for(let t=0;t=0;)n.splice(n.indexOf(u),1);a.push(u)},l=[],u=[];for(const t of this.outputs)o(t,l,u);const h=a.slice().reverse();for(const t of h){n[t.id]=t,t.id in e||(e[t.id]=0);let r=e[t.id];const a=null==i[t.outboundLayer.id]?0:i[t.outboundLayer.id];r=Math.max(r,a),i[t.outboundLayer.id]=r,s[t.outboundLayer.id]=t.outboundLayer,e[t.id]=r;for(let i=0;iparseInt(t,10))).sort(HW);this.layers=[];for(const t of d){const e=c[t];e.sort(((t,e)=>{const n=r[t.id],i=r[e.id];return ni?1:0}));for(const t of e)t instanceof eq&&this.internalContainerRefs.push(t),this.layers.push(t)}this.layersByDepth=c,d=Object.keys(p).map((t=>parseInt(t,10))).sort(HW);const f=this.inputs.slice(),m=[];for(const t of d)for(const e of p[t]){const t=e.outboundLayer;if(null!=t){for(const n of e.inputTensors)if(-1===f.indexOf(n))throw new OW(`Graph disconnected: cannot obtain value for tensor ${n} at layer "${t.name}". The following previous layers were accessed without issue: ${m}`);for(const t of e.outputTensors)f.push(t);m.push(t.name)}}this.nodesByDepth=p;const g=this.layers.map((t=>t.name));for(const t of g){const e=g.filter((e=>e===t)).length;if(1!==e)throw new OW(`The name "${t}" is used ${e} times in the model. All layer names should be unique. Layer names: `+JSON.stringify(g))}this.outboundNodes=[],this.inboundNodes=[],new IX({outboundLayer:this,inboundLayers:[],nodeIndices:[],tensorIndices:[],inputTensors:this.inputs,outputTensors:this.outputs,inputMasks:this.inputs.map((t=>null)),outputMasks:this.outputs.map((t=>null)),inputShapes:this.inputs.map((t=>t.shape)),outputShapes:this.outputs.map((t=>t.shape))}),this.built=!0,this._refCount=1}assertNotDisposed(){if(0===this._refCount)throw new Error(`Container '${this.name}' is already disposed.`)}dispose(){this.assertNotDisposed();const t={refCountAfterDispose:null,numDisposedVariables:0};if(0==--this._refCount){for(const e of this.layers)t.numDisposedVariables+=e.dispose().numDisposedVariables;for(const e of this.internalContainerRefs)t.numDisposedVariables+=e.dispose().numDisposedVariables}return t.refCountAfterDispose=this._refCount,t}get trainable(){return this.trainable_}set trainable(t){this.layers.forEach((e=>{e._trainableWeights.forEach((e=>e.trainable=t))})),this.trainable_=t}get trainableWeights(){if(this._trainableWeights.length>0)throw new AW("Container instance unexpectedly contains _trainableWeights.The trainable weights of a Container are a union of the trainable weights of its consituent Layers. Its own _trainableWeights must remain an empty Array.");if(!this.trainable)return[];let t=[];for(const e of this.layers)t=t.concat(e.trainableWeights);return t}get nonTrainableWeights(){const t=[];for(const e of this.layers)t.push(...e.nonTrainableWeights);if(!this.trainable){const e=[];for(const t of this.layers)e.push(...t.trainableWeights);return e.concat(t)}return t}get weights(){return this.trainableWeights.concat(this.nonTrainableWeights)}loadWeights(t,e=!0){const n={};let i=0;const s=(t=>{const e=Object.keys(t);if(0===e.length)return!1;const n=e[0].split("/");return!isNaN(parseInt(n[n.length-1],10))})(t);s&&this.parseWeights(t);for(const t of this.layers)for(const[e,r]of t.weights.entries()){const t=s?`${r.name.split("/").slice(0,-1).join("/")+"/"}${e}`:r.originalName;if(null!=n[t])throw new AW(`Duplicate weight name: ${t}`);n[t]=r,i++}const r=[];for(const i in t){let s=i;if(null==n[i]){const t=i.split("/");s=t.slice(0,-2).concat([t[t.length-1]]).join("/")}if(null!=n[s])r.push([n[s],t[i]]);else if(e)throw new AW(`Provided weight data has no target variable: ${i}`);delete n[s]}if(e){const t=[];for(const e in n)t.push(e);if(t.length>0)throw new AW(`${t.length} of ${i} weights are not set: ${t}`)}gX(r)}parseWeights(t){for(const e in Object.keys(t)){const n=e.split("/"),i=["vars","layer_checkpoint_dependencies"],s=n.map((t=>t.startsWith("_")?t.slice(1):t)).filter((t=>!i.includes(t))).join("/");s!==e&&(t[s]=t[e],delete t[e])}}updatedConfig(){const t=this.getConfig(),e={};return e.className=this.getClassName(),e.config=t,e.kerasVersion=`tfjs-layers ${tq}`,e.backend="TensorFlow.js",e}toJSON(t,e=!0){const n=Zj(this.updatedConfig());return e?JSON.stringify(n):n}call(t,e){return ED((()=>{t=PW(t);const n=new xX;for(let e=0;e{let n;return t=PW(t),n=null==e?kW(null,t.length):PW(e),this.runInternalGraph(t,n)[1]}))}computeOutputShape(t){const e=uX(t);if(e.length!==this.inputLayers.length)throw new AW(`Invalid inputShape argument ${t}: model has ${this.inputLayers.length} tensor inputs.`);const n={};for(let t=0;tparseInt(t,10))).sort(HW);if(i.length>1)for(const t of i){const e=this.nodesByDepth[t];for(const t of e){const e=t.outboundLayer;if(-1!==this.inputLayers.map((t=>t.id)).indexOf(e.id))continue;const i=[];for(let e=0;eparseInt(t,10))).sort(HW);for(const t of i){const e=this.nodesByDepth[t];for(const t of e){const e=t.outboundLayer,i=t.inputTensors,s=t.outputTensors,r=new Array;for(const t of i)t.id in n&&r.push(n[t.id]);if(r.length===i.length){let i,a,o,l,u={};if(null!=t.callArgs&&(u=t.callArgs),1===r.length){const[t,n]=r[0];null==u.mask&&(u.mask=n),o=PW(e.call(t,u)),l=PW(e.computeMask(t,n)),i=[t],a=[n]}else i=r.map((t=>t[0])),a=r.map((t=>t[1])),null==u.mask&&(u.mask=a),o=PW(e.call(i,u)),l=PW(e.computeMask(i,a));if(e.activityRegularizer)throw new MW("LayersModel invocation with concrete Tensor value(s) in the presence of activity regularizer(s) is not supported yet.");for(let t=0;t{const t=[];for(const e of this.layers)for(let n=0;n0){const t=[];for(let n=0;n0&&t.apply(FW(n),i)}function l(t){const n=t.name,r=yj(t,null!=e.customObjects?e.customObjects:{});r.setFastWeightInitDuringBuild(i),s[n]=r;t.inboundNodes.forEach((t=>{if(!(t instanceof Array))throw new AW(`Corrupted configuration, expected array for nodeData: ${t}`);a(r,t)}))}const u=e.name,h=e.layers;for(const t of h)l(t);for(;!zW(r);)for(const t of h){const e=s[t.name];if(e.name in r){const t=r[e.name];delete r[e.name];for(const n of t)o(e,n)}}const p=[],c=[],d=e.inputLayers;for(const t of d){const e=t[0],n=t[1],i=t[2];DW(e in s);const r=s[e].inboundNodes[n].outputTensors;p.push(r[i])}const f=e.outputLayers;for(const t of f){const e=t[0],n=t[1],i=t[2];DW(e in s);const r=s[e].inboundNodes[n].outputTensors;c.push(r[i])}return new t({inputs:p,outputs:c,name:u})}get stateful(){if(this._stateful)throw new AW("Container instance unexpectedly has _stateful = true. The statefulness of a Container is determined by the Layers it contains. Its _stateful property must remain the default false.");for(const t of this.layers)if(t.stateful)return!0;return!1}resetStates(){ED((()=>{this.layers.forEach((t=>{t.stateful&&t.resetStates()}))}))}} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function nq(t,e,n){const i=e.length;if(null==t||Array.isArray(t)&&0===t.length)return e.map((t=>null));if(1===i)return Array.isArray(t)&&1===t.length?t:"object"==typeof t&&e[0]in t?[t[e[0]]]:[t];if(Array.isArray(t)){if(t.length!==i)throw new Error(`Provided ${n} is an array of ${t.length} element(s), but the model has ${i} outputs. Make sure a set of weights is provided for each model output.`);return t}if("object"==typeof t&&Object.keys(t).length>0&&"object"==typeof t[Object.keys(t)[0]]){const n=[];return e.forEach((e=>{e in t?n.push(t[e]):n.push(null)})),n}throw new Error(`The model has multiple (${i}) outputs, so ${n} must be either an array with ${i} elements or an object with ${e} keys. Provided ${n} not understood: ${JSON.stringify(t)}`)}function iq(t,e){return nq(t,e,"classWeight")}async function sq(t,e,n,i){if(null!=e||null!=i)throw new Error("Support sampleWeight is not implemented yet");if(null!=n){const e=ED((()=>{if(1===t.shape.length)return $L(t);if(2===t.shape.length){if(t.shape[1]>1){return QP(t,1)}if(1===t.shape[1])return y$(t,[t.shape[0]]);throw new Error(`Encountered unexpected last-dimension size (${t.shape[1]}) during handling of class weights. The size is expected to be >= 1.`)}throw new Error(`Unexpected rank of target (y) tensor (${t.rank}) during handling of class weights. The rank is expected to be 1 or 2.`)})),i=Array.from(await e.data());bD(e);const s=[];return i.forEach((t=>{if(null==n[t])throw new Error(`classWeight must contain all classes in the training data. The class ${t} exists in the data but not in classWeight`);s.push(n[t])})),yU(s,"float32")}return null}function rq(t,e){return GL(t,e)}function aq(t,e){let n,i;const s=e;n=s.xs,i=s.ys,_O(null!=n&&null!=i,(()=>`A Dataset iterator for fitDataset() is expected to generate objects of the form \`{xs: xVal, ys: yVal}\`, where the two values may be \`tf.Tensor\`, an array of Tensors, or a map of string to Tensor. The provided Dataset instead generates ${e}`));const r=oq("input",t.inputNames,n),a=oq("output",t.outputNames,i),o=r[0].shape[0];_O(r.length===t.inputs.length,(()=>`LayersModel has ${t.inputs.length} inputs, but the dataset provides ${r.length} inputs. (Expected input keys: ${JSON.stringify(t.inputNames)})`)),_O(a.length===t.outputs.length,(()=>`LayersModel has ${t.outputs.length} outputs, but the dataset provides ${a.length} outputs. (Expected output keys: ${JSON.stringify(t.outputNames)})`));for(let e=0;e`Batch size mismatch: input ${t.inputNames[e]} has ${r[e].shape[0]}; expected ${o} based on input ${t.inputNames[0]}.`));for(let e=0;e`Batch size mismatch: output ${t.outputNames[e]} has ${a[e].shape[0]}; expected ${o} based on input ${t.inputNames[0]}.`));return{xs:r,ys:a}}function oq(t,e,n){if(n instanceof xk)return[n];if(Array.isArray(n))return _O(n.length===e.length,(()=>`Received an array of ${n.length} Tensors, but expected ${e.length} to match the ${t} keys ${e}.`)),n;{const i=[];for(const s of e){if(null==n[s])throw new AW(`The feature data generated by the dataset lacks the required ${t} key '${s}'.`);i.push(n[s])}return i}}async function lq(t,e,n){const i=null!=n.batchesPerEpoch;if(_O(null!=t.optimizer,(()=>"You must compile a model before training/testing. Use LayersModel.compile(modelCompileConfig).")),_O(null!=n,(()=>"For fitDataset(), the 2nd argument (config) is required, but it is not provided in this call.")),_O(null!=n.epochs&&n.epochs>0&&Number.isInteger(n.epochs),(()=>`For fitDataset(), config.epochs is expected to be a positive integer, but got ${n.epochs}`)),_O(!i||n.batchesPerEpoch>0&&Number.isInteger(n.batchesPerEpoch),(()=>`For fitDataset(), config.batchesPerEpoch is expected to be a positive integer if specified, but got ${n.batchesPerEpoch}`)),_O(null==n.validationSplit,(()=>"`validationSplit` is not supported by `fitDataset()`. Use validationData instead.")),t.isTraining)throw new Error("Cannot start training because another fit() call is ongoing.");t.isTraining=!0;try{const s=null!=n.validationData;let r,a;if(s)if(uq(n.validationData))_O(null==n.validationBatches||n.validationBatches>0&&Number.isInteger(n.validationBatches),(()=>`For fitDataset() with dataset-based validation, config.validationBatches is expected not to be provided, or to be a positive integer, but got ${n.validationBatches}`));else{const t=function(t){if(3===t.length)throw new MW("Validation with sample weights is not implemented yet.");return{xs:t[0],ys:t[1]}}(n.validationData);r=t.xs,a=t.ys}const o=t.makeTrainFunction(),l=t.getDedupedMetricsNames();let u;u=s?l.slice().concat(l.map((t=>"val_"+t))):l.slice();const h=gj(n.callbacks,n.yieldEvery),p=null==n.verbose?1:n.verbose,{callbackList:c,history:d}=Tj(h,p,n.epochs,null,null,function(t,e){let n=null;null!=e.batchesPerEpoch?n=e.batchesPerEpoch:Number.isFinite(t.size)&&(n=t.size);return n}(e,n),null,s,u);c.setModel(t),t.history=d,await c.onTrainBegin(),t.stopTraining_=!1;let f=null==n.initialEpoch?0:n.initialEpoch,m=await e.iterator();for(;f=n.batchesPerEpoch:e.done){if(s){let e;e=uq(n.validationData)?PW(await t.evaluateDataset(n.validationData,{batches:n.validationBatches})):PW(t.evaluate(r,a,{batchSize:null==n.validationBatchSize?32:n.validationBatchSize,verbose:0}));for(let n=0;n0&&Number.isInteger(t),(()=>`batchSize is required to be a positive integer, but got ${t}`))}function pq(t,e,n){return null==t?[null]:Array.isArray(t)?t.map((t=>xz(t,e,n-e))):xz(t,e,n-e)}function cq(t,e){return ED((()=>null==t?null:Array.isArray(t)?t.map((t=>cq(t,e))):Dz(t,"int32"===e.dtype?e:PL(e,"int32"))))}function dq(t,e){const n=[];let i=0,s=null;for(;i=t&&(s=t),n.push([i,s]),i=s;return n}function fq(t){const e=[];t instanceof xk&&(t=[t]);for(let n=0;nn.push(t.id)));else if(null!=e)for(const t in e){const i=e[t];n.push(i.id)}const i=[];if(t instanceof xk)-1===n.indexOf(t.id)&&i.push(t);else if(Array.isArray(t))t.forEach((t=>{-1===n.indexOf(t.id)&&i.push(t)}));else if(null!=t)for(const e in t){const s=t[e];-1===n.indexOf(s.id)&&i.push(s)}i.forEach((t=>{t.isDisposed||t.dispose()}))}function gq(t){return Array.isArray(t)}function _q(t){return! +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function(t){return t instanceof xk}(t)&&!gq(t)}function Tq(t,e,n,i=!0,s=""){if(null==e||0===e.length){if(null!=t){let e=!1;if(gq(t)&&t.length>0)e=!0;else if(_q(t)){for(const n in t)if(t.hasOwnProperty(n)){e=!0;break}}else e=!0;if(e)throw new AW(`Error when checking model ${s} expected no data, but got ${t}`)}return[]}if(null==t)return e.map((t=>null));let r;if(_q(t)){r=[];for(const n of e){if(null==t[n])throw new AW(`No data provided for "${n}". Need data for each key in: ${e}`);r.push(t[n])}}else if(gq(t)){if(t.length!==e.length)throw new AW(`Error when checking model ${s}: the Array of Tensors that you are passing to your model is not the size the model expected. Expected to see ${e.length} Tensor(s), but instead got the following list of Tensor(s): ${t}`);r=t}else{if(e.length>1)throw new AW(`The model ${s} expects ${e.length} Tensor(s), but only received one Tensor. Found: Tensor with shape ${t.shape}`);r=[t]}if(r=fq(r),null!=n)for(let t=0;t=0&&r!==o)throw new AW(`${s} expected a batch of elements where each example has shape [${n[t].slice(1,n[t].length)}] (i.e.,tensor shape [*,${n[t].slice(1,n[t].length)}]) but the ${s} received an input with ${a.shape[0]} examples, each with shape [${a.shape.slice(1,a.shape.length)}] (tensor shape [${a.shape}])`)}}return r}function yq(t,e,n,i=!0,s=""){let r;if(Array.isArray(t)){if(t.length!==e.length)throw new AW(`Error when checking model ${s}: the Array of Tensors that you are passing to your model is not the size the the model expected. Expected to see ${e.length} Tensor(s), but instead got ${t.length} Tensors(s).`);r=t}else{if(e.length>1)throw new AW(`The model expects ${e.length} ${s} Tensors, but only received one Tensor. Found: array with shape ${JSON.stringify(t.shape)}.`);r=[t]}if(null!=n)for(let t=0;tiG.adagrad(.01),Adadelta:()=>iG.adadelta(1,.95,vz()),Adam:()=>iG.adam(.001,.9,.999,vz()),Adamax:()=>iG.adamax(.002,.9,.999,vz(),0),RMSProp:()=>iG.rmsprop(.001,.9,0,vz()),SGD:()=>iG.sgd(.01)};if(e.adagrad=e.Adagrad,e.adadelta=e.Adadelta,e.adam=e.Adam,e.adamax=e.Adamax,e.rmsprop=e.RMSProp,e.sgd=e.SGD,t in e)return e[t]();throw new AW(`Unknown Optimizer ${t}`)}(t.optimizer),this.isOptimizerOwned=!0;else{if(!(t.optimizer instanceof oF))throw new AW("User-defined optimizer must be an instance of tf.Optimizer.");this.optimizer_=t.optimizer,this.isOptimizerOwned=!1}let e=[];if(Array.isArray(t.loss)||"string"==typeof t.loss||"function"==typeof t.loss)if(Array.isArray(t.loss)){if(t.loss.length!==this.outputs.length)throw new AW(`When passing an Array as loss, it should have one entry per model output. The model has ${this.outputs.length} output(s), but you passed loss=${t.loss}.`);const n=t.loss;e=n.map((t=>Cj(t)))}else{const n=Cj(t.loss);this.outputs.forEach((t=>{e.push(n)}))}else{t.loss=t.loss;for(const e in t.loss)if(-1===this.outputNames.indexOf(e))throw new AW(`Unknown entry in loss dictionary: "${e}". Only expected the following keys: ${this.outputNames}`);for(const n of this.outputNames)null==t.loss[n]&&console.warn(`Output "${n}" is missing from loss dictionary. We assume this was done on purpose, and we will not be expecting data to be passed to ${n} during training`),e.push(Cj(t.loss[n]))}this.lossFunctions=e,this.feedOutputNames=[],this.feedOutputShapes=[],this.feedLossFns=[];for(let t=0;t{for(let t=0;t1&&(this.metricsTensors.push([e,t]),this.metricsNames.push(this.outputNames[t]+"_loss"))}}));const i=function(t,e){if(null==t||Array.isArray(t)&&0===t.length)return e.map((t=>[]));let n;if("string"==typeof t||"function"==typeof t)n=[t];else{if(!Array.isArray(t)&&"object"!=typeof t)throw new TypeError(`Type of metrics argument not understood. Expected an string,function, Array, or Object, found: ${t}`);n=t}if(Array.isArray(n))return e.map((t=>n));{const t=[];for(const i of e){let e=n.hasOwnProperty(i)?n[i]:[];Array.isArray(e)||(e=[e]),t.push(e)}return t}}(t.metrics,this.outputNames),s=(t,e,n)=>{this.outputNames.length>1&&(e=this.outputNames[t]+"_"+e),this.metricsNames.push(e),this.metricsTensors.push([n,t])};dz("metric",(()=>{for(let t=0;t{let n,i,r;for(const a of e){if("string"==typeof a&&-1!==["accuracy","acc","crossentropy","ce"].indexOf(a)){const e=this.internalOutputShapes[t];let s;1===e[e.length-1]||this.lossFunctions[t]===Rj?-1!==["accuracy","acc"].indexOf(a)?i=Nj:-1!==["crossentropy","ce"].indexOf(a)&&(i=Pj):this.lossFunctions[t]===xj?-1!==["accuracy","acc"].indexOf(a)?i=$j:-1!==["crossentropy","ce"].indexOf(a)&&(i=Vj):-1!==["accuracy","acc"].indexOf(a)?i=kj:-1!==["crossentropy","ce"].indexOf(a)&&(i=Bj),-1!==["accuracy","acc"].indexOf(a)?s="acc":-1!==["crossentropy","ce"].indexOf(a)&&(s="ce"),r=i,n=""+s}else{const t=Yj(a);r=t,n=""+Gj(a)}let e;dz(n,(()=>{e=r})),s(t,n,e)}})(i[t])}})),this.collectedTrainableWeights=this.trainableWeights}checkTrainableWeightsConsistency(){null!=this.collectedTrainableWeights&&this.trainableWeights.length!==this.collectedTrainableWeights.length&&console.warn("Discrepancy between trainableweights and collected trainable weights. Did you set `model.trainable` without calling `model.compile()` afterwards?")}evaluate(t,e,n={}){const i=null==n.batchSize?32:n.batchSize;hq(i);const s=this.standardizeUserDataXY(t,e,!0,i);try{const t=s[0].concat(s[1]);this.makeTestFunction();const e=this.testFunction;return FW(this.testLoop(e,t,i,n.verbose,n.steps))}finally{mq(s[0],t),mq(s[1],e)}}async evaluateDataset(t,e){return this.makeTestFunction(),async function(t,e,n){const i=null!=(n=n||{}).batches,s=t.testFunction;let r=[];if(n.verbose>0)throw new MW("Verbose mode is not implemented yet.");_O(!i||n.batches>0&&Number.isInteger(n.batches),(()=>`Test loop expects \`batches\` to be a positive integer, but received ${JSON.stringify(n.batches)}`));const a="function"==typeof e.next?e:await e.iterator();let o=0,l=0;for(;!i||l{if(e.value){const{xs:n,ys:i}=aq(t,e.value),a=n.concat(i),u=ED((()=>s(a)));if(bD(a),0===l)for(let t=0;tVL(r[t],GL(h,e)))),l>0&&bD(n)}bD(u),o+=h,++l}return r})),e.done){i&&console.warn(`Your dataset iterator ran out of data during evaluateDataset(). Interrupting evalution. Make sure that your dataset can generate at least \`batches\` batches (in this case, ${n.batches} batches). You may need to use the repeat() function when building your dataset.`);break}}for(let t=0;tt.name));for(let i=0;i0){const n=[];throw e.forEach(((e,i)=>{null==e&&n.push(t[i])})),new AW(`Cannot find SymbolicTensors for output name(s): ${JSON.stringify(n)}`)}return e}predictLoop(t,e=32,n=!1){return ED((()=>{const i=this.checkNumSamples(t);if(n)throw new MW("Verbose predictLoop() is not implemented yet.");const s=dq(i,e),r=this.outputs.map((t=>[]));for(let e=0;e{const n=s[e][0],i=s[e][1],r=pq(t,n,i),a=[];if(Array.isArray(r))for(let t=0;tr[e].push(t)))}return FW(r.map((t=>b$(t,0))))}))}predict(t,e={}){const n=fq(t);yq(n,this.inputNames,this.feedInputShapes,!1);try{const t=null==e.batchSize?32:e.batchSize;return hq(t),this.predictLoop(n,t)}finally{mq(n,t)}}predictOnBatch(t){yq(t,this.inputNames,this.feedInputShapes,!0);const e=(Array.isArray(t)?t[0]:t).shape[0];return this.predictLoop(t,e)}standardizeUserDataXY(t,e,n=!0,i){if(null==this.optimizer_)throw new OW("You must compile a model before training/testing. Use LayersModel.compile(modelCompileArgs).");const s=[];for(let t=0;tt.shape[0])));n.sort();const i=WW(e.map((t=>t.shape[0])));if(i.sort(),n.length>1)throw new AW(`All input Tensors (x) should have the same number of samples. Got array shapes: ${JSON.stringify(t.map((t=>t.shape)))}`);if(i.length>1)throw new AW(`All target Tensors (y) should have the same number of samples. Got array shapes: ${JSON.stringify(e.map((t=>t.shape)))}`);if(n.length>0&&i.length>0&&!vO(n,i))throw new AW(`Input Tensors should have the same number of samples as target Tensors. Found ${n[0]} input sample(s) and ${i[0]} target sample(s).`)}(t=Tq(t,this.feedInputNames,this.feedInputShapes,!1,"input"),e=Tq(e,this.feedOutputNames,s,!1,"target")),function(t,e,n){const i=[Ej,Rj,Sj];for(let s=0;s0&&t[0].shape[0]%i!=0)throw new AW(`In a stateful network, you should only pass inputs with a number of samples that is divisible by the batch size ${i}. Found: ${t[0].shape[0]} sample(s).`);return[t,e]}async standardizeUserData(t,e,n,i,s=!0,r){const[a,o]=this.standardizeUserDataXY(t,e,s,r);if(null!=n)throw new Error("sample weight is not supported yet.");let l=null;if(null!=i){const t=iq(i,this.outputNames);l=[];for(let e=0;e{const r=this.checkNumSamples(e,n,s,"steps"),a=[];if(i>0)throw new MW("Verbose mode is not implemented yet.");if(null!=s)throw new MW("steps mode in testLoop() is not implemented yet");{const i=dq(r,n),s=yU(Ez(0,r));for(let n=0;n1){s+=`_${LW(t.slice(0,n),i)}`}e.push(s)}return e}makeTrainFunction(){return t=>{const e=[],n=t.slice(0,this.inputs.length),i=t.slice(this.inputs.length,this.inputs.length+this.outputs.length),s=t.slice(this.inputs.length+this.outputs.length,this.inputs.length+2*this.outputs.length),r=[],a=this.collectedTrainableWeights.map((t=>t.read()));return[this.optimizer_.minimize((()=>{const t=[];for(let e=0;e1&&t{l=VL(l,t)})),l}),!0,a)].concat(r)}}makeTestFunction(){this.testFunction=t=>ED((()=>{const e=[];let n;const i=t.slice(0,this.inputs.length),s=t.slice(this.inputs.length,this.inputs.length+this.outputs.length),r=[];for(let t=0;t0){if(g=!0,2!==n.validationData.length)throw 3===n.validationData.length?new MW("validationData including sample weights is not supported yet."):new AW(`When passing validation data, it must contain 2 (valX, valY) or 3 (valX, valY, valSampleWeight) items; ${n.validationData} is invalid.`);o=n.validationData[0],l=n.validationData[1];const t=!0,e=await this.standardizeUserData(o,l,null,null,t,c);u=e[0],h=e[1],m=u.concat(h)}else if(null!=n.validationSplit&&n.validationSplit>0&&n.validationSplit<1){g=!0;const t=Math.floor(i[0].shape[0]*(1-n.validationSplit)),e=i[0].shape[0];u=pq(i,t,e),r=i,i=pq(i,0,t),h=pq(s,t,e),a=s,s=pq(s,0,t),m=u.concat(h)}else null!=n.validationSteps&&(g=!0);const _=i.concat(s).concat(p);this.checkTrainableWeightsConsistency();const T=this.makeTrainFunction(),y=this.getDedupedMetricsNames();let I,E;g?(this.makeTestFunction(),I=this.testFunction,E=y.slice().concat(y.map((t=>"val_"+t)))):(I=null,m=[],E=y.slice());const b=gj(n.callbacks,n.yieldEvery);return await this.fitLoop(T,_,y,c,n.epochs,n.verbose,b,I,m,n.shuffle,E,n.initialEpoch,null,null)}finally{this.isTraining=!1,mq(i,t),mq(s,e),mq(r,t),mq(a,e),mq(u,o),mq(h,l),null!=p&&bD(p)}}async fitLoop(t,e,n,i,s,r,a,o,l,u,h,p,c,d){null==i&&(i=32),null==s&&(s=1),null==u&&(u=!0),null==p&&(p=0);let f=!1;if(null!=o&&null!=l&&(f=!0),null!=d&&(f=!0,null==c))throw new AW("Can only use `validationSteps` when doing step-wise training, i.e., `stepsPerEpoch` must be set.");const m=this.checkNumSamples(e,i,c,"steps_per_epoch");let g;null!=m&&(g=Ez(0,m)),null==r&&(r=1);const{callbackList:_,history:T}=Tj(a,r,s,p,m,c,i,f,h);_.setModel(this),this.history=T,await _.onTrainBegin(),this.stopTraining_=!1;for(let r=p;r{const p=a[u][0],c=a[u][1],d=xz(r,p,c-p);h.batch=u,h.size=c-p;const m=cq(e,d),g=t(m);for(let t=0;t$W(t)))}else{const e=Object.keys(this.loss);t={};const n=this.loss;for(const i of e){if("string"!=typeof n[i])throw new Error("Serialization of non-string loss is not supported.");t[i]=$W(n[i])}}return t}getMetricIdentifiers(){if("string"==typeof this.metrics||"function"==typeof this.metrics)return[$W(Gj(this.metrics))];if(Array.isArray(this.metrics))return this.metrics.map((t=>$W(Gj(t))));{const t={};for(const e in this.metrics)t[e]=$W(Gj(this.metrics[e]));return t}}getTrainingConfig(){return{loss:this.getLossIdentifiers(),metrics:this.getMetricIdentifiers(),optimizer_config:{class_name:this.optimizer.getClassName(),config:this.optimizer.getConfig()}}}loadTrainingConfig(t){if(null!=t.weighted_metrics)throw new Error("Loading weight_metrics is not supported yet.");if(null!=t.loss_weights)throw new Error("Loading loss_weights is not supported yet.");if(null!=t.sample_weight_mode)throw new Error("Loading sample_weight_mode is not supported yet.");const e=yj(Jj(t.optimizer_config));let n,i;if("string"==typeof t.loss)n=BW(t.loss);else if(Array.isArray(t.loss))n=t.loss.map((t=>BW(t)));else if(null!=t.loss){n={};for(const e in t.loss)n[e]=BW(t.loss[e])}if(Array.isArray(t.metrics))i=t.metrics.map((t=>BW(t)));else if(null!=t.metrics){i={};for(const e in t.metrics)i[e]=BW(t.metrics[e])}this.compile({loss:n,metrics:i,optimizer:e})}async save(t,e){if("string"==typeof t){const e=eL(t);if(0===e.length)throw new AW(`Cannot find any save handlers for URL '${t}'`);if(e.length>1)throw new AW(`Found more than one (${e.length}) save handlers for URL '${t}'`);t=e[0]}if(null==t.save)throw new AW("LayersModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.");const n=await LD(this.getNamedWeights(e)),i={modelTopology:this.toJSON(null,!1),format:"layers-model",generatedBy:`TensorFlow.js tfjs-layers v${tq}`,convertedBy:null};if(null!=e&&e.includeOptimizer&&null!=this.optimizer){i.trainingConfig=this.getTrainingConfig();const t="optimizer",{data:e,specs:s}=await LD(await this.optimizer.getWeights(),t);n.specs.push(...s),n.data=WD([n.data,e])}if(null!=this.userDefinedMetadata){const t=!0;Wj(this.userDefinedMetadata,this.name,t),i.userDefinedMetadata=this.userDefinedMetadata}return i.weightData=n.data,i.weightSpecs=n.specs,t.save(i)}setUserDefinedMetadata(t){Wj(t,this.name),this.userDefinedMetadata=t}getUserDefinedMetadata(){return this.userDefinedMetadata}}Iq.className="Model",rF(Iq);class Eq extends Iq{} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +async function bq(t,e){"modelTopology"in t||(t={modelTopology:t});let n=t.modelTopology;null!=n.model_config&&(n=n.model_config);const i=yj(Jj(n),e);if(null!=t.weightsManifest){const e=await MF(t.weightsManifest,t.pathPrefix,i.weights.map((t=>t.originalName))),n={};for(const t of i.weights)n[t.originalName]=e[t.originalName];i.loadWeights(n),bD(e)}return i}async function vq(t,e){if(null==e&&(e={}),"string"==typeof t){const n=nL(t,e);if(0===n.length)n.push(FF(t,e));else if(n.length>1)throw new AW(`Found more than one (${n.length}) load handlers for URL '${t}'`);t=n[0]}return async function(t,e,n){null==n&&(n={});if(null==t.load)throw new AW("Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.");const i=await t.load();let s=i.modelTopology;null!=s.model_config&&(s=s.model_config);const r=null==n.strict||n.strict,a=null!=i.weightData&&null!=i.weightSpecs&&r,o=yj(Jj(s),e,a),l=i.trainingConfig;null!=l&&o.loadTrainingConfig(l);null!=i.userDefinedMetadata&&o.setUserDefinedMetadata(i.userDefinedMetadata);if(null!=i.weightData){if(null==i.weightSpecs)throw new AW("LayersModel artifacts contains weight data, but not weight specs. Therefore loading of weights cannot proceed.");const{modelWeights:t,optimizerWeights:e}=function(t,e){const n=FD(t,e),i={},s=[];return e.forEach((t=>{"optimizer"===t.group?s.push({name:t.name,tensor:n[t.name]}):i[t.name]=n[t.name]})),{modelWeights:i,optimizerWeights:s}}(i.weightData,i.weightSpecs);o.loadWeights(t,r),null!=o.optimizer&&e.length>0&&await o.optimizer.setWeights(e),bD(t),bD(e.map((t=>t.tensor)))}return o}(t,void 0,e)}Eq.className="Functional",rF(Eq);class wq extends Iq{constructor(t){if(super({inputs:[],outputs:[]}),t=t||{},this.trainable=!0,this.built=!1,this.name=null!=t.name?t.name:ez("sequential_"),null!=t.layers)for(const e of t.layers)this.add(e)}checkShape(t){if(t.inboundNodes[0].outputTensors[0].shape.some((t=>t<0)))throw new AW(`Negative dimension size caused by adding layer ${t.name} with input shape [${t.inboundNodes[0].inputTensors[0].shape}]`)}add(t){const e=t instanceof wq||t instanceof Iq;let n;if(e){if(n=t,1!==n.outputs.length)throw new AW("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");if(1!==n.inputs.length)throw new AW("All layers in a Sequential model should have a single input tensor. For multi-input layers, use the functional API.")}if(0===this.outputs.length){if(0===t.inboundNodes.length){if(null==t.batchInputShape)throw new AW("The first layer in a Sequential model must get an `inputShape` or `batchInputShape` argument.");const e=SX({batchShape:t.batchInputShape,dtype:t.dtype,name:t.name+"_input"});t.apply(e)}if(e)this.outputs=n.outputs,this.inputs=n.inputs;else{if(1!==t.inboundNodes.length)throw new AW(`A layer added to a Sequential model must not already be connected somewhere else. LayersModel received layer ${t.name} which has ${t.inboundNodes.length} pre-existing inbound connections.`);if(1!==t.inboundNodes[0].outputTensors.length)throw new AW("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");this.checkShape(t),this.outputs=[t.inboundNodes[0].outputTensors[0]],this.inputs=vX(this.outputs[0])}this.inboundNodes=[],new IX({outboundLayer:this,inboundLayers:[],nodeIndices:[],tensorIndices:[],inputTensors:this.inputs,outputTensors:this.outputs,inputMasks:kW(null,this.inputs.length),outputMasks:[null],inputShapes:this.inputs.map((t=>t.shape)),outputShapes:this.outputs[0].shape})}else{const e=t.apply(this.outputs[0]);if(Array.isArray(e))throw new TypeError("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");this.checkShape(t),this.outputs=[e],this.inboundNodes[0].outputTensors=this.outputs,this.inboundNodes[0].outputShapes=[this.outputs[0].shape]}this.layers.push(t),this.built=!1}pop(){if(0===this.layers.length)throw new TypeError("There are no layers in the model.");if(this.layers.pop(),0===this.layers.length)this.outputs=[],this.inboundNodes=[],this.outboundNodes=[];else{const t=this.layers.length-1;this.layers[t].outboundNodes=[],this.outputs=[this.layers[t].output],this.inboundNodes[0].outputTensors=this.outputs,this.inboundNodes[0].outputShapes=[this.outputs[0].shape]}}call(t,e){return null==this.model&&this.build(),this.model.call(t,e)}build(t){if(pX(t),0===this.inputs.length||0===this.outputs.length)throw new TypeError("Sequential model cannot be built: model is empty. Add some layers first.");this.model=new Iq({inputs:this.inputs,outputs:this.outputs[0],name:this.name+"_model"}),this.model.trainable=this.trainable,this.supportsMasking=this.model.supportsMasking,this.inputLayers=this.model.inputLayers,this.inputLayersNodeIndices=this.model.inputLayersNodeIndices,this.inputLayersTensorIndices=this.model.inputLayersTensorIndices,this.outputLayers=this.model.outputLayers,this.outputLayersNodeIndices=this.model.outputLayersNodeIndices,this.outputLayersTensorIndices=this.model.outputLayersTensorIndices,this.nodesByDepth=this.model.nodesByDepth,this.containerNodes=this.model.containerNodes,this.outputNames=this.model.outputNames,this.inputNames=this.model.inputNames,this.built=!0}countParams(){return this.built||this.build(),super.countParams()}summary(t,e,n=console.log){this.built||this.build(),super.summary(t,e,n)}setWeights(t){null==this.model&&this.build(),this.model.setWeights(t)}evaluate(t,e,n={}){if(!this.built)throw new OW("The model needs to be compiled before being used.");return this.model.evaluate(t,e,n)}async evaluateDataset(t,e){if(!this.built)throw new OW("The model needs to be compiled before being used.");return this.model.evaluateDataset(t,e)}predict(t,e={}){return null==this.model&&this.build(),this.model.predict(t,e)}predictOnBatch(t){return null==this.model&&this.build(),this.model.predictOnBatch(t)}compile(t){this.build(),this.model.compile(t),this.optimizer_=this.model.optimizer,this.isOptimizerOwned=this.model.isOptimizerOwned,this.loss=this.model.loss,this.metrics=this.model.metrics,this.metricsTensors=this.model.metricsTensors,this.metricsNames=this.model.metricsNames}get optimizer(){return null==this.model?void 0:this.model.optimizer}set optimizer(t){this.model.optimizer=t}async fit(t,e,n={}){if(!this.built)throw new OW("The model needs to be compiled before being used.");return this.model.fit(t,e,n)}async fitDataset(t,e){if(!this.built)throw new OW("The model needs to be compiled before being used.");return this.model.fitDataset(t,e)}async trainOnBatch(t,e){return this.model.trainOnBatch(t,e)}static fromConfig(t,e,n={},i=!1){let s,r={};if(e instanceof Array){if(null==e[0].className||"Merge"===e[0].className)throw new AW("Legacy serialization format not supported yet.");s=e}else _O(null!=e.layers,(()=>"When the config data for a Sequential model is not an Array, it must be an Object that contains the 'layers' field.")),s=e.layers,delete e.layers,r=e;const a=new t(r);if(!(a instanceof wq))throw new MW(`Sequential.fromConfig called on non-Sequential input: ${a}`);for(const t of s){const e=yj(t,void 0,i);i&&e.setFastWeightInitDuringBuild(!0),a.add(e)}return a}set stopTraining(t){if(null==this.model)throw new AW("Cannot set the stopTraining property of a sequential model before it is compiled.");this.model.stopTraining=t}get stopTraining(){if(null==this.model)throw new AW("Cannot get the stopTraining property of a sequential model before it is compiled.");return this.model.stopTraining}getConfig(){const t=[];for(const e of this.layers){const n={};n.className=e.getClassName(),n.config=e.getConfig(),t.push(n)}return{name:this.name,layers:t}}} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function Sq(t){return new Iq(t)}function xq(t){return new wq(t)}function Rq(t){return SX(t)}function Oq(t,e){_j.registerCallbackConstructor(t,e)}wq.className="Sequential",rF(wq); +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class Aq extends iF{getConfig(){return{}}}class Mq extends Aq{apply(t,e=1){return function(t,e=1){if(1!==e)throw new MW(`Support for alpha values other than 1 (${e}) is not implemented yet.`);return uB(t)}(t,e)}}Mq.className="elu",rF(Mq);class Cq extends Aq{apply(t){return QV(t)}}Cq.className="selu",rF(Cq);class Nq extends Aq{apply(t){return YV(t)}}Nq.className="relu",rF(Nq);class kq extends Aq{apply(t){return ED((()=>uV(6,YV(t))))}}kq.className="relu6",rF(kq);class Dq extends Aq{apply(t){return t}}Dq.className="linear",rF(Dq);class Lq extends Aq{apply(t){return v$(t)}}Lq.className="sigmoid",rF(Lq);class Fq extends Aq{apply(t){return function(t){return ED((()=>{const e=VL(.5,GL(.2,t));return P$(e,0,1)}))}(t)}}Fq.className="hardSigmoid",rF(Fq);class Pq extends Aq{apply(t){return WB(t)}}Pq.className="softplus",rF(Pq);class $q extends Aq{apply(t){return function(t){return ED((()=>YL(t,VL(fF(t),1))))}(t)}}$q.className="softsign",rF($q);class Bq extends Aq{apply(t){return S$(t)}}Bq.className="tanh",rF(Bq);class Vq extends Aq{apply(t,e=-1){return oU(t,e)}}Vq.className="softmax",rF(Vq);class Uq extends Aq{apply(t,e=-1){return XB(t,e)}}Uq.className="logSoftmax",rF(Uq);class Yq extends Aq{apply(t){return ED((()=>ED((()=>{const e=Math.sqrt(2),n=GL(.5,VL(1,pB(YL(t,e))));return GL(t,n)}))))}}Yq.className="gelu",rF(Yq);class Gq extends Aq{apply(t){return ED((()=>GL(.5,GL(t,VL(1,S$(GL(HL(YL(2,Math.PI)),VL(t,GL(.044715,pF(t,3))))))))))}}Gq.className="gelu_new",rF(Gq);class Hq extends Aq{apply(t){return ED((()=>GL(t,S$(WB(t)))))}}Hq.className="mish",rF(Hq);class Wq extends Aq{apply(t,e=1){return ED((()=>GL(v$(GL(t,e)),t)))}}function zq(t){return t.getClassName()}function Xq(t,e={}){return GW(t,sF.getMap().classNameMap,e,"activation")}function jq(t){if(null==t){const t={className:"linear",config:{}};return Xq(t)}if("string"==typeof t){const e={};return e.className=t,e.config={},Xq(e)}return t instanceof Aq?t:Xq(t)} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function qq(t){if(null!=t&&"object"!=typeof t)throw new Error(`Argument to L1L2 regularizer's constructor is expected to be an object, but received: ${t}`)}Wq.className="swish",rF(Wq);class Kq extends iF{}class Qq extends Kq{constructor(t){super(),qq(t),this.l1=null==t||null==t.l1?.01:t.l1,this.l2=null==t||null==t.l2?.01:t.l2,this.hasL1=0!==this.l1,this.hasL2=0!==this.l2}apply(t){return ED((()=>{let e=aV([1]);return this.hasL1&&(e=VL(e,bB(GL(this.l1,fF(t))))),this.hasL2&&(e=VL(e,bB(GL(this.l2,Lz(t))))),y$(e,[])}))}getConfig(){return{l1:this.l1,l2:this.l2}}static fromConfig(t,e){return new t({l1:e.l1,l2:e.l2})}}Qq.className="L1L2",rF(Qq);const Jq={l1l2:"L1L2"};function Zq(t){return UW(t)}function tK(t,e={}){return GW(t,sF.getMap().classNameMap,e,"regularizer")}function eK(t){if(null==t)return null;if("string"==typeof t){return tK({className:t in Jq?Jq[t]:t,config:{}})}return t instanceof Kq?t:tK(t)} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class nK extends bX{constructor(t){super(null==t?{}:t),this.supportsMasking=!0,null!=t&&(this.maxValue=t.maxValue)}call(t,e){t=hX(t);let n=YV(t);return null!=this.maxValue&&(n=P$(n,0,this.maxValue)),n}computeOutputShape(t){return t}getConfig(){const t={maxValue:this.maxValue},e=super.getConfig();return Object.assign(t,e),t}}nK.className="ReLU",rF(nK);class iK extends bX{constructor(t){super(null==t?{}:t),this.DEFAULT_ALPHA=.3,null==t&&(t={}),this.alpha=null==t.alpha?this.DEFAULT_ALPHA:t.alpha}call(t,e){const n=hX(t);return $B(n,this.alpha)}computeOutputShape(t){return t}getConfig(){const t={alpha:this.alpha},e=super.getConfig();return Object.assign(t,e),t}}iK.className="LeakyReLU",rF(iK);class sK extends bX{constructor(t){if(super(null==t?{}:t),this.DEFAULT_ALPHA_INITIALIZER="zeros",null==t&&(t={}),this.supportsMasking=!0,this.alphaInitializer=oX(t.alphaInitializer||this.DEFAULT_ALPHA_INITIALIZER),this.alphaRegularizer=eK(t.alphaRegularizer),this.alphaConstraint=YX(t.alphaConstraint),null==t.sharedAxes)this.sharedAxes=null;else if(Array.isArray(t.sharedAxes))this.sharedAxes=t.sharedAxes;else{if("number"!=typeof t.sharedAxes)throw new AW(`Expected sharedAxes to be a number or an array of numbers, but got ${t.sharedAxes}`);this.sharedAxes=[t.sharedAxes]}}build(t){const e=(t=pX(t)).slice(1);if(null!=this.sharedAxes)for(const t of this.sharedAxes)e[t-1]=1;this.alpha=this.addWeight("alpha",e,"float32",this.alphaInitializer,this.alphaRegularizer,!0,this.alphaConstraint);const n={};if(null!=this.sharedAxes)for(let e=1;e{let n=hX(t);const i=e.mask;if(null!=i){const t=GL(cF(oV(n.shape),PL(i,n.dtype)),tF(-1e9));n=VL(n,t)}return this.axis instanceof Array?this.axis.length>1?xB(cF(n,jB(n,this.axis,!0))):this.softmax(n,this.axis[0]):this.softmax(n,this.axis)}))}computeOutputShape(t){return t}getConfig(){const t={axis:this.axis},e=super.getConfig();return Object.assign(t,e),t}} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function lK(t,e,n){if("number"==typeof t)return kW(t,e);if(t.length!==e)throw new AW(`The ${n} argument must be an integer or tuple of ${e} integers. Received: ${t.length} elements.`);for(let s=0;s(lz(e),"channelsFirst"===e?qF(t,[0,2,3,1]):t)))}function cK(t,e){return ED((()=>(lz(e),"channelsFirst"===e?qF(t,[0,2,3,4,1]):t)))}function dK(t,e,n,i=1,s="valid",r,a=1){return ED((()=>{if(null==r&&(r="channelsLast"),lz(r),3!==t.shape.length)throw new AW(`The input of a conv1dWithBias operation should be 3, but is ${t.shape.length} instead.`);if(3!==e.shape.length)throw new AW(`The kernel for a conv1dWithBias operation should be 3, but is ${e.shape.length} instead`);if(null!=n&&1!==n.shape.length)throw new AW(`The bias for a conv1dWithBias operation should be 1, but is ${n.shape.length} instead`);if("channelsFirst"===r&&(t=qF(t,[0,2,1])),"causal"===s)throw new MW("The support for CAUSAL padding mode in conv1dWithBias is not implemented yet.");let o=G$(t,e,i,"same"===s?"same":"valid","NWC",a);return null!=n&&(o=Pz(o,n)),o}))}function fK(t,e,n,i=[1,1],s="valid",r,a,o=null){return ED((()=>{if(null==r&&(r="channelsLast"),lz(r),3!==t.rank&&4!==t.rank)throw new AW(`conv2dWithBiasActivation expects input to be of rank 3 or 4, but received ${t.rank}.`);if(3!==e.rank&&4!==e.rank)throw new AW(`conv2dWithBiasActivation expects kernel to be of rank 3 or 4, but received ${t.rank}.`);let l=pK(t,r);if("causal"===s)throw new MW("The support for CAUSAL padding mode in conv1dWithBias is not implemented yet.");return l=jU({x:l,filter:e,strides:i,pad:"same"===s?"same":"valid",dilations:a,dataFormat:"NHWC",bias:n,activation:o}),"channelsFirst"===r&&(l=qF(l,[0,3,1,2])),l}))}function mK(t,e,n,i=[1,1,1],s="valid",r,a){return ED((()=>{if(null==r&&(r="channelsLast"),lz(r),4!==t.rank&&5!==t.rank)throw new AW(`conv3dWithBias expects input to be of rank 4 or 5, but received ${t.rank}.`);if(4!==e.rank&&5!==e.rank)throw new AW(`conv3dWithBias expects kernel to be of rank 4 or 5, but received ${t.rank}.`);let o=cK(t,r);if("causal"===s)throw new MW("The support for CAUSAL padding mode in conv3dWithBias is not implemented yet.");return o=z$(o,e,i,"same"===s?"same":"valid","NDHWC",a),null!=n&&(o=Pz(o,n)),"channelsFirst"===r&&(o=qF(o,[0,4,1,2,3])),o}))}oK.className="Softmax",rF(oK);class gK extends bX{constructor(t,e){if(super(e),this.bias=null,this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_BIAS_INITIALIZER="zeros",gK.verifyArgs(e),this.rank=t,qW(this.rank,"rank"),1!==this.rank&&2!==this.rank&&3!==this.rank)throw new MW(`Convolution layer for rank other than 1, 2, or 3 (${this.rank}) is not implemented yet.`);if(this.kernelSize=lK(e.kernelSize,t,"kernelSize"),this.strides=lK(null==e.strides?1:e.strides,t,"strides"),this.padding=null==e.padding?"valid":e.padding,uz(this.padding),this.dataFormat=null==e.dataFormat?"channelsLast":e.dataFormat,lz(this.dataFormat),this.activation=jq(e.activation),this.useBias=null==e.useBias||e.useBias,this.biasInitializer=oX(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.biasConstraint=YX(e.biasConstraint),this.biasRegularizer=eK(e.biasRegularizer),this.activityRegularizer=eK(e.activityRegularizer),this.dilationRate=lK(null==e.dilationRate?1:e.dilationRate,t,"dilationRate"),1===this.rank&&Array.isArray(this.dilationRate)&&1!==this.dilationRate.length)throw new AW(`dilationRate must be a number or an array of a single number for 1D convolution, but received ${JSON.stringify(this.dilationRate)}`);if(2===this.rank){if("number"==typeof this.dilationRate)this.dilationRate=[this.dilationRate,this.dilationRate];else if(2!==this.dilationRate.length)throw new AW(`dilationRate must be a number or array of two numbers for 2D convolution, but received ${JSON.stringify(this.dilationRate)}`)}else if(3===this.rank)if("number"==typeof this.dilationRate)this.dilationRate=[this.dilationRate,this.dilationRate,this.dilationRate];else if(3!==this.dilationRate.length)throw new AW(`dilationRate must be a number or array of three numbers for 3D convolution, but received ${JSON.stringify(this.dilationRate)}`)}static verifyArgs(t){if(DW("kernelSize"in t,"required key 'kernelSize' not in config"),"number"!=typeof t.kernelSize&&!jW(t.kernelSize,"number",1,3))throw new AW(`BaseConv expects config.kernelSize to be number or number[] with length 1, 2, or 3, but received ${JSON.stringify(t.kernelSize)}.`)}getConfig(){const t={kernelSize:this.kernelSize,strides:this.strides,padding:this.padding,dataFormat:this.dataFormat,dilationRate:this.dilationRate,activation:zq(this.activation),useBias:this.useBias,biasInitializer:aX(this.biasInitializer),biasRegularizer:Zq(this.biasRegularizer),activityRegularizer:Zq(this.activityRegularizer),biasConstraint:VX(this.biasConstraint)},e=super.getConfig();return Object.assign(t,e),t}}class _K extends gK{constructor(t,e){super(t,e),this.kernel=null,_K.verifyArgs(e),this.filters=e.filters,qW(this.filters,"filters"),this.kernelInitializer=oX(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.kernelConstraint=YX(e.kernelConstraint),this.kernelRegularizer=eK(e.kernelRegularizer)}build(t){t=pX(t);const e="channelsFirst"===this.dataFormat?1:t.length-1;if(null==t[e])throw new AW(`The channel dimension of the input should be defined. Found ${t[e]}`);const n=t[e],i=this.kernelSize.concat([n,this.filters]);this.kernel=this.addWeight("kernel",i,null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[{ndim:this.rank+2,axes:{[e]:n}}],this.built=!0}call(t,e){return ED((()=>{let e;t=hX(t);const n=null==this.bias?null:this.bias.read(),i=QW(this.activation.getClassName());if(null!=i&&2===this.rank)e=fK(t,this.kernel.read(),n,this.strides,this.padding,this.dataFormat,this.dilationRate,i);else{if(1===this.rank)e=dK(t,this.kernel.read(),n,this.strides[0],this.padding,this.dataFormat,this.dilationRate[0]);else if(2===this.rank)e=fK(t,this.kernel.read(),n,this.strides,this.padding,this.dataFormat,this.dilationRate);else{if(3!==this.rank)throw new MW("convolutions greater than 3D are not implemented yet.");e=mK(t,this.kernel.read(),n,this.strides,this.padding,this.dataFormat,this.dilationRate)}null!=this.activation&&(e=this.activation.apply(e))}return e}))}computeOutputShape(t){t=pX(t);const e=[],n="channelsLast"===this.dataFormat?t.slice(1,t.length-1):t.slice(2);for(let t=0;t 0 but got ${JSON.stringify(t.filters)}`)}}class TK extends _K{constructor(t){super(2,t),TK.verifyArgs(t)}getConfig(){const t=super.getConfig();return delete t.rank,t}static verifyArgs(t){if("number"!=typeof t.kernelSize&&!jW(t.kernelSize,"number",1,2))throw new AW(`Conv2D expects config.kernelSize to be number or number[] with length 1 or 2, but received ${JSON.stringify(t.kernelSize)}.`)}}TK.className="Conv2D",rF(TK);class yK extends _K{constructor(t){super(3,t),yK.verifyArgs(t)}getConfig(){const t=super.getConfig();return delete t.rank,t}static verifyArgs(t){if("number"!=typeof t.kernelSize&&(!Array.isArray(t.kernelSize)||1!==t.kernelSize.length&&3!==t.kernelSize.length))throw new AW(`Conv3D expects config.kernelSize to be number or [number, number, number], but received ${JSON.stringify(t.kernelSize)}.`)}}yK.className="Conv3D",rF(yK);class IK extends TK{constructor(t){if(super(t),this.inputSpec=[new _X({ndim:4})],"same"!==this.padding&&"valid"!==this.padding)throw new AW(`Conv2DTranspose currently supports only padding modes 'same' and 'valid', but received padding mode ${this.padding}`)}build(t){if(4!==(t=pX(t)).length)throw new AW("Input should have rank 4; Received input shape: "+JSON.stringify(t));const e="channelsFirst"===this.dataFormat?1:t.length-1;if(null==t[e])throw new AW("The channel dimension of the inputs should be defined. Found `None`.");const n=t[e],i=this.kernelSize.concat([this.filters,n]);this.kernel=this.addWeight("kernel",i,"float32",this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],"float32",this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[new _X({ndim:4,axes:{[e]:n}})],this.built=!0}call(t,e){return ED((()=>{let e=hX(t);if(4!==e.shape.length)throw new AW(`Conv2DTranspose.call() expects input tensor to be rank-4, but received a tensor of rank-${e.shape.length}`);const n=e.shape,i=n[0];let s,r;"channelsFirst"===this.dataFormat?(s=2,r=3):(s=1,r=2);const a=n[s],o=n[r],l=this.kernelSize[0],u=this.kernelSize[1],h=this.strides[0],p=this.strides[1],c=[i,hK(a,h,l,this.padding),hK(o,p,u,this.padding),this.filters];"channelsLast"!==this.dataFormat&&(e=qF(e,[0,2,3,1]));let d=W$(e,this.kernel.read(),c,this.strides,this.padding);return"channelsLast"!==this.dataFormat&&(d=qF(d,[0,3,1,2])),null!=this.bias&&(d=Pz(d,this.bias.read(),this.dataFormat)),null!=this.activation&&(d=this.activation.apply(d)),d}))}computeOutputShape(t){const e=(t=pX(t)).slice();let n,i,s;"channelsFirst"===this.dataFormat?(n=1,i=2,s=3):(n=3,i=1,s=2);const r=this.kernelSize[0],a=this.kernelSize[1],o=this.strides[0],l=this.strides[1];return e[n]=this.filters,e[i]=hK(e[i],o,r,this.padding),e[s]=hK(e[s],l,a,this.padding),e}getConfig(){const t=super.getConfig();return delete t.dilationRate,t}}IK.className="Conv2DTranspose",rF(IK);class EK extends yK{constructor(t){if(super(t),this.inputSpec=[new _X({ndim:5})],"same"!==this.padding&&"valid"!==this.padding)throw new AW(`Conv3DTranspose currently supports only padding modes 'same' and 'valid', but received padding mode ${this.padding}`)}build(t){if(5!==(t=pX(t)).length)throw new AW("Input should have rank 5; Received input shape: "+JSON.stringify(t));const e="channelsFirst"===this.dataFormat?1:t.length-1;if(null==t[e])throw new AW("The channel dimension of the inputs should be defined. Found `None`.");const n=t[e],i=this.kernelSize.concat([this.filters,n]);this.kernel=this.addWeight("kernel",i,"float32",this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],"float32",this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[new _X({ndim:5,axes:{[e]:n}})],this.built=!0}call(t,e){return ED((()=>{let e=hX(t);if(5!==e.shape.length)throw new AW(`Conv3DTranspose.call() expects input tensor to be rank-4, but received a tensor of rank-${e.shape.length}`);const n=e.shape,i=n[0];let s,r,a;"channelsFirst"===this.dataFormat?(a=2,s=3,r=4):(a=1,s=2,r=3);const o=n[a],l=n[s],u=n[r],h=this.kernelSize[0],p=this.kernelSize[1],c=this.kernelSize[2],d=this.strides[0],f=this.strides[1],m=this.strides[2],g=[i,hK(o,d,h,this.padding),hK(l,f,p,this.padding),hK(u,m,c,this.padding),this.filters];"channelsLast"!==this.dataFormat&&(e=qF(e,[0,2,3,4,1]));let _=j$(e,this.kernel.read(),g,this.strides,this.padding);return"channelsLast"!==this.dataFormat&&(_=qF(_,[0,4,1,2,3])),null!==this.bias&&(_=Pz(_,this.bias.read(),this.dataFormat)),null!==this.activation&&(_=this.activation.apply(_)),_}))}computeOutputShape(t){const e=(t=pX(t)).slice();let n,i,s,r;"channelsFirst"===this.dataFormat?(n=1,i=2,s=3,r=4):(n=4,i=1,s=2,r=3);const a=this.kernelSize[0],o=this.kernelSize[1],l=this.kernelSize[2],u=this.strides[0],h=this.strides[1],p=this.strides[2];return e[n]=this.filters,e[i]=hK(e[i],u,a,this.padding),e[s]=hK(e[s],h,o,this.padding),e[r]=hK(e[r],p,l,this.padding),e}getConfig(){const t=super.getConfig();return delete t.dilationRate,t}}EK.className="Conv3DTranspose",rF(EK);class bK extends _K{constructor(t,e){if(super(t,e),this.DEFAULT_DEPTHWISE_INITIALIZER="glorotUniform",this.DEFAULT_POINTWISE_INITIALIZER="glorotUniform",this.depthwiseKernel=null,this.pointwiseKernel=null,null==e.filters)throw new AW("The `filters` configuration field is required by SeparableConv, but is unspecified.");if(null!=e.kernelInitializer||null!=e.kernelRegularizer||null!=e.kernelConstraint)throw new AW("Fields kernelInitializer, kernelRegularizer and kernelConstraint are invalid for SeparableConv2D. Use depthwiseInitializer, depthwiseRegularizer, depthwiseConstraint, pointwiseInitializer, pointwiseRegularizer and pointwiseConstraint instead.");if(null!=e.padding&&"same"!==e.padding&&"valid"!==e.padding)throw new AW(`SeparableConv${this.rank}D supports only padding modes: 'same' and 'valid', but received ${JSON.stringify(e.padding)}`);this.depthMultiplier=null==e.depthMultiplier?1:e.depthMultiplier,this.depthwiseInitializer=oX(e.depthwiseInitializer||this.DEFAULT_DEPTHWISE_INITIALIZER),this.depthwiseRegularizer=eK(e.depthwiseRegularizer),this.depthwiseConstraint=YX(e.depthwiseConstraint),this.pointwiseInitializer=oX(e.depthwiseInitializer||this.DEFAULT_POINTWISE_INITIALIZER),this.pointwiseRegularizer=eK(e.pointwiseRegularizer),this.pointwiseConstraint=YX(e.pointwiseConstraint)}build(t){if((t=pX(t)).length{let e;if(t=hX(t),1===this.rank)throw new MW("1D separable convolution is not implemented yet.");return 2===this.rank&&("channelsFirst"===this.dataFormat&&(t=qF(t,[0,2,3,1])),e=JV(t,this.depthwiseKernel.read(),this.pointwiseKernel.read(),this.strides,this.padding,this.dilationRate,"NHWC")),this.useBias&&(e=Pz(e,this.bias.read(),this.dataFormat)),null!=this.activation&&(e=this.activation.apply(e)),"channelsFirst"===this.dataFormat&&(e=qF(e,[0,3,1,2])),e}))}getConfig(){const t=super.getConfig();return delete t.rank,delete t.kernelInitializer,delete t.kernelRegularizer,delete t.kernelConstraint,t.depthwiseInitializer=aX(this.depthwiseInitializer),t.pointwiseInitializer=aX(this.pointwiseInitializer),t.depthwiseRegularizer=Zq(this.depthwiseRegularizer),t.pointwiseRegularizer=Zq(this.pointwiseRegularizer),t.depthwiseConstraint=VX(this.depthwiseConstraint),t.pointwiseConstraint=VX(this.pointwiseConstraint),t}}bK.className="SeparableConv";class vK extends bK{constructor(t){super(2,t)}}vK.className="SeparableConv2D",rF(vK);class wK extends _K{constructor(t){super(1,t),wK.verifyArgs(t),this.inputSpec=[{ndim:3}]}getConfig(){const t=super.getConfig();return delete t.rank,delete t.dataFormat,t}static verifyArgs(t){if("number"!=typeof t.kernelSize&&!jW(t.kernelSize,"number",1,1))throw new AW(`Conv1D expects config.kernelSize to be number or number[] with length 1, but received ${JSON.stringify(t.kernelSize)}.`)}}wK.className="Conv1D",rF(wK);class SK extends bX{constructor(t){super(t),"number"==typeof t.cropping?this.cropping=[[t.cropping,t.cropping],[t.cropping,t.cropping]]:"number"==typeof t.cropping[0]?this.cropping=[[t.cropping[0],t.cropping[0]],[t.cropping[1],t.cropping[1]]]:this.cropping=t.cropping,this.dataFormat=void 0===t.dataFormat?"channelsLast":t.dataFormat,this.inputSpec=[{ndim:4}]}computeOutputShape(t){return"channelsFirst"===this.dataFormat?[t[0],t[1],t[2]-this.cropping[0][0]-this.cropping[0][1],t[3]-this.cropping[1][0]-this.cropping[1][1]]:[t[0],t[1]-this.cropping[0][0]-this.cropping[0][1],t[2]-this.cropping[1][0]-this.cropping[1][1],t[3]]}call(t,e){return ED((()=>{if(t=hX(t),"channelsLast"===this.dataFormat){const e=Oz(t,this.cropping[0][0],t.shape[1]-this.cropping[0][0]-this.cropping[0][1],2);return Oz(e,this.cropping[1][0],t.shape[2]-this.cropping[1][1]-this.cropping[1][0],3)}{const e=Oz(t,this.cropping[0][0],t.shape[2]-this.cropping[0][0]-this.cropping[0][1],3);return Oz(e,this.cropping[1][0],t.shape[3]-this.cropping[1][1]-this.cropping[1][0],4)}}))}getConfig(){const t={cropping:this.cropping,dataFormat:this.dataFormat},e=super.getConfig();return Object.assign(t,e),t}}SK.className="Cropping2D",rF(SK);class xK extends bX{constructor(t){var e;super(t),this.DEFAULT_SIZE=[2,2],this.inputSpec=[{ndim:4}],this.size=null==t.size?this.DEFAULT_SIZE:t.size,this.dataFormat=null==t.dataFormat?"channelsLast":t.dataFormat,lz(this.dataFormat),this.interpolation=null==t.interpolation?"nearest":t.interpolation,e=this.interpolation,XW(iz,"InterpolationFormat",e)}computeOutputShape(t){if("channelsFirst"===this.dataFormat){const e=null==t[2]?null:this.size[0]*t[2],n=null==t[3]?null:this.size[1]*t[3];return[t[0],t[1],e,n]}{const e=null==t[1]?null:this.size[0]*t[1],n=null==t[2]?null:this.size[1]*t[2];return[t[0],e,n,t[3]]}}call(t,e){return ED((()=>{let e=hX(t);const n=e.shape;if("channelsFirst"===this.dataFormat){e=qF(e,[0,2,3,1]);const t=this.size[0]*n[2],i=this.size[1]*n[3],s="nearest"===this.interpolation?JY.resizeNearestNeighbor(e,[t,i]):JY.resizeBilinear(e,[t,i]);return qF(s,[0,3,1,2])}{const t=this.size[0]*n[1],i=this.size[1]*n[2];return"nearest"===this.interpolation?JY.resizeNearestNeighbor(e,[t,i]):JY.resizeBilinear(e,[t,i])}}))}getConfig(){const t={size:this.size,dataFormat:this.dataFormat,interpolation:this.interpolation},e=super.getConfig();return Object.assign(t,e),t}}xK.className="UpSampling2D",rF(xK);class RK extends gK{constructor(t){super(2,t),this.depthwiseKernel=null,this.depthMultiplier=null==t.depthMultiplier?1:t.depthMultiplier,this.depthwiseInitializer=oX(t.depthwiseInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.depthwiseConstraint=YX(t.depthwiseConstraint),this.depthwiseRegularizer=eK(t.depthwiseRegularizer)}build(t){if((t=pX(t)).length<4)throw new AW(`Inputs to DepthwiseConv2D should have rank 4. Received input shape: ${JSON.stringify(t)}.`);const e="channelsFirst"===this.dataFormat?1:3;if(null==t[e]||t[e]<0)throw new AW(`The channel dimension of the inputs to DepthwiseConv2D should be defined, but is not (${t[e]}).`);const n=t[e],i=[this.kernelSize[0],this.kernelSize[1],n,this.depthMultiplier];this.depthwiseKernel=this.addWeight("depthwise_kernel",i,null,this.depthwiseInitializer,this.depthwiseRegularizer,!0,this.depthwiseConstraint),this.useBias?this.bias=this.addWeight("bias",[n*this.depthMultiplier],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(t,e){return ED((()=>{let e= +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function(t,e,n=[1,1],i="valid",s,r){return ED((()=>{null==s&&(s="channelsLast"),lz(s);let a=pK(t,s);if(4!==t.rank)throw new AW(`Input for depthwiseConv2d is required to be 4-D, but is instead ${t.rank}-D`);if(4!==e.rank)throw new AW(`depthwiseKernel is required to be 4-D, but is instead ${e.rank}-D`);return a=eB(a,e,n,"same"===i?"same":"valid","NHWC",r),"channelsFirst"===s&&(a=qF(a,[0,3,1,2])),a}))}(t=hX(t),this.depthwiseKernel.read(),this.strides,this.padding,this.dataFormat,null);return this.useBias&&(e=Pz(e,this.bias.read(),this.dataFormat)),null!=this.activation&&(e=this.activation.apply(e)),e}))}computeOutputShape(t){t=pX(t);const e="channelsFirst"===this.dataFormat?t[2]:t[1],n="channelsFirst"===this.dataFormat?t[3]:t[2],i="channelsFirst"===this.dataFormat?t[1]*this.depthMultiplier:t[3]*this.depthMultiplier,s=uK(e,this.kernelSize[0],this.padding,this.strides[0]),r=uK(n,this.kernelSize[1],this.padding,this.strides[1]);return"channelsFirst"===this.dataFormat?[t[0],i,s,r]:[t[0],s,r,i]}getConfig(){const t=super.getConfig();return t.depthMultiplier=this.depthMultiplier,t.depthwiseInitializer=aX(this.depthwiseInitializer),t.depthwiseRegularizer=Zq(this.depthwiseRegularizer),t.depthwiseConstraint=VX(this.depthwiseRegularizer),t}} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function OK(t,e,n,i){if(Array.isArray(t)){if(null!=e||null!=n)throw new AW("When inputs is an array, neither initialState or constants should be provided");null!=i&&(n=t.slice(t.length-i,t.length),t=t.slice(0,t.length-i)),t.length>1&&(e=t.slice(1,t.length)),t=t[0]}function s(t){return null==t||Array.isArray(t)?t:[t]}return{inputs:t,initialState:e=s(e),constants:n=s(n)}}function AK(t,e,n,i=!1,s,r,a=!1,o=!1){return ED((()=>{const l=e.shape.length;if(l<3)throw new AW(`Input should be at least 3D, but is ${l}D.`);const u=[1,0].concat(Ez(2,l));if(e=qF(e,u),null!=r)throw new MW("The rnn() functoin of the deeplearn.js backend does not support constants yet.");a&&console.warn("Backend rnn(): the unroll = true option is not applicable to the imperative deeplearn.js backend."),null!=s&&((s=PL(PL(s,"bool"),"float32")).rank===l-1&&(s=RB(s,-1)),s=qF(s,u)),i&&(e=HV(e,0),null!=s&&(s=HV(s,0)));const h=[];let p,c=n;const d=e.shape[0],f=AU(e);let m,g;null!=s&&(m=AU(s));for(let e=0;et(n,c)));if(null==s)p=i[0],c=i[1];else{const t=ED((()=>{const t=m[e],n=cF(gV(t),t);return{output:VL(GL(i[0],t),GL(c[0],n)),newStates:c.map(((e,s)=>VL(GL(i[1][s],t),GL(e,n))))}}));p=t.output,c=t.newStates}o&&h.push(p)}if(o){g=mU(h,1)}return[p,g,c]}))}RK.className="DepthwiseConv2D",rF(RK);class MK extends bX{constructor(t){let e;if(super(t),null==t.cell)throw new AW("cell property is missing for the constructor of RNN.");if(e=Array.isArray(t.cell)?new $K({cells:t.cell}):t.cell,null==e.stateSize)throw new AW("The RNN cell should have an attribute `stateSize` (tuple of integers, one integer per RNN state).");this.cell=e,this.returnSequences=null!=t.returnSequences&&t.returnSequences,this.returnState=null!=t.returnState&&t.returnState,this.goBackwards=null!=t.goBackwards&&t.goBackwards,this._stateful=null!=t.stateful&&t.stateful,this.unroll=null!=t.unroll&&t.unroll,this.supportsMasking=!0,this.inputSpec=[new _X({ndim:3})],this.stateSpec=null,this.states_=null,this.numConstants=null,this.keptStates=[]}getStates(){if(null==this.states_){return Ez(0,Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1).map((t=>null))}return this.states_}setStates(t){this.states_=t}computeOutputShape(t){lX(t)&&(t=t[0]);let e=this.cell.stateSize;Array.isArray(e)||(e=[e]);const n=e[0];let i;if(i=this.returnSequences?[t[0],t[1],n]:[t[0],n],this.returnState){const n=[];for(const i of e)n.push([t[0],i]);return[i].concat(n)}return i}computeMask(t,e){return ED((()=>{Array.isArray(e)&&(e=e[0]);const t=this.returnSequences?e:null;if(this.returnState){const e=this.states.map((t=>null));return[t].concat(e)}return t}))}get states(){if(null==this.states_){const t=Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1,e=[];for(let n=0;nt.shape[t.shape.length-1])),s))throw new AW(`An initialState was passed that is not compatible with cell.stateSize. Received stateSpec=${this.stateSpec}; However cell.stateSize is ${this.cell.stateSize}`)}else this.stateSpec=s.map((t=>new _X({shape:[null,t]})));this.stateful&&this.resetStates()}resetStates(t,e=!1){ED((()=>{if(!this.stateful)throw new RW("Cannot call resetStates() on an RNN Layer that is not stateful.");const n=this.inputSpec[0].shape[0];if(null==n)throw new AW("If an RNN is stateful, it needs to know its batch size. Specify the batch size of your input tensors: \n- If using a Sequential model, specify the batch size by passing a `batchInputShape` option to your first layer.\n- If using the functional API, specify the batch size by passing a `batchShape` option to your Input layer.");if(null==this.states_)Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map((t=>aV([n,t]))):this.states_=[aV([n,this.cell.stateSize])];else if(null==t)bD(this.states_),null!=this.keptStates&&(bD(this.keptStates),this.keptStates=[]),Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map((t=>aV([n,t]))):this.states_[0]=aV([n,this.cell.stateSize]);else{if(Array.isArray(t)||(t=[t]),t.length!==this.states_.length)throw new AW(`Layer ${this.name} expects ${this.states_.length} state(s), but it received ${t.length} state value(s). Input received: ${t}`);!0===e?this.keptStates.push(this.states_.slice()):bD(this.states_);for(let e=0;evD(t.clone())))}))}apply(t,e){let n=null==e?null:e.initialState,i=null==e?null:e.constants;null==e&&(e={});const s=OK(t,n,i,this.numConstants);t=s.inputs,n=s.initialState,i=s.constants;let r=[],a=[];if(null!=n){e.initialState=n,r=r.concat(n),this.stateSpec=[];for(const t of n)this.stateSpec.push(new _X({shape:t.shape}));a=a.concat(this.stateSpec)}null!=i&&(e.constants=i,r=r.concat(i),this.numConstants=i.length);if(r[0]instanceof TX){const n=[t].concat(r),i=this.inputSpec.concat(a),s=this.inputSpec;this.inputSpec=i;const o=super.apply(n,e);return this.inputSpec=s,o}return super.apply(t,e)}call(t,e){return ED((()=>{const n=null==e?null:e.mask,i=null==e?null:e.training;let s=null==e?null:e.initialState;t=hX(t),null==s&&(s=this.stateful?this.states_:this.getInitialState(t));const r=Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1;if(s.length!==r)throw new AW(`RNN Layer has ${r} state(s) but was passed ${s.length} initial state(s).`);this.unroll&&console.warn("Ignoring unroll = true for RNN layer, due to imperative backend.");const a={training:i},o=AK(((t,e)=>{const n=this.cell.call([t].concat(e),a);return[n[0],n.slice(1)]}),t,s,this.goBackwards,n,null,this.unroll,this.returnSequences),l=o[0],u=o[1],h=o[2];this.stateful&&this.resetStates(h,i);const p=this.returnSequences?u:l;return this.returnState?[p].concat(h):p}))}getInitialState(t){return ED((()=>{let e=aV(t.shape);return e=bB(e,[1,2]),e=Sz(e),Array.isArray(this.cell.stateSize)?this.cell.stateSize.map((t=>t>1?Cz(e,[1,t]):e)):this.cell.stateSize>1?[Cz(e,[1,this.cell.stateSize])]:[e]}))}get trainableWeights(){return this.trainable?this.cell.trainableWeights:[]}get nonTrainableWeights(){return this.trainable?this.cell.nonTrainableWeights:this.cell.weights}setFastWeightInitDuringBuild(t){super.setFastWeightInitDuringBuild(t),null!=this.cell&&this.cell.setFastWeightInitDuringBuild(t)}getConfig(){const t=super.getConfig(),e={returnSequences:this.returnSequences,returnState:this.returnState,goBackwards:this.goBackwards,stateful:this.stateful,unroll:this.unroll};null!=this.numConstants&&(e.numConstants=this.numConstants);const n=this.cell.getConfig();return this.getClassName()===MK.className&&(e.cell={className:this.cell.getClassName(),config:n}),Object.assign(Object.assign(Object.assign({},n),t),e)}static fromConfig(t,e,n={}){const i=yj(e.cell,n);return new t(Object.assign(e,{cell:i}))}}MK.className="RNN",rF(MK);class CK extends bX{}class NK extends CK{constructor(t){super(t),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",this.units=t.units,qW(this.units,"units"),this.activation=jq(null==t.activation?this.DEFAULT_ACTIVATION:t.activation),this.useBias=null==t.useBias||t.useBias,this.kernelInitializer=oX(t.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=oX(t.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=oX(t.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelRegularizer=eK(t.kernelRegularizer),this.recurrentRegularizer=eK(t.recurrentRegularizer),this.biasRegularizer=eK(t.biasRegularizer),this.kernelConstraint=YX(t.kernelConstraint),this.recurrentConstraint=YX(t.recurrentConstraint),this.biasConstraint=YX(t.biasConstraint),this.dropout=yz([1,Iz([0,null==t.dropout?0:t.dropout])]),this.recurrentDropout=yz([1,Iz([0,null==t.recurrentDropout?0:t.recurrentDropout])]),this.dropoutFunc=t.dropoutFunc,this.stateSize=this.units,this.dropoutMask=null,this.recurrentDropoutMask=null}build(t){t=pX(t),this.kernel=this.addWeight("kernel",[t[t.length-1],this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,this.units],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias?this.bias=this.addWeight("bias",[this.units],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(t,e){return ED((()=>{if(2!==t.length)throw new AW(`SimpleRNNCell expects 2 input Tensors, got ${t.length}.`);let n=t[1];t=t[0];const i=null!=e.training&&e.training;let s;0gV(t),rate:this.dropout,training:i,dropoutFunc:this.dropoutFunc})),0gV(n),rate:this.recurrentDropout,training:i,dropoutFunc:this.dropoutFunc}));const r=this.dropoutMask,a=this.recurrentDropoutMask;s=kz(null!=r?GL(t,r):t,this.kernel.read()),null!=this.bias&&(s=Pz(s,this.bias.read())),null!=a&&(n=GL(n,a));let o=VL(s,kz(n,this.recurrentKernel.read()));return null!=this.activation&&(o=this.activation.apply(o)),[o,o]}))}getConfig(){const t=super.getConfig(),e={units:this.units,activation:zq(this.activation),useBias:this.useBias,kernelInitializer:aX(this.kernelInitializer),recurrentInitializer:aX(this.recurrentInitializer),biasInitializer:aX(this.biasInitializer),kernelRegularizer:Zq(this.kernelRegularizer),recurrentRegularizer:Zq(this.recurrentRegularizer),biasRegularizer:Zq(this.biasRegularizer),activityRegularizer:Zq(this.activityRegularizer),kernelConstraint:VX(this.kernelConstraint),recurrentConstraint:VX(this.recurrentConstraint),biasConstraint:VX(this.biasConstraint),dropout:this.dropout,recurrentDropout:this.recurrentDropout};return Object.assign(Object.assign({},t),e)}}NK.className="SimpleRNNCell",rF(NK);class kK extends MK{constructor(t){t.cell=new NK(t),super(t)}call(t,e){return ED((()=>{null!=this.cell.dropoutMask&&(bD(this.cell.dropoutMask),this.cell.dropoutMask=null),null!=this.cell.recurrentDropoutMask&&(bD(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);const n=null==e?null:e.mask,i=null==e?null:e.training,s=null==e?null:e.initialState;return super.call(t,{mask:n,training:i,initialState:s})}))}static fromConfig(t,e){return new t(e)}}kK.className="SimpleRNN",rF(kK);class DK extends CK{constructor(t){if(super(t),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_RECURRENT_ACTIVATION="hardSigmoid",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",t.resetAfter)throw new AW("GRUCell does not support reset_after parameter set to true.");this.units=t.units,qW(this.units,"units"),this.activation=jq(void 0===t.activation?this.DEFAULT_ACTIVATION:t.activation),this.recurrentActivation=jq(void 0===t.recurrentActivation?this.DEFAULT_RECURRENT_ACTIVATION:t.recurrentActivation),this.useBias=null==t.useBias||t.useBias,this.kernelInitializer=oX(t.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=oX(t.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=oX(t.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelRegularizer=eK(t.kernelRegularizer),this.recurrentRegularizer=eK(t.recurrentRegularizer),this.biasRegularizer=eK(t.biasRegularizer),this.kernelConstraint=YX(t.kernelConstraint),this.recurrentConstraint=YX(t.recurrentConstraint),this.biasConstraint=YX(t.biasConstraint),this.dropout=yz([1,Iz([0,null==t.dropout?0:t.dropout])]),this.recurrentDropout=yz([1,Iz([0,null==t.recurrentDropout?0:t.recurrentDropout])]),this.dropoutFunc=t.dropoutFunc,this.implementation=t.implementation,this.stateSize=this.units,this.dropoutMask=null,this.recurrentDropoutMask=null}build(t){const e=(t=pX(t))[t.length-1];this.kernel=this.addWeight("kernel",[e,3*this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,3*this.units],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias?this.bias=this.addWeight("bias",[3*this.units],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(t,e){return ED((()=>{if(2!==t.length)throw new AW(`GRUCell expects 2 input Tensors (inputs, h, c), got ${t.length}.`);const n=null!=e.training&&e.training;let i=t[1];t=t[0],0gV(t),rate:this.dropout,training:n,count:3,dropoutFunc:this.dropoutFunc})),0gV(i),rate:this.recurrentDropout,training:n,count:3,dropoutFunc:this.dropoutFunc}));const s=this.dropoutMask,r=this.recurrentDropoutMask;let a,o,l;0{null!=this.cell.dropoutMask&&(bD(this.cell.dropoutMask),this.cell.dropoutMask=null),null!=this.cell.recurrentDropoutMask&&(bD(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);const n=null==e?null:e.mask,i=null==e?null:e.training,s=null==e?null:e.initialState;return super.call(t,{mask:n,training:i,initialState:s})}))}static fromConfig(t,e){return 0===e.implmentation&&(e.implementation=1),new t(e)}}LK.className="GRU",rF(LK);class FK extends CK{constructor(t){super(t),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_RECURRENT_ACTIVATION="hardSigmoid",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",this.units=t.units,qW(this.units,"units"),this.activation=jq(void 0===t.activation?this.DEFAULT_ACTIVATION:t.activation),this.recurrentActivation=jq(void 0===t.recurrentActivation?this.DEFAULT_RECURRENT_ACTIVATION:t.recurrentActivation),this.useBias=null==t.useBias||t.useBias,this.kernelInitializer=oX(t.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=oX(t.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=oX(t.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.unitForgetBias=t.unitForgetBias,this.kernelRegularizer=eK(t.kernelRegularizer),this.recurrentRegularizer=eK(t.recurrentRegularizer),this.biasRegularizer=eK(t.biasRegularizer),this.kernelConstraint=YX(t.kernelConstraint),this.recurrentConstraint=YX(t.recurrentConstraint),this.biasConstraint=YX(t.biasConstraint),this.dropout=yz([1,Iz([0,null==t.dropout?0:t.dropout])]),this.recurrentDropout=yz([1,Iz([0,null==t.recurrentDropout?0:t.recurrentDropout])]),this.dropoutFunc=t.dropoutFunc,this.implementation=t.implementation,this.stateSize=[this.units,this.units],this.dropoutMask=null,this.recurrentDropoutMask=null}build(t){var e;const n=(t=pX(t))[t.length-1];let i;if(this.kernel=this.addWeight("kernel",[n,4*this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,4*this.units],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias){if(this.unitForgetBias){const t=this.biasInitializer,n=this.units;i=new((e=class extends Yz{apply(e,i){const s=t.apply([n]),r=(new Hz).apply([n]),a=t.apply([2*n]);return Mz(Mz(s,r),a)}}).className="CustomInit",e)}else i=this.biasInitializer;this.bias=this.addWeight("bias",[4*this.units],null,i,this.biasRegularizer,!0,this.biasConstraint)}else this.bias=null;this.built=!0}call(t,e){return ED((()=>{const n=null!=e.training&&e.training;if(3!==t.length)throw new AW(`LSTMCell expects 3 input Tensors (inputs, h, c), got ${t.length}.`);let i=t[1];const s=t[2];t=t[0],0gV(t),rate:this.dropout,training:n,count:4,dropoutFunc:this.dropoutFunc})),0gV(i),rate:this.recurrentDropout,training:n,count:4,dropoutFunc:this.dropoutFunc}));const r=this.dropoutMask,a=this.recurrentDropoutMask;let o,l,u,h;0{null!=this.cell.dropoutMask&&(bD(this.cell.dropoutMask),this.cell.dropoutMask=null),null!=this.cell.recurrentDropoutMask&&(bD(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);const n=null==e?null:e.mask,i=null==e?null:e.training,s=null==e?null:e.initialState;return super.call(t,{mask:n,training:i,initialState:s})}))}static fromConfig(t,e){return 0===e.implmentation&&(e.implementation=1),new t(e)}}PK.className="LSTM",rF(PK);class $K extends CK{constructor(t){super(t),this.cells=t.cells}get stateSize(){const t=[];for(const e of this.cells.slice().reverse())Array.isArray(e.stateSize)?t.push(...e.stateSize):t.push(e.stateSize);return t}call(t,e){return ED((()=>{let n=t.slice(1);const i=[];for(const t of this.cells.slice().reverse())Array.isArray(t.stateSize)?i.push(n.splice(0,t.stateSize.length)):i.push(n.splice(0,1));i.reverse();const s=[];let r;for(let a=0;a{dz(`RNNCell_${i}`,(()=>{n.build(t),e=Array.isArray(n.stateSize)?n.stateSize[0]:n.stateSize,t=[t[0],e]}))})),this.built=!0}getConfig(){const t=super.getConfig(),e={cells:this.cells.map((t=>({className:t.getClassName(),config:t.getConfig()})))};return Object.assign(Object.assign({},t),e)}static fromConfig(t,e,n={}){const i=[];for(const t of e.cells)i.push(yj(t,n));return new t({cells:i})}get trainableWeights(){if(!this.trainable)return[];const t=[];for(const e of this.cells)t.push(...e.trainableWeights);return t}get nonTrainableWeights(){const t=[];for(const e of this.cells)t.push(...e.nonTrainableWeights);if(!this.trainable){const e=[];for(const t of this.cells)e.push(...t.trainableWeights);return e.concat(t)}return t}getWeights(){const t=[];for(const e of this.cells)t.push(...e.weights);return mX(t)}setWeights(t){const e=[];for(const n of this.cells){const i=n.weights.length,s=t.splice(i);for(let t=0;tnull!=r?r(e(),n):$z(e(),n),o=()=>Bz(a,e,i);if(!s||s<=1)return vD(o().clone());return Array(s).fill(void 0).map(o).map((t=>vD(t.clone())))}$K.className="StackedRNNCells",rF($K); +/** + * @license + * Copyright 2020 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +var VK=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{if(null!=this.cell.dropoutMask&&(bD(this.cell.dropoutMask),this.cell.dropoutMask=null),null!=this.cell.recurrentDropoutMask&&(bD(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null),e&&e.constants)throw new AW("ConvRNN2D cell does not support constants");const n=null==e?null:e.mask,i=null==e?null:e.training,s=null==e?null:e.initialState;return super.call(t,{mask:n,training:i,initialState:s})}))}computeOutputShape(t){let e=this.computeSingleOutputShape(t);return this.returnSequences||(e=[e[0],...e.slice(2)]),this.returnState&&(e=[e,...Array(2).fill([t[0],...e.slice(-3)])]),e}getInitialState(t){return ED((()=>{const{stateSize:e}=this.cell,n=t.shape,i=this.computeSingleOutputShape(n),s=aV([i[0],...i.slice(2)]);return Array.isArray(e)?Array(e.length).fill(s):[s]}))}resetStates(t,e=!1){ED((()=>{if(!this.stateful)throw new RW("Cannot call resetStates() on an RNN Layer that is not stateful.");const n=this.inputSpec[0].shape,i=this.computeSingleOutputShape(n),s=[i[0],...i.slice(2)];if(null==n[0])throw new AW("If an RNN is stateful, it needs to know its batch size. Specify the batch size of your input tensors: \n- If using a Sequential model, specify the batch size by passing a `batchInputShape` option to your first layer.\n- If using the functional API, specify the batch size by passing a `batchShape` option to your Input layer.");if(null==this.getStates())Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map((()=>aV(s))):this.states_=[aV(s)];else if(null==t)bD(this.states_),null!=this.keptStates&&(bD(this.keptStates),this.keptStates=[]),Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map((()=>aV(s))):this.states_[0]=aV(s);else{if(Array.isArray(t)||(t=[t]),t.length!==this.states_.length)throw new AW(`Layer ${this.name} expects ${this.states_.length} state(s), but it received ${t.length} state value(s). Input received: ${t}`);e?this.keptStates.push(this.states_.slice()):bD(this.states_);for(let e=0;evD(t.clone())))}))}computeSingleOutputShape(t){const{dataFormat:e,filters:n,kernelSize:i,padding:s,strides:r,dilationRate:a}=this.cell,o="channelsFirst"===e,l=t[o?3:2],u=t[o?4:3],h=uK(l,i[0],s,r[0],a[0]),p=uK(u,i[1],s,r[1],a[1]);return[...t.slice(0,2),...o?[n,h,p]:[h,p,n]]}}UK.className="ConvRNN2D";class YK extends FK{constructor(t){const{filters:e,kernelSize:n,strides:i,padding:s,dataFormat:r,dilationRate:a}=t;super(Object.assign(Object.assign({},t),{units:e})),this.filters=e,qW(this.filters,"filters"),this.kernelSize=lK(n,2,"kernelSize"),this.kernelSize.forEach((t=>qW(t,"kernelSize"))),this.strides=lK(i||1,2,"strides"),this.strides.forEach((t=>qW(t,"strides"))),this.padding=s||"valid",uz(this.padding),this.dataFormat=r||"channelsLast",lz(this.dataFormat),this.dilationRate=lK(a||1,2,"dilationRate"),this.dilationRate.forEach((t=>qW(t,"dilationRate")))}build(t){var e;t=pX(t);const n="channelsFirst"===this.dataFormat?1:t.length-1;if(null==t[n])throw new AW(`The channel dimension of the input should be defined. Found ${t[n]}`);const i=t[n],s=this.kernelSize.concat([i,4*this.filters]);this.kernel=this.addWeight("kernel",s,null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint);const r=this.kernelSize.concat([this.filters,4*this.filters]);if(this.recurrentKernel=this.addWeight("recurrent_kernel",r,null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias){let t;if(this.unitForgetBias){const n=this.biasInitializer,i=this.filters;t=new((e=class extends Yz{apply(t,e){return Az([n.apply([i]),oV([i]),n.apply([2*i])])}}).className="CustomInit",e)}else t=this.biasInitializer;this.bias=this.addWeight("bias",[4*this.filters],null,t,this.biasRegularizer,!0,this.biasConstraint)}this.built=!0}call(t,e){return ED((()=>{if(3!==t.length)throw new AW(`ConvLSTM2DCell expects 3 input Tensors (inputs, h, c), got ${t.length}.`);const n=e.training||!1,i=t[0],s=t[1],r=t[2];0gV(i),rate:this.dropout,training:n,count:4,dropoutFunc:this.dropoutFunc}));const a=this.dropoutMask,o=(t,e,n)=>e&&e[n]?GL(e[n],t):t;let l=o(i,a,0),u=o(i,a,1),h=o(i,a,2),p=o(i,a,3);0gV(s),rate:this.recurrentDropout,training:n,count:4,dropoutFunc:this.dropoutFunc}));const c=this.recurrentDropoutMask;let d=o(s,c,0),f=o(s,c,1),m=o(s,c,2),g=o(s,c,3);const[_,T,y,I]=pU(this.kernel.read(),4,3),[E,b,v,w]=this.useBias?pU(this.bias.read(),4):[null,null,null,null];l=this.inputConv(l,_,E,this.padding),u=this.inputConv(u,T,b,this.padding),h=this.inputConv(h,y,v,this.padding),p=this.inputConv(p,I,w,this.padding);const[S,x,R,O]=pU(this.recurrentKernel.read(),4,3);d=this.recurrentConv(d,S),f=this.recurrentConv(f,x),m=this.recurrentConv(m,R),g=this.recurrentConv(g,O);const A=this.recurrentActivation.apply(VL(l,d)),M=this.recurrentActivation.apply(VL(u,f)),C=VL(GL(M,r),GL(A,this.activation.apply(VL(h,m)))),N=GL(this.recurrentActivation.apply(VL(p,g)),this.activation.apply(C));return[N,N,C]}))}getConfig(){const t=super.getConfig(),{units:e}=t,n=VK(t,["units"]),i={filters:this.filters,kernelSize:this.kernelSize,padding:this.padding,dataFormat:this.dataFormat,dilationRate:this.dilationRate,strides:this.strides};return Object.assign(Object.assign({},n),i)}inputConv(t,e,n,i){const s=Y$(t,e,this.strides,i||"valid","channelsFirst"===this.dataFormat?"NCHW":"NHWC",this.dilationRate);return n?Pz(s,n,this.dataFormat):s}recurrentConv(t,e){return Y$(t,e,1,"same","channelsFirst"===this.dataFormat?"NCHW":"NHWC")}}YK.className="ConvLSTM2DCell",rF(YK);class GK extends UK{constructor(t){const e=new YK(t);super(Object.assign(Object.assign({},t),{cell:e}))}static fromConfig(t,e){return new t(e)}}GK.className="ConvLSTM2D",rF(GK); +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class HK extends bX{constructor(t){super(t),this.rate=Math.max(Math.min(t.rate,1),0),this.noiseShape=t.noiseShape,this.seed=t.seed,this.supportsMasking=!0}getNoiseShape(t){if(null==this.noiseShape)return this.noiseShape;const e=t.shape,n=[];for(let t=0;t{this.invokeCallHook(t,e);const n=hX(t);if(0$z(n,this.rate,i,this.seed)),(()=>n),t)}return t}))}getConfig(){const t={rate:this.rate,noiseShape:this.noiseShape,seed:this.seed},e=super.getConfig();return Object.assign(t,e),t}dispose(){return super.dispose()}}HK.className="Dropout",rF(HK);class WK extends HK{constructor(t){super(t),this.inputSpec=[{ndim:3}]}getNoiseShape(t){const e=t.shape;return[e[0],1,e[2]]}}WK.className="SpatialDropout1D",rF(WK);class zK extends bX{constructor(t){if(super(t),this.activation=null,this.useBias=!0,this.kernel=null,this.bias=null,this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_BIAS_INITIALIZER="zeros",null==t.batchInputShape&&null==t.inputShape&&null!=t.inputDim){let e=null;null!=t.batchSize&&(e=t.batchSize),this.batchInputShape=[e,t.inputDim]}this.units=t.units,qW(this.units,"units"),this.activation=jq(t.activation),null!=t.useBias&&(this.useBias=t.useBias),this.kernelInitializer=oX(t.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.biasInitializer=oX(t.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelConstraint=YX(t.kernelConstraint),this.biasConstraint=YX(t.biasConstraint),this.kernelRegularizer=eK(t.kernelRegularizer),this.biasRegularizer=eK(t.biasRegularizer),this.activityRegularizer=eK(t.activityRegularizer),this.supportsMasking=!0,this.inputSpec=[{minNDim:2}]}build(t){const e=(t=pX(t))[t.length-1];null==this.kernel&&(this.kernel=this.addWeight("kernel",[e,this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.units],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint))),this.inputSpec=[{minNDim:2,axes:{[-1]:e}}],this.built=!0}computeOutputShape(t){const e=(t=pX(t)).slice();return e[e.length-1]=this.units,e}call(t,e){return ED((()=>{this.invokeCallHook(t,e);const n=hX(t),i=QW(this.activation.getClassName());let s;return null!=i?s=kz(n,this.kernel.read(),i,this.bias?this.bias.read():null):(s=kz(n,this.kernel.read()),null!=this.bias&&(s=Pz(s,this.bias.read())),null!=this.activation&&(s=this.activation.apply(s))),s}))}getConfig(){const t={units:this.units,activation:zq(this.activation),useBias:this.useBias,kernelInitializer:aX(this.kernelInitializer),biasInitializer:aX(this.biasInitializer),kernelRegularizer:Zq(this.kernelRegularizer),biasRegularizer:Zq(this.biasRegularizer),activityRegularizer:Zq(this.activityRegularizer),kernelConstraint:VX(this.kernelConstraint),biasConstraint:VX(this.biasConstraint)},e=super.getConfig();return Object.assign(t,e),t}}zK.className="Dense",rF(zK);class XK extends bX{constructor(t){super(t=t||{}),this.inputSpec=[{minNDim:3}],this.dataFormat=t.dataFormat}computeOutputShape(t){t=pX(t);for(const e of t.slice(1))if(null==e)throw new AW(`The shape of the input to "Flatten" is not fully defined (got ${t.slice(1)}). Make sure to pass a complete "input_shape" or "batch_input_shape" argument to the first layer in your model.`);return[t[0],Tz(t,1)]}call(t,e){return ED((()=>{this.invokeCallHook(t,e);let n=hX(t);if("channelsFirst"===this.dataFormat&&n.rank>1){const t=[0];for(let e=2;e{this.invokeCallHook(t,e);const n=hX(t);return this.activation.apply(n)}))}getConfig(){const t={activation:zq(this.activation)},e=super.getConfig();return Object.assign(t,e),t}}jK.className="Activation",rF(jK);class qK extends bX{constructor(t){super(t),this.n=t.n,this.inputSpec=[{ndim:2}]}computeOutputShape(t){return[t[0],this.n,t[1]]}call(t,e){return ED((()=>{return t=hX(t),e=t,n=this.n,ED((()=>{if(2!==e.shape.length)throw new AW(`repeat() expects a rank-2 tensor, but received a rank-${e.shape.length} tensor.`);return Cz(Sz(e,1),[1,n,1])}));var e,n}))}getConfig(){const t={n:this.n},e=super.getConfig();return Object.assign(t,e),t}}qK.className="RepeatVector",rF(qK);class KK extends bX{constructor(t){super(t),this.targetShape=t.targetShape;for(let t=0;t{this.invokeCallHook(t,e);const n=hX(t),i=n.shape,s=i.slice(0,1).concat(this.fixUnknownDimension(i.slice(1),this.targetShape));return y$(n,s)}))}getConfig(){const t={targetShape:this.targetShape},e=super.getConfig();return Object.assign(t,e),t}}KK.className="Reshape",rF(KK);class QK extends bX{constructor(t){if(super(t),null==t.dims)throw new Error("Required configuration field `dims` is missing during Permute constructor call.");if(!Array.isArray(t.dims))throw new Error(`Permute constructor requires \`dims\` to be an Array, but received ${t.dims} instead.`);const e=Ez(1,t.dims.length+1);if(!vO(t.dims.slice().sort(),e))throw new Error("Invalid permutation `dims`: "+JSON.stringify(t.dims)+" `dims` must contain consecutive integers starting from 1.");this.dims=t.dims,this.dimsIncludingBatch=[0].concat(this.dims),this.inputSpec=[new _X({ndim:this.dims.length+1})]}computeOutputShape(t){const e=(t=pX(t)).slice();return this.dims.forEach(((n,i)=>{e[i+1]=t[n]})),e}call(t,e){return qF(hX(t),this.dimsIncludingBatch)}getConfig(){const t={dims:this.dims},e=super.getConfig();return Object.assign(t,e),t}}QK.className="Permute",rF(QK);class JK extends bX{constructor(t){super(null==t?{}:t),this.supportsMasking=!0,this.maskValue=null!=t?null==t.maskValue?0:t.maskValue:0}computeOutputShape(t){return t}getConfig(){const t=super.getConfig(),e={maskValue:this.maskValue};return Object.assign(e,t),e}computeMask(t,e){const n=hX(t);return KP(mV(n,this.maskValue),-1)}call(t,e){return ED((()=>{this.invokeCallHook(t,e);const n=hX(t),i=KP(mV(n,this.maskValue),-1,!0);return GL(n,PL(i,n.dtype))}))}}JK.className="Masking",rF(JK); +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class ZK extends bX{constructor(t){if(super(t),this.embeddings=null,this.DEFAULT_EMBEDDINGS_INITIALIZER="randomUniform",null==t.batchInputShape&&null==t.inputShape){let e=null;null!=t.batchSize&&(e=t.batchSize),null==t.inputLength?this.batchInputShape=[e,null]:this.batchInputShape=[e].concat(PW(t.inputLength))}this.inputDim=t.inputDim,qW(this.inputDim,"inputDim"),this.outputDim=t.outputDim,qW(this.outputDim,"outputDim"),this.embeddingsInitializer=oX(t.embeddingsInitializer||this.DEFAULT_EMBEDDINGS_INITIALIZER),this.embeddingsRegularizer=eK(t.embeddingsRegularizer),this.activityRegularizer=eK(t.activityRegularizer),this.embeddingsConstraint=YX(t.embeddingsConstraint),this.maskZero=t.maskZero,this.supportsMasking=t.maskZero,this.inputLength=t.inputLength}build(t){this.embeddings=this.addWeight("embeddings",[this.inputDim,this.outputDim],this.dtype,this.embeddingsInitializer,this.embeddingsRegularizer,!0,this.embeddingsConstraint),this.built=!0}warnOnIncompatibleInputShape(t){}computeMask(t,e){return ED((()=>this.maskZero?(t=hX(t),mV(t,zL(t))):null))}computeOutputShape(t){if(t=pX(t),null==this.inputLength)return[...t,this.outputDim];const e=PW(this.inputLength);if(e.length!==t.length-1)throw new AW(`"inputLength" is ${this.inputLength}, but received input shape has shape ${t}`);{let n=0;for(let i=0;i{this.invokeCallHook(t,e);let n=hX(t);"int32"!==n.dtype&&(n=wz(n,"int32"));const i=Dz(this.embeddings.read(),y$(n,[n.size]));return y$(i,pX(this.computeOutputShape(n.shape)))}))}getConfig(){const t={inputDim:this.inputDim,outputDim:this.outputDim,embeddingsInitializer:aX(this.embeddingsInitializer),embeddingsRegularizer:Zq(this.embeddingsRegularizer),activityRegularizer:Zq(this.activityRegularizer),embeddingsConstraint:VX(this.embeddingsConstraint),maskZero:this.maskZero,inputLength:this.inputLength},e=super.getConfig();return Object.assign(t,e),t}}ZK.className="Embedding",rF(ZK); +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class tQ extends bX{constructor(t){super(t||{}),this.supportsMasking=!0}mergeFunction(t){throw new MW}computeElementwiseOpOutputShape(t,e){if(null==t||null==e)return null;if(t.length1)throw new AW(`Can not merge tensors with different batch sizes. Got tensors with shapes: ${JSON.stringify(t)}.`);let n=null==t[0]?null:t[0].slice(1);for(let e=1;et.length));-1===t.indexOf(null)&&1===WW(i).length?this.reshapeRequired=!1:this.reshapeRequired=!0}call(t,e){return ED((()=>{if(this.reshapeRequired){const e=[],n=t.map((t=>t.rank));if(-1===n.indexOf(null)){const i=Iz(n);for(let n of t){const t=n.rank;for(let e=0;e1){const s=Ez(1,t).concat([0]);e.push(qF(i,s)),n=!0}else e.push(i)}let i=this.mergeFunction(e);const s=i.rank;if(n)if(null==s){const t=i.shape,e=t[t.length-1],n=[e].concat(t.slice(0,t.length-1));i=y$(qF(y$(i,[-1,e]),[1,0]),n)}else if(s>1){const t=[s-1].concat(Ez(0,s-1));i=qF(i,t)}return i}}return this.mergeFunction(t)}))}computeOutputShape(t){let e;e=null==t[0]?null:t[0].slice(1);for(let n=1;n{if(null==e)return null;if(!Array.isArray(e))throw new AW("`mask` should be an Array");if(!Array.isArray(t))throw new AW("`inputs` should be an Array");if(e.length!==t.length)throw new AW(`The Array 'inputs' and 'mask' are expected to have the same length, but have different lengths (${t.length} vs ${e.length})`);if(e.every((t=>null==t)))return null;let n=(e=e.map((t=>null==t?t:RB(t,0))))[0];for(let t=1;t{let e=t[0].clone();for(let n=1;n{let e=t[0].clone();for(let n=1;n{let e=t[0].clone();for(let n=1;n{let e=t[0];for(let n=1;n{let e=t[0];for(let n=1;n1)throw new AW("A `Concatenate` layer requires inputs with matching shapes except for the concat axis. Got input shapes: "+JSON.stringify(t))}mergeFunction(t){return ED((()=>Az(t,this.axis)))}computeOutputShape(t){if(!Array.isArray(t)||!Array.isArray(t[0]))throw new AW("A `Concatenate` layer should be called on a list of inputs.");const e=t,n=e[0].slice(),i=this.axis<0?n.length+this.axis:this.axis;for(const t of e.slice(1)){if(null==n[i]||null==t[i]){n[i]=null;break}n[i]+=t[i]}return n}computeMask(t,e){if(null==e)return null;if(!Array.isArray(e))throw new AW("`mask` should be an array for Concatenate");if(!Array.isArray(t))throw new AW("`inputs` should be an array for Concatenate");if(e.length!==t.length)throw new AW(`Mismatch in the length of mask (${e.length}) and the legnth of inputs (${t.length})`);return ED((()=>{let n=!0;if(e.forEach((t=>{null==t||(n=!1)})),n)return null;const i=[];for(let n=0;n"A `Dot` layer should be called on a list of exactly 2 inputs."));const e=t[0],n=t[1];if(e.length>3||n.length>3)throw new MW("Dot layer does not support tensors of 4D or higher rank yet.");const i=this.interpretAxes(e,n);if(e[i[0]]!==n[i[1]])throw new AW(`Dimension incompatibility: ${e[i[0]]} !== ${n[i[1]]}`)}mergeFunction(t){if(2!==t.length)throw new AW(`A \`Dot\` layer must be called on exactly 2 inputs, but received ${t.length} input(s).`);let e,n=t[0],i=t[1];return e=Array.isArray(this.axes)?this.axes.map(((e,n)=>oQ(e,t[n].shape.length))):[oQ(this.axes,n.shape.length),oQ(this.axes,i.shape.length)],this.normalize&&(n=Ij(n,e[0]),i=Ij(i,e[1])),function(t,e,n){if(t.shape.length>3||e.shape.length>3)throw new MW("batchDot is not implemented for tensors of 4D or higher rank yet");if(_O(t.shape.length>=2,(()=>`batchDot requires the rank of x to be >= 2, but got ${t.shape.length}`)),_O(t.shape.length>=2,(()=>`batchDot requires the rank of y to be >= 2, but got ${e.shape.length}`)),"number"==typeof n&&(n=[n,n]),"complex64"===t.dtype||"complex64"===e.dtype)throw new MW("batchDot is not implemented for complex64-type Tensors yet.");const i=t.shape.length,s=e.shape.length;null==n&&(n=[i-1,s-2]);const r=n;return ED((()=>{let n,a;if(i>s){n=i-s;const t=[];for(let e=0;ei){n=s-i;const e=[];for(let t=0;t0){let t;t=i>s?i+s-3:i-1;const e=[];for(let i=t;i"A `Dot` layer should be called on a list of exactly 2 inputs."));const e=t[0].slice(),n=t[1].slice();if(e.length>3||n.length>3)throw new MW("Dot layer does not support tensors of 4D or higher rank yet.");const i=this.interpretAxes(e,n);e.splice(i[0],1),n.splice(i[1],1),n.splice(0,1);const s=e.concat(n);return 1===s.length&&s.push(1),s}computeMask(t,e){return null}getConfig(){const t={axes:this.axes,normalize:this.normalize},e=super.getConfig();return Object.assign(t,e),t}}lQ.className="Dot",rF(lQ); +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class uQ extends bX{constructor(t){super(t),this.supportsMasking=!0,this.stddev=t.stddev}computeOutputShape(t){return t}getConfig(){const t=super.getConfig(),e={stddev:this.stddev};return Object.assign(e,t),e}call(t,e){return ED((()=>{this.invokeCallHook(t,e);const n=hX(t);return Bz((()=>VL(Nz(n.shape,0,this.stddev),n)),(()=>n),e.training||!1)}))}}uQ.className="GaussianNoise",rF(uQ);class hQ extends bX{constructor(t){super(t),this.supportsMasking=!0,this.rate=t.rate}computeOutputShape(t){return t}getConfig(){const t=super.getConfig(),e={rate:this.rate};return Object.assign(e,t),e}call(t,e){return ED((()=>{this.invokeCallHook(t,e);const n=hX(t);if(this.rate>0&&this.rate<1){return Bz((()=>{const t=Math.sqrt(this.rate/(1-this.rate));return GL(n,Nz(n.shape,1,t))}),(()=>n),e.training||!1)}return n}))}}hQ.className="GaussianDropout",rF(hQ);class pQ extends bX{constructor(t){super(t),this.supportsMasking=!0,this.rate=t.rate,this.noiseShape=t.noiseShape}_getNoiseShape(t){return this.noiseShape||hX(t).shape}computeOutputShape(t){return t}getConfig(){const t=super.getConfig(),e={rate:this.rate};return Object.assign(e,t),e}call(t,e){return ED((()=>{if(this.rate<1&&this.rate>0){const n=this._getNoiseShape(t),i=()=>{const e=hX(t),i=-1.7580993408473766;let s=DB($V(n),this.rate);s=wz(s,"float32");const r=((1-this.rate)*(1+this.rate*i**2))**-.5,a=-r*i*this.rate,o=VL(GL(e,s),GL(VL(s,-1),i));return VL(GL(o,r),a)};return Bz(i,(()=>hX(t)),e.training||!1)}return t}))}} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function cQ(t,e,n,i,s,r=.001){let a;if(2===t.rank)a=A$(t,e,n,i,s,r);else if(3===t.rank)a=M$(t,e,n,i,s,r);else{if(4!==t.rank)throw new MW(`batchNormalization is not implemented for array of rank ${t.rank} yet`);a=C$(t,e,n,i,s,r)}return a}function dQ(t,e,n,i,s=.001){return vO(i.slice().sort(),Ez(0,t.rank-1))?function(t,e,n,i,s=.001){return ED((()=>{const r=cV(t,i),a=r.mean,o=r.variance;return[cQ(t,a,o,n,e,s),a,o]}))}(t,e,n,i,s):function(t,e,n,i,s=.001){return ED((()=>{const r=cV(t,i),a=r.mean,o=r.variance,l=[];for(const e of Ez(0,t.rank))-1!==i.indexOf(e)?l.push(1):l.push(t.shape[e]);const u=y$(a,l),h=y$(o,l),p=null==e?null:y$(e,l),c=null==n?null:y$(n,l);return[cQ(t,u,h,c,p,s),a,o]}))}(t,e,n,i,s)}pQ.className="AlphaDropout",rF(pQ);class fQ extends bX{constructor(t){null==t&&(t={}),super(t),this.supportsMasking=!0,this.axis=null==t.axis?-1:t.axis,this.momentum=null==t.momentum?.99:t.momentum,this.epsilon=null==t.epsilon?.001:t.epsilon,this.center=null==t.center||t.center,this.scale=null==t.scale||t.scale,this.betaInitializer=oX(t.betaInitializer||"zeros"),this.gammaInitializer=oX(t.gammaInitializer||"ones"),this.movingMeanInitializer=oX(t.movingMeanInitializer||"zeros"),this.movingVarianceInitializer=oX(t.movingVarianceInitializer||"ones"),this.betaConstraint=YX(t.betaConstraint),this.gammaConstraint=YX(t.gammaConstraint),this.betaRegularizer=eK(t.betaRegularizer),this.gammaRegularizer=eK(t.gammaRegularizer)}build(t){t=pX(t);const e=this.axis>=0?this.axis:this.axis+t.length,n=t[e];if(null==n)throw new AW(`Axis ${e} of input tensor should have a defined dimension but the layer received an input with shape ${JSON.stringify(t)}.`);this.inputSpec=[new _X({ndim:t.length,axes:{[e]:n}})];const i=[n];this.scale&&(this.gamma=this.addWeight("gamma",i,null,this.gammaInitializer,this.gammaRegularizer,!0,this.gammaConstraint)),this.center&&(this.beta=this.addWeight("beta",i,null,this.betaInitializer,this.betaRegularizer,!0,this.betaConstraint)),this.movingMean=this.addWeight("moving_mean",i,null,this.movingMeanInitializer,null,!1),this.movingVariance=this.addWeight("moving_variance",i,null,this.movingVarianceInitializer,null,!1),this.built=!0}call(t,e){return ED((()=>{const n=null!=e.training&&e.training,i=hX(t),s=i.shape,r=s.length,a=Ez(0,r),o=this.axis>=0?this.axis:this.axis+r;a.splice(o,1);const l=kW(1,r);l[o]=s[o];const u=a.slice();u.sort();const h=!vO(u,Ez(0,r).slice(0,r-1));if(!n)return(()=>{if(h){const t=y$(this.movingMean.read(),l),e=y$(this.movingVariance.read(),l),n=this.center?y$(this.beta.read(),l):null,s=this.scale?y$(this.gamma.read(),l):null;return cQ(i,t,e,n,s,this.epsilon)}return cQ(i,this.movingMean.read(),this.movingVariance.read(),null==this.beta?null:this.beta.read(),null==this.gamma?null:this.gamma.read(),this.epsilon)})();const[p,c,d]=dQ(i,this.gamma.read(),this.beta.read(),a,this.epsilon),f=(t,e,n)=>{ED((()=>{const i=1-n,s=t.read(),r=GL(cF(s,e),i);t.write(cF(s,r))}))};return(()=>{f(this.movingMean,c,this.momentum),f(this.movingVariance,d,this.momentum)})(),p}))}getConfig(){const t={axis:this.axis,momentum:this.momentum,epsilon:this.epsilon,center:this.center,scale:this.scale,betaInitializer:aX(this.betaInitializer),gammaInitializer:aX(this.gammaInitializer),movingMeanInitializer:aX(this.movingMeanInitializer),movingVarianceInitializer:aX(this.movingVarianceInitializer),betaRegularizer:Zq(this.betaRegularizer),gammaRegularizer:Zq(this.gammaRegularizer),betaConstraint:VX(this.betaConstraint),gammaConstraint:VX(this.gammaConstraint)},e=super.getConfig();return Object.assign(t,e),t}}fQ.className="BatchNormalization",rF(fQ);class mQ extends bX{constructor(t){if(null==t&&(t={}),super(t),this.axis=null==t.axis?-1:t.axis,"number"==typeof this.axis){if(!Number.isInteger(this.axis))throw new Error(`Expected axis to be an integer, but received ${this.axis}`)}else{if(!Array.isArray(this.axis))throw new Error(`Expected axis to be an integer or an array of integers, but received ${JSON.stringify(this.axis)}`);for(const t of this.axis)if(!Number.isInteger(t))throw new Error(`Expected axis to be an array of integers, but received ${JSON.stringify(this.axis)}`)}this.epsilon=null==t.epsilon?.001:t.epsilon,this.center=null==t.center||t.center,this.scale=null==t.scale||t.scale,this.betaInitializer=oX(t.betaInitializer||"zeros"),this.gammaInitializer=oX(t.gammaInitializer||"ones"),this.betaRegularizer=eK(t.betaRegularizer),this.gammaRegularizer=eK(t.gammaRegularizer),this.supportsMasking=!0}build(t){const e=(t=pX(t)).length;"number"==typeof this.axis&&(this.axis=[this.axis]);for(let t=0;t=e)throw new Error(`Invalid axis: ${t}`);if(this.axis.length!==WW(this.axis).length)throw new Error(`Found duplicate axes in: ${this.axis}`);const n=this.axis.map((e=>t[e])),i=!0;this.scale?this.gamma=this.addWeight("gamma",n,"float32",this.gammaInitializer,this.gammaRegularizer,i):this.gamma=null,this.center?this.beta=this.addWeight("beta",n,"float32",this.betaInitializer,this.betaRegularizer,i):this.beta=null,this.built=!0}call(t,e){const n=hX(t),i=n.shape,s=i.length;return ED((()=>{let{mean:t,variance:e}=cV(n,this.axis,!0);const r=kW(1,s);for(const t of this.axis)r[t]=i[t];const a=t=>null!=t&&t.shape.length!==s?y$(t,r):t;let o=this.scale?a(this.gamma.read()):null,l=this.center?a(this.beta.read()):null;const u=[],h=[];for(let t=0;t=0?t[2]+this.padding[0][0]+this.padding[0][1]:null,n=null!=t[3]&&t[3]>=0?t[3]+this.padding[1][0]+this.padding[1][1]:null,[t[0],t[1],e,n]):(e=null!=t[1]&&t[1]>=0?t[1]+this.padding[0][0]+this.padding[0][1]:null,n=null!=t[2]&&t[2]>=0?t[2]+this.padding[1][0]+this.padding[1][1]:null,[t[0],e,n,t[3]])}call(t,e){return ED((()=>{return e=hX(t),n=this.padding,i=this.dataFormat,ED((()=>{if(4!==e.rank)throw new AW(`temporalPadding expects input tensor to be 4-D, but received a ${e.rank}-D tensor.`);if(null==n&&(n=[[1,1],[1,1]]),2!==n.length||2!==n[0].length||2!==n[1].length)throw new AW("spatial2dPadding expects `padding` to be an Array of two Arrays, each of which is an Array of two integers.");if(null==i&&(i="channelsLast"),"channelsLast"!==i&&"channelsFirst"!==i)throw new AW(`Unknown data format: ${i}. Supported data formats are 'channelsLast' and 'channelsFirst.`);let t;return t="channelsFirst"===i?[[0,0],[0,0],n[0],n[1]]:[[0,0],n[0],n[1],[0,0]],TV(e,t)}));var e,n,i}))}getConfig(){const t={padding:this.padding,dataFormat:this.dataFormat},e=super.getConfig();return Object.assign(t,e),t}} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function _Q(t,e,n,i,s,r){return ED((()=>{let a;lz(s),hz(r),uz(i),null==n&&(n=[1,1]),null==i&&(i="valid"),null==s&&(s="channelsLast"),null==r&&(r="max"),t=pK(t,s);const o="same"===i?"same":"valid";return a="max"===r?nV(t,e,n,o):I$(t,e,n,o),"channelsFirst"===s&&(a=qF(a,[0,3,1,2])),a}))}function TQ(t,e,n,i,s,r){return ED((()=>{let a;lz(s),hz(r),uz(i),null==n&&(n=[1,1,1]),null==i&&(i="valid"),null==s&&(s="channelsLast"),null==r&&(r="max"),t=cK(t,s);const o="same"===i?"same":"valid";return a="max"===r?iV(t,e,n,o):E$(t,e,n,o),"channelsFirst"===s&&(a=qF(a,[0,4,1,2,3])),a}))}gQ.className="ZeroPadding2D",rF(gQ);class yQ extends bX{constructor(t){if(null==t.poolSize&&(t.poolSize=2),super(t),"number"==typeof t.poolSize)this.poolSize=[t.poolSize];else{if(!Array.isArray(t.poolSize)||1!==t.poolSize.length||"number"!=typeof t.poolSize[0])throw new AW(`poolSize for 1D convolutional layer must be a number or an Array of a single number, but received ${JSON.stringify(t.poolSize)}`);this.poolSize=t.poolSize}if(qW(this.poolSize,"poolSize"),null==t.strides)this.strides=this.poolSize;else if("number"==typeof t.strides)this.strides=[t.strides];else{if(!Array.isArray(t.strides)||1!==t.strides.length||"number"!=typeof t.strides[0])throw new AW(`strides for 1D convolutional layer must be a number or an Array of a single number, but received ${JSON.stringify(t.strides)}`);this.strides=t.strides}qW(this.strides,"strides"),this.padding=null==t.padding?"valid":t.padding,uz(this.padding),this.inputSpec=[new _X({ndim:3})]}computeOutputShape(t){const e=uK((t=pX(t))[1],this.poolSize[0],this.padding,this.strides[0]);return[t[0],e,t[2]]}call(t,e){return ED((()=>{this.invokeCallHook(t,e),t=Sz(hX(t),2);const n=this.poolingFunction(hX(t),[this.poolSize[0],1],[this.strides[0],1],this.padding,"channelsLast");return fU(n,[2])}))}getConfig(){const t={poolSize:this.poolSize,padding:this.padding,strides:this.strides},e=super.getConfig();return Object.assign(t,e),t}}class IQ extends yQ{constructor(t){super(t)}poolingFunction(t,e,n,i,s){return lz(s),uz(i),_Q(t,e,n,i,s,"max")}}IQ.className="MaxPooling1D",rF(IQ);class EQ extends yQ{constructor(t){super(t)}poolingFunction(t,e,n,i,s){return lz(s),uz(i),_Q(t,e,n,i,s,"avg")}}EQ.className="AveragePooling1D",rF(EQ);class bQ extends bX{constructor(t){if(null==t.poolSize&&(t.poolSize=[2,2]),super(t),this.poolSize=Array.isArray(t.poolSize)?t.poolSize:[t.poolSize,t.poolSize],null==t.strides)this.strides=this.poolSize;else if(Array.isArray(t.strides)){if(2!==t.strides.length)throw new AW(`If the strides property of a 2D pooling layer is an Array, it is expected to have a length of 2, but received length ${t.strides.length}.`);this.strides=t.strides}else this.strides=[t.strides,t.strides];qW(this.poolSize,"poolSize"),qW(this.strides,"strides"),this.padding=null==t.padding?"valid":t.padding,this.dataFormat=null==t.dataFormat?"channelsLast":t.dataFormat,lz(this.dataFormat),uz(this.padding),this.inputSpec=[new _X({ndim:4})]}computeOutputShape(t){t=pX(t);let e="channelsFirst"===this.dataFormat?t[2]:t[1],n="channelsFirst"===this.dataFormat?t[3]:t[2];return e=uK(e,this.poolSize[0],this.padding,this.strides[0]),n=uK(n,this.poolSize[1],this.padding,this.strides[1]),"channelsFirst"===this.dataFormat?[t[0],t[1],e,n]:[t[0],e,n,t[3]]}call(t,e){return ED((()=>(this.invokeCallHook(t,e),this.poolingFunction(hX(t),this.poolSize,this.strides,this.padding,this.dataFormat))))}getConfig(){const t={poolSize:this.poolSize,padding:this.padding,strides:this.strides,dataFormat:this.dataFormat},e=super.getConfig();return Object.assign(t,e),t}}class vQ extends bQ{constructor(t){super(t)}poolingFunction(t,e,n,i,s){return lz(s),uz(i),_Q(t,e,n,i,s,"max")}}vQ.className="MaxPooling2D",rF(vQ);class wQ extends bQ{constructor(t){super(t)}poolingFunction(t,e,n,i,s){return lz(s),uz(i),_Q(t,e,n,i,s,"avg")}}wQ.className="AveragePooling2D",rF(wQ);class SQ extends bX{constructor(t){if(null==t.poolSize&&(t.poolSize=[2,2,2]),super(t),this.poolSize=Array.isArray(t.poolSize)?t.poolSize:[t.poolSize,t.poolSize,t.poolSize],null==t.strides)this.strides=this.poolSize;else if(Array.isArray(t.strides)){if(3!==t.strides.length)throw new AW(`If the strides property of a 3D pooling layer is an Array, it is expected to have a length of 3, but received length ${t.strides.length}.`);this.strides=t.strides}else this.strides=[t.strides,t.strides,t.strides];qW(this.poolSize,"poolSize"),qW(this.strides,"strides"),this.padding=null==t.padding?"valid":t.padding,this.dataFormat=null==t.dataFormat?"channelsLast":t.dataFormat,lz(this.dataFormat),uz(this.padding),this.inputSpec=[new _X({ndim:5})]}computeOutputShape(t){t=pX(t);let e="channelsFirst"===this.dataFormat?t[2]:t[1],n="channelsFirst"===this.dataFormat?t[3]:t[2],i="channelsFirst"===this.dataFormat?t[4]:t[3];return e=uK(e,this.poolSize[0],this.padding,this.strides[0]),n=uK(n,this.poolSize[1],this.padding,this.strides[1]),i=uK(i,this.poolSize[2],this.padding,this.strides[2]),"channelsFirst"===this.dataFormat?[t[0],t[1],e,n,i]:[t[0],e,n,i,t[4]]}call(t,e){return ED((()=>(this.invokeCallHook(t,e),this.poolingFunction(hX(t),this.poolSize,this.strides,this.padding,this.dataFormat))))}getConfig(){const t={poolSize:this.poolSize,padding:this.padding,strides:this.strides,dataFormat:this.dataFormat},e=super.getConfig();return Object.assign(t,e),t}}class xQ extends SQ{constructor(t){super(t)}poolingFunction(t,e,n,i,s){return lz(s),uz(i),TQ(t,e,n,i,s,"max")}}xQ.className="MaxPooling3D",rF(xQ);class RQ extends SQ{constructor(t){super(t)}poolingFunction(t,e,n,i,s){return lz(s),uz(i),TQ(t,e,n,i,s,"avg")}}RQ.className="AveragePooling3D",rF(RQ);class OQ extends bX{constructor(t){super(t),this.inputSpec=[new _X({ndim:3})]}computeOutputShape(t){return[t[0],t[2]]}call(t,e){throw new MW}}class AQ extends OQ{constructor(t){super(t||{})}call(t,e){return ED((()=>{const e=hX(t);return rV(e,1)}))}}AQ.className="GlobalAveragePooling1D",rF(AQ);class MQ extends OQ{constructor(t){super(t||{})}call(t,e){return ED((()=>{const e=hX(t);return IB(e,1)}))}}MQ.className="GlobalMaxPooling1D",rF(MQ);class CQ extends bX{constructor(t){super(t),this.dataFormat=null==t.dataFormat?"channelsLast":t.dataFormat,lz(this.dataFormat),this.inputSpec=[new _X({ndim:4})]}computeOutputShape(t){return"channelsLast"===this.dataFormat?[t[0],t[3]]:[t[0],t[1]]}call(t,e){throw new MW}getConfig(){const t={dataFormat:this.dataFormat},e=super.getConfig();return Object.assign(t,e),t}}class NQ extends CQ{call(t,e){return ED((()=>{const e=hX(t);return"channelsLast"===this.dataFormat?rV(e,[1,2]):rV(e,[2,3])}))}}NQ.className="GlobalAveragePooling2D",rF(NQ);class kQ extends CQ{call(t,e){return ED((()=>{const e=hX(t);return"channelsLast"===this.dataFormat?IB(e,[1,2]):IB(e,[2,3])}))}}kQ.className="GlobalMaxPooling2D",rF(kQ); +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class DQ extends bX{constructor(t){super(t),this.layer=t.layer}build(t){this.built=!0}get trainable(){return null!=this.layer&&this.layer.trainable}set trainable(t){null!=this.layer&&(this.layer.trainable=t)}get trainableWeights(){return this.layer.trainableWeights}get nonTrainableWeights(){return this.layer.nonTrainableWeights}get updates(){return this.layer._updates}get losses(){return this.layer.losses}getWeights(){return this.layer.getWeights()}setWeights(t){this.layer.setWeights(t)}getConfig(){const t={layer:{className:this.layer.getClassName(),config:this.layer.getConfig()}},e=super.getConfig();return Object.assign(t,e),t}setFastWeightInitDuringBuild(t){super.setFastWeightInitDuringBuild(t),null!=this.layer&&this.layer.setFastWeightInitDuringBuild(t)}static fromConfig(t,e,n={}){const i=yj(e.layer,n);delete e.layer;const s={layer:i};return Object.assign(s,e),new t(s)}}class LQ extends DQ{constructor(t){super(t),this.supportsMasking=!0}build(t){if((t=pX(t)).length<3)throw new AW(`TimeDistributed layer expects an input shape >= 3D, but received input shape ${JSON.stringify(t)}`);this.inputSpec=[{shape:t}];const e=[t[0]].concat(t.slice(2));this.layer.built||(this.layer.build(e),this.layer.built=!0),super.build(t)}computeOutputShape(t){const e=[(t=pX(t))[0]].concat(t.slice(2)),n=this.layer.computeOutputShape(e),i=t[1];return[n[0],i].concat(n.slice(1))}call(t,e){return ED((()=>AK(((t,n)=>[hX(this.layer.call(t,e)),[]]),t=hX(t),[],!1,null,null,!1,!0)[1]))}}LQ.className="TimeDistributed",rF(LQ);class FQ extends DQ{constructor(t){super(t);const e=t.layer.getConfig(),n={};n.className=t.layer.getClassName(),n.config=e,this.forwardLayer=yj(n),e.goBackwards=!0!==e.goBackwards;const i={};var s;if(i.className=t.layer.getClassName(),i.config=e,this.backwardLayer=yj(i),this.forwardLayer.name="forward_"+this.forwardLayer.name,this.backwardLayer.name="backward_"+this.backwardLayer.name,this.mergeMode=void 0===t.mergeMode?"concat":t.mergeMode,s=this.mergeMode,XW(az,"BidirectionalMergeMode",s),t.weights)throw new MW("weights support is not implemented for Bidirectional layer yet.");this._stateful=t.layer.stateful,this.returnSequences=t.layer.returnSequences,this.returnState=t.layer.returnState,this.supportsMasking=!0,this._trainable=!0,this.inputSpec=t.layer.inputSpec,this.numConstants=null}get trainable(){return this._trainable}set trainable(t){this._trainable=t,null!=this.forwardLayer&&(this.forwardLayer.trainable=t),null!=this.backwardLayer&&(this.backwardLayer.trainable=t)}getWeights(){return this.forwardLayer.getWeights().concat(this.backwardLayer.getWeights())}setWeights(t){const e=t.length,n=Math.floor(e/2);this.forwardLayer.setWeights(t.slice(0,n)),this.backwardLayer.setWeights(t.slice(n))}computeOutputShape(t){let e,n,i,s=this.forwardLayer.computeOutputShape(t);return Array.isArray(s)&&Array.isArray(s[0])||(s=[s]),this.returnState?(i=s.slice(1),e=s[0]):e=s[0],"concat"===this.mergeMode?(e[e.length-1]*=2,n=[e]):n=null==this.mergeMode?[e,e.slice()]:[e],this.returnState?null==this.mergeMode?n.concat(i).concat(i.slice()):[e].concat(i).concat(i.slice()):FW(n)}apply(t,e){let n=null==e?null:e.initialState,i=null==e?null:e.constants;null==e&&(e={});const s=OK(t,n,i,this.numConstants);if(t=s.inputs,n=s.initialState,i=s.constants,Array.isArray(t)&&(n=t.slice(1),t=t[0]),(null==n||0===n.length)&&null==i)return super.apply(t,e);const r=[],a=[];if(null!=n){const t=n.length;if(t%2>0)throw new AW("When passing `initialState` to a Bidrectional RNN, the state should be an Array containing the states of the underlying RNNs.");e.initialState=n,r.push(...n);const i=n.map((t=>new _X({shape:t.shape})));this.forwardLayer.stateSpec=i.slice(0,t/2),this.backwardLayer.stateSpec=i.slice(t/2),a.push(...i)}if(null!=i)throw new MW("Support for constants in Bidirectional layers is not implemented yet.");const o=r[0]instanceof TX;for(const t of r)if(t instanceof TX!==o)throw new AW("The initial state of a Bidirectional layer cannot be specified as a mix of symbolic and non-symbolic tensors");if(o){const n=[t].concat(r),i=this.inputSpec.concat(a),s=this.inputSpec;this.inputSpec=i;const o=super.apply(n,e);return this.inputSpec=s,o}return super.apply(t,e)}call(t,e){return ED((()=>{const n=e.initialState;let i,s,r,a;if(null==n)i=this.forwardLayer.call(t,e),s=this.backwardLayer.call(t,e);else{const r=n.slice(0,n.length/2),a=n.slice(n.length/2);i=this.forwardLayer.call(t,Object.assign(e,{initialState:r})),s=this.backwardLayer.call(t,Object.assign(e,{initialState:a}))}return this.returnState&&(Array.isArray(i)&&(r=i.slice(1).concat(s.slice(1))),i=i[0],s=s[0]),this.returnSequences&&(s=HV(s,1)),"concat"===this.mergeMode?a=Az([i,s]):"sum"===this.mergeMode?a=VL(i,s):"ave"===this.mergeMode?a=GL(.5,VL(i,s)):"mul"===this.mergeMode?a=GL(i,s):null==this.mergeMode&&(a=[i,s]),this.returnState?null==this.mergeMode?a.concat(r):[a].concat(r):a}))}resetStates(t){this.forwardLayer.resetStates(),this.backwardLayer.resetStates()}build(t){dz(this.forwardLayer.name,(()=>{this.forwardLayer.build(t)})),dz(this.backwardLayer.name,(()=>{this.backwardLayer.build(t)})),this.built=!0}computeMask(t,e){let n;if(Array.isArray(e)&&(e=e[0]),n=this.returnSequences?null==this.mergeMode?[e,e]:e:null==this.mergeMode?[null,null]:null,this.returnState){const t=this.forwardLayer.states.map((t=>null));return Array.isArray(n)?n.concat(t).concat(t):[n].concat(t).concat(t)}return n}get trainableWeights(){return this.forwardLayer.trainableWeights.concat(this.backwardLayer.trainableWeights)}get nonTrainableWeights(){return this.forwardLayer.nonTrainableWeights.concat(this.backwardLayer.nonTrainableWeights)}setFastWeightInitDuringBuild(t){super.setFastWeightInitDuringBuild(t),null!=this.forwardLayer&&this.forwardLayer.setFastWeightInitDuringBuild(t),null!=this.backwardLayer&&this.backwardLayer.setFastWeightInitDuringBuild(t)}getConfig(){const t={mergeMode:this.mergeMode},e=super.getConfig();return Object.assign(t,e),t}static fromConfig(t,e){const n=yj(e.layer);if(delete e.layer,null!=e.numConstants)throw new MW("Deserialization of a Bidirectional layer with numConstants present is not supported yet.");const i=e;return i.layer=n,new t(i)}}FQ.className="Bidirectional",rF(FQ); +/** + * @license + * Copyright 2022 CodeSmith LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class PQ extends bX{constructor(t){super(t),this.scale=t.scale,t.offset?this.offset=t.offset:this.offset=0}getConfig(){const t={scale:this.scale,offset:this.offset},e=super.getConfig();return Object.assign(t,e),t}call(t,e){return ED((()=>("float32"!==(t=hX(t)).dtype&&(t=wz(t,"float32")),VL(GL(t,this.scale),this.offset))))}}PQ.className="Rescaling",rF(PQ); +/** + * @license + * Copyright 2022 CodeSmith LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +const{resizeBilinear:$Q,cropAndResize:BQ}=JY;class VQ extends bX{constructor(t){super(t),this.height=t.height,this.width=t.width}centerCrop(t,e,n,i,s,r,a,o){return ED((()=>{let l,u=!1;const h=[e/r,n/a,(i+e)/r,(s+n)/a],p=[];3===t.rank?(u=!0,l=mU([t])):l=t;for(let t=0;twz($Q(t,[e,n]),i)))}call(t,e){return ED((()=>{const e=hX(t),n=e.dtype,i=e.shape,s=i[i.length-3],r=i[i.length-2];let a=0;s!==this.height&&(a=Math.floor((s-this.height)/2));let o=0;return r!==this.width&&(o=Math.floor((r-this.width)/2),0===o&&(o=1)),a>=0&&o>=0?this.centerCrop(e,a,o,this.height,this.width,s,r,n):this.upsize(t,this.height,this.width,n)}))}getConfig(){const t={height:this.height,width:this.width},e=super.getConfig();return Object.assign(t,e),t}computeOutputShape(t){const e=(t=pX(t)).length-3,n=t.length-2;return t[e]=this.height,t[n]=this.width,t}}VQ.className="CenterCrop",rF(VQ); +/** + * @license + * Copyright 2022 CodeSmith LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class UQ extends bX{constructor(t){super(t),this.numTokens=t.numTokens,t.outputMode?this.outputMode=t.outputMode:this.outputMode="multiHot"}getConfig(){const t={numTokens:this.numTokens,outputMode:this.outputMode},e=super.getConfig();return Object.assign(t,e),t}computeOutputShape(t){return null==(t=pX(t))?[this.numTokens]:"oneHot"===this.outputMode&&1!==t[t.length-1]?(t.push(this.numTokens),t):(t[t.length-1]=this.numTokens,t)}call(t,e){return ED((()=>{let n;if("int32"!==(t=hX(t)).dtype&&(t=wz(t,"int32")),void 0!==e.countWeights){if("count"!==this.outputMode)throw new AW(`countWeights is not used when outputMode !== count.\n Received countWeights=${e.countWeights}`);n=hX(e.countWeights)}const i=IB(t),s=EB(t),r=kB(this.numTokens,i).bufferSync().get(0),a=DB(s,0).bufferSync().get(0);if(!r||!a)throw new AW(`Input values must be between 0 < values <= numTokens with numTokens=${this.numTokens}`); +/** + * @license + * Copyright 2022 CodeSmith LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +return function(t,e,n,i){let s=hX(t);if("int32"!==s.dtype&&(s=wz(s,"int32")),"int"===e)return s;const r=s.shape;if(0===s.rank&&(s=RB(s,-1)),"oneHot"===e&&1!==s.shape[s.shape.length-1]&&(s=RB(s,-1)),s.rank>2)throw new AW(`When outputMode is not int, maximum output rank is 2 Received outputMode ${e} and input shape ${r} which would result in output rank ${s.rank}.`);const a=["multiHot","oneHot"].includes(e),o=s;let l;if(l=Z$(o,void 0!==i&&"count"===e?i:[],n,a),"tfIdf"!==e)return l;if(i)return GL(l,i);throw new AW("When outputMode is 'tfIdf', weights must be provided.")}(t,this.outputMode,this.numTokens,n)}))}}UQ.className="CategoryEncoding",rF(UQ); +/** + * @license + * Copyright 2022 CodeSmith LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +const YQ=new Set(["bilinear","nearest"]);class GQ extends bX{constructor(t){if(super(t),this.height=t.height,this.width=t.width,t.interpolation){if(!YQ.has(t.interpolation))throw new AW(`Invalid interpolation parameter: ${t.interpolation} is not implemented`);this.interpolation=t.interpolation}else this.interpolation="bilinear";this.cropToAspectRatio=Boolean(t.cropToAspectRatio)}computeOutputShape(t){const e=(t=pX(t))[2];return[this.height,this.width,e]}getConfig(){const t={height:this.height,width:this.width,interpolation:this.interpolation,cropToAspectRatio:this.cropToAspectRatio},e=super.getConfig();return Object.assign(t,e),t}call(t,e){return ED((()=>{const e=[this.height,this.width];if("bilinear"===this.interpolation)return JY.resizeBilinear(t,e,!this.cropToAspectRatio);if("nearest"===this.interpolation)return JY.resizeNearestNeighbor(t,e,!this.cropToAspectRatio);throw new Error(`Interpolation is ${this.interpolation} but only ${[...YQ]} are supported`)}))}}GQ.className="Resizing",rF(GQ); +/** + * @license + * Copyright 2023 CodeSmith LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class HQ{constructor(t){this.seed=t}next(){if(void 0!==this.seed)return this.seed++}}HQ.className="RandomSeed"; +/** + * @license + * Copyright 2023 CodeSmith LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class WQ extends bX{constructor(t){super(t),this.randomGenerator=new HQ(t.seed)}getConfig(){const t={seed:this.randomGenerator.seed},e=super.getConfig();return Object.assign(t,e),t}}WQ.className="BaseRandomLayer"; +/** + * @license + * Copyright 2023 CodeSmith LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +const zQ=new Set(["bilinear","nearest"]);class XQ extends WQ{constructor(t){super(t);const{factor:e,interpolation:n="bilinear"}=t;if(this.factor=e,Array.isArray(this.factor)&&2===this.factor.length)this.widthLower=this.factor[0],this.widthUpper=this.factor[1];else{if(Array.isArray(this.factor)||!(this.factor>0))throw new AW(`Invalid factor: ${this.factor}. Must be positive number or tuple of 2 numbers`);this.widthLower=-this.factor,this.widthUpper=this.factor}if(this.widthLower<-1||this.widthUpper<-1)throw new AW(`factor must have values larger than -1. Got: ${this.factor}`);if(this.widthUpper{const e=hX(t);this.imgHeight=e.shape[e.shape.length-3];const n=e.shape[e.shape.length-2];this.widthFactor=$V([1],1+this.widthLower,1+this.widthUpper,"float32",this.randomGenerator.next());let i=this.widthFactor.dataSync()[0]*n;i=Math.round(i);const s=[this.imgHeight,i];switch(this.interpolation){case"bilinear":return JY.resizeBilinear(t,s);case"nearest":return JY.resizeNearestNeighbor(t,s);default:throw new Error(`Interpolation is ${this.interpolation}\n but only ${[...zQ]} are supported`)}}))}} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function jQ(t){return new wX(t)}function qQ(t){return new rK(t)}function KQ(t){return new nK(t)}function QQ(t){return new iK(t)}function JQ(t){return new sK(t)}function ZQ(t){return new oK(t)}function tJ(t){return new aK(t)}function eJ(t){return new wK(t)}function nJ(t){return new TK(t)}function iJ(t){return new IK(t)}function sJ(t){return new yK(t)}function rJ(t){return new EK(t)}function aJ(t){return new vK(t)}function oJ(t){return new SK(t)}function lJ(t){return new xK(t)}function uJ(t){return new RK(t)}function hJ(t){return new jK(t)}function pJ(t){return new zK(t)}function cJ(t){return new HK(t)}function dJ(t){return new WK(t)}function fJ(t){return new XK(t)}function mJ(t){return new qK(t)}function gJ(t){return new KK(t)}function _J(t){return new QK(t)}function TJ(t){return new ZK(t)}function yJ(t){return new eQ(t)}function IJ(t){return new iQ(t)}function EJ(t){return new aQ(t)}function bJ(t){return new sQ(t)}function vJ(t){return new rQ(t)}function wJ(t){return new nQ(t)}function SJ(t){return new lQ(t)}function xJ(t){return new fQ(t)}function RJ(t){return new mQ(t)}function OJ(t){return new gQ(t)}function AJ(t){return new EQ(t)}function MJ(t){return AJ(t)}function CJ(t){return AJ(t)}function NJ(t){return new wQ(t)}function kJ(t){return NJ(t)}function DJ(t){return NJ(t)}function LJ(t){return new RQ(t)}function FJ(t){return LJ(t)}function PJ(t){return LJ(t)}function $J(t){return new AQ(t)}function BJ(t){return new NQ(t)}function VJ(t){return new MQ(t)}function UJ(t){return new kQ(t)}function YJ(t){return new IQ(t)}function GJ(t){return new vQ(t)}function HJ(t){return new xQ(t)}function WJ(t){return new LK(t)}function zJ(t){return new DK(t)}function XJ(t){return new PK(t)}function jJ(t){return new FK(t)}function qJ(t){return new kK(t)}function KJ(t){return new NK(t)}function QJ(t){return new GK(t)}function JJ(t){return new YK(t)}function ZJ(t){return new MK(t)}function tZ(t){return new $K(t)}function eZ(t){return new FQ(t)}function nZ(t){return new LQ(t)}XQ.className="RandomWidth",rF(XQ);const iZ=VJ,sZ=UJ,rZ=YJ,aZ=GJ;function oZ(t){return new uQ(t)}function lZ(t){return new hQ(t)}function uZ(t){return new pQ(t)}function hZ(t){return new JK(t)}function pZ(t){return new PQ(t)}function cZ(t){return new VQ(t)}function dZ(t){return new GQ(t)}function fZ(t){return new UQ(t)}function mZ(t){return new XQ(t)}function gZ(t,e){return Nj(t,e)}function _Z(t,e){return Pj(t,e)}function TZ(t,e){return $j(t,e)}function yZ(t,e){return kj(t,e)}function IZ(t,e){return Bj(t,e)}function EZ(t,e){return Lj(t,e)}function bZ(t,e){return Fj(t,e)}function vZ(t,e){return Aj(t,e)}function wZ(t,e){return bj(t,e)}function SZ(t,e){return vj(t,e)}function xZ(t,e){return vj(t,e)}function RZ(t,e){return vj(t,e)}function OZ(t,e){return Ej(t,e)}function AZ(t,e){return Ej(t,e)}function MZ(t,e){return Ej(t,e)}function CZ(t,e){return function(t,e){return ED((()=>{const n=t.sub(e).square().sum(),i=t.sub(t.mean()).square().sum();return tF(1).sub(n.div(i))}))}(t,e)} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +function NZ(t){return new Qq(t)}function kZ(t){return qq(e=t),new Qq({l1:null!=e?e.l1:null,l2:0});var e}function DZ(t){return qq(e=t),new Qq({l2:null!=e?e.l2:null,l1:0});var e} +/** + * @license + * Copyright 2018 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ +class LZ extends pj{constructor(){super(...arguments),this.model=null}setModel(t){if(!(t instanceof Iq))throw new Error("model must be a LayersModel, not some other Container");this.model=t}}function FZ(t,e){return te}class $Z extends LZ{constructor(t){if(super(),null==t&&(t={}),t.restoreBestWeights)throw new MW("restoreBestWeights = True is not implemented in EarlyStopping yet.");this.monitor=t.monitor||"val_loss",this.minDelta=Math.abs(t.minDelta||0),this.patience=t.patience||0,this.verbose=t.verbose||0,this.mode=t.mode||"auto",this.baseline=t.baseline,-1===["auto","min","max"].indexOf(this.mode)&&(console.warn(`EarlyStopping mode '${this.mode}' is invalid. Falling back to mode 'auto'.`),this.mode="auto"),"min"===this.mode?this.monitorFunc=FZ:"max"===this.mode||-1!==this.monitor.indexOf("acc")?this.monitorFunc=PZ:this.monitorFunc=FZ,this.monitorFunc===FZ&&(this.minDelta*=-1)}async onTrainBegin(t){this.wait=0,this.stoppedEpoch=0,null!=this.baseline?this.best=this.baseline:this.best=this.monitorFunc===FZ?1/0:-1/0}async onEpochEnd(t,e){await lj(e);const n=this.getMonitorValue(e);null!=n&&(this.monitorFunc(n-this.minDelta,this.best)?(this.best=n,this.wait=0):(this.wait++,this.wait>=this.patience&&(this.stoppedEpoch=t,this.model.stopTraining=!0)))}async onTrainEnd(t){this.stoppedEpoch>0&&this.verbose&&console.log(`Epoch ${this.stoppedEpoch}: early stopping.`)}getMonitorValue(t){null==t&&(t={});const e=t[this.monitor];return null==e&&console.warn(`Metric for EarlyStopping ${this.monitor} is not available. Available metrics are: ${Object.keys(t)}`),e}}const BZ={earlyStopping:function(t){return new $Z(t)}}; +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +var VZ,UZ;aA().registerFlag("KEEP_INTERMEDIATE_TENSORS",(()=>!1),(t=>{t&&console.warn("Keep intermediate tensors is ON. This will print the values of all intermediate tensors during model inference. Not all models support this mode. For details, check e2e/benchmarks/ model_config.js. This significantly impacts performance.")})),function(t){t[t.DT_INVALID=0]="DT_INVALID",t[t.DT_FLOAT=1]="DT_FLOAT",t[t.DT_DOUBLE=2]="DT_DOUBLE",t[t.DT_INT32=3]="DT_INT32",t[t.DT_UINT8=4]="DT_UINT8",t[t.DT_INT16=5]="DT_INT16",t[t.DT_INT8=6]="DT_INT8",t[t.DT_STRING=7]="DT_STRING",t[t.DT_COMPLEX64=8]="DT_COMPLEX64",t[t.DT_INT64=9]="DT_INT64",t[t.DT_BOOL=10]="DT_BOOL",t[t.DT_QINT8=11]="DT_QINT8",t[t.DT_QUINT8=12]="DT_QUINT8",t[t.DT_QINT32=13]="DT_QINT32",t[t.DT_BFLOAT16=14]="DT_BFLOAT16",t[t.DT_QINT16=15]="DT_QINT16",t[t.DT_QUINT16=16]="DT_QUINT16",t[t.DT_UINT16=17]="DT_UINT16",t[t.DT_COMPLEX128=18]="DT_COMPLEX128",t[t.DT_HALF=19]="DT_HALF",t[t.DT_RESOURCE=20]="DT_RESOURCE",t[t.DT_VARIANT=21]="DT_VARIANT",t[t.DT_UINT32=22]="DT_UINT32",t[t.DT_UINT64=23]="DT_UINT64",t[t.DT_FLOAT_REF=101]="DT_FLOAT_REF",t[t.DT_DOUBLE_REF=102]="DT_DOUBLE_REF",t[t.DT_INT32_REF=103]="DT_INT32_REF",t[t.DT_UINT8_REF=104]="DT_UINT8_REF",t[t.DT_INT16_REF=105]="DT_INT16_REF",t[t.DT_INT8_REF=106]="DT_INT8_REF",t[t.DT_STRING_REF=107]="DT_STRING_REF",t[t.DT_COMPLEX64_REF=108]="DT_COMPLEX64_REF",t[t.DT_INT64_REF=109]="DT_INT64_REF",t[t.DT_BOOL_REF=110]="DT_BOOL_REF",t[t.DT_QINT8_REF=111]="DT_QINT8_REF",t[t.DT_QUINT8_REF=112]="DT_QUINT8_REF",t[t.DT_QINT32_REF=113]="DT_QINT32_REF",t[t.DT_BFLOAT16_REF=114]="DT_BFLOAT16_REF",t[t.DT_QINT16_REF=115]="DT_QINT16_REF",t[t.DT_QUINT16_REF=116]="DT_QUINT16_REF",t[t.DT_UINT16_REF=117]="DT_UINT16_REF",t[t.DT_COMPLEX128_REF=118]="DT_COMPLEX128_REF",t[t.DT_HALF_REF=119]="DT_HALF_REF",t[t.DT_RESOURCE_REF=120]="DT_RESOURCE_REF",t[t.DT_VARIANT_REF=121]="DT_VARIANT_REF",t[t.DT_UINT32_REF=122]="DT_UINT32_REF",t[t.DT_UINT64_REF=123]="DT_UINT64_REF"}(VZ||(VZ={})),function(t){let e;!function(t){t[t.LEGACY=0]="LEGACY",t[t.V1=1]="V1",t[t.V2=2]="V2"}(e=t.CheckpointFormatVersion||(t.CheckpointFormatVersion={}))}(UZ||(UZ={})); +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const YZ={};function GZ(t,e){const n={tfOpName:t,category:"custom",inputs:[],attrs:[],customExecutor:e};YZ[t]=n}function HZ(t){return YZ[t]}function WZ(t){delete YZ[t]} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function zZ(t,e,n,i,s){const r=e.inputParams[t];if(r&&void 0!==r.inputIndexStart){const t=r.inputIndexStart,a=0===r.inputIndexEnd?void 0:void 0===r.inputIndexEnd?t+1:r.inputIndexEnd,o=t<0?e.inputNames.length+t:t;if("tensor"===r.type)return XZ(e.inputNames[o],n,i,s);if("tensors"===r.type){const r=e.inputs.slice(t,a);return e.inputNames.slice(t,a).filter(((t,e)=>{var n;return"NoOp"!==(null===(n=r[e])||void 0===n?void 0:n.op)})).map((t=>XZ(t,n,i,s)))}const l=XZ(e.inputNames[o],n,i,s),u=l.dataSync();return"number"===r.type?u[0]:jO(l.shape,u)}const a=e.attrParams[t];return a&&a.value}function XZ(t,e,n,i){const[s,r]=QZ(t,n);if(null!=i){const t=i.getHashTableHandleByName(s);if(null!=t)return t}const a=n.currentContextIds.find((t=>!!e[KZ(s,t)]));return void 0!==a?e[KZ(s,a)][r]:void 0}function jZ(t,e,n){return e[KZ(t,n.currentContextId)]}function qZ(t,e){const[n,i,s]=QZ(t,e);return[KZ(n,e&&e.currentContextId),i,s]}function KZ(t,e){return e?`${t}-${e}`:t}function QZ(t,e){if(""===t)return["",0,void 0];const n=null!=e&&null!=e.parseNodeNameCache;if(n){const n=e.parseNodeNameCache.get(t);if(null!=n)return n}const i=t.split(":");let s;if(1===i.length)s=[t,0,void 0];else{const t=i[0],e=3===i.length?i[1]:void 0;s=[t,Number(i[i.length-1]),e]}return n&&e.parseNodeNameCache.set(t,s),s}function JZ(t,e,n){let i=zZ("pad",t,e,n);if("explicit"===i){i=zZ("explicitPaddings",t,e,n);const s=[[0,0],[0,0],[0,0],[0,0]];for(let t=0;t<4;t++)s[t][0]=i[2*t],s[t][1]=i[2*t+1];return s}return i}function ZZ(t){return t.kept?t:$L(t)} +/** + * @license + * Copyright 2023 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const t0=[{tfOpName:"Add",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AddV2",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AddN",category:"arithmetic",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}]},{tfOpName:"BiasAdd",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"Sub",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"RealDiv",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Div",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"DivNoNan",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"FloorDiv",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Mul",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Maximum",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Minimum",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Pow",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SquaredDifference",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Mod",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"FloorMod",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}],e0=[{tfOpName:"Abs",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Acos",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Asin",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atan2",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"y",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Ceil",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ClipByValue",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"clipValueMin",type:"number"},{start:2,name:"clipValueMax",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Complex",category:"basic_math",inputs:[{start:0,name:"real",type:"tensor"},{start:1,name:"imag",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ComplexAbs",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Cos",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Cosh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Elu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Exp",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Floor",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Log",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Imag",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"Tout",name:"outputType",type:"dtype",notSupported:!0}]},{tfOpName:"Neg",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Real",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"Tout",name:"outputType",type:"dtype",notSupported:!0}]},{tfOpName:"Prelu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"alpha",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Relu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Relu6",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Selu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sigmoid",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sin",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sinh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sqrt",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Rsqrt",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Square",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Tan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Tanh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sign",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Round",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Expm1",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Log1p",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Reciprocal",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Softplus",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Asinh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Acosh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atanh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Erf",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LeakyRelu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"alpha",name:"alpha",type:"number",defaultValue:.2},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"IsNan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"IsFinite",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"IsInf",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}],n0=[{tfOpName:"EmptyTensorList",category:"control",inputs:[{start:0,name:"elementShape",type:"shape"},{start:1,name:"maxNumElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"LoopCond",category:"control",inputs:[{start:0,name:"pred",type:"tensor"}]},{tfOpName:"Switch",category:"control",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"pred",type:"tensor"}]},{tfOpName:"Merge",category:"control",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}]},{tfOpName:"Enter",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"frame_name",name:"frameName",type:"string"},{tfName:"is_constant",name:"isConstant",type:"bool"}]},{tfOpName:"Exit",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"NextIteration",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayV3",category:"control",inputs:[{start:0,name:"size",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"dynamic_size",name:"dynamicSize",type:"bool"},{tfName:"clear_after_read",name:"clearAfterRead",type:"bool"},{tfName:"identical_element_shapes",name:"identicalElementShapes",type:"bool"},{tfName:"tensor_array_name",name:"name",type:"string"}]},{tfOpName:"TensorArrayWriteV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"tensor",type:"tensor"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayReadV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayGatherV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape",name:"elementShape",type:"shape"}]},{tfOpName:"TensorArrayScatterV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"tensor",type:"tensor"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"TensorArrayConcatV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape_except0",name:"elementShapeExcept0",type:"shape",notSupported:!0}]},{tfOpName:"TensorArraySplitV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"tensor",type:"tensor"},{start:2,name:"lengths",type:"number[]"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"TensorArraySizeV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"flowIn",type:"number"}]},{tfOpName:"TensorArrayCloseV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"}]},{tfOpName:"StatelessIf",category:"control",inputs:[{start:0,name:"cond",type:"tensor"},{start:1,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"then_branch",name:"thenBranch",type:"func"},{tfName:"else_branch",name:"elseBranch",type:"func"}]},{tfOpName:"If",category:"control",inputs:[{start:0,name:"cond",type:"tensor"},{start:1,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"then_branch",name:"thenBranch",type:"func"},{tfName:"else_branch",name:"elseBranch",type:"func"}]},{tfOpName:"StatelessWhile",category:"control",inputs:[{start:0,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"cond",name:"cond",type:"func"},{tfName:"body",name:"body",type:"func"}]},{tfOpName:"While",category:"control",inputs:[{start:0,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"cond",name:"cond",type:"func"},{tfName:"body",name:"body",type:"func"}]},{tfOpName:"TensorListScatter",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListScatterV2",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"},{start:3,name:"numElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListGather",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListGetItem",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListSetItem",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"tensor",type:"tensor"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListReserve",category:"control",inputs:[{start:0,name:"elementShape",type:"shape"},{start:1,name:"numElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListFromTensor",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListStack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"},{tfName:"num_elements",name:"numElements",type:"dtype"}]},{tfOpName:"TensorListSplit",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"elementShape",type:"shape"},{start:2,name:"lengths",type:"number[]"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListConcat",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}],attrs:[{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListConcatV2",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}],attrs:[{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListPopBack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListPushBack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"tensor",type:"tensor"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListLength",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}]},{tfOpName:"TensorListResize",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"size",type:"number"}]}],i0=[{tfOpName:"AvgPool",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPool",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[],notSupported:!0},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPoolWithArgmax",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"include_batch_in_index",name:"includeBatchInIndex",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AvgPool3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPool3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Conv1D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"stride",name:"stride",type:"number"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NWC"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"dilation",name:"dilation",type:"number",defaultValue:1}]},{tfOpName:"Conv2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"useCudnnOnGpu",name:"useCudnnOnGpu",type:"bool"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"_FusedConv2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"use_cudnn_on_gpu",name:"useCudnnOnGpu",type:"bool",defaultValue:!0},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]",defaultValue:[1,1,1,1]},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:1e-4},{tfName:"leakyrelu_alpha",name:"leakyreluAlpha",type:"number",defaultValue:.2}]},{tfOpName:"Conv2DBackpropInput",category:"convolution",inputs:[{start:2,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:0,name:"outputShape",type:"number[]"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]",notSupported:!0}]},{tfOpName:"DepthwiseConv2d",category:"convolution",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"DepthwiseConv2dNative",category:"convolution",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"FusedDepthwiseConv2dNative",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]",defaultValue:[1,1,1,1]},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]}]},{tfOpName:"Conv3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"Dilation2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"rates",name:"dilations",type:"number[]"},{tfName:"padding",name:"pad",type:"string"}]}],s0=[{tfOpName:"Fill",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"},{start:1,name:"value",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"LinSpace",category:"creation",inputs:[{start:0,name:"start",type:"number"},{start:1,name:"stop",type:"number"},{start:2,name:"num",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"OneHot",category:"creation",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"depth",type:"number"},{start:2,name:"onValue",type:"number",defaultValue:1},{start:3,name:"offValue",type:"number",defaultValue:0}],attrs:[{tfName:"axis",name:"axis",type:"number",notSupported:!0},{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"Ones",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"OnesLike",category:"creation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"RandomStandardNormal",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"seed",name:"seed",type:"number",defaultValue:0},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"RandomUniform",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"minval",name:"minval",type:"number",defaultValue:0},{tfName:"maxval",name:"maxval",type:"number",defaultValue:1},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"seed",name:"seed",type:"number",defaultValue:0},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"RandomUniformInt",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"minval",name:"minval",type:"number"},{tfName:"maxval",name:"maxval",type:"number"},{tfName:"seed",name:"seed",type:"number",defaultValue:0},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0}]},{tfOpName:"Range",category:"creation",inputs:[{start:0,name:"start",type:"number"},{start:1,name:"stop",type:"number"},{start:2,name:"step",type:"number",defaultValue:0}],attrs:[{tfName:"Tidx",name:"dtype",type:"dtype"}]},{tfOpName:"TruncatedNormal",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"means",name:"mean",type:"number",defaultValue:0},{tfName:"stddev",name:"stdDev",type:"number",defaultValue:1},{tfName:"seed",name:"seed",type:"number"},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"Zeros",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"ZerosLike",category:"creation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"Multinomial",category:"creation",inputs:[{start:0,name:"logits",type:"tensor"},{start:1,name:"numSamples",type:"number"}],attrs:[{tfName:"seed",name:"seed",type:"number"},{tfName:"seed2",name:"seed2",type:"number"},{tfName:"T",name:"dtype",type:"dtype"},{tfName:"output_dtype",name:"output_dtype",type:"dtype"}]}],r0=[{tfOpName:"NonMaxSuppressionV2",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"}]},{tfOpName:"NonMaxSuppressionV3",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"}]},{tfOpName:"NonMaxSuppressionV4",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"T_threshold",name:"threshold",type:"dtype",notSupported:!0},{tfName:"pad_to_max_output_size",name:"padToMaxOutputSize",type:"bool"}]},{tfOpName:"NonMaxSuppressionV5",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"},{start:5,name:"softNmsSigma",type:"number"}]},{tfOpName:"Where",category:"dynamic",inputs:[{start:0,name:"condition",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ListDiff",category:"dynamic",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"y",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}],a0=[{tfOpName:"LowerBound",category:"evaluation",inputs:[{start:0,name:"sortedSequence",type:"tensor"},{start:1,name:"values",type:"tensor"}]},{tfOpName:"TopKV2",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"k",type:"number"}],attrs:[{tfName:"sorted",name:"sorted",type:"bool"}]},{tfOpName:"UpperBound",category:"evaluation",inputs:[{start:0,name:"sortedSequence",type:"tensor"},{start:1,name:"values",type:"tensor"}]},{tfOpName:"Unique",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"UniqueV2",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]}],o0=[{tfOpName:"PlaceholderWithDefault",category:"graph",inputs:[{start:0,name:"default",type:"tensor"}],attrs:[{tfName:"shape",name:"shape",type:"shape"},{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"Placeholder",category:"graph",attrs:[{tfName:"shape",name:"shape",type:"shape"},{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"Const",category:"graph"},{tfOpName:"Identity",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"IdentityN",category:"graph",inputs:[{start:0,end:0,name:"x",type:"tensors"}]},{tfOpName:"Snapshot",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Rank",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Size",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Shape",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"ShapeN",category:"graph",inputs:[{start:0,end:0,name:"x",type:"tensors"}]},{tfOpName:"Print",category:"graph",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"data",type:"tensors"}],attrs:[{tfName:"message",name:"message",type:"string"},{tfName:"first_n",name:"firstN",type:"number",notSupported:!0},{tfName:"summarize",name:"summarize",type:"number",defaultValue:3}]},{tfOpName:"NoOp",category:"graph",inputs:[]},{tfOpName:"StopGradient",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"FakeQuantWithMinMaxVars",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"min",name:"min",type:"number"},{tfName:"max",name:"max",type:"number"}]}],l0=[{tfOpName:"HashTable",category:"hash_table",inputs:[],attrs:[{tfName:"shared_name",name:"sharedName",type:"string"},{tfName:"use_node_name_sharing",name:"useNodeNameSharing",type:"bool"},{tfName:"key_dtype",name:"keyDType",type:"dtype"},{tfName:"value_dtype",name:"valueDType",type:"dtype"}]},{tfOpName:"HashTableV2",category:"hash_table",inputs:[],attrs:[{tfName:"shared_name",name:"sharedName",type:"string"},{tfName:"use_node_name_sharing",name:"useNodeNameSharing",type:"bool"},{tfName:"key_dtype",name:"keyDType",type:"dtype"},{tfName:"value_dtype",name:"valueDType",type:"dtype"}]},{tfOpName:"LookupTableImport",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableImportV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableFind",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableFindV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableSize",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"}]},{tfOpName:"LookupTableSizeV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"}]},{tfOpName:"InitializeTable",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}]},{tfOpName:"InitializeTableV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}]}],u0=[{tfOpName:"ResizeBilinear",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"size",type:"number[]"}],attrs:[{tfName:"align_corners",name:"alignCorners",type:"bool"},{tfName:"half_pixel_centers",name:"halfPixelCenters",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ResizeNearestNeighbor",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"size",type:"number[]"}],attrs:[{tfName:"align_corners",name:"alignCorners",type:"bool"},{tfName:"half_pixel_centers",name:"halfPixelCenters",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"CropAndResize",category:"image",inputs:[{start:0,name:"image",type:"tensor"},{start:1,name:"boxes",type:"tensor"},{start:2,name:"boxInd",type:"tensor"},{start:3,name:"cropSize",type:"number[]"}],attrs:[{tfName:"method",name:"method",type:"string"},{tfName:"extrapolation_value",name:"extrapolationValue",type:"number"}]},{tfOpName:"ImageProjectiveTransformV3",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"transforms",type:"tensor"},{start:2,name:"outputShape",type:"number[]"},{start:3,name:"fillValue",type:"number"}],attrs:[{tfName:"interpolation",name:"interpolation",type:"string"},{tfName:"fill_mode",name:"fillMode",type:"string"}]}],h0=[{tfOpName:"Equal",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"NotEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Greater",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"GreaterEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Less",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LessEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalAnd",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalNot",category:"logical",inputs:[{start:0,name:"a",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalOr",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Select",category:"logical",inputs:[{start:0,name:"condition",type:"tensor"},{start:1,name:"a",type:"tensor"},{start:2,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SelectV2",category:"logical",inputs:[{start:0,name:"condition",type:"tensor"},{start:1,name:"a",type:"tensor"},{start:2,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"BitwiseAnd",category:"logical",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"y",type:"tensor"}]}],p0=[{tfOpName:"_FusedMatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:1e-4},{tfName:"transpose_a",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"transpose_b",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"leakyrelu_alpha",name:"leakyreluAlpha",type:"number",defaultValue:.2},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"transpose_a",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"transpose_b",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"BatchMatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"adj_x",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"adj_y",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"BatchMatMulV2",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"adj_x",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"adj_y",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Transpose",category:"matrices",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"perm",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Einsum",category:"matrices",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}],attrs:[{tfName:"equation",name:"equation",type:"string"},{tfName:"N",name:"n",type:"number",defaultValue:2},{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"MatrixBandPart",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"numLower",type:"tensor"},{start:1,name:"numUpper",type:"tensor"}]}],c0=[{tfOpName:"EuclideanNorm",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool",defaultValue:!1}]},{tfOpName:"FusedBatchNorm",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"FusedBatchNormV2",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"FusedBatchNormV3",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"LRN",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"depth_radius",name:"radius",type:"number",defaultValue:5},{tfName:"bias",name:"bias",type:"number",defaultValue:1},{tfName:"alpha",name:"alpha",type:"number",defaultValue:1},{tfName:"beta",name:"beta",type:"number",defaultValue:.5}]},{tfOpName:"Softmax",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"LogSoftmax",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}]}],d0=[{tfOpName:"Bincount",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"size",type:"number"},{start:2,name:"weights",type:"tensor"}]},{tfOpName:"DenseBincount",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"size",type:"number"},{start:2,name:"weights",type:"tensor"}],attrs:[{tfName:"binary_output",name:"binaryOutput",type:"bool"}]},{tfOpName:"Max",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Mean",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Min",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Sum",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"All",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Any",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"ArgMax",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"ArgMin",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"Prod",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Cumprod",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}],attrs:[{tfName:"exclusive",name:"exclusive",type:"bool"},{tfName:"reverse",name:"reverse",type:"bool"}]},{tfOpName:"Cumsum",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}],attrs:[{tfName:"exclusive",name:"exclusive",type:"bool"},{tfName:"reverse",name:"reverse",type:"bool"}]}],f0=[{tfOpName:"ConcatV2",category:"slice_join",inputs:[{start:0,end:-1,name:"tensors",type:"tensors"},{start:-1,name:"axis",type:"number"}],attrs:[{tfName:"N",name:"n",type:"number",defaultValue:2}]},{tfOpName:"Concat",category:"slice_join",inputs:[{start:1,end:0,name:"tensors",type:"tensors"},{start:0,name:"axis",type:"number"}],attrs:[{tfName:"N",name:"n",type:"number",defaultValue:2}]},{tfOpName:"GatherV2",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"axis",type:"number",defaultValue:0}],attrs:[{tfName:"batch_dims",name:"batchDims",type:"number",defaultValue:0}]},{tfOpName:"Gather",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",notSupported:!0}]},{tfOpName:"Reverse",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"dims",type:"bool[]"}]},{tfOpName:"ReverseV2",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}]},{tfOpName:"Slice",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"begin",type:"number[]"},{start:2,name:"size",type:"number[]"}]},{tfOpName:"StridedSlice",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"begin",type:"number[]"},{start:2,name:"end",type:"number[]"},{start:3,name:"strides",type:"number[]"}],attrs:[{tfName:"begin_mask",name:"beginMask",type:"number",defaultValue:0},{tfName:"end_mask",name:"endMask",type:"number",defaultValue:0},{tfName:"new_axis_mask",name:"newAxisMask",type:"number",defaultValue:0},{tfName:"ellipsis_mask",name:"ellipsisMask",type:"number",defaultValue:0},{tfName:"shrink_axis_mask",name:"shrinkAxisMask",type:"number",defaultValue:0}]},{tfOpName:"Pack",category:"slice_join",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}],attrs:[{tfName:"axis",name:"axis",type:"number",defaultValue:0}]},{tfOpName:"Unpack",category:"slice_join",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"axis",name:"axis",type:"number",defaultValue:0},{tfName:"num",name:"num",type:"number",defaultValue:0,notSupported:!0}]},{tfOpName:"Tile",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"reps",type:"number[]"}]},{tfOpName:"Split",category:"slice_join",inputs:[{start:0,name:"axis",type:"number",defaultValue:0},{start:1,name:"x",type:"tensor"}],attrs:[{tfName:"num_split",name:"numOrSizeSplits",type:"number",defaultValue:1}]},{tfOpName:"SplitV",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"numOrSizeSplits",type:"number[]"},{start:2,name:"axis",type:"number",defaultValue:0}]},{tfOpName:"ScatterNd",category:"slice_join",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"values",type:"tensor"},{start:2,name:"shape",type:"number[]"}]},{tfOpName:"GatherNd",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"}]},{tfOpName:"SparseToDense",category:"slice_join",inputs:[{start:0,name:"sparseIndices",type:"tensor"},{start:1,name:"outputShape",type:"number[]"},{start:2,name:"sparseValues",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",defaultValue:!1,notSupported:!0}]},{tfOpName:"TensorScatterUpdate",category:"slice_join",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"values",type:"tensor"}]}],m0=[{tfOpName:"SparseFillEmptyRows",category:"sparse",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"values",type:"tensor"},{start:2,name:"denseShape",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}]},{tfOpName:"SparseReshape",category:"sparse",inputs:[{start:0,name:"inputIndices",type:"tensor"},{start:1,name:"inputShape",type:"tensor"},{start:2,name:"newShape",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SparseSegmentMean",category:"sparse",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"segmentIds",type:"tensor"}]},{tfOpName:"SparseSegmentSum",category:"sparse",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"segmentIds",type:"tensor"}]}],g0=[{tfOpName:"FFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"IFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"RFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"fft_length",type:"number",notSupported:!0}]},{tfOpName:"IRFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"fft_length",type:"number",notSupported:!0}]}],_0=[{tfOpName:"StaticRegexReplace",category:"string",inputs:[{start:0,name:"input",type:"tensor"}],attrs:[{tfName:"pattern",name:"pattern",type:"string"},{tfName:"rewrite",name:"rewrite",type:"string"},{tfName:"replace_global",name:"replaceGlobal",type:"bool"}]},{tfOpName:"StringNGrams",category:"string",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"dataSplits",type:"tensor"}],attrs:[{tfName:"separator",name:"separator",type:"string"},{tfName:"ngram_widths",name:"nGramWidths",type:"number[]"},{tfName:"left_pad",name:"leftPad",type:"string"},{tfName:"right_pad",name:"rightPad",type:"string"},{tfName:"pad_width",name:"padWidth",type:"number"},{tfName:"preserve_short_sequences",name:"preserveShortSequences",type:"bool"}],outputs:["ngrams","ngrams_splits"]},{tfOpName:"StringSplit",category:"string",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"delimiter",type:"tensor"}],attrs:[{tfName:"skip_empty",name:"skipEmpty",type:"bool"}],outputs:["indices","values","shape"]},{tfOpName:"StringToHashBucketFast",category:"string",inputs:[{start:0,name:"input",type:"tensor"}],attrs:[{tfName:"num_buckets",name:"numBuckets",type:"number"}]}],T0=[{tfOpName:"Cast",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"SrcT",name:"sdtype",type:"dtype",notSupported:!0},{tfName:"DstT",name:"dtype",type:"dtype"}]},{tfOpName:"ExpandDims",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"MirrorPad",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"}],attrs:[{tfName:"mode",name:"mode",type:"string"}]},{tfOpName:"Pad",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"}],attrs:[{tfName:"constant_value",name:"constantValue",type:"number",defaultValue:0}]},{tfOpName:"PadV2",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"},{start:2,name:"constantValue",type:"number",defaultValue:0}]},{tfOpName:"Reshape",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"shape",type:"number[]"}]},{tfOpName:"EnsureShape",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"shape",type:"number[]"}]},{tfOpName:"Squeeze",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"axis",tfDeprecatedName:"squeeze_dims",name:"axis",type:"number[]"}]},{tfOpName:"SpaceToBatchND",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"blockShape",type:"number[]"},{start:2,name:"paddings",type:"number[]"}]},{tfOpName:"BatchToSpaceND",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"blockShape",type:"number[]"},{start:2,name:"crops",type:"number[]"}]},{tfOpName:"DepthToSpace",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"block_size",name:"blockSize",type:"number"},{tfName:"data_format",name:"dataFormat",type:"string"}]},{tfOpName:"BroadcastTo",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"shape",type:"number[]"}],attrs:[]},{tfOpName:"BroadcastArgs",category:"transformation",inputs:[{start:0,name:"s0",type:"tensor"},{start:1,name:"s1",type:"tensor"}],attrs:[]}]; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class y0{static get Instance(){return this._instance||(this._instance=new this)}constructor(){const t=[].concat(...[Rt,Ot,At,Mt,Ct,Nt,kt,Dt,Lt,Ft,Pt,$t,Bt,Vt,Ut,Yt,Gt,Ht,Wt].map((t=>t.json)));this.opMappers=t.reduce(((t,e)=>(t[e.tfOpName]=e,t)),{})}transformGraph(t,e={}){const n=t.node,i=[],s=[],r=[],a=n.reduce(((t,e)=>(t[e.name]=this.mapNode(e),e.op.startsWith("Placeholder")?i.push(t[e.name]):"Const"===e.op?s.push(t[e.name]):null!=e.input&&0!==e.input.length||r.push(t[e.name]),t)),{});let o=[];const l=[];let u={},h={};null!=e&&(u=this.mapSignatureEntries(e.inputs),h=this.mapSignatureEntries(e.outputs));const p=Object.keys(a);p.forEach((t=>{const e=a[t];e.inputNames.forEach(((t,n)=>{const[i,,s]=qZ(t),r=a[i];if(null!=r.outputs){const t=r.outputs.indexOf(s);if(-1!==t){const s=`${i}:${t}`;e.inputNames[n]=s}}e.inputs.push(r),r.children.push(e)}))})),0===Object.keys(h).length?p.forEach((t=>{const e=a[t];0===e.children.length&&l.push(e)})):Object.keys(h).forEach((t=>{const[e]=qZ(t),n=a[e];null!=n&&(n.signatureKey=h[t],l.push(n))})),Object.keys(u).length>0?Object.keys(u).forEach((t=>{const[e]=qZ(t),n=a[e];n&&(n.signatureKey=u[t],o.push(n))})):o=i;let c={};null!=t.library&&null!=t.library.function&&(c=t.library.function.reduce(((t,e)=>(t[e.signature.name]=this.mapFunction(e),t)),{}));const d={nodes:a,inputs:o,outputs:l,weights:s,placeholders:i,signature:e,functions:c};return r.length>0&&(d.initNodes=r),d}mapSignatureEntries(t){return Object.keys(t||{}).reduce(((e,n)=>(e[t[n].name]=n,e)),{})}mapNode(t){const e=HZ(t.op)||this.opMappers[t.op]||{};null==t.attr&&(t.attr={});const n={name:t.name,op:t.op,category:e.category,inputNames:(t.input||[]).map((t=>t.startsWith("^")?t.slice(1):t)),inputs:[],children:[],inputParams:{},attrParams:{},rawAttrs:t.attr,outputs:e.outputs};return null!=e.inputs&&(n.inputParams=e.inputs.reduce(((t,e)=>(t[e.name]={type:e.type,inputIndexStart:e.start,inputIndexEnd:e.end},t)),{})),null!=e.attrs&&(n.attrParams=e.attrs.reduce(((e,n)=>{const i=n.type;let s;switch(n.type){case"string":s=E0(t.attr,n.tfName,n.defaultValue),void 0===s&&n.tfDeprecatedName&&(s=E0(t.attr,n.tfDeprecatedName,n.defaultValue));break;case"string[]":s=C0(t.attr,n.tfName,n.defaultValue),void 0===s&&n.tfDeprecatedName&&(s=C0(t.attr,n.tfDeprecatedName,n.defaultValue));break;case"number":s=v0(t.attr,n.tfName,n.defaultValue||0),void 0===s&&n.tfDeprecatedName&&(s=v0(t.attr,n.tfDeprecatedName,n.defaultValue));break;case"number[]":s=M0(t.attr,n.tfName,n.defaultValue),void 0===s&&n.tfDeprecatedName&&(s=M0(t.attr,n.tfDeprecatedName,n.defaultValue));break;case"bool":s=b0(t.attr,n.tfName,n.defaultValue),void 0===s&&n.tfDeprecatedName&&(s=b0(t.attr,n.tfDeprecatedName,n.defaultValue));break;case"bool[]":s=k0(t.attr,n.tfName,n.defaultValue),void 0===s&&n.tfDeprecatedName&&(s=k0(t.attr,n.tfDeprecatedName,n.defaultValue));break;case"shape":s=A0(t.attr,n.tfName,n.defaultValue),void 0===s&&n.tfDeprecatedName&&(s=A0(t.attr,n.tfDeprecatedName,n.defaultValue));break;case"shape[]":s=N0(t.attr,n.tfName,n.defaultValue),void 0===s&&n.tfDeprecatedName&&(s=N0(t.attr,n.tfDeprecatedName,n.defaultValue));break;case"dtype":s=x0(t.attr,n.tfName,n.defaultValue),void 0===s&&n.tfDeprecatedName&&(s=x0(t.attr,n.tfDeprecatedName,n.defaultValue));break;case"dtype[]":s=R0(t.attr,n.tfName,n.defaultValue),void 0===s&&n.tfDeprecatedName&&(s=R0(t.attr,n.tfDeprecatedName,n.defaultValue));break;case"func":s=S0(t.attr,n.tfName,n.defaultValue),void 0===s&&n.tfDeprecatedName&&(s=S0(t.attr,n.tfDeprecatedName,n.defaultValue));break;case"tensor":case"tensors":break;default:throw new Error(`Unsupported param type: ${n.type} for op: ${t.op}`)}return e[n.name]={value:s,type:i},e}),{})),n}mapFunction(t){const e=t.nodeDef,n=[];let i={};null!=e&&(i=e.reduce(((t,e)=>(t[e.name]=this.mapNode(e),"Const"===e.op&&n.push(t[e.name]),t)),{}));const s=[],r=[];t.signature.inputArg.forEach((t=>{const[e]=qZ(t.name),n={name:e,op:"Placeholder",inputs:[],inputNames:[],category:"graph",inputParams:{},attrParams:{dtype:{value:w0(t.type),type:"dtype"}},children:[]};n.signatureKey=t.name,s.push(n),i[e]=n}));Object.keys(i).forEach((t=>{const e=i[t];e.inputNames.forEach(((t,n)=>{const[s,,r]=qZ(t),a=i[s];if(null!=a.outputs){const t=a.outputs.indexOf(r);if(-1!==t){const i=`${s}:${t}`;e.inputNames[n]=i}}e.inputs.push(a),a.children.push(e)}))}));const a=t.ret;t.signature.outputArg.forEach((t=>{const[e,n]=qZ(a[t.name]),s=i[e];null!=s&&(s.defaultOutput=n,r.push(s))}));const o=this.mapArgsToSignature(t);return{nodes:i,inputs:s,outputs:r,weights:n,placeholders:[],signature:o}}mapArgsToSignature(t){return{methodName:t.signature.name,inputs:t.signature.inputArg.reduce(((t,e)=>(t[e.name]=this.mapArgToTensorInfo(e),t)),{}),outputs:t.signature.outputArg.reduce(((e,n)=>(e[n.name]=this.mapArgToTensorInfo(n,t.ret),e)),{})}}mapArgToTensorInfo(t,e){let n=t.name;return null!=e&&(n=e[n]),{name:n,dtype:t.type}}}function I0(t,e){const n=Array.isArray(t)?String.fromCharCode.apply(null,t):function(t){const e=aA().global;if(void 0!==e.atob)return e.atob(t);if("undefined"!=typeof Buffer)return new Buffer(t,"base64").toString();throw new Error("Unable to decode base64 in this environment. Missing built-in atob() or Buffer()")}(t);return e?n:n.toLowerCase()}function E0(t,e,n,i=!1){const s=t[e];return null!=s?I0(s.s,i):n}function b0(t,e,n){const i=t[e];return i?i.b:n}function v0(t,e,n){const i=t[e]||{},s=null!=i.i?i.i:null!=i.f?i.f:n;return"number"==typeof s?s:parseInt(s,10)}function w0(t){switch("string"==typeof t&&(t=VZ[t]),t){case VZ.DT_FLOAT:case VZ.DT_HALF:return"float32";case VZ.DT_INT32:case VZ.DT_INT64:case VZ.DT_INT8:case VZ.DT_UINT8:return"int32";case VZ.DT_BOOL:return"bool";case VZ.DT_DOUBLE:return"float32";case VZ.DT_STRING:return"string";case VZ.DT_COMPLEX64:case VZ.DT_COMPLEX128:return"complex64";default:return null}}function S0(t,e,n){const i=t[e];return i&&i.func?i.func.name:n}function x0(t,e,n){const i=t[e];return i&&i.type?w0(i.type):n}function R0(t,e,n){const i=t[e];return i&&i.list&&i.list.type?i.list.type.map((t=>w0(t))):n}function O0(t){if(!t.unknownRank)return null!=t.dim?t.dim.map((t=>"number"==typeof t.size?t.size:parseInt(t.size,10))):[]}function A0(t,e,n){const i=t[e];return i&&i.shape?O0(i.shape):n}function M0(t,e,n){const i=t[e];return i?((i.list.f&&i.list.f.length?i.list.f:i.list.i)||[]).map((t=>"number"==typeof t?t:parseInt(t,10))):n}function C0(t,e,n,i=!1){const s=t[e];return s&&s.list&&s.list.s?s.list.s.map((t=>I0(t,i))):n}function N0(t,e,n){const i=t[e];return i&&i.list&&i.list.shape?i.list.shape.map((t=>O0(t))):n}function k0(t,e,n){const i=t[e];return i&&i.list&&i.list.b?i.list.b:n} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class D0{constructor(t,e,n){this.node=t,this.tensorMap=e,this.context=n,this.inputs=[],this.attrs={},this.inputs=t.inputNames.map((t=>this.getInput(t))),null!=t.rawAttrs&&(this.attrs=Object.keys(t.rawAttrs).reduce(((t,e)=>(t[e]=this.getAttr(e),t)),{}))}getInput(t){return XZ(t,this.tensorMap,this.context)}getAttr(t,e){const n=this.node.rawAttrs[t];if(null!=n.tensor)return XZ(t,this.tensorMap,this.context);if(null!=n.i||null!=n.f)return v0(this.node.rawAttrs,t,e);if(null!=n.s)return E0(this.node.rawAttrs,t,e);if(null!=n.b)return b0(this.node.rawAttrs,t,e);if(null!=n.shape)return A0(this.node.rawAttrs,t,e);if(null!=n.type)return x0(this.node.rawAttrs,t,e);if(null!=n.list){if(null!=n.list.i||null!=n.list.f)return M0(this.node.rawAttrs,t,e);if(null!=n.list.s)return C0(this.node.rawAttrs,t,e);if(null!=n.list.shape)return N0(this.node.rawAttrs,t,e);if(null!=n.list.b)return k0(this.node.rawAttrs,t,e);if(null!=n.list.type)return R0(this.node.rawAttrs,t,e)}return e}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function L0(t,e,n=""){if("number"!=typeof t&&"number"!=typeof e){_O(t.length===e.length,(()=>n+` Shapes ${t} and ${e} must match`));for(let i=0;in+` Shapes ${t} and ${e} must match`))}}}function F0(t){return"number"!=typeof t&&!t.some((t=>t<0))}function P0(t,e,n){let i=$0(t,n);const s=!F0(i);if(s&&0===e.length)throw new Error(`Tried to calculate elements of an empty list with non-fully-defined elementShape: ${i}`);if(s&&e.forEach((t=>{i=$0(t.shape,i)})),!F0(i))throw new Error(`Non-fully-defined elementShape: ${i}`);return i}function $0(t,e){if("number"==typeof t)return e;if("number"==typeof e)return t;if(t.length!==e.length)throw new Error(`Incompatible ranks during merge: ${t} vs. ${e}`);const n=[];for(let i=0;i=0&&r>=0&&s!==r)throw new Error(`Incompatible shape during merge: ${t} vs. ${e}`);n[i]=s>=0?s:r}return n} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class B0{constructor(t,e,n,i,s,r,a){this.name=t,this.dtype=e,this.maxSize=n,this.elementShape=i,this.identicalElementShapes=s,this.dynamicSize=r,this.clearAfterRead=a,this.tensors=[],this.closed_=!1,this.idTensor=tF(0),vD(this.idTensor)}get id(){return this.idTensor.id}get closed(){return this.closed_}clearAndClose(t){this.tensors.forEach((e=>{null!=t&&t.has(e.tensor.id)||e.tensor.dispose()})),this.tensors=[],this.closed_=!0,this.idTensor.dispose()}size(){return this.tensors.length}read(t){if(this.closed_)throw new Error(`TensorArray ${this.name} has already been closed.`);if(t<0||t>=this.size())throw new Error(`Tried to read from index ${t}, but array size is: ${this.size()}`);const e=this.tensors[t];if(e.cleared)throw new Error(`TensorArray ${this.name}: Could not read index ${t} twice because it was cleared after a previous read (perhaps try setting clear_after_read = false?).`);return this.clearAfterRead&&(e.cleared=!0),e.read=!0,e.tensor}readMany(t){return t.map((t=>this.read(t)))}write(t,e){if(this.closed_)throw new Error(`TensorArray ${this.name} has already been closed.`);if(t<0||!this.dynamicSize&&t>=this.maxSize)throw new Error(`Tried to write to index ${t}, but array is not resizeable and size is: ${this.maxSize}`);const n=this.tensors[t]||{};if(e.dtype!==this.dtype)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${t},\n because the value dtype is ${e.dtype}, but TensorArray dtype is ${this.dtype}.`);if(0!==this.size()||null!=this.elementShape&&0!==this.elementShape.length||(this.elementShape=e.shape),L0(this.elementShape,e.shape,`TensorArray ${this.name}: Could not write to TensorArray index ${t}.`),n.read)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${t}, because it has already been read.`);if(n.written)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${t}, because it has already been written.`);n.tensor=e,vD(e),n.written=!0,this.tensors[t]=n}writeMany(t,e){if(t.length!==e.length)throw new Error(`TensorArray ${this.name}: could not write multiple tensors,because the index size: ${t.length} is not the same as tensors size: ${e.length}.`);t.forEach(((t,n)=>this.write(t,e[n])))}gather(t,e){if(e&&e!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but gather requested dtype ${e}`);if(t)t=t.slice(0,this.size());else{t=[];for(let e=0;e=this.maxSize)throw new Error(`Max index must be < array size (${n} vs. ${this.maxSize})`);this.writeMany(t,AU(e,0))}split(t,e){if(e.dtype!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but tensor has dtype ${e.dtype}`);let n=0;const i=t.map((t=>(n+=t,n)));if(n!==e.shape[0])throw new Error(`Expected sum of lengths to be equal to\n tensor.shape[0], but sum of lengths is\n ${n}, and tensor's shape is: ${e.shape}`);if(!this.dynamicSize&&t.length!==this.maxSize)throw new Error(`TensorArray's size is not equal to the size of lengths (${this.maxSize} vs. ${t.length}), and the TensorArray is not marked as dynamically resizeable`);const s=0===n?0:e.size/n,r=[];ED((()=>{e=y$(e,[1,n,s]);for(let n=0;n{if(n!==t.dtype)throw new Error(`Invalid data types; op elements ${n}, but list elements ${t.dtype}`);L0(e,t.shape,"TensorList shape mismatch: "),vD(t)})),this.idTensor=tF(0),this.maxNumElements=i,vD(this.idTensor)}copy(){return new V0([...this.tensors],this.elementShape,this.elementDtype)}clearAndClose(t){this.tensors.forEach((e=>{null!=t&&t.has(e.id)||e.dispose()})),this.tensors.length=0,this.idTensor.dispose()}size(){return this.tensors.length}stack(t,e,n=-1){if(e!==this.elementDtype)throw new Error(`Invalid data types; op elements ${e}, but list elements ${this.elementDtype}`);if(-1!==n&&this.tensors.length!==n)throw new Error(`Operation expected a list with ${n} elements but got a list with ${this.tensors.length} elements.`);L0(t,this.elementShape,"TensorList shape mismatch: ");const i=P0(this.elementShape,this.tensors,t);return ED((()=>{const t=this.tensors.map((t=>y$(t,i)));return mU(t,0)}))}popBack(t,e){if(e!==this.elementDtype)throw new Error(`Invalid data types; op elements ${e}, but list elements ${this.elementDtype}`);if(0===this.size())throw new Error("Trying to pop from an empty list.");const n=P0(this.elementShape,this.tensors,t),i=this.tensors.pop();return i.kept=!1,L0(i.shape,t,"TensorList shape mismatch: "),y$(i,n)}pushBack(t){if(t.dtype!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t.dtype}, but list elements ${this.elementDtype}`);if(L0(t.shape,this.elementShape,"TensorList shape mismatch: "),this.maxNumElements===this.size())throw new Error("Trying to push element into a full list.");vD(t),this.tensors.push(t)}resize(t){if(t<0)throw new Error(`TensorListResize expects size to be non-negative. Got: ${t}`);if(-1!==this.maxNumElements&&t>this.maxNumElements)throw new Error(`TensorListResize input size ${t} is greater maxNumElement ${this.maxNumElements}.`);const e=new V0([],this.elementShape,this.elementDtype,this.maxNumElements);e.tensors.length=t;for(let n=0;nthis.tensors.length)throw new Error(`Trying to access element ${t} in a list with ${this.tensors.length} elements.`);if(null==this.tensors[t])throw new Error(`element at index ${t} is null.`);L0(this.tensors[t].shape,e,"TensorList shape mismatch: ");const i=P0(this.elementShape,this.tensors,e);return y$(this.tensors[t],i)}setItem(t,e){if(e.dtype!==this.elementDtype)throw new Error(`Invalid data types; op elements ${e.dtype}, but list elements ${this.elementDtype}`);if(t<0||-1!==this.maxNumElements&&t>=this.maxNumElements)throw new Error(`Trying to set element ${t} in a list with max ${this.maxNumElements} elements.`);L0(this.elementShape,e.shape,"TensorList shape mismatch: "),vD(e),null!=this.tensors[t]&&(this.tensors[t].kept=!1),this.tensors[t]=e}gather(t,e,n){if(e!==this.elementDtype)throw new Error(`Invalid data types; op elements ${e}, but list elements ${this.elementDtype}`);L0(this.elementShape,n,"TensorList shape mismatch: "),t=t.slice(0,this.size());const i=P0(this.elementShape,this.tensors,n);return 0===t.length?hD([],[0].concat(i)):ED((()=>{const e=t.map((t=>y$(this.tensors[t],i)));return mU(e,0)}))}concat(t,e){if(t&&t!==this.elementDtype)throw new Error(`TensorList dtype is ${this.elementDtype} but concat requested dtype ${t}`);L0(this.elementShape,e,"TensorList shape mismatch: ");const n=P0(this.elementShape,this.tensors,e);return 0===this.size()?hD([],[0].concat(n)):ED((()=>{const t=this.tensors.map((t=>y$(t,n)));return b$(t,0)}))}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const U0=async(t,e,n)=>{switch(t.op){case"If":case"StatelessIf":{const i=zZ("thenBranch",t,e,n),s=zZ("elseBranch",t,e,n),r=zZ("cond",t,e,n),a=zZ("args",t,e,n);return(await r.data())[0]?n.functionMap[i].executeFunctionAsync(a,n.tensorArrayMap,n.tensorListMap):n.functionMap[s].executeFunctionAsync(a,n.tensorArrayMap,n.tensorListMap)}case"While":case"StatelessWhile":{const i=zZ("body",t,e,n),s=zZ("cond",t,e,n),r=zZ("args",t,e,n),a=await n.functionMap[s].executeFunctionAsync(r,n.tensorArrayMap,n.tensorListMap),o=r.map((t=>t.id));let l=await a[0].data();a.forEach((t=>{t.kept||-1!==o.indexOf(t.id)||t.dispose()}));let u=r;for(;l[0];){const t=u;u=await n.functionMap[i].executeFunctionAsync(u,n.tensorArrayMap,n.tensorListMap);const e=u.map((t=>t.id));t.forEach((t=>{t.kept||-1!==o.indexOf(t.id)||-1!==e.indexOf(t.id)||t.dispose()}));const r=await n.functionMap[s].executeFunctionAsync(u,n.tensorArrayMap,n.tensorListMap);l=await r[0].data(),r.forEach((t=>{t.kept||-1!==o.indexOf(t.id)||-1!==e.indexOf(t.id)||t.dispose()}))}return u}case"LoopCond":return[ZZ(zZ("pred",t,e,n))];case"Switch":{const i=zZ("pred",t,e,n);let s=zZ("data",t,e,n);return s.kept||(s=ZZ(s)),(await i.data())[0]?[void 0,s]:[s,void 0]}case"Merge":{const i=t.inputNames.find((t=>void 0!==XZ(t,e,n)));if(i){return[ZZ(XZ(i,e,n))]}return}case"Enter":{const i=zZ("frameName",t,e,n),s=zZ("tensor",t,e,n);return n.enterFrame(i),[ZZ(s)]}case"Exit":{const i=zZ("tensor",t,e,n);return n.exitFrame(),[ZZ(i)]}case"NextIteration":{const i=zZ("tensor",t,e,n);return n.nextIteration(),[ZZ(i)]}case"TensorArrayV3":{const i=zZ("size",t,e,n),s=zZ("dtype",t,e,n),r=zZ("elementShape",t,e,n),a=zZ("dynamicSize",t,e,n),o=zZ("clearAfterRead",t,e,n),l=zZ("identicalElementShapes",t,e,n),u=zZ("name",t,e,n),h=new B0(u,s,i,r,l,a,o);return n.addTensorArray(h),[h.idTensor,tF(1)]}case"TensorArrayWriteV3":{const i=zZ("tensorArrayId",t,e,n),s=zZ("index",t,e,n),r=zZ("tensor",t,e,n),a=n.getTensorArray(i.id);return a.write(s,r),[a.idTensor]}case"TensorArrayReadV3":{const i=zZ("tensorArrayId",t,e,n),s=zZ("index",t,e,n);return[n.getTensorArray(i.id).read(s)]}case"TensorArrayGatherV3":{const i=zZ("tensorArrayId",t,e,n),s=zZ("indices",t,e,n),r=zZ("dtype",t,e,n);return[n.getTensorArray(i.id).gather(s,r)]}case"TensorArrayScatterV3":{const i=zZ("tensorArrayId",t,e,n),s=zZ("indices",t,e,n),r=zZ("tensor",t,e,n),a=n.getTensorArray(i.id);return a.scatter(s,r),[a.idTensor]}case"TensorArrayConcatV3":{const i=zZ("tensorArrayId",t,e,n),s=n.getTensorArray(i.id),r=zZ("dtype",t,e,n);return[s.concat(r)]}case"TensorArraySplitV3":{const i=zZ("tensorArrayId",t,e,n),s=zZ("tensor",t,e,n),r=zZ("lengths",t,e,n),a=n.getTensorArray(i.id);return a.split(r,s),[a.idTensor]}case"TensorArraySizeV3":{const i=zZ("tensorArrayId",t,e,n);return[tF(n.getTensorArray(i.id).size(),"int32")]}case"TensorArrayCloseV3":{const i=zZ("tensorArrayId",t,e,n),s=n.getTensorArray(i.id);return s.clearAndClose(),[s.idTensor]}case"TensorListSetItem":{const i=zZ("tensorListId",t,e,n),s=zZ("index",t,e,n),r=zZ("tensor",t,e,n),a=n.getTensorList(i.id);return a.setItem(s,r),[a.idTensor]}case"TensorListGetItem":{const i=zZ("tensorListId",t,e,n),s=zZ("index",t,e,n),r=zZ("elementShape",t,e,n),a=zZ("elementDType",t,e,n);return[n.getTensorList(i.id).getItem(s,r,a)]}case"TensorListScatterV2":case"TensorListScatter":{const i=zZ("indices",t,e,n),s=function(t,e,n,i){if(e.length!==t.shape[0])throw new Error(`Expected len(indices) == tensor.shape[0], but saw: ${e.length} vs. ${t.shape[0]}`);const s=Math.max(...e);if(null!=i&&-1!==i&&s>=i)throw new Error(`Max index must be < array size (${s} vs. ${i})`);const r=new V0([],n,t.dtype,i),a=AU(t,0);return e.forEach(((t,e)=>{r.setItem(t,a[e])})),r}(zZ("tensor",t,e,n),i,zZ("elementShape",t,e,n),zZ("numElements",t,e,n));return n.addTensorList(s),[s.idTensor]}case"TensorListReserve":case"EmptyTensorList":{const i=zZ("elementShape",t,e,n),s=zZ("elementDType",t,e,n);let r;r="TensorListReserve"===t.op?"numElements":"maxNumElements";const a=zZ(r,t,e,n),o=function(t,e,n,i){return new V0([],t,e,i)}(i,s,0,"TensorListReserve"===t.op?-1:a);return n.addTensorList(o),[o.idTensor]}case"TensorListGather":{const i=zZ("tensorListId",t,e,n),s=zZ("indices",t,e,n),r=zZ("elementShape",t,e,n),a=zZ("elementDType",t,e,n);return[n.getTensorList(i.id).gather(s,a,r)]}case"TensorListStack":{const i=zZ("tensorListId",t,e,n),s=zZ("elementShape",t,e,n),r=zZ("elementDType",t,e,n),a=zZ("numElements",t,e,n);return[n.getTensorList(i.id).stack(s,r,a)]}case"TensorListFromTensor":{const i=function(t,e,n){const i=t.dtype;if(t.shape.length<1)throw new Error(`Tensor must be at least a vector, but saw shape: ${t.shape}`);if(t.dtype!==n)throw new Error(`Invalid data types; op elements ${t.dtype}, but list elements ${n}`);L0(t.shape.slice(1),e,"TensorList shape mismatch: ");const s=AU(t);return new V0(s,e,i)}(zZ("tensor",t,e,n),zZ("elementShape",t,e,n),zZ("elementDType",t,e,n));return n.addTensorList(i),[i.idTensor]}case"TensorListConcat":case"TensorListConcatV2":{const i=zZ("tensorListId",t,e,n),s=n.getTensorList(i.id),r=zZ("dtype",t,e,n),a=zZ("elementShape",t,e,n);return[s.concat(r,a)]}case"TensorListPushBack":{const i=zZ("tensorListId",t,e,n),s=zZ("tensor",t,e,n),r=n.getTensorList(i.id);return r.pushBack(s),[r.idTensor]}case"TensorListPopBack":{const i=zZ("tensorListId",t,e,n),s=zZ("elementShape",t,e,n),r=zZ("elementDType",t,e,n);return[n.getTensorList(i.id).popBack(s,r)]}case"TensorListSplit":{const i=zZ("tensor",t,e,n),s=zZ("elementShape",t,e,n),r=function(t,e,n){let i=0;const s=e.map((t=>(i+=t,i)));if(i!==t.shape[0])throw new Error(`Expected sum of lengths to be equal to\n tensor.shape[0], but sum of lengths is\n ${i}, and tensor's shape is: ${t.shape}`);const r=$0(t.shape.slice(1),n),a=0===i?0:t.size/i,o=ED((()=>{const n=[];t=y$(t,[1,i,a]);for(let i=0;it.dispose())),this.tensorMap.clear(),this.handle.dispose()}size(){return this.tensorMap.size}tensorSize(){return tF(this.size(),"int32")}async import(t,e){this.checkKeyAndValueTensor(t,e);const n=await t.data();return this.tensorMap.forEach((t=>t.dispose())),this.tensorMap.clear(),ED((()=>{const t=AU(e),i=n.length,s=t.length;_O(i===s,(()=>`The number of elements doesn't match, keys has ${i} elements, the values has ${s} elements.`));for(let e=0;e{const t=[];for(let i=0;i{switch(t.category){case"arithmetic":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"BiasAdd":case"AddV2":case"Add":return[i.add(zZ("a",t,e,n),zZ("b",t,e,n))];case"AddN":return[i.addN(zZ("tensors",t,e,n))];case"FloorMod":case"Mod":return[i.mod(zZ("a",t,e,n),zZ("b",t,e,n))];case"Mul":return[i.mul(zZ("a",t,e,n),zZ("b",t,e,n))];case"RealDiv":case"Div":return[i.div(zZ("a",t,e,n),zZ("b",t,e,n))];case"DivNoNan":return[i.divNoNan(zZ("a",t,e,n),zZ("b",t,e,n))];case"FloorDiv":return[i.floorDiv(zZ("a",t,e,n),zZ("b",t,e,n))];case"Sub":return[i.sub(zZ("a",t,e,n),zZ("b",t,e,n))];case"Minimum":return[i.minimum(zZ("a",t,e,n),zZ("b",t,e,n))];case"Maximum":return[i.maximum(zZ("a",t,e,n),zZ("b",t,e,n))];case"Pow":return[i.pow(zZ("a",t,e,n),zZ("b",t,e,n))];case"SquaredDifference":return[i.squaredDifference(zZ("a",t,e,n),zZ("b",t,e,n))];default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"basic_math":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"Abs":case"ComplexAbs":return[i.abs(zZ("x",t,e,n))];case"Acos":return[i.acos(zZ("x",t,e,n))];case"Acosh":return[i.acosh(zZ("x",t,e,n))];case"Asin":return[i.asin(zZ("x",t,e,n))];case"Asinh":return[i.asinh(zZ("x",t,e,n))];case"Atan":return[i.atan(zZ("x",t,e,n))];case"Atan2":return[i.atan2(zZ("x",t,e,n),zZ("y",t,e,n))];case"Atanh":return[i.atanh(zZ("x",t,e,n))];case"Ceil":return[i.ceil(zZ("x",t,e,n))];case"Complex":return[i.complex(zZ("real",t,e,n),zZ("imag",t,e,n))];case"Cos":return[i.cos(zZ("x",t,e,n))];case"Cosh":return[i.cosh(zZ("x",t,e,n))];case"Elu":return[i.elu(zZ("x",t,e,n))];case"Erf":return[i.erf(zZ("x",t,e,n))];case"Exp":return[i.exp(zZ("x",t,e,n))];case"Expm1":return[i.expm1(zZ("x",t,e,n))];case"Floor":return[i.floor(zZ("x",t,e,n))];case"Log":return[i.log(zZ("x",t,e,n))];case"Log1p":return[i.log1p(zZ("x",t,e,n))];case"Imag":return[i.imag(zZ("x",t,e,n))];case"Neg":return[i.neg(zZ("x",t,e,n))];case"Reciprocal":return[i.reciprocal(zZ("x",t,e,n))];case"Real":return[i.real(zZ("x",t,e,n))];case"Relu":return[i.relu(zZ("x",t,e,n))];case"Round":return[i.round(zZ("x",t,e,n))];case"Selu":return[i.selu(zZ("x",t,e,n))];case"Sigmoid":return[i.sigmoid(zZ("x",t,e,n))];case"Sin":return[i.sin(zZ("x",t,e,n))];case"Sign":return[i.sign(zZ("x",t,e,n))];case"Sinh":return[i.sinh(zZ("x",t,e,n))];case"Softplus":return[i.softplus(zZ("x",t,e,n))];case"Sqrt":return[i.sqrt(zZ("x",t,e,n))];case"Square":return[i.square(zZ("x",t,e,n))];case"Tanh":return[i.tanh(zZ("x",t,e,n))];case"Tan":return[i.tan(zZ("x",t,e,n))];case"ClipByValue":return[i.clipByValue(zZ("x",t,e,n),zZ("clipValueMin",t,e,n),zZ("clipValueMax",t,e,n))];case"Relu6":return[i.relu6(zZ("x",t,e,n))];case"Rsqrt":return[i.rsqrt(XZ(t.inputNames[0],e,n))];case"LeakyRelu":return[i.leakyRelu(zZ("x",t,e,n),zZ("alpha",t,e,n))];case"Prelu":return[i.prelu(zZ("x",t,e,n),zZ("alpha",t,e,n))];case"IsNan":return[i.isNaN(XZ(t.inputNames[0],e,n))];case"IsInf":return[i.isInf(XZ(t.inputNames[0],e,n))];case"IsFinite":return[i.isFinite(XZ(t.inputNames[0],e,n))];default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"control":return U0(t,e,n);case"convolution":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"Conv1D":{const s=zZ("stride",t,e,n),r=zZ("pad",t,e,n),a=zZ("dataFormat",t,e,n).toUpperCase(),o=zZ("dilation",t,e,n);return[i.conv1d(zZ("x",t,e,n),zZ("filter",t,e,n),s,r,a,o)]}case"Conv2D":{const s=zZ("strides",t,e,n),r=JZ(t,e,n),a=zZ("dataFormat",t,e,n).toUpperCase(),o=zZ("dilations",t,e,n);return[i.conv2d(zZ("x",t,e,n),zZ("filter",t,e,n),[s[1],s[2]],r,a,[o[1],o[2]])]}case"_FusedConv2D":{const{stride:s,pad:r,dataFormat:a,dilations:o,biasArg:l,preluArg:u,activationFunc:h,leakyreluAlpha:p}=Y0(t,e,n);return[i.fused.conv2d({x:zZ("x",t,e,n),filter:zZ("filter",t,e,n),strides:[s[1],s[2]],pad:r,dataFormat:a,dilations:[o[1],o[2]],bias:l,activation:h,preluActivationWeights:u,leakyreluAlpha:p})]}case"FusedDepthwiseConv2dNative":{const{stride:s,pad:r,dataFormat:a,dilations:o,biasArg:l,preluArg:u,activationFunc:h,leakyreluAlpha:p}=Y0(t,e,n);return[i.fused.depthwiseConv2d({x:zZ("x",t,e,n),filter:zZ("filter",t,e,n),strides:[s[1],s[2]],pad:r,dataFormat:a,dilations:[o[1],o[2]],bias:l,activation:h,preluActivationWeights:u,leakyreluAlpha:p})]}case"Conv2DBackpropInput":case"Conv2dTranspose":{const s=zZ("outputShape",t,e,n),r=zZ("strides",t,e,n),a=JZ(t,e,n);return[i.conv2dTranspose(zZ("x",t,e,n),zZ("filter",t,e,n),s,[r[1],r[2]],a)]}case"DepthwiseConv2dNative":case"DepthwiseConv2d":{const s=zZ("strides",t,e,n),r=JZ(t,e,n),a=zZ("dilations",t,e,n),o=zZ("dataFormat",t,e,n).toUpperCase();return[i.depthwiseConv2d(zZ("input",t,e,n),zZ("filter",t,e,n),[s[1],s[2]],r,o,[a[1],a[2]])]}case"Conv3D":{const s=zZ("strides",t,e,n),r=zZ("pad",t,e,n),a=zZ("dataFormat",t,e,n).toUpperCase(),o=zZ("dilations",t,e,n);return[i.conv3d(zZ("x",t,e,n),zZ("filter",t,e,n),[s[1],s[2],s[3]],r,a,[o[1],o[2],o[3]])]}case"AvgPool":{const s=zZ("strides",t,e,n),r=zZ("pad",t,e,n),a=zZ("kernelSize",t,e,n);return[i.avgPool(zZ("x",t,e,n),[a[1],a[2]],[s[1],s[2]],r)]}case"MaxPool":{const s=zZ("strides",t,e,n),r=zZ("pad",t,e,n),a=zZ("kernelSize",t,e,n);return[i.maxPool(zZ("x",t,e,n),[a[1],a[2]],[s[1],s[2]],r)]}case"MaxPoolWithArgmax":{const s=zZ("strides",t,e,n),r=zZ("pad",t,e,n),a=zZ("kernelSize",t,e,n),o=zZ("includeBatchInIndex",t,e,n),{result:l,indexes:u}=i.maxPoolWithArgmax(zZ("x",t,e,n),[a[1],a[2]],[s[1],s[2]],r,o);return[l,u]}case"AvgPool3D":{const s=zZ("strides",t,e,n),r=zZ("pad",t,e,n),a=zZ("kernelSize",t,e,n);return[i.avgPool3d(zZ("x",t,e,n),[a[1],a[2],a[3]],[s[1],s[2],s[3]],r)]}case"MaxPool3D":{const s=zZ("strides",t,e,n),r=zZ("pad",t,e,n),a=zZ("kernelSize",t,e,n);return[i.maxPool3d(zZ("x",t,e,n),[a[1],a[2],a[3]],[s[1],s[2],s[3]],r)]}case"Dilation2D":{const s=zZ("strides",t,e,n),r=zZ("pad",t,e,n),a=zZ("dilations",t,e,n),o=s[1],l=s[2],u=a[1],h=a[2];return[i.dilation2d(zZ("x",t,e,n),zZ("filter",t,e,n),[o,l],r,[u,h],"NHWC")]}default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"creation":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"Fill":{const s=zZ("shape",t,e,n),r=zZ("dtype",t,e,n),a=zZ("value",t,e,n);return[i.fill(s,a,r)]}case"LinSpace":{const s=zZ("start",t,e,n),r=zZ("stop",t,e,n),a=zZ("num",t,e,n);return[i.linspace(s,r,a)]}case"Multinomial":{const s=zZ("logits",t,e,n),r=zZ("numSamples",t,e,n),a=zZ("seed",t,e,n);return[i.multinomial(s,r,a)]}case"OneHot":{const s=zZ("indices",t,e,n),r=zZ("depth",t,e,n),a=zZ("onValue",t,e,n),o=zZ("offValue",t,e,n),l=zZ("dtype",t,e,n);return[i.oneHot(s,r,a,o,l)]}case"Ones":return[i.ones(zZ("shape",t,e,n),zZ("dtype",t,e,n))];case"OnesLike":return[i.onesLike(zZ("x",t,e,n))];case"RandomStandardNormal":return[i.randomStandardNormal(zZ("shape",t,e,n),zZ("dtype",t,e,n),zZ("seed",t,e,n))];case"RandomUniform":return[i.randomUniform(zZ("shape",t,e,n),zZ("minval",t,e,n),zZ("maxval",t,e,n),zZ("dtype",t,e,n))];case"RandomUniformInt":return[i.randomUniformInt(zZ("shape",t,e,n),zZ("minval",t,e,n),zZ("maxval",t,e,n),zZ("seed",t,e,n))];case"Range":{const s=zZ("start",t,e,n),r=zZ("stop",t,e,n),a=zZ("step",t,e,n);return[i.range(s,r,a,zZ("dtype",t,e,n))]}case"TruncatedNormal":{const s=zZ("shape",t,e,n),r=zZ("mean",t,e,n),a=zZ("stdDev",t,e,n),o=zZ("seed",t,e,n);return[i.truncatedNormal(s,r,a,zZ("dtype",t,e,n),o)]}case"Zeros":return[i.zeros(zZ("shape",t,e,n),zZ("dtype",t,e,n))];case"ZerosLike":return[i.zerosLike(zZ("x",t,e,n))];default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"dynamic":return(async(t,e,n,i,s=zt)=>{switch(t.op){case"NonMaxSuppressionV5":{const{boxes:i,scores:r,maxOutputSize:a,iouThreshold:o,scoreThreshold:l,softNmsSigma:u}=G0(t,e,n),h=await s.image.nonMaxSuppressionWithScoreAsync(i,r,a,o,l,u);return[h.selectedIndices,h.selectedScores]}case"NonMaxSuppressionV4":{const{boxes:i,scores:r,maxOutputSize:a,iouThreshold:o,scoreThreshold:l}=G0(t,e,n),u=zZ("padToMaxOutputSize",t,e,n),h=await s.image.nonMaxSuppressionPaddedAsync(i,r,a,o,l,u);return[h.selectedIndices,h.validOutputs]}case"NonMaxSuppressionV3":case"NonMaxSuppressionV2":{const{boxes:i,scores:r,maxOutputSize:a,iouThreshold:o,scoreThreshold:l}=G0(t,e,n);return[await s.image.nonMaxSuppressionAsync(i,r,a,o,l)]}case"Where":{const i=s.cast(zZ("condition",t,e,n),"bool"),r=[await s.whereAsync(i)];return i.dispose(),r}case"ListDiff":return s.setdiff1dAsync(zZ("x",t,e,n),zZ("y",t,e,n));default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n);case"evaluation":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"LowerBound":{const s=zZ("sortedSequence",t,e,n),r=zZ("values",t,e,n);return[i.lowerBound(s,r)]}case"TopKV2":{const s=zZ("x",t,e,n),r=zZ("k",t,e,n),a=zZ("sorted",t,e,n),o=i.topk(s,r,a);return[o.values,o.indices]}case"UpperBound":{const s=zZ("sortedSequence",t,e,n),r=zZ("values",t,e,n);return[i.upperBound(s,r)]}case"Unique":{const s=zZ("x",t,e,n),r=i.unique(s);return[r.values,r.indices]}case"UniqueV2":{const s=zZ("x",t,e,n),r=zZ("axis",t,e,n),a=i.unique(s,r);return[a.values,a.indices]}default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"image":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"ResizeBilinear":{const s=zZ("images",t,e,n),r=zZ("size",t,e,n),a=zZ("alignCorners",t,e,n),o=zZ("halfPixelCenters",t,e,n);return[i.image.resizeBilinear(s,[r[0],r[1]],a,o)]}case"ResizeNearestNeighbor":{const s=zZ("images",t,e,n),r=zZ("size",t,e,n),a=zZ("alignCorners",t,e,n),o=zZ("halfPixelCenters",t,e,n);return[i.image.resizeNearestNeighbor(s,[r[0],r[1]],a,o)]}case"CropAndResize":{const s=zZ("image",t,e,n),r=zZ("boxes",t,e,n),a=zZ("boxInd",t,e,n),o=zZ("cropSize",t,e,n),l=zZ("method",t,e,n),u=zZ("extrapolationValue",t,e,n);return[i.image.cropAndResize(s,r,a,o,l,u)]}case"ImageProjectiveTransformV3":{const s=zZ("images",t,e,n),r=zZ("transforms",t,e,n),a=zZ("outputShape",t,e,n),o=zZ("fillValue",t,e,n),l=zZ("interpolation",t,e,n),u=zZ("fillMode",t,e,n);return[i.image.transform(s,r,l.toLowerCase(),u.toLowerCase(),o,a)]}default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"graph":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"Const":return e[t.name];case"PlaceholderWithDefault":const s=zZ("default",t,e,n);return[XZ(t.name,e,n)||s];case"Placeholder":return[XZ(t.name,e,n)];case"Identity":case"StopGradient":case"FakeQuantWithMinMaxVars":case"Snapshot":return[ZZ(zZ("x",t,e,n))];case"IdentityN":return zZ("x",t,e,n).map((t=>ZZ(t)));case"Shape":return[i.tensor1d(zZ("x",t,e,n).shape,"int32")];case"ShapeN":return zZ("x",t,e,n).map((t=>i.tensor1d(t.shape)));case"Size":return[i.scalar(zZ("x",t,e,n).size,"int32")];case"Rank":return[i.scalar(zZ("x",t,e,n).rank,"int32")];case"NoOp":return[i.scalar(1)];case"Print":const r=zZ("x",t,e,n),a=zZ("data",t,e,n),o=zZ("message",t,e,n),l=zZ("summarize",t,e,n);console.warn("The graph has a tf.print() operation,usually used for debugging, which slows down performance."),console.log(o);for(let t=0;t((t,e,n,i=zt)=>{switch(t.op){case"Equal":return[i.equal(zZ("a",t,e,n),zZ("b",t,e,n))];case"NotEqual":return[i.notEqual(zZ("a",t,e,n),zZ("b",t,e,n))];case"Greater":return[i.greater(zZ("a",t,e,n),zZ("b",t,e,n))];case"GreaterEqual":return[i.greaterEqual(zZ("a",t,e,n),zZ("b",t,e,n))];case"Less":return[i.less(zZ("a",t,e,n),zZ("b",t,e,n))];case"LessEqual":return[i.lessEqual(zZ("a",t,e,n),zZ("b",t,e,n))];case"LogicalAnd":return[i.logicalAnd(zZ("a",t,e,n),zZ("b",t,e,n))];case"LogicalNot":return[i.logicalNot(zZ("a",t,e,n))];case"LogicalOr":return[i.logicalOr(zZ("a",t,e,n),zZ("b",t,e,n))];case"Select":case"SelectV2":return[i.where(zZ("condition",t,e,n),zZ("a",t,e,n),zZ("b",t,e,n))];case"BitwiseAnd":return[i.bitwiseAnd(zZ("a",t,e,n),zZ("b",t,e,n))];default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"matrices":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"BatchMatMul":case"BatchMatMulV2":case"MatMul":return[i.matMul(zZ("a",t,e,n),zZ("b",t,e,n),zZ("transposeA",t,e,n),zZ("transposeB",t,e,n))];case"Einsum":return[i.einsum(zZ("equation",t,e,n),...zZ("tensors",t,e,n))];case"Transpose":return[i.transpose(zZ("x",t,e,n),zZ("perm",t,e,n))];case"_FusedMatMul":const[s,r]=zZ("fusedOps",t,e,n),a="biasadd"===s,o="prelu"===r,l=zZ("numArgs",t,e,n),u=zZ("leakyreluAlpha",t,e,n);if(a){if(o&&2!==l)throw new Error("Fused MatMul with BiasAdd and Prelu must have two extra arguments: bias and alpha.");if(!o&&1!==l)throw new Error("Fused MatMul with BiasAdd must have one extra argument: bias.")}const[h,p]=zZ("args",t,e,n);return[i.fused.matMul({a:zZ("a",t,e,n),b:zZ("b",t,e,n),transposeA:zZ("transposeA",t,e,n),transposeB:zZ("transposeB",t,e,n),bias:h,activation:r,preluActivationWeights:p,leakyreluAlpha:u})];case"MatrixBandPart":return[i.linalg.bandPart(zZ("a",t,e,n),zZ("numLower",t,e,n),zZ("numUpper",t,e,n))];default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"normalization":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"EuclideanNorm":return[i.euclideanNorm(zZ("x",t,e,n),zZ("axis",t,e,n),zZ("keepDims",t,e,n))];case"FusedBatchNorm":case"FusedBatchNormV2":case"FusedBatchNormV3":return[i.batchNorm(zZ("x",t,e,n),zZ("mean",t,e,n),zZ("variance",t,e,n),zZ("offset",t,e,n),zZ("scale",t,e,n),zZ("epsilon",t,e,n))];case"LRN":return[i.localResponseNormalization(zZ("x",t,e,n),zZ("radius",t,e,n),zZ("bias",t,e,n),zZ("alpha",t,e,n),zZ("beta",t,e,n))];case"Softmax":return[i.softmax(zZ("x",t,e,n))];case"LogSoftmax":return[i.logSoftmax(zZ("x",t,e,n))];default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"ragged":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"RaggedGather":{const{outputNestedSplits:s,outputDenseValues:r}=i.raggedGather(zZ("paramsNestedSplits",t,e,n),zZ("paramsDenseValues",t,e,n),zZ("indices",t,e,n),zZ("outputRaggedRank",t,e,n));return s.concat(r)}case"RaggedRange":{const{rtNestedSplits:s,rtDenseValues:r}=i.raggedRange(zZ("starts",t,e,n),zZ("limits",t,e,n),zZ("splits",t,e,n));return[s,r]}case"RaggedTensorToTensor":return[i.raggedTensorToTensor(zZ("shape",t,e,n),zZ("values",t,e,n),zZ("defaultValue",t,e,n),zZ("rowPartitionTensors",t,e,n),zZ("rowPartitionTypes",t,e,n))];default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"reduction":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"Max":{const s=zZ("axis",t,e,n),r=zZ("keepDims",t,e,n);return[i.max(zZ("x",t,e,n),s,r)]}case"Mean":{const s=zZ("axis",t,e,n),r=zZ("keepDims",t,e,n);return[i.mean(zZ("x",t,e,n),s,r)]}case"Min":{const s=zZ("axis",t,e,n),r=zZ("keepDims",t,e,n);return[i.min(zZ("x",t,e,n),s,r)]}case"Sum":{const s=zZ("axis",t,e,n),r=zZ("keepDims",t,e,n);return[i.sum(zZ("x",t,e,n),s,r)]}case"All":{const s=zZ("axis",t,e,n),r=zZ("keepDims",t,e,n);return[i.all(zZ("x",t,e,n),s,r)]}case"Any":{const s=zZ("axis",t,e,n),r=zZ("keepDims",t,e,n);return[i.any(zZ("x",t,e,n),s,r)]}case"ArgMax":{const s=zZ("axis",t,e,n);return[i.argMax(zZ("x",t,e,n),s)]}case"ArgMin":{const s=zZ("axis",t,e,n);return[i.argMin(zZ("x",t,e,n),s)]}case"Prod":{const s=zZ("axis",t,e,n),r=zZ("keepDims",t,e,n);return[i.prod(zZ("x",t,e,n),s,r)]}case"Cumprod":{const s=zZ("axis",t,e,n),r=zZ("exclusive",t,e,n),a=zZ("reverse",t,e,n);return[i.cumprod(zZ("x",t,e,n),s,r,a)]}case"Cumsum":{const s=zZ("axis",t,e,n),r=zZ("exclusive",t,e,n),a=zZ("reverse",t,e,n);return[i.cumsum(zZ("x",t,e,n),s,r,a)]}case"Bincount":const s=zZ("x",t,e,n),r=zZ("weights",t,e,n),a=zZ("size",t,e,n);return[i.bincount(s,r,a)];case"DenseBincount":{const s=zZ("x",t,e,n),r=zZ("weights",t,e,n),a=zZ("size",t,e,n),o=zZ("binaryOutput",t,e,n);return[i.denseBincount(s,r,a,o)]}default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"slice_join":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"ConcatV2":case"Concat":{const s=zZ("n",t,e,n),r=zZ("axis",t,e,n);let a=zZ("tensors",t,e,n);return a=a.slice(0,s),[i.concat(a,r)]}case"Gather":{const s=zZ("x",t,e,n),r=zZ("indices",t,e,n);return[i.gather(s,i.cast(r,"int32"),0)]}case"GatherV2":{const s=zZ("axis",t,e,n),r=zZ("batchDims",t,e,n),a=zZ("x",t,e,n),o=zZ("indices",t,e,n);return[i.gather(a,i.cast(o,"int32"),s,r)]}case"Reverse":{const s=zZ("dims",t,e,n),r=[];for(let t=0;t{const s=zZ("axis",t,e,n),r=zZ("tensors",t,e,n),a=r[0].shape,o=i.squeeze(r[0]).shape,l=r.map((t=>{const e=vO(t.shape,a);if(!e&&!vO(i.squeeze(t).shape,o))throw new Error("the input tensors shape does not match");return e?t:i.reshape(t,a)}));return[i.stack(l,s)]}));case"Unpack":{const s=zZ("axis",t,e,n),r=zZ("tensor",t,e,n);return i.unstack(r,s)}case"Tile":{const s=zZ("reps",t,e,n);return[i.tile(zZ("x",t,e,n),s)]}case"Split":case"SplitV":{const s=zZ("axis",t,e,n),r=zZ("numOrSizeSplits",t,e,n),a=zZ("x",t,e,n);return i.split(a,r,s)}case"ScatterNd":{const s=zZ("indices",t,e,n),r=zZ("values",t,e,n),a=zZ("shape",t,e,n);return[i.scatterND(s,r,a)]}case"GatherNd":{const s=zZ("x",t,e,n),r=zZ("indices",t,e,n);return[i.gatherND(s,r)]}case"SparseToDense":{const s=zZ("sparseIndices",t,e,n),r=zZ("outputShape",t,e,n),a=zZ("sparseValues",t,e,n),o=zZ("defaultValue",t,e,n);return[i.sparseToDense(s,a,r,a.dtype===o.dtype?o:i.cast(o,a.dtype))]}case"TensorScatterUpdate":{const s=zZ("indices",t,e,n),r=zZ("values",t,e,n),a=zZ("tensor",t,e,n);return[i.tensorScatterUpdate(a,s,r)]}default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"sparse":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"SparseFillEmptyRows":{const{outputIndices:s,outputValues:r,emptyRowIndicator:a,reverseIndexMap:o}=i.sparse.sparseFillEmptyRows(zZ("indices",t,e,n),zZ("values",t,e,n),zZ("denseShape",t,e,n),zZ("defaultValue",t,e,n));return[s,r,a,o]}case"SparseReshape":{const{outputIndices:s,outputShape:r}=i.sparse.sparseReshape(zZ("inputIndices",t,e,n),zZ("inputShape",t,e,n),zZ("newShape",t,e,n));return[s,r]}case"SparseSegmentMean":return[i.sparse.sparseSegmentMean(zZ("data",t,e,n),zZ("indices",t,e,n),zZ("segmentIds",t,e,n))];case"SparseSegmentSum":return[i.sparse.sparseSegmentSum(zZ("data",t,e,n),zZ("indices",t,e,n),zZ("segmentIds",t,e,n))];default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"spectral":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"FFT":return[i.fft(zZ("x",t,e,n))];case"IFFT":return[i.ifft(zZ("x",t,e,n))];case"RFFT":return[i.rfft(zZ("x",t,e,n))];case"IRFFT":return[i.irfft(zZ("x",t,e,n))];default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"string":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"StaticRegexReplace":return[i.string.staticRegexReplace(zZ("input",t,e,n),zZ("pattern",t,e,n),zZ("rewrite",t,e,n),zZ("replaceGlobal",t,e,n))];case"StringNGrams":{const{nGrams:s,nGramsSplits:r}=i.string.stringNGrams(zZ("data",t,e,n),zZ("dataSplits",t,e,n),zZ("separator",t,e,n),zZ("nGramWidths",t,e,n),zZ("leftPad",t,e,n),zZ("rightPad",t,e,n),zZ("padWidth",t,e,n),zZ("preserveShortSequences",t,e,n));return[s,r]}case"StringSplit":{const{indices:s,values:r,shape:a}=i.string.stringSplit(zZ("input",t,e,n),zZ("delimiter",t,e,n),zZ("skipEmpty",t,e,n));return[s,r,a]}case"StringToHashBucketFast":return[i.string.stringToHashBucketFast(zZ("input",t,e,n),zZ("numBuckets",t,e,n))];default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"transformation":return s((()=>((t,e,n,i=zt)=>{switch(t.op){case"Cast":return[i.cast(zZ("x",t,e,n),zZ("dtype",t,e,n))];case"ExpandDims":{const s=zZ("axis",t,e,n);return[i.expandDims(zZ("x",t,e,n),s)]}case"Squeeze":{const s=zZ("axis",t,e,n);return[i.squeeze(zZ("x",t,e,n),s)]}case"Reshape":return[i.reshape(zZ("x",t,e,n),zZ("shape",t,e,n))];case"EnsureShape":return[i.ensureShape(zZ("x",t,e,n),zZ("shape",t,e,n))];case"MirrorPad":return[i.mirrorPad(zZ("x",t,e,n),zZ("padding",t,e,n),zZ("mode",t,e,n))];case"PadV2":case"Pad":return[i.pad(zZ("x",t,e,n),zZ("padding",t,e,n),zZ("constantValue",t,e,n))];case"SpaceToBatchND":{const s=zZ("blockShape",t,e,n),r=zZ("paddings",t,e,n);return[i.spaceToBatchND(zZ("x",t,e,n),s,r)]}case"BatchToSpaceND":{const s=zZ("blockShape",t,e,n),r=zZ("crops",t,e,n);return[i.batchToSpaceND(zZ("x",t,e,n),s,r)]}case"DepthToSpace":{const s=zZ("blockSize",t,e,n),r=zZ("dataFormat",t,e,n).toUpperCase();return[i.depthToSpace(zZ("x",t,e,n),s,r)]}case"BroadcastTo":return[i.broadcastTo(zZ("x",t,e,n),zZ("shape",t,e,n))];case"BroadcastArgs":return[i.broadcastArgs(zZ("s0",t,e,n),zZ("s1",t,e,n))];default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n)));case"hash_table":return(async(t,e,n,i)=>{switch(t.op){case"HashTable":case"HashTableV2":{const s=i.getHashTableHandleByName(t.name);if(null!=s)return[s];{const s=zZ("keyDType",t,e,n),r=zZ("valueDType",t,e,n),a=new H0(s,r);return i.addHashTable(t.name,a),[a.handle]}}case"InitializeTable":case"InitializeTableV2":case"LookupTableImport":case"LookupTableImportV2":{const s=zZ("tableHandle",t,e,n,i),r=zZ("keys",t,e,n),a=zZ("values",t,e,n),o=i.getHashTableById(s.id);return[await o.import(r,a)]}case"LookupTableFind":case"LookupTableFindV2":{const s=zZ("tableHandle",t,e,n,i),r=zZ("keys",t,e,n),a=zZ("defaultValue",t,e,n),o=i.getHashTableById(s.id);return[await o.find(r,a)]}case"LookupTableSize":case"LookupTableSizeV2":{const s=zZ("tableHandle",t,e,n,i);return[i.getHashTableById(s.id).tensorSize()]}default:throw TypeError(`Node type ${t.op} is not implemented`)}})(t,e,n,i);case"custom":const r=HZ(t.op);if(r&&r.customExecutor)return r.customExecutor(new D0(t,e,n));throw TypeError(`Custom op ${t.op} is not registered.`);default:throw TypeError(`Unknown op '${t.op}'. File an issue at https://github.com/tensorflow/tfjs/issues so we can add it, or register a custom execution with tf.registerOp()`)}})(t,e,n);return nA(r)?r.then((t=>[].concat(t))):[].concat(r)}class z0{constructor(t={},e={},n={},i={},s){this.weightMap=t,this.tensorArrayMap=e,this.tensorListMap=n,this.functionMap=i,this.parseNodeNameCache=s,this.rootContext={id:0,frameName:"",iterationId:0},this.contexts=[this.rootContext],this.lastId=0,this.generateCurrentContextIds()}newFrame(t,e){return{id:t,frameName:e,iterationId:0}}set currentContext(t){this.contexts!==t&&(this.contexts=t,this.generateCurrentContextIds())}get currentContext(){return this.contexts}get currentContextId(){return this._currentContextIds[0]}get currentContextIds(){return this._currentContextIds}generateCurrentContextIds(){const t=[];for(let e=0;e0===t.id&&0===t.iterationId?"":`${t.frameName}-${t.iterationId}`)).join("/"):""}enterFrame(t){this.contexts&&(this.lastId++,this.contexts=this.contexts.slice(),this.contexts.push(this.newFrame(this.lastId,t)),this._currentContextIds.unshift(this.contextIdforContexts(this.contexts)))}exitFrame(){if(!(this.contexts&&this.contexts.length>1))throw new Error("Cannot exit frame, the context is empty");this.contexts=this.contexts.slice(),this.contexts.splice(-1),this.currentContextIds.shift()}nextIteration(){if(!(this.contexts&&this.contexts.length>0))throw new Error("Cannot increase frame iteration, the context is empty");{this.contexts=this.contexts.slice(),this.lastId++;const t=Object.assign({},this.contexts[this.contexts.length-1]);t.iterationId+=1,t.id=this.lastId,this.contexts.splice(-1,1,t),this._currentContextIds.splice(0,1,this.contextIdforContexts(this.contexts))}}getWeight(t){return this.weightMap[t]}addTensorArray(t){this.tensorArrayMap[t.id]=t}getTensorArray(t){return this.tensorArrayMap[t]}addTensorList(t){this.tensorListMap[t.id]=t}getTensorList(t){return this.tensorListMap[t]}dispose(t){for(const e in this.tensorArrayMap)this.tensorArrayMap[e].clearAndClose(t);for(const e in this.tensorListMap)this.tensorListMap[e].clearAndClose(t)}} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function X0(t,e,n,i){const s=new Set,r=[];let a=null,o=null;const l=new Set,u=new Set(Object.keys(t).map((t=>QZ(t)[0])));i=i||[];const h=new Set(i.map((t=>QZ(t.name)[0]))),p=[...e];for(;p.length>0;){const t=p.pop();(Z0(t)||t1(t)||e1(t))&&null==a&&(a=t,o=a.children.map((t=>t.name)).filter((t=>s.has(t)))),s.add(t.name),null==n[t.name]&&(u.has(t.name)||h.has(t.name)||(0!==t.inputs.length?t.inputs.forEach((t=>{l.has(t.name)||(l.add(t.name),p.push(t))})):r.push(t.name)))}return{inputs:t,outputs:e,usedNodes:s,missingInputs:r,dynamicNode:a,syncInputs:o}}function j0(t,e){const{usedNodes:n,inputs:i}=e,s=Object.keys(i).map((t=>QZ(t)[0])).map((e=>t.nodes[e])),r=t.initNodes||[],a=t=>n.has("string"==typeof t?t:t.name);function o(t){return[...new Map(t.map((t=>[t.name,t]))).values()]}const l=o([...s,...t.weights,...r]).filter(a),u=o([...l,...Object.values(t.nodes)]).filter(a),h=new Map(u.map((t=>[t.name,t]))),p={};for(const t of u){p[t.name]=p[t.name]||0;for(const e of t.children)a(e)||(p[e.name]=Number.POSITIVE_INFINITY),p[e.name]=(p[e.name]||0)+1}const c=Object.entries(p).filter((([,t])=>0===t)).map((([t])=>t)),d=[...c];for(;c.length>0;){const t=c.pop(),e=h.get(t);for(const t of e.children.filter(a))0==--p[t.name]&&(d.push(t.name),c.push(t.name))}const f=function(t,e){const n=new Map(t.map((t=>[t.name,t]))),i=e.map((t=>t.name)),s=new Set(i);for(;i.length>0;){const t=i.pop(),e=n.get(t);for(const t of e.children)n.has(t.name)&&!s.has(t.name)&&(s.add(t.name),i.push(t.name))}const r=t.filter((t=>s.has(t.name)));return r}(d.map((t=>h.get(t))),l);return function(t,e){const n=new Map(t.map(((t,e)=>[t.name,e]))),i=new Set(e.map((t=>t.name))),s=t=>i.has("string"==typeof t?t:t.name),r=new Set(t.map((t=>t.name))),a=t=>r.has("string"==typeof t?t:t.name);for(const e of t){for(const t of e.children.filter(a)){if(!n.has(t.name))throw new q0(`Child ${t.name} of node ${e.name} is unreachable.`);if(n.get(e.name)>n.get(t.name))throw new q0(`Node ${e.name} is scheduled to run after its child ${t.name}.`)}if(!s(e))for(const t of e.inputs){if(!n.has(t.name))throw new q0(`Input ${t.name} of node ${e.name} is unreachable.`);if(n.get(t.name)>n.get(e.name))throw new q0(`Node ${e.name} is scheduled to run before its input ${t.name}.`)}}}(f,l),f}class q0 extends Error{constructor(t){super(`NodesExecutionOrderError: ${t}`)}}const K0=new Set(["Switch","Merge","Enter","Exit","NextIteration","StatelessIf","StatelessWhile","if","While"]),Q0=new Set(["NonMaxSuppressionV2","NonMaxSuppressionV3","NonMaxSuppressionV5","Where"]),J0=new Set(["HashTable","HashTableV2","LookupTableImport","LookupTableImportV2","LookupTableFind","LookupTableFindV2","LookupTableSize","LookupTableSizeV2"]);function Z0(t){return K0.has(t.op)}function t1(t){return Q0.has(t.op)}function e1(t){return J0.has(t.op)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class n1{get weightIds(){return this.parent?this.parent.weightIds:this._weightIds}get functionExecutorMap(){return this.parent?this.parent.functionExecutorMap:this._functionExecutorMap}get weightMap(){return this.parent?this.parent.weightMap:this._weightMap}set weightMap(t){const e=Object.keys(t).map((e=>t[e].map((t=>t.id))));this._weightIds=[].concat(...e),this._weightMap=t}set resourceManager(t){this._resourceManager=t}get inputs(){return this._inputs.map((t=>({name:t.name,shape:t.attrParams.shape?t.attrParams.shape.value:void 0,dtype:t.attrParams.dtype?t.attrParams.dtype.value:void 0})))}get outputs(){return this._outputs.map((t=>({name:t.name,shape:t.attrParams.shape?t.attrParams.shape.value:void 0,dtype:t.attrParams.dtype?t.attrParams.dtype.value:void 0})))}get inputNodes(){return this._inputs.map((t=>t.signatureKey||t.name))}get outputNodes(){return this._outputs.map((t=>{const e=t.signatureKey||t.name;return t.defaultOutput?`${e}:${t.defaultOutput}`:e}))}get functions(){return Object.keys(this._functions).reduce(((t,e)=>(t[e]=this._functions[e].signature,t)),{})}constructor(t,e){this.graph=t,this.parent=e,this.compiledMap=new Map,this.parseNodeNameCache=new Map,this._weightMap={},this.SEPARATOR=",",this._functions={},this._functionExecutorMap={},this.keepIntermediateTensors=!1,this._outputs=t.outputs,this._inputs=t.inputs,this._initNodes=t.initNodes,this._signature=t.signature,this._functions=t.functions,null!=t.functions&&Object.keys(t.functions).forEach((e=>{this._functionExecutorMap[e]=new n1(t.functions[e],this)}))}getCompilationKey(t,e){const n=t.map((t=>t.name)).sort(),i=e.map((t=>t.name)).sort();return n.join(this.SEPARATOR)+"--"+i.join(this.SEPARATOR)}compile(t,e){const n=X0(t,e,this.weightMap,this._initNodes),{missingInputs:i,dynamicNode:s,syncInputs:r}=n;if(null!=s)throw new Error(`This execution contains the node '${s.name}', which has the dynamic op '${s.op}'. Please use model.executeAsync() instead. Alternatively, to avoid the dynamic ops, specify the inputs [${r}]`);if(i.length>0){const n=e.map((t=>t.name)),s=Object.keys(t);throw new Error(`Cannot compute the outputs [${n}] from the provided inputs [${s}]. Missing the following inputs: [${i}]`)}const a=j0(this.graph,n),o=function(t){const e=new Map(t.map(((t,e)=>[t.name,e]))),n=Number.MAX_SAFE_INTEGER,i=t.map(((t,e)=>Z0(t)?n:e)),s=t=>{const n=i[e.get(t.name)];return null==n?-1:n},r=t.map(((t,e)=>t.children.map(s).reduce(((t,e)=>Math.max(t,e)),i[e]))),a=new Map;for(let e=0;ethis.cloneAndKeepTensor(t)));return e}cloneTensorMap(t){return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,this.cloneTensorList(e)])))}execute(t,e){this.disposeIntermediateTensors(),t=this.mapInputs(t);const n=Object.keys(t).sort();this.checkInputs(t),this.checkInputShapeAndType(t),e=this.mapOutputs(e),this.checkOutputs(e);const i=n.map((t=>this.graph.nodes[QZ(t)[0]])),s=e.map((t=>QZ(t)[0])),r=new Set(s);let a=s.map((t=>this.graph.nodes[t]));0===a.length&&(a=this._outputs);const o=this.getCompilationKey(i,a);let l=this.compiledMap.get(o);null==l&&(l=this.compile(t,a),this.compiledMap.set(o,l));try{this.keepIntermediateTensors=aA().getBool("KEEP_INTERMEDIATE_TENSORS")}catch(t){this.keepIntermediateTensors=!1,console.warn(t.message)}const u={},h={};return ED((()=>{const n=new z0(this.weightMap,u,h,this.functionExecutorMap,this.parseNodeNameCache),i=Object.assign({},this.weightMap);this.keepIntermediateTensors&&(this.clonedTensorsMap=this.cloneTensorMap(this.weightMap)),Object.keys(t).forEach((e=>{const[s,r]=QZ(e,n),a=[];a[r]=t[e],i[s]=a,this.keepIntermediateTensors&&(this.clonedTensorsMap[s]=this.cloneTensorList(a))}));const s=this.getFrozenTensorIds(i),{orderedNodes:a,nodeLiveUntilMap:o}=l;for(const t of a){if(i[t.name])continue;const e=W0(t,i,n,this._resourceManager);if(nA(e))throw new Error(`The execution of the op '${t.op}' returned a promise. Please use model.executeAsync() instead.`);i[t.name]=e,this.keepIntermediateTensors&&(this.clonedTensorsMap[t.name]=this.cloneTensorList(e)),this.checkTensorForDisposalWithNodeLiveUntilInfo(t,i,n,s,r,o.get(t.name))}return null==this.parent&&n.dispose(s),e.map((t=>XZ(t,i,n)))}))}getFrozenTensorIds(t){const e=[].concat.apply([],Object.keys(t).map((e=>t[e])).map((t=>t.map((t=>t.id)))));return new Set(e)}checkTensorForDisposal(t,e,n,i,s,r,a){if(!Z0(e)&&!r.has(t)){for(const i of n[t])null!=i&&(a[i.id]=(a[i.id]||0)+e.children.length);for(const t of e.inputs){if(Z0(t))continue;const e=jZ(t.name,n,i);if(null!=e)for(const t of e){if(!t||t.kept||s.has(t.id))continue;const e=a[t.id];1===e?(t.dispose(),delete a[t.id]):null!=e&&a[t.id]--}}}}checkTensorForDisposalWithNodeLiveUntilInfo(t,e,n,i,s,r){function a(t){return Z0(t)||s.has(t.name)}if(!Z0(t)&&null!=r)for(const t of r){if(a(t))continue;const s=jZ(t.name,e,n);for(const t of s)!t||t.kept||i.has(t.id)||t.dispose()}}async executeAsync(t,e){return this._executeAsync(t,e)}disposeIntermediateTensors(){this.clonedTensorsMap&&(Object.values(this.clonedTensorsMap).forEach((t=>{for(const e of t)e&&!e.isDisposed&&e.dispose()})),this.clonedTensorsMap=null)}getIntermediateTensors(){return this.clonedTensorsMap}async _executeAsync(t,e,n=!1,i={},s={}){this.disposeIntermediateTensors(),n||(t=this.mapInputs(t),this.checkInputs(t),this.checkInputShapeAndType(t),e=this.mapOutputs(e),this.checkOutputs(e));try{this.keepIntermediateTensors=aA().getBool("KEEP_INTERMEDIATE_TENSORS")}catch(t){this.keepIntermediateTensors=!1,console.warn(t.message)}const r=new z0(this.weightMap,i,s,this.functionExecutorMap,this.parseNodeNameCache);this.keepIntermediateTensors&&(this.clonedTensorsMap=this.cloneTensorMap(this.weightMap));const a=await this.executeWithControlFlow(t,r,e,n),o=e.map((t=>XZ(t,a,r))),l=o.map((t=>t.id)),u=Object.keys(t).map((e=>t[e].id)),h=new Set([...l,...u,...this.weightIds]);return Object.values(a).forEach((t=>{t.forEach((t=>{!t||t.isDisposed||h.has(t.id)||t.dispose()}))})),null==this.parent&&r.dispose(h),o}async executeFunctionAsync(t,e,n){const i=t.reduce(((t,e,n)=>(t[this.inputs[n].name]=e,t)),{});return this._executeAsync(i,this.outputNodes,!0,e,n)}async executeWithControlFlow(t,e,n,i){const s=Object.keys(t),r=s.map((t=>this.graph.nodes[QZ(t)[0]])),a=n.map((t=>QZ(t)[0])),o=new Set(a);let l=a.map((t=>this.graph.nodes[t]));0===l.length&&(l=this._outputs);const{usedNodes:u,missingInputs:h,dynamicNode:p,syncInputs:c}=X0(t,l,this.weightMap,this._initNodes),d=[...r,...this.graph.weights,...this._initNodes||[]].map((t=>({node:t,contexts:e.currentContext}))),f=Object.assign({},this.weightMap);Object.keys(t).forEach((e=>{const[n,i]=QZ(e),s=[];s[i]=t[e],f[n]=s}));const m={},g=this.getFrozenTensorIds(f),_={};for(;d.length>0;){const t=this.processStack(r,d,e,f,_,g,o,m,u);await Promise.all(t)}null!=p||i||console.warn("This model execution did not contain any nodes with control flow or dynamic output shapes. You can use model.execute() instead.");const T=l.filter((t=>!Z0(t)&&!XZ(t.name,f,e))).map((t=>t.name));if(T.length>0){let t="";throw null!=p&&(t=`Alternatively, to avoid the dynamic ops, use model.execute() and specify the inputs [${c}]`),new Error(`Cannot compute the outputs [${T}] from the provided inputs [${s}]. Consider providing the following inputs: [${h}]. ${t}`)}return f}processStack(t,e,n,i,s,r,a,o,l){const u=[];for(;e.length>0;){const t=e.pop();n.currentContext=t.contexts;let h="";if("Enter"===t.node.op&&zZ("isConstant",t.node,i,n)&&([h]=qZ(t.node.name,n)),null==i[t.node.name]){const p=W0(t.node,i,n,this._resourceManager);h||([h]=qZ(t.node.name,n));const c=n.currentContext;nA(p)?u.push(p.then((u=>(i[h]=u,this.keepIntermediateTensors&&(this.clonedTensorsMap[h]=this.cloneTensorList(u)),n.currentContext=c,this.checkTensorForDisposal(h,t.node,i,n,r,a,o),this.processChildNodes(t.node,e,n,i,s,l),u)))):(i[h]=p,this.keepIntermediateTensors&&(this.clonedTensorsMap[h]=this.cloneTensorList(p)),this.checkTensorForDisposal(h,t.node,i,n,r,a,o),this.processChildNodes(t.node,e,n,i,s,l))}else this.processChildNodes(t.node,e,n,i,s,l)}return u}processChildNodes(t,e,n,i,s,r){t.children.forEach((t=>{const[a]=qZ(t.name,n);!s[a]&&r.has(t.name)&&("Merge"===t.op?t.inputNames.some((t=>!!XZ(t,i,n)))&&(s[a]=!0,e.push({contexts:n.currentContext,node:t})):t.inputNames.every((t=>!!XZ(t,i,n)))&&(s[a]=!0,e.push({contexts:n.currentContext,node:t})))}))}dispose(){Object.keys(this.weightMap).forEach((t=>this.weightMap[t].forEach((t=>t.dispose()))))}checkInputShapeAndType(t){Object.keys(t).forEach((e=>{const n=t[e],[i]=QZ(e),s=this.graph.nodes[i];if(s.attrParams.shape&&s.attrParams.shape.value){const t=s.attrParams.shape.value;_O(t.length===n.shape.length&&n.shape.every(((e,n)=>-1===t[n]||t[n]===e)),(()=>`The shape of dict['${s.name}'] provided in model.execute(dict) must be [${t}], but was [${n.shape}]`))}s.attrParams.dtype&&s.attrParams.dtype.value&&_O(n.dtype===s.attrParams.dtype.value,(()=>`The dtype of dict['${s.name}'] provided in model.execute(dict) must be ${s.attrParams.dtype.value}, but was ${n.dtype}`))}))}mapInputs(t){var e,n;const i={};for(const s in t){const r=null===(n=null===(e=this._signature)||void 0===e?void 0:e.inputs)||void 0===n?void 0:n[s];null!=r?i[r.name]=t[s]:i[s]=t[s]}return i}checkInputs(t){const e=Object.keys(t).filter((t=>{const[e]=QZ(t);return null==this.graph.nodes[e]}));if(e.length>0)throw new Error(`The dict provided in model.execute(dict) has keys: [${e}] that are not part of graph`)}mapOutputs(t){return t.map((t=>{var e,n;const i=null===(n=null===(e=this._signature)||void 0===e?void 0:e.outputs)||void 0===n?void 0:n[t];return null!=i?i.name:t}),{})}checkOutputs(t){t.forEach((t=>{const[e]=QZ(t);if(!this.graph.nodes[e])throw new Error(`The output '${t}' is not found in the graph`)}))}}class i1{constructor(t={},e={}){this.hashTableNameToHandle=t,this.hashTableMap=e}addHashTable(t,e){this.hashTableNameToHandle[t]=e.handle,this.hashTableMap[e.id]=e}getHashTableHandleByName(t){return this.hashTableNameToHandle[t]}getHashTableById(t){return this.hashTableMap[t]}dispose(){for(const t in this.hashTableMap)this.hashTableMap[t].clearAndClose(),delete this.hashTableMap[t];for(const t in this.hashTableNameToHandle)this.hashTableNameToHandle[t].dispose(),delete this.hashTableNameToHandle[t]}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const s1="?tfjs-format=file",r1="model.json";class a1{get modelVersion(){return this.version}get inputNodes(){return this.executor.inputNodes}get outputNodes(){return this.executor.outputNodes}get inputs(){return this.executor.inputs}get outputs(){return this.executor.outputs}get weights(){return this.executor.weightMap}get metadata(){return this.artifacts.userDefinedMetadata}get modelSignature(){return this.signature}get modelStructuredOutputKeys(){return this.structuredOutputKeys}constructor(t,e={},n=ht){this.modelUrl=t,this.loadOptions=e,this.version="n/a",this.io=n,null==e&&(this.loadOptions={}),this.resourceManager=new i1}findIOHandler(){const t=this.modelUrl;if(null!=t.load)this.handler=t;else if(null!=this.loadOptions.requestInit)this.handler=this.io.browserHTTPRequest(t,this.loadOptions);else{const e=this.io.getLoadHandlers(t,this.loadOptions);if(0===e.length)e.push(this.io.browserHTTPRequest(t,this.loadOptions));else if(e.length>1)throw new Error(`Found more than one (${e.length}) load handlers for URL '${[t]}'`);this.handler=e[0]}}load(){if(this.findIOHandler(),null==this.handler.load)throw new Error("Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.");const t=this.handler.load();return nA(t)?t.then((t=>null==t.getWeightStream?this.loadSync(t):this.loadStreaming(t))):this.loadSync(t)}loadSync(t){const e=this.io.decodeWeights(t.weightData,t.weightSpecs);return this.loadWithWeightMap(t,e)}async loadStreaming(t){if(null==t.getWeightStream)throw new Error("Model artifacts missing streamWeights function");const e=await UD(t.getWeightStream(),t.weightSpecs);return this.loadWithWeightMap(t,e)}loadWithWeightMap(t,e){this.artifacts=t;const n=this.artifacts.modelTopology;let i=this.artifacts.signature;if(null!=this.artifacts.userDefinedMetadata){const t=this.artifacts.userDefinedMetadata;null!=t.signature&&(i=t.signature),null!=t.structuredOutputKeys&&(this.structuredOutputKeys=t.structuredOutputKeys)}if(this.signature=i,this.version=`${n.versions.producer}.${n.versions.minConsumer}`,this.executor=new n1(y0.Instance.transformGraph(n,this.signature)),this.executor.weightMap=this.convertTensorMapToTensorsMap(e),this.executor.resourceManager=this.resourceManager,null!=t.modelInitializer&&null!=t.modelInitializer.node){const e=y0.Instance.transformGraph(t.modelInitializer);this.initializer=new n1(e),this.initializer.weightMap=this.executor.weightMap,this.initializer.resourceManager=this.resourceManager,this.initializerSignature=t.initializerSignature}return!0}async save(t,e){if("string"==typeof t){const e=this.io.getSaveHandlers(t);if(0===e.length)throw new Error(`Cannot find any save handlers for URL '${t}'`);if(e.length>1)throw new Error(`Found more than one (${e.length}) save handlers for URL '${t}'`);t=e[0]}if(null==t.save)throw new Error("GraphModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.");return t.save(this.artifacts)}addStructuredOutputNames(t){if(this.structuredOutputKeys){const e={};return(t instanceof xk?[t]:t).forEach(((t,n)=>e[this.structuredOutputKeys[n]]=t)),e}return t}predict(t,e){const n=this.execute(t,this.outputNodes);return this.addStructuredOutputNames(n)}async predictAsync(t,e){const n=await this.executeAsync(t,this.outputNodes);return this.addStructuredOutputNames(n)}normalizeInputs(t){var e;if(!(t instanceof xk||Array.isArray(t))){const n=null===(e=this.signature)||void 0===e?void 0:e.inputs;if(null!=n)for(const e in n){const i=n[e];null!=i.resourceId&&(t[e]=this.resourceIdToCapturedInput[i.resourceId])}return t}t=Array.isArray(t)?t:[t];const n=Object.keys(this.resourceIdToCapturedInput).length;if(t.length+n!==this.inputNodes.length)throw new Error(`Input tensor count mismatch, the graph model has ${this.inputNodes.length-n} non-resource placeholders, while there are ${t.length} input tensors provided.`);let i=0;return this.inputNodes.reduce(((e,n)=>{var s,r,a;const o=null===(a=null===(r=null===(s=this.signature)||void 0===s?void 0:s.inputs)||void 0===r?void 0:r[n])||void 0===a?void 0:a.resourceId;return e[n]=null!=o?this.resourceIdToCapturedInput[o]:t[i++],e}),{})}normalizeOutputs(t){return t=t||this.outputNodes,Array.isArray(t)?t:[t]}executeInitializerGraph(){return null==this.initializer?[]:null==this.initializerSignature?this.initializer.execute({},[]):this.initializer.execute({},Object.keys(this.initializerSignature.outputs))}async executeInitializerGraphAsync(){return null==this.initializer?[]:null==this.initializerSignature?this.initializer.executeAsync({},[]):this.initializer.executeAsync({},Object.keys(this.initializerSignature.outputs))}setResourceIdToCapturedInput(t){if(this.resourceIdToCapturedInput={},this.initializerSignature){const e=this.initializerSignature.outputs,n=Object.keys(e);for(let i=0;i1?n:n[0]}async executeAsync(t,e){null==this.resourceIdToCapturedInput&&this.setResourceIdToCapturedInput(await this.executeInitializerGraphAsync()),t=this.normalizeInputs(t),e=this.normalizeOutputs(e);const n=await this.executor.executeAsync(t,e);return n.length>1?n:n[0]}getIntermediateTensors(){return this.executor.getIntermediateTensors()}disposeIntermediateTensors(){this.executor.disposeIntermediateTensors()}convertTensorMapToTensorsMap(t){return Object.keys(t).reduce(((e,n)=>(e[n]=[t[n]],e)),{})}dispose(){this.executor.dispose(),this.initializer&&(this.initializer.dispose(),this.resourceIdToCapturedInput&&bD(this.resourceIdToCapturedInput)),this.resourceManager.dispose()}}async function o1(t,e={},n=ht){if(null==t)throw new Error("modelUrl in loadGraphModel() cannot be null. Please provide a url or an IOHandler that loads the model");null==e&&(e={}),e.fromTFHub&&"string"==typeof t&&(t=function(t){t.endsWith("/")||(t+="/");return`${t}${r1}${s1}`}(t));const i=new a1(t,e,n);return await i.load(),i}function l1(t){if(null==t)throw new Error("modelUrl in loadGraphModelSync() cannot be null. Please provide model artifacts or an IOHandler that loads the model");let e;if(t instanceof Array){const[n,i]=t;if(!n)throw new Error("modelJSON must be the first element of the array");if(!(i&&i instanceof ArrayBuffer))throw new Error("An ArrayBuffer of weights must be the second element of the array");if(!("modelTopology"in n))throw new Error("Model JSON is missing 'modelTopology'");if(!("weightsManifest"in n))throw new Error("Model JSON is missing 'weightsManifest'");e=UF(jD(n,QD(n.weightsManifest),i))}else if("load"in t)e=t;else{if(!("modelTopology"in t&&"weightSpecs"in t&&"weightData"in t))throw new Error("Unknown model format");e=UF(t)}const n=new a1(e);return n.load(),n} +/** @license See the LICENSE file. */ +const u1="4.22.0";function h1(t,e,n=new Map,i=new Set){if(null==t)return null;if("function"==typeof Blob&&t instanceof Blob)return t.slice();if(i.has(t))throw new Error("Circular references are not supported.");if(n.has(t))return n.get(t);const s=e(t);if(s.recurse&&null!==s.value)throw new Error("A deep map function may not return both a value and recurse=true.");if(s.recurse){if(m1(t)){const s=Array.isArray(t)?[]:{};i.add(t);for(const r in t){const a=h1(t[r],e,n,i);s[r]=a}return i.delete(t),t.__proto__&&(s.__proto__=t.__proto__),s}throw new Error(`Can't recurse into non-iterable type: ${t}`)}return n.set(t,s.value),s.value}function p1(t,e=d1){return c1(t,e)}function c1(t,e,n=new Set){const i=t[0];if(n.has(i))throw new Error("Circular references are not supported.");const s=e(t);if(s.recurse&&null!==s.value)throw new Error("A deep zip function may not return both a value and recurse=true.");if(s.recurse){if(m1(i)){const s=Array.isArray(i)?[]:{};n.add(i);for(const r in i){const i=c1(t.map((t=>t[r])),e,n);s[r]=i}return n.delete(i),s}throw new Error(`Can't recurse into non-iterable type: ${i}`)}return s.value}function d1(t){return null===t?null:m1(t[0])?{value:null,recurse:!0}:{value:t,recurse:!1}}async function f1(t,e){const n=new Map;h1(t,e,n);for(const t of Array.from(n.keys())){const e=n.get(t);if(nA(e)){const i=await e;n.set(t,i)}}return h1(t,e,n)}function m1(t){let e=!1;if(aA().get("IS_BROWSER"))e=t instanceof TextDecoder;else{const{StringDecoder:n}=__webpack_require__(551);e=t instanceof n}return null!=t&&!ArrayBuffer.isView(t)&&(Array.isArray(t)||"object"==typeof t&&!(t instanceof xk)&&!(t instanceof Promise)&&!e)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +function g1(t){ +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +return function(t,e){return h1(t,e)}(t,_1)}function _1(t){return t instanceof xk?{value:t.clone(),recurse:!1}:m1(t)?{value:null,recurse:!0}:{value:t,recurse:!1}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +class T1{constructor(t){if(this.capacity=t,this.begin=0,this.end=0,null==t)throw new RangeError("Can't create a ring buffer of unknown capacity.");if(t<1)throw new RangeError("Can't create ring buffer of capacity < 1.");this.data=new Array(t),this.doubledCapacity=2*t}wrap(t){for(;t<0;)t+=this.doubledCapacity;return t%this.doubledCapacity}get(t){if(t<0)throw new RangeError("Can't get item at a negative index.");return this.data[t%this.capacity]}set(t,e){if(t<0)throw new RangeError("Can't set item at a negative index.");this.data[t%this.capacity]=e}length(){let t=this.end-this.begin;return t<0&&(t=this.doubledCapacity+t),t}isFull(){return this.length()===this.capacity}isEmpty(){return 0===this.length()}push(t){if(this.isFull())throw new RangeError("Ring buffer is full.");this.set(this.end,t),this.end=this.wrap(this.end+1)}pushAll(t){for(const e of t)this.push(e)}pop(){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");this.end=this.wrap(this.end-1);const t=this.get(this.end);return this.set(this.end,void 0),t}unshift(t){if(this.isFull())throw new RangeError("Ring buffer is full.");this.begin=this.wrap(this.begin-1),this.set(this.begin,t)}shift(){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");const t=this.get(this.begin);return this.set(this.begin,void 0),this.begin=this.wrap(this.begin+1),t}shuffleExcise(t){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");const e=this.wrap(this.begin+t),n=this.get(e);return this.set(e,this.pop()),n}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +class y1 extends T1{constructor(){super(y1.INITIAL_CAPACITY)}isFull(){return!1}push(t){super.isFull()&&this.expand(),super.push(t)}unshift(t){super.isFull()&&this.expand(),super.unshift(t)}expand(){const t=2*this.capacity,e=new Array(t),n=this.length();for(let t=0;t!0===t))}rowMajorBatch(t,e=!0){return new A1(this,t,e)}columnMajorBatch(t,e=!0,n=d1){return this.rowMajorBatch(t,e).map((t=>p1(t,n)))}concatenate(t,e){return new F1(I1([this,t]),e)}take(t){return t<0||null==t?this:new O1(this,t)}skip(t){return t<0||null==t?this:new R1(this,t)}prefetch(t){return new B1(this,t)}shuffle(t,e){return new V1(this,t,e)}serial(){return new x1(this)}}class w1 extends v1{constructor(t){super(),this.items=t,this.trav=0}summary(){return`Array of ${this.items.length} items`}async next(){if(this.trav>=this.items.length)return{value:null,done:!0};const t=this.items[this.trav];return this.trav++,{value:g1(t),done:!1}}}class S1 extends v1{constructor(t){super(),this.nextFn=t}summary(){return"Function call"}async next(){try{return this.nextFn()}catch(t){throw t.message=`Error thrown while iterating through a dataset: ${t.message}`,t}}}class x1 extends v1{constructor(t){super(),this.upstream=t,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> Serial`}async next(){return this.lastRead=this.lastRead.then((()=>this.serialNext())),this.lastRead}async serialNext(){return this.upstream.next()}}class R1 extends v1{constructor(t,e){super(),this.upstream=t,this.maxCount=e,this.count=0,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> Skip`}async next(){return this.lastRead=this.lastRead.then((()=>this.serialNext())),this.lastRead}async serialNext(){for(;this.count++ Take`}async next(){return this.count++>=this.maxCount?{value:null,done:!0}:this.upstream.next()}}class A1 extends v1{constructor(t,e,n=!0){super(),this.upstream=t,this.batchSize=e,this.enableSmallLastBatch=n,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> RowMajorBatch`}async next(){return this.lastRead=this.lastRead.then((()=>this.serialNext())),this.lastRead}async serialNext(){const t=[];for(;t.length0?{value:t,done:!1}:{value:null,done:!0};t.push(e.value)}return{value:t,done:!1}}}class M1 extends v1{constructor(t,e){super(),this.upstream=t,this.predicate=e,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> Filter`}async next(){return this.lastRead=this.lastRead.then((()=>this.serialNext())),this.lastRead}async serialNext(){for(;;){const t=await this.upstream.next();if(t.done||this.predicate(t.value))return t;bD(t.value)}}}class C1 extends v1{constructor(t,e){super(),this.upstream=t,this.transform=e}summary(){return`${this.upstream.summary()} -> Map`}async next(){const t=await this.upstream.next();if(t.done)return{value:null,done:!0};const e=Yk(t.value),n=this.transform(t.value),i=Yk(n);for(const t of e)Uk(t,i)||t.dispose();return{value:n,done:!1}}}class N1 extends v1{constructor(t,e){super(),this.upstream=t,this.handler=e,this.count=0,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> handleErrors`}async next(){return this.lastRead=this.lastRead.then((()=>this.serialNext())),this.lastRead}async serialNext(){for(;;)try{return await this.upstream.next()}catch(t){if(!this.handler(t))return{value:null,done:!0}}}}class k1 extends v1{constructor(t,e){super(),this.upstream=t,this.transform=e}summary(){return`${this.upstream.summary()} -> AsyncMap`}async next(){const t=await this.upstream.next();if(t.done)return{value:null,done:!0};const e=Yk(t.value),n=await this.transform(t.value),i=Yk(n);for(const t of e)Uk(t,i)||t.dispose();return{value:n,done:!1}}}class D1 extends v1{constructor(){super(),this.outputQueue=new y1,this.lastRead=Promise.resolve({value:null,done:!1})}async next(){return this.lastRead=this.lastRead.then((()=>this.serialNext())),this.lastRead}async serialNext(){for(;0===this.outputQueue.length();)if(!await this.pump())return{value:null,done:!0};return{value:this.outputQueue.shift(),done:!1}}}class L1 extends D1{constructor(t,e){super(),this.upstream=t,this.transform=e}summary(){return`${this.upstream.summary()} -> Flatmap`}async pump(){const t=await this.upstream.next();if(t.done)return!1;const e=Yk(t.value),n=this.transform(t.value),i=Yk(n);this.outputQueue.pushAll(n);for(const t of e)Uk(t,i)||t.dispose();return!0}}class F1 extends v1{constructor(t,e){super(),this.baseErrorHandler=e,this.lastRead=null,this.iterator=null,this.moreIterators=t}summary(){return"TODO: fill in upstream of chained summaries -> Chained"}async next(){return this.lastRead=this.readFromChain(this.lastRead),this.lastRead}async readFromChain(t){if(await t,null==this.iterator){const t=await this.moreIterators.next();if(t.done)return{value:null,done:!0};this.iterator=t.value,null!=this.baseErrorHandler&&(this.iterator=this.iterator.handleErrors(this.baseErrorHandler))}const e=await this.iterator.next();return e.done?(this.iterator=null,this.readFromChain(t)):e}}var P1;!function(t){t[t.FAIL=0]="FAIL",t[t.SHORTEST=1]="SHORTEST",t[t.LONGEST=2]="LONGEST"}(P1||(P1={}));class $1 extends v1{constructor(t,e=P1.FAIL){super(),this.iterators=t,this.mismatchMode=e,this.count=0,this.currentPromise=null}summary(){return"{TODO: fill in upstream of zip summaries} -> Zip"}async nextState(t){await t;let e=0,n=0;const i=await f1(this.iterators,(function(t){if(t instanceof v1){return{value:t.next().then((t=>(e++,t.done&&n++,t.value))),recurse:!1}}return{value:null,recurse:!0}}));if(e===n)return{value:null,done:!0};if(n>0)switch(this.mismatchMode){case P1.FAIL:throw new Error(`Zipped streams should have the same length. Mismatched at element ${this.count}.`);case P1.SHORTEST:return{value:null,done:!0};case P1.LONGEST:}return this.count++,{value:i,done:!1}}async next(){return this.currentPromise=this.nextState(this.currentPromise),this.currentPromise}}class B1 extends v1{constructor(t,e){super(),this.upstream=t,this.bufferSize=e,this.buffer=new T1(e)}summary(){return`${this.upstream.summary()} -> Prefetch`}refill(){for(;!this.buffer.isFull();){const t=this.upstream.next();this.buffer.push(t)}}next(){return this.refill(),this.buffer.shift()}}class V1 extends B1{constructor(t,e,n){super(t,e),this.upstream=t,this.windowSize=e,this.upstreamExhausted=!1,this.random=CV.alea(n||rk().toString()),this.lastRead=Promise.resolve({value:null,done:!1})}async next(){return this.lastRead=this.lastRead.then((()=>this.serialNext())),this.lastRead}randomInt(t){return Math.floor(this.random()*t)}chooseIndex(){return this.randomInt(this.buffer.length())}async serialNext(){for(this.upstreamExhausted||this.refill();!this.buffer.isEmpty();){const t=this.chooseIndex(),e=await this.buffer.shuffleExcise(t);if(!e.done)return this.refill(),e;this.upstreamExhausted=!0}return{value:null,done:!0}}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +class U1{constructor(){this.size=null}batch(t,e=!0){const n=this;let i;return _O(t>0,(()=>`batchSize needs to be positive, but it is\n ${t}`)),i=this.size===1/0||null==this.size?this.size:e?Math.ceil(this.size/t):Math.floor(this.size/t),Y1((async()=>(await n.iterator()).columnMajorBatch(t,e,W1)),i)}concatenate(t){const e=this;let n;return n=this.size===1/0||t.size===1/0?1/0:null!=this.size&&null!=t.size?this.size+t.size:null,Y1((async()=>(await e.iterator()).concatenate(await t.iterator())),n)}filter(t){const e=this;let n;return n=this.size===1/0?1/0:null,Y1((async()=>(await e.iterator()).filter((e=>ED((()=>t(e)))))),n)}async forEachAsync(t){return(await this.iterator()).forEachAsync(t)}map(t){const e=this;return Y1((async()=>(await e.iterator()).map((e=>ED((()=>t(e)))))),this.size)}mapAsync(t){const e=this;return Y1((async()=>(await e.iterator()).mapAsync(t)),this.size)}prefetch(t){if(null==t)throw new RangeError("`Dataset.prefetch()` requires bufferSize to be specified.");const e=this;return Y1((async()=>(await e.iterator()).prefetch(t)),this.size)}repeat(t){const e=this;let n;return n=null!=this.size&&t>0?this.size*t:0===t?0:null!=this.size&&(void 0===t||t<0)?1/0:null,Y1((async()=>b1(E1((async()=>({value:await e.iterator(),done:!1}))).take(t))),n)}skip(t){const e=this;let n;return n=null!=this.size&&t>=0&&this.size>=t?this.size-t:null!=this.size&&(this.size(await e.iterator()).skip(t)),n)}shuffle(t,e,n=!0){if(null==t||t<0)throw null==this.size?new RangeError("`Dataset.shuffle()` requires bufferSize to be specified."):new RangeError(`\`Dataset.shuffle()\` requires bufferSize to be specified. If your data fits in main memory (for regular JS objects), and/or GPU memory (for \`tf.Tensor\`s), consider setting bufferSize to the dataset size (${this.size} elements)`);const i=this,s=CV.alea(e||rk().toString());return Y1((async()=>{let e=s.int32();return n&&(e+=s.int32()),(await i.iterator()).shuffle(t,e.toString())}),this.size)}take(t){const e=this;let n;return n=null!=this.size&&this.size>t?t:null!=this.size&&this.size<=t?this.size:null,Y1((async()=>(await e.iterator()).take(t)),n)}async toArray(){if(this.size===1/0)throw new Error("Can not convert infinite data stream to array.");return(await this.iterator()).toArray()}async toArrayForTest(){if(this.size===1/0)throw new Error("Can not convert infinite data stream to array.");return(await this.iterator()).toArrayForTest()}}function Y1(t,e=null){return new class extends U1{constructor(){super(...arguments),this.size=e}async iterator(){return t()}}}function G1(t){return Y1((async()=>I1(t)),t.length)}function H1(t){if(!m1(t))throw new Error("The argument to zip() must be an object or array.");let e;if(Array.isArray(t))for(let n=0;nfunction(t,e=P1.FAIL){return new $1(t,e)}(await f1(t,(t=>{if(t instanceof U1)return{value:t.iterator(),recurse:!1};if(m1(t))return{value:null,recurse:!0};throw new Error("Leaves of the structure passed to zip() must be Datasets, not primitives.")})),P1.SHORTEST)),e)}function W1(t){if(null===t)return null;const e=t[0];if(null==(n=e)||null===(i=n)||"object"!=typeof i&&"function"!=typeof i||Array.isArray(n)||"object"==typeof n&&n instanceof xk||uk(n)){return{value:function(t){if(0===t.length)throw new Error("Can't make a batch of zero elements.");return t[0]instanceof xk?mU(t):hD(t)}(t),recurse:!1}}var n,i;return{value:null,recurse:!0}}U1.MAX_BUFFER_SIZE=1e4; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +class z1 extends U1{constructor(t){super(),this.input=t}async iterator(){return(await this.input.iterator()).decodeUTF8().split("\n").map((t=>(t.endsWith("\r")&&(t=t.slice(0,-1)),t)))}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +const X1='"',j1=Symbol("out"),q1=Symbol("field"),K1=Symbol("quote"),Q1=Symbol("quoteafterquote"),J1=Symbol("quoteinquote");class Z1 extends U1{async columnNames(){return this.columnNamesValidated||await this.setColumnNames(),this.configuredColumnsOnly?Object.keys(this.columnConfigs):this.fullColumnNames}async setColumnNames(){const t=await this.maybeReadHeaderLine();if(!this.fullColumnNames&&!t)throw new Error("Column names must be provided if there is no header line.");this.fullColumnNames&&t&&_O(t.length===this.fullColumnNames.length,(()=>"The length of provided columnNames ("+this.fullColumnNames.length.toString()+") does not match the length of the header line read from file ("+t.length.toString()+").")),this.fullColumnNames||(this.fullColumnNames=t);const e=this.fullColumnNames.reduce(((t,e)=>(t[e]=t[e]+1||1,t)),{}),n=Object.keys(e).filter((t=>e[t]>1));if(_O(0===n.length,(()=>"Duplicate column names found: "+n.toString())),this.columnConfigs)for(const t of Object.keys(this.columnConfigs)){if(-1===this.fullColumnNames.indexOf(t))throw new Error('The key "'+t+'" provided in columnConfigs does not match any of the column names ('+this.fullColumnNames.toString()+").")}this.columnNamesValidated=!0}async maybeReadHeaderLine(){if(this.hasHeader){const t=await this.base.iterator(),e=await t.next();if(e.done)throw new Error("No data was found for CSV parsing.");const n=e.value;return this.parseRow(n,!1)}return null}constructor(t,e){super(),this.input=t,this.hasHeader=!0,this.fullColumnNames=null,this.columnNamesValidated=!1,this.columnConfigs=null,this.configuredColumnsOnly=!1,this.delimiter=",",this.delimWhitespace=!1,this.base=new z1(t),e||(e={}),this.hasHeader=!1!==e.hasHeader,this.fullColumnNames=e.columnNames,this.columnConfigs=e.columnConfigs,this.configuredColumnsOnly=e.configuredColumnsOnly,e.delimWhitespace?(_O(null==e.delimiter,(()=>"Delimiter should not be provided when delimWhitespace is true.")),this.delimWhitespace=!0,this.delimiter=" "):this.delimiter=e.delimiter?e.delimiter:","}async iterator(){this.columnNamesValidated||await this.setColumnNames();let t=await this.base.iterator();return this.hasHeader&&(t=t.skip(1)),t.map((t=>this.makeDataElement(t)))}makeDataElement(t){const e=this.parseRow(t),n={},i={};for(let s=0;s14||!Number.isInteger(e))throw new Error(`Invalid fftSize: it must be a power of 2 between 2 to 4 and 2 to 14, but got ${this.fftSize}`);if(this.numFrames=t.numFramesPerSpectrogram||43,this.sampleRateHz=t.sampleRateHz,this.columnTruncateLength=t.columnTruncateLength||this.fftSize,this.audioTrackConstraints=t.audioTrackConstraints,this.smoothingTimeConstant=t.smoothingTimeConstant||0,this.includeSpectrogram=!1!==t.includeSpectrogram,this.includeWaveform=!0===t.includeWaveform,!this.includeSpectrogram&&!this.includeWaveform)throw new Error("Both includeSpectrogram and includeWaveform are false. At least one type of data should be returned.")}summary(){return"microphone"}static async create(t={}){if(!aA().get("IS_BROWSER"))throw new Error("microphone API is only supported in browser environment.");const e=new t2(t);return await e.start(),e}async start(){try{this.stream=await navigator.mediaDevices.getUserMedia({audio:null==this.audioTrackConstraints||this.audioTrackConstraints,video:!1})}catch(t){throw new Error(`Error thrown while initializing video stream: ${t.message}`)}if(!this.stream)throw new Error("Could not obtain audio from microphone.");const t=window.AudioContext||window.webkitAudioContext;if(this.audioContext=new t,this.sampleRateHz){if(this.audioContext.sampleRate!==this.sampleRateHz)throw new Error(`Mismatch in sampling rate: Expected: ${this.sampleRateHz}; Actual: ${this.audioContext.sampleRate}`)}else this.sampleRateHz=this.audioContext.sampleRate;const e=this.audioContext.createMediaStreamSource(this.stream);this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2*this.fftSize,this.analyser.smoothingTimeConstant=this.smoothingTimeConstant,e.connect(this.analyser),this.freqData=new Float32Array(this.fftSize),this.timeData=new Float32Array(this.fftSize)}async next(){if(this.isClosed)return{value:null,done:!0};let t,e;const n=await this.getAudioData();if(this.includeSpectrogram){const e=this.flattenQueue(n.freqDataQueue);t=this.getTensorFromAudioDataArray(e,[this.numFrames,this.columnTruncateLength,1])}if(this.includeWaveform){const t=this.flattenQueue(n.timeDataQueue);e=this.getTensorFromAudioDataArray(t,[this.numFrames*this.fftSize,1])}return{value:{spectrogram:t,waveform:e},done:!1}}async capture(){return(await this.next()).value}async getAudioData(){const t=[],e=[];let n=0;return new Promise((i=>{const s=setInterval((()=>{this.includeSpectrogram&&(this.analyser.getFloatFrequencyData(this.freqData),this.freqData[0]===-1/0&&i({freqDataQueue:t,timeDataQueue:e}),t.push(this.freqData.slice(0,this.columnTruncateLength))),this.includeWaveform&&(this.analyser.getFloatTimeDomainData(this.timeData),e.push(this.timeData.slice())),++n===this.numFrames&&(clearInterval(s),i({freqDataQueue:t,timeDataQueue:e}))}),this.fftSize/this.sampleRateHz*1e3)}))}stop(){this.isClosed||(this.isClosed=!0,this.analyser.disconnect(),this.audioContext.close(),null!=this.stream&&this.stream.getTracks().length>0&&this.stream.getTracks()[0].stop())}toArray(){throw new Error("Can not convert infinite audio stream to array.")}getSampleRate(){return this.sampleRateHz}flattenQueue(t){const e=t[0].length,n=new Float32Array(t.length*e);return t.forEach(((t,i)=>n.set(t,i*e))),n}getTensorFromAudioDataArray(t,e){const n=new Float32Array(IO(e));return n.set(t,n.length-t.length),hD(n,e)}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +class e2 extends v1{constructor(t,e){if(super(),this.webcamVideoElement=t,this.webcamConfig=e,this.isClosed=!0,this.resize=!1,this.needToResize())if(this.resize=!0,this.cropSize=[this.webcamConfig.resizeHeight,this.webcamConfig.resizeWidth],this.cropBoxInd=yU([0],"int32"),this.webcamConfig.centerCrop){const t=1*this.webcamConfig.resizeWidth/this.webcamVideoElement.width,e=1*this.webcamConfig.resizeHeight/this.webcamVideoElement.height,n=(1-t)/2,i=(1-e)/2,s=n+t,r=e+i;this.cropBox=IU([i,n,r,s],[1,4])}else this.cropBox=IU([0,0,1,1],[1,4])}summary(){return"webcam"}static async create(t,e={}){if(!aA().get("IS_BROWSER"))throw new Error("tf.data.webcam is only supported in browser environment.");if(!t){if(t=document.createElement("video"),!e.resizeWidth||!e.resizeHeight)throw new Error("Please provide webcam video element, or resizeWidth and resizeHeight to create a hidden video element.");t.width=e.resizeWidth,t.height=e.resizeHeight}const n=new e2(t,e);return await n.start(),n}async start(){this.webcamConfig.facingMode&&_O("user"===this.webcamConfig.facingMode||"environment"===this.webcamConfig.facingMode,(()=>`Invalid webcam facing mode: ${this.webcamConfig.facingMode}. Please provide 'user' or 'environment'`));try{this.stream=await navigator.mediaDevices.getUserMedia({video:{deviceId:this.webcamConfig.deviceId,facingMode:this.webcamConfig.facingMode?this.webcamConfig.facingMode:"user",width:this.webcamVideoElement.width,height:this.webcamVideoElement.height}})}catch(t){throw t.message=`Error thrown while initializing video stream: ${t.message}`,t}if(!this.stream)throw new Error("Could not obtain video from webcam.");try{this.webcamVideoElement.srcObject=this.stream}catch(t){console.log(t),this.webcamVideoElement.src=window.URL.createObjectURL(this.stream)}return this.webcamVideoElement.play(),this.isClosed=!1,new Promise((t=>{this.webcamVideoElement.onloadedmetadata=()=>{t()}}))}async next(){if(this.isClosed)return{value:null,done:!0};let t;try{t=aP(this.webcamVideoElement)}catch(t){throw new Error(`Error thrown converting video to pixels: ${JSON.stringify(t)}`)}if(!this.resize)return{value:t,done:!1};try{return{value:this.cropAndResizeFrame(t),done:!1}}catch(t){throw new Error(`Error thrown cropping the video: ${t.message}`)}finally{t.dispose()}}needToResize(){return!(!this.webcamConfig.resizeWidth||!this.webcamConfig.resizeHeight||this.webcamVideoElement.width===this.webcamConfig.resizeWidth&&this.webcamVideoElement.height===this.webcamConfig.resizeHeight)}cropAndResizeFrame(t){return ED((()=>{const e=RB(PL(t,"float32"),0);let n;n=JY.cropAndResize(e,this.cropBox,this.cropBoxInd,this.cropSize,"bilinear");const i=n.shape;return y$(n,i.slice(1))}))}async capture(){return(await this.next()).value}stop(){this.stream.getTracks().forEach((t=>t.stop()));try{this.webcamVideoElement.srcObject=null}catch(t){console.log(t),this.webcamVideoElement.src=null}this.isClosed=!0}toArray(){throw new Error("Can not convert infinite video stream to array.")}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +class n2{} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +class i2 extends v1{split(t){return new s2(this,t)}}class s2 extends i2{constructor(t,e){super(),this.upstream=t,this.impl=new r2(t,e)}summary(){return this.impl.summary()}async next(){return this.impl.next()}}class r2 extends D1{constructor(t,e){super(),this.upstream=t,this.separator=e,this.carryover=""}summary(){return`${this.upstream.summary()} -> Split('${this.separator}')`}async pump(){const t=await this.upstream.next();if(t.done)return""!==this.carryover&&(this.outputQueue.push(this.carryover),this.carryover="",!0);const e=t.value.split(this.separator);e[0]=this.carryover+e[0];for(const t of e.slice(0,-1))this.outputQueue.push(t);return this.carryover=e[e.length-1],!0}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +class a2 extends v1{decodeUTF8(){return new o2(this)}}class o2 extends i2{constructor(t){super(),this.upstream=t,this.impl=new l2(t)}summary(){return this.impl.summary()}async next(){return this.impl.next()}}class l2 extends D1{constructor(t){if(super(),this.upstream=t,aA().get("IS_BROWSER"))this.decoder=new TextDecoder("utf-8");else{const{StringDecoder:t}=__webpack_require__(4530);this.decoder=new t("utf8")}}summary(){return`${this.upstream.summary()} -> Utf8`}async pump(){const t=await this.upstream.next();let e,n;return!t.done&&(e=t.value,n=aA().get("IS_BROWSER")?this.decoder.decode(e,{stream:!0}):this.decoder.write(Buffer.from(e.buffer)),this.outputQueue.push(n),!0)}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +class u2 extends a2{constructor(t,e={}){super(),this.file=t,this.options=e,_O(t instanceof Uint8Array||!!aA().get("IS_BROWSER")&&(t instanceof File||t instanceof Blob),(()=>"FileChunkIterator only supports File, Blob and Uint8Array right now.")),this.offset=e.offset||0,this.chunkSize=e.chunkSize||1048576}summary(){return`FileChunks ${this.file}`}async next(){if(this.offset>=(this.file instanceof Uint8Array?this.file.byteLength:this.file.size))return{value:null,done:!0};const t=new Promise(((t,e)=>{const n=this.offset+this.chunkSize;if(this.file instanceof Uint8Array)t(new Uint8Array(this.file.slice(this.offset,n)));else{const i=new FileReader;i.onload=n=>{let s=i.result;if(s instanceof ArrayBuffer&&(s=new Uint8Array(s)),!(s instanceof Uint8Array))return e(new TypeError("FileReader returned unknown type."));t(s)},i.onabort=t=>e(new Error("Aborted")),i.onerror=t=>e(new Error(t.type));const s=this.file.slice(this.offset,n);i.readAsArrayBuffer(s)}this.offset=n}));return{value:await t,done:!1}}}const h2=t=>({method:t.method,headers:t.headers,body:t.body,mode:t.mode,credentials:t.credentials,cache:t.cache,redirect:t.redirect,referrer:t.referrer,integrity:t.integrity}); +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +function p2(t){return"string"==typeof t&&"file://"===t.slice(0,7)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +class c2 extends n2{constructor(t,e={}){super(),this.input=t,this.options=e}async iterator(){if(p2(this.input)&&aA().get("IS_NODE")){const t=__webpack_require__(8108);this.input=t.readFileSync(this.input.slice(7))}return new u2(this.input,this.options)}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +class d2 extends n2{constructor(t,e={}){super(),this.url=t,this.fileOptions=e}async iterator(){return p2(this.url)?new c2(this.url,this.fileOptions).iterator(): +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +async function(t,e={},n){let i,s;"string"==typeof t?i=t:(i=t.url,s=h2(t));const r=await(n||ak)(i,s);if(r.ok){const t=new Uint8Array(await r.arrayBuffer());return new u2(t,e)}throw new Error(r.statusText)}(this.url,this.fileOptions)}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============================================================================= + */ +function f2(t,e={}){return new Z1(new d2(t),e)}function m2(t){const e=E1(t);return Y1((async()=>e))}function g2(t){return Y1((async()=>{const e=await t();return E1((()=>e.next()))}))}async function _2(t,e){return e2.create(t,e)}async function T2(t){return t2.create(t)} +/** @license See the LICENSE file. */ +const y2="4.22.0"; +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function I2(t,e){Array.isArray(t)||(t=[t]),t.forEach((t=>{null!=t&&_O("complex64"!==t.dtype,(()=>`${e} does not support complex64 tensors in the CPU backend.`))}))} +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const E2=NU;class b2 extends oO{nextDataId(){return b2.nextDataId++}constructor(){super(),this.blockSize=48,this.firstUse=!0,this.data=new aO(this,TD())}write(t,e,n){this.firstUse&&(this.firstUse=!1,aA().get("IS_NODE")&&AN("\n============================\nHi, looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, visit https://github.com/tensorflow/tfjs-node for more details. \n============================"));const i={id:this.nextDataId()};return this.data.set(i,{values:t,dtype:n,refCount:1}),i}makeTensorInfo(t,e,n){let i;if("string"===e&&null!=n&&n.length>0&&VO(n[0])){const s=n.map((t=>ok(t)));i=this.write(s,t,e)}else i=this.write(n,t,e);return{dataId:i,shape:t,dtype:e}}refCount(t){if(this.data.has(t)){return this.data.get(t).refCount}return 0}incRef(t){this.data.get(t).refCount++}decRef(t){if(this.data.has(t)){this.data.get(t).refCount--}}move(t,e,n,i,s){this.data.set(t,{values:e,dtype:i,refCount:s})}numDataIds(){return this.data.numDataIds()}async read(t){return this.readSync(t)}readSync(t){const{dtype:e,complexTensorInfos:n}=this.data.get(t);if("complex64"===e){return AG(this.readSync(n.real.dataId),this.readSync(n.imag.dataId))}return qO(this.data.get(t).values,e)}bufferSync(t){const e=this.readSync(t.dataId);if("string"===t.dtype)try{const n=e.map((t=>lk(t)));return FL(t.shape,t.dtype,n)}catch(t){throw new Error("Failed to decode encoded string bytes into utf-8")}return FL(t.shape,t.dtype,e)}makeOutput(t,e,n){return TD().makeTensorFromTensorInfo(this.makeTensorInfo(e,n,t),this)}disposeData(t,e=!1){if(this.data.has(t)){if(this.data.get(t).refCount--,!e&&this.data.get(t).refCount>0)return!1;const{complexTensorInfos:n}=this.data.get(t);null!=n&&(this.disposeData(n.real.dataId,!0),this.disposeData(n.imag.dataId,!0)),this.data.delete(t)}return!0}disposeIntermediateTensorInfo(t){this.disposeData(t.dataId)}async time(t){const e=rk();t();return{kernelMs:rk()-e}}memory(){return{unreliable:!0,reasons:["The reported memory is an upper bound. Due to automatic garbage collection, the true allocated memory may be less."]}}where(t){I2([t],"where");const e=this.readSync(t.dataId);return E2(t.shape,e)}dispose(){}floatPrecision(){return 32}epsilon(){return super.epsilon()}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function v2(t){const e=new Float32Array(t.length);for(let n=0;n{const{x:e}=t.inputs,n=t.backend;I2(e,"abs");let i=new Float32Array(IO(e.shape));return i=v2(n.data.get(e.dataId).values),n.makeOutput(i,e.shape,e.dtype)}}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function S2(t){return(e,n,i,s,r)=>{const a=_F(e,n),o=a.length,l=zO(a),u=kO(r,IO(a)),h=e.length,p=n.length,c=zO(e),d=zO(n),f=mF(e,a),m=mF(n,a);if(f.length+m.length===0)for(let e=0;er[t]=0));const a=tA(r,h,c),g=n.slice(-p);m.forEach((t=>g[t]=0));const _=tA(g,p,d);u[e]=t(i[a],s[_])}return[u,a]}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function x2(t){const{inputs:e,backend:n}=t,{real:i,imag:s}=e,r=n.data.get(i.dataId).values,a=n.data.get(s.dataId).values,o=n.makeTensorInfo(i.shape,"complex64");return n.data.get(o.dataId).complexTensorInfos={real:n.makeTensorInfo(i.shape,"float32",r),imag:n.makeTensorInfo(s.shape,"float32",a)},o}const R2={kernelName:$A,backendName:"cpu",kernelFunc:x2}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function O2(t,e,n="float32"){if("complex64"===n){return x2({inputs:{real:O2(t,e,"float32"),imag:O2(t,e,"float32")},backend:t})}const i=QO(IO(e),n);return t.makeTensorInfo(e,n,i)} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function A2(t){const{inputs:e,backend:n}=t,{x:i}=e;return n.incRef(i.dataId),{dataId:i.dataId,shape:i.shape,dtype:i.dtype}}const M2={kernelName:RM,backendName:"cpu",kernelFunc:A2}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function C2(t){const{inputs:e,backend:n}=t,{input:i}=e,s=n.data.get(i.dataId).complexTensorInfos.real,r=n.data.get(s.dataId).values;return n.makeTensorInfo(s.shape,s.dtype,r)}const N2={kernelName:SC,backendName:"cpu",kernelFunc:C2}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function k2(t,e,n,i){if("int32"===i){return[e,"int32",Int32Array.from(t)]}if("bool"===i){const i=sk([0],n),[s,r]=S2(((t,e)=>t!==e?1:0))(e,[],t,i,"bool");return[r,"bool",s]}throw new Error(`Error in Cast: failed to cast ${n} to ${i}`)}function D2(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{dtype:r}=i;if("complex64"===r){if("complex64"===s.dtype)return A2({inputs:{x:s},backend:n});const t=O2(n,s.shape,s.dtype),e=D2({inputs:{x:s},backend:n,attrs:{dtype:"float32"}}),i=x2({inputs:{real:e,imag:t},backend:n});return n.disposeIntermediateTensorInfo(t),n.disposeIntermediateTensorInfo(e),i}if("complex64"===s.dtype){const t=C2({inputs:{input:s},backend:n}),e=D2({inputs:{x:t},backend:n,attrs:{dtype:r}});return n.disposeIntermediateTensorInfo(t),e}if(!PO(s.dtype,r)){const t=A2({inputs:{x:s},backend:n});return{dataId:t.dataId,shape:t.shape,dtype:r}}const a=n.data.get(s.dataId).values,[o,l,u]=k2(a,s.shape,s.dtype,r);return n.makeTensorInfo(o,l,u)}const L2={kernelName:LA,backendName:"cpu",kernelFunc:D2}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function F2(t,e,n,i){return null==n?({inputs:n,backend:s})=>{const{a:r,b:a}=n,o=s;I2([r,a],t);const l=o.data.get(r.dataId).values,u=o.data.get(a.dataId).values,h="string"===r.dtype?uH(l):l,p="string"===r.dtype?uH(u):u,c=i||r.dtype,[d,f]=e(r.shape,a.shape,h,p,c);return o.makeTensorInfo(f,c,d)}:({inputs:t,backend:s})=>{const{a:r,b:a}=t,o=s;if("complex64"===r.dtype||"complex64"===a.dtype){const t=D2({inputs:{x:r},backend:o,attrs:{dtype:"complex64"}}),e=o.data.get(t.dataId),i=e.complexTensorInfos.real,s=e.complexTensorInfos.imag,l=o.data.get(i.dataId).values,u=o.data.get(s.dataId).values,h=D2({inputs:{x:a},backend:o,attrs:{dtype:"complex64"}}),p=o.data.get(h.dataId),c=p.complexTensorInfos.real,d=p.complexTensorInfos.imag,f=o.data.get(c.dataId).values,m=o.data.get(d.dataId).values,[g,_,T]=n(r.shape,a.shape,l,u,f,m),y=o.makeTensorInfo(T,"float32",g),I=o.makeTensorInfo(T,"float32",_),E=x2({inputs:{real:y,imag:I},backend:o});return o.disposeIntermediateTensorInfo(t),o.disposeIntermediateTensorInfo(h),o.disposeIntermediateTensorInfo(y),o.disposeIntermediateTensorInfo(I),E}{const t=o.data.get(r.dataId).values,n=o.data.get(a.dataId).values,s=i||r.dtype,[l,u]=e(r.shape,a.shape,t,n,s);return o.makeTensorInfo(u,s,l)}}}function P2(t){return(e,n,i,s,r,a)=>{const o=_F(e,n),l=IO(o),u=o.length,h=zO(o),p=kO("float32",l),c=kO("float32",l),d=mF(e,o),f=mF(n,o),m=AG(i,s),g=AG(r,a),_=e.length,T=zO(e),y=n.length,I=zO(n);if(d.length+f.length===0)for(let e=0;ei[t]=0));const s=tA(i,_,T),r=n.slice(-y);f.forEach((t=>r[t]=0));const a=tA(r,y,I),o=t(m[2*s],m[2*s+1],g[2*a],g[2*a+1]);p[e]=o.real,c[e]=o.imag}return[p,c,o]}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const $2=S2(((t,e)=>t+e)),B2=P2(((t,e,n,i)=>({real:t+n,imag:e+i}))),V2=F2(fA,$2,B2),U2={kernelName:fA,backendName:"cpu",kernelFunc:V2}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Y2(t,e,n,i,s){const r=IO(i),a=QO(s,n);for(let n=0;n=s||(a[i]+=r>0?e[n]:1)}return a}function G2(t,e,n,i=!1){const s=t.shape[0],r=t.shape[1],a=FL([s,n],e.dtype);for(let o=0;o=n||(i?a.set(1,o,r):e.size>0?a.set(a.get(o,r)+e.get(o,s),o,r):a.set(a.get(o,r)+1,o,r))}return a} +/** + * @license + * Copyright 2023 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const H2=S2(((t,e)=>t&e)),W2=F2(NA,H2),z2={kernelName:NA,backendName:"cpu",kernelFunc:W2}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function X2(t){return(e,n,i)=>{const s=DO(n,e.length);for(let n=0;n{const{x:a}=i;I2(a,t);const o=r,l=o.data.get(a.dataId).values;let u;if("string"===a.dtype){if(!Array.isArray(l))throw new Error("String tensor's value was not an instance of Array");u=uH(l)}else u=l;const h=n||a.dtype,p=e(u,h,s);return o.makeTensorInfo(a.shape,h,p)}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const K2=X2((t=>Math.ceil(t))),Q2=q2(FA,K2),J2={kernelName:FA,backendName:"cpu",kernelFunc:Q2}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Z2(t,e,n,i){const s=DO(n,IO(e));if(i&&"string"!==n){let e=0;t.forEach((t=>{const n=IO(t.shape);s.set(t.vals,e),e+=n}))}else{let i=0;t.forEach((t=>{const r="string"===n?uH(t.vals):t.vals;let a=0;for(let n=0;nt===e?1:0)),e3=F2(dM,t3,null,"bool"),n3={kernelName:dM,backendName:"cpu",kernelFunc:e3},i3=X2((t=>Math.exp(t))),s3=q2(fM,i3,"float32"),r3={kernelName:fM,backendName:"cpu",kernelFunc:s3},a3=X2((t=>Math.expm1(t))),o3=q2(gM,a3),l3={kernelName:gM,backendName:"cpu",kernelFunc:o3},u3=X2((t=>Math.floor(t))),h3=q2(IM,u3),p3={kernelName:IM,backendName:"cpu",kernelFunc:h3},c3=S2(((t,e)=>Math.floor(t/e))),d3=F2(EM,c3,null,"int32"),f3={kernelName:EM,backendName:"cpu",kernelFunc:d3}; +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function m3(t,e,n,i,s,r,a,o,l){const u=FL([i,r],n);for(let n=0;n=l/r)throw new Error(`Invalid indices: ${i} does not index into ${o}`);for(let t=0;tt>e?1:0)),T3=F2(SM,_3,null,"bool"),y3={kernelName:SM,backendName:"cpu",kernelFunc:T3},I3=S2(((t,e)=>t>=e?1:0)),E3=F2(xM,I3,null,"bool"),b3={kernelName:xM,backendName:"cpu",kernelFunc:E3},v3=S2(((t,e)=>tt<=e?1:0)),R3=F2(LM,x3,null,"bool"),O3={kernelName:LM,backendName:"cpu",kernelFunc:R3}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function A3(t,e,n){const i=(e-t)/(n-1),s=QO(n,"float32");s[0]=t;for(let t=1;tMath.log(t))),C3=q2(PM,M3),N3={kernelName:PM,backendName:"cpu",kernelFunc:C3}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function k3(t,e,n,i){const s=kO(i,IO(n));for(let n=0;nr)&&(r=e)}s[n]=r}return s} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const D3=S2(((t,e)=>Math.max(t,e))),L3=F2(qM,D3),F3={kernelName:qM,backendName:"cpu",kernelFunc:L3},P3=S2(((t,e)=>Math.min(t,e))),$3=F2(iC,P3),B3={kernelName:iC,backendName:"cpu",kernelFunc:$3},V3=S2(((t,e)=>t*e)),U3=P2(((t,e,n,i)=>({real:t*n-e*i,imag:t*i+e*n}))),Y3=F2(oC,V3,U3),G3={kernelName:oC,backendName:"cpu",kernelFunc:Y3}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function H3(t,e,n){const i=ik(-1,n);return V3([],e,i,t,n)}const W3={kernelName:lC,backendName:"cpu",kernelFunc:function(t){const{inputs:e,backend:n}=t,{x:i}=e;I2(i,"neg");const s=n.data.get(i.dataId).values,[r,a]=H3(s,i.shape,i.dtype);return n.makeTensorInfo(a,i.dtype,r)}},z3=S2(((t,e)=>t!==e?1:0)),X3=F2(uC,z3,null,"bool"),j3={kernelName:uC,backendName:"cpu",kernelFunc:X3}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function q3(t,e,n,i,s){const r=e.length,a=IO(e),o=zO(e),l=zO(s),u=kO(n,IO(s));for(let e=0;en.disposeIntermediateTensorInfo(t))),n.makeTensorInfo(_,g,f)}};function t4(t,e,n,i){const s=[];let r=0;const a=e.length-1+n.length,o=new Array(a).fill(null).map((()=>[0]));!function(t,e){for(let n=0;ns)throw new Error("Ragged splits must not point past values");for(let t=1;ti[t])throw new Error("Ragged splits must be sorted in ascending order")}}(n,i);let l=1;for(let t=0;t=0){const t=o[s],e=t[t.length-1]-i[a];for(let t=a;t{if(t<0||t>=n){const s=eA(i,e.length,zO(e)).join(",");throw new Error(`indices[${s}] = ${t} is not in [0, ${n})`)}}))}(r,a,e[0][0]-1),0===i.length)throw new Error("params.rank must be nonzero");const l=i[0],{outSplits:u,valueSlices:h,numValues:p}=t4(r,a,t,l),c=function(t){const e=[];for(let n=0;ni[e]=t))}return e}(u),d=n4(n,i,s,h,p);return[c,d[0],d[1]]} +/** + * @license + * Copyright 2022 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const s4=2147483647;function r4(t,e,n,i,s,r,a){if(e.length>1)throw new Error("starts must be a scalar or vector");if(s.length>1)throw new Error("limits must be a scalar or vector");if(a.length>1)throw new Error("deltas must be a scalar or vector");const o=0===e.length,l=0===s.length,u=0===a.length,h=[];o||h.push(e[0]),l||h.push(s[0]),u||h.push(a[0]);for(let t=1;t0&&sn)h=0;else if(h=Math.ceil(Math.abs((s-n)/a)),h>s4)throw new Error(`Requires ((limit - start) / delta) <= ${s4}`);c[e+1]=c[e]+h}const d=DO(n,c[p]);let f=0;for(let e=0;en&&(n=e)}return n}static getMaxWidthValueRowID(t){const e=t.length;if(0===e)return 0;let n=0,i=t[0],s=0;for(let r=1;r"Final length of result must be equal to firstDimension.")),s}calculateOutputIndexRowSplit(t,e,n,i){const s=t.length,r=[];for(let a=0;a0&&r.length!==t[s-1])throw new Error("Invalid row split size.");return r}calculateOutputIndexValueRowID(t,e,n,i){const s=t.length,r=[];if(0===s)return[];let a=0,o=t[0];if(o>=e.length)throw new Error(`Got currentValueRowId=${o}, which is not less than ${e.length}`);let l=e[o];r.push(l);for(let u=1;u=0&&(++a,a=e.length)throw new Error(`Got nextValueRowId=${s} which is not less than ${e.length}`);l=e[s]}r.push(l)}if(r.length!==t.length)throw new Error("Invalid row ids.");return r}calculateOutputIndex(t,e,n,i){const s=this.getRowPartitionTensor(t),r=this.getRowPartitionTypeByDimension(t);switch(r){case a4.VALUE_ROWIDS:return this.calculateOutputIndexValueRowID(s,e,n,i);case a4.ROW_SPLITS:if(s.length-1>e.length)throw new Error(`Row partition size is greater than output size: ${s.length-1} > ${e.length}`);return this.calculateOutputIndexRowSplit(s,e,n,i);default:throw new Error(`Unsupported partition type: ${a4[r]}`)}}getFirstDimensionSize(){const t=this.rowPartitionValues[0];if(0===this.rowPartitionTypes.length)throw new Error("No row_partition_types given.");const e=this.rowPartitionTypes[0];switch(e){case a4.FIRST_DIM_SIZE:return t[0];case a4.VALUE_ROWIDS:throw new Error("Cannot handle VALUE_ROWIDS in first dimension.");case a4.ROW_SPLITS:return this.rowPartitionValuesShapes[0][0]-1;default:throw new Error(`Cannot handle type ${a4[e]}`)}}compute(){if(this.rowPartitionValues[0].length<=0)throw new Error("Invalid first partition input. Tensor requires at least one element.");const t=this.getFirstDimensionSize(),e=this.calculateOutputSize(t),n=new Array(this.raggedRank+1);n[n.length-1]=1;for(let t=n.length-2;t>=0;--t)n[t]=n[t+1]*e[t+1];const i=u4(e,!1),s=DO(this.valuesDType,IO(i));if(n[0]*e[0]>0){let r=this.calculateFirstParentOutputIndex(t,n[0],e[0]);for(let t=1;t<=this.raggedRank;++t){r=this.calculateOutputIndex(t-1,r,n[t],e[t])}this.setOutput(this.raggedRank,r,s,i)}return[i,s]}setOutput(t,e,n,i){if(0===n.length)return;const s=this.values,r=n;let a=i.slice();a=a.slice(t+1);const o=IO(a),l=e.length;let u=this.defaultValue;if(u.length!==o&&1!==u.length){const t=this.defaultValueShape;ED((()=>{const e=y$(u,t),n=L$(e,a);u=n.dataSync()}))}let h=0,p=0,c=0;for(let t=0;t<=l;++t){let i=t=l){const t=n.length;i=Math.floor(t/o)}if(i>c)if(1===this.defaultValue.length)r.subarray(c*o,i*o).fill(this.defaultValue[0]),c=i;else for(;i>c;){l4(r.slice(c*o),u,o),++c}i<0?(h=t+1,p=c):(h=t,p=c,c=p+1)}else++c}}}function l4(t,e,n){for(let i=0;i= 0`);if(i<-1)throw new Error(`Dimension ${i} must be >= -1`);i=-1}n.push(i)}return n}function h4(t,e,n,i,s,r,a,o,l,u){return new o4(t,e,n,i,s,r,a,o,l,u).compute()} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function p4(t,e,n,i){if(t===e||t1)return QO(0,i);const s=QO(Math.abs(Math.ceil((e-t)/n)),i);e1/Math.sqrt(t))),d4=q2(FC,c4),f4={kernelName:FC,backendName:"cpu",kernelFunc:d4}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function m4(t,e,n,i,s,r,a,o,l,u){const h=[i/s,s],p=t.values,c=e.values;if(0===i)return FL(n,e.dtype);const d=l instanceof bk?l:FL(h,e.dtype);"string"==typeof l||"number"==typeof l?d.values.fill(l):"boolean"==typeof l&&d.values.fill(+l);for(let t=0;t=i/s)throw new Error(`Invalid indices: ${r} does not index into ${n}`);for(let n=0;n1/(1+Math.exp(-t)))),_4=j2(zC,(t=>1/(1+Math.exp(-t)))),T4={kernelName:zC,backendName:"cpu",kernelFunc:_4}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function y4(t,e,n,i,s){const r=SP(i,e,n),a=IO(n),o=zO(i);if(r){const n=xP(e,o);return"string"===s?t.slice(n,n+a):t.subarray(n,n+a)}const l=FL(i,s,"string"===s?uH(t):t),u=FL(n,s);for(let t=0;tt+e[n]));u.set(l.get(...i),...n)}return"string"===s?hH(u.values):u.values}function I4(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{begin:r,size:a}=i;I2(s,"slice");const[o,l]=RP(s,r,a);dP(s,o,l);const u=y4(n.data.get(s.dataId).values,o,l,s.shape,s.dtype);return n.makeTensorInfo(l,s.dtype,u)}const E4={kernelName:YC,backendName:"cpu",kernelFunc:I4}; +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function b4(t,e,n,i,s,r,a){const o=e[0],l=r[0],u=new Array(l),h=new Array(o),p=e[1];if(0===l){if(0!==o)throw new Error(jG(o));return[DO(n,0),[0,p],DO(s,0),u,h]}let c=!0,d=0;const f=new Array(l).fill(0);for(let e=0;e=l)throw new Error(KG(e,n,l));++f[n],c=c&&n>=d,d=n}let m=!0;for(let t=0;t0&&(f[t]+=f[t-1])}if(m&&c){const e=t,n=i;for(let t=0;t0){c[p-1]=1;for(let t=p-2;t>=0;--t)c[t]=c[t+1]*i[t+1]}const d=[];if(o>0){d[o-1]=1;for(let t=o-2;t>=0;--t)d[t]=d[t+1]*l[t+1]}const f=DO(n,a*o);for(let e=0;e0?s[o-1]+1:0;if(h<0)throw new Error("segment ids must be >= 0");const p=e.slice();p[0]=h;const c=DO(n,p.reduce(((t,e)=>t*e),1));if(0===o)return h>0&&c.fill(a),[c,p];if(h<=0)throw new Error("segment ids must be >= 0");let d=0,f=1,m=0,g=s[d];for(;;){let e=0;if(f=e)throw new Error("segment ids are not increasing")}if(g<0||g>=h)throw new Error(sH(g,h));g>m&&c.fill(a,m*u,g*u);for(let e=d;e=l[0])throw new Error(rH(e,i[e],l[0]));for(let e=0;eo)break}return mMath.sqrt(t))),x4=j2(jC,(t=>Math.sqrt(t))),R4={kernelName:jC,backendName:"cpu",kernelFunc:x4},O4=S2(((t,e)=>{const n=t-e;return n*n})),A4=F2(sN,O4),M4={kernelName:sN,backendName:"cpu",kernelFunc:A4},C4=X2(((t,e)=>{const{pattern:n,replaceGlobal:i,rewrite:s}=e;return t.replace(new RegExp(n,i?"g":""),s)})),N4=q2(aN,C4),k4={kernelName:aN,backendName:"cpu",kernelFunc:N4}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function D4(t,e,n,i){const s=FL(t,e.dtype);for(let t=0;t0?0:a-o);let c=0;c+=l*this.leftPad.length;for(let e=0;et.forEach((t=>d[f++]=t));for(let t=0;t0){m(t[p+h-1]);for(let t=0;t0){let t=e[0];if(0!==t)throw new Error(`First split value must be 0, got ${t}`);for(let s=1;s=t;if(i=i&&e[s]<=n,!i)throw new Error(`Invalid split value ${e[s]}, must be in [${t}, ${n}]`);t=e[s]}if(t!==n)throw new Error(`Last split value must be data size. Expected ${n}, got ${t}`)}const s=i-1,r=DO("int32",i);if(0===n||0===i){const t=new Array(n);for(let t=0;t<=s;++t)r[t]=0;return[t,r]}r[0]=0;for(let t=1;t<=s;++t){const n=e[t]-e[t-1];let i=0;this.nGramWidths.forEach((t=>{i+=this.getNumNGrams(n,t)})),this.preserveShort&&n>0&&0===i&&(i=1),r[t]=r[t-1]+i}const a=new Array(r[s]);for(let n=0;n{const o=e[n+1]-e[n],l=this.getNumNGrams(o,r);this.createNGrams(t,i,a,s,l,r),s+=l})),this.preserveShort&&s===r[n]){const r=e[n+1]-e[n];if(0===r)continue;const o=r+2*this.padWidth,l=1;this.createNGrams(t,i,a,s,l,o)}}return[a,r]}}function F4(t,e,n,i,s,r,a,o){return new L4(n,i,s,r,a,o).compute(t,e)} +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function P4(t,e,n,i){if(!t.length)return;if(0===e.length){for(let e=0;et-e)),U4=P2(((t,e,n,i)=>({real:t-n,imag:e-i}))),Y4=F2(pN,V4,U4),G4={kernelName:pN,backendName:"cpu",kernelFunc:Y4}; +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function H4(t,e){const n=new Array(t.rank);for(let i=0;i{const n=e.value-t.value;return 0===n?t.index-e.index:n};function z4(t,e,n=0,i=t.length-1){for(;i>n;){if(i-n>600){const s=i-n+1,r=e-n+1,a=Math.log(s),o=.5*Math.exp(2*a/3),l=.5*Math.sqrt(a*o*(s-o)/s)*Math.sign(r-s/2);z4(t,e,Math.max(n,Math.floor(e-r*o/s+l)),Math.min(i,Math.floor(e+(s-r)*o/s+l)))}const s=t[e];let r=n,a=i;for(dO(t,n,e),W4(t[i],s)>0&&dO(t,n,i);r0;)a-=1}0===W4(t[n],s)?dO(t,n,a):(a+=1,dO(t,a,i)),a<=e&&(n=a+1),e<=a&&(i=a-1)}}function X4(t,e,n,i,s){const r=e[e.length-1],[a,o]=[t.length/r,r],l=kO(n,a*i),u=kO("int32",a*i);for(let e=0;ea[e]={value:t,index:e})),i{for(let n=0;nnew b2),1); +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const K4=j2(hM,(t=>t>=0?t:Math.exp(t)-1)),Q4={kernelName:hM,backendName:"cpu",kernelFunc:K4}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function J4(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{alpha:r}=i;I2([s],"leakyRelu");const a=IO(s.shape),o=n.data.get(s.dataId).values,l=kO("float32",a);for(let t=0;tt<0?e*t:t));function e5(t){const{inputs:e,backend:n}=t,{x:i,alpha:s}=e;I2([i,s],"prelu");const r=n.data.get(i.dataId).values,a=n.data.get(s.dataId).values,[o,l]=t5(i.shape,s.shape,r,a,"float32");return n.makeTensorInfo(l,"float32",o)}const n5={kernelName:yC,backendName:"cpu",kernelFunc:e5},i5=j2(RC,(t=>Math.max(0,t))),s5={kernelName:RC,backendName:"cpu",kernelFunc:i5},r5=j2(kC,(t=>Math.min(Math.max(0,t),6))),a5={kernelName:kC,backendName:"cpu",kernelFunc:r5}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function o5(t,e,n,i,s){if("linear"===n)return A2({inputs:{x:e},backend:t});if("relu"===n)return i5({inputs:{x:e},backend:t});if("elu"===n)return K4({inputs:{x:e},backend:t});if("relu6"===n)return r5({inputs:{x:e},backend:t});if("prelu"===n)return e5({inputs:{x:e,alpha:i},backend:t});if("leakyrelu"===n)return J4({inputs:{x:e},backend:t,attrs:{alpha:s}});if("sigmoid"===n)return _4({inputs:{x:e},backend:t});throw new Error(`Activation ${n} has not been implemented for the CPU backend.`)} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function l5(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{shape:r}=i,a=IO(s.shape),o=MO(r,a),l=IO(o);_O(a===l,(()=>`The new shape (${o}) has ${l} elements and the old shape (${s.shape}) has ${a} elements. The new shape and old shape must have the same number of elements.`)),n.incRef(s.dataId);const u=n.data.get(s.dataId);if(null!=u.complexTensorInfos){const t=u.complexTensorInfos.real,e=u.complexTensorInfos.imag;t.shape=o,e.shape=o}return{dataId:s.dataId,shape:o,dtype:s.dtype}}const u5={kernelName:OC,backendName:"cpu",kernelFunc:l5}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function h5(t){const{inputs:e,backend:n,attrs:i}=t,{a:s,b:r}=e,{transposeA:a,transposeB:o}=i;I2([s,r],"matMul");const l=s.shape.length,u=r.shape.length,h=a?s.shape[l-2]:s.shape[l-1],p=o?r.shape[u-1]:r.shape[u-2],c=a?s.shape[l-1]:s.shape[l-2],d=o?r.shape[u-2]:r.shape[u-1],f=s.shape.slice(0,-2),m=r.shape.slice(0,-2),g=IO(f),_=IO(m),T=_F(s.shape.slice(0,-2),r.shape.slice(0,-2)).concat([c,d]);_O(h===p,(()=>`Error in matMul: inner shapes (${h}) and (${p}) of Tensors with shapes ${s.shape} and ${r.shape} and transposeA=${a} and transposeB=${o} must match.`));const y=o?[_,d,p]:[_,p,d],I=l5({inputs:{x:s},backend:n,attrs:{shape:a?[g,h,c]:[g,c,h]}}),E=l5({inputs:{x:r},backend:n,attrs:{shape:y}}),b=a?I.shape[1]:I.shape[2],v=a?I.shape[2]:I.shape[1],w=o?E.shape[1]:E.shape[2],S=Math.max(g,_),x=n.data.get(I.dataId).values,R=n.data.get(E.dataId).values,O=zO(I.shape),A=zO(E.shape),[M,C,N]=a?[O[0],1,O[1]]:[O[0],O[1],1],[k,D,L]=o?[1,A[1],A[0]]:[A[1],1,A[0]],F=v*w,P=FL([S,v,w],I.dtype),$=P.values,B=n.blockSize;for(let t=0;tMath.acos(t))),f5={kernelName:cA,backendName:"cpu",kernelFunc:d5},m5=j2(dA,(t=>Math.acosh(t))),g5={kernelName:dA,backendName:"cpu",kernelFunc:m5};const _5={kernelName:mA,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,i=e;I2(e,"addN");const s=i.map((t=>n.data.get(t.dataId).values)),r=FL(i[0].shape,i[0].dtype),a=r.values;for(let t=0;tn&&(n=s,i=t)}c[t]=i}return u.forEach((t=>n.disposeIntermediateTensorInfo(t))),n.makeTensorInfo(h,"int32",c)}};const E5={kernelName:yA,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{axis:r}=i;I2(s,"argMin");let a=CO(r,s.shape);const o=_B(a,s.shape.length);let l=s;const u=[];null!=o&&(l=K3({inputs:{x:s},backend:n,attrs:{perm:o}}),u.push(l),a=yB(a.length,l.shape.length)),a=[a[0]],gB("argMin",a,l.shape.length);const[h,p]=fB(l.shape,a),c=QO(IO(h),"int32"),d=IO(p),f=n.data.get(l.dataId).values;for(let t=0;tn.disposeIntermediateTensorInfo(t))),n.makeTensorInfo(h,"int32",c)}},b5=j2(IA,(t=>Math.asin(t))),v5={kernelName:IA,backendName:"cpu",kernelFunc:b5},w5=j2(EA,(t=>Math.asinh(t))),S5={kernelName:EA,backendName:"cpu",kernelFunc:w5},x5=j2(bA,(t=>Math.atan(t))),R5={kernelName:bA,backendName:"cpu",kernelFunc:x5},O5=S2(((t,e)=>Math.atan2(t,e))),A5=F2(wA,O5),M5={kernelName:wA,backendName:"cpu",kernelFunc:A5},C5=j2(vA,(t=>Math.atanh(t))),N5={kernelName:vA,backendName:"cpu",kernelFunc:C5}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function k5(t,e,n,i,s,r){const a=s.strideHeight,o=s.strideWidth,l=s.dilationHeight,u=s.dilationWidth,h=s.effectiveFilterHeight,p=s.effectiveFilterWidth,c=s.padInfo.top,d=s.padInfo.left,f="max"===r?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,m=FL(s.outShape,n),g=m.values,_=s.outShape[1]*s.outShape[2]*s.outShape[3],T=s.outShape[2]*s.outShape[3],y=s.outShape[3];for(let e=0;e_?_=a:"avg"===r&&(T+=a,I++)}if(isNaN(_))break}g[v+n*y+e]="avg"===r?T/I:_}}}return m}function D5(t,e,n,i,s=!1,r=!1){const a=FL(i.outShape,"int32"),o=i.strideHeight,l=i.strideWidth,u=i.dilationHeight,h=i.dilationWidth,p=i.effectiveFilterHeight,c=i.effectiveFilterWidth,d=i.padInfo.top,f=i.padInfo.left,m=FL(e,n,t);for(let t=0;tI&&(I=u,E=s?r?((t*i.inHeight+n)*i.inWidth+o)*i.inChannels+e:(n*i.inWidth+o)*i.inChannels+e:a*c+l)}}a.set(E,t,n,o,e)}}return a}function L5(t,e,n,i,s,r){const a=s.strideDepth,o=s.strideHeight,l=s.strideWidth,u=s.dilationDepth,h=s.dilationHeight,p=s.dilationWidth,c=s.effectiveFilterDepth,d=s.effectiveFilterHeight,f=s.effectiveFilterWidth,m=s.padInfo.front,g=s.padInfo.top,_=s.padInfo.left,T="max"===r?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,y=FL(s.outShape,n),I=y.values,E=s.outShape[1]*s.outShape[2]*s.outShape[3]*s.outShape[4],b=s.outShape[2]*s.outShape[3]*s.outShape[4],v=s.outShape[3]*s.outShape[4],w=s.outShape[4];for(let e=0;eb?b=s:"avg"===r&&(v+=s,S++),isNaN(b))break}if(isNaN(b))break}if(isNaN(b))break}I[g+e]="avg"===r?v/Math.max(S,1):b}}}}return y}const F5={kernelName:SA,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e;I2(s,"avgPool");const{filterSize:r,strides:a,pad:o,dimRoundingMode:l}=i;_O(m$(a,1),(()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${a} and dilations '1'`));const u=r$(s.shape,r,a,1,o,l);let h;if(1===u.filterWidth&&1===u.filterHeight&&vO(u.inShape,u.outShape))h=A2({inputs:{x:s},backend:n});else{const t=n.data.get(s.dataId).values,e=zO(s.shape),i=k5(t,s.shape,s.dtype,e,u,"avg");h=n.makeTensorInfo(u.outShape,s.dtype,i.values)}return h}};const P5={kernelName:RA,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{filterSize:r,strides:a,pad:o,dimRoundingMode:l,dataFormat:u}=i;I2(s,"avgPool3d");const h=a$(s.shape,r,a,1,o,l,u),p=L5(n.data.get(s.dataId).values,s.shape,s.dtype,zO(s.shape),h,"avg");return n.makeTensorInfo(p.shape,"float32",p.values)}};const $5={kernelName:OA,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{dy:s,input:r}=e,{filterSize:a,strides:o,pad:l,dimRoundingMode:u}=i;I2([s,r],"avgPool3DGrad");const h=a$(r.shape,a,o,1,l,u),p=h.strideDepth,c=h.strideHeight,d=h.strideWidth,f=h.filterDepth,m=h.filterHeight,g=h.filterWidth,_=h.dilationDepth,T=h.dilationHeight,y=h.dilationWidth,I=h.effectiveFilterDepth,E=h.effectiveFilterHeight,b=h.effectiveFilterWidth,v=I-1-h.padInfo.front,w=b-1-h.padInfo.left,S=E-1-h.padInfo.top,x=FL(r.shape,"float32"),R=1/(f*m*g),O=n.bufferSync(s);for(let t=0;t=h.outDepth||Math.floor(i)!==i))for(let n=0;n=h.outHeight||Math.floor(s)!==s))for(let n=0;n=h.outWidth||Math.floor(r)!==r)continue;l+=O.get(t,i,s,r,e)}}}x.set(l*R,t,n,i,s,e)}return n.makeTensorInfo(x.shape,x.dtype,x.values)}};const B5={kernelName:xA,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{dy:s,input:r}=e,a=r;I2([s,r],"avgPoolGrad");const{filterSize:o,strides:l,pad:u}=i,h=r$(a.shape,o,l,1,u),p=h.strideHeight,c=h.strideWidth,d=h.filterHeight,f=h.filterWidth,m=h.dilationHeight,g=h.dilationWidth,_=h.effectiveFilterHeight,T=h.effectiveFilterWidth,y=T-1-h.padInfo.left,I=_-1-h.padInfo.top,E=FL(a.shape,"float32"),b=1/(d*f),v=n.data.get(s.dataId).values,w=FL(s.shape,"float32",v);for(let t=0;t=h.outHeight||Math.floor(i)!==i))for(let n=0;n=h.outWidth||Math.floor(s)!==s)continue;a+=w.get(t,i,s,e)}}E.set(a*b,t,n,i,e)}return n.makeTensorInfo(E.shape,E.dtype,E.values)}};const V5={kernelName:bM,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,scale:r,offset:a,mean:o,variance:l}=e;_O(o.shape.length===l.shape.length,(()=>"Batch normalization gradient requires mean and variance to have equal ranks.")),_O(null==a||o.shape.length===a.shape.length,(()=>"Batch normalization gradient requires mean and offset to have equal ranks.")),_O(null==r||o.shape.length===r.shape.length,(()=>"Batch normalization gradient requires mean and scale to have equal ranks.")),I2([s,o,l,r,a],"batchNorm");let{varianceEpsilon:u}=i;null==u&&(u=.001);const h=n.data.get(s.dataId).values,p=n.data.get(o.dataId).values,c=n.data.get(l.dataId).values,d=r?n.data.get(r.dataId).values:new Float32Array([1]),f=a?n.data.get(a.dataId).values:new Float32Array([0]),m=new Float32Array(h.length),g=f.length,_=d.length,T=c.length,y=p.length;let I=0,E=0,b=0,v=0;for(let t=0;t=g&&(I=0),E>=y&&(E=0),b>=_&&(b=0),v>=T&&(v=0);return n.makeTensorInfo(s.shape,s.dtype,m)}};const U5={kernelName:MA,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{blockShape:r,crops:a}=i;I2([s],"batchToSpaceND");const o=r.reduce(((t,e)=>t*e)),l=gG(s.shape,r,o),u=_G(l.length,r.length),h=TG(s.shape,r,o),p=yG(a,r.length),c=IG(h,a,r.length),d=l5({inputs:{x:s},backend:n,attrs:{shape:l}}),f=K3({inputs:{x:d},backend:n,attrs:{perm:u}}),m=l5({inputs:{x:f},backend:n,attrs:{shape:h}}),g=I4({inputs:{x:m},backend:n,attrs:{begin:p,size:c}});return n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(m),g}};const Y5={kernelName:CA,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,weights:r}=e,{size:a}=i,o=Y2(n.data.get(s.dataId).values,n.data.get(r.dataId).values,r.dtype,r.shape,a);return n.makeTensorInfo([a],r.dtype,o)}};const G5={kernelName:DA,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{s0:i,s1:s}=e,r=n.data.get(i.dataId).values,a=n.data.get(s.dataId).values,o=_F(Array.from(r),Array.from(a));return n.makeTensorInfo([o.length],"int32",Int32Array.from(o))}},H5=j2(PA,((t,e)=>{const n=e;return t>n.clipValueMax?n.clipValueMax:t{const{x:e}=t.inputs,n=t.backend,i=new Float32Array(IO(e.shape)),s=n.data.get(e.dataId),r=s.complexTensorInfos.real,a=s.complexTensorInfos.imag,o=n.data.get(r.dataId).values,l=n.data.get(a.dataId).values;for(let t=0;tt.shape)),r);let a=oG(e.map((t=>t.shape)),r);if(0===IO(a))return n.makeTensorInfo(a,e[0].dtype,[]);const o=e.filter((t=>IO(t.shape)>0));if(1===o.length)return A2({inputs:{x:o[0]},backend:n});if("complex64"===o[0].dtype){const t=o.map((t=>C2({inputs:{input:t},backend:n}))),e=o.map((t=>X5({inputs:{input:t},backend:n}))),i=q5({inputs:t,backend:n,attrs:{axis:r}}),s=q5({inputs:e,backend:n,attrs:{axis:r}}),a=x2({inputs:{real:i,imag:s},backend:n});return t.forEach((t=>n.disposeIntermediateTensorInfo(t))),e.forEach((t=>n.disposeIntermediateTensorInfo(t))),n.disposeIntermediateTensorInfo(i),n.disposeIntermediateTensorInfo(s),a}const l=o.map((t=>{const e=IO(t.shape.slice(r));return l5({inputs:{x:t},backend:n,attrs:{shape:[-1,e]}})})),u=l.map((t=>({vals:n.data.get(t.dataId).values,shape:t.shape})));a=oG(l.map((t=>t.shape)),1);const h=1===l[0].shape[0],p=Z2(u,a,e[0].dtype,h),c=oG(o.map((t=>t.shape)),r),d=n.makeTensorInfo(c,e[0].dtype,p);return l.forEach((t=>n.disposeIntermediateTensorInfo(t))),d}const K5={kernelName:VA,backendName:"cpu",kernelFunc:q5}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Q5(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,filter:r}=e,{strides:a,pad:o,dataFormat:l,dilations:u,dimRoundingMode:h}=i;I2([s,r],"conv2d");const p=_$(l),c=o$(s.shape,r.shape,a,u,o,h,!1,p),d=c.filterHeight,f=c.filterWidth,m=c.dilationHeight,g=c.dilationWidth,_=c.padInfo.left,T=c.padInfo.top,y="channelsLast"===c.dataFormat,I=new bk(c.outShape,s.dtype),E=zO(s.shape),b=zO(r.shape),v=E[0],w=y?E[1]:E[2],S=y?E[2]:1,x=y?1:E[1],R=I.strides[0],O=y?I.strides[1]:I.strides[2],A=y?I.strides[2]:1,M=y?1:I.strides[1],C=n.data.get(s.dataId).values,N=n.data.get(r.dataId).values,k=I.values;for(let t=0;t=c.inHeight)continue;const r=t*b[0],a=e+n*w;for(let t=0;t=c.inWidth)continue;const s=a+i*S;let o=r+t*b[1];for(let t=0;t=u.inDepth)continue;const r=t*S[0],a=e+n*w[1];for(let t=0;t=u.inHeight)continue;const s=r+t*S[1],o=a+i*w[2];for(let t=0;t=u.inWidth)continue;const r=s+t*S[2],a=o+e*u.inChannels;let l=r;for(let t=0;tMath.cos(t))),r6={kernelName:XA,backendName:"cpu",kernelFunc:s6},a6=j2(jA,(t=>Math.cosh(t))),o6={kernelName:jA,backendName:"cpu",kernelFunc:a6};const l6={kernelName:QA,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{image:s,boxes:r,boxInd:a}=e,{cropSize:o,method:l,extrapolationValue:u}=i,[h,p,c,d]=s.shape,f=r.shape[0],[m,g]=o,_=FL([f,m,g,d],"float32"),T=n.data.get(r.dataId).values,y=n.data.get(a.dataId).values,I=n.data.get(s.dataId).values,E=zO(s.shape),b=zO(_.shape);for(let t=0;t=h)continue;const o=m>1?(s-n)*(p-1)/(m-1):0,f=g>1?(r-i)*(c-1)/(g-1):0;for(let e=0;e1?n*(p-1)+e*o:.5*(n+s)*(p-1);if(h<0||h>p-1)for(let n=0;n1?i*(c-1)+l*f:.5*(i+r)*(c-1);if(h<0||h>c-1){for(let n=0;n1?i*(c-1)+n*f:.5*(i+r)*(c-1);if(s<0||s>c-1){for(let i=0;it+f-e-1:(t,e)=>t+e;for(let t=0;tt+f-e-1:(t,e)=>t+e;for(let t=0;t`Only NHWC dataFormat supported on CPU for depthToSpace. Got ${a}`));const o=s.shape[0],l=s.shape[1],u=s.shape[2],h=s.shape[3],p=l*r,c=u*r,d=h/(r*r),f=n.data.get(s.dataId).values,m=new Float32Array(o*p*c*d);let g=0;for(let t=0;t`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${a} and dilations '${c}'`));const d=o$(s.shape,r.shape,a,c,o,u,!0),{filterHeight:f,filterWidth:m,dilationHeight:g,dilationWidth:_,padInfo:T}=d,y=T.left,I=T.top,E=d.outChannels/d.inChannels,b=new bk(d.outShape,s.dtype),v=n.data.get(s.dataId).values,w=n.data.get(r.dataId).values,S=b.values;for(let t=0;t=d.inHeight)continue;const r=t*p[0],a=e+n*h[1];for(let t=0;t=d.inWidth)continue;const s=r+t*p[1],o=a+i*d.inChannels;let l=e,u=s;for(let t=0;t{const{x:i,filter:s}=t,{strides:r,pad:a,dilations:o}=n,l=e,u=l.data.get(i.dataId).values,h=i.shape.length,p=l.data.get(s.dataId).values,c=s.shape.length,{batchSize:d,inHeight:f,inWidth:m,inChannels:g,outHeight:_,outWidth:T,padInfo:y,strideHeight:I,strideWidth:E,filterHeight:b,filterWidth:v,dilationHeight:w,dilationWidth:S,outShape:x}=s$(i.shape,s.shape,r,a,"NHWC",o),R=IO(x),O=x.length,A=DO(i.dtype,R);for(let t=0;t=0&&r=0&&dl&&(l=m)}}}A[tA([t,e,r,o],O,zO(x))]=l}}}return{dataId:l.write(sk(A,i.dtype),x,i.dtype),shape:x,dtype:i.dtype}}},y6={kernelName:aM,backendName:"cpu",kernelFunc:({inputs:t,backend:e,attrs:n})=>{const{x:i,filter:s,dy:r}=t,{strides:a,pad:o,dilations:l}=n,u=e,h=jO(i.shape,u.data.get(i.dataId).values),p=jO(s.shape,u.data.get(s.dataId).values),{batchSize:c,inHeight:d,inWidth:f,inChannels:m,outHeight:g,outWidth:_,padInfo:T,strideHeight:y,strideWidth:I,filterHeight:E,filterWidth:b,dilationHeight:v,dilationWidth:w,outShape:S}=s$(i.shape,s.shape,a,o,"NHWC",l);_O(r.rank===S.length,(()=>`Error in ${aM}, dy must have the same rank as output ${S.length}, but got ${r.rank}`));const x=jO(S,u.data.get(r.dataId).values),R=JO(s.shape,s.dtype);for(let t=0;t=0&&i=0&&ua&&(a=s,o=e,l=n)}}}R[o][l][r]+=x[t][e][i][r]}}}return{dataId:u.write(sk(R,i.dtype),s.shape,s.dtype),shape:s.shape,dtype:s.dtype}}},I6={kernelName:rM,backendName:"cpu",kernelFunc:({inputs:t,backend:e,attrs:n})=>{const{x:i,filter:s,dy:r}=t,{strides:a,pad:o,dilations:l}=n,u=e,h=jO(i.shape,u.data.get(i.dataId).values),p=jO(s.shape,u.data.get(s.dataId).values),{batchSize:c,inHeight:d,inWidth:f,inChannels:m,outHeight:g,outWidth:_,padInfo:T,strideHeight:y,strideWidth:I,filterHeight:E,filterWidth:b,dilationHeight:v,dilationWidth:w,outShape:S}=s$(i.shape,s.shape,a,o,"NHWC",l);_O(r.rank===S.length,(()=>`Error in ${rM}, dy must have the same rank as output ${S.length}, but got ${r.rank}`));const x=jO(S,u.data.get(r.dataId).values),R=JO(i.shape,i.dtype);for(let t=0;t=0&&i=0&&ua&&(a=s,o=i,l=u)}}}R[t][o][l][r]+=x[t][e][i][r]}}}return{dataId:u.write(sk(R,i.dtype),i.shape,i.dtype),shape:i.shape,dtype:i.dtype}}};const E6={kernelName:oM,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2023 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{image:s}=e,{canvas:r,options:a}=i,{contextOptions:o,imageOptions:l}=a||{},u=(null==l?void 0:l.alpha)||1,h=(null==o?void 0:o.contextType)||"2d";if("2d"!==h)throw new Error(`Context type ${o.contextType} is not supported by the CPU backend.`);const p=r.getContext(h,(null==o?void 0:o.contextAttributes)||{});if(null==p)throw new Error(`Could not get the context with ${h} type.`);const[c,d]=s.shape.slice(0,2),f=2===s.shape.length?1:s.shape[2],m=n.data.get(s.dataId).values,g="float32"===s.dtype?255:1,_=new Uint8ClampedArray(d*c*4);for(let t=0;t1)throw new Error(`Tensor values for a float32 Tensor must be in the range [0 - 1] but encountered ${i}.`)}else if("int32"===s.dtype&&(i<0||i>255))throw new Error(`Tensor values for a int32 Tensor must be in the range [0 - 255] but encountered ${i}.`);1===f?(e[0]=i*g,e[1]=i*g,e[2]=i*g):e[n]=i*g}const n=4*t;_[n+0]=Math.round(e[0]),_[n+1]=Math.round(e[1]),_[n+2]=Math.round(e[2]),_[n+3]=Math.round(e[3])}r.width=d,r.height=c;const T=new ImageData(_,d,c);return p.putImageData(T,0,0),s}}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function b6(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{axis:r,keepDims:a}=i;let o;I2(s,"sum"),o="bool"===s.dtype?D2({inputs:{x:s},backend:n,attrs:{dtype:"int32"}}):A2({inputs:{x:s},backend:n});const l=o.shape.length,u=CO(r,o.shape),h=_B(u,l);let p=u,c=o;null!=h&&(c=K3({inputs:{x:o},backend:n,attrs:{perm:h}}),p=yB(p.length,l)),gB("sum",p,c.shape.length);const[d,f]=fB(c.shape,p);let m=O2(n,d,Lk(c.dtype,"int32"));const g=IO(f),_=n.data.get(m.dataId).values,T=n.data.get(c.dataId).values;for(let t=0;t<_.length;++t){const e=t*g;let n=0;for(let t=0;t=0&&(c=b6({inputs:{x:c},backend:n,attrs:{axis:u[t]-(a.length-d),keepDims:!1}}),f.push(c)),d--)}for(const t of f)t!==c&&n.disposeIntermediateTensorInfo(t);return c}};const S6={kernelName:pM,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{dy:i,y:s}=e;I2([i,s],"eluGrad");const r=new Float32Array(IO(s.shape)),a=n.data.get(s.dataId).values,o=n.data.get(i.dataId).values;for(let t=0;t=0?o[t]:o[t]*(e+1)}return n.makeTensorInfo(s.shape,"float32",r)}},x6=vG,R6=wG,O6=SG,A6=xG,M6=RG,C6=OG,N6=j2(cM,(t=>{const e=Math.sign(t),n=Math.abs(t),i=1/(1+x6*n);return e*(1-((((C6*i+M6)*i+A6)*i+O6)*i+R6)*i*Math.exp(-n*n))})),k6={kernelName:cM,backendName:"cpu",kernelFunc:N6}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function D6(t){const{inputs:e,backend:n,attrs:i}=t,{input:s}=e,{dim:r}=i,a=s.shape.length,o=s.shape.slice();let l=r;return r<0&&(_O(-(a+1)<=r,(()=>`Axis must be in the interval [${-(a+1)}, ${a}]`)),l=a+r+1),o.splice(l,0,1),l5({inputs:{x:s},backend:n,attrs:{shape:o}})}const L6={kernelName:mM,backendName:"cpu",kernelFunc:D6},F6=S2(((t,e)=>t/e)),P6=F2(lM,F6),$6={kernelName:lM,backendName:"cpu",kernelFunc:P6}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function B6(t,e,n){const i=t.shape,s=i[0],r=i[1],a=n.data.get(t.dataId),o=a.complexTensorInfos.real,l=a.complexTensorInfos.imag,u=[s,r],h=IO(u),p=kO("float32",h),c=kO("float32",h);for(let t=0;t{const{image:i}=t,s=n,r=kO(i.dtype,IO(i.shape)),[a,o,l,u]=i.shape,h=s.data.get(i.dataId).values;for(let t=0;t=0&&a=0,(()=>`GatherV2: the index value ${e} is not in [0, ${h-1}]`))}let p=o;null==o&&(p=0);const c=IO(r.shape),d=lH(s,r,l,p),f=l5({inputs:{x:s},backend:n,attrs:{shape:[d.batchSize,d.outerSize,d.dimSize,d.sliceSize]}}),m=l5({inputs:{x:r},backend:n,attrs:{shape:[d.batchSize,c/d.batchSize]}}),g=[d.batchSize,d.outerSize,c/d.batchSize,d.sliceSize],_=n.bufferSync(m),T=g3(n.bufferSync(f),_,g);return n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(m),n.makeTensorInfo(d.outputShape,T.dtype,T.values)}};const K6={kernelName:OM,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{input:i}=e,s=IO(i.shape),r=i.shape[i.shape.length-1],a=l5({inputs:{x:i},backend:n,attrs:{shape:[s/r,r]}}),o=B6(a,!0,n),l=l5({inputs:{x:o},backend:n,attrs:{shape:i.shape}});return n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(o),l}},Q6=j2(MM,(t=>Number.isFinite(t)?1:0),"bool"),J6={kernelName:MM,backendName:"cpu",kernelFunc:Q6},Z6=j2(CM,(t=>Math.abs(t)===1/0?1:0),"bool"),t8={kernelName:CM,backendName:"cpu",kernelFunc:Z6},e8=j2(NM,(t=>Number.isNaN(t)?1:0),"bool"),n8={kernelName:NM,backendName:"cpu",kernelFunc:e8};const i8={kernelName:FM,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{backend:e,attrs:n}=t,{start:i,stop:s,num:r}=n,a=A3(i,s,r);return e.makeTensorInfo([a.length],"float32",a)}},s8=j2($M,(t=>Math.log1p(t))),r8={kernelName:$M,backendName:"cpu",kernelFunc:s8},a8=S2(((t,e)=>t&&e)),o8=F2(BM,a8,null,"bool"),l8={kernelName:BM,backendName:"cpu",kernelFunc:o8},u8=j2(VM,(t=>t?0:1),"bool"),h8={kernelName:VM,backendName:"cpu",kernelFunc:u8},p8=S2(((t,e)=>t||e)),c8=F2(UM,p8,null,"bool"),d8={kernelName:UM,backendName:"cpu",kernelFunc:c8};const f8={kernelName:WM,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{depthRadius:r,bias:a,alpha:o,beta:l}=i;I2(s,"LRN");const u=s.shape[3],h=u-1,p=n.data.get(s.dataId).values,c=IO(s.shape),d=new Float32Array(c);function f(t){const e=t%u;let n=t-e+Math.max(0,e-r);const i=t-e+Math.min(e+r,h);let s=0;for(;n<=i;n++){const t=p[n];s+=t*t}return s}for(let t=0;t`Error in maxPool: Either strides or dilations must be 1. Got strides ${a} and dilations '1'`));const u=r$(s.shape,r,a,1,o,l);let h;if(1===u.filterWidth&&1===u.filterHeight&&vO(u.inShape,u.outShape))h=A2({inputs:{x:s},backend:n});else{const t=n.data.get(s.dataId).values,e=zO(s.shape),i=k5(t,s.shape,s.dtype,e,u,"max");h=n.makeTensorInfo(u.outShape,s.dtype,i.values)}return h}};const y8={kernelName:JM,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{filterSize:r,strides:a,pad:o,dimRoundingMode:l,dataFormat:u}=i;I2(s,"maxPool3d");const h=a$(s.shape,r,a,1,o,l,u),p=L5(n.data.get(s.dataId).values,s.shape,s.dtype,zO(s.shape),h,"max");return n.makeTensorInfo(p.shape,"float32",p.values)}};const I8={kernelName:ZM,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{dy:s,input:r}=e,{filterSize:a,strides:o,pad:l,dimRoundingMode:u}=i;I2([s,r],"maxPool3DGrad");const h=a$(r.shape,a,o,1,l,u),p=function(t,e){const n=FL(e.outShape,"int32"),i=e.strideDepth,s=e.strideHeight,r=e.strideWidth,a=e.dilationDepth,o=e.dilationHeight,l=e.dilationWidth,u=e.effectiveFilterDepth,h=e.effectiveFilterHeight,p=e.effectiveFilterWidth,c=e.padInfo.front,d=e.padInfo.top,f=e.padInfo.left;for(let m=0;m=w&&(w=o,S=n*h*p+s*h+a)}}}n.set(S,m,_,i,s,g)}}}return n}(n.bufferSync(r),h),c=h.strideDepth,d=h.strideHeight,f=h.strideWidth,m=h.dilationDepth,g=h.dilationHeight,_=h.dilationWidth,T=h.effectiveFilterDepth,y=h.effectiveFilterHeight,I=h.effectiveFilterWidth,E=T-1-h.padInfo.front,b=I-1-h.padInfo.left,v=y-1-h.padInfo.top,w=FL(r.shape,"float32"),S=n.bufferSync(s);for(let t=0;t=h.outDepth||Math.floor(i)!==i))for(let s=0;s=h.outHeight||Math.floor(r)!==r))for(let a=0;a=h.outWidth||Math.floor(u)!==u)continue;const c=T*y*I-1-p.get(t,i,r,u,e)===n*y*I+s*I+a?1:0;if(0===c)continue;l+=S.get(t,i,r,u,e)*c}}}w.set(l,t,n,i,s,e)}return n.makeTensorInfo(w.shape,w.dtype,w.values)}};const E8={kernelName:QM,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{dy:s,input:r,output:a}=e,o=r;I2([r,a],"maxPoolGrad");const{filterSize:l,strides:u,pad:h,dimRoundingMode:p}=i,c=r$(o.shape,l,u,1,h,p),d=n.data.get(o.dataId).values,f=FL(c.outShape,o.dtype,D5(d,o.shape,o.dtype,c).values),m=c.strideHeight,g=c.strideWidth,_=c.dilationHeight,T=c.dilationWidth,y=c.effectiveFilterHeight,I=c.effectiveFilterWidth,E=I-1-c.padInfo.left,b=y-1-c.padInfo.top,v=FL(o.shape,"float32"),w=n.data.get(s.dataId).values,S=FL(s.shape,"float32",w);for(let t=0;t=c.outHeight||Math.floor(i)!==i))for(let s=0;s=c.outWidth||Math.floor(o)!==o)continue;const l=y*I-1-f.get(t,i,o,e)===n*I+s?1:0;if(0===l)continue;a+=S.get(t,i,o,e)*l}}v.set(a,t,n,i,e)}return n.makeTensorInfo(v.shape,v.dtype,v.values)}}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const b8={kernelName:tC,backendName:"cpu",kernelFunc:({inputs:t,attrs:e,backend:n})=>{const{x:i}=t,{filterSize:s,strides:r,pad:a,includeBatchInIndex:o}=e,l=n;I2(i,"MaxPoolWithArgmax");const u=l.data.get(i.dataId).values,h=r$(i.shape,s,r,[1,1],a),[p,c]= +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i,s){const r=k5(t,0,n,zO(e),s,"max"),a=D5(t,e,n,s,!0,i);return[r.values,a.values]}(u,i.shape,i.dtype,o,h),d=l.write(p,h.outShape,i.dtype),f=l.write(c,h.outShape,i.dtype);return[{dataId:d,shape:h.outShape,dtype:i.dtype},{dataId:f,shape:h.outShape,dtype:"int32"}]}};const v8={kernelName:eC,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{axis:r,keepDims:a}=i,o=CO(r,s.shape),l=IO(fB(s.shape,o)[1]),u=[],h=n.makeTensorInfo([],"float32",new Float32Array([l]));u.push(h);const p=D2({inputs:{x:s},backend:n,attrs:{dtype:"float32"}});u.push(p);const c=P6({inputs:{a:p,b:h},backend:n});u.push(c);const d=b6({inputs:{x:c},backend:n,attrs:{axis:r,keepDims:a}});return u.forEach((t=>n.disposeIntermediateTensorInfo(t))),d}};const w8={kernelName:nC,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{axis:r,keepDims:a}=i;I2(s,"min");const o=CO(r,s.shape);let l=o;const u=_B(l,s.shape.length);let h=s;null!=u&&(h=K3({inputs:{x:s},backend:n,attrs:{perm:u}}),l=yB(l.length,s.shape.length)),gB("min",l,h.shape.length);const[p,c]=fB(h.shape,l),d=IO(c),f=QO(IO(p),h.dtype),m=n.data.get(h.dataId).values;for(let t=0;tt[0]+s.shape[e]+t[1])),l=r.map((t=>t[0])),u=r.map(((t,e)=>t[0]+s.shape[e])),h="reflect"===a?0:1,p=n.data.get(s.dataId).values,c=s.shape.length,d=zO(s.shape),f=IO(o),m=o.length,g=zO(o),_=kO(s.dtype,f);for(let t=0;t=u[t]&&(e[t]=2*(u[t]-1)-e[t]+h);e=e.map(((t,e)=>t-l[e]));const n=tA(e,c,d);_[t]=p[n]}return{dataId:n.write(_,o,s.dtype),shape:o,dtype:s.dtype}}},x8=S2(((t,e)=>{const n=t%e;return t<0&&e<0||t>=0&&e>=0?n:(n+e)%e})),R8=F2(rC,x8),O8={kernelName:rC,backendName:"cpu",kernelFunc:R8}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function A8(t){const{inputs:e,backend:n,attrs:i}=t,{logits:s}=e,{dim:r}=i,a=s.shape.length;let o=r;if(-1===o&&(o=a-1),o!==a-1)throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${a} and dim was ${o}`);const l=CO([o],s.shape),u=g8({inputs:{x:s},backend:n,attrs:{reductionIndices:l,keepDims:!1}}),h=mB(u.shape,l),p=l5({inputs:{x:u},backend:n,attrs:{shape:h}}),c=Y4({inputs:{a:s,b:p},backend:n}),d=s3({inputs:{x:c},backend:n}),f=b6({inputs:{x:d},backend:n,attrs:{axis:l,keepDims:!1}}),m=l5({inputs:{x:f},backend:n,attrs:{shape:h}}),g=P6({inputs:{a:d,b:m},backend:n});return n.disposeIntermediateTensorInfo(u),n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(c),n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(m),g}const M8={kernelName:JC,backendName:"cpu",kernelFunc:A8};const C8={kernelName:aC,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{logits:s}=e,{numSamples:r,seed:a,normalized:o}=i;I2(s,"multinomial");const l=o?s:A8({inputs:{logits:s},backend:n,attrs:{dim:-1}}),u=l.shape[0],h=l.shape[1],p=n.data.get(l.dataId).values,c=[u,r],d=QO(IO(c),"int32");for(let t=0;t=0&&p[t]{TO(r,t.shape,"All tensors passed to stack must have matching shapes"),_O(a===t.dtype,(()=>"All tensors passed to stack must have matching dtypes"))}));const o=[],l=q5({inputs:e.map((t=>{const e=D6({inputs:{input:t},backend:n,attrs:{dim:s}});return o.push(e),e})),backend:n,attrs:{axis:s}});return o.forEach((t=>n.disposeIntermediateTensorInfo(t))),l}const G8={kernelName:mC,backendName:"cpu",kernelFunc:Y8};const H8={kernelName:gC,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{paddings:r,constantValue:a}=i;I2(s,"pad");const o=r.map(((t,e)=>t[0]+s.shape[e]+t[1])),l=r.map((t=>t[0])),u=n.data.get(s.dataId).values,h=IO(s.shape),p=s.shape.length,c=zO(s.shape),d=IO(o),f=o.length,m=zO(o),g=kO(s.dtype,d);0!==a&&g.fill(a);for(let t=0;tt+l[e])),f,m)]=u[t]}return{dataId:n.write(g,o,s.dtype),shape:o,dtype:s.dtype}}},W8=S2(((t,e)=>Math.pow(t,e))),z8=F2(TC,W8),X8={kernelName:TC,backendName:"cpu",kernelFunc:z8};const j8={kernelName:EC,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{paramsNestedSplits:s,paramsDenseValues:r,indices:a}=e,{outputRaggedRank:o}=i,l=s.map((t=>n.data.get(t.dataId).values)),u=s.map((t=>t.shape)),h=n.data.get(r.dataId).values,p=n.data.get(a.dataId).values,[c,d,f]=i4(l,u,h,r.shape,r.dtype,p,a.shape),m=c.map((t=>n.makeTensorInfo([t.length],"int32",t))),g=n.makeTensorInfo(f,r.dtype,d);return m.concat([g])}};const q8={kernelName:bC,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2022 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{starts:i,limits:s,deltas:r}=e,a=n.data.get(i.dataId).values,o=n.data.get(s.dataId).values,l=n.data.get(r.dataId).values,[u,h]=r4(a,i.shape,i.dtype,o,s.shape,l,r.shape);return[n.makeTensorInfo([u.length],"int32",u),n.makeTensorInfo([h.length],i.dtype,h)]}};const K8={kernelName:vC,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{shape:s,values:r,defaultValue:a,rowPartitionTensors:o}=e,{rowPartitionTypes:l}=i,u=n.data.get(s.dataId).values,h=n.data.get(r.dataId).values,p=n.data.get(a.dataId).values,c=o.map((t=>n.data.get(t.dataId).values)),d=o.map((t=>t.shape)),[f,m]=h4(u,s.shape,h,r.shape,r.dtype,p,a.shape,c,d,l);return n.makeTensorInfo(f,r.dtype,m)}};const Q8={kernelName:wC,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{backend:e,attrs:n}=t,{start:i,stop:s,dtype:r,step:a}=n,o=p4(i,s,a,r);return e.makeTensorInfo([o.length],r,o)}},J8=j2(xC,(t=>1/t)),Z8={kernelName:xC,backendName:"cpu",kernelFunc:J8};const t9={kernelName:CC,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{images:s}=e,{alignCorners:r,halfPixelCenters:a,size:o}=i;I2(s,"resizeBilinear");const l=zO(s.shape),[u,h]=o,[p,c,d,f]=s.shape,m=n.data.get(s.dataId).values,g=new Float32Array(IO([p,u,h,f])),_=[r&&u>1?c-1:c,r&&h>1?d-1:d],T=[r&&u>1?u-1:u,r&&h>1?h-1:h];let y=0;const I=_[0]/T[0],E=_[1]/T[1];for(let t=0;t1?u-1:u,a&&d>1?h-1:h],g=[a&&c>1?c-1:c,a&&d>1?d-1:d],_=m[0]/g[0],T=m[1]/g[1],y=n.data.get(r.dataId).values;let I=0;for(let t=0;t1?c-1:c,r&&h>1?d-1:d],T=[r&&u>1?u-1:u,r&&h>1?h-1:h],y=_[0]/T[0],I=_[1]/T[1];let E=0;for(let t=0;t1?h-1:h,a&&f>1?p-1:p],T=[a&&d>1?d-1:d,a&&f>1?f-1:f],y=_[0]/T[0],I=_[1]/T[1],E=1/y,b=1/I,v=2*Math.ceil(E)+2,w=2*Math.ceil(b)+2;for(let t=0;t=d)continue;const c=e+u*l[1],m=u*y;if(t===Math.min(h-1,a?Math.round(m):Math.floor(m)))for(let t=0;t=f)continue;const s=c+e*l[2],r=e*I;i===Math.min(p-1,a?Math.round(r):Math.floor(r))&&(o+=g[s+n])}}m[r+n]=o}}}}return n.makeTensorInfo(s.shape,s.dtype,m)}};const s9={kernelName:DC,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{dims:r}=i;I2(s,"reverse");const a=s.shape.length,o=CO(r,s.shape);if(0===a)return A2({inputs:{x:s},backend:n});const l=new bk(s.shape,s.dtype),u=n.bufferSync(s);for(let t=0;tn[t]=s.shape[t]-1-n[t])),l.set(u.get(...n),...e)}return n.makeTensorInfo(l.shape,l.dtype,l.values)}},r9={kernelName:SN,backendName:"cpu",kernelFunc:({inputs:t,attrs:e,backend:n})=>{const{image:i}=t,{radians:s,fillValue:r,center:a}=e,o=n,l=kO(i.dtype,IO(i.shape)),[u,h,p,c]=i.shape,[d,f]=mG(a,h,p),m=Math.sin(s),g=Math.cos(s),_=o.data.get(i.dataId).values;for(let t=0;t=0&&I=0&&E{const e=Math.floor(t);return t-e<.5?Math.floor(t):t-e>.5?Math.ceil(t):e%2==0?e:e+1})),o9={kernelName:LC,backendName:"cpu",kernelFunc:a9};const l9={kernelName:PC,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{indices:s,updates:r}=e,{shape:a}=i,{sliceRank:o,numUpdates:l,sliceSize:u,strides:h,outputSize:p}=hP(0,s,a),c=m4(n.bufferSync(s),n.bufferSync(r),a,p,u,l,o,h,0,!0);return n.makeTensorInfo(a,c.dtype,c.values)}}; +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function u9(t,e){let n=0,i=t.length,s=0;for(;n1||1===s.shape.length?1:IO(s.shape.slice(1));for(let t=0;tt>=0?f9*t:d9*(Math.exp(t)-1))),g9={kernelName:UC,backendName:"cpu",kernelFunc:m9},_9=j2(WC,(t=>t<0?-1:t>0?1:0)),T9={kernelName:WC,backendName:"cpu",kernelFunc:_9},y9=j2(GC,(t=>Math.sin(t))),I9={kernelName:GC,backendName:"cpu",kernelFunc:y9},E9=j2(HC,(t=>Math.sinh(t))),b9={kernelName:HC,backendName:"cpu",kernelFunc:E9},v9=Math.log(1.1920928955078125e-7)+2,w9=j2(XC,(t=>{const e=t>-v9,n=tNumber(t))))),n.makeTensorInfo([m.length],i.dtype,new Int32Array(m))]}};const O9={kernelName:tN,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{inputIndices:i,inputShape:s,newShape:r}=e;if(2!==i.shape.length)throw new Error(`Input indices should be a matrix but received shape\n ${i.shape}`);if(1!==s.shape.length)throw new Error(`Input shape should be a vector but received shape\n ${s.shape}`);if(1!==r.shape.length)throw new Error(`Target shape should be a vector but received shape ${r.shape}`);const a=Array.from(n.data.get(s.dataId).values),o=n.data.get(i.dataId).values,l=Array.from(n.data.get(r.dataId).values),[u,h,p]=v4(o,i.shape,i.dtype,a,l);return[n.makeTensorInfo(h,i.dtype,u),n.makeTensorInfo([p.length],r.dtype,new Int32Array(p))]}};const A9={kernelName:eN,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{data:i,indices:s,segmentIds:r}=e;if(i.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==s.shape.length)throw new Error(`Indices should be a vector but received shape\n ${s.shape}`);if(1!==r.shape.length)throw new Error(`Segment ids should be a vector but received shape\n ${r.shape}`);if(s.shape[0]!==r.shape[0])throw new Error("segmentIds and indices should have same size.");const a=n.data.get(i.dataId).values,o=n.data.get(s.dataId).values,l=n.data.get(r.dataId).values,[u,h]=w4(a,i.shape,i.dtype,o,l,!0);return n.makeTensorInfo(h,i.dtype,u)}};const M9={kernelName:nN,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{data:i,indices:s,segmentIds:r}=e;if(i.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==s.shape.length)throw new Error(`Indices should be a vector but received shape\n ${s.shape}`);if(1!==r.shape.length)throw new Error(`Segment ids should be a vector but received shape\n ${r.shape}`);if(s.shape[0]!==r.shape[0])throw new Error("segmentIds and indices should have same size.");const a=n.data.get(i.dataId).values,o=n.data.get(s.dataId).values,l=n.data.get(r.dataId).values,[u,h]=w4(a,i.shape,i.dtype,o,l);return n.makeTensorInfo(h,i.dtype,u)}};const C9={kernelName:iN,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{sparseIndices:s,sparseValues:r,defaultValue:a}=e,{outputShape:o}=i,{sliceRank:l,numUpdates:u,sliceSize:h,strides:p,outputSize:c}=hP(0,s,o),d=!1,f=n.bufferSync(s);let m;switch(r.dtype){case"bool":m=m4(f,n.bufferSync(r),o,c,h,u,l,p,Boolean(n.data.get(a.dataId).values[0]),d);break;case"float32":m=m4(f,n.bufferSync(r),o,c,h,u,l,p,n.data.get(a.dataId).values[0],d);break;case"int32":m=m4(f,n.bufferSync(r),o,c,h,u,l,p,n.data.get(a.dataId).values[0],d);break;case"string":m=m4(f,n.bufferSync(r),o,c,h,u,l,p,lk(n.data.get(a.dataId).values[0]),d);break;default:throw new Error(`Unsupported type ${r.dtype}`)}return n.makeTensorInfo(o,m.dtype,m.values)}};const N9={kernelName:QC,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{numOrSizeSplits:r,axis:a}=i,o=CO(a,s.shape)[0],l=XG(s,r,o),u=new Array(s.shape.length).fill(0),h=s.shape.slice();return l.map((t=>{const e=[...h];e[o]=t;const i=I4({inputs:{x:s},backend:n,attrs:{begin:u,size:e}});return u[o]+=t,i}))}},k9={kernelName:rN,backendName:"cpu",kernelFunc:({inputs:t,backend:e})=>{const{x:n}=t,i=e;I2(n,"square");const s=i.data.get(n.dataId).values,r=new Float32Array(s.length);for(let t=0;t{const n=e;return isNaN(t)?NaN:t>0?1:n.alpha})),L9={kernelName:vN,backendName:"cpu",kernelFunc:D9};const F9={kernelName:oN,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{begin:r,end:a,strides:o,beginMask:l,endMask:u,ellipsisMask:h,newAxisMask:p,shrinkAxisMask:c}=i;I2(s,"stridedSlice");const{finalShapeSparse:d,finalShape:f,isIdentity:m,sliceDim0:g,isSimpleSlice:_,begin:T,end:y,strides:I}=OP(s.shape,r,a,o,l,u,h,p,c);let E;if(m)E=l5({inputs:{x:s},backend:n,attrs:{shape:f}});else if(g||_){_O(s.shape.length>=1,(()=>`Input must have rank at least 1, got: ${s.shape.length}`));const t=mP(T,y,I),e=I4({inputs:{x:s},backend:n,attrs:{begin:T,size:t}});E=l5({inputs:{x:e},backend:n,attrs:{shape:f}}),n.disposeIntermediateTensorInfo(e)}else{const t=D4(d,n.bufferSync(s),I,T);E=n.makeTensorInfo(f,t.dtype,t.values)}return E}};const P9={kernelName:lN,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{separator:s,nGramWidths:r,leftPad:a,rightPad:o,padWidth:l,preserveShortSequences:u}=i,{data:h,dataSplits:p}=e,c=n.data.get(h.dataId).values,d=n.data.get(p.dataId).values,[f,m]=F4(c,d,s,r,a,o,l,u);return[n.makeTensorInfo([f.length],"string",f),n.makeTensorInfo(p.shape,"int32",m)]}};const $9={kernelName:uN,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{skipEmpty:s}=i,{input:r,delimiter:a}=e;if("string"!==r.dtype)throw new Error("Input must be of datatype string");if(1!==r.shape.length)throw new Error(`Input must be a vector, got shape: ${r.shape}`);if(0!==a.shape.length)throw new Error(`Delimiter must be a scalar, got shape: ${a.shape}`);const o=n.data.get(r.dataId).values,l=n.data.get(a.dataId).values[0],[u,h,p]=$4(o,l,s),c=h.length;return[n.makeTensorInfo([c,2],"int32",u),n.makeTensorInfo([c],"string",h),n.makeTensorInfo([2],"int32",new Int32Array(p))]}};const B9={kernelName:hN,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{numBuckets:s}=i,{input:r}=e;if("string"!==r.dtype)throw new Error("Input must be of datatype string");if(s<=0)throw new Error("Number of buckets must be at least 1");const a=B4(n.data.get(r.dataId).values,s);return n.makeTensorInfo(r.shape,"int32",a)}},V9=j2(cN,(t=>Math.tan(t))),U9={kernelName:cN,backendName:"cpu",kernelFunc:V9},Y9=j2(dN,(t=>Math.tanh(t)));const G9={kernelName:$C,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{tensor:i,indices:s,updates:r}=e,{sliceRank:a,numUpdates:o,sliceSize:l,strides:u,outputSize:h}=hP(0,s,i.shape),p=n.bufferSync(s),c=n.bufferSync(r),d=n.bufferSync(i),f=m4(p,c,i.shape,h,l,o,a,u,d,!1);return n.makeTensorInfo(i.shape,f.dtype,f.values)}};const H9={kernelName:fN,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{reps:r}=i;I2(s,"tile");const a=H4(n.bufferSync(s),r);return n.makeTensorInfo(a.shape,a.dtype,a.values)}};const W9={kernelName:mN,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{k:r,sorted:a}=i;I2(s,"topk");const o=n.data.get(s.dataId).values,[l,u]=X4(o,s.shape,s.dtype,r,a);return[n.makeTensorInfo(l.shape,l.dtype,l.values),n.makeTensorInfo(u.shape,u.dtype,u.values)]}};const z9={kernelName:gN,backendName:"cpu",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,attrs:n,backend:i}=t,{image:s,transforms:r}=e,{interpolation:a,fillMode:o,fillValue:l,outputShape:u}=n,[h,p,c,d]=s.shape,[f,m]=null!=u?u:[p,c],g=[h,f,m,d],_=zO(s.shape),T=_[0],y=_[1],I=_[2],E=zO(g),b=E[0],v=E[1],w=E[2],S=kO(s.dtype,IO(g));S.fill(l);const x=i.data.get(s.dataId).values,R=i.data.get(r.dataId).values;for(let t=0;te-1)if(e<=1)n=0;else{const t=2*e;n-=t*Math.trunc(n/t),n>=e&&(n=t-n-1)}return pO(0,n,e-1)}(t,e);case"wrap":return function(t,e){let n=t;if(n<0)if(e<=1)n=0;else{const t=e-1;n+=e*(Math.trunc(-n/t)+1)}else if(n>e-1)if(e<=1)n=0;else{const t=e-1;n-=e*Math.trunc(n/t)}return pO(0,n,e-1)}(t,e);case"nearest":return function(t,e){return pO(0,t,e-1)}(t,e);default:return function(t){return t}(t)}}function j9(t,e,n,i,s,r,a,o,l,u,h){return 0<=o&&on.disposeIntermediateTensorInfo(t))),p}},t7=[c5,w2,f5,g5,U2,_5,T5,y5,I5,E5,v5,S5,R5,M5,N5,F5,P5,$5,B5,p5,V5,U5,Y5,z2,G5,L2,J2,W5,R2,z5,K5,J5,Z5,t6,e6,n6,i6,r6,o6,l6,u6,h6,p6,c6,f6,m6,g6,_6,T6,y6,I6,E6,w6,Q4,S6,n3,k6,r3,L6,l3,Y6,H6,W6,p3,f3,z6,X6,j6,q6,y3,b3,M2,K6,j5,J6,t8,n8,Z4,S3,O3,i8,N3,r8,l8,h8,d8,f8,m8,_8,F3,T8,y8,I8,E8,b8,v8,w8,B3,S8,O8,C8,G3,W3,k8,L8,P8,j3,$8,U8,G8,H8,X8,n5,Z3,j8,q8,K8,Q8,N2,$6,Z8,s5,a5,u5,t9,e9,n9,i9,s9,r9,o9,f4,l9,p9,c9,g9,T4,T9,I9,b9,E4,M8,S9,x9,R9,O9,A9,M9,C9,N9,R4,k9,M4,k4,L9,F9,P9,$9,B9,G4,v6,U9,{kernelName:dN,backendName:"cpu",kernelFunc:Y9},G9,H9,W9,z9,Q3,Q9,J9,Z9,V8];for(const t of t7)FN(t); +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const e7={},n7={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function i7(t,e){e7[t]=e}function s7(t,e){if(!(t in e7)||null!=e){const n=function(t,e){if(1!==t&&2!==t)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");const n=null==e?function(t){if(aA().getBool("IS_SAFARI")||"undefined"==typeof OffscreenCanvas||2!==t){if("undefined"!=typeof document)return document.createElement("canvas");throw new Error("Cannot create a canvas in this context")}return new OffscreenCanvas(300,150)}(t):e;n.addEventListener("webglcontextlost",(e=>{e.preventDefault(),delete e7[t]}),!1),aA().getBool("SOFTWARE_WEBGL_ENABLED")&&(n7.failIfMajorPerformanceCaveat=!1);if(1===t)return n.getContext("webgl",n7)||n.getContext("experimental-webgl",n7);return n.getContext("webgl2",n7)}(t,e);if(null===n)return console.log("Could not get context for WebGL version",t),null;e7[t]=n}const n=e7[t];return null==n||n.isContextLost()?(delete e7[t],s7(t)):(n.disable(n.DEPTH_TEST),n.disable(n.STENCIL_TEST),n.disable(n.BLEND),n.disable(n.DITHER),n.disable(n.POLYGON_OFFSET_FILL),n.disable(n.SAMPLE_COVERAGE),n.enable(n.SCISSOR_TEST),n.enable(n.CULL_FACE),n.cullFace(n.BACK),e7[t])} +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +var r7,a7,o7;function l7(t,e){return[e,t]}function u7(t){const e=IO(t);return xO(Math.ceil(e/4))}function h7(t,e){return[Math.max(1,Math.ceil(e/2)),Math.max(1,Math.ceil(t/2))]}function p7(t,e){const n=t;let i,s,r,a,o,l,u,h,p,c;return 2===aA().getNumber("WEBGL_VERSION")?(i=n.R32F,s=n.R16F,r=n.RGBA16F,a=n.RGBA32F,o=n.RED,u=4,h=1,p=n.HALF_FLOAT,c=n.FLOAT,l=n.RGBA8):(i=t.RGBA,s=t.RGBA,r=t.RGBA,a=n.RGBA,o=t.RGBA,u=4,h=4,p=null!=e?e.HALF_FLOAT_OES:null,c=t.FLOAT,l=t.RGBA),{internalFormatFloat:i,internalFormatHalfFloat:s,internalFormatPackedHalfFloat:r,internalFormatPackedFloat:a,textureFormatFloat:o,downloadTextureFormat:l,downloadUnpackNumChannels:u,defaultNumChannels:h,textureTypeHalfFloat:p,textureTypeFloat:c}} +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function c7(t,e){const n=e();return aA().getBool("DEBUG")&&function(t){const e=t.getError();if(e!==t.NO_ERROR)throw new Error("WebGL Error: "+g7(t,e))}(t),n}!function(t){t[t.DENSE=0]="DENSE",t[t.SHARED_BATCH=1]="SHARED_BATCH"}(r7||(r7={})),function(t){t[t.RENDER=0]="RENDER",t[t.UPLOAD=1]="UPLOAD",t[t.PIXELS=2]="PIXELS",t[t.DOWNLOAD=3]="DOWNLOAD"}(a7||(a7={})),function(t){t[t.UNPACKED_FLOAT16=0]="UNPACKED_FLOAT16",t[t.UNPACKED_FLOAT32=1]="UNPACKED_FLOAT32",t[t.PACKED_4X1_UNSIGNED_BYTE=2]="PACKED_4X1_UNSIGNED_BYTE",t[t.PACKED_2X2_FLOAT32=3]="PACKED_2X2_FLOAT32",t[t.PACKED_2X2_FLOAT16=4]="PACKED_2X2_FLOAT16"}(o7||(o7={}));const d7=5.96e-8,f7=65504;function m7(t){return!!(aA().getBool("WEBGL_RENDER_FLOAT32_ENABLED")||0===t||d7t.getExtension(e)),'Extension "'+e+'" not supported on this browser.')}function T7(t,e){const n=Y7(t,(()=>t.createShader(t.VERTEX_SHADER)),"Unable to create vertex WebGLShader.");if(c7(t,(()=>t.shaderSource(n,e))),c7(t,(()=>t.compileShader(n))),!1===t.getShaderParameter(n,t.COMPILE_STATUS))throw console.log(t.getShaderInfoLog(n)),new Error("Failed to compile vertex shader.");return n}function y7(t,e){const n=Y7(t,(()=>t.createShader(t.FRAGMENT_SHADER)),"Unable to create fragment WebGLShader.");if(c7(t,(()=>t.shaderSource(n,e))),c7(t,(()=>t.compileShader(n))),aA().get("ENGINE_COMPILE_ONLY"))return n;if(!1===t.getShaderParameter(n,t.COMPILE_STATUS))throw E7(e,t.getShaderInfoLog(n)),new Error("Failed to compile fragment shader.");return n}const I7=/ERROR: [0-9]+:([0-9]+):/g;function E7(t,e){const n=I7.exec(e);if(null==n)return console.log(`Couldn't parse line number in error: ${e}`),void console.log(t);const i=+n[1],s=t.split("\n"),r=s.length.toString().length+2,a=s.map(((t,e)=>OO((e+1).toString(),r)+t));let o=0;for(let t=0;tt.createProgram()),"Unable to create WebGLProgram.")}function v7(t,e){if(c7(t,(()=>t.linkProgram(e))),!aA().get("ENGINE_COMPILE_ONLY")&&!1===t.getProgramParameter(e,t.LINK_STATUS))throw console.log(t.getProgramInfoLog(e)),new Error("Failed to link vertex and fragment shaders.")}function w7(t,e){if(c7(t,(()=>t.validateProgram(e))),!1===t.getProgramParameter(e,t.VALIDATE_STATUS))throw console.log(t.getProgramInfoLog(e)),new Error("Shader program validation failed.")}function S7(t,e){const n=Y7(t,(()=>t.createBuffer()),"Unable to create WebGLBuffer");return c7(t,(()=>t.bindBuffer(t.ARRAY_BUFFER,n))),c7(t,(()=>t.bufferData(t.ARRAY_BUFFER,e,t.STATIC_DRAW))),n}function x7(t,e){const n=Y7(t,(()=>t.createBuffer()),"Unable to create WebGLBuffer");return c7(t,(()=>t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n))),c7(t,(()=>t.bufferData(t.ELEMENT_ARRAY_BUFFER,e,t.STATIC_DRAW))),n}function R7(){return 2===aA().getNumber("WEBGL_VERSION")?1:4}function O7(t){return Y7(t,(()=>t.createTexture()),"Unable to create WebGLTexture.")}function A7(t,e){const n=aA().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(t<=0||e<=0){throw new Error("Requested texture size "+`[${t}x${e}]`+" is invalid.")}if(t>n||e>n){throw new Error("Requested texture size "+`[${t}x${e}]`+" greater than WebGL maximum on this browser / GPU "+`[${n}x${n}]`+".")}}function M7(t){return Y7(t,(()=>t.createFramebuffer()),"Unable to create WebGLFramebuffer.")}function C7(t,e,n,i,s,r,a){const o=t.getAttribLocation(e,n);return-1!==o&&(c7(t,(()=>t.bindBuffer(t.ARRAY_BUFFER,i))),c7(t,(()=>t.vertexAttribPointer(o,s,t.FLOAT,!1,r,a))),c7(t,(()=>t.enableVertexAttribArray(o))),!0)}function N7(t,e,n){G7(t,n),c7(t,(()=>t.activeTexture(t.TEXTURE0+n))),c7(t,(()=>t.bindTexture(t.TEXTURE_2D,e)))}function k7(t,e){G7(t,e),c7(t,(()=>t.activeTexture(t.TEXTURE0+e))),c7(t,(()=>t.bindTexture(t.TEXTURE_2D,null)))}function D7(t,e,n){return Y7(t,(()=>t.getUniformLocation(e,n)),'uniform "'+n+'" not present in program.')}function L7(t,e,n){return t.getUniformLocation(e,n)}function F7(t,e,n,i){c7(t,(()=>N7(t,e,i))),c7(t,(()=>t.uniform1i(n,i)))}function P7(t){c7(t,(()=>t.bindFramebuffer(t.FRAMEBUFFER,null))),c7(t,(()=>t.viewport(0,0,t.canvas.width,t.canvas.height))),c7(t,(()=>t.scissor(0,0,t.canvas.width,t.canvas.height)))}function $7(t,e,n){c7(t,(()=>t.bindFramebuffer(t.FRAMEBUFFER,n))),c7(t,(()=>t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0)))}function B7(t,e){c7(t,(()=>t.bindFramebuffer(t.FRAMEBUFFER,e))),c7(t,(()=>t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,null,0)))}function V7(t){const e=t.checkFramebufferStatus(t.FRAMEBUFFER);if(e!==t.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+U7(t,e))}function U7(t,e){switch(e){case t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case t.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return`unknown error ${e}`}}function Y7(t,e,n){const i=c7(t,(()=>e()));if(null==i)throw new Error(n);return i}function G7(t,e){const n=t.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1,i=e+t.TEXTURE0;if(in){throw new Error(`textureUnit must be in ${`[gl.TEXTURE0, gl.TEXTURE${n}]`}.`)}}function H7(t,e=2){return IO(t.slice(0,t.length-e))}function W7(t){if(0===t.length)throw Error("Cannot get rows and columns of an empty shape array.");return[t.length>1?t[t.length-2]:1,t[t.length-1]]}function z7(t){let e=[1,1,1];return 0===t.length||1===t.length&&1===t[0]||(e=[H7(t),...W7(t)]),e}function X7(t,e=!1){let n=aA().getNumber("WEBGL_MAX_TEXTURE_SIZE"),i=aA().getNumber("WEBGL_MAX_SIZE_FOR_NARROW_TEXTURE");if(i===1/0&&aA().getBool("WEBGL_AUTO_SQUARIFY_NARROW_TEXTURE_SHAPE")&&(i=n/2),e&&(n*=2,i*=2,1===(t=t.map(((e,n)=>n>=t.length-2?cO(t[n]):t[n]))).length&&(t=[2,t[0]])),2!==t.length){const e=NO(t);t=e.newShape}let s=IO(t),r=null;t.length<=1&&s<=n?r=[1,s]:2===t.length&&t[0]<=n&&t[1]<=n?r=t:3===t.length&&t[0]*t[1]<=n&&t[2]<=n?r=[t[0]*t[1],t[2]]:3===t.length&&t[0]<=n&&t[1]*t[2]<=n?r=[t[0],t[1]*t[2]]:4===t.length&&t[0]*t[1]*t[2]<=n&&t[3]<=n?r=[t[0]*t[1]*t[2],t[3]]:4===t.length&&t[0]<=n&&t[1]*t[2]*t[3]<=n&&(r=[t[0],t[1]*t[2]*t[3]]);const a=null!=r&&Math.max(...r)>i&&Math.min(...r)<=(e?2:1)&&Math.min(...r)>0;if(null==r||a)if(e){const e=H7(t);let n=2,i=2;t.length&&([n,i]=W7(t)),s=e*(n/2)*(i/2),r=xO(s).map((t=>2*t))}else r=xO(s);return r}function j7(t){return t%2==0}function q7(t,e){if(vO(t=t.slice(-2),e=e.slice(-2)))return!0;if(!t.length||!e.length)return!0;if(0===t[0]||0===t[1]||0===e[0]||0===e[1])return!0;if(t.length!==e.length){const n=t[t.length-1],i=e[e.length-1];if(n===i)return!0;if(j7(n)&&j7(i)&&(1===t[0]||1===e[0]))return!0}return t[1]===e[1]&&j7(t[0])&&j7(e[0])}let K7,Q7;function J7(t){if(null==K7){const e=s7(t);K7=e.getParameter(e.MAX_TEXTURE_SIZE)}return K7}function Z7(){K7=null}function ttt(){Q7=null}function ett(t){if(null==Q7){const e=s7(t);Q7=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,Q7)}function ntt(t){if(0===t)return 0;let e;const n=s7(t);return e=itt(n,"EXT_disjoint_timer_query_webgl2")&&2===t?2:itt(n,"EXT_disjoint_timer_query")?1:0,e}function itt(t,e){return null!=t.getExtension(e)}function stt(t){try{if(null!=s7(t))return!0}catch(t){return console.log("Error when getting WebGL context: ",t),!1}return!1}function rtt(t){if(0===t)return!1;const e=s7(t);if(1===t){if(!itt(e,"OES_texture_float"))return!1}else if(!itt(e,"EXT_color_buffer_float"))return!1;return ott(e)}function att(t){if(0===t)return!1;const e=s7(t);if(1!==t){if(itt(e,"EXT_color_buffer_float"))return ott(e);const t="EXT_color_buffer_half_float";if(itt(e,t)){const n=e.getExtension(t);return function(t,e){const n=p7(t,e),i=t.createTexture();t.bindTexture(t.TEXTURE_2D,i);const s=1,r=1;t.texImage2D(t.TEXTURE_2D,0,n.internalFormatHalfFloat,s,r,0,n.textureFormatFloat,n.textureTypeHalfFloat,null);const a=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,a),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0);const o=t.checkFramebufferStatus(t.FRAMEBUFFER)===t.FRAMEBUFFER_COMPLETE;return t.bindTexture(t.TEXTURE_2D,null),t.bindFramebuffer(t.FRAMEBUFFER,null),t.deleteTexture(i),t.deleteFramebuffer(a),o}(e,n)}return!1}if(!itt(e,"OES_texture_float"))return!1;if(!itt(e,"WEBGL_color_buffer_float"))return!1;return ott(e)}function ott(t){const e=p7(t),n=t.createTexture();t.bindTexture(t.TEXTURE_2D,n);t.texImage2D(t.TEXTURE_2D,0,e.internalFormatFloat,1,1,0,e.textureFormatFloat,e.textureTypeFloat,null);const i=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,i),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0);const s=t.checkFramebufferStatus(t.FRAMEBUFFER)===t.FRAMEBUFFER_COMPLETE;return t.bindTexture(t.TEXTURE_2D,null),t.bindFramebuffer(t.FRAMEBUFFER,null),t.deleteTexture(n),t.deleteFramebuffer(i),s}function ltt(t){if(2!==t)return!1;return null!=s7(t).fenceSync}function utt(t,e){Array.isArray(t)||(t=[t]),t.forEach((t=>{null!=t&&_O("complex64"!==t.dtype,(()=>`${e} does not support complex64 tensors in the WebGL backend.`))}))} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const htt=aA(); +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function ptt(){let t,e,n,i,s,r,a,o,l,u;return 2===aA().getNumber("WEBGL_VERSION")?(t="#version 300 es",e="in",n="out",i="in",s="texture",r="outputColor",a="out vec4 outputColor;",o=aA().getBool("WEBGL2_ISNAN_CUSTOM")?"\n bool isnan_custom(float val) {\n uint floatToUint = floatBitsToUint(val);\n return (floatToUint & 0x7fffffffu) > 0x7f800000u;\n }\n\n bvec4 isnan_custom(vec4 val) {\n return bvec4(isnan_custom(val.x),\n isnan_custom(val.y), isnan_custom(val.z), isnan_custom(val.w));\n }\n\n #define isnan(value) isnan_custom(value)\n ":"",l="",u="\n #define round(value) newRound(value)\n int newRound(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 newRound(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n "):(t="",e="attribute",n="varying",i="varying",s="texture2D",r="gl_FragColor",a="",o="\n #define isnan(value) isnan_custom(value)\n bool isnan_custom(float val) {\n return (val > 0. || val < 1. || val == 0.) ? false : true;\n }\n bvec4 isnan_custom(vec4 val) {\n return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));\n }\n ",l="\n uniform float INFINITY;\n\n bool isinf(float val) {\n return abs(val) == INFINITY;\n }\n bvec4 isinf(vec4 val) {\n return equal(abs(val), vec4(INFINITY));\n }\n ",u="\n int round(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 round(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n "),{version:t,attribute:e,varyingVs:n,varyingFs:i,texture2D:s,output:r,defineOutput:a,defineSpecialNaN:o,defineSpecialInf:l,defineRound:u}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function ctt(t,e,n="index"){const i=zO(e);return i.map(((e,s)=>`${`int ${t[s]} = ${n} / ${e}`}; ${s===i.length-1?`int ${t[s+1]} = ${n} - ${t[s]} * ${e}`:`index -= ${t[s]} * ${e}`};`)).join("")}function dtt(t,e,n="index"){const i=zO(e);return i.map(((e,s)=>`${`int ${t[s]} = ${n} / outShapeStrides[${s}]`}; ${s===i.length-1?`int ${t[s+1]} = ${n} - ${t[s]} * outShapeStrides[${s}]`:`index -= ${t[s]} * outShapeStrides[${s}]`};`)).join("")}function ftt(t,e,n="index"){const i=function(t,e){const n=t.length,i=t.map((t=>`${e}[${t}]`)),s=new Array(n-1);s[n-2]=i[n-1];for(let t=n-3;t>=0;--t)s[t]=`(${s[t+1]} * ${i[t+1]})`;return s}(t.map(((t,e)=>e)),e);return i.map(((e,s)=>`${`int ${t[s]} = ${n} / ${i[s]}`}; ${s===i.length-1?`int ${t[s+1]} = ${n} - ${t[s]} * ${i[s]}`:`index -= ${t[s]} * ${i[s]}`};`)).join("")}function mtt(t){const e=zO(t).map((t=>t.toString()));return`\n int getFlatIndex(ivec3 coords) {\n return coords.x * ${e[0]} + coords.y * ${e[1]} + coords.z;\n }\n`}htt.registerFlag("HAS_WEBGL",(()=>htt.getNumber("WEBGL_VERSION")>0)),htt.registerFlag("WEBGL_VERSION",(()=>stt(2)?2:stt(1)?1:0)),htt.registerFlag("WEBGL_CHECK_NUMERICAL_PROBLEMS",(()=>!1)),htt.registerFlag("WEBGL_BUFFER_SUPPORTED",(()=>2===htt.get("WEBGL_VERSION"))),htt.registerFlag("WEBGL_CPU_FORWARD",(()=>!0)),htt.registerFlag("WEBGL_FORCE_F16_TEXTURES",(()=>!1)),htt.registerFlag("WEBGL_PACK",(()=>htt.getBool("HAS_WEBGL"))),htt.registerFlag("WEBGL_PACK_NORMALIZATION",(()=>htt.getBool("WEBGL_PACK"))),htt.registerFlag("WEBGL_PACK_CLIP",(()=>htt.getBool("WEBGL_PACK"))),htt.registerFlag("WEBGL_PACK_DEPTHWISECONV",(()=>htt.getBool("WEBGL_PACK"))),htt.registerFlag("WEBGL_PACK_BINARY_OPERATIONS",(()=>htt.getBool("WEBGL_PACK"))),htt.registerFlag("WEBGL_PACK_UNARY_OPERATIONS",(()=>htt.getBool("WEBGL_PACK"))),htt.registerFlag("WEBGL_PACK_ARRAY_OPERATIONS",(()=>htt.getBool("WEBGL_PACK"))),htt.registerFlag("WEBGL_PACK_IMAGE_OPERATIONS",(()=>htt.getBool("WEBGL_PACK"))),htt.registerFlag("WEBGL_PACK_REDUCE",(()=>htt.getBool("WEBGL_PACK"))),htt.registerFlag("WEBGL_LAZILY_UNPACK",(()=>htt.getBool("WEBGL_PACK"))),htt.registerFlag("WEBGL_CONV_IM2COL",(()=>htt.getBool("WEBGL_PACK"))),htt.registerFlag("WEBGL_PACK_CONV2DTRANSPOSE",(()=>htt.getBool("WEBGL_PACK"))),htt.registerFlag("WEBGL_MAX_TEXTURE_SIZE",(()=>J7(htt.getNumber("WEBGL_VERSION")))),htt.registerFlag("WEBGL_MAX_TEXTURES_IN_SHADER",(()=>ett(htt.getNumber("WEBGL_VERSION")))),htt.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",(()=>{const t=htt.getNumber("WEBGL_VERSION");return 0===t?0:ntt(t)})),htt.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",(()=>htt.getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0&&!Jk())),htt.registerFlag("WEBGL_RENDER_FLOAT32_CAPABLE",(()=>rtt(htt.getNumber("WEBGL_VERSION")))),htt.registerFlag("WEBGL_RENDER_FLOAT32_ENABLED",(()=>!htt.getBool("WEBGL_FORCE_F16_TEXTURES")&&htt.getBool("WEBGL_RENDER_FLOAT32_CAPABLE"))),htt.registerFlag("WEBGL_DOWNLOAD_FLOAT_ENABLED",(()=>att(htt.getNumber("WEBGL_VERSION")))),htt.registerFlag("WEBGL_FENCE_API_ENABLED",(()=>ltt(htt.getNumber("WEBGL_VERSION")))),htt.registerFlag("WEBGL_SIZE_UPLOAD_UNIFORM",(()=>htt.getBool("WEBGL_RENDER_FLOAT32_ENABLED")?4:0)),htt.registerFlag("WEBGL_DELETE_TEXTURE_THRESHOLD",(()=>-1),(t=>{if("number"!=typeof t)throw new Error(`WEBGL_DELETE_TEXTURE_THRESHOLD must be a number but got ${t}.`);if(t<0&&-1!==t)throw new Error(`WEBGL_DELETE_TEXTURE_THRESHOLD must be -1 (indicating never delete) or at least 0, but got ${t}.`)})),htt.registerFlag("WEBGL_FLUSH_THRESHOLD",(()=>Jk()?1:-1),(t=>{if("number"!=typeof t)throw new Error(`WEBGL_FLUSH_THRESHOLD must be a number but got ${t}.`);if(t<0&&-1!==t)throw new Error(`WEBGL_FLUSH_THRESHOLD must be -1 (indicating never manual flush) or at least 0, but got ${t}.`)})),htt.registerFlag("CPU_HANDOFF_SIZE_THRESHOLD",(()=>128)),htt.registerFlag("WEBGL_USE_SHAPES_UNIFORMS",(()=>!1)),htt.registerFlag("TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD",(()=>1e5)),htt.registerFlag("TOPK_K_CPU_HANDOFF_THRESHOLD",(()=>128)),htt.registerFlag("WEBGL_EXP_CONV",(()=>!1)),htt.registerFlag("SOFTWARE_WEBGL_ENABLED",(()=>htt.getBool("IS_TEST"))),htt.registerFlag("WEBGL_MAX_SIZE_FOR_NARROW_TEXTURE",(()=>1/0)),htt.registerFlag("WEBGL_AUTO_SQUARIFY_NARROW_TEXTURE_SHAPE",(()=>!1)),htt.registerFlag("WEBGL2_ISNAN_CUSTOM",(()=>!1)),htt.registerFlag("ENGINE_COMPILE_ONLY",(()=>!1));const gtt="\n const float FLOAT_MAX = 1.70141184e38;\n const float FLOAT_MIN = 1.17549435e-38;\n\n lowp vec4 encode_float(highp float v) {\n if (isnan(v)) {\n return vec4(255, 255, 255, 255);\n }\n\n highp float av = abs(v);\n\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n highp float e = floor(log2(av));\n highp float m = exp2(fract(log2(av))) - 1.0;\n\n c[2] = floor(128.0 * m);\n m -= c[2] / 128.0;\n c[1] = floor(32768.0 * m);\n m -= c[1] / 32768.0;\n c[0] = floor(8388608.0 * m);\n\n highp float ebias = e + 127.0;\n c[3] = floor(ebias / 2.0);\n ebias -= c[3] * 2.0;\n c[2] += floor(ebias) * 128.0;\n\n c[3] += 128.0 * step(0.0, -v);\n\n return c / 255.0;\n }\n",{getBroadcastDims:_tt}=yt;function Ttt(t,e,n){const i=[];if(t.forEach((t=>{const e=IO(t.shapeInfo.logicalShape);if(t.shapeInfo.isUniform?i.push(`uniform float ${t.name}${e>1?`[${e}]`:""};`):(i.push(`uniform sampler2D ${t.name};`),i.push(`uniform int offset${t.name};`)),n.enableShapeUniforms){const{uniformShape:e}=Att(n.packedInputs,t.shapeInfo.logicalShape,t.shapeInfo.texShape);switch(e.length){case 1:i.push(`uniform int ${t.name}Shape;`);break;case 2:i.push(`uniform ivec2 ${t.name}Shape;`);break;case 3:i.push(`uniform ivec3 ${t.name}Shape;`);break;case 4:i.push(`uniform ivec4 ${t.name}Shape;`)}i.push(`uniform ivec2 ${t.name}TexShape;`)}})),n.enableShapeUniforms){switch(e.logicalShape.length){case 1:i.push("uniform int outShape;");break;case 2:i.push("uniform ivec2 outShape;"),i.push("uniform int outShapeStrides;");break;case 3:i.push("uniform ivec3 outShape;"),i.push("uniform ivec2 outShapeStrides;");break;case 4:i.push("uniform ivec4 outShape;"),i.push("uniform ivec3 outShapeStrides;")}i.push("uniform ivec2 outTexShape;")}n.customUniforms&&n.customUniforms.forEach((t=>{i.push(`uniform ${t.type} ${t.name}${t.arrayIndex?`[${t.arrayIndex}]`:""};`)}));const s=i.join("\n"),r=t.map((t=>function(t,e,n=!1,i){let s="";s+=n?Itt(t,i):ytt(t,i);const r=t.shapeInfo.logicalShape,a=e.logicalShape;r.length<=a.length&&(s+=n?function(t,e){const n=t.name,i=n.charAt(0).toUpperCase()+n.slice(1),s="get"+i+"AtOutCoords",r=t.shapeInfo.logicalShape.length,a=e.logicalShape.length,o=_tt(t.shapeInfo.logicalShape,e.logicalShape),l=Ott(a),u=a-r;let h;const p=["x","y","z","w","u","v"];h=0===r?"":a<2&&o.length>=1?"coords = 0;":o.map((t=>`coords.${p[t+u]} = 0;`)).join("\n");let c="";c=a<2&&r>0?"coords":t.shapeInfo.logicalShape.map(((t,e)=>`coords.${p[e+u]}`)).join(", ");let d="return outputValue;";const f=1===IO(t.shapeInfo.logicalShape),m=IO(e.logicalShape),g=1===m;if(1!==r||f||g){if(f&&!g)d=1===a?"\n return vec4(outputValue.x, outputValue.x, 0., 0.);\n ":"\n return vec4(outputValue.x);\n ";else if(o.length){const t=r-2,e=r-1;o.indexOf(t)>-1&&o.indexOf(e)>-1?d="return vec4(outputValue.x);":o.indexOf(t)>-1?d="return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);":o.indexOf(e)>-1&&(d="return vec4(outputValue.xx, outputValue.zz);")}}else d="\n return vec4(outputValue.xy, outputValue.xy);\n ";return`\n vec4 ${s}() {\n ${l} coords = getOutputCoords();\n ${h}\n vec4 outputValue = get${i}(${c});\n ${d}\n }\n `}(t,e):function(t,e){const n=t.name,i=n.charAt(0).toUpperCase()+n.slice(1),s="get"+i+"AtOutCoords",r=e.texShape,a=t.shapeInfo.texShape,o=t.shapeInfo.logicalShape.length,l=e.logicalShape.length;if(!t.shapeInfo.isUniform&&o===l&&null==t.shapeInfo.flatOffset&&vO(a,r))return`\n float ${s}() {\n return sampleTexture(${n}, resultUV);\n }\n `;const u=Ott(l),h=_tt(t.shapeInfo.logicalShape,e.logicalShape),p=l-o;let c;const d=["x","y","z","w","u","v"];c=0===o?"":l<2&&h.length>=1?"coords = 0;":h.map((t=>`coords.${d[t+p]} = 0;`)).join("\n");let f="";f=l<2&&o>0?"coords":t.shapeInfo.logicalShape.map(((t,e)=>`coords.${d[e+p]}`)).join(", ");return`\n float ${s}() {\n ${u} coords = getOutputCoords();\n ${c}\n return get${i}(${f});\n }\n `}(t,e));return s}(t,e,n.packedInputs,n.enableShapeUniforms))).join("\n"),a=e.texShape,o=ptt(),l=function(t){return`\n float sampleTexture(sampler2D textureSampler, vec2 uv) {\n return ${t.texture2D}(textureSampler, uv).r;\n }\n `}(o);let u,h,p=function(t){const e=`${t.version}\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n ${t.varyingFs} vec2 resultUV;\n ${t.defineOutput}\n const vec2 halfCR = vec2(0.5, 0.5);\n\n struct ivec5\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n };\n\n struct ivec6\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n int v;\n };\n\n uniform float NAN;\n ${t.defineSpecialNaN}\n ${t.defineSpecialInf}\n ${t.defineRound}\n\n int imod(int x, int y) {\n return x - y * (x / y);\n }\n\n int idiv(int a, int b, float sign) {\n int res = a / b;\n int mod = imod(a, b);\n if (sign < 0. && mod != 0) {\n res -= 1;\n }\n return res;\n }\n\n //Based on the work of Dave Hoskins\n //https://www.shadertoy.com/view/4djSRW\n #define HASHSCALE1 443.8975\n float random(float seed){\n vec2 p = resultUV * seed;\n vec3 p3 = fract(vec3(p.xyx) * HASHSCALE1);\n p3 += dot(p3, p3.yzx + 19.19);\n return fract((p3.x + p3.y) * p3.z);\n }\n\n ${Ett}\n ${btt}\n ${vtt}\n `;return e}(o);e.isPacked?(u=function(t,e,n){switch(t.length){case 0:return Stt();case 1:return function(t,e,n){const i=[Math.ceil(e[0]/2),Math.ceil(e[1]/2)];if(1===i[0])return n?"\n int getOutputCoords() {\n return 2 * int(resultUV.x * ceil(float(outTexShape[1]) / 2.0));\n }\n ":`\n int getOutputCoords() {\n return 2 * int(resultUV.x * ${i[1]}.0);\n }\n `;if(1===i[1])return n?"\n int getOutputCoords() {\n return 2 * int(resultUV.y * ceil(float(outTexShape[0]) / 2.0));\n }\n ":`\n int getOutputCoords() {\n return 2 * int(resultUV.y * ${i[0]}.0);\n }\n `;if(n)return"\n int getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n return 2 * (resTexRC.x * packedTexShape[1] + resTexRC.y);\n }\n ";return`\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${i[0]}, ${i[1]}));\n return 2 * (resTexRC.x * ${i[1]} + resTexRC.y);\n }\n `}(0,e,n);case 2:return function(t,e,n){const i=[Math.ceil(e[0]/2),Math.ceil(e[1]/2)];if(vO(t,e))return n?"\n ivec2 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n return 2 * ivec2(resultUV.yx * vec2(packedTexShape[0], packedTexShape[1]));\n }\n ":`\n ivec2 getOutputCoords() {\n return 2 * ivec2(resultUV.yx * vec2(${i[0]}, ${i[1]}));\n }\n `;const s=Math.ceil(t[1]/2);if(n)return"\n ivec2 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n int texelsInLogicalRow = int(ceil(float(outShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n\n int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n int r = 2 * (index / texelsInLogicalRow);\n int c = imod(index, texelsInLogicalRow) * 2;\n\n return ivec2(r, c);\n }\n ";return`\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${i[0]}, ${i[1]}));\n\n int index = resTexRC.x * ${i[1]} + resTexRC.y;\n int r = 2 * (index / ${s});\n int c = imod(index, ${s}) * 2;\n\n return ivec2(r, c);\n }\n `}(t,e,n);case 3:return function(t,e,n){if(n)return"\n ivec3 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n int texelsInLogicalRow = int(ceil(float(outShape[2]) / 2.0));\n int texelsInBatch = texelsInLogicalRow * int(ceil(float(outShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n\n int b = index / texelsInBatch;\n index -= b * texelsInBatch;\n\n int r = 2 * (index / texelsInLogicalRow);\n int c = imod(index, texelsInLogicalRow) * 2;\n\n return ivec3(b, r, c);\n }\n ";const i=[Math.ceil(e[0]/2),Math.ceil(e[1]/2)],s=Math.ceil(t[2]/2),r=s*Math.ceil(t[1]/2);return`\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${i[0]}, ${i[1]}));\n int index = resTexRC.x * ${i[1]} + resTexRC.y;\n\n int b = index / ${r};\n index -= b * ${r};\n\n int r = 2 * (index / ${s});\n int c = imod(index, ${s}) * 2;\n\n return ivec3(b, r, c);\n }\n `}(t,e,n);default:return function(t,e,n){if(n)return"\n ivec4 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n\n int texelsInLogicalRow = int(ceil(float(outShape[3]) / 2.0));\n int texelsInBatch = texelsInLogicalRow * int(ceil(float(outShape[2]) / 2.0));\n int texelsInBatchN = texelsInBatch * outShape[1];\n\n int b2 = index / texelsInBatchN;\n index -= b2 * texelsInBatchN;\n\n int b = index / texelsInBatch;\n index -= b * texelsInBatch;\n\n int r = 2 * (index / texelsInLogicalRow);\n int c = imod(index, texelsInLogicalRow) * 2;\n\n return ivec4(b2, b, r, c);\n }\n ";const i=[Math.ceil(e[0]/2),Math.ceil(e[1]/2)],s=Math.ceil(t[t.length-1]/2),r=s*Math.ceil(t[t.length-2]/2);let a=r,o="",l="b, r, c";for(let e=2;e1&&!vO(e,n)&&i.lengtht[e])).join(", ")}function Ntt(t,e,n){const i=[],s=[];let r,a,o,l=null,u=null;u=t.getUniformLocation(n,"NAN",!1),1===aA().getNumber("WEBGL_VERSION")&&(l=t.getUniformLocation(n,"INFINITY",!1));const h=!1;for(const s of e.variableNames){const r={name:s,uniform:t.getUniformLocation(n,s,h),offset:t.getUniformLocation(n,`offset${s}`,h)};e.enableShapeUniforms&&(r.shape=t.getUniformLocation(n,`${s}Shape`,h),r.texShape=t.getUniformLocation(n,`${s}TexShape`,h)),i.push(r)}if(e.enableShapeUniforms&&(r=t.getUniformLocation(n,"outShape",h),o=t.getUniformLocation(n,"outShapeStrides",h),a=t.getUniformLocation(n,"outTexShape",h)),e.customUniforms)for(const i of e.customUniforms)s.push(t.getUniformLocation(n,i.name,h));return{variablesLocations:i,customUniformLocations:s,infLoc:l,nanLoc:u,outShapeLocation:r,outShapeStridesLocation:o,outTexShapeLocation:a}}function ktt(t,e){if(t.length!==e.length)throw Error(`Binary was compiled with ${t.length} inputs, but was executed with ${e.length} inputs`);t.forEach(((t,n)=>{const i=t.logicalShape,s=e[n],r=s.shape;if(!vO(i,r))throw Error(`Binary was compiled with different shapes than the current args. Shapes ${i} and ${r} must match`);if(t.isUniform&&s.isUniform)return;const a=t.texShape,o=s.isUniform?null:s.texData.texShape;if(!vO(a,o))throw Error(`Binary was compiled with different texture shapes than the current args. Shape ${a} and ${o} must match`)}))}function Dtt(t){return aA().getBool("WEBGL_USE_SHAPES_UNIFORMS")&&t<=4} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Ltt{constructor(t){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outPackingScheme=r7.DENSE,this.customUniforms=[{name:"texShape",type:"ivec2"}];const e=ptt();this.outputShape=t,this.enableShapeUniforms=Dtt(this.outputShape.length),this.userCode=`\n ivec3 outCoordsFromFlatIndex(int index) {\n ${this.enableShapeUniforms?dtt(["r","c","d"],t):ctt(["r","c","d"],t)}\n return ivec3(r, c, d);\n }\n\n void main() {\n ivec2 resTexRC = ivec2(resultUV.yx * vec2(texShape[0], texShape[1]));\n int index = 4 * (resTexRC.x * texShape[1] + resTexRC.y);\n\n vec4 result = vec4(0.);\n\n for (int i=0; i<4; i++) {\n int flatIndex = index + i;\n ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n result[i] = getA(rc.x, rc.y, rc.z);\n }\n\n ${e.output} = result;\n }\n `}} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Ftt{constructor(t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outPackingScheme=r7.DENSE,this.customUniforms=[{name:"texShape",type:"ivec2"}];const e=ptt();this.outputShape=t,this.enableShapeUniforms=Dtt(this.outputShape.length),this.userCode=`\n ivec3 outCoordsFromFlatIndex(int index) {\n ${this.enableShapeUniforms?dtt(["r","c","d"],t):ctt(["r","c","d"],t)}\n return ivec3(r, c, d);\n }\n\n void main() {\n ivec2 resTexRC = ivec2(resultUV.yx * vec2(texShape[0], texShape[1]));\n int index = 4 * (resTexRC.x * texShape[1] + resTexRC.y);\n\n vec4 result = vec4(0.);\n\n for (int i=0; i<4; i++) {\n int flatIndex = index + i;\n ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n result[i] = getChannel(getA(rc.x, rc.y, rc.z), vec2(rc.y, rc.z));\n }\n\n ${e.output} = result;\n }\n `}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Ptt{constructor(t){this.variableNames=["A"],this.outTexUsage=a7.DOWNLOAD;const e=ptt();this.outputShape=t,this.userCode=`\n ${gtt}\n\n void main() {\n float x = getAAtOutCoords();\n ${e.output} = encode_float(x);\n }\n `}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class $tt{constructor(t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outTexUsage=a7.DOWNLOAD;const e=ptt();this.outputShape=t,this.userCode=`\n ${gtt}\n\n void main() {\n ivec3 coords = getOutputCoords();\n float x = getChannel(getAAtOutCoords(), vec2(coords.y, coords.z));\n ${e.output} = encode_float(x);\n }\n `}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const Btt={R:0,G:1,B:2,A:3};class Vtt{constructor(t,e=!1,n="RGBA"){this.variableNames=["A"],this.customUniforms=[{name:"texShape",type:"ivec2"}];const i=ptt();this.outputShape=t,this.enableShapeUniforms=Dtt(this.outputShape.length);let s="result";e&&(s="floor(result * 255. + 0.5)");let r="";for(let t=0;tt.bindTexture(o,a))),c7(t,(()=>t.texParameteri(o,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE))),c7(t,(()=>t.texParameteri(o,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE))),c7(t,(()=>t.texParameteri(o,t.TEXTURE_MIN_FILTER,t.NEAREST))),c7(t,(()=>t.texParameteri(o,t.TEXTURE_MAG_FILTER,t.NEAREST))),1===aA().getNumber("WEBGL_VERSION")?c7(t,(()=>t.texImage2D(o,0,i,e,n,0,s,r,null))):c7(t,(()=>t.texStorage2D(o,1,i,e,n))),c7(t,(()=>t.bindTexture(t.TEXTURE_2D,null))),{texture:a,texShape:[n,e]}}function ztt(t){return t.internalFormatFloat}function Xtt(t,e,n,i){const[s,r]=l7(e,n);return Wtt(t,s,r,ztt(i),i.textureFormatFloat,t.FLOAT)}function jtt(t){return t.internalFormatHalfFloat}function qtt(t,e,n,i){const[s,r]=l7(e,n);return Wtt(t,s,r,jtt(i),i.textureFormatFloat,i.textureTypeHalfFloat)}function Ktt(t){return t.downloadTextureFormat}function Qtt(t,e,n,i){const[s,r]=l7(e,n);return Wtt(t,s,r,Ktt(i),t.RGBA,t.UNSIGNED_BYTE)}function Jtt(t){return t.internalFormatPackedFloat}function Ztt(t,e,n,i){const[s,r]=h7(e,n);return Wtt(t,s,r,Jtt(i),t.RGBA,t.FLOAT)}function tet(t){return t.internalFormatPackedHalfFloat}function eet(t,e,n,i){const[s,r]=h7(e,n);return Wtt(t,s,r,tet(i),t.RGBA,i.textureTypeHalfFloat)}function net(t,e,n){c7(t,(()=>t.bindBuffer(t.ARRAY_BUFFER,n)));return C7(t,e,"clipSpacePos",n,3,20,0)&&C7(t,e,"uv",n,2,20,12)}function iet(t,e,n,i,s,r){let a,o,l;c7(t,(()=>t.bindTexture(t.TEXTURE_2D,e))),s instanceof Uint8Array?(a=new Uint8Array(n*i*4),o=t.UNSIGNED_BYTE,l=t.RGBA):(a=new Float32Array(n*i*4),o=t.FLOAT,l=r.internalFormatPackedFloat),a.set(s),2===aA().getNumber("WEBGL_VERSION")?c7(t,(()=>t.texSubImage2D(t.TEXTURE_2D,0,0,0,n,i,t.RGBA,o,a))):c7(t,(()=>t.texImage2D(t.TEXTURE_2D,0,l,n,i,0,t.RGBA,o,a))),c7(t,(()=>t.bindTexture(t.TEXTURE_2D,null)))}function set(t,e,n){c7(t,(()=>t.bindTexture(t.TEXTURE_2D,e))),n.data instanceof Uint8Array?2===aA().getNumber("WEBGL_VERSION")?c7(t,(()=>t.texSubImage2D(t.TEXTURE_2D,0,0,0,n.width,n.height,t.RGBA,t.UNSIGNED_BYTE,n.data))):c7(t,(()=>t.texImage2D(t.TEXTURE_2D,0,t.RGBA,n.width,n.height,0,t.RGBA,t.UNSIGNED_BYTE,n.data))):2===aA().getNumber("WEBGL_VERSION")?c7(t,(()=>t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,n))):c7(t,(()=>t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n))),c7(t,(()=>t.bindTexture(t.TEXTURE_2D,null)))}function ret(t,e,n,i){const s=t.createBuffer();c7(t,(()=>t.bindBuffer(t.PIXEL_PACK_BUFFER,s)));const r=16*e*n;return c7(t,(()=>t.bufferData(t.PIXEL_PACK_BUFFER,r,t.STREAM_READ))),c7(t,(()=>t.readPixels(0,0,n,e,t.RGBA,t.FLOAT,0))),c7(t,(()=>t.bindBuffer(t.PIXEL_PACK_BUFFER,null))),s}function aet(t,e,n){const i=t,s=new Float32Array(n);return i.bindBuffer(i.PIXEL_PACK_BUFFER,e),i.getBufferSubData(i.PIXEL_PACK_BUFFER,0,s),i.bindBuffer(i.PIXEL_PACK_BUFFER,null),s}function oet(t,e,n,i){const[s,r]=l7(e,n),a=new Uint8Array(e*n*4);return c7(t,(()=>t.readPixels(0,0,s,r,i.downloadTextureFormat,t.UNSIGNED_BYTE,a))),new Float32Array(a.buffer)}function uet(t,e,n,i,s,r,a,o){const l=t,u=new Float32Array(function(t,e){const[n,i]=h7(t,e);return n*i*4}(r,a));return l.bindBuffer(l.PIXEL_PACK_BUFFER,e),l.getBufferSubData(l.PIXEL_PACK_BUFFER,0,u),l.bindBuffer(l.PIXEL_PACK_BUFFER,null),u}function het(t,e,n){const i=new Float32Array(e*n*4);return c7(t,(()=>t.readPixels(0,0,n,e,t.RGBA,t.FLOAT,i))),i} +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class pet{constructor(t){this.outputTexture=null,this.program=null,this.disposed=!1,this.itemsToPoll=[];const e=aA().getNumber("WEBGL_VERSION");if(null!=t?(this.gl=t,i7(e,t)):this.gl=s7(e),t=this.gl,2===aA().getNumber("WEBGL_VERSION")){const e=t;this.createVertexArray=()=>c7(e,(()=>e.createVertexArray())),this.bindVertexArray=t=>c7(e,(()=>e.bindVertexArray(t))),this.deleteVertexArray=t=>c7(e,(()=>e.deleteVertexArray(t))),this.getVertexArray=()=>c7(e,(()=>e.getParameter(e.VERTEX_ARRAY_BINDING)))}else if(null!=t){const e=t.getExtension("OES_vertex_array_object");if(null==e)throw new Error("All WebGL1 implementations are expected to offer OES_vertex_array_object.");this.createVertexArray=()=>c7(t,(()=>e.createVertexArrayOES())),this.bindVertexArray=n=>c7(t,(()=>e.bindVertexArrayOES(n))),this.deleteVertexArray=n=>c7(t,(()=>e.deleteVertexArrayOES(n))),this.getVertexArray=()=>c7(t,(()=>t.getParameter(e.VERTEX_ARRAY_BINDING_OES)))}let n="WEBGL_color_buffer_float";const i="EXT_color_buffer_half_float";if(this.parallelCompilationExtension=this.gl.getExtension("KHR_parallel_shader_compile"),1===aA().getNumber("WEBGL_VERSION")){const t="OES_texture_float",e="OES_texture_half_float";if(this.textureFloatExtension=_7(this.gl,t),itt(this.gl,e))this.textureHalfFloatExtension=_7(this.gl,e);else if(aA().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support half float textures, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.");if(this.colorBufferFloatExtension=this.gl.getExtension(n),itt(this.gl,i))this.colorBufferHalfFloatExtension=_7(this.gl,i);else if(aA().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support color renderable half floats, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.")}else if(n="EXT_color_buffer_float",itt(this.gl,n))this.colorBufferFloatExtension=this.gl.getExtension(n);else{if(!itt(this.gl,i))throw new Error("GL context does not support color renderable floats");this.colorBufferHalfFloatExtension=this.gl.getExtension(i)}this.vertexBuffer=Gtt(this.gl),this.indexBuffer=Htt(this.gl),this.framebuffer=M7(this.gl),this.textureConfig=p7(this.gl,this.textureHalfFloatExtension)}get debug(){return aA().getBool("DEBUG")}dispose(){if(this.disposed)return;null!=this.program&&console.warn("Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing."),null!=this.outputTexture&&console.warn("Disposing a GPGPUContext that still has a bound output matrix texture. This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.");const t=this.gl;c7(t,(()=>t.finish())),c7(t,(()=>t.bindFramebuffer(t.FRAMEBUFFER,null))),c7(t,(()=>t.deleteFramebuffer(this.framebuffer))),c7(t,(()=>t.bindBuffer(t.ARRAY_BUFFER,null))),c7(t,(()=>t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null))),c7(t,(()=>t.deleteBuffer(this.indexBuffer))),this.disposed=!0}createFloat32MatrixTexture(t,e){return this.throwIfDisposed(),Xtt(this.gl,t,e,this.textureConfig)}createFloat16MatrixTexture(t,e){return this.throwIfDisposed(),qtt(this.gl,t,e,this.textureConfig)}createUnsignedBytesMatrixTexture(t,e){return this.throwIfDisposed(),Qtt(this.gl,t,e,this.textureConfig)}uploadPixelDataToTexture(t,e){this.throwIfDisposed(),set(this.gl,t,e)}uploadDenseMatrixToTexture(t,e,n,i){this.throwIfDisposed(),iet(this.gl,t,e,n,i,this.textureConfig)}createFloat16PackedMatrixTexture(t,e){return this.throwIfDisposed(),eet(this.gl,t,e,this.textureConfig)}createPackedMatrixTexture(t,e){return this.throwIfDisposed(),Ztt(this.gl,t,e,this.textureConfig)}deleteMatrixTexture(t){this.throwIfDisposed(),this.outputTexture===t&&(B7(this.gl,this.framebuffer),this.outputTexture=null),c7(this.gl,(()=>this.gl.deleteTexture(t)))}downloadByteEncodedFloatMatrixFromOutputTexture(t,e,n){return this.downloadMatrixDriver(t,(()=>oet(this.gl,e,n,this.textureConfig)))}downloadPackedMatrixFromBuffer(t,e,n,i,s,r){return uet(this.gl,t,0,0,0,s,r,this.textureConfig)}downloadFloat32MatrixFromBuffer(t,e){return aet(this.gl,t,e)}createBufferFromTexture(t,e,n){this.bindTextureToFrameBuffer(t);const i=ret(this.gl,e,n,this.textureConfig);return this.unbindTextureToFrameBuffer(),i}createAndWaitForFence(){const t=this.createFence(this.gl);return this.pollFence(t)}createFence(t){let e,n;if(aA().getBool("WEBGL_FENCE_API_ENABLED")){const i=t,s=i.fenceSync(i.SYNC_GPU_COMMANDS_COMPLETE,0);t.flush(),n=()=>{const t=i.clientWaitSync(s,0,0);return t===i.ALREADY_SIGNALED||t===i.CONDITION_SATISFIED},e=s}else aA().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(e=this.beginQuery(),this.endQuery(),n=()=>this.isQueryAvailable(e,aA().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))):n=()=>!0;return{query:e,isFencePassed:n}}downloadMatrixFromPackedTexture(t,e,n){return this.downloadMatrixDriver(t,(()=>het(this.gl,e,n)))}createProgram(t){this.throwIfDisposed();const e=this.gl;null==this.vertexShader&&(this.vertexShader=Ytt(e));const n=b7(e);c7(e,(()=>e.attachShader(n,this.vertexShader))),c7(e,(()=>e.attachShader(n,t))),v7(e,n);const i=Object.assign(n,{vao:this.createVertexArray()});return this.debug&&w7(e,i),i}buildVao(t){this.setProgram(t),this.bindVertexArray(t.vao);const e=this.gl;c7(e,(()=>e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indexBuffer))),net(e,t,this.vertexBuffer)}deleteProgram(t){this.throwIfDisposed(),t===this.program&&(this.program=null),null!=t&&(c7(this.gl,(()=>this.gl.deleteProgram(t))),this.deleteVertexArray(t.vao))}setProgram(t){this.throwIfDisposed(),this.program=t,null!=this.program&&this.debug&&w7(this.gl,this.program),c7(this.gl,(()=>this.gl.useProgram(t)))}getUniformLocation(t,e,n=!0){return this.throwIfDisposed(),n?D7(this.gl,t,e):L7(this.gl,t,e)}getAttributeLocation(t,e){return this.throwIfDisposed(),c7(this.gl,(()=>this.gl.getAttribLocation(t,e)))}getUniformLocationNoThrow(t,e){return this.throwIfDisposed(),this.gl.getUniformLocation(t,e)}setInputMatrixTexture(t,e,n){this.throwIfDisposed(),this.throwIfNoProgram(),F7(this.gl,t,e,n)}setOutputMatrixTexture(t,e,n){this.setOutputMatrixTextureDriver(t,n,e)}setOutputPackedMatrixTexture(t,e,n){this.throwIfDisposed();const[i,s]=h7(e,n);this.setOutputMatrixTextureDriver(t,i,s)}setOutputMatrixWriteRegion(t,e,n,i){this.setOutputMatrixWriteRegionDriver(n,t,i,e)}setOutputPackedMatrixWriteRegion(t,e,n,i){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")}debugValidate(){null!=this.program&&w7(this.gl,this.program),V7(this.gl)}executeProgram(){this.throwIfDisposed(),this.throwIfNoProgram();const t=this.gl;if(this.debug){const t=this.getVertexArray();console.assert(t===this.program.vao,"VAO changed between setProgram and executeProgram!"),this.debugValidate()}c7(t,(()=>t.drawElements(t.TRIANGLES,6,t.UNSIGNED_SHORT,0)))}blockUntilAllProgramsCompleted(){this.throwIfDisposed(),c7(this.gl,(()=>this.gl.finish()))}getQueryTimerExtension(){return null==this.disjointQueryTimerExtension&&(this.disjointQueryTimerExtension=_7(this.gl,2===aA().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension}getQueryTimerExtensionWebGL2(){return this.getQueryTimerExtension()}getQueryTimerExtensionWebGL1(){return this.getQueryTimerExtension()}beginQuery(){if(2===aA().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){const t=this.gl,e=this.getQueryTimerExtensionWebGL2(),n=t.createQuery();return t.beginQuery(e.TIME_ELAPSED_EXT,n),n}const t=this.getQueryTimerExtensionWebGL1(),e=t.createQueryEXT();return t.beginQueryEXT(t.TIME_ELAPSED_EXT,e),e}endQuery(){if(2===aA().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){const t=this.gl,e=this.getQueryTimerExtensionWebGL2();return void t.endQuery(e.TIME_ELAPSED_EXT)}const t=this.getQueryTimerExtensionWebGL1();t.endQueryEXT(t.TIME_ELAPSED_EXT)}async waitForQueryAndGetTime(t){return await AO((()=>this.disposed||this.isQueryAvailable(t,aA().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")))),this.getQueryTime(t,aA().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}getQueryTime(t,e){if(0===e)return null;if(2===e){const e=this.gl;return e.getQueryParameter(t,e.QUERY_RESULT)/1e6}{const e=this.getQueryTimerExtensionWebGL1();return e.getQueryObjectEXT(t,e.QUERY_RESULT_EXT)/1e6}}isQueryAvailable(t,e){if(0===e)return!0;if(2===e){const e=this.gl,n=this.getQueryTimerExtensionWebGL2(),i=e.getQueryParameter(t,e.QUERY_RESULT_AVAILABLE);return null==this.disjoint&&(this.disjoint=this.gl.getParameter(n.GPU_DISJOINT_EXT)),i&&!this.disjoint}{const e=this.getQueryTimerExtensionWebGL1(),n=e.getQueryObjectEXT(t,e.QUERY_RESULT_AVAILABLE_EXT);return null==this.disjoint&&(this.disjoint=this.gl.getParameter(e.GPU_DISJOINT_EXT)),n&&!this.disjoint}}pollFence(t){return new Promise((e=>{this.addItemToPoll((()=>t.isFencePassed()),(()=>e()))}))}pollItems(){const t=function(t){let e=0;for(;et.isDoneFn)));for(let e=0;e<=t;++e){const{resolveFn:t}=this.itemsToPoll[e];t()}this.itemsToPoll=this.itemsToPoll.slice(t+1)}addItemToPoll(t,e){if(this.itemsToPoll.push({isDoneFn:t,resolveFn:e}),this.itemsToPoll.length>1)return;let n;"setTimeoutCustom"in aA().platform&&(n=aA().platform.setTimeoutCustom.bind(aA().platform)),AO((()=>(this.pollItems(),0===this.itemsToPoll.length)),(()=>0),null,n)}bindTextureToFrameBuffer(t){this.throwIfDisposed(),$7(this.gl,t,this.framebuffer),this.debug&&V7(this.gl)}unbindTextureToFrameBuffer(){null!=this.outputTexture?($7(this.gl,this.outputTexture,this.framebuffer),this.debug&&V7(this.gl)):B7(this.gl,this.framebuffer)}downloadMatrixDriver(t,e){this.bindTextureToFrameBuffer(t);const n=e();return this.unbindTextureToFrameBuffer(),n}setOutputMatrixTextureDriver(t,e,n){this.throwIfDisposed();const i=this.gl;$7(i,t,this.framebuffer),this.debug&&V7(i),this.outputTexture=t,c7(i,(()=>i.viewport(0,0,e,n))),c7(i,(()=>i.scissor(0,0,e,n)))}setOutputMatrixWriteRegionDriver(t,e,n,i){this.throwIfDisposed(),c7(this.gl,(()=>this.gl.scissor(t,e,n,i)))}throwIfDisposed(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")}throwIfNoProgram(){if(null==this.program)throw new Error("No GPU program is currently set.")}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const{addImpl:cet,bincountImpl:det,bincountReduceImpl:fet,bitwiseAndImpl:met,castImpl:get,ceilImpl:_et,concatImpl:Tet,equalImpl:yet,expImpl:Iet,expm1Impl:Eet,floorImpl:bet,gatherNdImpl:vet,gatherV2Impl:wet,greaterImpl:xet,greaterEqualImpl:Ret,lessImpl:Oet,lessEqualImpl:Aet,linSpaceImpl:Met,logImpl:Cet,maxImpl:Net,maximumImpl:ket,minimumImpl:Det,multiplyImpl:Let,negImpl:Fet,notEqualImpl:Pet,prodImpl:$et,raggedGatherImpl:Bet,raggedRangeImpl:Vet,raggedTensorToTensorImpl:Uet,rangeImpl:Yet,rsqrtImpl:Get,scatterImpl:Het,sigmoidImpl:Wet,simpleAbsImpl:zet,sliceImpl:Xet,sparseFillEmptyRowsImpl:jet,sparseReshapeImpl:qet,sparseSegmentReductionImpl:Ket,sqrtImpl:Qet,staticRegexReplaceImpl:Jet,stridedSliceImpl:Zet,stringNGramsImpl:tnt,stringSplitImpl:ent,stringToHashBucketFastImpl:nnt,subImpl:int,tileImpl:snt,topKImpl:rnt,transposeImpl:ant,uniqueImpl:ont}=jt; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function lnt(t,e){return["x","y","z","w","u","v"].slice(0,e).map((e=>`${t}.${e}`))}function unt(t,e){return 1===e?[t]:lnt(t,e)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class hnt{constructor(t){if(this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outputShape=t,this.rank=t.length,this.enableShapeUniforms=Dtt(this.outputShape.length),0===this.rank)this.userCode="\n void main() {\n setOutput(vec4(getA(), 0., 0., 0.));\n }\n ";else{const t=unt("rc",this.rank),e=Ott(this.rank),n=this.getOutOfBoundsCondition(t),i=this.getSetup(t),s=this.getOutput(t);this.userCode=`\n void main() {\n ${e} rc = getOutputCoords();\n\n if(${n}) {\n setOutput(vec4(0));\n } else {\n ${i}\n\n setOutput(vec4(${s}));\n }\n }\n `}}getSourceCoordsArr(t){const e=[];for(let n=0;n<=1;n++)for(let i=0;i<=1;i++){let s=`${0===n?"r":"rp1"}, ${0===i?"c":"cp1"}`;for(let e=2;e ${this.enableShapeUniforms?"outShape":this.outputShape[0]}`;let e="";for(let n=this.rank-2;n= ${this.enableShapeUniforms?`outShape[${n}]`:this.outputShape[n]}`,n= ${n};\n bool rEdge = rp1 >= ${i};\n `}getOutput(t){const e=this.getSourceCoordsArr(t);if(1===this.rank){return`getA(rc), (rc + 1 >= ${this.enableShapeUniforms?"outShape":this.outputShape[0]} ? 0. : getA(rc + 1)), 0, 0`}return`getA(${e[0]}),\n cEdge ? 0. : getA(${e[1]}),\n rEdge ? 0. : getA(${e[2]}),\n rEdge || cEdge ? 0. : getA(${e[3]})`}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class pnt{constructor(t,e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"inputShape",type:"ivec3"}],this.outputShape=t,this.enableShapeUniforms=Dtt(this.outputShape.length);let n="";for(let t=0;t<4;t++){let e="thisRC = rc;";t%2==1&&(e+="thisRC.z += 1;"),t>1&&(e+="thisRC.y += 1;"),n+=`\n ${e}\n ${t>0?"if(thisRC.y < rows && thisRC.z < cols){":""}\n int flatIndex = getFlatIndex(thisRC);\n\n ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);\n vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));\n\n result[${t}] =\n getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);\n ${t>0?"}":""}\n `}var i,s;this.userCode=`\n ${i=e,s=this.enableShapeUniforms,`\n ivec3 inputCoordsFromReshapedOutCoords(int index) {\n ${s?ftt(["r","c","d"],"inputShape"):ctt(["r","c","d"],i)}\n return ivec3(r, c, d);\n }\n `}\n ${this.enableShapeUniforms?"\n int getFlatIndex(ivec3 coords) {\n return coords.x * outShapeStrides[0] + coords.y * outShapeStrides[1] + coords.z;\n }\n":mtt(t)}\n\n void main() {\n ivec3 rc = getOutputCoords();\n\n vec4 result = vec4(0.);\n\n ivec3 thisRC;\n int rows = ${this.enableShapeUniforms?"outShape[1]":t[1]};\n int cols = ${this.enableShapeUniforms?"outShape[2]":t[2]};\n\n ${n}\n\n setOutput(result);\n }\n `}} +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class cnt{constructor(t){this.gpgpu=t,this.numUsedTextures=0,this.numFreeTextures=0,this._numBytesAllocated=0,this._numBytesFree=0,this.freeTextures={},this.usedTextures={},this.logEnabled=!1}acquireTexture(t,e,n){const i=fnt(e,n),s=mnt(t,i,n);s in this.freeTextures||(this.freeTextures[s]=[]),s in this.usedTextures||(this.usedTextures[s]=[]);const r=dnt(t,i,this.gpgpu.gl,this.gpgpu.textureConfig,n);if(this.freeTextures[s].length>0){this.numFreeTextures--,this.numUsedTextures++,this._numBytesFree-=r,this.log();const t=this.freeTextures[s].pop();return this.usedTextures[s].push(t),t}let a;return i===o7.PACKED_2X2_FLOAT32?a=this.gpgpu.createPackedMatrixTexture(t[0],t[1]):i===o7.PACKED_2X2_FLOAT16?a=this.gpgpu.createFloat16PackedMatrixTexture(t[0],t[1]):i===o7.UNPACKED_FLOAT32?a=this.gpgpu.createFloat32MatrixTexture(t[0],t[1]):i===o7.UNPACKED_FLOAT16?a=this.gpgpu.createFloat16MatrixTexture(t[0],t[1]):i===o7.PACKED_4X1_UNSIGNED_BYTE&&(a=this.gpgpu.createUnsignedBytesMatrixTexture(t[0],t[1])),this.usedTextures[s].push(a),this.numUsedTextures++,this._numBytesAllocated+=r,this.log(),a}releaseTexture(t,e,n,i){if(null==this.freeTextures)return;const s=fnt(n,i),r=mnt(e,s,i);r in this.freeTextures||(this.freeTextures[r]=[]);const a=dnt(e,s,this.gpgpu.gl,this.gpgpu.textureConfig,i),o=aA().getNumber("WEBGL_DELETE_TEXTURE_THRESHOLD");-1!==o&&this._numBytesAllocated>o?(this.gpgpu.deleteMatrixTexture(t.texture),this._numBytesAllocated-=a):(this.freeTextures[r].push(t),this.numFreeTextures++,this._numBytesFree+=a),this.numUsedTextures--;const l=this.usedTextures[r],u=l&&l.indexOf(t);if(null==u||u<0)throw new Error("Cannot release a texture that was never provided by this texture manager");l[u]=l[l.length-1],l.pop(),this.log()}log(){if(!this.logEnabled)return;const t=this.numFreeTextures+this.numUsedTextures;console.log("Free/Used",`${this.numFreeTextures} / ${this.numUsedTextures}`,`(${t})`);const e=this._numBytesFree/this._numBytesAllocated;console.log(`Bytes allocated: ${this._numBytesAllocated}`),console.log(`Bytes unused: ${this._numBytesFree} (${Math.round(100*e)}%)`)}get numBytesAllocated(){return this._numBytesAllocated}get numBytesFree(){return this._numBytesFree}getNumUsedTextures(){return this.numUsedTextures}getNumFreeTextures(){return this.numFreeTextures}dispose(){if(null!=this.freeTextures){for(const t in this.freeTextures)this.freeTextures[t].forEach((t=>{this.gpgpu.deleteMatrixTexture(t.texture)}));for(const t in this.usedTextures)this.usedTextures[t].forEach((t=>{this.gpgpu.deleteMatrixTexture(t.texture)}));this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0,this._numBytesAllocated=0,this._numBytesFree=0}}}function dnt(t,e,n,i,s){const r=function(t,e){switch(t){case o7.PACKED_2X2_FLOAT32:return Jtt(e);case o7.PACKED_2X2_FLOAT16:return tet(e);case o7.UNPACKED_FLOAT32:return ztt(e);case o7.UNPACKED_FLOAT16:return jtt(e);case o7.PACKED_4X1_UNSIGNED_BYTE:return Ktt(e);default:throw new Error(`Unknown physical texture type ${t}`)}}(e,i);let a;if(s){const[e,n]=h7(t[0],t[1]);a=e*n}else{const[e,n]=l7(t[0],t[1]);a=e*n}const o=function(t,e){const n=t;if(e===n.R32F)return 4;if(e===n.R16F)return 2;if(e===n.RGBA32F)return 16;if(e===t.RGBA)return 16;if(e===n.RGBA16F)return 8;if(e===n.RGBA8)return 4;throw new Error(`Unknown internal format ${e}`)}(n,r);return a*o}function fnt(t,e){if(t===a7.UPLOAD)return o7.PACKED_2X2_FLOAT32;if(t===a7.RENDER||null==t)return function(t){return aA().getBool("WEBGL_RENDER_FLOAT32_ENABLED")?t?o7.PACKED_2X2_FLOAT32:o7.UNPACKED_FLOAT32:t?o7.PACKED_2X2_FLOAT16:o7.UNPACKED_FLOAT16}(e);if(t===a7.DOWNLOAD||t===a7.PIXELS)return o7.PACKED_4X1_UNSIGNED_BYTE;throw new Error(`Unknown logical texture type ${t}`)}function mnt(t,e,n){return`${t[0]}_${t[1]}_${e}_${n}`} +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class gnt{constructor(t,e){this.variableNames=["A"],this.outputShape=t,this.enableShapeUniforms=Dtt(this.outputShape.length),this.userCode=`\n float unaryOperation(float x) {\n ${e}\n }\n\n void main() {\n float x = getAAtOutCoords();\n float y = unaryOperation(x);\n\n setOutput(y);\n }\n `}}const _nt="if (isnan(x)) return x;",Tnt="return x;",ynt="return abs(x);";const Int="return (x >= 0.0) ? x : (exp(x) - 1.0);",Ent=_nt+"\n return (x < 0.0) ? 0.0 : x;\n",bnt=_nt+"\n return (x < 0.0) ? 0.0 : min(6.0, x);\n",vnt="return x;",wnt="return 1.0 / (1.0 + exp(-1.0 * x));",Snt="return x;",xnt="\n vec4 result;\n\n result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);\n result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);\n result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);\n result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);\n\n return result;\n",Rnt="\n vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n",Ont="\n vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n",Ant="return 1.0 / (1.0 + exp(-1.0 * x));";class Mnt{constructor(t,e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t,this.enableShapeUniforms=Dtt(this.outputShape.length),this.userCode=`\n vec4 unaryOperation(vec4 x) {\n ${e}\n }\n\n void main() {\n vec4 x = getAAtOutCoords();\n vec4 y = unaryOperation(x);\n\n setOutput(y);\n }\n `}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Cnt{constructor(t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outputShape=t,this.enableShapeUniforms=Dtt(this.outputShape.length);const e=t.length,n=unt("rc",e),i=Ott(e),s=function(t,e){if(1===t)return"rc";let n="";for(let i=0;ie.push(t)))}const e=this.texData.get(t),{values:n,shape:i,slice:s,dtype:r,complexTensorInfos:a,isPacked:o}=e;if(null!=s){let e;e=o?new Mnt(i,vnt):new gnt(i,vnt);const n=this.runWebGLProgram(e,[{dataId:t,shape:i,dtype:r}],r),s=this.read(n.dataId);return this.disposeIntermediateTensorInfo(n),s}if(null!=n)return this.convertAndCacheOnCPU(t);if(aA().getBool("DEBUG")&&!aA().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")&&2===aA().getNumber("WEBGL_VERSION"))throw new Error("tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.");let l,u,h=null;if("complex64"!==r&&aA().get("WEBGL_BUFFER_SUPPORTED")){l=this.decode(t);const e=this.texData.get(l.dataId);h=this.gpgpu.createBufferFromTexture(e.texture.texture,...u7(i))}if(this.pendingRead.set(t,[]),"complex64"!==r&&await this.gpgpu.createAndWaitForFence(),"complex64"===r){const t=await Promise.all([this.read(a.real.dataId),this.read(a.imag.dataId)]);u=AG(t[0],t[1])}else if(null==h)u=this.getValuesFromTexture(t);else{const t=IO(i);u=this.gpgpu.downloadFloat32MatrixFromBuffer(h,t)}if(null!=l&&this.disposeIntermediateTensorInfo(l),null!=h){const t=this.gpgpu.gl;c7(t,(()=>t.deleteBuffer(h)))}const p=this.convertAndCacheOnCPU(t,u),c=this.pendingRead.get(t);return this.pendingRead.delete(t),c.forEach((t=>t(p))),this.pendingDisposal.has(t)&&(this.pendingDisposal.delete(t),this.disposeData(t)&&TD().removeDataId(t,this),this.pendingDeletes--),p}readToGPU(t,e={}){const n=this.texData.get(t),{values:i,shape:s,slice:r,dtype:a,isPacked:o,texture:l}=n;if("complex64"===a)throw new Error("Does not support reading texture for complex64 dtype.");if(null!=r){let n;n=o?new Mnt(s,vnt):new gnt(s,vnt);const i=this.runWebGLProgram(n,[{dataId:t,shape:s,dtype:a}],a),r=this.readToGPU(i,e);return this.disposeIntermediateTensorInfo(i),r}if(null==l)throw null!=i?new Error("Data is not on GPU but on CPU."):new Error("There is no data on GPU or CPU.");const u=this.decode(t,e.customTexShape),h=TD().makeTensorFromTensorInfo(u),p=this.texData.get(u.dataId);return Object.assign({tensorRef:h},p.texture)}bufferSync(t){const e=this.readSync(t.dataId);if("string"===t.dtype)try{const n=e.map((t=>lk(t)));return FL(t.shape,t.dtype,n)}catch(t){throw new Error("Failed to decode encoded string bytes into utf-8")}return FL(t.shape,t.dtype,e)}checkNumericalProblems(t){if(null!=t)for(let e=0;e0}time(t){const e=this.activeTimers,n=[];let i=!1;null==this.programTimersStack?(this.programTimersStack=n,i=!0):this.activeTimers.push(n),this.activeTimers=n,t();const s=hk(this.activeTimers.map((t=>t.query))).filter((t=>null!=t)),r=hk(this.activeTimers.map((t=>t.name))).filter((t=>null!=t));this.activeTimers=e,i&&(this.programTimersStack=null);const a={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:null,wallMs:null};return(async()=>{if(aA().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0){const t=await Promise.all(s);a.kernelMs=fO(t),a.getExtraProfileInfo=()=>t.map(((t,e)=>({name:r[e],ms:t}))).map((t=>`${t.name}: ${t.ms}`)).join(", ")}else a.kernelMs={error:"WebGL query timers are not supported in this environment."};return this.uploadWaitMs=0,this.downloadWaitMs=0,a})()}memory(){return{unreliable:!1,numBytesInGPU:this.numBytesInGPU,numBytesInGPUAllocated:this.textureManager.numBytesAllocated,numBytesInGPUFree:this.textureManager.numBytesFree}}startTimer(){return aA().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?this.gpgpu.beginQuery():{startMs:rk(),endMs:null}}endTimer(t){return aA().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?(this.gpgpu.endQuery(),t):(t.endMs=rk(),t)}async getQueryTime(t){if(aA().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0)return this.gpgpu.waitForQueryAndGetTime(t);const e=t;return e.endMs-e.startMs}disposeData(t,e=!1){if(this.pendingDisposal.has(t))return!1;if(!this.texData.has(t))return!0;if(e?this.texData.get(t).refCount=0:this.texData.get(t).refCount--,!e&&this.texData.get(t).refCount>0)return!1;if(this.pendingRead.has(t))return this.pendingDisposal.add(t),this.pendingDeletes++,!1;this.releaseGPUData(t);const{complexTensorInfos:n}=this.texData.get(t);return null!=n&&(this.disposeData(n.real.dataId,e),this.disposeData(n.imag.dataId,e)),this.texData.delete(t),!0}releaseGPUData(t){const{texture:e,dtype:n,texShape:i,usage:s,isPacked:r,slice:a}=this.texData.get(t),o=a&&a.origDataId||t,l=this.dataRefCount.get(o);l>1?this.dataRefCount.set(o,l-1):(this.dataRefCount.delete(o),null!=e&&(this.numBytesInGPU-=this.computeBytes(i,n),this.textureManager.releaseTexture(e,i,s,r)));const u=this.texData.get(t);u.texture=null,u.texShape=null,u.isPacked=!1,u.slice=null}getTexture(t){return this.uploadToGPU(t),this.texData.get(t).texture.texture}getDataInfo(t){return this.texData.get(t)}shouldExecuteOnCPU(t,e=Dnt){return aA().getBool("WEBGL_CPU_FORWARD")&&t.every((t=>null==this.texData.get(t.dataId).texture&&IO(t.shape)0&&VO(n[0])){const s=n.map((t=>ok(t)));i=this.write(s,t,e)}else i=this.write(n,t,e);return this.texData.get(i).usage=null,{dataId:i,shape:t,dtype:e}}makeOutput(t,e,n){return TD().makeTensorFromTensorInfo(this.makeTensorInfo(t,e,n),this)}unpackTensor(t){const e=new Cnt(t.shape);return this.runWebGLProgram(e,[t],t.dtype)}packTensor(t){const e=new hnt(t.shape);return this.runWebGLProgram(e,[t],t.dtype,null,!0)}packedReshape(t,e){const n=[H7(t.shape),...W7(t.shape)],i={dtype:t.dtype,shape:n,dataId:t.dataId},s=[H7(e),...W7(e)],r=new pnt(s,n),a=[n],o=this.runWebGLProgram(r,[i],t.dtype,a,!0);return{dataId:o.dataId,shape:e,dtype:o.dtype}}decode(t,e){const n=this.texData.get(t),{isPacked:i,shape:s,dtype:r}=n;if(null!=e){_O(IO(s)<=e[0]*e[1]*4,(()=>"customTexShape is too small. Row * Column * 4 should be equal or larger than the size of the tensor data."))}const a=z7(s);let o;o=i?new Ftt(a):new Ltt(a);const l=[null!=e?e:u7(a)];return{dtype:r,shape:s,dataId:this.runWebGLProgram(o,[{shape:a,dtype:r,dataId:t}],r,l,!0,e).dataId}}runWebGLProgram(t,e,n,i,s=!1,r){const a=this.makeTensorInfo(t.outputShape,n),o=this.texData.get(a.dataId);if(t.packedOutput&&(o.isPacked=!0),t.outPackingScheme===r7.DENSE){const e=null!=r?r:u7(t.outputShape);o.texShape=e.map((t=>2*t))}if(null!=t.outTexUsage&&(o.usage=t.outTexUsage),0===IO(a.shape))return o.values=kO(a.dtype,0),a;const l=[],u=e.map((e=>{if("complex64"===e.dtype)throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");let n=this.texData.get(e.dataId);if(null==n.texture){if(!t.packedInputs&&IO(e.shape)<=aA().getNumber("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:e.shape,texData:null,isUniform:!0,uniformValues:n.values};t.packedInputs&&(n.isPacked=!0,n.shape=e.shape)}if(this.uploadToGPU(e.dataId),!!n.isPacked!=!!t.packedInputs)e=n.isPacked?this.unpackTensor(e):this.packTensor(e),l.push(e),n=this.texData.get(e.dataId);else if(n.isPacked&&!q7(n.shape,e.shape)){const t=e,i=e.shape;e.shape=n.shape,e=this.packedReshape(e,i),l.push(e),n=this.texData.get(e.dataId),t.shape=i}return{shape:e.shape,texData:n,isUniform:!1}}));this.uploadToGPU(a.dataId);const h={shape:a.shape,texData:o,isUniform:!1},p=function(t,e,n){let i="";e.concat(n).forEach((e=>{const s=null!=e.texData&&null!=e.texData.slice&&e.texData.slice.flatOffset>0;if(t.enableShapeUniforms&&!e.isUniform){const r=e.texData.texShape,{useSqueezeShape:a,uniformShape:o,keptDims:l}=Att(t.packedInputs,e.shape,r);let u="",h="",p="";if(1===o.length&&t.packedInputs){const t=[Math.ceil(r[0]/2),Math.ceil(r[1]/2)];u=`${t[0]>1}_${t[1]>1}`}else if(2!==o.length||t.packedInputs){if(o.length>2&&!t.packedInputs){const t=zO(o);p=`${t[0]===r[1]}_${t[t.length-1]===r[1]}`}}else h=`${o[0]>1}_${o[1]>1}`;const c=e.shape.length,d=2===o.length&&vO(e.shape,r),f=1===IO(e.shape),m=mF(e.shape,n.shape),g=!t.packedInputs&&c===n.shape.length&&vO(r,n.texData.texShape),_=t.packedInputs||o.length>2?"":`${r[0]>1}_${r[1]>1}`;i+=`${c}_${g}_${a?l:""}_${o.length}_${f}_${m}_${d}_${u}_${h}_${p}_${_}_${s}`}else{const t=e.isUniform?"uniform":e.texData.texShape;i+=`${e.shape}_${t}_${s}`}}));const s=t.userCode;let r=t.constructor.name;return r+="_"+i+"_"+s+`${aA().getNumber("WEBGL_VERSION")}`,r}(t,u,h),c=this.getAndSaveBinary(p,(()=> +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i){const s=n.map(((t,n)=>{const i={logicalShape:t.shape,texShape:t.isUniform?null:t.texData.texShape,isUniform:t.isUniform,isPacked:!t.isUniform&&t.texData.isPacked,flatOffset:null};return null!=t.texData&&null!=t.texData.slice&&t.texData.slice.flatOffset>0&&(i.flatOffset=t.texData.slice.flatOffset),{name:e.variableNames[n],shapeInfo:i}})),r=s.map((t=>t.shapeInfo)),a={logicalShape:i.shape,texShape:i.texData.texShape,isUniform:!1,isPacked:i.texData.isPacked,flatOffset:null},o=Ttt(s,a,e),l=y7(t.gl,o),u=t.createProgram(l);return aA().get("ENGINE_COMPILE_ONLY")?{program:e,fragmentShader:l,source:o,webGLProgram:u,inShapeInfos:r,outShapeInfo:a,variablesLocations:null,customUniformLocations:null,infLoc:null,nanLoc:null,outShapeLocation:null,outShapeStridesLocation:null,outTexShapeLocation:null}:(t.buildVao(u),Object.assign({program:e,fragmentShader:l,source:o,webGLProgram:u,inShapeInfos:r,outShapeInfo:a},Ntt(t,e,u)))}(this.gpgpu,t,u,h))),d=null!=this.activeTimers;let f;d&&(f=this.startTimer()),aA().get("ENGINE_COMPILE_ONLY")||function(t,e,n,i,s){e.program.enableShapeUniforms||(ktt(e.inShapeInfos,n),ktt([e.outShapeInfo],[i]));const r=i.texData.texture,a=i.texData.texShape;i.texData.isPacked?t.setOutputPackedMatrixTexture(r.texture,a[0],a[1]):t.setOutputMatrixTexture(r.texture,a[0],a[1]),t.setProgram(e.webGLProgram),t.bindVertexArray(e.webGLProgram.vao),1===aA().getNumber("WEBGL_VERSION")&&null!==e.infLoc&&t.gl.uniform1f(e.infLoc,1/0),null!==e.nanLoc&&t.gl.uniform1f(e.nanLoc,NaN);for(let i=0;ithis.disposeIntermediateTensorInfo(t))),d&&(f=this.endTimer(f),this.activeTimers.push({name:t.constructor.name,query:this.getQueryTime(f)}));const m=aA().getNumber("WEBGL_FLUSH_THRESHOLD");if(m>0){const t=rk();t-this.lastGlFlushTime>m&&(this.gpgpu.gl.flush(),this.lastGlFlushTime=t)}if(!aA().getBool("WEBGL_LAZILY_UNPACK")&&o.isPacked&&!1===s){const t=this.unpackTensor(a);return this.disposeIntermediateTensorInfo(a),t}return a}compileAndRun(t,e,n,i,s=!1){n=n||e[0].dtype;return this.runWebGLProgram(t,e,n,i,s)}getAndSaveBinary(t,e){return t in this.binaryCache||(this.binaryCache[t]=e()),this.binaryCache[t]}getTextureManager(){return this.textureManager}dispose(){if(!this.disposed){if(!aA().getBool("IS_TEST")){Object.keys(this.binaryCache).forEach((t=>{this.gpgpu.deleteProgram(this.binaryCache[t].webGLProgram),delete this.binaryCache[t]}))}this.textureManager.dispose(),null!=this.canvas&&"undefined"!=typeof HTMLCanvasElement&&this.canvas instanceof HTMLCanvasElement?this.canvas.remove():this.canvas=null,this.gpgpuCreatedLocally&&(this.gpgpu.program=null,this.gpgpu.dispose()),this.disposed=!0}}floatPrecision(){return null==this.floatPrecisionValue&&(this.floatPrecisionValue=ED((()=>{if(!aA().get("WEBGL_RENDER_FLOAT32_ENABLED")){const t=aA().getBool("DEBUG");aA().set("DEBUG",!1);const e=this.abs(tF(1e-8)).dataSync()[0];if(aA().set("DEBUG",t),e>0)return 32}return 16}))),this.floatPrecisionValue}epsilon(){return 32===this.floatPrecision()?1e-7:1e-4}uploadToGPU(t){const e=this.texData.get(t),{shape:n,dtype:i,values:s,texture:r,usage:a,isPacked:o}=e;if(null!=r)return;const l=null!=this.activeTimers;let u;l&&(u=rk());let h=e.texShape;if(null==h&&(h=X7(n,o),e.texShape=h),null!=s){const t=z7(n);let r,a=h[1],p=h[0];const c=s instanceof Uint8Array||s instanceof Uint8ClampedArray;!o&&c||([a,p]=h7(h[0],h[1])),r=o?new Utt(t,c):new Vtt(t,c);const d=c?[p,a]:h,f=this.makeTensorInfo(d,i),m=this.texData.get(f.dataId);m.usage=c?a7.PIXELS:a7.UPLOAD,m.texShape=d,this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(f.dataId),a,p,s);const g=[[p,a]],_=!0,T=this.runWebGLProgram(r,[f],i,g,_),y=this.texData.get(T.dataId);e.texShape=y.texShape,e.isPacked=y.isPacked,e.usage=y.usage,aA().get("ENGINE_COMPILE_ONLY")?this.disposeData(T.dataId):(e.texture=y.texture,e.values=null,this.texData.delete(T.dataId)),this.disposeIntermediateTensorInfo(f),l&&(this.uploadWaitMs+=rk()-u)}else{const t=this.acquireTexture(h,a,i,o);e.texture=t}}convertAndCacheOnCPU(t,e){const n=this.texData.get(t),{dtype:i}=n;return null!=e&&(n.values=function(t,e){if("float32"===e||"complex64"===e)return t;if("int32"===e||"bool"===e){const n="int32"===e?new Int32Array(t.length):new Uint8Array(t.length);for(let e=0;e1024*this.numMBBeforeWarning*1024){const t=(this.numBytesInGPU/1024/1024).toFixed(2);this.warnedAboutMemory=!0,console.warn(`High memory usage in GPU: ${t} MB, most likely due to a memory leak`)}return this.textureManager.acquireTexture(t,e,i)}computeBytes(t,e){return t[0]*t[1]*$O(e)}checkCompileCompletion(){for(const[,t]of Object.entries(this.binaryCache))this.checkCompletion_(t)}async checkCompileCompletionAsync(){const t=[];if(this.gpgpu.parallelCompilationExtension){for(const[,e]of Object.entries(this.binaryCache))t.push(this.checkCompletionAsync_(e));return Promise.all(t)}for(const[,e]of Object.entries(this.binaryCache)){const n=new Promise((t=>{try{this.checkCompletion_(e),t(!0)}catch(t){throw t}}));t.push(n)}return Promise.all(t)}async checkCompletionAsync_(t){return this.gpgpu.gl.getProgramParameter(t.webGLProgram,this.gpgpu.parallelCompilationExtension.COMPLETION_STATUS_KHR)?this.checkCompletion_(t):(await rG(),this.checkCompletionAsync_(t))}checkCompletion_(t){if(!1===this.gpgpu.gl.getProgramParameter(t.webGLProgram,this.gpgpu.gl.LINK_STATUS)){if(console.log(this.gpgpu.gl.getProgramInfoLog(t.webGLProgram)),!1===this.gpgpu.gl.getShaderParameter(t.fragmentShader,this.gpgpu.gl.COMPILE_STATUS))throw E7(t.source,this.gpgpu.gl.getShaderInfoLog(t.fragmentShader)),new Error("Failed to compile fragment shader.");throw new Error("Failed to link vertex and fragment shaders.")}return!0}getUniformLocations(){for(const t of Object.values(this.binaryCache)){this.gpgpu.buildVao(t.webGLProgram);const{variablesLocations:e,customUniformLocations:n,infLoc:i,nanLoc:s,outShapeLocation:r,outShapeStridesLocation:a,outTexShapeLocation:o}=Ntt(this.gpgpu,t.program,t.webGLProgram);t.variablesLocations=e,t.customUniformLocations=n,t.infLoc=i,t.nanLoc=s,t.outShapeLocation=r,t.outShapeStridesLocation=a,t.outTexShapeLocation=o}}createTensorFromGPUData(t,e,n){t.channels=t.channels||"RGBA";const{texture:i,height:s,width:r,channels:a}=t,o=TD().backend;if(!o.gpgpu.gl.isTexture(i))throw new Error("The texture is invalid. Also, please make sure the texture and the TFJS WebGL backend are using the same canvas. If you want to use your own custom canvas, you have to create and use the custom TFJS WebGL backend created from the canvas through 'new tf.MathBackendWebGL(customCanvas)'.");const l=o.writeTexture(i,e,n,s,r,a);return TD().makeTensorFromDataId(l,e,n,o)}}Lnt.nextDataId=0; +/** @license See the LICENSE file. */ +const Fnt="4.22.0"; +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Pnt(){aA().set("WEBGL_FORCE_F16_TEXTURES",!0)} +/** + * @license + * Copyright 2020 Google Inc. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +Zk()&&CD("webgl",(()=>new Lnt),2);const $nt={forceHalfFloat:Pnt},Bnt="\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n";class Vnt{constructor(t,e,n){this.variableNames=["A","B"],this.outputShape=_F(e,n),this.enableShapeUniforms=Dtt(this.outputShape.length),this.userCode=`\n float binaryOperation(float a, float b) {\n ${t}\n }\n\n void main() {\n float a = getAAtOutCoords();\n float b = getBAtOutCoords();\n setOutput(binaryOperation(a, b));\n }\n `}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const Unt="\n result.r = isNaN.r ? NAN : result.r;\n result.g = isNaN.g ? NAN : result.g;\n result.b = isNaN.b ? NAN : result.b;\n result.a = isNaN.a ? NAN : result.a;\n";class Ynt{constructor(t,e,n,i=!1){this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.packedInputs=!0,this.packedOutput=!0,this.outputShape=_F(e,n);const s=this.outputShape.length;this.enableShapeUniforms=Dtt(s);let r="";if(i)if(0===s||1===IO(this.outputShape))r="\n result.y = 0.;\n result.z = 0.;\n result.w = 0.;\n ";else{if(r=`\n ${Ott(s)} coords = getOutputCoords();\n `,1===s)this.enableShapeUniforms?r+="\n result.y = (coords + 1) >= outShape ? 0. : result.y;\n result.z = 0.;\n result.w = 0.;\n ":r+=`\n result.y = (coords + 1) >= ${this.outputShape[0]} ? 0. : result.y;\n result.z = 0.;\n result.w = 0.;\n `;else{const t=unt("coords",s);this.enableShapeUniforms?r+=`\n bool nextRowOutOfBounds =\n (${t[s-2]} + 1) >= outShape[${s} - 2];\n bool nextColOutOfBounds =\n (${t[s-1]} + 1) >= outShape[${s} - 1];\n result.y = nextColOutOfBounds ? 0. : result.y;\n result.z = nextRowOutOfBounds ? 0. : result.z;\n result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n `:r+=`\n bool nextRowOutOfBounds =\n (${t[s-2]} + 1) >= ${this.outputShape[s-2]};\n bool nextColOutOfBounds =\n (${t[s-1]} + 1) >= ${this.outputShape[s-1]};\n result.y = nextColOutOfBounds ? 0. : result.y;\n result.z = nextRowOutOfBounds ? 0. : result.z;\n result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n `}}this.userCode=`\n vec4 binaryOperation(vec4 a, vec4 b) {\n ${t}\n }\n\n void main() {\n vec4 a = getAAtOutCoords();\n vec4 b = getBAtOutCoords();\n\n vec4 result = binaryOperation(a, b);\n ${r}\n\n setOutput(result);\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Gnt(t){const{inputs:e,backend:n}=t,{x:i}=e;return n.incRef(i.dataId),{dataId:i.dataId,shape:i.shape,dtype:i.dtype}}const Hnt={kernelName:RM,backendName:"webgl",kernelFunc:Gnt}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Wnt(t){const{inputs:e,backend:n}=t,{real:i,imag:s}=e,r=n.makeTensorInfo(i.shape,"complex64"),a=n.texData.get(r.dataId),o=Gnt({inputs:{x:i},backend:n}),l=Gnt({inputs:{x:s},backend:n});return a.complexTensorInfos={real:o,imag:l},r}const znt={kernelName:$A,backendName:"webgl",kernelFunc:Wnt},Xnt="return (a < 0.) ? b * a : a;",jnt="\n vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n";const qnt={kernelName:kM,backendName:"webgl",kernelFunc:function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{alpha:r}=i,a=n.makeTensorInfo([],"float32",ik(r,"float32")),o=aA().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Ynt(jnt,s.shape,a.shape):new Vnt(Xnt,s.shape,a.shape),l=n.runWebGLProgram(o,[s,a],"float32");return n.disposeIntermediateTensorInfo(a),l}},Knt="return (a < 0.) ? b * a : a;",Qnt="\n vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n";const Jnt={kernelName:yC,backendName:"webgl",kernelFunc:function(t){const{inputs:e,backend:n}=t,{x:i,alpha:s}=e,r=aA().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Ynt(Qnt,i.shape,s.shape):new Vnt(Knt,i.shape,s.shape);return n.runWebGLProgram(r,[i,s],"float32")}},Znt="if (isnan(x)) return x;";function tit({opSnippet:t,packedOpSnippet:e,cpuKernelImpl:n,dtype:i}){return({inputs:s,backend:r})=>{const{x:a}=s,o=r,l=i||a.dtype;if(o.shouldExecuteOnCPU([a])&&null!=n){const t=o.texData.get(a.dataId),e=n(t.values,l);return o.makeTensorInfo(a.shape,l,e)}let u;return u=aA().getBool("WEBGL_PACK_UNARY_OPERATIONS")&&null!=e?new Mnt(a.shape,e):new gnt(a.shape,t),o.runWebGLProgram(u,[a],l)}}function eit({opSnippet:t,packedOpSnippet:e,checkOutOfBounds:n=!1,supportsComplex:i=!1,cpuKernelImpl:s,dtype:r}){return({inputs:a,backend:o})=>{const{a:l,b:u}=a,h=o;if(i&&"complex64"===l.dtype){const e=h.texData.get(l.dataId),n=h.texData.get(u.dataId),[i,s]=[[e.complexTensorInfos.real,n.complexTensorInfos.real],[e.complexTensorInfos.imag,n.complexTensorInfos.imag]].map((e=>{const[n,i]=e,s={dataId:n.dataId,dtype:n.dtype,shape:l.shape},r={dataId:i.dataId,dtype:i.dtype,shape:u.shape},a=new Vnt(t,l.shape,u.shape);return h.runWebGLProgram(a,[s,r],Lk(n.dtype,i.dtype))})),r=Wnt({inputs:{real:i,imag:s},backend:h});return h.disposeIntermediateTensorInfo(i),h.disposeIntermediateTensorInfo(s),r}const p=r||Lk(l.dtype,u.dtype);if(("string"===l.dtype||"string"===u.dtype||h.shouldExecuteOnCPU([l,u]))&&null!=s){const t=h.texData.get(l.dataId).values,e=h.texData.get(u.dataId).values,n="string"===l.dtype?uH(t):t,i="string"===l.dtype?uH(e):e,[r,a]=s(l.shape,u.shape,n,i,p),o=h.makeTensorInfo(a,p);return h.texData.get(o.dataId).values=r,o}let c;return c=aA().getBool("WEBGL_PACK_BINARY_OPERATIONS")&&null!=e?new Ynt(e,l.shape,u.shape,n):new Vnt(t,l.shape,u.shape),h.runWebGLProgram(c,[l,u],p)}}function nit(t,e=!1){if("linear"===t)return e?Snt:Tnt;if("relu"===t)return e?Rnt:Ent;if("elu"===t)return e?xnt:Int;if("relu6"===t)return e?Ont:bnt;if("prelu"===t)return e?Qnt:Knt;if("leakyrelu"===t)return e?jnt:Xnt;if("sigmoid"===t)return e?Ant:wnt;throw new Error(`Activation ${t} has not been implemented for the WebGL backend.`)} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class iit{constructor(t,e,n,i=!1,s=!1,r=!1,a=null,o=!1,l=!1){this.variableNames=["matrixA","matrixB"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.enableShapeUniforms=Dtt(this.outputShape.length);const u=i?t[1]:t[2],h=Math.ceil(u/2),p=i?"i * 2, rc.y":"rc.y, i * 2",c=s?"rc.z, i * 2":"i * 2, rc.z",d=i?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],f=s?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"];let m="",g="";a&&(m=o?`vec4 activation(vec4 a) {\n vec4 b = getPreluActivationWeightsAtOutCoords();\n ${a}\n }`:l?`vec4 activation(vec4 a) {\n vec4 b = getLeakyreluAlphaAtOutCoords();\n ${a}\n }`:`vec4 activation(vec4 x) {\n ${a}\n }`,g="result = activation(result);");const _=r?"result += getBiasAtOutCoords();":"";r&&this.variableNames.push("bias"),o&&this.variableNames.push("preluActivationWeights"),l&&this.variableNames.push("leakyreluAlpha");let T="rc.x",y="rc.x";t[0]`The new shape (${l}) has ${u} elements and the old shape (${s.shape}) has ${o} elements. The new shape and old shape must have the same number of elements.`));const h=a.texData.get(s.dataId);return!h.isPacked||q7(s.shape,l)||null!==h.texture&&q7(h.shape,l)?(a.incRef(s.dataId),{dataId:s.dataId,shape:l,dtype:s.dtype}): +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n){const i=[H7(t.shape),...W7(t.shape)],s={dtype:t.dtype,shape:i,dataId:t.dataId},r=[H7(e),...W7(e)],a=new pnt(r,i),o=[i],l=n.runWebGLProgram(a,[s],t.dtype,o,!0);return{dataId:l.dataId,shape:e,dtype:l.dtype}}(s,l,a)}const hit={kernelName:OC,backendName:"webgl",kernelFunc:uit}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class pit{constructor(t,e){this.variableNames=["x"];const{windowSize:n,batchSize:i,inSize:s,outSize:r}=t;this.outputShape=[i,r];const a=4*Math.floor(n/4),o=n%4;let l="sumValue += dot(values, ones);";if(null!=e){const t=1/e;l=`sumValue += dot(values * ${wO(t)?t.toPrecision(2):t}, ones);`}let u="";s%n>0&&(u=`\n if (inIdx < 0 || inIdx >= ${s}) {\n return 0.0;\n }\n `),this.userCode=`\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float getValue(int batch, int inIdx) {\n ${u}\n return getX(batch, inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * ${n};\n\n float sumValue = 0.0;\n\n for (int i = 0; i < ${a}; i += 4) {\n int inIdx = inOffset + i;\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n ${l}\n }\n\n int inIdx = inOffset + ${a};\n if (${1===o}) {\n vec4 values = vec4(getValue(batch, inIdx), 0.0, 0.0, 0.0);\n\n ${l}\n } else if (${2===o}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1), 0.0, 0.0);\n\n ${l}\n } else if (${3===o}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2), 0.0);\n\n ${l}\n }\n setOutput(sumValue);\n }\n `}} +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class cit{constructor(t,e){this.variableNames=["x"];const{windowSize:n,batchSize:i,inSize:s,outSize:r}=t;this.outputShape=[i,r];let a="0.0",o="";"prod"===e?a="1.0":"min"===e?(a="1.0 / 1e-20",o="min"):"max"===e&&(a="-1.0 / 1e-20",o="max");let l=`${e}(${e}(${e}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;"sum"===e?l="sumValue":"prod"===e?l="prodValue":"all"===e?l="allValue":"any"===e&&(l="anyValue");const u=4*Math.floor(n/4),h=n%4;let p=`\n if (${"sum"===e}) {\n sumValue += dot(values, ones);\n } else if (${"prod"===e}) {\n vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);\n prodValue *= tmp[0] * tmp[1];\n } else {\n minMaxValue = ${o}(values, minMaxValue);\n if (${"min"===e} || ${"max"===e}) {\n minMaxValue = ${o}(values, minMaxValue);\n bvec4 isNaN = isnan(values);\n if (isNaN.r || isNaN.g || isNaN.b || isNaN.a) {\n minMaxValue = vec4(NAN);\n }\n }\n }\n `,c="vec4";"all"===e?(a="1.0",p="\n bool reducedAllValue = all(values);\n float floatedReducedAllValue = float(reducedAllValue);\n allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);\n ",c="bvec4"):"any"===e&&(a="0.0",p="\n bool reducedAnyValue = any(values);\n float floatedReducedAnyValue = float(reducedAnyValue);\n anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);\n ",c="bvec4");let d="";s%n>0&&(d=`\n if (inIdx < 0 || inIdx >= ${s}) {\n return initializationValue;\n }\n `),this.userCode=`\n const float initializationValue = ${a};\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float getValue(int batch, int inIdx) {\n ${d}\n return getX(batch, inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * ${n};\n\n vec4 minMaxValue = vec4(${a});\n float prodValue = 1.0;\n float sumValue = 0.0;\n float allValue = 1.0;\n float anyValue = 0.0;\n\n for (int i = 0; i < ${u}; i += 4) {\n int inIdx = inOffset + i;\n ${c} values = ${c}(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n ${p}\n }\n\n int inIdx = inOffset + ${u};\n if (${1===h}) {\n ${c} values = ${c}(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n ${p}\n } else if (${2===h}) {\n ${c} values = ${c}(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n ${p}\n } else if (${3===h}) {\n ${c} values = ${c}(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n ${p}\n }\n setOutput(${l});\n }\n `}}function dit(t,e,n,i){const s= +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const e=[];for(;0===e.length||1!==e[e.length-1].outSize;){const n=e.length?e[e.length-1].outSize:t[1],i=fG(n);e.push({inSize:n,windowSize:i,outSize:Math.ceil(n/i)})}return e}(t.shape);let r=t;for(let a=0;a6)throw Error(`Transpose for rank ${e} is not yet supported`);const n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],i=new Array(e);for(let e=0;e6)throw Error(`Packed transpose for rank ${this.rank} is not yet supported.`);const i=Ott(this.rank),s=lnt("rc",this.rank),r=new Array(this.rank);for(let t=0;t`Error in matMul: inner shapes (${p}) and (${c}) of Tensors with shapes ${t.shape} and ${e.shape} and transposeA=${n} and transposeB=${i} must match.`));const I=n?[_,p,d]:[_,d,p],E=i?[T,f,c]:[T,c,f],b=uit({inputs:{x:t},backend:s,attrs:{shape:I}}),v=uit({inputs:{x:e},backend:s,attrs:{shape:E}}),w=[b,v],S=Math.max(_,T),x=n?b.shape[1]:b.shape[2],R=null!=r,O=null!=a,A="leakyrelu"===l,M=null!=l?nit(l,!0):null;let C;if((1===d||1===f)&&x>Eit&&!1===(R||O||A||null!=M)){let t=b,e=v;n&&(t=yit({inputs:{x:b},backend:s,attrs:{perm:[0,2,1]}}),w.push(t)),i&&(e=yit({inputs:{x:v},backend:s,attrs:{perm:[0,2,1]}}),w.push(e));const r=1===f;let a=t;1!==f&&(a=uit({inputs:{x:t},backend:s,attrs:{shape:[S,x,1]}}),w.push(a));const o=1===f?2:1;let l=e;r&&(l=uit({inputs:{x:e},backend:s,attrs:{shape:[S,1,x]}}),w.push(l));const u=oit({inputs:{a,b:l},backend:s});C=_it({inputs:{x:u},backend:s,attrs:{axis:o,keepDims:!0}}),w.push(u)}else{const l=Lk(t.dtype,e.dtype),u=new iit(I,E,[S,d,f],n,i,R,M,O,A),h=[b,v];if(null!=r&&h.push(r),O&&h.push(a),A){const t=s.makeTensorInfo([],"float32",ik(o,"float32"));h.push(t),w.push(t)}C=s.runWebGLProgram(u,h,l)}const N=uit({inputs:{x:C},backend:s,attrs:{shape:y}});w.push(C);for(const t of w)s.disposeIntermediateTensorInfo(t);return N}const vit={kernelName:xN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{a:s,b:r,bias:a,preluActivationWeights:o}=e,{transposeA:l,transposeB:u,activation:h,leakyreluAlpha:p}=i;return bit({a:s,b:r,transposeA:l,transposeB:u,backend:n,bias:a,preluActivationWeights:o,leakyreluAlpha:p,activation:h})}},wit="return abs(x);";const Sit={kernelName:pA,backendName:"webgl",kernelFunc:function(t){const{inputs:e,backend:n}=t,{x:i}=e;if(n.shouldExecuteOnCPU([i])&&"complex64"!==i.dtype){const t=n.texData.get(i.dataId),e=zet(t.values);return n.makeTensorInfo(i.shape,i.dtype,e)}let s;return s=aA().getBool("WEBGL_PACK_UNARY_OPERATIONS")?new Mnt(i.shape,wit):new gnt(i.shape,wit),n.runWebGLProgram(s,[i],i.dtype)}},xit=tit({opSnippet:_nt+"\n if (abs(x) > 1.) {\n return NAN;\n }\n return acos(x);\n"}),Rit={kernelName:cA,backendName:"webgl",kernelFunc:xit},Oit=tit({opSnippet:_nt+"\n if (x < 1.0) return NAN;\nreturn log(x + sqrt(x * x - 1.0));"}),Ait={kernelName:dA,backendName:"webgl",kernelFunc:Oit},Mit="return a + b;",Cit=eit({opSnippet:Mit,packedOpSnippet:Mit,supportsComplex:!0,cpuKernelImpl:cet}),Nit={kernelName:fA,backendName:"webgl",kernelFunc:Cit}; +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class kit{constructor(t,e){this.outputShape=[],this.outputShape=t,this.variableNames=e.map(((t,e)=>`T${e}`));const n=[];this.variableNames.forEach((t=>{n.push(`float v${t} = get${t}AtOutCoords();`)}));const i=this.variableNames.map((t=>`v${t}`)).join(" + ");this.userCode=`\n void main() {\n ${n.join("\n ")}\n\n float result = ${i};\n setOutput(result);\n }\n `}} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Dit{constructor(t,e){this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t,this.variableNames=e.map(((t,e)=>`T${e}`));const n=[];this.variableNames.forEach((t=>{n.push(`vec4 v${t} = get${t}AtOutCoords();`)}));const i=this.variableNames.map((t=>`v${t}`)).join(" + ");this.userCode=`\n void main() {\n ${n.join("\n ")}\n\n vec4 result = ${i};\n setOutput(result);\n }\n `}}const Lit={kernelName:mA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function t(e){const{inputs:n,backend:i}=e,s=n;if(1===s.length)return Gnt({inputs:{x:s[0]},backend:i});if(s.length>aA().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER")){const e=Math.floor(s.length/2),n=t({inputs:s.slice(0,e),backend:i}),r=t({inputs:s.slice(e),backend:i});return t({inputs:[n,r],backend:i})}const r=s.map((t=>t.dtype)).reduce(((t,e)=>Lk(t,e))),a=s.map((t=>t.shape)),o=aA().getBool("WEBGL_PACK")?new Dit(s[0].shape,a):new kit(s[0].shape,a);return i.runWebGLProgram(o,s,r)}};const Fit={kernelName:gA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{axis:r,keepDims:a}=i,o=s.shape.length,l=CO(r,s.shape);let u=l;const h=_B(u,o);let p=s;null!=h&&(p=yit({inputs:{x:s},backend:n,attrs:{perm:h}}),u=yB(u.length,o)),gB("all",u,o);const[c,d]=fB(p.shape,u),f=uit({inputs:{x:p},backend:n,attrs:{shape:[-1,IO(d)]}}),m=dit(f,f.dtype,"all",n);let g;if(a){g=uit({inputs:{x:m},backend:n,attrs:{shape:mB(c,l)}})}else g=uit({inputs:{x:m},backend:n,attrs:{shape:c}});return n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(m),null!=h&&n.disposeIntermediateTensorInfo(p),g}};const Pit={kernelName:_A,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{axis:r,keepDims:a}=i,o=s.shape.length,l=CO(r,s.shape);let u=l;const h=_B(u,o);let p=s;null!=h&&(p=yit({inputs:{x:s},backend:n,attrs:{perm:h}}),u=yB(u.length,o)),gB("any",u,o);const[c,d]=fB(p.shape,u),f=uit({inputs:{x:p},backend:n,attrs:{shape:[-1,IO(d)]}}),m=dit(f,f.dtype,"any",n);let g;if(a){g=uit({inputs:{x:m},backend:n,attrs:{shape:mB(c,l)}})}else g=uit({inputs:{x:m},backend:n,attrs:{shape:c}});return n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(m),null!=h&&n.disposeIntermediateTensorInfo(p),g}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class $it{constructor(t,e,n){this.variableNames=["A"];const{windowSize:i,batchSize:s,outSize:r}=t;n||this.variableNames.push("bestIndicesA"),this.outputShape=[s,r];const a="max"===e?">":"<",o=n?"inOffset + i;":"round(getBestIndicesA(batch, inOffset + i));";this.userCode=`\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * ${i};\n\n int bestIndex = inOffset;\n float bestValue = getA(batch, bestIndex);\n\n for (int i = 0; i < ${i}; i++) {\n int inIdx = ${o};\n float candidate = getA(batch, inIdx);\n if (candidate ${a} bestValue) {\n bestValue = candidate;\n bestIndex = inIdx;\n }\n }\n setOutput(float(bestIndex));\n }\n `}} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Bit{constructor(t,e,n,i){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,_O(t.length>2,(()=>`Packed arg${n.charAt(0).toUpperCase()+n.slice(1)} supports only inputs with rank above 2.`));const s=t[t.length-1],r=Math.ceil(s/e);this.outputShape=t.slice(0,-1),r>1&&this.outputShape.push(r),i||this.variableNames.push("bestIndicesA");const a=this.outputShape,o=a.length,l=Ott(o),u=unt("coords",o);let h,p;if(1===r){p=o+1;const t=Ott(p);h=`\n ${t} sourceLocR = ${t}(${u.join()}, 0);\n ++${u[o-1]};\n ${t} sourceLocG = ${t}(${u.join()}, 0);\n ++${u[o-2]};\n ${t} sourceLocA = ${t}(${u.join()}, 0);\n --${u[o-1]};\n ${t} sourceLocB = ${t}(${u.join()}, 0);\n --${u[o-2]};`}else p=o,h=`\n ${l} sourceLocR = coords;\n ++${u[o-1]};\n ${l} sourceLocG = coords;\n ++${u[o-2]};\n ${l} sourceLocA = coords;\n --${u[o-1]};\n ${l} sourceLocB = coords;\n --${u[o-2]};`;const c=["x","y","z","w","u","v"].slice(0,p),d="."+c[p-1],f=c.map((t=>"int "+t)),m=unt("sourceLocR",p-1).concat("inIdx.r"),g=unt("sourceLocG",p-1).concat("inIdx.g"),_=unt("sourceLocB",p-1).concat("inIdx.b"),T=unt("sourceLocA",p-1).concat("inIdx.a"),y="max"===n?"greaterThan":"lessThan",I=i?"":`\n inIdx = round(vec4(getBestIndicesAChannel(${m.join()}),\n getBestIndicesAChannel(${g.join()}),\n getBestIndicesAChannel(${_.join()}),\n getBestIndicesAChannel(${T.join()})));`,E=`vec4(\n getAChannel(${m.join()}),\n hasNextCol ? getAChannel(${g.join()}) : 0.,\n hasNextRow ? getAChannel(${_.join()}) : 0.,\n hasNextRow && hasNextCol ? getAChannel(${T.join()}) : 0.)`,b=i?"":`\n float getBestIndicesAChannel(${f.join()}) {\n return getChannel(getBestIndicesA(${c.join()}),\n vec2(${c.slice(-2).join()}));\n }`;this.userCode=`\n float getAChannel(${f.join()}) {\n return getChannel(getA(${c.join()}),\n vec2(${c.slice(-2).join()}));\n }\n ${b}\n void main() {\n ${l} coords = getOutputCoords();\n bool hasNextCol = ${u[o-1]} < ${a[o-1]-1};\n bool hasNextRow = ${u[o-2]} < ${a[o-2]-1};\n ${h}\n ivec4 srcIdx = ivec4(sourceLocR${d}, sourceLocG${d},\n sourceLocB${d}, sourceLocA${d}) * ${e};\n ivec4 inIdx = srcIdx;\n vec4 bestIndex = vec4(inIdx);\n vec4 bestValue = ${E};\n\n for (int i = 0; i < ${e}; i++) {\n inIdx = srcIdx;\n ${I}\n vec4 candidate = ${E};\n bvec4 nan = isnan(candidate);\n bvec4 replace = bvec4(\n vec4(${y}(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));\n\n bestValue = vec4(replace.x ? candidate.x : bestValue.x,\n replace.y ? candidate.y : bestValue.y,\n replace.z ? candidate.z : bestValue.z,\n replace.w ? candidate.w : bestValue.w);\n bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));\n srcIdx++;\n }\n setOutput(bestIndex);\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Vit(t,e,n,i=null){let s=e.shape[0],r=e.shape[1];null!=i&&(s=i.shape[0],r=i.shape[1]);const a=fG(r),o={windowSize:a,inSize:r,batchSize:s,outSize:Math.ceil(r/a)},l=new $it(o,n,null==i),u=[e];null!=i&&u.push(i);const h=t.runWebGLProgram(l,u,"int32");if(1===h.shape[1])return h;const p=Vit(t,e,n,h);return t.disposeIntermediateTensorInfo(h),p}function Uit(t,e,n,i=null){const s=null!=i?i.shape:e.shape,r=fG(s[s.length-1]),a=new Bit(s,r,n,null==i),o=null==i?[e]:[e,i],l=t.runWebGLProgram(a,o,"int32");if(l.shape.length===e.shape.length){const i=Uit(t,e,n,l);return t.disposeIntermediateTensorInfo(l),i}return l}function Yit(t,e,n,i){const s=[n];if(gB("arg"+i.charAt(0).toUpperCase()+i.slice(1),s,e.shape.length),!aA().getBool("WEBGL_PACK_REDUCE")||e.shape.length<=2){const n=[],r=t.texData.get(e.dataId);let a=e;null!==r&&r.isPacked&&(a=t.unpackTensor(e),n.push(a));const[o,l]=fB(a.shape,s),u=IO(l),h=uit({inputs:{x:a},backend:t,attrs:{shape:[-1,u]}});n.push(h);const p=Vit(t,h,i);n.push(p);const c=uit({inputs:{x:p},backend:t,attrs:{shape:o}});return n.forEach((e=>t.disposeIntermediateTensorInfo(e))),c}return Uit(t,e,i)}const Git={kernelName:TA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{axis:r}=i;let a=CO(r,s.shape);const o=_B(a,s.shape.length);let l=s;const u=[];null!=o&&(l=yit({inputs:{x:s},backend:n,attrs:{perm:o}}),u.push(l),a=yB(a.length,l.shape.length)),gB("argMax",[a[0]],l.shape.length);const h=Yit(n,l,a[0],"max");return u.forEach((t=>n.disposeIntermediateTensorInfo(t))),h}};const Hit={kernelName:yA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{axis:r}=i;let a=CO(r,s.shape);const o=_B(a,s.shape.length);let l=s;const u=[];null!=o&&(l=yit({inputs:{x:s},backend:n,attrs:{perm:o}}),u.push(l),a=yB(a.length,l.shape.length)),gB("argMin",[a[0]],l.shape.length);const h=Yit(n,l,a[0],"min");return u.forEach((t=>n.disposeIntermediateTensorInfo(t))),h}},Wit=tit({opSnippet:_nt+"\n if (abs(x) > 1.) {\n return NAN;\n }\n return asin(x);\n"}),zit={kernelName:IA,backendName:"webgl",kernelFunc:Wit},Xit=tit({opSnippet:_nt+"return log(x + sqrt(x * x + 1.0));"}),jit={kernelName:EA,backendName:"webgl",kernelFunc:Xit},qit=tit({opSnippet:_nt+"\n return atan(x);\n"}),Kit={kernelName:bA,backendName:"webgl",kernelFunc:qit},Qit=eit({opSnippet:Bnt+"\n return atan(a, b);\n",packedOpSnippet:"\n vec4 result = atan(a, b);\n bvec4 isNaNA = isnan(a);\n bvec4 isNaNB = isnan(b);\n bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w);\n "+Unt+"\n return result;\n"}),Jit={kernelName:wA,backendName:"webgl",kernelFunc:Qit},Zit=tit({opSnippet:_nt+"\n if ((x < -1.0) || (x > 1.0)) return NAN;\nreturn (log(1.0 + x) - log(1.0 - x)) / 2.0;"}),tst={kernelName:vA,backendName:"webgl",kernelFunc:Zit}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class est{constructor(t,e,n,i=!1,s=!1){if(this.variableNames=["x"],"avg"===e&&n)throw new Error("Cannot compute positions for average pool.");const r=t.filterWidth,a=t.strideHeight,o=t.strideWidth,l=t.dilationHeight,u=t.dilationWidth,h=t.effectiveFilterHeight,p=t.effectiveFilterWidth,c=t.padInfo.top,d=t.padInfo.left;this.outputShape=t.outShape;const f="avg"===e,m=`((batch * ${t.inHeight} + xR) * ${t.inWidth} + xC) * ${t.inChannels} + d`,g=`(xR * ${t.inWidth} + xC) * ${t.inChannels} + d`;let _="0.0";if(f||(_="-1.0 / 1e-20"),n){const e=">=";return void(this.userCode=`\n const ivec2 strides = ivec2(${a}, ${o});\n const ivec2 pads = ivec2(${c}, ${d});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n float avgValue = 0.0;\n\n for (int wR = 0; wR < ${h};\n wR += ${l}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${t.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${p};\n wC += ${u}) {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= ${t.inWidth}) {\n continue;\n }\n\n float value = getX(batch, xR, xC, d);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value ${e} currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition = ${i?s?m:g:`wR * ${p} + wC`};\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n `)}let T=`${e}(${e}(${e}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;"avg"===e&&(T="avgValue / max(count, 1.0)");const y=4*Math.floor(r/4),I=r%4,E=`\n if (${f}) {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = max(values, minMaxValue);\n }\n `;this.userCode=`\n const ivec2 strides = ivec2(${a}, ${o});\n const ivec2 pads = ivec2(${c}, ${d});\n const float initializationValue = ${_};\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xR, int xC, int d) {\n if (xC < 0 || xC >= ${t.inWidth}) {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xR, xC, d);\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n vec4 minMaxValue = vec4(${_});\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wR = 0; wR < ${h};\n wR += ${l}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${t.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${y}; wC += 4) {\n int xC = xCCorner + wC * ${u};\n\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + ${u}, d),\n getValue(batch, xR, xC + 2 * ${u}, d),\n getValue(batch, xR, xC + 3 * ${u}, d)\n );\n\n ${E}\n }\n\n int xC = xCCorner + ${y};\n if (${1===I}) {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n ${E}\n } else if (${2===I}) {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + ${u}, d),\n initializationValue,\n initializationValue\n );\n\n ${E}\n } else if (${3===I}) {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + ${u}, d),\n getValue(batch, xR, xC + 2 * ${u}, d),\n initializationValue\n );\n\n ${E}\n }\n }\n setOutput(${T});\n }\n `}}class nst{constructor(t,e,n,i=!1,s=!1){if(this.variableNames=["x"],"avg"===e&&n)throw new Error("Cannot compute positions for average pool.");const r=t.filterWidth,a=t.strideDepth,o=t.strideHeight,l=t.strideWidth,u=t.dilationDepth,h=t.dilationHeight,p=t.dilationWidth,c=t.effectiveFilterDepth,d=t.effectiveFilterHeight,f=t.effectiveFilterWidth,m=t.padInfo.front,g=t.padInfo.top,_=t.padInfo.left;this.outputShape=t.outShape;const T="avg"===e;let y="0.0";if(T||(y="-1.0 / 1e-20"),n){const e=">=";return void(this.userCode=`\n const ivec3 strides =\n ivec3(${a}, ${o}, ${l});\n const ivec3 pads = ivec3(${m}, ${g}, ${_});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xDCorner = xCorner.x;\n int xRCorner = xCorner.y;\n int xCCorner = xCorner.z;\n\n // max/min x(?, ?, ?, ch) to get y(yD, yR, yC, ch).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n\n for (int wD = 0; wD < ${c};\n wD += ${u}) {\n int xD = xDCorner + wD;\n\n if (xD < 0 || xD >= ${t.inDepth}) {\n continue;\n }\n\n for (int wR = 0; wR < ${d};\n wR += ${h}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${t.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${f};\n wC += ${p}) {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= ${t.inWidth}) {\n continue;\n }\n\n float value = getX(batch, xD, xR, xC, ch);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value ${e} currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition = ${i?s?`(((batch * ${t.inDepth} + xD) * ${t.inHeight} + xR) * ${t.inWidth} + xC) * ${t.inChannels} + ch`:`((xD * ${t.inHeight} + xR) * ${t.inWidth} + xC) * ${t.inChannels} + ch`:`wD * ${d} * ${f} +\n wR * ${f} + wC`};\n }\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n `)}let I=`${e}(${e}(${e}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;"avg"===e&&(I="avgValue / max(count, 1.0)");const E=4*Math.floor(r/4),b=r%4,v=`\n if (${T}) {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = max(values, minMaxValue);\n }\n `;this.userCode=`\n const ivec3 strides =\n ivec3(${a}, ${o}, ${l});\n const ivec3 pads = ivec3(${m}, ${g}, ${_});\n const float initializationValue = ${y};\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xD, int xR, int xC, int ch) {\n if (xC < 0 || xC >= ${t.inWidth}) {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xD, xR, xC, ch);\n }\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xDCorner = xCorner.x;\n int xRCorner = xCorner.y;\n int xCCorner = xCorner.z;\n\n // max/min x(?, ?, ?, d) to get y(yD, yR, yC, ch).\n // ? = to be determined\n vec4 minMaxValue = vec4(${y});\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wD = 0; wD < ${c};\n wD += ${u}) {\n int xD = xDCorner + wD;\n\n if (xD < 0 || xD >= ${t.inDepth}) {\n continue;\n }\n\n for (int wR = 0; wR < ${d};\n wR += ${h}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${t.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${E}; wC += 4) {\n int xC = xCCorner + wC * ${p};\n\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + ${p}, ch),\n getValue(batch, xD, xR, xC + 2 * ${p}, ch),\n getValue(batch, xD, xR, xC + 3 * ${p}, ch)\n );\n\n ${v}\n }\n\n int xC = xCCorner + ${E};\n if (${1===b}) {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n ${v}\n } else if (${2===b}) {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + ${p}, ch),\n initializationValue,\n initializationValue\n );\n\n ${v}\n } else if (${3===b}) {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + ${p}, ch),\n getValue(batch, xD, xR, xC + 2 * ${p}, ch),\n initializationValue\n );\n\n ${v}\n }\n }\n }\n setOutput(${I});\n }\n `}}const ist={kernelName:SA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e;utt(s,"avgPool");const{filterSize:r,strides:a,pad:o,dimRoundingMode:l}=i;_O(m$(a,1),(()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${a} and dilations '1'`));const u=r$(s.shape,r,a,1,o,l);if(1===u.filterWidth&&1===u.filterHeight&&vO(u.inShape,u.outShape))return Gnt({inputs:{x:s},backend:n});const h=new est(u,"avg",!1);return n.runWebGLProgram(h,[s],"float32")}};const sst={kernelName:RA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{filterSize:r,strides:a,pad:o,dimRoundingMode:l,dataFormat:u}=i,h=a$(s.shape,r,a,[1,1,1],o,l,u),p=new nst(h,"avg",!1);return n.runWebGLProgram(p,[s],"float32")}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class rst{constructor(t){this.variableNames=["dy"],this.outputShape=t.inShape;const e=t.filterHeight,n=t.filterWidth,i=t.strideHeight,s=t.strideWidth,r=t.dilationHeight,a=t.dilationWidth,o=t.effectiveFilterHeight,l=t.effectiveFilterWidth,u=o-1-t.padInfo.top,h=l-1-t.padInfo.left,p=1/(e*n);this.userCode=`\n const ivec2 pads = ivec2(${u}, ${h});\n const float avgMultiplier = float(${p});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${o};\n wR += ${r}) {\n float dyR = float(dyRCorner + wR) / ${i}.0;\n\n if (dyR < 0.0 || dyR >= ${t.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${l};\n wC+= ${a}) {\n float dyC = float(dyCCorner + wC) / ${s}.0;\n\n if (dyC < 0.0 || dyC >= ${t.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n setOutput(dotProd);\n }\n `}}class ast{constructor(t){this.variableNames=["dy"],this.outputShape=t.inShape;const e=t.filterDepth,n=t.filterHeight,i=t.filterWidth,s=t.strideDepth,r=t.strideHeight,a=t.strideWidth,o=t.dilationDepth,l=t.dilationHeight,u=t.dilationWidth,h=t.effectiveFilterDepth,p=t.effectiveFilterHeight,c=t.effectiveFilterWidth,d=h-1-t.padInfo.front,f=p-1-t.padInfo.top,m=c-1-t.padInfo.left,g=1/(e*n*i);this.userCode=`\n const ivec3 pads = ivec3(${d}, ${f}, ${m});\n const float avgMultiplier = float(${g});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyDCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n // Convolve dy(?, ?, ?, d) with pos mask(:, :, :, ch) to get\n // dx(xD, xR, xC, ch).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int wD = 0; wD < ${h};\n wD += ${o}) {\n float dyD = float(dyDCorner + wD) / ${s}.0;\n\n if (dyD < 0.0 || dyD >= ${t.outDepth}.0 || fract(dyD) > 0.0) {\n continue;\n }\n int idyD = int(dyD);\n\n for (int wR = 0; wR < ${p};\n wR += ${l}) {\n float dyR = float(dyRCorner + wR) / ${r}.0;\n\n if (dyR < 0.0 || dyR >= ${t.outHeight}.0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${c};\n wC += ${u}) {\n float dyC = float(dyCCorner + wC) / ${a}.0;\n\n if (dyC < 0.0 || dyC >= ${t.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n }\n setOutput(dotProd);\n }\n `}}const ost={kernelName:OA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{dy:s,input:r}=e,a=r,{filterSize:o,strides:l,pad:u,dimRoundingMode:h}=i,p=a$(a.shape,o,l,[1,1,1],u,h),c=new ast(p);return n.runWebGLProgram(c,[s],a.dtype)}};const lst={kernelName:xA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{dy:s,input:r}=e,a=r;utt([s,r],"avgPoolGrad");const{filterSize:o,strides:l,pad:u}=i,h=r$(a.shape,o,l,1,u),p=new rst(h);return n.runWebGLProgram(p,[s],a.dtype)}};const ust={kernelName:AA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{a:s,b:r}=e,{transposeA:a,transposeB:o}=i;return bit({a:s,b:r,transposeA:a,transposeB:o,backend:n})}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class hst{constructor(t,e,n,i,s,r){this.outputShape=[],this.variableNames=["x","mean","variance"],_F(t,e),_F(t,n);let a="0.0";null!=i&&(_F(t,i),this.variableNames.push("offset"),a="getOffsetAtOutCoords()");let o="1.0";null!=s&&(_F(t,s),this.variableNames.push("scale"),o="getScaleAtOutCoords()"),this.outputShape=t,this.userCode=`\n void main() {\n float x = getXAtOutCoords();\n float mean = getMeanAtOutCoords();\n float variance = getVarianceAtOutCoords();\n float offset = ${a};\n float scale = ${o};\n float inv = scale * inversesqrt(variance + float(${r}));\n setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));\n }\n `}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class pst{constructor(t,e,n,i,s,r){this.packedInputs=!0,this.packedOutput=!0,this.variableNames=["x","mean","variance"],_F(t,e),_F(t,n);let a="vec4(0.0)";null!=i&&(_F(t,i),this.variableNames.push("offset"),a="getOffsetAtOutCoords()");let o="vec4(1.0)";null!=s&&(_F(t,s),this.variableNames.push("scale"),o="getScaleAtOutCoords()"),this.outputShape=t,this.userCode=`\n void main() {\n vec4 offset = ${a};\n vec4 scale = ${o};\n\n vec4 x = getXAtOutCoords();\n vec4 mean = getMeanAtOutCoords();\n vec4 variance = getVarianceAtOutCoords();\n\n vec4 inv = scale * inversesqrt(variance + vec4(${r}));\n\n setOutput((x - mean) * inv + offset);\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const cst={kernelName:bM,backendName:"webgl",kernelFunc:({inputs:t,backend:e,attrs:n})=>{const{x:i,mean:s,variance:r,offset:a,scale:o}=t;_O(s.shape.length===r.shape.length,(()=>"Batch normalization gradient requires mean and variance to have equal ranks.")),_O(null==a||s.shape.length===a.shape.length,(()=>"Batch normalization gradient requires mean and offset to have equal ranks.")),_O(null==o||s.shape.length===o.shape.length,(()=>"Batch normalization gradient requires mean and scale to have equal ranks."));let{varianceEpsilon:l}=n;null==l&&(l=.001);const u=[i,s,r];let h=null;null!=a&&(h=a.shape,u.push(a));let p=null;null!=o&&(p=o.shape,u.push(o));const c=aA().getBool("WEBGL_PACK_NORMALIZATION")?new pst(i.shape,s.shape,r.shape,h,p,l):new hst(i.shape,s.shape,r.shape,h,p,l);return e.runWebGLProgram(c,u,u[0].dtype)}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class dst{constructor(t){this.variableNames=["source"],this.outputShape=t,this.rank=t.length;const e=Ott(this.rank);this.customUniforms=[{name:"start",arrayIndex:this.rank,type:"int"}];const n=function(t){if(1===t)return"sourceLoc";if(t<=6)return fst.slice(0,t).map((t=>"sourceLoc."+t)).join(",");throw Error(`Slicing for rank ${t} is not yet supported`)}(this.rank);let i;i=`\n ${e} sourceLoc;\n ${e} coords = getOutputCoords();\n ${t.map(((t,e)=>`sourceLoc.${fst[e]} = start[${e}] + coords.${fst[e]};`)).join("\n")}\n `,this.userCode=`\n void main() {\n ${i}\n setOutput(getSource(${n}));\n }\n `}}const fst=["x","y","z","w","u","v"]; +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class mst{constructor(t){this.variableNames=["source"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t,this.rank=t.length,this.customUniforms=[{name:"start",arrayIndex:this.rank,type:"int"}];const e=Ott(this.rank),n=unt("coords",this.rank),i=unt("sourceLoc",this.rank),s=1===this.rank?"sourceLoc":`vec2(${i.slice(-2).join()})`,r=`getChannel(getSource(${i.join()}), ${s})`,a=`\n result.x = ${r};\n if (++${n[this.rank-1]} < ${t[this.rank-1]}) {\n ++${i[this.rank-1]};\n result.y = ${r};\n --${i[this.rank-1]};\n }\n `,o=1===this.rank?"":`\n --${n[this.rank-1]};\n if (++${n[this.rank-2]} < ${t[this.rank-2]}) {\n ++${i[this.rank-2]};\n result.z = ${r};\n if (++${n[this.rank-1]} < ${t[this.rank-1]}) {\n ++${i[this.rank-1]};\n result.w = ${r};\n }\n }\n `,l=this.rank<=4?`sourceLoc = coords +\n ${e}(${t.map(((t,e)=>`start[${e}]`)).join()});`:t.map(((t,e)=>`${i[e]} = ${n[e]} + start[${e}];`)).join("\n");this.userCode=`\n void main() {\n ${e} coords = getOutputCoords();\n ${e} sourceLoc;\n ${l}\n vec4 result = vec4(0.);\n ${a}\n ${o}\n setOutput(result);\n }\n `}}function gst(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{begin:r,size:a}=i,[o,l]=RP(s,r,a);if(dP(s,o,l),0===IO(l))return n.makeTensorInfo(l,s.dtype,[]);if(n.shouldExecuteOnCPU([s])||"string"===s.dtype){const t=n.texData.get(s.dataId),e=Xet(t.values,o,l,s.shape,s.dtype);return n.makeTensorInfo(l,s.dtype,e)}const{isPacked:u}=n.texData.get(s.dataId),h=SP(s.shape,o,l);if(u||!h){const t=aA().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new mst(l):new dst(l),e=[o];return n.runWebGLProgram(t,[s],s.dtype,e)}return n.uploadToGPU(s.dataId), +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i){const s=i.texData.get(t.dataId),r=i.makeTensorInfo(n,t.dtype),a=i.texData.get(r.dataId);Object.assign(a,s),a.refCount=1,a.shape=n,a.dtype=t.dtype;let o=xP(e,zO(t.shape));s.slice&&(o+=s.slice.flatOffset),a.slice={flatOffset:o,origDataId:s.slice&&s.slice.origDataId||t.dataId};const l=i.dataRefCount.get(a.slice.origDataId)||1;return i.dataRefCount.set(a.slice.origDataId,l+1),r}(s,o,l,n)}const _st={kernelName:YC,backendName:"webgl",kernelFunc:gst},Tst={kernelName:MA,backendName:"webgl",kernelFunc:t=>{const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{blockShape:r,crops:a}=i;_O(s.shape.length<=4,(()=>"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet"));const o=r.reduce(((t,e)=>t*e)),l=gG(s.shape,r,o),u=_G(l.length,r.length),h=TG(s.shape,r,o),p=yG(a,r.length),c=IG(h,a,r.length),d=[],f=uit({inputs:{x:s},backend:n,attrs:{shape:l}}),m=yit({inputs:{x:f},backend:n,attrs:{perm:u}}),g=uit({inputs:{x:m},backend:n,attrs:{shape:h}}),_=gst({inputs:{x:g},backend:n,attrs:{begin:p,size:c}});return d.push(f),d.push(m),d.push(g),d.forEach((t=>n.disposeIntermediateTensorInfo(t))),_}};const yst={kernelName:CA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,weights:r}=e,{size:a}=i,o=n.readSync(s.dataId),l=n.readSync(r.dataId),u=det(o,l,r.dtype,r.shape,a);return n.makeTensorInfo([a],r.dtype,u)}};const Ist={kernelName:NA,backendName:"webgl",kernelFunc:function(t){const{inputs:e,backend:n}=t,{a:i,b:s}=e,r=aA().getBool("WEBGL_PACK_BINARY_OPERATIONS"),a=aA().getNumber("WEBGL_VERSION");if(n.shouldExecuteOnCPU([i,s])||1===a){const t=n.texData.get(i.dataId).values,e=n.texData.get(s.dataId).values,[r,a]=met(i.shape,s.shape,t,e,i.dtype),o=n.makeTensorInfo(a,i.dtype);return n.texData.get(o.dataId).values=r,o}let o;return o=r?new Ynt("\n int r = int(a.r) & int(b.r);\n int g = int(a.g) & int(b.g);\n int rb = int(a.b) & int(b.b);\n int ra = int(a.a) & int(b.a);\n return vec4(r, g, rb, ra);\n",i.shape,s.shape,!1):new Vnt("\n return float(int(a.r) & int(b.r));\n",i.shape,s.shape),n.runWebGLProgram(o,[i,s],i.dtype)}};const Est={kernelName:DA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{s0:i,s1:s}=e,r=n.readSync(i.dataId),a=n.readSync(s.dataId),o=_F(Array.from(r),Array.from(a));return n.makeTensorInfo([o.length],"int32",Int32Array.from(o))}},bst=eit({opSnippet:"return float(a != b);",cpuKernelImpl:Pet,dtype:"bool"}),vst={kernelName:uC,backendName:"webgl",kernelFunc:bst}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function wst(t){const{inputs:e,backend:n}=t,{input:i}=e;return Gnt({inputs:{x:n.texData.get(i.dataId).complexTensorInfos.real},backend:n})}const Sst={kernelName:SC,backendName:"webgl",kernelFunc:wst},xst="return float(int(x));";const Rst={kernelName:LA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function t(e){const{inputs:n,backend:i,attrs:s}=e,{x:r}=n,{dtype:a}=s;if("complex64"===a){if("complex64"===r.dtype)return Gnt({inputs:{x:r},backend:i});const e=aV(r.shape),n=t({inputs:{x:r},backend:i,attrs:{dtype:"float32"}}),s=Wnt({inputs:{real:n,imag:e},backend:i});return e.dispose(),i.disposeIntermediateTensorInfo(n),s}if("complex64"===r.dtype){const e=wst({inputs:{input:r},backend:i}),n=t({inputs:{x:e},backend:i,attrs:{dtype:a}});return i.disposeIntermediateTensorInfo(e),n}if(!PO(r.dtype,a)){const t=Gnt({inputs:{x:r},backend:i});return{dataId:t.dataId,shape:t.shape,dtype:a}}if(i.shouldExecuteOnCPU([r])){const t=i.texData.get(r.dataId).values,[e,n,s]=get(t,r.shape,r.dtype,a);return i.makeTensorInfo(e,n,s)}if("int32"===a)return function(t,e){const n=new gnt(t.shape,xst),i=e.runWebGLProgram(n,[t],"int32");return{dataId:i.dataId,shape:i.shape,dtype:i.dtype}}(r,i);if("bool"===a){const t=i.makeTensorInfo([],"bool",kO("bool",1)),e=bst({inputs:{a:r,b:t},backend:i});return i.disposeIntermediateTensorInfo(t),e}throw new Error(`Error in Cast: failed to cast ${r.dtype} to ${a}`)}},Ost="return ceil(x);",Ast=tit({opSnippet:Ost,packedOpSnippet:Ost,cpuKernelImpl:_et}),Mst={kernelName:FA,backendName:"webgl",kernelFunc:Ast}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Cst{constructor(t){this.variableNames=["A"],this.customUniforms=[{name:"minVal",type:"float"},{name:"maxVal",type:"float"}],this.outputShape=t,this.userCode="\n\n void main() {\n float value = getAAtOutCoords();\n if (isnan(value)) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, minVal, maxVal));\n }\n "}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Nst{constructor(t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"minVal",type:"float"},{name:"maxVal",type:"float"}],this.outputShape=t,this.userCode="\n void main() {\n vec4 value = getAAtOutCoords();\n\n if (any(isnan(value))) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, vec4(minVal), vec4(maxVal)));\n }\n "}}const kst={kernelName:PA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{clipValueMin:r,clipValueMax:a}=i;let o;o=aA().getBool("WEBGL_PACK_CLIP")?new Nst(s.shape):new Cst(s.shape);const l=[[r],[a]];return n.runWebGLProgram(o,[s],s.dtype,l)}}; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Dst{constructor(t){this.variableNames=["real","imag"],this.outputShape=t,this.userCode="\n void main() {\n float re = abs(getRealAtOutCoords());\n float im = abs(getImagAtOutCoords());\n float mx = max(re, im);\n\n // sadly the length function in glsl is not underflow-safe\n // (at least not on Intel GPUs). So the safe solution is\n // to ensure underflow-safety in all cases.\n setOutput(\n mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))\n );\n }\n "}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Lst(t,e){return{dataId:e.dataId,dtype:e.dtype,shape:t.shape}}const Fst={kernelName:BA,backendName:"webgl",kernelFunc:function(t){const{inputs:e,backend:n}=t,{x:i}=e,s=n.texData.get(i.dataId),r=new Dst(i.shape),a=[Lst(i,s.complexTensorInfos.real),Lst(i,s.complexTensorInfos.imag)];return n.runWebGLProgram(r,a,a[0].dtype)}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Pst{constructor(t){this.outputShape=[],this.outputShape=oG(t,1),this.variableNames=t.map(((t,e)=>`T${e}`));const e=new Array(t.length-1);e[0]=t[0][1];for(let n=1;n`T${e}`));const o=new Array(t.length-1);o[0]=t[0][e];for(let n=1;n= ${o[t-1]}) {\n return getChannel(\n getT${t}(${Bst(a,l,e)}),\n vec2(${Bst(u,l,e)}));\n }`}const c=o.length,d=o[o.length-1];p+=`\n return getChannel(\n getT${c}(${Bst(a,l,d)}),\n vec2(${Bst(u,l,d)}));`,this.userCode=`\n float getValue(${a.map((t=>"int "+t))}) {\n ${p}\n }\n\n void main() {\n ${s} coords = getOutputCoords();\n vec4 result = vec4(getValue(${r}), 0., 0., 0.);\n\n ${r[i-1]} = ${r[i-1]} + 1;\n if (${r[i-1]} < ${n[i-1]}) {\n result.g = getValue(${r});\n }\n\n ${r[i-2]} = ${r[i-2]} + 1;\n if (${r[i-2]} < ${n[i-2]}) {\n result.a = getValue(${r});\n }\n\n ${r[i-1]} = ${r[i-1]} - 1;\n if (${r[i-2]} < ${n[i-2]} &&\n ${r[i-1]} < ${n[i-1]}) {\n result.b = getValue(${r});\n }\n setOutput(result);\n }\n `}}function Bst(t,e,n){const i=t.indexOf(e);return t.map(((t,e)=>e===i?`${t} - ${n}`:t)).join()} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Vst(t){const{inputs:e,backend:n}=t,{input:i}=e;return Gnt({inputs:{x:n.texData.get(i.dataId).complexTensorInfos.imag},backend:n})}const Ust={kernelName:AM,backendName:"webgl",kernelFunc:Vst}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Yst(t,e,n){const i=t[0].dtype;if("complex64"===i){const i=t.map((t=>wst({inputs:{input:t},backend:n}))),s=t.map((t=>Vst({inputs:{input:t},backend:n}))),r=Yst(i,e,n),a=Yst(s,e,n),o=Wnt({inputs:{real:r,imag:a},backend:n});return i.forEach((t=>n.disposeIntermediateTensorInfo(t))),s.forEach((t=>n.disposeIntermediateTensorInfo(t))),n.disposeIntermediateTensorInfo(r),n.disposeIntermediateTensorInfo(a),o}let s=n.shouldExecuteOnCPU(t);if("string"===i&&(s=!0),s){const s=t.map((t=>{const i=IO(t.shape.slice(e));return uit({inputs:{x:t},backend:n,attrs:{shape:[-1,i]}})})),r=s.map((t=>({vals:n.readSync(t.dataId),shape:t.shape}))),a=oG(s.map((t=>t.shape)),1),o=1===s[0].shape[0],l=Tet(r,a,i,o),u=oG(t.map((t=>t.shape)),e),h=n.makeTensorInfo(u,i,l);return s.forEach((t=>n.disposeIntermediateTensorInfo(t))),h}const r=t.filter((t=>IO(t.shape)>0)),a=aA().getBool("WEBGL_PACK_ARRAY_OPERATIONS")&&r[0].shape.length>1;if(1===r.length){const e=a?new gnt(t[0].shape,vnt):new Mnt(t[0].shape,vnt);return n.runWebGLProgram(e,t,i)}const o=aA().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER");if(r.length>o){const t=[];for(let i=0;it.shape)),e);return n.runWebGLProgram(t,r,i)}const{tensors2D:l,outShape:u}=function(t,e,n){const i=oG(t.map((t=>t.shape)),e),s=t.map((t=>uit({inputs:{x:t},attrs:{shape:[-1,IO(t.shape.slice(e))]},backend:n})));return{tensors2D:s,outShape:i}}(r,e,n),h=new Pst(l.map((t=>t.shape))),p=n.runWebGLProgram(h,l,i);l.forEach((t=>n.disposeIntermediateTensorInfo(t)));const c=uit({inputs:{x:p},attrs:{shape:u},backend:n});return n.disposeIntermediateTensorInfo(p),c} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Gst(t){const{inputs:e,backend:n,attrs:i}=t,{axis:s}=i,r=CO(s,e[0].shape)[0];aG(e.map((t=>t.shape)),r);const a=oG(e.map((t=>t.shape)),r);if(0===IO(a))return n.makeTensorInfo(a,e[0].dtype,[]);const o=e.filter((t=>IO(t.shape)>0));return 1===o.length?Gnt({inputs:{x:o[0]},backend:n}):Yst(o,r,n)}const Hst={kernelName:VA,backendName:"webgl",kernelFunc:Gst}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Wst{constructor(t,e=!1,n=null,i=!1,s=!1){this.variableNames=["x","W"],this.outputShape=t.outShape;const r=t.padInfo.top,a=t.padInfo.left,o=t.strideHeight,l=t.strideWidth,u=t.dilationHeight,h=t.dilationWidth,p=t.filterHeight,c=t.filterWidth,d=4*Math.floor(t.inChannels/4),f=t.inChannels%4,m="channelsLast"===t.dataFormat,g=m?1:2,_=m?2:3,T=m?3:1;let y="",I="";n&&(y=i?`float activation(float a) {\n float b = getPreluActivationWeightsAtOutCoords();\n ${n}\n }`:s?`float activation(float a) {\n float b = getLeakyreluAlphaAtOutCoords();\n ${n}\n }`:`\n float activation(float x) {\n ${n}\n }\n `,I="result = activation(result);");const E=e?"result += getBiasAtOutCoords();":"";e&&this.variableNames.push("bias"),i&&this.variableNames.push("preluActivationWeights"),s&&this.variableNames.push("leakyreluAlpha"),this.userCode=`\n ${y}\n\n const ivec2 strides = ivec2(${o}, ${l});\n const ivec2 pads = ivec2(${r}, ${a});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d2 = coords[${T}];\n\n ivec2 xRCCorner =\n ivec2(coords[${g}], coords[${_}]) * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${p}; wR++) {\n int xR = xRCorner + wR * ${u};\n\n if (xR < 0 || xR >= ${t.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${c}; wC++) {\n int xC = xCCorner + wC * ${h};\n\n if (xC < 0 || xC >= ${t.inWidth}) {\n continue;\n }\n\n for (int d1 = 0; d1 < ${d}; d1 += 4) {\n vec4 wValues = vec4(\n getW(wR, wC, d1, d2),\n getW(wR, wC, d1 + 1, d2),\n getW(wR, wC, d1 + 2, d2),\n getW(wR, wC, d1 + 3, d2)\n );\n\n if (${m}) {\n vec4 xValues = vec4(\n getX(batch, xR, xC, d1),\n getX(batch, xR, xC, d1 + 1),\n getX(batch, xR, xC, d1 + 2),\n getX(batch, xR, xC, d1 + 3)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec4 xValues = vec4(\n getX(batch, d1, xR, xC),\n getX(batch, d1 + 1, xR, xC),\n getX(batch, d1 + 2, xR, xC),\n getX(batch, d1 + 3, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n\n if (${1===f}) {\n\n if (${m}) {\n dotProd +=\n getX(batch, xR, xC, ${d}) *\n getW(wR, wC, ${d}, d2);\n } else {\n dotProd +=\n getX(batch, ${d}, xR, xC) *\n getW(wR, wC, ${d}, d2);\n }\n\n } else if (${2===f}) {\n vec2 wValues = vec2(\n getW(wR, wC, ${d}, d2),\n getW(wR, wC, ${d} + 1, d2)\n );\n\n if (${m}) {\n vec2 xValues = vec2(\n getX(batch, xR, xC, ${d}),\n getX(batch, xR, xC, ${d} + 1)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec2 xValues = vec2(\n getX(batch, ${d}, xR, xC),\n getX(batch, ${d} + 1, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n\n } else if (${3===f}) {\n vec3 wValues = vec3(\n getW(wR, wC, ${d}, d2),\n getW(wR, wC, ${d} + 1, d2),\n getW(wR, wC, ${d} + 2, d2)\n );\n\n if (${m}) {\n vec3 xValues = vec3(\n getX(batch, xR, xC, ${d}),\n getX(batch, xR, xC, ${d} + 1),\n getX(batch, xR, xC, ${d} + 2)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec3 xValues = vec3(\n getX(batch, ${d}, xR, xC),\n getX(batch, ${d} + 1, xR, xC),\n getX(batch, ${d} + 2, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n\n }\n }\n }\n\n float result = dotProd;\n ${E}\n ${I}\n setOutput(result);\n }\n `}}class zst{constructor(t){this.variableNames=["x","W"],this.outputShape=t.outShape;const e=t.padInfo.front,n=t.padInfo.top,i=t.padInfo.left,s=t.strideDepth,r=t.strideHeight,a=t.strideWidth,o=t.dilationDepth,l=t.dilationHeight,u=t.dilationWidth,h=t.filterDepth,p=t.filterHeight,c=t.filterWidth,d=4*Math.floor(t.inChannels/4),f=t.inChannels%4;this.userCode=`\n const ivec3 strides = ivec3(${s}, ${r}, ${a});\n const ivec3 pads = ivec3(${e}, ${n}, ${i});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d2 = coords.u;\n\n ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xFCorner = xFRCCorner.x;\n int xRCorner = xFRCCorner.y;\n int xCCorner = xFRCCorner.z;\n\n // Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get\n // y(yF, yR, yC, d2). ? = to be determined. : = across all\n // values in that axis.\n float dotProd = 0.0;\n for (int wF = 0; wF < ${h}; wF++) {\n int xF = xFCorner + wF * ${o};\n\n if (xF < 0 || xF >= ${t.inDepth}) {\n continue;\n }\n\n for (int wR = 0; wR < ${p}; wR++) {\n int xR = xRCorner + wR * ${l};\n\n if (xR < 0 || xR >= ${t.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${c}; wC++) {\n int xC = xCCorner + wC * ${u};\n\n if (xC < 0 || xC >= ${t.inWidth}) {\n continue;\n }\n\n for (int d1 = 0; d1 < ${d}; d1 += 4) {\n vec4 xValues = vec4(\n getX(batch, xF, xR, xC, d1),\n getX(batch, xF, xR, xC, d1 + 1),\n getX(batch, xF, xR, xC, d1 + 2),\n getX(batch, xF, xR, xC, d1 + 3)\n );\n vec4 wValues = vec4(\n getW(wF, wR, wC, d1, d2),\n getW(wF, wR, wC, d1 + 1, d2),\n getW(wF, wR, wC, d1 + 2, d2),\n getW(wF, wR, wC, d1 + 3, d2)\n );\n\n dotProd += dot(xValues, wValues);\n }\n\n if (${1===f}) {\n dotProd +=\n getX(batch, xF, xR, xC, ${d}) *\n getW(wF, wR, wC, ${d}, d2);\n } else if (${2===f}) {\n vec2 xValues = vec2(\n getX(batch, xF, xR, xC, ${d}),\n getX(batch, xF, xR, xC, ${d} + 1)\n );\n vec2 wValues = vec2(\n getW(wF, wR, wC, ${d}, d2),\n getW(wF, wR, wC, ${d} + 1, d2)\n );\n dotProd += dot(xValues, wValues);\n } else if (${3===f}) {\n vec3 xValues = vec3(\n getX(batch, xF, xR, xC, ${d}),\n getX(batch, xF, xR, xC, ${d} + 1),\n getX(batch, xF, xR, xC, ${d} + 2)\n );\n vec3 wValues = vec3(\n getW(wF, wR, wC, ${d}, d2),\n getW(wF, wR, wC, ${d} + 1, d2),\n getW(wF, wR, wC, ${d} + 2, d2)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n `}} +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Xst{constructor(t,e=!1,n=null,i=!1,s=!1){this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=t.outShape,this.enableShapeUniforms=Dtt(this.outputShape.length);const r=t.padInfo.left,a=t.strideWidth,o=t.dilationWidth,l=t.filterHeight,u=t.filterWidth,h=u;let p="\n int xR; int xC; int xCOffset;\n vec4 wTexel; vec4 previous; vec4 final;";for(let t=0;t=0 && xR < inDims[0]) {\n ";for(let e=0;e<(h+1)/2;e++){const n=2*e;if(p+=`\n xC = xCCorner + ${n*o};\n `,1===a){if(n= 0 && xCOffset < inDims[1] && xTexelC${n}Ready == 0) {\n xTexelC${n} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${n}.zw = vec2(0.0);\n }\n xTexelC${n}Ready = 1;\n }\n `,p+=1===o&&n>0?`\n xC${n} = vec4(xTexelC${n-2}.zw, xTexelC${n}.xy);\n `:`\n xCOffset = xC + 1 - 2;\n\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n previous.zw = vec2(0.0);\n }\n\n xC${n} = vec4(previous.zw, xTexelC${n}.xy);\n } else {\n xC${n} = vec4(0.0, 0.0, xTexelC${n}.xy);\n }\n `):p+=`\n if (xC >= 0 && xC < inDims[1] && xTexelC${n}Ready == 0) {\n xTexelC${n} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${n}.zw = vec2(0.0);\n }\n xTexelC${n}Ready = 1;\n }\n\n xC${n} = xTexelC${n};\n `,n+1= 0 && xCOffset < inDims[1] && xTexelC${n+1}Ready == 0) {\n xTexelC${n+1} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${n+1}.zw = vec2(0.0);\n }\n xTexelC${n+1}Ready = 1;\n }\n `,p+=o>1?`\n xCOffset -= 2;\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n xC${n+1} = vec4(previous.zw, xTexelC${n+1}.xy);\n } else {\n xC${n+1} = vec4(0.0, 0.0, xTexelC${n+1}.xy);\n }\n `:`\n xC${n+1} = vec4(xTexelC${n}.zw, xTexelC${n+1}.xy);\n `):p+=1===t?`\n xC${n+1} = xTexelC${n};\n `:`\n xCOffset = xC + ${t};\n\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${n+1}Ready == 0) {\n xTexelC${n+1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${n+1}.zw = vec2(0.0);\n }\n xTexelC${n+1}Ready = 1;\n }\n\n xC${n+1} = xTexelC${n+1};\n `}}else n= 0 && xCOffset < inDims[1] && xTexelC${n}Ready == 0) {\n xTexelC${n} = getX(batch, xR, xCOffset, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${n}.zw = vec2(0.0);\n }\n xTexelC${n}Ready = 1;\n }\n\n if(xC + 1 >= 0 && xC + 1 < inDims[1] && xTexelC${n+1}Ready == 0) {\n xTexelC${n+1} = getX(batch, xR, xC + 1, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xC + 2 >= inDims[1]) {\n xTexelC${n+1}.zw = vec2(0.0);\n }\n xTexelC${n+1}Ready = 1;\n }\n\n xC${n} = vec4(xTexelC${n}.zw, xTexelC${n+1}.zw);\n `,n+1= 0 && xCOffset < inDims[1]) {\n final = getX(batch, xR, xCOffset, d1);\n }\n xC${n+1} = vec4(xTexelC${n+1}.xy, final.xy);\n `)):(p+=`\n if(xC >= 0 && xC < inDims[1] && xTexelC${n}Ready == 0) {\n xTexelC${n} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${n}.zw = vec2(0.0);\n }\n xTexelC${n}Ready = 1;\n }\n\n xCOffset = xC + strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${n+1}Ready == 0) {\n xTexelC${n+1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${n+1}.zw = vec2(0.);\n }\n xTexelC${n+1}Ready = 1;\n }\n\n xC${n} = vec4(\n xTexelC${n}.xy, xTexelC${n+1}.xy);\n `,n+1= 0) {\n // Use custom imod instead mod. On Intel GPU, mod may generate\n // unexpected value.\n // https://github.com/tensorflow/tfjs/issues/5447\n offsetX = imod(blockIndex, outWidth) * stride[1] - pad[1];\n d1 = offsetX + dilation[1] * (imod(pos, itemsPerBlockRow) /\n inChannels);\n\n if(d1 < inputShape[${a}] && d1 >= 0) {\n\n ch = imod(pos, inChannels);\n\n if (${s}) {\n innerDims = vec2(d1, ch);\n result[${2*t+e}] = getChannel(\n getA(rc.x, d0, int(innerDims.x),\n int(innerDims.y)), innerDims);\n } else {\n innerDims = vec2(d0, d1);\n result[${2*t+e}] = getChannel(\n getA(rc.x, ch, int(innerDims.x),\n int(innerDims.y)), innerDims);\n }\n }\n }\n }\n `;this.userCode=`\n void main() {\n ivec3 rc = getOutputCoords();\n\n vec4 result = vec4(0);\n\n int blockIndex, pos, offsetY, d0, offsetX, d1, ch;\n vec2 innerDims;\n\n ${l}\n\n ${i.output} = result;\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function qst(t,e){const n=t.length;return n>=3?e?[...t.slice(0,-3),t[n-3]*t[n-2],t[n-1]]:[...t.slice(0,-3),t[n-3],t[n-2]*t[n-1]]:!e&&1===n&&t[0]>1?[t[0],1]:null}function Kst({x:t,filter:e,convInfo:n,backend:i,bias:s=null,preluActivationWeights:r=null,leakyreluAlpha:a=0,activation:o=null}){const l=t.shape,u=i.texData.get(t.dataId),h=n.inChannels,p=l[0]*l[1]*l[2],c=n.outChannels,d="channelsLast"===n.dataFormat,f=!1;let m;const g=[];if(null!=r){const t=qst(r.shape,d);null!=t&&(r=uit({inputs:{x:r},backend:i,attrs:{shape:t}}),g.push(r))}if(null!=s){const t=qst(s.shape,d);null!=t&&(s=uit({inputs:{x:s},backend:i,attrs:{shape:t}}),g.push(s))}if(!((1===p||1===c)&&h>Eit)&&u.isPacked&&d&&null!=u.texture&&l[2]%2!=0&&vO(u.shape.slice(-3),l.slice(-3))){const h=l[0]*l[1]*(l[2]+1),p={dataId:t.dataId,shape:[1,h,n.inChannels],dtype:t.dtype},c=u.shape;u.shape=u.shape.slice(),u.shape[u.shape.length-2]++,_O(q7(u.shape,p.shape),(()=>`packed reshape ${u.shape} to ${p.shape} isn't free`));const d=uit({inputs:{x:e},backend:i,attrs:{shape:[1,n.inChannels,n.outChannels]}});g.push(d);const _=bit({a:p,b:d,backend:i,transposeA:false,transposeB:f,bias:s,activation:o,preluActivationWeights:r,leakyreluAlpha:a}),T=i.texData.get(_.dataId);_O(T.isPacked,(()=>"batchMatMul result is expected to be packed")),u.shape=c,T.shape=n.outShape,m=Gnt({inputs:{x:_},backend:i}),m.shape=n.outShape,g.push(_)}else{const l=n.outHeight*n.outWidth,u=uit({inputs:{x:t},backend:i,attrs:{shape:d?[n.batchSize,l,n.inChannels]:[n.batchSize,n.inChannels,l]}}),h=uit({inputs:{x:e},backend:i,attrs:{shape:[1,n.inChannels,n.outChannels]}}),p=bit({a:d?u:h,b:d?h:u,transposeA:!d,transposeB:f,backend:i,bias:s,activation:o,preluActivationWeights:r,leakyreluAlpha:a});m=uit({inputs:{x:p},backend:i,attrs:{shape:n.outShape}}),g.push(u),g.push(h),g.push(p)}for(const t of g)i.disposeIntermediateTensorInfo(t);return m}function Qst({x:t,filter:e,convInfo:n,backend:i,bias:s=null,preluActivationWeights:r=null,leakyreluAlpha:a=0,activation:o=null}){const{filterWidth:l,filterHeight:u,inChannels:h,outWidth:p,outHeight:c,dataFormat:d}=n,f="channelsLast"===d,m=l*u*h,g=c*p,_=[n.batchSize,m,g],T=[];if(null!=r){const t=qst(r.shape,f);null!=t&&(r=uit({inputs:{x:r},backend:i,attrs:{shape:t}}),T.push(r))}if(null!=s){const t=qst(s.shape,f);null!=t&&(s=uit({inputs:{x:s},backend:i,attrs:{shape:t}}),T.push(s))}const y=uit({inputs:{x:e},backend:i,attrs:{shape:[1,m,IO(e.shape)/m]}});T.push(y);const I=new jst(_,n),E=[t.shape,[n.padInfo.top,n.padInfo.left],[n.strideHeight,n.strideWidth],[n.dilationHeight,n.dilationWidth],[n.inChannels],[n.filterWidth*n.inChannels],[n.outWidth]],b=i.runWebGLProgram(I,[t],"float32",E),v=uit({inputs:{x:b},backend:i,attrs:{shape:_}});T.push(b),T.push(v);const w=null!=s,S=null!=r,x="leakyrelu"===o,R=o?nit(o,!0):null,O=new iit(f?v.shape:y.shape,f?y.shape:v.shape,f?[n.batchSize,g,n.outChannels]:[n.batchSize,n.outChannels,g],!0,!1,w,R,S,x),A=f?[v,y]:[y,v];if(s&&A.push(s),S&&A.push(r),x){const t=i.makeTensorInfo([],"float32",ik(a,"float32"));A.push(t),T.push(t)}const M=i.runWebGLProgram(O,A,"float32"),C=uit({inputs:{x:M},backend:i,attrs:{shape:n.outShape}});T.push(M);for(const t of T)i.disposeIntermediateTensorInfo(t);return C}const Jst={kernelName:UA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,filter:r}=e,{strides:a,pad:o,dataFormat:l,dilations:u,dimRoundingMode:h}=i,p=_$(l),c=o$(s.shape,r.shape,a,u,o,h,!1,p);let d;if(1!==c.filterHeight||1!==c.filterWidth||1!==c.dilationHeight||1!==c.dilationWidth||1!==c.strideHeight||1!==c.strideWidth||"SAME"!==c.padInfo.type&&"VALID"!==c.padInfo.type)if(c.strideWidth<=2&&"channelsLast"===p&&aA().getBool("WEBGL_EXP_CONV")){const t=new Xst(c),e=[[c.padInfo.top,c.padInfo.left],[c.strideHeight,c.strideWidth],[c.dilationHeight,c.dilationWidth],[c.inHeight,c.inWidth]];d=n.runWebGLProgram(t,[s,r],"float32",e)}else if(aA().getBool("WEBGL_CONV_IM2COL"))d=Qst({x:s,filter:r,convInfo:c,backend:n});else{const t=new Wst(c);d=n.runWebGLProgram(t,[s,r],"float32")}else d=Kst({x:s,filter:r,convInfo:c,backend:n});const f=uit({inputs:{x:d},backend:n,attrs:{shape:c.outShape}});return n.disposeIntermediateTensorInfo(d),f}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Zst{constructor(t){this.variableNames=["x","dy"],this.outputShape=t.filterShape;const e=t.strideHeight,n=t.strideWidth,i=t.padInfo.top,s=t.padInfo.left,r="channelsLast"===t.dataFormat;this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int d2 = coords.w;\n\n // Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int b = 0; b < ${t.batchSize}; b++) {\n for (int yR = 0; yR < ${t.outHeight}; yR++) {\n int xR = wR + yR * ${e} - ${i};\n\n if (xR < 0 || xR >= ${t.inHeight}) {\n continue;\n }\n\n for (int yC = 0; yC < ${t.outWidth}; yC++) {\n int xC = wC + yC * ${n} - ${s};\n\n if (xC < 0 || xC >= ${t.inWidth}) {\n continue;\n }\n\n ${r?"float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);":"float dyValue = getDy(b, d2, yR, yC);\n float xValue = getX(b, d1, xR, xC);\n dotProd += (xValue * dyValue);"}\n }\n }\n }\n setOutput(dotProd);\n }\n `}}class trt{constructor(t){this.variableNames=["dy","W"],this.outputShape=t.inShape;const e=t.filterHeight,n=t.filterWidth,i=t.strideHeight,s=t.strideWidth,r="channelsLast"===t.dataFormat,a=e-1-t.padInfo.top,o=n-1-t.padInfo.left,l=r?1:2,u=r?2:3,h=r?3:1;this.userCode=`\n const ivec2 pads = ivec2(${a}, ${o});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[${h}];\n\n ivec2 dyCorner = ivec2(coords[${l}], coords[${u}]) - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n // Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${e}; wR++) {\n float dyR = float(dyRCorner + wR) / ${i}.0;\n\n if (dyR < 0.0 || dyR >= ${t.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = ${e} - 1 - wR;\n\n for (int wC = 0; wC < ${n}; wC++) {\n float dyC = float(dyCCorner + wC) / ${s}.0;\n\n if (dyC < 0.0 || dyC >= ${t.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = ${n} - 1 - wC;\n\n for (int d2 = 0; d2 < ${t.outChannels}; d2++) {\n\n if (${r}) {\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n } else {\n float xValue = getDy(batch, d2, idyR, idyC);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n\n }\n }\n }\n setOutput(dotProd);\n }\n `}}class ert{constructor(t){this.variableNames=["x","dy"],this.outputShape=t.filterShape;const e=t.strideDepth,n=t.strideHeight,i=t.strideWidth,s=t.padInfo.front,r=t.padInfo.top,a=t.padInfo.left;this.userCode=`\n void main() {\n ivec5 coords = getOutputCoords();\n int wF = coords.x;\n int wR = coords.y;\n int wC = coords.z;\n int d1 = coords.w;\n int d2 = coords.u;\n\n float dotProd = 0.0;\n\n for (int b = 0; b < ${t.batchSize}; b++) {\n for (int yF = 0; yF < ${t.outDepth}; yF++) {\n int xF = wF + yF * ${e} - ${s};\n\n if (xF < 0 || xF >= ${t.inDepth}) {\n continue;\n }\n\n for (int yR = 0; yR < ${t.outHeight}; yR++) {\n int xR = wR + yR * ${n} - ${r};\n\n if (xR < 0 || xR >= ${t.inHeight}) {\n continue;\n }\n\n for (int yC = 0; yC < ${t.outWidth}; yC++) {\n int xC = wC + yC * ${i} - ${a};\n\n if (xC < 0 || xC >= ${t.inWidth}) {\n continue;\n }\n\n float dyValue = getDy(b, yF, yR, yC, d2);\n float xValue = getX(b, xF, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n `}}class nrt{constructor(t){this.variableNames=["dy","W"],this.outputShape=t.inShape;const e=t.filterDepth,n=t.filterHeight,i=t.filterWidth,s=t.strideDepth,r=t.strideHeight,a=t.strideWidth,o=e-1-t.padInfo.front,l=n-1-t.padInfo.top,u=i-1-t.padInfo.left;this.userCode=`\n const ivec3 pads = ivec3(${o}, ${l}, ${u});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d1 = coords.u;\n\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyFCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n float dotProd = 0.0;\n for (int wF = 0; wF < ${e}; wF++) {\n float dyF = float(dyFCorner + wF) / ${s}.0;\n\n if (dyF < 0.0 || dyF >= ${t.outDepth}.0 || fract(dyF) > 0.0) {\n continue;\n }\n int idyF = int(dyF);\n\n int wFPerm = ${e} - 1 - wF;\n\n for (int wR = 0; wR < ${n}; wR++) {\n float dyR = float(dyRCorner + wR) / ${r}.0;\n\n if (dyR < 0.0 || dyR >= ${t.outHeight}.0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = ${n} - 1 - wR;\n\n for (int wC = 0; wC < ${i}; wC++) {\n float dyC = float(dyCCorner + wC) / ${a}.0;\n\n if (dyC < 0.0 || dyC >= ${t.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = ${i} - 1 - wC;\n\n for (int d2 = 0; d2 < ${t.outChannels}; d2++) {\n float xValue = getDy(batch, idyF, idyR, idyC, d2);\n float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n }\n }\n }\n setOutput(dotProd);\n }\n `}}const irt={kernelName:YA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,dy:r}=e,{strides:a,pad:o,dataFormat:l,dimRoundingMode:u,filterShape:h}=i,p=_$(l),c=o$(s.shape,h,a,1,o,u,!1,p),d=new Zst(c);return n.runWebGLProgram(d,[s,r],"float32")}}; +/** + * @license + * Copyright 2023 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class srt{constructor(t){this.variableNames=["dy","W"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"strides",type:"vec2"}],this.outputShape=t.inShape,this.enableShapeUniforms=Dtt(this.outputShape.length);const e=t.filterHeight,n=t.filterWidth,i=e-1-t.padInfo.top,s=n-1-t.padInfo.left;this.userCode=`\n const ivec2 pads = ivec2(${i}, ${s});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[3];\n\n ivec2 dyCorner = ivec2(coords[1], coords[2]) - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n vec4 result = vec4(0.);\n for (int wR = 0; wR < ${e}; wR++) {\n float dyR = float(dyRCorner + wR) / strides[0];\n if (dyR < 0.0 || dyR >= ${t.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n int wRPerm = ${e} - 1 - wR;\n\n for (int wC = 0; wC < ${n}; wC++) {\n int wCPerm = ${n} - 1 - wC;\n\n float dyC = float(dyCCorner + wC) / strides[1];\n bool idyCVal = (dyC >= 0.0) && (dyC < ${t.outWidth}.0)\n && (fract(dyC) == 0.0);\n int idyC = int(dyC);\n\n float dyC2 = float(dyCCorner + wC + 1) / strides[1];\n bool idyCVal2 = (dyC2 >= 0.0) && (dyC2 < ${t.outWidth}.0)\n && (fract(dyC2) == 0.0);\n int idyC2 = int(dyC2);\n\n if (idyCVal && idyCVal2) {\n for (int d2 = 0; d2 < ${t.outChannels}; d2 += 2) {\n vec4 wValue = getW(wRPerm, wCPerm, d1, d2);\n vec4 dySample = getDy(batch, idyR, idyC, d2);\n vec4 dySample2 = (idyC / 2 == idyC2 / 2) ?\n dySample : getDy(batch, idyR, idyC2, d2);\n\n vec2 dyValue = mod(float(idyC), 2.) == 0. ?\n dySample.xy : dySample.zw;\n result.xy += vec2(dot(dyValue, wValue.xy),\n dot(dyValue, wValue.zw));\n\n dyValue = mod(float(idyC2), 2.) == 0. ?\n dySample2.xy : dySample2.zw;\n result.zw += vec2(dot(dyValue, wValue.xy),\n dot(dyValue, wValue.zw));\n }\n } else if (idyCVal) {\n for (int d2 = 0; d2 < ${t.outChannels}; d2 += 2) {\n vec4 wValue = getW(wRPerm, wCPerm, d1, d2);\n vec4 dySample = getDy(batch, idyR, idyC, d2);\n vec2 dyValue = mod(float(idyC), 2.) == 0. ?\n dySample.xy : dySample.zw;\n result.xy += vec2(dot(dyValue, wValue.xy),\n dot(dyValue, wValue.zw));\n }\n } else if (idyCVal2) {\n for (int d2 = 0; d2 < ${t.outChannels}; d2 += 2) {\n vec4 wValue = getW(wRPerm, wCPerm, d1, d2);\n vec4 dySample = getDy(batch, idyR, idyC2, d2);\n vec2 dyValue = mod(float(idyC2), 2.) == 0. ?\n dySample.xy : dySample.zw;\n result.zw += vec2(dot(dyValue, wValue.xy),\n dot(dyValue, wValue.zw));\n }\n }\n }\n }\n setOutput(result);\n }\n `}}const rrt={kernelName:GA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{dy:s,filter:r}=e,{inputShape:a,strides:o,pad:l,dataFormat:u,dimRoundingMode:h}=i,p=_$(u),c=o$(a,r.shape,o,1,l,h,!1,p);if(aA().getBool("WEBGL_PACK_CONV2DTRANSPOSE")&&"channelsLast"===p){const t=[[c.strideHeight,c.strideWidth]],e=new srt(c);return n.runWebGLProgram(e,[s,r],"float32",t)}{const t=new trt(c);return n.runWebGLProgram(t,[s,r],"float32")}}};const art={kernelName:HA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,filter:r}=e,{strides:a,pad:o,dilations:l}=i,u=l$(s.shape,r.shape,a,l,o),h=new zst(u);return n.runWebGLProgram(h,[s,r],"float32")}};const ort={kernelName:WA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,dy:r}=e,{strides:a,pad:o,filterShape:l}=i,u=l$(s.shape,l,a,1,o),h=new ert(u);return n.runWebGLProgram(h,[s,r],"float32")}};const lrt={kernelName:zA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{dy:s,filter:r}=e,{pad:a,strides:o,inputShape:l}=i,u=l$(l,r.shape,o,1,a),h=new nrt(u);return n.runWebGLProgram(h,[s,r],"float32")}},urt=tit({opSnippet:Znt+"\n return cos(x);\n",packedOpSnippet:`\n vec4 result = cos(x);\n bvec4 isNaN = isnan(x);\n ${Unt}\n return result;\n`}),hrt={kernelName:XA,backendName:"webgl",kernelFunc:urt},prt=tit({opSnippet:"\n float e2x = exp(-x);\n return (e2x + 1.0 / e2x) / 2.0;\n"}),crt={kernelName:jA,backendName:"webgl",kernelFunc:prt}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class drt{constructor(t,e,n,i,s){this.variableNames=["Image","Boxes","BoxInd"],this.outputShape=[];const[r,a,o,l]=t,[u]=e,[h,p]=n;this.outputShape=[u,h,p,l];const c="bilinear"===i?1:0,[d,f]=[a-1+".0",o-1+".0"],[m,g,_]=h>1?[""+(a-1)/(h-1),"(y2-y1) * height_ratio",`y1*${d} + float(y)*(height_scale)`]:["0.0","0.0",`0.5 * (y1+y2) * ${d}`],[T,y,I]=p>1?[""+(o-1)/(p-1),"(x2-x1) * width_ratio",`x1*${f} + float(x)*(width_scale)`]:["0.0","0.0",`0.5 * (x1+x2) * ${f}`];this.userCode=`\n const float height_ratio = float(${m});\n const float width_ratio = float(${T});\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int y = coords[1];\n int x = coords[2];\n int d = coords[3];\n\n // get box vals\n float y1 = getBoxes(b,0);\n float x1 = getBoxes(b,1);\n float y2 = getBoxes(b,2);\n float x2 = getBoxes(b,3);\n\n // get image in batch index\n int bInd = round(getBoxInd(b));\n if(bInd < 0 || bInd >= ${r}) {\n return;\n }\n\n float height_scale = ${g};\n float width_scale = ${y};\n\n float in_y = ${_};\n if( in_y < 0.0 || in_y > ${d} ) {\n setOutput(float(${s}));\n return;\n }\n float in_x = ${I};\n if( in_x < 0.0 || in_x > ${f} ) {\n setOutput(float(${s}));\n return;\n }\n\n vec2 sourceFracIndexCR = vec2(in_x,in_y);\n if(${c} == 1) {\n // Compute the four integer indices.\n ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);\n ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));\n\n float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);\n float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);\n float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);\n float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);\n\n vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);\n\n float top = topLeft + (topRight - topLeft) * fracCR.x;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;\n float newValue = top + (bottom - top) * fracCR.y;\n setOutput(newValue);\n } else {\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestCR = ivec2(floor(\n sourceFracIndexCR + vec2(0.5,0.5)));\n float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);\n setOutput(newValue);\n }\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const frt={kernelName:QA,backendName:"webgl",kernelFunc:t=>{const{inputs:e,backend:n,attrs:i}=t,{image:s,boxes:r,boxInd:a}=e,{cropSize:o,method:l,extrapolationValue:u}=i,h=new drt(s.shape,r.shape,o,l,u);return n.runWebGLProgram(h,[s,r,a],"float32")}};var mrt;!function(t){t.Prod="*",t.Sum="+"}(mrt||(mrt={}));class grt{constructor(t,e,n,i){this.op=t,this.outputShape=e,this.variableNames=["x"],this.customUniforms=[{name:"index",type:"float"}];const s=this.outputShape.length,r=this.op===mrt.Prod?"1.0":"0.0",a=n?r:`getX(${_rt(s,"coords",this.op)})`,o=this.outputShape[this.outputShape.length-1];let l="",u="";n?(l=i?"end != "+(o-1):"end != 0",u=i?"end + 1":"end - 1"):(l=i?`end + pow2 < ${o}`:"end >= pow2",u=i?"end + pow2":"end - pow2"),this.userCode=`\n void main() {\n ${Ott(s)} coords = getOutputCoords();\n int end = ${Trt(s,"coords",this.op)};\n float val = ${a};\n int pow2 = int(pow(2.0, index));\n if (${l}) {\n int idx = ${u};\n ${Trt(s,"coords",this.op)} = idx;\n val ${this.op}= getX(${_rt(s,"coords",this.op)});\n }\n setOutput(val);\n }\n `}}function _rt(t,e,n){if(1===t)return`${e}`;if(2===t)return`${e}.x, ${e}.y`;if(3===t)return`${e}.x, ${e}.y, ${e}.z`;if(4===t)return`${e}.x, ${e}.y, ${e}.z, ${e}.w`;throw new Error(`Cumulative ${n} for rank ${t} is not yet supported`)}function Trt(t,e,n){if(1===t)return`${e}`;if(2===t)return`${e}.y`;if(3===t)return`${e}.z`;if(4===t)return`${e}.w`;throw new Error(`Cumulative ${n} for rank ${t} is not yet supported`)} +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function yrt(t,e,n,i,s,r){const a=e.shape.length,o=_B([i],a);let l=e;null!=o&&(l=yit({inputs:{x:e},backend:n,attrs:{perm:o}}));const u=yB(1,a)[0];if(u!==a-1)throw new Error(`WebGL cumprod shader expects an inner-most axis=${e.shape.length-1} but got axis=${i}`);const h=l.shape[u];let p=Gnt({inputs:{x:l},backend:n});for(let e=0;e<=Math.ceil(Math.log2(h))-1;e++){const i=new grt(t,l.shape,!1,r),s=[[e]],a=p;p=n.runWebGLProgram(i,[p],p.dtype,s),n.disposeIntermediateTensorInfo(a)}if(s){const e=new grt(t,l.shape,s,r),i=p;p=n.runWebGLProgram(e,[p],p.dtype),n.disposeIntermediateTensorInfo(i)}if(null!=o){const t=yit({inputs:{x:p},backend:n,attrs:{perm:TB(o)}});return n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(l),t}return p}const Irt={kernelName:qA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{axis:r,exclusive:a,reverse:o}=i;return yrt(mrt.Prod,s,n,r,a,o)}};const Ert={kernelName:KA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{axis:r,exclusive:a,reverse:o}=i;return yrt(mrt.Sum,s,n,r,a,o)}};const brt={kernelName:JA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,weights:r}=e,{size:a,binaryOutput:o}=i;if(1===s.shape.length){const t=n.readSync(s.dataId),e=n.readSync(r.dataId),i=det(t,e,r.dtype,r.shape,a);return n.makeTensorInfo([a],r.dtype,i)}if(2===s.shape.length){const t=n.bufferSync(s),e=n.bufferSync(r),i=fet(t,e,a,o);return n.makeTensorInfo(i.shape,r.dtype,i.values)}throw new Error(`Error in denseBincount: input must be at most rank 2, but got rank${s.shape.length}.`)}}; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class vrt{constructor(t,e,n){this.variableNames=["x"],this.outputShape=[],this.outputShape=t,this.blockSize=e,this.dataFormat=n,this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int h = ${this.getHeightCoordString()};\n int w = ${this.getWidthCoordString()};\n int d = ${this.getDepthCoordString()};\n\n int in_h = h / ${e};\n int offset_h = imod(h, ${e});\n int in_w = w / ${e};\n int offset_w = imod(w, ${e});\n int offset_d = (offset_h * ${e} + offset_w) *\n ${this.getOutputDepthSize()};\n int in_d = d + offset_d;\n\n float result = ${this.getInputSamplingString()};\n setOutput(result);\n }\n `}getHeightCoordString(){return"NHWC"===this.dataFormat?"coords[1]":"coords[2]"}getWidthCoordString(){return"NHWC"===this.dataFormat?"coords[2]":"coords[3]"}getDepthCoordString(){return"NHWC"===this.dataFormat?"coords[3]":"coords[1]"}getOutputDepthSize(){return"NHWC"===this.dataFormat?this.outputShape[3]:this.outputShape[1]}getInputSamplingString(){return"NHWC"===this.dataFormat?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"}}const wrt={kernelName:ZA,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{blockSize:r,dataFormat:a}=i,o=s.shape[0],l=("NHWC"===a?s.shape[1]:s.shape[2])*r,u=("NHWC"===a?s.shape[2]:s.shape[3])*r,h=("NHWC"===a?s.shape[3]:s.shape[1])/(r*r),p=new vrt("NHWC"===a?[o,l,u,h]:[o,h,l,u],r,a);return n.runWebGLProgram(p,[s],s.dtype)}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Srt{constructor(t,e=!1,n=null,i=!1,s=!1){this.variableNames=["x","W"],this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=t.outShape,this.enableShapeUniforms=Dtt(this.outputShape.length);const r=t.filterHeight,a=t.filterWidth,o=t.outChannels/t.inChannels;let l="",u="";n&&(l=i?`float activation(float a) {\n float b = getPreluActivationWeightsAtOutCoords();\n ${n}\n }`:s?`float activation(float a) {\n float b = getLeakyreluAlphaAtOutCoords();\n ${n}\n }`:`\n float activation(float x) {\n ${n}\n }\n `,u="result = activation(result);");const h=e?"result += getBiasAtOutCoords();":"";e&&this.variableNames.push("bias"),i&&this.variableNames.push("preluActivationWeights"),s&&this.variableNames.push("leakyreluAlpha"),this.userCode=`\n ${l}\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2 / ${o};\n int q = d2 - d1 * ${o};\n\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n // TO DO(dsmilkov): Flatten the two for loops and vec4 the operations.\n for (int wR = 0; wR < ${r}; wR++) {\n int xR = xRCorner + wR * dilations[0];\n\n if (xR < 0 || xR >= inDims[0]) {\n continue;\n }\n\n for (int wC = 0; wC < ${a}; wC++) {\n int xC = xCCorner + wC * dilations[1];\n\n if (xC < 0 || xC >= inDims[1]) {\n continue;\n }\n\n float xVal = getX(batch, xR, xC, d1);\n float wVal = getW(wR, wC, d1, q);\n dotProd += xVal * wVal;\n }\n }\n\n float result = dotProd;\n ${h}\n ${u}\n setOutput(result);\n }\n `}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class xrt{constructor(t,e=!1,n=null,i=!1,s=!1){this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=t.outShape,this.enableShapeUniforms=Dtt(this.outputShape.length);const r=t.outChannels/t.inChannels,a=t.padInfo.left,o=t.strideWidth,l=t.dilationWidth,u=t.filterHeight,h=t.filterWidth,p=h;let c="\n int xR; int xC; int xCOffset;\n vec4 wTexel; vec4 previous; vec4 final;";for(let t=0;t=0 && xR < inDims[0]) {\n ";for(let t=0;t<(p+1)/2;t++){const e=2*t;if(c+=`\n xC = xCCorner + ${e*l};\n `,1===o){if(e= 0 && xCOffset < inDims[1] && xTexelC${e}Ready == 0) {\n xTexelC${e} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${e}.zw = vec2(0.0);\n }\n xTexelC${e}Ready = 1;\n }\n `,c+=1===l&&e>0?`\n xC${e} = vec4(xTexelC${e-2}.zw, xTexelC${e}.xy);\n `:`\n xCOffset = xC + 1 - 2;\n\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n previous.zw = vec2(0.0);\n }\n\n xC${e} = vec4(previous.zw, xTexelC${e}.xy);\n } else {\n xC${e} = vec4(0.0, 0.0, xTexelC${e}.xy);\n }\n `):c+=`\n if (xC >= 0 && xC < inDims[1] && xTexelC${e}Ready == 0) {\n xTexelC${e} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${e}.zw = vec2(0.0);\n }\n xTexelC${e}Ready = 1;\n }\n\n xC${e} = xTexelC${e};\n `,e+1= 0 && xCOffset < inDims[1] && xTexelC${e+1}Ready == 0) {\n xTexelC${e+1} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${e+1}.zw = vec2(0.0);\n }\n xTexelC${e+1}Ready = 1;\n }\n `,c+=l>1?`\n xCOffset -= 2;\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n xC${e+1} = vec4(previous.zw, xTexelC${e+1}.xy);\n } else {\n xC${e+1} = vec4(0.0, 0.0, xTexelC${e+1}.xy);\n }\n `:`\n xC${e+1} = vec4(xTexelC${e}.zw, xTexelC${e+1}.xy);\n `):c+=1===t?`\n xC${e+1} = xTexelC${e};\n `:`\n xCOffset = xC + ${t};\n\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${e+1}Ready == 0) {\n xTexelC${e+1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${e+1}.zw = vec2(0.0);\n }\n xTexelC${e+1}Ready = 1;\n }\n\n xC${e+1} = xTexelC${e+1};\n `}}else e= 0 && xCOffset < inDims[1] && xTexelC${e}Ready == 0) {\n xTexelC${e} = getX(batch, xR, xCOffset, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${e}.zw = vec2(0.0);\n }\n xTexelC${e}Ready = 1;\n }\n\n if(xC + 1 >= 0 && xC + 1 < inDims[1] && xTexelC${e+1}Ready == 0) {\n xTexelC${e+1} = getX(batch, xR, xC + 1, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xC + 2 >= inDims[1]) {\n xTexelC${e+1}.zw = vec2(0.0);\n }\n xTexelC${e+1}Ready = 1;\n }\n\n xC${e} = vec4(xTexelC${e}.zw, xTexelC${e+1}.zw);\n `,e+1= 0 && xCOffset < inDims[1]) {\n final = getX(batch, xR, xCOffset, d1);\n }\n xC${e+1} = vec4(xTexelC${e+1}.xy, final.xy);\n `)):(c+=`\n if(xC >= 0 && xC < inDims[1] && xTexelC${e}Ready == 0) {\n xTexelC${e} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${e}.zw = vec2(0.0);\n }\n xTexelC${e}Ready = 1;\n }\n\n xCOffset = xC + strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${e+1}Ready == 0) {\n xTexelC${e+1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${e+1}.zw = vec2(0.);\n }\n xTexelC${e+1}Ready = 1;\n }\n\n xC${e} = vec4(\n xTexelC${e}.xy, xTexelC${e+1}.xy);\n `,e+1`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${a} and dilations '${h}'`));const p=o$(s.shape,r.shape,a,h,o,u,!0);let c;c=aA().getBool("WEBGL_PACK_DEPTHWISECONV")&&p.strideWidth<=2&&p.outChannels/p.inChannels==1?new xrt(p):new Srt(p);const d=[[p.padInfo.top,p.padInfo.left],[p.strideHeight,p.strideWidth],[p.dilationHeight,p.dilationWidth],[p.inHeight,p.inWidth]];return n.runWebGLProgram(c,[s,r],"float32",d)}}; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Ort{constructor(t){this.variableNames=["x","dy"],this.outputShape=t.filterShape;const e=t.strideHeight,n=t.strideWidth,i=t.padInfo.top,s=t.padInfo.left,r=t.outChannels/t.inChannels;this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int dm = coords.w;\n int d2 = d1 * ${r} + dm;\n\n float dotProd = 0.0;\n\n // TO DO: Vec4 over the batch size\n for (int b = 0; b < ${t.batchSize}; b++) {\n for (int yR = 0; yR < ${t.outHeight}; yR++) {\n int xR = wR + yR * ${e} - ${i};\n\n if (xR < 0 || xR >= ${t.inHeight}) {\n continue;\n }\n\n for (int yC = 0; yC < ${t.outWidth}; yC++) {\n int xC = wC + yC * ${n} - ${s};\n\n if (xC < 0 || xC >= ${t.inWidth}) {\n continue;\n }\n\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n setOutput(dotProd);\n }\n `}}class Art{constructor(t){this.variableNames=["dy","W"],this.outputShape=t.inShape;const e=t.filterHeight,n=t.filterWidth,i=t.strideHeight,s=t.strideWidth,r=e-1-t.padInfo.top,a=n-1-t.padInfo.left,o=t.outChannels/t.inChannels;this.userCode=`\n const ivec2 pads = ivec2(${r}, ${a});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[3];\n ivec2 dyCorner = coords.yz - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n float dotProd = 0.0;\n\n for (int wR = 0; wR < ${e}; wR++) {\n float dyR = float(dyRCorner + wR) / ${i}.0;\n\n if (dyR < 0.0 || dyR >= ${t.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = ${e} - 1 - wR;\n\n for (int wC = 0; wC < ${n}; wC++) {\n float dyC = float(dyCCorner + wC) / ${s}.0;\n\n if (dyC < 0.0 || dyC >= ${t.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = ${n} - 1 - wC;\n\n // TO DO: Vec4 over the channelMul\n for (int dm = 0; dm < ${o}; dm++) {\n int d2 = d1 * ${o} + dm;\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, dm);\n dotProd += xValue * wValue;\n }\n }\n }\n setOutput(dotProd);\n }\n `}}const Mrt={kernelName:eM,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,dy:r}=e,{strides:a,dilations:o,pad:l,dimRoundingMode:u,filterShape:h}=i,p=o$(s.shape,h,a,o,l,u,!0),c=new Ort(p);return n.runWebGLProgram(c,[s,r],"float32")}};const Crt={kernelName:nM,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{dy:s,filter:r}=e,{strides:a,dilations:o,pad:l,dimRoundingMode:u,inputShape:h}=i,p=o$(h,r.shape,a,o,l,u,!0),c=new Art(p);return n.runWebGLProgram(c,[s,r],"float32")}}; +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Nrt{constructor(t){this.variableNames=["X"],this.outputShape=[t,t],this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n float val = coords[0] == coords[1] ? getX(coords[0]) : 0.0;\n setOutput(val);\n }\n "}}const krt={kernelName:iM,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{x:i}=e,s=[...i.shape,...i.shape],r=IO(i.shape),a=uit({inputs:{x:i},backend:n,attrs:{shape:[r]}}),o=new Nrt(r),l=n.runWebGLProgram(o,[a],a.dtype),u=uit({inputs:{x:l},backend:n,attrs:{shape:s}});return n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(l),u}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Drt{constructor(t){this.variableNames=["x","W"],this.outputShape=t.outShape;const{inHeight:e,inWidth:n,padInfo:i,strideHeight:s,strideWidth:r,filterHeight:a,filterWidth:o,dilationHeight:l,dilationWidth:u}=t,{top:h,left:p}=i;this.userCode=`\n const ivec2 strides = ivec2(${s}, ${r});\n const ivec2 pads = ivec2(${h}, ${p});\n const float neg_infinity = -3.4e38;\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n int d1 = coords.w;\n ivec2 outTopLeftCorner =\n coords.yz * strides - pads;\n int hBeg = outTopLeftCorner.x;\n int wBeg = outTopLeftCorner.y;\n\n float curVal = neg_infinity;\n for (int h = 0; h < ${a}; h++) {\n int hIn = hBeg + h * ${l};\n\n if (hIn >= 0 && hIn < ${e}) {\n for (int w = 0; w < ${o}; w++) {\n int wIn = wBeg + w * ${u};\n\n if (wIn >= 0 && wIn < ${n}) {\n float xVal = getX(batch, hIn, wIn, d1);\n float wVal = getW(h, w, d1);\n\n float val = xVal + wVal;\n if (val > curVal) {\n curVal = val;\n }\n }\n }\n }\n }\n\n float result = curVal;\n setOutput(result);\n }\n `}}const Lrt={kernelName:sM,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,filter:r}=e,{strides:a,pad:o,dilations:l}=i,u=s$(s.shape,r.shape,a,o,"NHWC",l);let h;const p=new Drt(u);h=n.runWebGLProgram(p,[s,r],"float32");const c=uit({inputs:{x:h},backend:n,attrs:{shape:u.outShape}});return n.disposeIntermediateTensorInfo(h),c}};const Frt={kernelName:uM,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{equation:s}=i,r=e,{allDims:a,summedDims:o,idDims:l}=UG(s,r.length);GG(a.length,l,r);const{path:u,steps:h}=HG(o,l),p=h.length;let c=null,d=a.length;const f=[];for(let t=0;t=0&&(c=_it({inputs:{x:c},backend:n,attrs:{axis:u[t]-(a.length-d),keepDims:!1}}),f.push(c)),d--)}for(const t of f)t!==c&&n.disposeIntermediateTensorInfo(t);return c}},Prt=tit({opSnippet:"return (x >= 0.0) ? x : (exp(x) - 1.0);",packedOpSnippet:"\n vec4 result;\n\n result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);\n result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);\n result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);\n result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);\n\n return result;\n"}),$rt={kernelName:hM,backendName:"webgl",kernelFunc:Prt},Brt={kernelName:pM,backendName:"webgl",kernelFunc:t=>{const{inputs:e,backend:n}=t,{dy:i,y:s}=e,r=aA().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Ynt("\n vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));\n return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));\n",i.shape,s.shape):new Vnt("return (b >= 0.0) ? a : a * (b + 1.0);",i.shape,s.shape);return n.runWebGLProgram(r,[i,s],i.dtype)}},Vrt=eit({opSnippet:"return float(a == b);",packedOpSnippet:"\n return vec4(equal(a, b));\n",dtype:"bool",cpuKernelImpl:yet}),Urt={kernelName:dM,backendName:"webgl",kernelFunc:Vrt},Yrt=tit({opSnippet:`\n // Error function is calculated approximately with elementary function.\n // See "Handbook of Mathematical Functions with Formulas,\n // Graphs, and Mathematical Tables", Abramowitz and Stegun.\n float p = ${vG};\n float a1 = ${wG};\n float a2 = ${SG};\n float a3 = ${xG};\n float a4 = ${RG};\n float a5 = ${OG};\n\n float sign = sign(x);\n x = abs(x);\n float t = 1.0 / (1.0 + p * x);\n return sign * (1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x));\n`}),Grt={kernelName:cM,backendName:"webgl",kernelFunc:Yrt},Hrt=tit({opSnippet:Znt+"\n return exp(x);\n",packedOpSnippet:"\n vec4 result = exp(x);\n bvec4 isNaN = isnan(x);\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n",cpuKernelImpl:Iet,dtype:"float32"}),Wrt={kernelName:fM,backendName:"webgl",kernelFunc:Hrt}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function zrt(t){const{inputs:e,attrs:n,backend:i}=t,{dim:s}=n,{input:r}=e,a=r.shape.length,o=r.shape.slice();let l=s;return s<0&&(_O(-(a+1)<=s,(()=>`Axis must be in the interval [${-(a+1)}, ${a}]`)),l=a+s+1),o.splice(l,0,1),uit({inputs:{x:r},backend:i,attrs:{shape:o}})}const Xrt={kernelName:mM,backendName:"webgl",kernelFunc:zrt},jrt="return exp(x) - 1.0;",qrt=tit({opSnippet:jrt,packedOpSnippet:jrt,cpuKernelImpl:Eet}),Krt={kernelName:gM,backendName:"webgl",kernelFunc:qrt}; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Qrt{constructor(t,e,n){this.variableNames=["real","imag"];const i=e[1];this.outputShape=e;const s=n?`2.0 * ${Math.PI}`:`-2.0 * ${Math.PI}`,r=n?`${i}.0`:"1.0";let a;if("real"===t)a="return real * expR - imag * expI;";else{if("imag"!==t)throw new Error(`FFT component must be either "real" or "imag", got ${t}.`);a="return real * expI + imag * expR;"}this.userCode=`\n const float exponentMultiplier = ${s};\n\n float unaryOpComplex(float real, float expR, float imag, float expI) {\n ${a}\n }\n\n float mulMatDFT(int batch, int index) {\n float indexRatio = float(index) / float(${i});\n float exponentMultiplierTimesIndexRatio =\n exponentMultiplier * indexRatio;\n\n float result = 0.0;\n\n for (int i = 0; i < ${i}; i++) {\n // x = (-2|2 * PI / N) * index * i;\n float x = exponentMultiplierTimesIndexRatio * float(i);\n float expR = cos(x);\n float expI = sin(x);\n float real = getReal(batch, i);\n float imag = getImag(batch, i);\n\n result +=\n unaryOpComplex(real, expR, imag, expI) / ${r};\n }\n\n return result;\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n setOutput(mulMatDFT(coords[0], coords[1]));\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Jrt(t,e,n){const i=n.texData.get(t.dataId),s=IO(t.shape),r=t.shape[t.shape.length-1],a=uit({inputs:{x:t},backend:n,attrs:{shape:[s/r,r]}}),o=a.shape,l=new Qrt("real",o,e),u=new Qrt("imag",o,e),h=[{dataId:i.complexTensorInfos.real.dataId,dtype:i.complexTensorInfos.real.dtype,shape:o},{dataId:i.complexTensorInfos.imag.dataId,dtype:i.complexTensorInfos.imag.dtype,shape:o}],p=n.runWebGLProgram(l,h,"float32"),c=n.runWebGLProgram(u,h,"float32"),d=Wnt({inputs:{real:p,imag:c},backend:n});n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(c);const f=uit({inputs:{x:d},backend:n,attrs:{shape:t.shape}});return n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(d),f}const Zrt={kernelName:_M,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{input:i}=e;return Jrt(i,!1,n)}}; +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class tat{constructor(t,e){this.outputShape=[],this.customUniforms=[{name:"value",type:"float"}],this.variableNames=["x"],this.outputShape=t,this.userCode="\n void main() {\n // Input can be obtained from uniform value.\n setOutput(value);\n }\n "}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function eat(t){const{backend:e,attrs:n}=t,{shape:i,value:s}=n;let{dtype:r}=n;if(r=r||GO(s),"string"===r){const t=DO(r,IO(i));return t.fill(s),e.makeTensorInfo(i,r,t)}{const t=new tat(i,s),n=[[s]];return e.runWebGLProgram(t,[],r,n)}}const nat={kernelName:TM,backendName:"webgl",kernelFunc:eat}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class iat{constructor(t){this.variableNames=["Image"],this.outputShape=[];const e=t[2];this.outputShape=t,this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int x = coords[2];\n\n int coordX = ${e} - x - 1;\n float outputValue;\n if(coordX >= 0 && coordX < ${e}) {\n outputValue = getImage(coords[0], coords[1], coordX, coords[3]);\n } else {\n outputValue = getImage(coords[0], coords[1], coords[2], coords[3]);\n }\n setOutput(outputValue);\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const sat={kernelName:yM,backendName:"webgl",kernelFunc:({inputs:t,backend:e})=>{const{image:n}=t,i=e,s=new iat(n.shape);return i.runWebGLProgram(s,[n],n.dtype)}},rat="return floor(x);",aat=tit({opSnippet:rat,packedOpSnippet:rat,cpuKernelImpl:bet}),oat={kernelName:IM,backendName:"webgl",kernelFunc:aat},lat=eit({opSnippet:"\n float s = sign(a) * sign(b);\n int ia = round(a);\n int ib = round(b);\n if (ib != 0) {\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n return float(idiv(ia, ib, s));\n } else {\n return NAN;\n }\n",packedOpSnippet:"\n ivec4 ia = round(a);\n ivec4 ib = round(b);\n bvec4 cond = notEqual(ib, ivec4(0));\n ivec4 result = ivec4(0);\n vec4 s = sign(a) * sign(b);\n\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n if (cond[0]) {\n result[0] = idiv(ia[0], ib[0], s[0]);\n }\n if (cond[1]) {\n result[1] = idiv(ia[1], ib[1], s[1]);\n }\n if (cond[2]) {\n result[2] = idiv(ia[2], ib[2], s[2]);\n }\n if (cond[3]) {\n result[3] = idiv(ia[3], ib[3], s[3]);\n }\n return vec4(result);\n",dtype:"int32"}),uat={kernelName:EM,backendName:"webgl",kernelFunc:lat}; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class hat{constructor(t){this.variableNames=["A"];const e=ptt(),[n,i]=t;this.outputShape=t,this.userCode=`\n void main() {\n ivec3 coords = getOutputCoords();\n int texR = coords[0];\n int texC = coords[1];\n int depth = coords[2];\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${i}.0, ${n}.0);\n\n vec4 values = ${e.texture2D}(A, uv);\n float value;\n if (depth == 0) {\n value = values.r;\n } else if (depth == 1) {\n value = values.g;\n } else if (depth == 2) {\n value = values.b;\n } else if (depth == 3) {\n value = values.a;\n }\n\n setOutput(floor(value * 255.0 + 0.5));\n }\n `}} +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class pat{constructor(t){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;const e=ptt(),[n,i]=t;this.outputShape=t,this.userCode=`\n void main() {\n ivec3 coords = getOutputCoords();\n int texR = coords[0];\n int texC = coords[1];\n int depth = coords[2];\n\n vec4 result = vec4(0.);\n\n for(int row=0; row<=1; row++) {\n for(int col=0; col<=1; col++) {\n texC = coords[1] + row;\n depth = coords[2] + col;\n\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${i}.0, ${n}.0);\n vec4 values = ${e.texture2D}(A, uv);\n float value;\n if (depth == 0) {\n value = values.r;\n } else if (depth == 1) {\n value = values.g;\n } else if (depth == 2) {\n value = values.b;\n } else if (depth == 3) {\n value = values.a;\n }\n\n result[row * 2 + col] = floor(value * 255.0 + 0.5);\n }\n }\n\n ${e.output} = result;\n }\n `}} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const cat={kernelName:wN,backendName:"webgl",kernelFunc:function(t){const{inputs:e,backend:n,attrs:i}=t;let{pixels:s}=e;const{numChannels:r}=i,a="undefined"!=typeof HTMLVideoElement&&s instanceof HTMLVideoElement,o="undefined"!=typeof HTMLImageElement&&s instanceof HTMLImageElement,[l,u]=a?[s.videoWidth,s.videoHeight]:[s.width,s.height],h=[u,l],p=[u,l,r];if(o||a){const t=aA().getBool("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU");null!=dat&&t===fat||(fat=t,dat=document.createElement("canvas").getContext("2d",{willReadFrequently:fat})),dat.canvas.width=l,dat.canvas.height=u,dat.drawImage(s,0,0,l,u),s=dat.canvas}const c=n.makeTensorInfo(h,"int32");n.texData.get(c.dataId).usage=a7.PIXELS,n.gpgpu.uploadPixelDataToTexture(n.getTexture(c.dataId),s);const d=aA().getBool("WEBGL_PACK")?new pat(p):new hat(p),f=n.runWebGLProgram(d,[c],"int32");return n.disposeData(c.dataId),f}};let dat,fat=aA().getBool("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU");const mat={kernelName:RN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,filter:r,bias:a,preluActivationWeights:o}=e,{strides:l,pad:u,dataFormat:h,dilations:p,dimRoundingMode:c,activation:d,leakyreluAlpha:f}=i,m=_$(h),g=o$(s.shape,r.shape,l,p,u,c,!1,m);let _;const T=[],y=null!=a,I=null!=o,E="leakyrelu"===d,b=()=>{const t=[s,r],e=(t,e)=>{if("NCHW"===e&&1===t.shape.length&&1!==t.shape[0]){const e=uit({inputs:{x:t},backend:n,attrs:{shape:[t.shape[0],1,1]}});return T.push(e),e}return t};if(y&&t.push(e(a,h)),I&&t.push(e(o,h)),E){const e=n.makeTensorInfo([],"float32",ik(f,"float32"));t.push(e),T.push(e)}return t};if(1!==g.filterHeight||1!==g.filterWidth||1!==g.dilationHeight||1!==g.dilationWidth||1!==g.strideHeight||1!==g.strideWidth||"SAME"!==g.padInfo.type&&"VALID"!==g.padInfo.type)if(g.strideWidth<=2&&"channelsLast"===m&&aA().getBool("WEBGL_EXP_CONV")){const t=d?nit(d,!0):null,e=new Xst(g,y,t,I,E),i=[[g.padInfo.top,g.padInfo.left],[g.strideHeight,g.strideWidth],[g.dilationHeight,g.dilationWidth],[g.inHeight,g.inWidth]],s=b();_=n.runWebGLProgram(e,s,"float32",i)}else if(aA().getBool("WEBGL_CONV_IM2COL"))_=Qst({x:s,filter:r,convInfo:g,backend:n,bias:a,activation:d,preluActivationWeights:o,leakyreluAlpha:f});else{const t=d?nit(d,!1):null,e=new Wst(g,y,t,I,E),i=b();_=n.runWebGLProgram(e,i,"float32")}else _=Kst({x:s,filter:r,convInfo:g,backend:n,bias:a,activation:d,preluActivationWeights:o,leakyreluAlpha:f});const v=uit({inputs:{x:_},backend:n,attrs:{shape:g.outShape}});return T.push(_),T.forEach((t=>n.disposeIntermediateTensorInfo(t))),v}};const gat={kernelName:ON,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,filter:r,bias:a,preluActivationWeights:o}=e,{strides:l,pad:u,dilations:h,dimRoundingMode:p,activation:c,leakyreluAlpha:d}=i,f=[];let m=h;null==m&&(m=[1,1]),_O(m$(l,m),(()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${l} and dilations '${m}'`));const g=o$(s.shape,r.shape,l,m,u,p,!0),_=aA().getBool("WEBGL_PACK_DEPTHWISECONV")&&g.strideWidth<=2&&g.outChannels/g.inChannels==1,T=c?nit(c,_):null,y=[s,r],I=null!=a,E=null!=o,b="leakyrelu"===c;if(I&&y.push(a),E&&y.push(o),b){const t=n.makeTensorInfo([],"float32",ik(d,"float32"));y.push(t),f.push(t)}let v;v=_?new xrt(g,I,T,E,b):new Srt(g,I,T,E,b);const w=[[g.padInfo.top,g.padInfo.left],[g.strideHeight,g.strideWidth],[g.dilationHeight,g.dilationWidth],[g.inHeight,g.inWidth]],S=n.runWebGLProgram(v,y,"float32",w);return f.forEach((t=>n.disposeIntermediateTensorInfo(t))),S}};class _at{constructor(t,e,n,i){this.sliceDim=t,this.strides=e,this.paramsShape=i,this.variableNames=["x","indices"],this.outputShape=n;const s=Ott(n.length);let r="\n int index;";for(let t=0;t= ${this.paramsShape[t]};\n flattenIndex += index * ${this.strides[t]};`;this.userCode=`\n void main() {\n ${s} coords = getOutputCoords();\n int flattenIndex = 0;\n bool out_of_bounds = false;\n\n ${r}\n\n setOutput(out_of_bounds ? 0.0 : getX(flattenIndex, coords[1]));\n }\n `}}const Tat={kernelName:wM,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{params:i,indices:s}=e,r=s.shape,a=r[r.length-1],o=IO(i.shape),[l,u,h,p]=oP(i,s),c=uit({inputs:{x:s},backend:n,attrs:{shape:[u,a]}}),d=uit({inputs:{x:i},backend:n,attrs:{shape:[IO(i.shape)/h,h]}});if(n.shouldExecuteOnCPU([i,s])||"string"===i.dtype){const t=n.readSync(s.dataId),e=n.bufferSync(i),r=vet(t,e,i.dtype,u,a,h,p,i.shape,o);return n.makeTensorInfo(l,i.dtype,r.values)}const f=new _at(a,p,[u,h],i.shape),m=n.runWebGLProgram(f,[d,c],d.dtype),g=uit({inputs:{x:m},backend:n,attrs:{shape:l}});return n.disposeIntermediateTensorInfo(c),n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(m),g}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class yat{constructor(t,e){this.variableNames=["A","indices"],this.outputShape=e,this.rank=e.length;const n=Ott(this.rank),i=function(t){const e=["resRC.x","resRC.y","resRC.z","resRC.w"],n=[];for(let i=0;i= 0) && (index < ${t[2]}) ? 1.0 : 0.0;\n setOutput(inBounds * getA(${i}));\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Iat(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,indices:r}=e,{axis:a,batchDims:o}=i,l=CO(a,s.shape)[0];if(aA().get("DEBUG")){const t=n.readSync(r.dataId),e=s.shape[l];for(let n=0;n=0,(()=>`GatherV2: the index value ${i} is not in [0, ${e-1}]`))}}const u=lH(s,r,l,o),h=IO(r.shape),p=[],c=uit({inputs:{x:s},backend:n,attrs:{shape:[u.batchSize,u.outerSize,u.dimSize,u.sliceSize]}}),d=uit({inputs:{x:r},backend:n,attrs:{shape:[u.batchSize,h/u.batchSize]}});p.push(c),p.push(d);const f=[u.batchSize,u.outerSize,h/u.batchSize,u.sliceSize];if(n.shouldExecuteOnCPU([s,r])||"string"===s.dtype){const t=n.bufferSync(d),e=n.bufferSync(c),i=wet(e,t,f);return p.forEach((t=>n.disposeIntermediateTensorInfo(t))),n.makeTensorInfo(u.outputShape,i.dtype,i.values)}const m=new yat(c.shape,f),g=n.runWebGLProgram(m,[c,d],c.dtype);p.push(g);const _=uit({inputs:{x:g},backend:n,attrs:{shape:u.outputShape}});return p.forEach((t=>n.disposeIntermediateTensorInfo(t))),_}const Eat={kernelName:vM,backendName:"webgl",kernelFunc:Iat},bat=eit({opSnippet:"return float(a > b);",packedOpSnippet:"\n return vec4(greaterThan(a, b));\n",cpuKernelImpl:xet,dtype:"bool"}),vat={kernelName:SM,backendName:"webgl",kernelFunc:bat},wat=eit({opSnippet:"return float(a >= b);",packedOpSnippet:"\n return vec4(greaterThanEqual(a, b));\n",dtype:"bool",cpuKernelImpl:Ret}),Sat={kernelName:xM,backendName:"webgl",kernelFunc:wat};const xat={kernelName:OM,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{input:i}=e;return Jrt(i,!0,n)}},Rat=tit({opSnippet:"return float(!isnan(x) && !isinf(x));",dtype:"bool"}),Oat={kernelName:MM,backendName:"webgl",kernelFunc:Rat},Aat=tit({opSnippet:"return float(isinf(x));",dtype:"bool"}),Mat={kernelName:CM,backendName:"webgl",kernelFunc:Aat},Cat=tit({opSnippet:"return float(isnan(x));",dtype:"bool"}),Nat={kernelName:NM,backendName:"webgl",kernelFunc:Cat},kat=eit({opSnippet:"return float(a < b);",packedOpSnippet:"\n return vec4(lessThan(a, b));\n",cpuKernelImpl:Oet,dtype:"bool"}),Dat={kernelName:DM,backendName:"webgl",kernelFunc:kat},Lat=eit({opSnippet:"return float(a <= b);",packedOpSnippet:"\n return vec4(lessThanEqual(a, b));\n",cpuKernelImpl:Aet,dtype:"bool"}),Fat={kernelName:LM,backendName:"webgl",kernelFunc:Lat};const Pat={kernelName:FM,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{backend:e,attrs:n}=t,{start:i,stop:s,num:r}=n,a=Met(i,s,r);return e.makeTensorInfo([a.length],"float32",a)}},$at=tit({opSnippet:Znt+"\n return x < 0.0 ? 0./0. : log(x);\n",packedOpSnippet:"\n vec4 result = log(x);\n bvec4 isNaN = isnan(x);\n result.r = isNaN.r ? x.r : (x.r < 0.0 ? 0./0. : result.r);\n result.g = isNaN.g ? x.g : (x.g < 0.0 ? 0./0. : result.g);\n result.b = isNaN.b ? x.b : (x.b < 0.0 ? 0./0. : result.b);\n result.a = isNaN.a ? x.a : (x.a < 0.0 ? 0./0. : result.a);\n return result;\n",cpuKernelImpl:Cet}),Bat={kernelName:PM,backendName:"webgl",kernelFunc:$at},Vat=tit({opSnippet:Znt+"\n return log(1.0 + x);\n"}),Uat={kernelName:$M,backendName:"webgl",kernelFunc:Vat},Yat=eit({opSnippet:"return float(a >= 1.0 && b >= 1.0);",packedOpSnippet:"\n return vec4(\n vec4(greaterThanEqual(a, vec4(1.0))) *\n vec4(greaterThanEqual(b, vec4(1.0))));\n",dtype:"bool"}),Gat={kernelName:BM,backendName:"webgl",kernelFunc:Yat},Hat=tit({opSnippet:"return float(!(x >= 1.0));"}),Wat={kernelName:VM,backendName:"webgl",kernelFunc:Hat},zat=eit({opSnippet:"return float(a >= 1.0 || b >= 1.0);",packedOpSnippet:"\n return min(\n vec4(greaterThanEqual(a, vec4(1.0))) +\n vec4(greaterThanEqual(b, vec4(1.0))),\n vec4(1.0));\n",dtype:"bool"}),Xat={kernelName:UM,backendName:"webgl",kernelFunc:zat}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class jat{constructor(t,e,n,i,s){this.variableNames=["x"],this.outputShape=[];const r=e,a=t[3]-1;let o;this.outputShape=t;const l=`float(${n}) + float(${i}) * sum`;o=.5===s?`inversesqrt(${l})`:1===s?`1.0/(${l})`:`exp(log(${l}) * float(-${s}));`,this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n int d = coords[3];\n float x = getX(b, r, c, d);\n float sum = 0.0;\n for (int j = -${r}; j <= ${r}; j++) {\n int idx = d + j;\n if (idx >= 0 && idx <= ${a}) {\n float z = getX(b, r, c, idx);\n sum += z * z;\n }\n }\n float val = x * ${o};\n setOutput(val);\n }\n `}} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class qat{constructor(t,e,n,i,s){this.variableNames=["x"],this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0;const r=e,a=t[3]-1;let o;this.outputShape=t;const l=`float(${n}) + float(${i}) * sum`;o=.5===s?`inversesqrt(${l})`:1===s?`1.0/(${l})`:`exp(log(${l}) * float(-${s}));`,this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords.x;\n int r = coords.y;\n int c = coords.z;\n int d = coords.w;\n\n bool hasNextCol = d < ${this.outputShape[3]};\n bool hasNextRow = c < ${this.outputShape[2]};\n\n vec4 sum = vec4(0.);\n vec4 xFragAtOutputCoords = getX(b, r, c, d);\n\n vec4 xAtOutputCoords = vec4(\n getChannel(xFragAtOutputCoords, vec2(c, d)),\n hasNextCol ?\n getChannel(xFragAtOutputCoords, vec2(c, d + 1)) : 0.0,\n hasNextRow ?\n getChannel(xFragAtOutputCoords , vec2(c + 1, d)) : 0.0,\n (hasNextRow && hasNextCol) ?\n getChannel(xFragAtOutputCoords, vec2(c + 1, d + 1)) : 0.0\n );\n\n int firstChannel = d - ${r};\n vec2 cache = vec2(0.);\n if(firstChannel >= 0){\n vec4 firstChannelFrag = getX(b, r, c, firstChannel);\n cache.x = getChannel(firstChannelFrag, vec2(c, firstChannel));\n if(hasNextRow){\n cache.y = getChannel(firstChannelFrag, vec2(c + 1, firstChannel));\n }\n }\n\n ivec2 depth = ivec2(d, d + 1);\n for (int j = - ${r}; j <= ${r}; j++) {\n ivec2 idx = depth + j;\n bvec2 aboveLowerBound = greaterThanEqual(idx, ivec2(0));\n bvec2 belowUpperBound = lessThanEqual(idx, ivec2(${a}));\n\n bool depthInRange = aboveLowerBound.x && belowUpperBound.x;\n bool depthPlusOneInRange = aboveLowerBound.y && belowUpperBound.y;\n\n if(depthInRange || depthPlusOneInRange){\n vec4 z = vec4(0.);\n vec4 xFragAtCurrentDepth;\n z.xz = cache.xy;\n if(depthPlusOneInRange && hasNextCol){\n xFragAtCurrentDepth = idx.y != d ?\n getX(b, r, c, idx.y) : xFragAtOutputCoords;\n z.y = getChannel(xFragAtCurrentDepth, vec2(c, idx.y));\n if(hasNextRow){\n z.w = getChannel(xFragAtCurrentDepth, vec2(c + 1, idx.y));\n }\n }\n cache.xy = z.yw;\n sum += z * z;\n }\n }\n vec4 result = xAtOutputCoords * ${o};\n setOutput(result);\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const Kat={kernelName:WM,backendName:"webgl",kernelFunc:t=>{const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{depthRadius:r,bias:a,alpha:o,beta:l}=i,u=aA().getBool("WEBGL_PACK_NORMALIZATION")?new qat(s.shape,r,a,o,l):new jat(s.shape,r,a,o,l);return n.runWebGLProgram(u,[s],s.dtype)}}; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Qat{constructor(t,e,n,i,s){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=t,this.depth=t[3],this.depthRadius=e,this.bias=n,this.alpha=i,this.beta=s,this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n\n float result = 0.0;\n for (int d = 0; d < ${this.depth}; ++d) {\n int depthBegin = int(max(0.0, float(d - ${e})));\n int depthEnd = int(min(float(${this.depth}),\n float(d + ${e} + 1)));\n\n const int MIN_DEPTH_BEGIN = 0;\n const int MAX_DEPTH_END = ${this.depth};\n\n float norm = 0.0;\n for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd) {\n norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);\n }\n else {\n break;\n }\n }\n\n norm = float(${i}) * norm + float(${n});\n\n for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd){\n float dyi = -2.0 * float(${i})\n * float(${s})\n * getInputImage(b, r, c, k) * getOutputImage(b, r, c, d)\n / norm;\n if (k == d) {\n dyi += pow(norm, -1.0 * ${s});\n }\n if (k == coords[3]) {\n dyi *= getDy(b, r, c, d);\n result += dyi;\n }\n }\n else {\n break;\n }\n }\n }\n setOutput(result);\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const Jat={kernelName:zM,backendName:"webgl",kernelFunc:t=>{const{inputs:e,backend:n,attrs:i}=t,{x:s,y:r,dy:a}=e,{depthRadius:o,bias:l,alpha:u,beta:h}=i,p=new Qat(s.shape,o,l,u,h);return n.runWebGLProgram(p,[s,r,a],s.dtype)}}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Zat(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{reductionIndices:r,keepDims:a}=i,o=s.shape.length,l=CO(r,s.shape);let u=l;const h=_B(u,o),p=null!=h,c=n.shouldExecuteOnCPU([s]);let d=s;if(p){if(c){const t=n.texData.get(d.dataId).values,e=new Array(o);for(let t=0;t`Error in maxPool: Either strides or dilations must be 1. Got strides ${a} and dilations '1'`));const u=r$(s.shape,r,a,1,o,l);if(1===u.filterWidth&&1===u.filterHeight&&vO(u.inShape,u.outShape))return Gnt({inputs:{x:s},backend:n});const h=new est(u,"max",!1);return n.runWebGLProgram(h,[s],s.dtype)}};const sot={kernelName:JM,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{filterSize:r,strides:a,pad:o,dataFormat:l,dimRoundingMode:u}=i,h=a$(s.shape,r,a,[1,1,1],o,u,l),p=new nst(h,"max",!1);return n.runWebGLProgram(p,[s],s.dtype)}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class rot{constructor(t){this.variableNames=["dy","maxPos"],this.outputShape=t.inShape;const e=t.strideHeight,n=t.strideWidth,i=t.dilationHeight,s=t.effectiveFilterHeight,r=t.effectiveFilterWidth,a=s-1-t.padInfo.top,o=r-1-t.padInfo.left,l=s*r-1;this.userCode=`\n const ivec2 pads = ivec2(${a}, ${o});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${s};\n wR += ${i}) {\n float dyR = float(dyRCorner + wR) / ${e}.0;\n\n if (dyR < 0.0 || dyR >= ${t.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${r}; wC++) {\n float dyC = float(dyCCorner + wC) / ${n}.0;\n\n if (dyC < 0.0 || dyC >= ${t.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n int maxPosValue = ${l} - int(getMaxPos(b, idyR, idyC, d));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue = wR * ${r} + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n setOutput(dotProd);\n }\n `}}class aot{constructor(t){this.variableNames=["dy","maxPos"],this.outputShape=t.inShape;const e=t.strideDepth,n=t.strideHeight,i=t.strideWidth,s=t.dilationDepth,r=t.dilationHeight,a=t.dilationWidth,o=t.effectiveFilterDepth,l=t.effectiveFilterHeight,u=t.effectiveFilterWidth,h=o-1-t.padInfo.front,p=l-1-t.padInfo.top,c=u-1-t.padInfo.left,d=o*l*u-1;this.userCode=`\n const ivec3 pads = ivec3(${h}, ${p}, ${c});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyDCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n // Convolve dy(?, ?, ?, ch) with pos mask(:, :, :, d) to get\n // dx(xD, xR, xC, ch).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int wD = 0; wD < ${o};\n wD += ${s}) {\n float dyD = float(dyDCorner + wD) / ${e}.0;\n\n if (dyD < 0.0 || dyD >= ${t.outDepth}.0 || fract(dyD) > 0.0) {\n continue;\n }\n int idyD = int(dyD);\n\n for (int wR = 0; wR < ${l};\n wR += ${r}) {\n float dyR = float(dyRCorner + wR) / ${n}.0;\n\n if (dyR < 0.0 || dyR >= ${t.outHeight}.0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${u};\n wC += ${a}) {\n float dyC = float(dyCCorner + wC) / ${i}.0;\n\n if (dyC < 0.0 || dyC >= ${t.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n int maxPosValue = ${d} -\n int(getMaxPos(batch, idyD, idyR, idyC, ch));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue =\n wD * ${l} * ${u} +\n wR * ${u} + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n }\n setOutput(dotProd);\n }\n `}}const oot={kernelName:ZM,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{dy:s,input:r}=e,a=r,{filterSize:o,strides:l,pad:u,dimRoundingMode:h}=i,p=a$(a.shape,o,l,[1,1,1],u,h),c=new nst(p,"max",!0),d=n.runWebGLProgram(c,[a],a.dtype),f=new aot(p),m=n.runWebGLProgram(f,[s,d],a.dtype);return n.disposeIntermediateTensorInfo(d),m}};const lot={kernelName:QM,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{dy:s,input:r,output:a}=e,o=r;utt([r,a],"maxPoolGrad");const{filterSize:l,strides:u,pad:h,dimRoundingMode:p}=i,c=r$(o.shape,l,u,1,h,p),d=new est(c,"max",!0),f=n.runWebGLProgram(d,[o],o.dtype),m=new rot(c),g=n.runWebGLProgram(m,[s,f],o.dtype);return n.disposeIntermediateTensorInfo(f),g}}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const uot={kernelName:tC,backendName:"webgl",kernelFunc:({inputs:t,attrs:e,backend:n})=>{const{x:i}=t,{filterSize:s,strides:r,pad:a,includeBatchInIndex:o}=e,l=n;_O(4===i.shape.length,(()=>`Error in maxPool: input must be rank 4 but got rank ${i.shape.length}.`));const u=[1,1];_O(m$(r,u),(()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${r} and dilations '${u}'`));const h=r$(i.shape,s,r,u,a),[p,c]= +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t,e,n,i){let s=new est(n,"max",!1);const r=i.runWebGLProgram(s,[t],"float32");return s=new est(n,"max",!0,!0,e),[r,i.runWebGLProgram(s,[t],"float32")]}(i,o,h,l);return[p,c]}}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const hot={kernelName:eC,backendName:"webgl",kernelFunc:({inputs:t,attrs:e,backend:n})=>{const{x:i}=t,{keepDims:s,axis:r}=e,a=n,o=i.shape.length,l=CO(r,i.shape);let u=l;const h=_B(u,o),p=null!=h,c=a.shouldExecuteOnCPU([i]),d=[];let f=i;if(p){if(c){const t=a.texData.get(f.dataId).values,e=new Array(o);for(let t=0;te[0]+t[n]+e[1]));const i=t.length,s=Ott(i),r=e.map((t=>t[0])).join(","),a=e.map(((e,n)=>e[0]+t[n])).join(","),o=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,i),l="reflect"===n?0:1;this.userCode=1!==i?`\n ${s} start = ${s}(${r});\n ${s} end = ${s}(${a});\n\n void main() {\n ${s} outC = getOutputCoords();\n for (int i = 0; i < ${i}; i++) {\n if (outC[i] < start[i]) {\n outC[i] = start[i] * 2 - outC[i] - ${l};\n } else if(outC[i] >= end[i]) {\n outC[i] = (end[i] - 1) * 2 - outC[i] + ${l};\n }\n }\n ${s} coords = outC - start;\n setOutput(getX(${o}));\n }\n `:`\n int start = ${r};\n int end = ${a};\n\n void main() {\n int outC = getOutputCoords();\n if (outC < start) {\n outC = start * 2 - outC - ${l};\n } else if(outC >= end) {\n outC = (end - 1) * 2 - outC + ${l};\n }\n setOutput(getX(outC - start));\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class mot{constructor(t,e,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e.map(((e,n)=>e[0]+t[n]+e[1]));const i=t.length,s=Ott(i),r=e.map((t=>t[0])).join(","),a=e.map(((e,n)=>e[0]+t[n])).join(","),o=unt("rc",i),l=unt("source",i),u=`${o[i-1]} < ${this.outputShape[i-1]}`,h=1===i?"source":`vec2(${l.slice(-2).join()})`,p="reflect"===n?0:1;let c="";if(1===i){const t=`\n ${s} source = rc;\n if (source < start) {\n source = start * 2 - source - ${p};\n } else if (source >= end) {\n source = (end - 1) * 2 - source + ${p};\n }\n source -= start;\n `;c=`\n ${s} rc = outputLoc;\n ${t}\n result[0] = getChannel(getX(${l.join()}), ${h});\n ${o[i-1]} += 1;\n if(${u}) {\n ${t}\n result[1] = getChannel(getX(${l.join()}), ${h});\n }\n `}else{const t=`\n ${s} source = rc;\n ${s} lt = ${s}(lessThan(source, start));\n ${s} gte = ${s}(greaterThanEqual(source, end));\n ${s} orig = 1 - (lt + gte);\n source = orig * source +\n lt * (start * 2 - source - ${p}) +\n gte * ((end - 1) * 2 - source + ${p});\n source -= start;\n `;c=`\n ${s} rc = outputLoc;\n ${t}\n result[0] = getChannel(getX(${l.join()}), ${h});\n ${o[i-1]} += 1;\n if(${u}) {\n ${t}\n result[1] = getChannel(getX(${l.join()}), ${h});\n }\n rc = outputLoc;\n ${o[i-2]} += 1;\n if(${o[i-2]} < ${this.outputShape[i-2]}) {\n ${t}\n result[2] = getChannel(getX(${l.join()}), ${h});\n ${o[i-1]} += 1;\n if(${u}) {\n ${t}\n result[3] = getChannel(getX(${l.join()}), ${h});\n }\n }\n `}this.userCode=`\n const ${s} start = ${s}(${r});\n const ${s} end = ${s}(${a});\n\n void main() {\n ${s} outputLoc = getOutputCoords();\n vec4 result = vec4(0.);\n ${c}\n setOutput(result);\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const got={kernelName:sC,backendName:"webgl",kernelFunc:({inputs:t,backend:e,attrs:n})=>{const{x:i}=t,{paddings:s,mode:r}=n,a=aA().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new mot(i.shape,s,r):new fot(i.shape,s,r);return e.runWebGLProgram(a,[i],i.dtype)}},_ot=eit({opSnippet:"if (b == 0.0) return NAN;\n return mod(a, b);",packedOpSnippet:"\n vec4 result = mod(a, b);\n bvec4 isNaN = equal(b, vec4(0.0));\n "+Unt+"\n return result;\n"}),Tot={kernelName:rC,backendName:"webgl",kernelFunc:_ot}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class yot{constructor(t,e,n){this.variableNames=["probs"],this.customUniforms=[{name:"seed",type:"float"}],this.outputShape=[t,n],this.userCode=`\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n\n float r = random(seed);\n float cdf = 0.0;\n\n for (int i = 0; i < ${e-1}; i++) {\n cdf += getProbs(batch, i);\n\n if (r < cdf) {\n setOutput(float(i));\n return;\n }\n }\n\n // If no other event happened, last event happened.\n setOutput(float(${e-1}));\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const Iot=eit({opSnippet:"\nif (a == b) {\n return 1.0;\n};\nreturn a / b;",packedOpSnippet:"\n // vec4 one = vec4(equal(a, b));\n // return one + (vec4(1.0) - one) * a / b;\n vec4 result = a / b;\n if(a.x == b.x) {\n result.x = 1.;\n }\n if(a.y == b.y) {\n result.y = 1.;\n }\n if(a.z == b.z) {\n result.z = 1.;\n }\n if(a.w == b.w) {\n result.w = 1.;\n }\n\n return result;\n",checkOutOfBounds:!0}),Eot={kernelName:lM,backendName:"webgl",kernelFunc:Iot},bot="return a - b;",vot=eit({opSnippet:bot,packedOpSnippet:bot,supportsComplex:!0,cpuKernelImpl:int}),wot={kernelName:pN,backendName:"webgl",kernelFunc:vot}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function Sot(t){const{inputs:e,backend:n,attrs:i}=t,{logits:s}=e,{dim:r}=i,a=CO([r],s.shape),o=Zat({inputs:{x:s},backend:n,attrs:{reductionIndices:a,keepDims:!1}}),l=mB(o.shape,a),u=uit({inputs:{x:o},backend:n,attrs:{shape:l}}),h=vot({inputs:{a:s,b:u},backend:n}),p=Hrt({inputs:{x:h},backend:n}),c=_it({inputs:{x:p},backend:n,attrs:{axis:a,keepDims:!1}}),d=uit({inputs:{x:c},backend:n,attrs:{shape:l}}),f=Iot({inputs:{a:p,b:d},backend:n});return n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(u),n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(c),n.disposeIntermediateTensorInfo(d),f}const xot={kernelName:JC,backendName:"webgl",kernelFunc:Sot};const Rot={kernelName:aC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{logits:s}=e,{numSamples:r,seed:a,normalized:o}=i,l=o?s:Sot({inputs:{logits:s},backend:n,attrs:{dim:s.shape.length-1}}),u=l.shape[0],h=l.shape[1],p=new yot(u,h,r),c=[[a]],d=n.runWebGLProgram(p,[l],"int32",c);return o||n.disposeIntermediateTensorInfo(l),d}},Oot=_nt+"\n return -x;\n";const Aot={kernelName:lC,backendName:"webgl",kernelFunc:function(t){const{inputs:e,backend:n}=t,{x:i}=e;if(n.shouldExecuteOnCPU([i])){const t=n.texData.get(i.dataId),[e,s]=Fet(t.values,i.shape,i.dtype);return n.makeTensorInfo(s,i.dtype,e)}let s;return s=aA().getBool("WEBGL_PACK_UNARY_OPERATIONS")?new Mnt(i.shape,"\n vec4 result = -x;\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n"):new gnt(i.shape,Oot),n.runWebGLProgram(s,[i],i.dtype)}},Mot=cY;const Cot={kernelName:hC,backendName:"webgl",kernelFunc:function(t){AN("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");const{inputs:e,backend:n,attrs:i}=t,{boxes:s,scores:r}=e,{maxOutputSize:a,iouThreshold:o,scoreThreshold:l}=i,u=n.readSync(s.dataId),h=n.readSync(r.dataId),{selectedIndices:p}=Mot(u,h,a,o,l);return n.makeTensorInfo([p.length],"int32",new Int32Array(p))}},Not=dY;const kot={kernelName:pC,backendName:"webgl",kernelFunc:function(t){AN("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");const{inputs:e,backend:n,attrs:i}=t,{boxes:s,scores:r}=e,{maxOutputSize:a,iouThreshold:o,scoreThreshold:l,padToMaxOutputSize:u}=i,h=n.readSync(s.dataId),p=n.readSync(r.dataId),{selectedIndices:c,validOutputs:d}=Not(h,p,a,o,l,u);return[n.makeTensorInfo([c.length],"int32",new Int32Array(c)),n.makeTensorInfo([],"int32",new Int32Array([d]))]}},Dot=fY;const Lot={kernelName:cC,backendName:"webgl",kernelFunc:function(t){AN("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");const{inputs:e,backend:n,attrs:i}=t,{boxes:s,scores:r}=e,{maxOutputSize:a,iouThreshold:o,scoreThreshold:l,softNmsSigma:u}=i,h=n.readSync(s.dataId),p=n.readSync(r.dataId),c=a,d=o,f=l,m=u,{selectedIndices:g,selectedScores:_}=Dot(h,p,c,d,f,m);return[n.makeTensorInfo([g.length],"int32",new Int32Array(g)),n.makeTensorInfo([_.length],"float32",new Float32Array(_))]}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Fot{constructor(t,e,n,i){this.variableNames=["indices"],this.outputShape=[t,e],this.userCode=`\n void main() {\n ivec2 coords = getOutputCoords();\n int index = round(getIndices(coords.x));\n setOutput(mix(float(${i}), float(${n}),\n float(index == coords.y)));\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const Pot={kernelName:fC,backendName:"webgl",kernelFunc:t=>{const{inputs:e,backend:n,attrs:i}=t,{indices:s}=e,{dtype:r,depth:a,onValue:o,offValue:l}=i,u=IO(s.shape),h=new Fot(u,a,o,l),p=uit({inputs:{x:s},backend:n,attrs:{shape:[u]}}),c=n.runWebGLProgram(h,[p],r);n.disposeIntermediateTensorInfo(p);const d=uit({inputs:{x:c},backend:n,attrs:{shape:[...s.shape,a]}});return n.disposeIntermediateTensorInfo(c),d}}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function $ot(t){const{inputs:e,backend:n}=t,{x:i}=e;if("complex64"===i.dtype){const t=wst({inputs:{input:i},backend:n}),e=$ot({inputs:{x:t},backend:n}),s=Vst({inputs:{input:i},backend:n}),r=$ot({inputs:{x:s},backend:n}),a=Wnt({inputs:{real:e,imag:r},backend:n});return n.disposeIntermediateTensorInfo(t),n.disposeIntermediateTensorInfo(e),n.disposeIntermediateTensorInfo(s),n.disposeIntermediateTensorInfo(r),a}return eat({attrs:{shape:i.shape,dtype:i.dtype,value:"string"===i.dtype?"":0},backend:n})}const Bot={kernelName:bN,backendName:"webgl",kernelFunc:$ot};const Vot={kernelName:dC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function t(e){const{inputs:n,backend:i}=e,{x:s}=n;if("string"===s.dtype)throw new Error("onesLike is not supported under string dtype");if("complex64"===s.dtype){const e=wst({inputs:{input:s},backend:i}),n=t({inputs:{x:e},backend:i}),r=Vst({inputs:{input:s},backend:i}),a=$ot({inputs:{x:r},backend:i}),o=Wnt({inputs:{real:n,imag:a},backend:i});return i.disposeIntermediateTensorInfo(e),i.disposeIntermediateTensorInfo(n),i.disposeIntermediateTensorInfo(r),i.disposeIntermediateTensorInfo(a),o}return eat({attrs:{shape:s.shape,dtype:s.dtype,value:1},backend:i})}};const Uot={kernelName:mC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{axis:s}=i;if(1===e.length)return zrt({inputs:{input:e[0]},backend:n,attrs:{dim:s}});const r=e[0].shape,a=e[0].dtype;e.forEach((t=>{TO(r,t.shape,"All tensors passed to stack must have matching shapes"),_O(a===t.dtype,(()=>"All tensors passed to stack must have matching dtypes"))}));const o=[],l=Gst({inputs:e.map((t=>{const e=zrt({inputs:{input:t},backend:n,attrs:{dim:s}});return o.push(e),e})),backend:n,attrs:{axis:s}});return o.forEach((t=>n.disposeIntermediateTensorInfo(t))),l}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Yot{constructor(t,e,n){this.variableNames=["x"],this.customUniforms=[{name:"value",type:"float"}],this.outputShape=e.map(((e,n)=>e[0]+t[n]+e[1]));const i=t.length,s=Ott(i),r=e.map((t=>t[0])).join(","),a=e.map(((e,n)=>e[0]+t[n])).join(","),o=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,i);this.userCode=1!==i?`\n ${s} start = ${s}(${r});\n ${s} end = ${s}(${a});\n\n void main() {\n ${s} outC = getOutputCoords();\n if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {\n setOutput(value);\n } else {\n ${s} coords = outC - start;\n setOutput(getX(${o}));\n }\n }\n `:`\n int start = ${r};\n int end = ${a};\n\n void main() {\n int outC = getOutputCoords();\n if (outC < start || outC >= end) {\n setOutput(value);\n } else {\n setOutput(getX(outC - start));\n }\n }\n `}} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Got{constructor(t,e,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"value",type:"float"}],this.outputShape=e.map(((e,n)=>e[0]+t[n]+e[1]));const i=t.length,s=Ott(i),r=e.map((t=>t[0])).join(","),a=e.map(((e,n)=>e[0]+t[n])).join(","),o=unt("rc",i),l=unt("source",i),u=`${o[i-1]} < ${this.outputShape[i-1]}`,h=1===i?"source":`vec2(${l.slice(-2).join()})`,p=[`${s} rc = outputLoc;`,`${o[i-1]} += 1;\n if(${u}) {\n `,1===i?"":`}\n rc = outputLoc;\n ${o[i-2]} += 1;\n if(${o[i-2]} < ${this.outputShape[i-2]}) {`,1===i?"":` ${o[i-1]} += 1;\n if(${u}) {`],c=1===i?"rc < start || rc >= end":"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))";let d="";for(let t=0,e=1===i?2:4;t{const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{paddings:r,constantValue:a}=i;if(0===IO(s.shape)){const t=r.map(((t,e)=>t[0]+s.shape[e]+t[1]));return eat({backend:n,attrs:{shape:t,value:a,dtype:s.dtype}})}const o=aA().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Got(s.shape,r,a):new Yot(s.shape,r,a),l=[[a]];return n.runWebGLProgram(o,[s],s.dtype,l)},Wot={kernelName:gC,backendName:"webgl",kernelFunc:Hot},zot=eit({opSnippet:"\n if(a < 0.0 && floor(b) < b){\n return NAN;\n }\n if (b == 0.0) {\n return 1.0;\n }\n return (round(mod(b, 2.0)) != 1) ?\n pow(abs(a), b) : sign(a) * pow(abs(a), b);\n",packedOpSnippet:"\n // isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.\n vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));\n vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);\n vec4 result = multiplier * pow(abs(a), b);\n\n // Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS\n bvec4 isExpZero = equal(b, vec4(0.0));\n result.r = isExpZero.r ? 1.0 : result.r;\n result.g = isExpZero.g ? 1.0 : result.g;\n result.b = isExpZero.b ? 1.0 : result.b;\n result.a = isExpZero.a ? 1.0 : result.a;\n\n bvec4 isNaN1 = lessThan(a, vec4(0.0));\n bvec4 isNaN2 = lessThan(floor(b), b);\n bvec4 isNaN = bvec4(isNaN1.x && isNaN2.x, isNaN1.y && isNaN2.y, isNaN1.z && isNaN2.z, isNaN1.w && isNaN2.w);\n "+Unt+"\n return result;\n"}),Xot={kernelName:TC,backendName:"webgl",kernelFunc:zot};const jot={kernelName:IC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{axis:r,keepDims:a}=i,o=s.shape.length,l=[],u=CO(r,s.shape);let h=u;const p=_B(h,o);let c,d=s;if(null!=p&&(d=yit({inputs:{x:s},backend:n,attrs:{perm:p}}),h=yB(h.length,o),l.push(d)),gB("prod",h,o),n.shouldExecuteOnCPU([d])){const t=n.texData.get(d.dataId).values,{outVals:e,outShape:i,outDtype:s}=$et(d.shape,d.dtype,t,h);c=n.makeTensorInfo(i,s,e)}else{const[t,e]=fB(d.shape,h),i=IO(e),r=uit({inputs:{x:d},backend:n,attrs:{shape:[-1,i]}}),a=dit(r,Fk(s.dtype),"prod",n);c=uit({inputs:{x:a},backend:n,attrs:{shape:t}}),l.push(r),l.push(a)}if(a){l.push(c);const t=mB(c.shape,u);c=uit({inputs:{x:c},backend:n,attrs:{shape:t}})}return l.forEach((t=>n.disposeIntermediateTensorInfo(t))),c}};const qot={kernelName:EC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{paramsNestedSplits:s,paramsDenseValues:r,indices:a}=e,{outputRaggedRank:o}=i,l=s.map((t=>n.readSync(t.dataId))),u=s.map((t=>t.shape)),h=n.readSync(r.dataId),p=n.readSync(a.dataId),[c,d,f]=Bet(l,u,h,r.shape,r.dtype,p,a.shape,o),m=c.map((t=>n.makeTensorInfo([t.length],"int32",t))),g=n.makeTensorInfo(f,r.dtype,d);return m.concat([g])}};const Kot={kernelName:bC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2022 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{starts:i,limits:s,deltas:r}=e,a=n.readSync(i.dataId),o=n.readSync(s.dataId),l=n.readSync(r.dataId),[u,h]=Vet(a,i.shape,i.dtype,o,s.shape,l,r.shape);return[n.makeTensorInfo([u.length],"int32",u),n.makeTensorInfo([h.length],i.dtype,h)]}};const Qot={kernelName:vC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{shape:s,values:r,defaultValue:a,rowPartitionTensors:o}=e,{rowPartitionTypes:l}=i,u=n.readSync(s.dataId),h=n.readSync(r.dataId),p=n.readSync(a.dataId),c=o.map((t=>n.readSync(t.dataId))),d=o.map((t=>t.shape)),[f,m]=Uet(u,s.shape,h,r.shape,r.dtype,p,a.shape,c,d,l);return n.makeTensorInfo(f,r.dtype,m)}},Jot=t=>{const{backend:e,attrs:n}=t,{start:i,stop:s,step:r,dtype:a}=n,o=Yet(i,s,r,a);return e.makeTensorInfo([o.length],a,o)},Zot={kernelName:wC,backendName:"webgl",kernelFunc:Jot},tlt=tit({opSnippet:"return 1.0 / x;"}),elt={kernelName:xC,backendName:"webgl",kernelFunc:tlt},nlt=tit({opSnippet:_nt+"\n return (x < 0.0) ? 0.0 : x;\n",packedOpSnippet:"\n vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n"}),ilt={kernelName:RC,backendName:"webgl",kernelFunc:nlt},slt=tit({opSnippet:_nt+"\n return (x < 0.0) ? 0.0 : min(6.0, x);\n",packedOpSnippet:"\n vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n"}),rlt={kernelName:kC,backendName:"webgl",kernelFunc:slt}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class alt{constructor(t,e,n,i,s){this.variableNames=["A"],this.outputShape=[];const[r,a,o,l]=t;this.outputShape=[r,e,n,l];const u=[i&&e>1?a-1:a,i&&n>1?o-1:o],h=[i&&e>1?e-1:e,i&&n>1?n-1:n];let p;p=s?"(vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC - vec2(0.5)":"vec2(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n ${u[0]/h[0]},\n ${u[1]/h[1]});\n const vec2 inputShapeRC = vec2(${a}.0, ${o}.0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = ${p};\n\n // Compute the four integer indices.\n ivec2 sourceFloorRC = ivec2(max(sourceFracIndexRC, vec2(0.0)));\n ivec2 sourceCeilRC = ivec2(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);\n float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);\n float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);\n float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);\n\n vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);\n\n float top = topLeft + (topRight - topLeft) * fracRC.y;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n float newValue = top + (bottom - top) * fracRC.x;\n\n setOutput(newValue);\n }\n `}} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class olt{constructor(t,e,n,i,s){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];const[r,a,o,l]=t;this.outputShape=[r,e,n,l];const u=[i&&e>1?a-1:a,i&&n>1?o-1:o],h=[i&&e>1?e-1:e,i&&n>1?n-1:n];let p;p=s?"(vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC - vec3(0.5)":"vec3(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n const vec3 effectiveInputOverOutputRatioRC = vec3(\n ${u[0]/h[0]},\n ${u[1]/h[1]},\n ${u[1]/h[1]});\n const vec3 inputShapeRC = vec3(${a}.0, ${o}.0,\n ${o}.0);\n\n float getAValue(int b, int r, int c, int d) {\n return getChannel(getA(b, r, c, d), vec2(c, d));\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n // Calculate values for next column in yRC.z.\n ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n // Fractional source index.\n vec3 sourceFracIndexRC = ${p};\n\n // Compute the four integer indices.\n ivec3 sourceFloorRC = ivec3(max(sourceFracIndexRC, vec3(0.0)));\n ivec3 sourceCeilRC = ivec3(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n // Should we calculate next column and row elements in 2x2 packed cell.\n bool hasNextCol = d < ${l-1};\n bool hasNextRow = coords.z < ${n-1};\n\n // In parallel, construct four corners for all four components in\n // packed 2x2 cell.\n vec4 topLeft = vec4(\n getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 bottomLeft = vec4(\n getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 topRight = vec4(\n getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec4 bottomRight = vec4(\n getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);\n\n vec4 top = mix(topLeft, topRight, fracRC.yyzz);\n vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);\n vec4 newValue = mix(top, bottom, fracRC.x);\n\n setOutput(newValue);\n }\n `}}const llt={kernelName:CC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{images:s}=e,{alignCorners:r,halfPixelCenters:a,size:o}=i,[l,u]=o,h=aA().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new olt(s.shape,l,u,r,a):new alt(s.shape,l,u,r,a);return n.runWebGLProgram(h,[s],"float32")}}; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class ult{constructor(t,e,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=e;const[,i,s]=e,[,r,a]=t,o=[n&&r>1?i-1:i,n&&a>1?s-1:s],l=[n&&r>1?r-1:r,n&&a>1?a-1:a],u=o[0]/l[0],h=o[1]/l[1],p=1/u,c=1/h,d=2*Math.ceil(p)+2,f=2*Math.ceil(c)+2;this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float(${u});\n const float widthScale = float(${h});\n\n const float invHeightScale = float(${p});\n const float invWidthScale = float(${c});\n\n const int winHeight = int(${d});\n const int winWidth = int(${f});\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(startRLerp - float(winHeight / 2));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(startCLerp - float(winWidth / 2));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= ${r}) {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= ${a}) {\n continue;\n }\n\n float dxR = float(dyR) * heightScale;\n int topDxRIndex = int(floor(dxR));\n int bottomDxRIndex = int(min(ceil(dxR), ${i-1}.0));\n float dxRLerp = dxR - float(topDxRIndex);\n float inverseDxRLerp = 1.0 - dxRLerp;\n\n float dxC = float(dyC) * widthScale;\n int leftDxCIndex = int(floor(dxC));\n int rightDxCIndex = int(min(ceil(dxC), ${s-1}.0));\n float dxCLerp = dxC - float(leftDxCIndex);\n float inverseDxCLerp = 1.0 - dxCLerp;\n\n if (r == topDxRIndex && c == leftDxCIndex) {\n // topLeft\n accumulator +=\n getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;\n }\n\n if (r == topDxRIndex && c == rightDxCIndex) {\n // topRight\n accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;\n }\n\n if (r == bottomDxRIndex && c == leftDxCIndex) {\n // bottomLeft\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;\n }\n\n if (r == bottomDxRIndex && c == rightDxCIndex) {\n // bottomRight\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n `}}const hlt={kernelName:NC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{images:s,dy:r}=e,{alignCorners:a}=i,o=new ult(r.shape,s.shape,a);return n.runWebGLProgram(o,[r],r.dtype)}}; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class plt{constructor(t,e,n,i,s){this.variableNames=["A"],this.outputShape=[];const[r,a,o,l]=t;this.outputShape=[r,e,n,l];const u=[i&&e>1?a-1:a,i&&n>1?o-1:o],h=[i&&e>1?e-1:e,i&&n>1?n-1:n],p=i?"0.5":"0.0";let c;c=s?"max((vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC, vec2(0.0))":"vec2(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n ${u[0]/h[0]},\n ${u[1]/h[1]});\n const vec2 inputShapeRC = vec2(${a}.0, ${o}.0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = ${c};\n\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestRC = ivec2(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + ${p})));\n float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);\n\n setOutput(newValue);\n }\n `}} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class clt{constructor(t,e,n,i,s){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];const[r,a,o,l]=t;this.outputShape=[r,e,n,l];const u=[i&&e>1?a-1:a,i&&n>1?o-1:o],h=[i&&e>1?e-1:e,i&&n>1?n-1:n],p=i?"0.5":"0.0";let c;c=s?"max((vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC, vec3(0.0))":"vec3(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n const vec3 effectiveInputOverOutputRatioRC = vec3(\n ${u[0]/h[0]},\n ${u[1]/h[1]},\n ${u[1]/h[1]});\n const vec3 inputShapeRC = vec3(${a}.0, ${o}.0,\n ${o}.0);\n\n float getAValue(int b, int r, int c, int d) {\n return getChannel(getA(b, r, c, d), vec2(c, d));\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n // Calculate values for next column in yRC.z.\n ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n // Fractional source index.\n vec3 sourceFracIndexRC = ${c};\n\n // Compute the coordinators of nearest neighbor point.\n ivec3 sourceNearestRC = ivec3(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + ${p})));\n\n // Should we calculate next column and row elements in 2x2 packed cell.\n bool hasNextCol = d < ${l-1};\n bool hasNextRow = coords.z < ${n-1};\n\n vec4 newValue = vec4(\n getAValue(b, sourceNearestRC.x, sourceNearestRC.y, d),\n hasNextCol ? getAValue(b, sourceNearestRC.x, sourceNearestRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceNearestRC.x, sourceNearestRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceNearestRC.x, sourceNearestRC.z, d + 1) : 0.0);\n\n setOutput(newValue);\n }\n `}}const dlt={kernelName:AC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{images:s}=e,{alignCorners:r,halfPixelCenters:a,size:o}=i,[l,u]=o,h=aA().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new clt(s.shape,l,u,r,a):new plt(s.shape,l,u,r,a);return n.runWebGLProgram(h,[s],s.dtype)}}; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class flt{constructor(t,e,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=e;const[,i,s]=e,[,r,a]=t,o=[n&&r>1?i-1:i,n&&a>1?s-1:s],l=[n&&r>1?r-1:r,n&&a>1?a-1:a],u=o[0]/l[0],h=o[1]/l[1],p=1/u,c=1/h,d=2*Math.ceil(p)+2,f=2*Math.ceil(c)+2;this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float(${u});\n const float widthScale = float(${h});\n\n const float invHeightScale = float(${p});\n const float invWidthScale = float(${c});\n\n const int winHeight = int(${d});\n const int winWidth = int(${f});\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(floor(startRLerp - float(winHeight / 2)));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(floor(startCLerp - float(winWidth / 2)));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= ${r}) {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= ${a}) {\n continue;\n }\n\n float sourceFracRow =\n float(${o[0]}) *\n (float(dyR) / float(${l[0]}));\n\n float sourceFracCol =\n float(${o[1]}) *\n (float(dyC) / float(${l[1]}));\n\n int sourceNearestRow = int(min(\n float(int(${i}) - 1),\n ${n} ? float(round(sourceFracRow)) :\n float(floor(sourceFracRow))));\n\n int sourceNearestCol = int(min(\n float(int(${s}) - 1),\n ${n} ? float(round(sourceFracCol)) :\n float(floor(sourceFracCol))));\n\n if (r == sourceNearestRow && c == sourceNearestCol) {\n accumulator += getDy(b, dyR, dyC, d);\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n `}}const mlt={kernelName:MC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{images:s,dy:r}=e,{alignCorners:a}=i,o=new flt(r.shape,s.shape,a);return n.runWebGLProgram(o,[r],r.dtype)}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class glt{constructor(t,e){this.variableNames=["x"];const n=t.length;if(n>4)throw new Error(`WebGL backend: Reverse of rank-${n} tensor is not yet supported`);if(this.outputShape=t,1===n)return void(this.userCode=`\n void main() {\n int coord = getOutputCoords();\n setOutput(getX(${t[0]} - coord - 1));\n }\n `);const i=t.map(((n,i)=>(n=>-1!==e.indexOf(n)&&1!==t[n]?`${t[n]} - coords[${n}] - 1`:`coords[${n}]`)(i))).join(","),s=Ott(n);this.userCode=`\n void main() {\n ${s} coords = getOutputCoords();\n setOutput(getX(${i}));\n }\n `}} +/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class _lt{constructor(t,e){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0;const n=t.length;if(n>4)throw new Error(`WebGL backend: Reverse of rank-${n} tensor is not yet supported`);this.outputShape=t;const i=unt("rc",n),s=`${i[n-1]} + 1 < ${this.outputShape[n-1]}`,r=`${i[n-2]} + 1 < ${this.outputShape[n-2]}`,a=Ott(n);function o(n){const i=t.map(((i,s)=>function(n,i){return-1!==e.indexOf(n)&&1!==t[n]?`${t[n]} - ${i[n]} - 1`:`${i[n]}`}(s,n)));return`getChannel(getX(${i.join(",")}), vec2(${i.slice(-2).join(",")}))`}this.userCode=1===n?`\n void main(){\n int rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = getChannel(getX(${t[0]} - rc - 1),\n ${t[0]} - rc - 1);\n if(${s}){\n result.g = getChannel(getX(${t[0]} - (rc + 1) - 1),\n ${t[0]} - (rc + 1) - 1);\n }\n setOutput(result);\n }\n `:`\n void main() {\n ${a} rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = ${function(t){return o(t)}(i.slice())};\n if(${s}){\n result.g = ${function(t){return t[n-1]="("+t[n-1]+" + 1)",o(t)}(i.slice())};\n }\n if(${r}) {\n result.b = ${function(t){return t[n-2]="("+t[n-2]+" + 1)",o(t)}(i.slice())};\n if(${s}) {\n result.a = ${function(t){return t[n-1]="("+t[n-1]+" + 1)",t[n-2]="("+t[n-2]+" + 1)",o(t)}(i.slice())};\n }\n }\n setOutput(result);\n }\n `}}const Tlt={kernelName:DC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{dims:r}=i,a=s.shape.length,o=CO(r,s.shape);if(0===a)return Gnt({inputs:{x:s},backend:n});const l=aA().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new _lt(s.shape,o):new glt(s.shape,o);return n.runWebGLProgram(l,[s],s.dtype)}}; +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class ylt{constructor(t,e){this.variableNames=["Image"],this.outputShape=[],this.customUniforms=[{name:"params",type:"vec4"}];const n=t[1],i=t[2];this.outputShape=t;let s="";s="number"==typeof e?`float outputValue = ${e.toFixed(2)};`:`\n vec3 fill = vec3(${e.join(",")});\n float outputValue = fill[coords[3]];`,this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int x = coords[2];\n int y = coords[1];\n float coordXFloat = (float(x) - params[0]) * params[3] -\n (float(y) - params[1]) * params[2];\n float coordYFloat = (float(x) - params[0]) * params[2] +\n (float(y) - params[1]) * params[3];\n int coordX = int(round(coordXFloat + params[0]));\n int coordY = int(round(coordYFloat + params[1]));\n ${s}\n if(coordX >= 0 && coordX < ${i} && coordY >= 0 && coordY < ${n}) {\n outputValue = getImage(coords[0], coordY, coordX, coords[3]);\n }\n setOutput(outputValue);\n }\n `}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +const Ilt={kernelName:SN,backendName:"webgl",kernelFunc:({inputs:t,attrs:e,backend:n})=>{const{image:i}=t,{radians:s,fillValue:r,center:a}=e,o=n,l=new ylt(i.shape,r),[u,h]=mG(a,i.shape[1],i.shape[2]),p=[[u,h,Math.sin(s),Math.cos(s)]];return o.runWebGLProgram(l,[i],i.dtype,p)}},Elt=tit({opSnippet:"\n // OpenGL ES does not support round function.\n // The algorithm is based on banker's rounding.\n float base = floor(x);\n if ((x - base) < 0.5) {\n return floor(x);\n } else if ((x - base) > 0.5) {\n return ceil(x);\n } else {\n if (mod(base, 2.0) == 0.0) {\n return base;\n } else {\n return base + 1.0;\n }\n }\n"}),blt={kernelName:LC,backendName:"webgl",kernelFunc:Elt},vlt=tit({opSnippet:"return inversesqrt(x);",cpuKernelImpl:Get}),wlt={kernelName:FC,backendName:"webgl",kernelFunc:vlt}; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Slt{constructor(t,e,n,i,s,r,a=!0,o=!1){this.variableNames=["updates","indices","defaultValue"],this.outputShape=r;const l=Ott(s.length),u=Ott(r.length);let h="";1===n?h="i":2===n&&(h="i, j");const p=`getIndices(${h})`;let c="";1===i?c="i":2===i&&(c="i, coords[1]");const d=`getUpdates(${c})`;let f="";o&&(f="coords[0], coords[1]");const m=`getDefaultValue(${f})`,g=e>1?"strides[j]":"strides";this.userCode=`\n ${l} strides = ${l}(${s});\n\n void main() {\n ${u} coords = getOutputCoords();\n float sum = 0.0;\n bool found = false;\n for (int i = 0; i < ${t}; i++) {\n int flattenedIndex = 0;\n for (int j = 0; j < ${e}; j++) {\n int index = round(${p});\n flattenedIndex += index * ${g};\n }\n if (flattenedIndex == coords[0]) {\n sum += ${d};\n found = true;\n }\n }\n setOutput(mix(${m}, sum, float(found)));\n }\n `}} +/** + * @license + * Copyright 2023 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class xlt{constructor(t,e,n,i,s,r,a=!0,o=!1){this.variableNames=["updates","indices","defaultValue"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=r;const l=Ott(s.length),u=Ott(r.length);let h="";1===n?h="i":2===n&&(h="i, j");const p=`getIndices(${h})`;let c="";1===i?c="i":2===i&&(c="i, coords[1]");const d=`getUpdates(${c})`;let f="";o&&(f="coords[0], coords[1]");const m=`getDefaultValue(${f})`,g=e>1?"strides[j]":"strides",_=e>1?"strides[j + 1]":"strides";this.userCode=`\n ${l} strides = ${l}(${s});\n\n void main() {\n ${u} coords = getOutputCoords();\n vec4 sum = vec4(0.);\n vec4 found = vec4(0.);\n for (int i = 0; i < ${t}; i+=2) {\n ivec2 flattenedIndex = ivec2(0);\n for (int j = 0; j < ${e}; j+=2) {\n ivec4 index = round(${p});\n flattenedIndex += index.xz * ${g};\n if (j + 1 < ${e}) {\n flattenedIndex += index.yw * ${_};\n }\n }\n if (flattenedIndex[0] == coords[0] || flattenedIndex[1] == coords[0] ||\n flattenedIndex[0] == coords[0] + 1 || flattenedIndex[1] == coords[0] + 1) {\n vec4 updVals = ${d};\n if (flattenedIndex[0] == coords[0]) {\n sum.xy += updVals.xy;\n found.xy = vec2(1.);\n } else if (flattenedIndex[0] == coords[0] + 1) {\n sum.zw += updVals.xy;\n found.zw = vec2(1.);\n }\n if (flattenedIndex[1] == coords[0]) {\n sum.xy += updVals.zw;\n found.xy = vec2(1.);\n } else if (flattenedIndex[1] == coords[0] + 1) {\n sum.zw += updVals.zw;\n found.zw = vec2(1.);\n }\n }\n }\n setOutput(mix(${m}, sum, found));\n }\n `}}const Rlt={kernelName:PC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{indices:s,updates:r}=e,{shape:a}=i,{sliceRank:o,numUpdates:l,sliceSize:u,strides:h,outputSize:p}=hP(0,s,a),c=[p/u,u];if(0===p)return n.makeTensorInfo(a,s.dtype);const d=uit({inputs:{x:s},backend:n,attrs:{shape:[l,o]}}),f=uit({inputs:{x:r},backend:n,attrs:{shape:[l,u]}}),m=n.makeTensorInfo([],"float32",new Float32Array([0]));let g;g=aA().getBool("WEBGL_PACK")?new xlt(l,o,d.shape.length,f.shape.length,h,c):new Slt(l,o,d.shape.length,f.shape.length,h,c);const _=n.runWebGLProgram(g,[f,d,m],f.dtype),T=uit({inputs:{x:_},backend:n,attrs:{shape:a}});return n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(_),n.disposeIntermediateTensorInfo(m),T}}; +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Olt{constructor(t,e,n,i){this.variableNames=["sortedSequence","values"],this.customUniforms=[{name:"numInputs",type:"int"}],this.outputShape=[t,n];const s=`for (int i = 0; i < ${Math.ceil(Math.log2(e+1))}; ++i) { if (left >= right) break;`,r=2===aA().getNumber("WEBGL_VERSION")?"while (left < right) {":s,a="left"===i?"<":"<=";this.userCode=`\n int findBound(int batch, float value) {\n int left = 0;\n int right = numInputs;\n int mid;\n ${r}\n mid = (left + right) / 2;\n if (getSortedSequence(batch, mid) ${a} value) {\n left = mid + 1;\n } else {\n right = mid;\n }\n }\n return right;\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int valueIndex = coords[1];\n\n float value = getValues(batch, valueIndex);\n\n setOutput(float(findBound(batch, value)));\n }\n `}}const Alt={kernelName:BC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{sortedSequence:s,values:r}=e,{side:a}=i,o=new Olt(s.shape[0],s.shape[1],r.shape[1],a),l=[[s.shape[1]]];return n.runWebGLProgram(o,[s,r],"int32",l)}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Mlt{constructor(t,e,n){let i,s;if(this.variableNames=["c","a","b"],this.outputShape=e,n>4)throw Error(`Where for rank ${n} is not yet supported`);if(1===n)s="resRC",i="resRC";else{const n=["resRC.x","resRC.y","resRC.z","resRC.w"],r=[],a=[];for(let i=0;i= 1.0) {\n setOutput(getA(${s}));\n } else {\n setOutput(getB(${s}));\n }\n }\n `}}const Clt={kernelName:VC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{condition:i,t:s,e:r}=e,a=new Mlt(i.shape.length,s.shape,s.shape.length);return n.runWebGLProgram(a,[i,s,r],Lk(s.dtype,r.dtype))}},Nlt=tit({opSnippet:`\n // Stable and Attracting Fixed Point (0, 1) for Normalized Weights.\n // see: https://arxiv.org/abs/1706.02515\n float scaleAlpha = ${EG};\n float scale = ${bG};\n return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);\n`}),klt={kernelName:UC,backendName:"webgl",kernelFunc:Nlt},Dlt=tit({opSnippet:Znt+"\n return 1.0 / (1.0 + exp(-1.0 * x));\n",packedOpSnippet:"\n vec4 result = 1.0 / (1.0 + exp(-1.0 * x));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n",cpuKernelImpl:Wet}),Llt={kernelName:zC,backendName:"webgl",kernelFunc:Dlt},Flt=tit({opSnippet:"\n if (isnan(x)) { return 0.0; }\n return sign(x);\n"}),Plt={kernelName:WC,backendName:"webgl",kernelFunc:Flt},$lt=tit({opSnippet:Znt+"\n return sin(x);\n",packedOpSnippet:`\n vec4 result = sin(x);\n bvec4 isNaN = isnan(x);\n ${Unt}\n return result;\n`}),Blt={kernelName:GC,backendName:"webgl",kernelFunc:$lt},Vlt=tit({opSnippet:"\n float e2x = exp(x);\n return (e2x - 1.0 / e2x) / 2.0;\n"}),Ult={kernelName:HC,backendName:"webgl",kernelFunc:Vlt},Ylt=tit({opSnippet:"\n float epsilon = 1.1920928955078125e-7;\n float threshold = log(epsilon) + 2.0;\n\n bool too_large = x > -threshold;\n bool too_small = x < threshold;\n\n float result;\n float exp_x = exp(x);\n\n if (too_large){\n result = x;\n }\n else if (too_small){\n result = exp_x;\n }\n else{\n result = log(exp_x + 1.0);\n }\n return result;\n"}),Glt={kernelName:XC,backendName:"webgl",kernelFunc:Ylt},Hlt={kernelName:KC,backendName:"webgl",kernelFunc:t=>{const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{blockShape:r,paddings:a}=i;_O(s.shape.length<=4,(()=>"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet"));const o=r.reduce(((t,e)=>t*e)),l=[[0,0]];l.push(...a);for(let t=1+r.length;tn.disposeIntermediateTensorInfo(t))),g}};const Wlt={kernelName:ZC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{indices:i,values:s,denseShape:r,defaultValue:a}=e;if(1!==r.shape.length)throw new Error(`Dense shape must be a vector, saw:\n ${r.shape}`);if(2!==i.shape.length)throw new Error(`Indices must be a matrix, saw:\n ${i.shape}`);if(1!==s.shape.length)throw new Error(`Values must be a vector, saw:\n ${s.shape}`);if(0!==a.shape.length)throw new Error(`Default value must be a scalar, saw:\n ${a.shape}`);const o=n.readSync(i.dataId),l=n.readSync(s.dataId),u=n.readSync(r.dataId),h=n.readSync(a.dataId)[0],[p,c,d,f,m]=jet(o,i.shape,i.dtype,l,s.dtype,u,h);return[n.makeTensorInfo(c,i.dtype,p),n.makeTensorInfo([c[0]],s.dtype,d),n.makeTensorInfo([f.length],"bool",new Uint8Array(f.map((t=>Number(t))))),n.makeTensorInfo([m.length],i.dtype,new Int32Array(m))]}};const zlt={kernelName:tN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{inputIndices:i,inputShape:s,newShape:r}=e;if(2!==i.shape.length)throw new Error(`Input indices should be a matrix but received shape ${i.shape}`);if(1!==s.shape.length)throw new Error(`Input shape should be a vector but received shape ${s.shape}`);if(1!==r.shape.length)throw new Error(`Target shape should be a vector but received shape ${r.shape}`);const a=Array.from(n.readSync(s.dataId)),o=n.readSync(i.dataId),l=Array.from(n.readSync(r.dataId)),[u,h,p]=qet(o,i.shape,i.dtype,a,l);return[n.makeTensorInfo(h,i.dtype,u),n.makeTensorInfo([p.length],r.dtype,new Int32Array(p))]}};const Xlt={kernelName:eN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{data:i,indices:s,segmentIds:r}=e;if(i.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==s.shape.length)throw new Error(`Indices should be a vector but received shape\n ${s.shape}`);if(1!==r.shape.length)throw new Error(`Segment ids should be a vector but received shape\n ${r.shape}`);const a=n.readSync(i.dataId),o=n.readSync(s.dataId),l=n.readSync(r.dataId),[u,h]=Ket(a,i.shape,i.dtype,o,l,!0);return n.makeTensorInfo(h,i.dtype,u)}};const jlt={kernelName:nN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n}=t,{data:i,indices:s,segmentIds:r}=e;if(i.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==s.shape.length)throw new Error(`Indices should be a vector but received shape\n ${s.shape}`);if(1!==r.shape.length)throw new Error(`Segment ids should be a vector but received shape\n ${r.shape}`);const a=n.readSync(i.dataId),o=n.readSync(s.dataId),l=n.readSync(r.dataId),[u,h]=Ket(a,i.shape,i.dtype,o,l);return n.makeTensorInfo(h,i.dtype,u)}};const qlt={kernelName:iN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{sparseIndices:s,sparseValues:r,defaultValue:a}=e,{outputShape:o}=i,{sliceRank:l,numUpdates:u,sliceSize:h,strides:p,outputSize:c}=hP(0,s,o),d=!1;if("string"===r.dtype){const t=n.bufferSync(s),e=n.bufferSync(r),i=lk(n.readSync(a.dataId)[0]),f=Het(t,e,o,c,h,u,l,p,i,d);return n.makeTensorInfo(o,f.dtype,f.values)}const f=new Slt(u,l,s.shape.length,r.shape.length,p,[c,1],d),m=n.runWebGLProgram(f,[r,s,a],r.dtype),g=uit({inputs:{x:m},backend:n,attrs:{shape:o}});return n.disposeIntermediateTensorInfo(m),g}};const Klt={kernelName:QC,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{numOrSizeSplits:r,axis:a}=i,o=CO(a,s.shape)[0],l=XG(s,r,o),u=s.shape.length,h=new Array(u).fill(0),p=s.shape.slice();return l.map((t=>{const e=[...p];e[o]=t;const i=gst({inputs:{x:s},backend:n,attrs:{begin:h,size:e}});return h[o]+=t,i}))}},Qlt="return sqrt(x);",Jlt=tit({opSnippet:Qlt,packedOpSnippet:Qlt,cpuKernelImpl:Qet}),Zlt={kernelName:jC,backendName:"webgl",kernelFunc:Jlt},tut=tit({opSnippet:"return x * x;"}),eut={kernelName:rN,backendName:"webgl",kernelFunc:tut},nut="return (a - b) * (a - b);",iut=eit({opSnippet:nut,packedOpSnippet:nut}),sut={kernelName:sN,backendName:"webgl",kernelFunc:iut};const rut={kernelName:aN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2023 Google LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e;if("string"!==s.dtype)throw new Error("Input must be of datatype string");const r=uH(n.readSync(s.dataId)),a=Jet(r,"string",i);return n.makeTensorInfo(s.shape,"string",a)}};const aut={kernelName:vN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function({inputs:t,attrs:e,backend:n}){const{x:i}=t,s=_nt+`\n return x > 0.0 ? 1.0 : float(${e.alpha});\n `,r=new gnt(i.shape,s);return n.runWebGLProgram(r,[i],i.dtype)}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class out{constructor(t,e,n){this.variableNames=["x"],this.outputShape=n;const i=n.length,s=Ott(n.length),r=Ott(n.length);let a="";if(1===i)a="coords * strides + begin";else{let t=0;a=n.map(((e,i)=>(t++,1===n.length?`coords * strides[${i}] + begin[${i}]`:`coords[${t-1}] * strides[${i}] + begin[${i}]`))).join(",")}this.userCode=`\n ${s} begin = ${s}(${t});\n ${s} strides = ${s}(${e});\n\n void main() {\n ${r} coords = getOutputCoords();\n setOutput(getX(${a}));\n }\n `}}const lut={kernelName:oN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s}=e,{begin:r,end:a,strides:o,beginMask:l,endMask:u,ellipsisMask:h,newAxisMask:p,shrinkAxisMask:c}=i,{finalShapeSparse:d,finalShape:f,isIdentity:m,sliceDim0:g,isSimpleSlice:_,begin:T,end:y,strides:I}=OP(s.shape,r,a,o,l,u,h,p,c);let E;if(m)E=uit({inputs:{x:s},backend:n,attrs:{shape:f}});else if(g||_){_O(s.shape.length>=1,(()=>`Input must have rank at least 1, got: ${s.shape.length}`));const t=mP(T,y,I),e=gst({inputs:{x:s},backend:n,attrs:{begin:T,size:t}});E=uit({inputs:{x:e},backend:n,attrs:{shape:f}}),n.disposeIntermediateTensorInfo(e)}else{if(n.shouldExecuteOnCPU([s])){const t=n.readSync(s.dataId),e=FL(s.shape,s.dtype,t),i=Zet(d,e,I,T);E=n.makeTensorInfo(f,s.dtype,i.values)}else{const t=new out(T,I,d);E=n.runWebGLProgram(t,[s],s.dtype)}}const b=uit({inputs:{x:E},backend:n,attrs:{shape:f}});return n.disposeIntermediateTensorInfo(E),b}};const uut={kernelName:lN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{separator:s,nGramWidths:r,leftPad:a,rightPad:o,padWidth:l,preserveShortSequences:u}=i,{data:h,dataSplits:p}=e,c=n.readSync(h.dataId),d=n.readSync(p.dataId),[f,m]=tnt(c,d,s,r,a,o,l,u);return[n.makeTensorInfo([f.length],"string",f),n.makeTensorInfo(p.shape,"int32",m)]}};const hut={kernelName:uN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{skipEmpty:s}=i,{input:r,delimiter:a}=e;if("string"!==r.dtype)throw new Error("Input must be of datatype string");if(1!==r.shape.length)throw new Error(`Input must be a vector, got shape: ${r.shape}`);if(0!==a.shape.length)throw new Error(`Delimiter must be a scalar, got shape: ${a.shape}`);const o=n.readSync(r.dataId),l=n.readSync(a.dataId)[0],[u,h,p]=ent(o,l,s),c=h.length;return[n.makeTensorInfo([c,2],"int32",u),n.makeTensorInfo([c],"string",h),n.makeTensorInfo([2],"int32",new Int32Array(p))]}};const put={kernelName:hN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{numBuckets:s}=i,{input:r}=e;if("string"!==r.dtype)throw new Error("Input must be of datatype string");if(s<=0)throw new Error("Number of buckets must be at least 1");const a=n.readSync(r.dataId),o=nnt(a,s);return n.makeTensorInfo(r.shape,"int32",o)}},cut=tit({opSnippet:"return tan(x);"}),dut={kernelName:cN,backendName:"webgl",kernelFunc:cut},fut=tit({opSnippet:"\n float e2x = exp(-2.0 * abs(x));\n return sign(x) * (1.0 - e2x) / (1.0 + e2x);\n"}),mut={kernelName:dN,backendName:"webgl",kernelFunc:fut};const gut={kernelName:$C,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2022 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{tensor:s,indices:r,updates:a}=e,{}=i,{sliceRank:o,numUpdates:l,sliceSize:u,strides:h,outputSize:p}=hP(0,r,s.shape),c=[p/u,u];if(0===p)return n.makeTensorInfo(s.shape,r.dtype);const d=uit({inputs:{x:r},backend:n,attrs:{shape:[l,o]}}),f=uit({inputs:{x:a},backend:n,attrs:{shape:[l,u]}}),m=uit({inputs:{x:s},backend:n,attrs:{shape:c}}),g=new Slt(l,o,d.shape.length,f.shape.length,h,c,!1,!0),_=n.runWebGLProgram(g,[f,d,m],m.dtype),T=uit({inputs:{x:_},backend:n,attrs:{shape:s.shape}});return n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(_),T}}; +/** + * @license + * Copyright 2017 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class _ut{constructor(t,e){this.variableNames=["A"];const n=new Array(t.length);for(let i=0;i5)throw Error(`Tile for rank ${e} is not yet supported`);if(1===e)return`imod(resRC, ${t[0]})`;const n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],i=[];for(let e=0;e5){const t=n.readSync(s.dataId),e="string"===s.dtype?t.map((t=>lk(t))):t,i=FL(s.shape,s.dtype,e),a=snt(i,r);return n.makeTensorInfo(a.shape,a.dtype,a.values)}const a=new _ut(s.shape,r);return n.runWebGLProgram(a,[s],s.dtype)}const yut={kernelName:fN,backendName:"webgl",kernelFunc:Tut};class Iut{constructor(t){this.variableNames=["x","indices"],this.customUniforms=[{name:"n",type:"int"},{name:"firstPass",type:"int"},{name:"negativeInf",type:"float"},{name:"dir",type:"int"},{name:"inc",type:"int"}],this.outputShape=t,this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int elemIdx = coords[1];\n\n // We compare elements pair-wise within a group of size 2 * inc.\n // The comparing rule for each group alternates between ascending\n // and descending. Within each group, we compare each pair at\n // positions i and i+inc. To decide whether an element at position i\n // is x0 or x1, we mod it by 2 * inc, if the result is smaller than\n // inc, it is in the first half of the group, we denote it as x0,\n // otherwise we denote it as x1.\n // For example, as shown in the Bitonic top K paper referenced above,\n // Figure5(a) shows that element[1] is in the\n // second half of the group when group size is 2, but it is in the\n // first half of the group when group size is 4.\n\n bool isFirstInPair = imod(elemIdx, 2 * inc) < inc;\n int i = isFirstInPair ? elemIdx : elemIdx - inc;\n\n int i0 = firstPass == 1 ? i : int(getIndices(batch, i));\n int i1 = firstPass == 1 ? i + inc : int(getIndices(batch, i + inc));\n float x0 = i0 < n ? getX(batch, i0) : negativeInf;\n float x1 = i1 < n ? getX(batch, i1) : negativeInf;\n\n // Denotes which direction indices are in (ascending or descending).\n bool reverse = imod(elemIdx, 2 * dir) >= dir;\n bool isGreater = x0 > x1 || (x0 == x1 && i1 > i0);\n if (reverse == isGreater) { // Elements in opposite order of direction\n int iTemp = i0;\n i0 = i1;\n i1 = iTemp;\n }\n if (isFirstInPair) {\n setOutput(float(i0));\n } else {\n setOutput(float(i1));\n }\n }\n "}}class Eut{constructor(t){this.variableNames=["x","indices"],this.customUniforms=[{name:"n",type:"int"},{name:"firstPass",type:"int"},{name:"k",type:"int"}],this.outputShape=t,this.userCode="\n void main() {\n // Takes max of indices (0, k), (1, k + 1), (2, k + 2) ...\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int elemIdx = coords[1];\n\n // The output size is half of the previous size.\n // If the previous sequence is | | | | _ _ _ _ | | | | _ _ _ _ (k=4),\n // we only need to output the indices at positions |, the indices at\n // positions _ can be thrown away, see Figure5(b) After Phase 2\n // (Merge phase) in the Bitonic Top K paper referenced above.\n // For example, the paper shows we only need to output the orange bars.\n // The output sequence should look like this | | | | | | | |.\n // Because the sequence is halved, to map the output index back\n // to the previous sequence to find the corresponding value,\n // we need to double the index. When we double the index,\n // we basically interpolate a position, so 2i looks like\n // | _ | _ | _ | _ | _ | _ | _. We move the | to the first k position\n // of each 2k positions by - elemIdx % k. E.g. for output at\n // index 4,5,6,7, we want to get the corresponding element at\n // original index 8,9,10,11, for output at index 8,9,10,11,\n // we want to get the corresponding element at original index\n // 16,17,18,19, so on and so forth.\n\n int i = elemIdx < k ? elemIdx : (elemIdx * 2 - imod(elemIdx, k));\n int i0 = firstPass == 1 ? i : int(getIndices(batch, i));\n int i1 = firstPass == 1 ? i + k : int(getIndices(batch, i + k));\n\n float x0 = getX(batch, i0);\n float x1 = i1 < n ? getX(batch, i1) : x0;\n\n setOutput(x0 >= x1 ? float(i0) : float(i1));\n }\n "}} +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function but(t,e){null!==e&&t.disposeIntermediateTensorInfo(e)}function vut(t){let e=1;for(;el){const t=n.readSync(s.dataId),[e,i]=rnt(t,u,s.dtype,r,a);return[n.makeTensorInfo(e.shape,e.dtype,e.values),n.makeTensorInfo(i.shape,i.dtype,i.values)]}if(0===r)return u[u.length-1]=0,[n.makeTensorInfo(u,s.dtype,[]),n.makeTensorInfo(u,"int32",[])];if(1===h)return[s,eat({attrs:{shape:u,dtype:"int32",value:0},backend:n})];const p=n.texData.get(s.dataId),c=null!==p&&p.isPacked,d=c?n.unpackTensor(s):s,f=IO(u)/h,m=uit({inputs:{x:d},attrs:{shape:[f,h]},backend:n});c&&but(n,d);const g=vut(r),_=vut(h);let T=null;const y=()=>null===T?[m,m]:[m,T],I=(t,e,i)=>{const s=y(),r=new Iut(i),a=[[h],[null===T?1:0],[Number.NEGATIVE_INFINITY],[t],[e]],o=T;T=n.runWebGLProgram(r,s,"int32",a),but(n,o)};for(let t=1;t=1;n/=2)I(e,n,[f,_])}for(let t=_;t>g;t/=2){const e=y(),i=new Eut([f,t/2]),s=[[h],[null===T?1:0],[g]],r=T;T=n.runWebGLProgram(i,e,"int32",s),but(n,r);const a=g/2,o=2*a;for(let t=a;t>=1;t/=2)I(o,t,T.shape)}let E=T;T=gst({inputs:{x:T},backend:n,attrs:{begin:0,size:[f,r]}}),but(n,E);let b=Iat({inputs:{x:m,indices:T},backend:n,attrs:{axis:1,batchDims:1}});but(n,m);const v=u.slice(0,-1);v.push(r),E=T,T=uit({inputs:{x:T},attrs:{shape:v},backend:n}),but(n,E);const w=b;return b=uit({inputs:{x:b},attrs:{shape:v},backend:n}),but(n,w),[b,T]}}; +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Sut{constructor(t,e,n,i,s,r){this.variableNames=["Image","Transforms"],this.outputShape=r;const a="nearest"===n?1:2;let o;switch(i){case"constant":default:o=1;break;case"reflect":o=2;break;case"wrap":o=3;break;case"nearest":o=4}this.userCode=`\n float mapCoord(float outCoord, float len) {\n float inCoord = outCoord;\n if(${o} == 2) {\n if (inCoord < 0.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz2 = 2.0 * len;\n if (inCoord < sz2) {\n inCoord = sz2 * float(int(float(-inCoord / sz2))) +\n inCoord;\n }\n inCoord = inCoord < -len ? inCoord + sz2 : -inCoord - 1.0;\n }\n } else if (inCoord > len - 1.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz2 = 2.0 * len;\n inCoord -= sz2 * float(int(float(inCoord / sz2)));\n if (inCoord >= len) {\n inCoord = sz2 - inCoord - 1.0;\n }\n }\n }\n return clamp(inCoord, 0.0, len - 1.0);\n } else if (${o} == 3) {\n if (inCoord < 0.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz = len - 1.0;\n inCoord += len * (float(int(float(-inCoord / sz))) + 1.0);\n }\n } else if (inCoord > len - 1.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz = len - 1.0;\n inCoord -= len * float(int(float(inCoord / sz)));\n }\n }\n return clamp(inCoord, 0.0, len - 1.0);\n } else if (${o} == 4) {\n return clamp(outCoord, 0.0, len - 1.0);\n } else {\n return outCoord;\n }\n }\n\n float readWithFillValue(int batch, int coordY, int coordX,\n int channel) {\n float outputValue;\n if (0 <= coordY && coordY < ${t} && 0 <= coordX && coordX < ${e}) {\n outputValue = getImage(batch, coordY, coordX, channel);\n } else {\n outputValue = float(${s});\n }\n return outputValue;\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n float outputValue;\n int batch = coords[0];\n int x = coords[2];\n int y = coords[1];\n int channel = coords[3];\n float xf = float(x);\n float yf = float(y);\n float a1 = getTransforms(batch, 0);\n float a2 = getTransforms(batch, 1);\n float a3 = getTransforms(batch, 2);\n float b1 = getTransforms(batch, 3);\n float b2 = getTransforms(batch, 4);\n float b3 = getTransforms(batch, 5);\n float c1 = getTransforms(batch, 6);\n float c2 = getTransforms(batch, 7);\n float projection = c1 * xf + c2 * yf + 1.0;\n if (projection == 0.0) {\n outputValue = float(${s});\n } else {\n float inX = (a1 * xf + a2 * yf + a3) / projection;\n float inY = (b1 * xf + b2 * yf + b3) / projection;\n float mapX = mapCoord(inX, float(${e}));\n float mapY = mapCoord(inY, float(${t}));\n\n if (${a} == 1) {\n int coordY = int(round(mapY));\n int coordX = int(round(mapX));\n outputValue = readWithFillValue(batch, coordY, coordX,\n channel);\n } else {\n float yFloor = floor(mapY);\n float xFloor = floor(mapX);\n float yCeil = yFloor + 1.0;\n float xCeil = xFloor + 1.0;\n float valueYFloor = (xCeil - mapX) *\n readWithFillValue(batch, int(yFloor), int(xFloor), channel) +\n (mapX - xFloor) *\n readWithFillValue(batch, int(yFloor), int(xCeil), channel);\n float valueYCeil = (xCeil - mapX) *\n readWithFillValue(batch, int(yCeil), int(xFloor), channel) +\n (mapX - xFloor) *\n readWithFillValue(batch, int(yCeil), int(xCeil), channel);\n outputValue = (yCeil - mapY) * valueYFloor +\n (mapY - yFloor) * valueYCeil;\n }\n }\n setOutput(outputValue);\n }\n `}}const xut={kernelName:gN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2021 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{image:s,transforms:r}=e,{interpolation:a,fillMode:o,fillValue:l,outputShape:u}=i,[h,p,c,d]=s.shape,[f,m]=null!=u?u:[p,c],g=new Sut(p,c,a,o,l,[h,f,m,d]);return n.runWebGLProgram(g,[s,r],"float32")}};const Rut={kernelName:TN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,attrs:n,backend:i}=t,{axis:s}=n,{x:r}=e;utt(r,"unique"),console.warn("WARNING: ","UI might be locked temporarily as data is being downloaded");const a=i.readSync(r.dataId),{outputValues:o,outputShape:l,indices:u}=ont(a,s,r.shape,r.dtype);return[i.makeTensorInfo(l,r.dtype,o),i.makeTensorInfo([u.length],"int32",u)]}};const Out={kernelName:yN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{value:s}=e;let{axis:r}=i;r<0&&(r+=s.shape.length);const a=s,o=a.shape.length,l=s.shape[r],u=new Array(o-1);let h=0;for(let t=0;tn.disposeIntermediateTensorInfo(t))),f}}; +/** + * @license + * Copyright 2018 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +class Aut{constructor(t,e){this.variableNames=["x","segmentIds"];const n=t.windowSize,i=t.batchSize,s=t.inSize,r=t.numSegments,a=r*Math.ceil(s/n);this.outputShape=[i,a];const o=4*Math.floor(n/4),l=n%4,u="\n sumValue += dot(values, segFilter);\n ";let h="";s%n>0&&(h=`\n if (inIdx < 0 || inIdx >= ${s}) {\n return initializationValue;\n }\n `);let p="";s%n>0&&(p=`\n if (inIdx < 0 || inIdx >= ${s}) {\n return -1.0;\n }\n `),this.userCode=`\n const float initializationValue = 0.0;\n\n float getValue(int batch, int inIdx) {\n ${h}\n return getX(batch, inIdx);\n }\n\n float getSegmentIdAtIndex(int inIdx) {\n ${p}\n return getSegmentIds(inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = int(floor(float(outIdx) / float(\n ${r})) * float(${n}));\n int currentSeg = int(mod(float(outIdx), float(${r})));\n\n float sumValue = 0.0;\n\n for (int i = 0; i < ${o}; i += 4) {\n int inIdx = inOffset + i;\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0\n );\n\n ${u}\n }\n\n int inIdx = inOffset + ${o};\n if (${1===l}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n int inIdxSeg = int(getSegmentIdAtIndex(inIdx));\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n 0,\n 0,\n 0\n );\n\n ${u}\n } else if (${2===l}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n 0,\n 0\n );\n\n ${u}\n } else if (${3===l}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n 0\n );\n\n ${u}\n }\n setOutput(sumValue);\n }\n `}}const Mut={kernelName:IN,backendName:"webgl",kernelFunc: +/** + * @license + * Copyright 2020 Google LLC. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================= + */ +function(t){const{inputs:e,backend:n,attrs:i}=t,{x:s,segmentIds:r}=e,{numSegments:a}=i,o=s.shape.length,l=[];let u=0;const h=_B([u],o);let p=s;null!=h&&(p=yit({inputs:{x:s},backend:n,attrs:{perm:h}}),l.push(p),u=yB(1,o)[0]);const c=oH(p.shape,u,a),d=IO([p.shape[u]]),f=uit({inputs:{x:p},backend:n,attrs:{shape:[-1,d]}});l.push(f);const m=Fk(s.dtype),g=(t,e,i,s,r)=>{const a=t.shape[0],o=t.shape[1],u=aH(o,r),h=new Aut({windowSize:u,inSize:o,batchSize:a,numSegments:r},e),p=n.compileAndRun(h,[t,i],s);if(l.push(p),p.shape[1]===r)return p;const c=Jot({backend:n,attrs:{start:0,stop:r,step:1,dtype:"float32"}}),d=Tut({inputs:{x:c},backend:n,attrs:{reps:[o/u]}});l.push(c),l.push(d);return g(p,e,d,s,r)},_=uit({inputs:{x:g(f,"unsortedSegmentSum",r,m,a)},backend:n,attrs:{shape:c}});let T=_;if(null!=h){l.push(_);const t=TB(h);T=yit({inputs:{x:T},backend:n,attrs:{perm:t}})}return l.forEach((t=>n.disposeIntermediateTensorInfo(t))),T}},Cut=[vit,Sit,Rit,Ait,Nit,Lit,Fit,Pit,Git,Hit,zit,jit,Kit,Jit,tst,ist,sst,ost,lst,ust,cst,Tst,yst,Ist,Est,Rst,Mst,kst,znt,Fst,Hst,Jst,irt,rrt,art,ort,lrt,hrt,crt,frt,Irt,Ert,brt,wrt,Rrt,Mrt,Crt,krt,Lrt,Frt,$rt,Brt,Urt,Grt,Wrt,Xrt,Krt,Zrt,nat,sat,oat,uat,cat,mat,gat,Tat,Eat,vat,Sat,Hnt,xat,Ust,Oat,Mat,Nat,qnt,Dat,Fat,Pat,Bat,Uat,Gat,Wat,Xat,Kat,Jat,tot,not,iot,sot,oot,lot,uot,hot,pot,dot,got,Tot,Rot,lit,Aot,Cot,kot,Lot,vst,Pot,Vot,Uot,Wot,Xot,Jnt,jot,qot,Kot,Qot,Zot,Sst,Eot,elt,ilt,rlt,hit,llt,hlt,dlt,mlt,Tlt,Ilt,blt,wlt,Rlt,Alt,Clt,klt,Llt,Plt,Blt,Ult,_st,xot,Glt,Hlt,Wlt,zlt,Xlt,jlt,qlt,Klt,Zlt,eut,sut,rut,aut,lut,uut,hut,put,wot,Tit,dut,mut,gut,yut,wut,xut,Iit,Rut,Out,Mut,Bot];for(const t of Cut)FN(t); +/** @license See the LICENSE file. */ +const Nut={"tfjs-core":HP,"tfjs-backend-cpu":q4,"tfjs-backend-webgl":Fnt,"tfjs-data":y2,"tfjs-layers":tq,"tfjs-converter":u1,tfjs:"4.22.0"},kut=new Zt.Registry,Dut=function(t){let e={ok:!1,buffer:null,json:function(){const t=new TextDecoder("utf-8").decode(this.buffer);return JSON.parse(t)},arrayBuffer:function(){return this.buffer}};return kut.hasKey(t)?(e.ok=!0,e.buffer=kut.getItem(t),e):e},Lut={modelsValue:{},loadGraphModel:async function(t){return await o1(t,{fromTFHub:!1,fetchFunc:(...t)=>Dut(t[0])})},loadLayersModel:async function(t){return await vq(t,{fromTFHub:!1,fetchFunc:(...t)=>Dut(t[0])})},setModelsValue:function(t,e){kut.hasKey(t)&&kut.unregister(t),kut.register(t,e),Lut.modelsValue[t]=e}};window.tensorflow=Lut,rO.init(),window.tf=Qt,Object.assign(Jt.Variables,ee),Object.assign(Jt.Procedures,dh),Jt.Python=fh,Jt.generator=fh,Zt.Profile.default={},Object.assign(Jt.Blocks,t,e,n,i,s,r,a,o,l,u,h,p,c,x,R,O,A,M,C,N,k,D,L,F,P,B,V,U),Object.assign(Jt.Python.forBlock,d,f,m,g,_,T,y,I,E,b,v,w,S,Y,G,H,mT,W,z,X,j,q,K,Q,J,Z,tt,et)})()})(); \ No newline at end of file diff --git a/boards/default/python_skulpt/index.xml b/boards/default/python_skulpt/index.xml index 182dc724..0c8ede34 100644 --- a/boards/default/python_skulpt/index.xml +++ b/boards/default/python_skulpt/index.xml @@ -1 +1 @@ -promptHelloHelloHello,HelloMixly2100,1,2,3051iDIVIDE10Exception as ee90x151100a10.998124.821100101010001100501100110000x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')dirmylist1,2,3,4,5mylist0mylist02mylist00mylist0101mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xmixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodtopicmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012tina20tina90tina0tina2020tina50tinatinatinatina5tinatina5tina50tina50360tinatinatinaMixly!tinaMixly!Arial8tina#ff0000#FF0000tina#ff0000#FF0000tinatinascreenkeyfuncUpkeyfunctina100tina90screenclickfuncclickfunctinax20y20screentimerfunc3000timerfunctina100tina90screenx1.55.50.50,1,2,3x1,2,3,45,6,7,81,2,3,45,6,7,820,20,20,20tag1,2,3,45,6,7,8tag1,2,3,45,6,7,80.5tag11,21,31,41,51,61,71,81,910,20,40,60,80,100TitleaxisABABC \ No newline at end of file +promptHelloHelloHello,HelloMixly2100,1,2,3051iDIVIDE10Exception as ee90x151100a10.998124.821100101010001100501100110000x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')dirmylist1,2,3,4,5mylist0mylist02mylist00mylist0101mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2xmixio.mixly.cnmixio.mixly.cnA1B2C3mixio.mixly.cnusernamepasswordMyProjecttopicmsgtopicmethodtopicmethodEQmsg1content"long""lat""message"012content"key1""key2""key3"012tina20tina90tina0tina2020tina50tinatinatinatina5tinatina5tina50tina50360tinatinatinaMixly!tinaMixly!Arial8tina#ff0000#FF0000tina#ff0000#FF0000tinatinascreenkeyfuncUpkeyfunctina100tina90screenclickfuncclickfunctinax20y20screentimerfunc3000timerfunctina100tina90screenx1.55.50.50,1,2,3x1,2,3,45,6,7,81,2,3,45,6,7,820,20,20,20tag1,2,3,45,6,7,8tag1,2,3,45,6,7,80.5tag11,21,31,41,51,61,71,81,910,20,40,60,80,100TitleaxisABABC \ No newline at end of file diff --git a/boards/default/python_skulpt/main.bundle.f7dd8043.js b/boards/default/python_skulpt/main.bundle.04680b15.js similarity index 78% rename from boards/default/python_skulpt/main.bundle.f7dd8043.js rename to boards/default/python_skulpt/main.bundle.04680b15.js index fc061287..9496fd5d 100644 --- a/boards/default/python_skulpt/main.bundle.f7dd8043.js +++ b/boards/default/python_skulpt/main.bundle.04680b15.js @@ -18,4 +18,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -class z{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var n=t.split(","),i=0;i0?e.join("\n")+n.join("\n")+i.join("\n")+o.join("\n")+a.join("")+t+"while True:\n"+l.join("")+u.join("\n"):e.join("\n")+n.join("\n")+i.join("\n")+o.join("\n")+a.join("")+t+u.join("\n")},J.scrubNakedValue=function(t){return t+"\n"},J.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},J.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},J.scrub_=function(t,e,n){var i="";if(!t.outputConnection||!t.outputConnection.targetConnection){(r=t.getCommentText())&&(r=Y.utils.string.wrap(r,J.COMMENT_WRAP-3),i+=J.prefixLines(r+"\n","# "));for(var s=0;s0?"int("+a+" + "+s+")":s<0?"int("+a+" - "+-s+")":"int("+a+")",i&&(a="-"+a)),a};const K=330,Q={init:function(){this.setColour(K),this.appendDummyInput().appendField(new Y.FieldTextInput(""),"VAR"),this.setOutput(!0),this.setTooltip(Y.Msg.VARIABLES_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){W.equals(t,this.getFieldValue("VAR"))&&this.setFieldValue(e,"VAR")}},Z={init:function(){this.setColour(K),this.appendValueInput("VALUE").appendField(new Y.FieldTextInput(""),"VAR").appendField(Y.Msg.MIXLY_VALUE2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.VARIABLES_SET_TOOLTIP)},getVars:function(){var t=this.getFieldValue("VAR");return null==t?[]:t.split(",")},renameVar:function(t,e){W.equals(t,this.getFieldValue("VAR"))&&this.setFieldValue(e,"VAR")}},tt={init:function(){this.setColour(K);var t=[[Y.Msg.LANG_MATH_INT,"int"],[Y.Msg.LANG_MATH_FLOAT,"float"],[Y.Msg.LANG_MATH_BOOLEAN,"bool"],[Y.Msg.LANG_MATH_STRING,"str"],[Y.Msg.MIXLY_MICROBIT_TYPE_LIST,"list"],[Y.Msg.MIXLY_MICROBIT_TYPE_TUPLE,"tuple"],[Y.Msg.MIXLY_MICROBIT_TYPE_DICT,"dict"],[Y.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,"set"],[Y.Msg.LANG_MATH_BYTE,"bytes"]];this.appendValueInput("MYVALUE").appendField(new Y.FieldDropdown(t),"OP"),this.setOutput(!0)}},et={init:function(){this.setColour(K),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_PYTHON_GLOBAL).setCheck("var"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Y.Msg.TEXT_PRINT_TOOLTIP)}},nt={init:function(){this.setColour(K),this.appendValueInput("DATA").appendField(Y.Msg.MICROBIT_PYTHON_TYPE),this.setOutput(!0),this.setTooltip(Y.Msg.MICROBIT_PYTHON_TYPE)}},it={init:function(){this.setColour(K),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_CONTORL_GET_TYPE).appendField(new Y.FieldDropdown([[Y.Msg.LANG_MATH_INT,"int"],[Y.Msg.MIXLY_MICROBIT_TYPE_FLOAT,"float"],[Y.Msg.MIXLY_MICROBIT_TYPE_STRING,"str"],[Y.Msg.MIXLY_MICROBIT_TYPE_LIST,"list"],[Y.Msg.MIXLY_MICROBIT_TYPE_TUPLE,"tuple"],[Y.Msg.MIXLY_MICROBIT_TYPE_DICT,"dict"],[Y.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,"set"],[Y.Msg.LANG_MATH_BYTE,"bytes"],[Y.Msg.LOGIC_NULL,"type(None)"]]),"type"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("type");return Y.Msg.MICROBIT_controls_TypeLists+{int:Y.Msg.LANG_MATH_INT,float:Y.Msg.MIXLY_MICROBIT_TYPE_FLOAT,str:Y.Msg.MIXLY_MICROBIT_TYPE_STRING,list:Y.Msg.MIXLY_MICROBIT_TYPE_LIST,tuple:Y.Msg.MIXLY_MICROBIT_TYPE_TUPLE,dict:Y.Msg.MIXLY_MICROBIT_TYPE_DICT,set:Y.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,image:Y.Msg.MIXLY_MICROBIT_IMAGE,bytes:Y.Msg.LANG_MATH_BYTE,NoneType:Y.Msg.LOGIC_NULL}[e]}))}},st={init:function(){this.setColour(K),this.itemCount_=2,this.updateShape_(),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setMutator(new Y.icons.MutatorIcon(["lists_zip_item"],this)),this.setTooltip(Y.Msg.MIXLY_PYTHON_LISTS_ZIP_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_zip_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;i0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?n[s]=e.getInputTargetBlock("IF"+s).previousConnection:n[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?i[s]=e.getInputTargetBlock("DO"+s).previousConnection:i[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Y.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Y.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Y.Msg.CONTROLS_IF_MSG_ELSE);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"IF"+s);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var n=e.getInput("STACK").connection,i=1;i<=this.elseifCount_;i++){var s=t.newBlock("controls_if_elseif");s.initSvg(),n.connect(s.previousConnection),n=s.nextConnection}if(this.elseCount_){var r=t.newBlock("controls_if_else");r.initSvg(),n.connect(r.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var n=t.getInputTargetBlock("STACK"),i=[null],s=[null],r=null;n;){switch(n.type){case"controls_if_elseif":this.elseifCount_++,i.push(n.valueConnection_),s.push(n.statementConnection_);break;case"controls_if_else":this.elseCount_++,r=n.statementConnection_;break;default:throw Error("Unknown block type: "+n.type)}n=n.nextConnection&&n.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(i,s,r)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),n=1;e;){switch(e.type){case"controls_if_elseif":var i=this.getInput("IF"+n),s=this.getInput("DO"+n);e.valueConnection_=i&&i.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,n++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],n=null;this.getInput("ELSE")&&(n=this.getInput("ELSE").connection.targetConnection);for(var i=1;this.getInput("IF"+i);){var s=this.getInput("IF"+i),r=this.getInput("DO"+i);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(r.connection.targetConnection),i++}this.updateShape_(),this.reconnectChildBlocks_(t,e,n)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Y.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(Y.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Y.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,n){for(var i=1;i<=this.elseifCount_;i++)t[i]&&t[i].reconnect(this,"IF"+i),e[i]&&e[i].reconnect(this,"DO"+i);n&&n.reconnect(this,"ELSE")}},dt={init:function(){this.setColour(lt),this.appendValueInput("FROM").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.PYTHON_RANGE).appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},ft={init:function(){this.setColour(lt),this.appendValueInput("LIST").setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Y.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Y.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Y.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Y.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},mt={init:function(){this.setColour(lt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Y.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Y.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Y.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Y.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Y.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Y.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},gt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Y.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Y.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Y.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,n=[],i=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?n[s]=e.getInputTargetBlock("IF"+s).previousConnection:n[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?i[s]=e.getInputTargetBlock("DO"+s).previousConnection:i[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Y.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Y.Msg.MIXLY_PYTHON_FINALLY);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"IF"+s);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var n=e.getInput("STACK").connection,i=1;i<=this.elseifCount_;i++){var s=t.newBlock("controls_except");s.initSvg(),n.connect(s.previousConnection),n=s.nextConnection}if(this.elseCount_){var r=t.newBlock("controls_finally");r.initSvg(),n.connect(r.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var n=t.getInputTargetBlock("STACK"),i=[null],s=[null],r=null;n;){switch(n.type){case"controls_except":this.elseifCount_++,i.push(n.valueConnection_),s.push(n.statementConnection_);break;case"controls_finally":this.elseCount_++,r=n.statementConnection_;break;default:throw Error("Unknown block type: "+n.type)}n=n.nextConnection&&n.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(i,s,r)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),n=1;e;){switch(e.type){case"controls_except":var i=this.getInput("IF"+n),s=this.getInput("DO"+n);e.valueConnection_=i&&i.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,n++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],n=null;this.getInput("ELSE")&&(n=this.getInput("ELSE").connection.targetConnection);for(var i=1;this.getInput("IF"+i);){var s=this.getInput("IF"+i),r=this.getInput("DO"+i);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(r.connection.targetConnection),i++}this.updateShape_(),this.reconnectChildBlocks_(t,e,n)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Y.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Y.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,n){for(var i=1;i<=this.elseifCount_;i++)t[i]&&t[i].reconnect(this,"IF"+i),e[i]&&e[i].reconnect(this,"DO"+i);n&&n.reconnect(this,"ELSE")}},bt={init:function(){this.setColour(lt);var t=new Y.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Y.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Y.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Y.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Y.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},St={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Y.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Y.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Y.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Y.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},kt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Y.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Y.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Y.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Y.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};mt.OPERATORS=[[Y.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Y.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],bt.OPERATORS=[[Y.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Y.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Tt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Y.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},yt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},vt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Y.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},$t={init:function(){this.setColour(lt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},wt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Y.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Et={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Y.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},It={init:function(){this.jsonInit({message0:Y.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:lt,tooltip:Y.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Y.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},At={init:function(){this.setColour(lt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Y.Msg.MIXLY_STAT),this.setOutput(!0)}},Ot={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},Mt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Y.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},Ct={init:function(){this.appendDummyInput().appendField(Y.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Y.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Y.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Y.FieldDropdown([[Y.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Y.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(lt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},Rt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},xt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},Nt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},Lt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_GET+Y.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Y.Msg.PROCEDURES_DEFRETURN_RETURN+Y.Msg.MIXLY_GET_UNIQUE_IDEN)}},Dt={init:function(){this.setColour(lt),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Y.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},Ft={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},Pt=230;Y.FieldTextInput.math_number_validator=function(t){return String(t)},Y.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const Bt={init:function(){this.setColour(Pt),this.appendDummyInput().appendField(new Y.FieldTextInput("0",Y.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MATH_NUMBER_TOOLTIP)}},Vt={init:function(){this.setColour(Pt);this.appendDummyInput("").appendField(Y.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Y.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Y.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Y.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Ut={init:function(){this.setColour(Pt);this.appendDummyInput("").appendField(Y.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Y.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Y.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Y.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Yt={init:function(){this.setColour(Pt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Y.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Y.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Y.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Y.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Y.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Y.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Y.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Y.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},jt={init:function(){this.setColour(Pt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Y.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Y.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Y.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Y.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Y.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Y.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Y.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Y.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Gt={init:function(){this.setColour(Pt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Y.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Xt={init:function(){this.setColour(Pt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Y.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Y.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Y.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Y.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Y.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Y.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Y.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Y.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Ht={init:function(){var t=[[Y.Msg.MATH_BIN,"bin"],[Y.Msg.MATH_OCT,"oct"],[Y.Msg.MATH_HEX,"hex"]];this.setColour(Pt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Y.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:Y.Msg.MATH_DEC_TOOLTIP_BIN,oct:Y.Msg.MATH_DEC_TOOLTIP_OCT,hex:Y.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},qt={init:function(){var t=[[Y.Msg.LANG_MATH_TO_ROUND,"round"],[Y.Msg.LANG_MATH_TO_CEIL,"ceil"],[Y.Msg.LANG_MATH_TO_FLOOR,"floor"],[Y.Msg.MATH_ABS,"fabs"],[Y.Msg.MATH_SQRT,"sqrt"]];this.setColour(Pt),this.appendValueInput("A").setCheck(Number).appendField(new Y.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Y.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Y.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Y.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Y.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Y.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Y.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},zt={init:function(){var t=[[Y.Msg.MIXLY_MAX,"max"],[Y.Msg.MIXLY_MIN,"min"]];this.setColour(Pt),this.appendValueInput("A").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(new Y.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Y.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Y.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Y.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Wt={init:function(){var t=[[Y.Msg.MATH_TWO,"two"],[Y.Msg.MATH_EIGHT,"eight"],[Y.Msg.MATH_TEN,"ten"],[Y.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(Pt),this.appendDummyInput("").appendField(Y.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Y.FieldDropdown(t),"OP").appendField(Y.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Y.Msg.MATH_ZHW).appendField(new Y.FieldDropdown(t),"OP2").appendField(Y.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),n={two:Y.Msg.MATH_Before_two,eight:Y.Msg.MATH_Before_eight,ten:Y.Msg.MATH_Before_ten,sixteen:Y.Msg.MATH_Before_sixteen},i=e.getFieldValue("OP2"),s={two:Y.Msg.MATH_Behind_two,eight:Y.Msg.MATH_Behind_eight,ten:Y.Msg.MATH_Behind_ten,sixteen:Y.Msg.MATH_Behind_sixteen};return n[t]+s[i]}))}},Jt={init:function(){var t=[[Y.Msg.LANG_MATH_INT,"int"],[Y.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Pt),this.setOutput(!0,Number),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Y.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),n={int:Y.Msg.LANG_MATH_INT,float:Y.Msg.LANG_MATH_FLOAT_RANDOM};return Y.Msg.MATH_RANDOM_INT_TOOLTIP+n[t]}))}},Kt={init:function(){this.setColour(Pt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Y.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Y.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Y.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Y.Msg.MATH_CONSTRAIN_TOOLTIP)}},Qt={init:function(){this.setColour(Pt),this.appendValueInput("NUM",Number).appendField(Y.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Y.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Y.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Zt={init:function(){this.setColour(Pt),this.appendDummyInput().appendField(new Y.FieldTextInput("0",Y.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Y.Msg.MATH_NUMBER_TOOLTIP)}},te={init:function(){this.setColour(Pt),this.appendValueInput("NUM").setCheck(Number).appendField(Y.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},ee={init:function(){this.setColour(Pt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Y.Msg.MATH_ROUND).appendField(Y.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Y.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Y.Msg.MATH_ROUND_NEW_TOOLTIP)}},ne={init:function(){var t=[[Y.Msg.MIXLY_TO_INT,"int"],[Y.Msg.MIXLY_TO_FLOAT,"float"],[Y.Msg.MIXLY_TO_BITES,"b"],[Y.Msg.LANG_MATH_BYTE+Y.Msg.MIXLY_TO_INT,"bti"]];this.setColour(Pt),this.appendValueInput("VAR").appendField(new Y.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Y.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Y.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Y.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ie={init:function(){var t=[[Y.Msg.MIXLY_TO_INT,"int"],[Y.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Pt),this.appendValueInput("VAR").appendField(new Y.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Y.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Y.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},se=Qt,re={init:function(){this.setColour(Pt),this.appendValueInput("VAR").appendField(Y.Msg.LANG_MATH_BYTE+Y.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},oe={init:function(){this.setColour(Pt),this.itemCount_=1,this.setMutator(new Y.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(Y.Msg.MIXLY_PRODUCT+Y.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(Y.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(Y.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(Y.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;i1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const he={init:function(){this.setColour(ue),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Y.FieldTextInput("",Y.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Y.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new Y.FieldImage(e,7,12,'"')}},_e={init:function(){this.setColour(ue),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Y.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},de={init:function(){this.setColour(ue),this.appendValueInput("VAR").setCheck(Number).appendField(Y.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},fe={init:function(){this.setColour(ue),this.appendValueInput("VAR").setCheck(String).appendField(Y.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},me={init:function(){this.setColour(ue),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},ge={init:function(){this.setColour(ue),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},be={init:function(){this.WHERE_OPTIONS=[[Y.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Y.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Y.Msg.TEXT_GET_INDEX_RANDOM+1+Y.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Y.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Y.Msg.LISTS_GET_INDEX_GET,"MODE"),Y.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Y.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=t.getFieldValue("WHERE"),i="";switch(e+" "+n){case"GET FROM_START":case"GET FROM_END":i=Y.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":i=Y.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":i=Y.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":i=Y.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=n&&"FROM_END"!=n||(i+=" "+Y.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Y.Msg.ONE_BASED_INDEXING?"#1":"#0")),i}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),n={FROM_START:Y.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Y.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Y.Msg.TEXT_GET_INDEX_RANDOM};return Y.Msg.PROCEDURES_DEFRETURN_RETURN+Y.Msg.MIXLY_MICROBIT_TYPE_STRING+n[t]+"n"+Y.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==Y.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),Y.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Y.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new Y.FieldDropdown(this.WHERE_OPTIONS,(function(e){var n="FROM_START"==e||"FROM_END"==e;if(n!=t){var i=this.sourceBlock_;return i.updateAt_(n),i.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),Y.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Se={init:function(){this.setHelpUrl(Y.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Y.Msg.LISTS_GET_INDEX_GET+" "+Y.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Y.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Y.Msg.PROCEDURES_DEFRETURN_RETURN+Y.Msg.MIXLY_MICROBIT_TYPE_STRING+Y.Msg.LISTS_GET_INDEX_FROM_START+"n"+Y.Msg.TEXT_CHARAT2)}},ke={init:function(){this.setHelpUrl(Y.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Y.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Y.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Te={init:function(){this.WHERE_OPTIONS_1=[[Y.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Y.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Y.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Y.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Y.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Y.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Y.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(Y.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==Y.INPUT_VALUE;t.setAttribute("at1",e);var n=this.getInput("AT2").type==Y.INPUT_VALUE;return t.setAttribute("at2",n),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),n="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,n)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),Y.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(Y.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var n=new Y.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(n){var i="FROM_START"==n||"FROM_END"==n;if(i!=e){var s=this.sourceBlock_;return s.updateAt_(t,i),s.setFieldValue(n,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(n,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},ye={init:function(){this.setHelpUrl(Y.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Y.Msg.LISTS_GET_INDEX_GET+" "+Y.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Y.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Y.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Y.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},ve={init:function(){var t=[[Y.Msg.MIXLY_EQUALS,"==="],[Y.Msg.MIXLY_STARTSWITH,"startswith"],[Y.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(ue),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Y.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},$e={init:function(){this.setColour(ue),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Y.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_COMPARETO_HELP)}},we={init:function(){var t=[[Y.Msg.TEXT_UPPER,"upper"],[Y.Msg.TEXT_TITLE,"title"],[Y.Msg.TEXT_CAPITALIZE,"capitalize"],[Y.Msg.TEXT_SWAPCASE,"swapcase"],[Y.Msg.TEXT_LOWER,"lower"]];this.setColour(ue),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Y.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:Y.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Y.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Y.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Y.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Y.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Ee={init:function(){var t=[[Y.Msg.TEXT_LJUST,"ljust"],[Y.Msg.TEXT_CENTER,"center"],[Y.Msg.TEXT_RJUST,"rjust"]];this.setColour(ue),this.appendValueInput("VAR").appendField(new Y.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Y.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Y.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Ie={init:function(){this.setColour(ue),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Y.Msg.MIXLY_MID+Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Y.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Ae={init:function(){this.setColour(ue),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Y.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Y.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Oe={init:function(){this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Y.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Y.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},Me={init:function(){this.setColour(ue),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Y.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Y.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Y.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},Ce={init:function(){var t=[[Y.Msg.TEXT_TRIM_BOTH,"strip"],[Y.Msg.TEXT_TRIM_LEFT,"lstrip"],[Y.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(ue),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Y.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Y.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(Y.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:Y.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Y.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Y.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},Re={init:function(){this.setColour(ue),this.appendDummyInput("").appendField(Y.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Y.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Y.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Y.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;ie?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Y.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},On={init:function(){this.setColour(In),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Y.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Mn={init:function(){this.setColour(In),this.appendDummyInput().appendField(Y.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Cn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_KEYS),this.setTooltip(Y.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Rn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Y.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Y.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Y.Msg.DICTS_GET_TOOLTIP)}},xn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Y.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Y.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Y.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Y.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},Nn={init:function(){this.setColour(In),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Y.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Y.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Ln={init:function(){this.setColour(In),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Y.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Y.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.DICTS_DELETE_TOOLTIP)}},Dn={init:function(){this.setColour(In),this.appendValueInput("DICT2").setCheck("Dict").appendField(Y.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Y.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Y.Msg.MIXLY_MID),this.setTooltip(Y.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_CLEAR),this.setTooltip(Y.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_ITEMS),this.setTooltip(Y.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Bn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_VALUES),this.setTooltip(Y.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Vn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_LENGTH),this.setTooltip(Y.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Un={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_DELDICT),this.setTooltip(Y.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yn={init:function(){this.MODE=[[Y.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Y.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Y.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Y.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=Y.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=Y.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==Y.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new Y.FieldDropdown(this.MODE,(function(e){var n="INSERT"==e;if(n!=t){var i=this.sourceBlock_;return i.updateAt_(n),i.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},jn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Y.Msg.DICTS_ADD_VALUE),this.setTooltip(Y.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},Gn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Y.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Y.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Xn={init:function(){this.setColour(In),this.appendDummyInput("").appendField(new Y.FieldLabel(Y.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new Y.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Y.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;ie?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Y.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Hn={init:function(){this.setColour(In),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},qn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_TO_JSON),this.setTooltip(Y.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},zn={init:function(){this.setColour(In),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Y.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Wn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Jn={init:function(){this.setColour(In),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_TO_JSON),this.setTooltip(Y.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Kn=210,Qn={init:function(){var t=Y.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Kn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Y.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:Y.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Y.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Y.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Y.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Y.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Y.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},Zn={init:function(){var t=Y.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=Y.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Kn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Y.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new Y.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},ti={init:function(){var t=[[Y.Msg.LOGIC_OPERATION_AND,"AND"],[Y.Msg.LOGIC_OPERATION_OR,"OR"],[Y.Msg.LOGIC_OPERATION_NOR,"NOR"],[Y.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Kn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Y.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:Y.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Y.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Y.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Y.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},ei={init:function(){this.setColour(Kn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Y.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Y.Msg.LOGIC_NEGATE_TOOLTIP)}},ni={init:function(){var t=[[Y.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Y.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Kn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Y.FieldDropdown(t),"BOOL"),this.setTooltip(Y.Msg.LOGIC_BOOLEAN_TOOLTIP)}},ii={init:function(){this.setColour(Kn),this.setOutput(!0),this.appendDummyInput().appendField(Y.Msg.LOGIC_NULL),this.setTooltip(Y.Msg.LOGIC_NULL_TOOLTIP)}},si={init:function(){this.setColour(Kn),this.appendValueInput("A"),this.appendValueInput("B").appendField(Y.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Y.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},ri={init:function(){var t=[[Y.Msg.TEXT_APPEND_TO,"in"],[Y.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Kn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Y.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(Y.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Y.Msg.IN)}},oi={init:function(){var t=[[Y.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Y.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Kn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Y.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},ai={init:function(){this.setColour(Kn),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},li={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Y.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ui={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Y.Msg.MIXLY_USE,i=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,r=Y.Msg.MIXLY_BELONG;return n+{r:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+r+i+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Y.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},ci={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Y.Msg.MIXLY_USE,i=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,r=Y.Msg.MIXLY_BELONG,o=Y.Msg.PY_STORAGE_FILE_OBJECT;return n+{r:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+r+i+s+o}))}},pi={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Y.Msg.MIXPY_TEXT_ENCODE).appendField(new Y.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Y.Msg.MIXLY_USE,i=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,r=Y.Msg.MIXLY_BELONG,o=Y.Msg.PY_STORAGE_FILE_OBJECT;return n+{r:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+r+i+s+o}))}},hi={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Y.Msg.MIXLY_MICROBIT_TYPE_STRING+Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},_i={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},di={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,i=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return n+{read:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+i}))}},fi={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Y.Msg.MICROBIT_PYTHON_TYPE)}},mi={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Y.Msg.HTML_FILE),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},gi={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},bi={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Si={init:function(){this.setColour(0),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Y.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const ki={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Ti={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Y.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},yi={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},vi={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,i=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return n+" "+{start:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+i}))}},$i={init:function(){this.setColour(0),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},wi={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Y.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Y.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Y.Msg.MIXLY_ESP32_SET+{mkdir:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Ei={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Y.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Ii={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Ai={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Y.FieldDropdown([[Y.Msg.HTML_FILE,"isfile"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Y.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Y.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Oi={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Y.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_SETUP+Y.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Y.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Mi={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Y.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Ci={init:function(){var t=Y.Procedures.findLegalName("",this),e=new Y.FieldTextInput(t,Y.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new Y.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Y.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Y.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(Y.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(Y.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(Y.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=Y.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),Y.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{Y.Events.enable()}},mutationToDom:function(t){var e=Y.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var n=0;n"),this.appendValueInput("style").appendField(Y.Msg.MIXLY_AIP_ATTR).setAlign(Y.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ws={init:function(){this.setColour(Ss),this.appendDummyInput().appendField(Y.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Es={init:function(){this.setColour(Ss),this.appendDummyInput().appendField(Y.Msg.HTML_FORM_CONTENT).appendField(new Y.FieldDropdown([[Y.Msg.HTML_TEXT,"text"],[Y.Msg.HTML_EMAIL,"email"],[Y.Msg.HTML_NUMBER,"number"],[Y.Msg.HTML_PASSWORD,"password"],[Y.Msg.HTML_CHECKBOX,"checkbox"],[Y.Msg.HTML_RADIOBUTTON,"radiobutton"],[Y.Msg.HTML_BUTTON,"button"],[Y.Msg.HTML_COLOUR,"colour"],[Y.Msg.HTML_DATE,"date"],[Y.Msg.HTML_LOCALTIME,"local time"],[Y.Msg.HTML_FILE,"file"],[Y.Msg.HTML_HIDDEN,"hidden"],[Y.Msg.HTML_IMAGE,"image"],[Y.Msg.HTML_MONTH,"month"],[Y.Msg.HTML_RANGE,"range"],[Y.Msg.HTML_RESET,"reset"],[Y.Msg.HTML_SEARCH,"search"],[Y.Msg.HTML_SUBMIT,"submit"],[Y.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Y.Msg.HTML_TIME,"time"],[Y.Msg.HTML_URL,"url"],[Y.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Y.Msg.HTML_NAME).appendField(new Y.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Y.Msg.HTML_VALUE).appendField(new Y.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Y.Msg.MIXLY_AIP_ATTR).setAlign(Y.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Is={init:function(){this.setColour(Ss),this.appendDummyInput().appendField(new Y.FieldTextInput("property"),"KEY").appendField(":").appendField(new Y.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},As={init:function(){this.setColour(Ss),this.appendDummyInput().appendField(new Y.FieldTextInput("property"),"KEY").appendField(":").appendField(new Y.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Os={init:function(){this.setColour(Ss),this.appendDummyInput().appendField(Y.Msg.HTML_TEXT).appendField(new Y.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ms=160,Cs={init:function(){this.setColour(Ms),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Y.FieldTable(""),"TEXT")}},Rs={init:function(){this.setColour(Ms),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Y.FieldMultilineInput(""),"TEXT")}},xs={init:function(){this.setColour(Ms),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Y.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Ns={init:function(){this.setColour(Ms),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Ls={init:function(){this.setColour(Ms),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Y.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Ds={init:function(){this.setColour(Ms),this.appendValueInput("VALUE").appendField(Y.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Fs={init:function(){this.setColour(Ms),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Y.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Y.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=Y.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;i"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("SER").setCheck("Series").appendField(Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Y.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new Y.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldDropdown(e),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Io={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ao={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Oo={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Mo={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Co={init:function(){this.setColour(mo);var t=[[Y.Msg.PYLAB_LABEL_X,"x"],[Y.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_SET_LABEL).appendField(new Y.FieldDropdown(t),"DIR"),this.appendValueInput("LABEL").appendField(Y.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ro={init:function(){this.setColour(mo),this.appendValueInput("FROM").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.MIXLY_SPLITBYDOU).appendField(Y.Msg.MIXPY_DATA_ARRAY_CREATE_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.MIXPY_DATA_ARRAY_CREATE_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.MIXLY_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},xo={init:function(){this.setColour(mo);var t=[[Y.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[Y.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(Y.Msg.MIXLY_DISPLAY_DRAW).appendField(new Y.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{plot:Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:Y.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[t]}))}},No={init:function(){this.setColour(mo);var t=[[Y.Msg.COLOUR_RGB_BLUE,"b"],[Y.Msg.COLOUR_RGB_GREEN,"g"],[Y.Msg.COLOUR_RGB_RED,"r"],[Y.Msg.COLOUR_CYAN,"c"],[Y.Msg.COLOUR_MAGENTA,"m"],[Y.Msg.COLOUR_YELLOW,"y"],[Y.Msg.COLOUR_BLACK,"k"],[Y.Msg.COLOUR_WHITE,"w"]],e=[[Y.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Y.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_SCATTER).appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(Y.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Y.FieldDropdown(e),"DOT"),this.appendDummyInput("").appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},Lo={init:function(){this.setColour(mo);var t=[[Y.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[Y.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[Y.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[Y.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[Y.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[Y.Msg.COLOUR_RGB_BLUE,"b"],[Y.Msg.COLOUR_RGB_GREEN,"g"],[Y.Msg.COLOUR_RGB_RED,"r"],[Y.Msg.COLOUR_CYAN,"c"],[Y.Msg.COLOUR_MAGENTA,"m"],[Y.Msg.COLOUR_YELLOW,"y"],[Y.Msg.COLOUR_BLACK,"k"],[Y.Msg.COLOUR_WHITE,"w"]],n=[[Y.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Y.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_PLOT_XY).appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Y.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new Y.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Do={init:function(){this.setColour(mo);var t=[[Y.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[Y.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_BAR).appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(Y.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(Y.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new Y.FieldDropdown(t),"ALIGN"),this.appendDummyInput().appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Fo={init:function(){this.setColour(mo);var t=[[Y.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[Y.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],e=[[Y.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[Y.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[Y.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[Y.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_PIE).appendField(Y.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(Y.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(Y.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new Y.FieldDropdown(e),"autopct"),this.appendDummyInput("").appendField(Y.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new Y.FieldDropdown(t),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Po={init:function(){this.setColour(mo),this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_HIST).appendField(Y.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(Y.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bo={init:function(){this.setColour(mo);var t=[[Y.Msg.PYLAB_LABEL_X,"x"],[Y.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(Y.Msg.MIXLY_SETTING).appendField(new Y.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_TICKS).appendField(Y.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},Vo={init:function(){var t=[["sin","sin"],["cos","cos"],["tan","tan"],["arcsin","arcsin"],["arccos","arccos"],["arctan","arctan"],[Y.Msg.LANG_MATH_TO_ROUND,"round"],[Y.Msg.LANG_MATH_TO_CEIL,"ceil"],[Y.Msg.LANG_MATH_TO_FLOOR,"floor"]];this.setColour(mo),this.setOutput(!0),this.setInputsInline(!0),this.appendDummyInput().appendField(Y.Msg.mixpy_NUMPY_TRIG),this.appendValueInput("NUM").setCheck(Number).appendField(new Y.FieldDropdown(t),"OP"),this.setTooltip(Y.Msg.mixpy_NUMPY_TRIG_TOOLTIP)}},Uo={init:function(){this.setColour(mo),this.appendValueInput("VET").setCheck(Number).appendField(Y.Msg.mixpy_SUBPLOT).appendField(Y.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(Y.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(Y.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Yo={init:function(){this.setColour(mo),this.appendValueInput("FILENAME").appendField(Y.Msg.MIXPY_PANDAS_READ_CSV),this.appendDummyInput().appendField(new Y.FieldDropdown([[Y.Msg.mixpy_PANDAS_READCSV_HEADER_Y,"0"],[Y.Msg.mixpy_PANDAS_READCSV_HEADER_N,"None"]]),"MODE"),this.appendDummyInput().appendField(Y.Msg.mixpy_PANDAS_READCSV_TITLE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Y.Msg.mixpy_PANDAS_READCSV_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Y.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},jo={init:function(){this.setColour(mo),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Y.Msg.mixpy_DATAFRAME_GET),this.appendDummyInput("").appendField(Y.Msg.mixpy_DATAFRAME_GET_INDEX).appendField(new Y.FieldDropdown([[Y.Msg.DATAFRAME_COLUMN,"column"],[Y.Msg.DATAFRAME_RAW,"raw"]]),"MODE"),this.setOutput(!0),this.setTooltip(Y.Msg.mixpy_DATAFRAME_GET_TOOLTIP)}},Go={init:function(){this.setColour(mo),this.appendValueInput("FILE").setCheck(String).appendField(Y.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Y.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},Xo={init:function(){this.setColour(mo);var t=[[Y.Msg.TEXT_TRIM_LEFT,"right"],[Y.Msg.mixpy_PL_TEXT_CENTER,"center"],[Y.Msg.TEXT_TRIM_RIGHT,"left"]],e=[[Y.Msg.mixpy_PL_TEXT_TOP,"bottom"],[Y.Msg.mixpy_PL_TEXT_CENTER,"center"],[Y.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(Y.Msg.MIXLY_SETTING).appendField(Y.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(Y.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(Y.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(Y.Msg.mixpy_PL_TEXT_HOR).appendField(new Y.FieldDropdown(t),"HALIGN"),this.appendDummyInput("").appendField(Y.Msg.mixpy_PL_TEXT_VER).appendField(new Y.FieldDropdown(e),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(Y.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PL_TEXT_TOOLTIP)}},Ho={init:function(){this.setColour(mo),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TOARRAY),this.setOutput(!0,"List"),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TOARRAY)}},qo={init:function(){this.setColour(mo),this.appendValueInput("SER").setCheck("Series").appendField(Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_PLOT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zo={init:function(){this.setColour(mo);var t=[[Y.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[Y.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[Y.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[Y.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[Y.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[Y.Msg.COLOUR_RGB_BLUE,"b"],[Y.Msg.COLOUR_RGB_GREEN,"g"],[Y.Msg.COLOUR_RGB_RED,"r"],[Y.Msg.COLOUR_CYAN,"c"],[Y.Msg.COLOUR_MAGENTA,"m"],[Y.Msg.COLOUR_YELLOW,"y"],[Y.Msg.COLOUR_BLACK,"k"],[Y.Msg.COLOUR_WHITE,"w"]],n=[[Y.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Y.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("SER").setCheck("Series").appendField(Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Y.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new Y.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldDropdown(e),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Wo={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Jo={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ko={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qo={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zo={init:function(){this.setColour(mo);var t=[[Y.Msg.PYLAB_LABEL_X,"x"],[Y.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_SET_LABEL).appendField(new Y.FieldDropdown(t),"DIR"),this.appendValueInput("LABEL").appendField(Y.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ta={init:function(){this.setColour(mo);var t=[[Y.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[Y.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(Y.Msg.MIXLY_DISPLAY_DRAW).appendField(new Y.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{plot:Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:Y.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[t]}))}},ea={init:function(){this.setColour(mo);var t=[[Y.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Y.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_SCATTER).appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(Y.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Y.FieldDropdown(t),"DOT"),this.appendDummyInput().appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},na={init:function(){this.setColour(mo);var t=[[Y.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[Y.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[Y.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[Y.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[Y.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[Y.Msg.COLOUR_RGB_BLUE,"b"],[Y.Msg.COLOUR_RGB_GREEN,"g"],[Y.Msg.COLOUR_RGB_RED,"r"],[Y.Msg.COLOUR_CYAN,"c"],[Y.Msg.COLOUR_MAGENTA,"m"],[Y.Msg.COLOUR_YELLOW,"y"],[Y.Msg.COLOUR_BLACK,"k"],[Y.Msg.COLOUR_WHITE,"w"]],n=[[Y.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Y.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_PLOT_XY).appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Y.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new Y.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},ia={init:function(){this.setColour(mo);var t=[[Y.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[Y.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_BAR).appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(Y.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(Y.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new Y.FieldDropdown(t),"ALIGN"),this.appendDummyInput().appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},sa={init:function(){this.setColour(mo);var t=[[Y.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[Y.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],e=[[Y.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[Y.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[Y.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[Y.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_PIE).appendField(Y.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(Y.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(Y.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new Y.FieldDropdown(e),"autopct"),this.appendDummyInput("").appendField(Y.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new Y.FieldDropdown(t),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},ra={init:function(){this.setColour(mo),this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_HIST).appendField(Y.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(Y.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},oa={init:function(){this.setColour(mo);var t=[[Y.Msg.PYLAB_LABEL_X,"x"],[Y.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(Y.Msg.MIXLY_SETTING).appendField(new Y.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_TICKS).appendField(Y.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},aa={init:function(){this.setColour(mo),this.appendValueInput("VET").setCheck(Number).appendField(Y.Msg.mixpy_SUBPLOT).appendField(Y.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(Y.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(Y.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},la={init:function(){this.setColour(mo),this.appendDummyInput("").appendField(Y.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Y.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},ua={init:function(){this.setColour(mo);var t=[[Y.Msg.TEXT_TRIM_LEFT,"right"],[Y.Msg.mixpy_PL_TEXT_CENTER,"center"],[Y.Msg.TEXT_TRIM_RIGHT,"left"]],e=[[Y.Msg.mixpy_PL_TEXT_TOP,"bottom"],[Y.Msg.mixpy_PL_TEXT_CENTER,"center"],[Y.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(Y.Msg.MIXLY_SETTING).appendField(Y.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(Y.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(Y.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(Y.Msg.mixpy_PL_TEXT_HOR).appendField(new Y.FieldDropdown(t),"HALIGN"),this.appendDummyInput("").appendField(Y.Msg.mixpy_PL_TEXT_VER).appendField(new Y.FieldDropdown(e),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(Y.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PL_TEXT_TOOLTIP)}},ca=20,pa={init:function(){this.setColour(ca),this.appendValueInput("VAR").appendField(Y.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(Y.Msg.INOUT_input_TOOLTIP)}},ha={init:function(){this.setColour(ca),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Y.Msg.BLOCKPY_PRINT_TOOLTIP)}},_a={init:function(){this.setColour(ca),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Y.Msg.TEXT_PRINT_TOOLTIP)}},da={init:function(){this.setColour(ca),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_SERIAL_PRINT),this.appendValueInput("END").appendField(Y.Msg.MIXLY_ENDSWITH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_INOUT_PRINT_END_TOOLTIP)}},fa={init:function(){var t=[[Y.Msg.LANG_MATH_STRING,"str"],[Y.Msg.LANG_MATH_INT,"int"],[Y.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(ca),this.appendDummyInput("").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Y.FieldDropdown(t),"DIR"),this.appendValueInput("VAR").appendField(Y.Msg.PROCEDURES_MUTATORCONTAINER_TITLE).setCheck(String),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{str:Y.Msg.MIXLY_MIXPY_INOUT_STR_INPUT_TOOLTIP,int:Y.Msg.MIXLY_MIXPY_INOUT_INT_INPUT_TOOLTIP,float:Y.Msg.MIXLY_MIXPY_INOUT_FLOAT_INPUT_TOOLTIP}[t]}))}},ma={init:function(){this.setColour(ca),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Y.icons.MutatorIcon(["inout_print_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.MIXLY_MIXPY_INOUT_PRINT_MANY_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("inout_print_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;i= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,n){return"("+t+" <= "+e+") and "+l()+"("+t+", "+e+", "+n+") or "+u()+"("+t+", "+e+", "+n+")"},Y.isNumber(i)&&Y.isNumber(s)&&Y.isNumber(r))i=parseFloat(i),s=parseFloat(s),r=Math.abs(parseFloat(r)),0==i%1&&0==s%1&&0==r%1?(i<=s?(s++,t=0==i&&1==r?s:i+", "+s,1!=r&&(t+=", "+r)):t=i+", "+--s+", -"+r,t="range("+t+")"):(t=i",GTE:">="};const Ep=function(t,e){var n=this.getFieldValue("OP"),i="&&"==n?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",i)||"False",r=e.valueToCode(this,"B",i)||"False";if("AND"==n)var o=s+" and "+r;else if("OR"==n)o=s+" or "+r;else if("NOR"==n)o="not("+s+"^"+r+")";else o=s+"^"+r;return[o,i]},Ip=function(t,e){var n=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",n)||"False"),n]},Ap=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Op=function(t,e){return["None",e.ORDER_ATOMIC]},Mp=function(t,e){var n=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+n+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},Cp=function(t,e){var n=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",i=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[n+" "+this.getFieldValue("BOOL")+" "+i,e.ORDER_ATOMIC]},Rp=function(t,e){var n=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",i=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[n+" "+this.getFieldValue("BOOL")+" "+i,e.ORDER_ATOMIC]},xp=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Np=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Lp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Dp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Fp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Pp=function(t,e){var n=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+n+")\n"},Bp=function(t,e){var n=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+n+"()",e.ORDER_ATOMIC]},Vp=function(t,e){var n=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+n+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Up=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Yp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},jp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},Gp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Xp=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Hp=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},qp=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},zp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Wp=function(t,e){var n=this.getFieldValue("MODE"),i=0;return i="start"==n?0:"current"==n?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+i+")\n"},Jp=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Kp=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Qp=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Zp=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},th=function(t,e){e.definitions_.import_os="import os";var n=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+n+")",e.ORDER_ATOMIC]},eh=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},nh=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},ih=function(t,e){var n=e.variableDB_.getName(this.getFieldValue("NAME"),Y.Procedures.NAME_TYPE),i=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(i=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+i);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var r=[],o=0;o\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},Ph=function(t,e){var n=e.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");return"\n"+n+"\n"},Bh=function(t,e){var n=e.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");if("head"==i)var s="<"+i+'>\n\t\n'+n+"\n";else s="<"+i+">\n"+n+"\n";return s},Vh=function(t,e){var n=e.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");return"<"+i+">\n"+n+"\n"},Uh=function(t,e){var n=e.statementToCode(this,"DO"),i=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+i+" >\n"+n+"\n"},Yh=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},jh=function(t,e){return'"},Gh=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Xh=function(){return this.getFieldValue("TEXT")+"\n"},Hh=function(t){return t.getFieldValue("TEXT")+"\n"},qh=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},zh=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Wh=function(){return""},Jh=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Kh=function(t,e){for(var n=t.getFieldValue("NAME"),i=t.hasReturn_,s=new Array(t.itemCount_),r=0;r6:\n print("路线错乱!程序有误!")\n exit()\n'},f_=function(t,e){return["name[now] != '小科家'",e.ORDER_ATOMIC]},m_=function(t,e){return["name[now] != '学校'",e.ORDER_ATOMIC]},g_=function(){return'res = ""\nfor i in path:\n res = res + name[i] + "→"\nprint(res[:-1])\n'},b_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n=this.getFieldValue("NUM");if(n>=7)var i="print('层数过高!不得高于6层!')\nexit()\n";else i="sprite.clearAllSprites()\n_Hanoicolor = ['blue', 'red', 'yellow', 'green', 'purple', 'black']\n_Hanoi = [[], [], []]\nA = 0\nB = 1\nC = 2\n_n = "+n+"\n_HanoiColumn = [\n sprite.Sprite('HanoiColumn', 200, 320),\n sprite.Sprite('HanoiColumn', 400, 320),\n sprite.Sprite('HanoiColumn', 600, 320)\n]\n_HanoiColumnNumber = [\n sprite.Text('A', 190, 120),\n sprite.Text('B', 390, 120),\n sprite.Text('C', 590, 120)\n]\n_HanoiBlock = []\nfor i in range(0, _n, 1):\n _HanoiBlock.append(sprite.Sprite(_Hanoicolor[i], 200, 400-(_n-i-1)*27))\n _HanoiBlock[i].setScale(25, 30*i+30)\n _Hanoi[0].insert(0, _HanoiBlock[i])\n_steptext = sprite.Text('步数:0', 30, 30)\n_steps = {'steps' : 0}\ntime.sleep(1)\n";return i},S_=function(t,e){var n=e.valueToCode(this,"FROM_NUM",e.ORDER_ATOMIC)||"0",i=e.valueToCode(this,"TO_NUM",e.ORDER_ATOMIC)||"0";return`if len(_Hanoi[${n}])>0 :\n _HanoiBlockMoved = _Hanoi[${n}].pop()\n if len(_Hanoi[${i}]) > 0 :\n _HanoiBlockSuppressed = _Hanoi[${i}].pop()\n if _HanoiBlock.index(_HanoiBlockMoved) > _HanoiBlock.index(_HanoiBlockSuppressed):\n print('非法移动!程序有误!')\n exit()\n else:\n _Hanoi[${i}].append(_HanoiBlockSuppressed)\n _HanoiBlockMoved.slideTo(${n}*200+200, 180, 0.2)\n _HanoiBlockMoved.slideTo(${i}*200+200, 180, 0.5)\n _HanoiBlockMoved.slideTo(${i}*200+200, 400-len(_Hanoi[${i}])*27, 0.2)\n _Hanoi[${i}].append(_HanoiBlockMoved)\n _steps['steps'] += 1\n _steptext.changeText('步数:'+str(_steps['steps']))\nelse :\n print('非法移动!程序有误!')\n exit()\n`},k_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"if 'mode' not in globals() or mode == 0:\n sprite.clearAllSprites()\n ring=[0,0,0,0,0,0,0,0,0,0]\n mode=1\n n=5\n ring[5]=1\n name=['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\n Books = []\n for i in range(1, 11, 1):\n Books.append(sprite.Sprite('books/book'+str(i), (130*i-650) if i>5 else 130*i, 320 if i>5 else 120))\nelse:\n mode=2\n n=len(ring)-1\nring[n]=1\ntime.sleep(1)\n"},T_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"if 'mode' not in globals() or mode == 0:\n sprite.clearAllSprites()\n ring=[0,0,0,0,0,0,0,0,0,0]\n mode=2\n n=5\n name=['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\n Books = []\n for i in range(1, 11, 1):\n Books.append(sprite.Sprite('books/book'+str(i), (130*i-650) if i>5 else 130*i, 320 if i>5 else 120))\nelse:\n mode=1\n n=len(ring)-1\nring[n]=n\nlist=ring\ntemp=Books\ntime.sleep(1)\n"},y_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"res=0\nflag=ring[res]\nBooks[res].filterBrighter()\ntime.sleep(0.1)\nBooks[res].filterOrigin()\n"},v_=function(t,e){return["(('mode' not in globals())or(mode==1 and flag==0)or(mode==2 and not any(value > 0 for value in qian))or(mode==0))",e.ORDER_ATOMIC]},$_=function(t,e){return["(('mode' in globals())and((mode==1 and flag!=0)or(mode==2 and any(value > 0 for value in qian))))",e.ORDER_ATOMIC]},w_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n="res+=1\nflag=ring[res]\n";return n="Books[res].filterGray()\ntime.sleep(0.3)\n"+(n+="Books[res].filterBrighter()\ntime.sleep(0.1)\nBooks[res].filterOrigin()\n")},E_=function(t,e){return["len(list)>=2",e.ORDER_ATOMIC]},I_=function(){return"mid = int(len(list)/2)\nqian = list[0:mid]\nhou = list[mid:]\nqiantemp = temp[0:mid]\nhoutemp = temp[mid:]\n"},A_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"quchu = qian\nlist = hou\nquchutemp = qiantemp\ntemp = houtemp\nfor i in qiantemp:\n i.filterBrighter()\ntime.sleep(0.5)\nfor i in qiantemp:\n i.filterGray()\ntime.sleep(0.5)\n"},O_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"list = quchu\ntemp = quchutemp\nfor i in qiantemp:\n i.filterBrighter()\ntime.sleep(0.5)\nfor i in qiantemp:\n i.filterOrigin()\nfor i in houtemp:\n\ti.filterBrighter()\ntime.sleep(0.5)\nfor i in houtemp:\n i.filterGray()\ntime.sleep(0.5)\n"},M_=function(){return"if 'list' in globals():\n res = list[0]\nBooks[res].filterBrighter()\nprint('未消磁的书籍是第'+str(res+1)+'本《'+name[res%10]+'》。')\nif res!=n:\n print('答案错误!请检查程序!')\nmode=0\n"},C_=function(t,e){var n=this.getFieldValue("NUM");return e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite",`sprite.clearAllSprites()\nring = []\nname = ['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\nBooks = []\nfor i in range(${n}):\n ring.append(0)\nfor i in range(1, ${n}+1, 1):\n Books.append(sprite.Sprite('books/book'+str(i%10 if i%10!=0 else 10), ${{5:"130*i, 120",10:"(130*i-650) if i>5 else 130*i, 320 if i>5 else 120",20:"(65*i-650)+30 if i>10 else 65*i+30, 320 if i>10 else 120",50:"(26*i-650)+50 if i>25 else 26*i+50, 320 if i>25 else 120"}[n]}))\ntime.sleep(1)\nmode=3\n`},R_=function(t,e){e.definitions_.import_sprite="import sprite";return"cnt=0\ncntText = sprite.Text('计数器:0', 30, 200)\n"},x_=function(t,e){e.definitions_.import_sprite="import sprite";return"cnt+=1\ncntText.changeText('计数器:'+str(cnt))\n"},N_=function(t,e){e.definitions_.import_sprite="import sprite";return"print('计数器大小:'+str(cnt))\n"},L_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\n_head = 10\n_foot = 32\n_footText = sprite.Text('脚的数量:', 20, 10)\n_sprite = []\n"},D_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_rabbit = 0\ntime.sleep(1)\n"},F_=function(t,e){return["_rabbit < _head",e.ORDER_ATOMIC]},P_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_chick = _head - _rabbit\nfor i in range(0, _chick, 1):\n _sprite.append(sprite.Sprite('jttl/chick', len(_sprite)*130+130 if len(_sprite)<5 else len(_sprite)*130+130-650, 120 if len(_sprite)<5 else 320))\n\ntime.sleep(0.5)\n_footText.changeText('脚的数量:'+str(_rabbit*4 + _chick*2))\ntime.sleep(1)\n"},B_=function(t,e){return["_rabbit*4 + _chick*2 == _foot",e.ORDER_ATOMIC]},V_=function(t,e){e.definitions_.import_sprite="import sprite";return"print('鸡的数量:'+str(_chick)+'只;\\n兔的数量:'+str(_rabbit)+'只。')\n"},U_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_rabbit += 1\nsprite.clearAllSprites()\n_sprite = []\n_footText = sprite.Text('脚的数量:', 20, 10)\nfor i in range(0, _rabbit, 1):\n _sprite.append(sprite.Sprite('jttl/rabbit', len(_sprite)*130+130 if len(_sprite)<5 else len(_sprite)*130+130-650, 120 if len(_sprite)<5 else 320))\ntime.sleep(0.5)\n"},Y_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\nsprite.createBackground('/fzsf/map_ck_xxjsjs')\n_S1 = sprite.Sprite('/fzsf/S1',400,225,'S1')\n_S2 = sprite.Sprite('/fzsf/S2',400,225,'S2')\n_S3 = sprite.Sprite('/fzsf/S3',400,225,'S3')\n_S4 = sprite.Sprite('/fzsf/S4',400,225,'S4')\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\n_text_1 = sprite.Text('S1:',0,0,'text')\n_text_2 = sprite.Text('S2:',0,30,'text2')\n_text_3 = sprite.Text('S3:',0,60,'text3')\n_text_4 = sprite.Text('S4:',0,90,'text4')\n_position = [[60, 270], [240, 50], [260, 380], [440, 190], [730, 60], [700, 400]]\n_Llen = [0, 170, 230, 100, 150, 10, 30, 50]\n_Slen = [0, 0, 0, 0, 0]\n_tag = [0, [0, 1, 3], [0, 2, 3], [3, 4, 5], [3, 5]]\nbear = sprite.Sprite('mixbear',60,270,'bear')\nbear.enlargeTo(80)\n_pos = 0\ntime.sleep(1)\n"},j_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n=this.getFieldValue("PATHNAME");const i=[0,[1,3],[2,4],[5,7],[6]];var s="";return s+=`_S${n}.show()\ntime.sleep(1)\n`,s+=4!=n?`_Slen[${n}] = _Llen[${i[n][0]}] + _Llen[${i[n][1]}]\n_text_${n}.changeText('S${n}:'+str(_Slen[${n}])+'m')\ntime.sleep(1)\n_S${n}.hide()\ntime.sleep(1)\n`:"_Slen[4] = _Llen[6]\n_text_4.changeText('S4:'+str(_Slen[4])+'m')\ntime.sleep(1)\n_S4.hide()\ntime.sleep(1)\n"},G_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n="";return[n+=`_Slen[${this.getFieldValue("PATHNAME")}] < _Slen[${this.getFieldValue("PATHNAME2")}]`,e.ORDER_ATOMIC]},X_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n=this.getFieldValue("PATHNAME"),i="";return i+=`\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\n_Smin = ${n}\n_S${n}.show()\ntime.sleep(0.5)\n_S${n}.hide()\ntime.sleep(0.5)\n_S${n}.show()\ntime.sleep(1)\n`},H_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"if(_pos == _tag[_Smin][0]):\n for i in range(1, len(_tag[_Smin]), 1):\n bear.slideTo(_position[_tag[_Smin][i]][0], _position[_tag[_Smin][i]][1], 1)\n _pos = _tag[_Smin][len(_tag[_Smin])-1]\nelse:\n print('移动错误!程序有误!')\n exit()\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\nif(_pos == 5):\n print('成功抵达信息科技教室!')\n"},q_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\nsprite.createBackground('/hxdb/hxdbbg')\n_soldier = []\n_num = sprite.Text('目前士兵数量:0',0,0,'num')\n_last = sprite.Text('剩余:0',500,0,'last')\n_line = 3\n"},z_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n="";return n+=`for i in range(0, ${this.getFieldValue("NUM")}, 1):\n _soldier.append(sprite.Sprite('/hxdb/soldier', 30 + (len(_soldier)%_line)*50 + (len(_soldier)//(4*_line))*(_line+1)*50 +(len(_soldier)%3-2), 80+(len(_soldier)//_line)*100-(len(_soldier)//(4*_line))*4*100+(len(_soldier)%2)))\n_num.changeText('目前士兵数量:'+str(len(_soldier)))\n`},W_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n=this.getFieldValue("NUM");return`for i in range(0, len(_soldier), 1):\n _soldier[i].slideTo(30 + (i%${n})*50 + (i//(4*${n}))*(${n}+1)*50 +(i%3-2), 80+(i//${n})*100-(i//(4*${n}))*4*100+(i%2), 0.05)\n_line = ${n}\n_last.changeText('剩余:'+str(len(_soldier)%_line))\ntime.sleep(2)\n`},J_=function(t,e){return e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite",[`len(_soldier)%_line == ${this.getFieldValue("NUM")}`,e.ORDER_ATOMIC]},K_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_num.changeText('目前士兵数量:'+str(len(_soldier)+1))\n_last.changeText('剩余:')\ntime.sleep(0.5)\n_soldier.append(sprite.Sprite('/hxdb/soldier', 30 + (len(_soldier)%_line)*50 + (len(_soldier)//(4*_line))*(_line+1)*50 +(len(_soldier)%3-2), 80+(len(_soldier)//_line)*100-(len(_soldier)//(4*_line))*4*100+(len(_soldier)%2)))\ntime.sleep(1)\n"},Q_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"print('符合要求的士兵数量为:'+str(len(_soldier)))\n"},Z_=function(t,e){e.definitions_.import_turtle="import turtle",e.definitions_.import_time="import time",e.definitions_.import_math="import math";var n=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),i=this.getFieldValue("NUM");return e.setups_.init_Hanoi="\ndef init_Hanoi():\n pen = turtle.Turtle()\n pen.hideturtle()\n pen.speed(0)\n for i in range(0, 3, 1):\n pen.penup()\n pen.setheading(0)\n pen.goto(150 * i - 200,-100)\n pen.pendown()\n pen.pensize(5)\n pen.forward(100)\n pen.goto(150 * i - 150,-100)\n pen.setheading(90)\n pen.forward(200)",e.setups_.begin="\ndef begin(): \n s = turtle.Turtle()\n s.hideturtle()\n s.penup()\n s.speed(0)\n s.goto(0,-150)\n s.write('3')\n time.sleep(1)\n s.clear()\n s.write('2')\n time.sleep(1)\n s.clear()\n s.write('1')\n time.sleep(1)\n s.clear()\n s.write('Start!')\n time.sleep(1)\n s.clear()\n",e.setups_.move="\ndef move(x, y):\n try:\n t = tower[x].pop(-1)\n a = tower_num[x].pop(-1)\n if tower_num[y]!=[]:\n b = tower_num[y][-1]\n if athis.#t.on("display",t)[0],wm.configure({output:t=>{this.#t.run("output",{content:t})},read:this.readFile.bind(this),inputfun:this.skInput.bind(this),inputfunTakesPrompt:!0,execLimit:Number.POSITIVE_INFINITY,fileread:this.fileread.bind(this),filewrite:this.filewrite.bind(this),__future__:wm.python3}),wm.builtins.value=new wm.builtin.func((function(){return wm.ffi.remapToPy(void 0===Im?5:Im)})),wm.builtins.set_value=new wm.builtin.func((function(t){Im=t.v})),wm.builtinFiles.files["./mixpy.py"]='import math\r\n\r\ndef math_map(v, al, ah, bl, bh):\r\n return bl + (bh - bl) * (v - al) / (ah - al)\r\n\r\ndef math_mean(myList):\r\n localList = [e for e in myList if type(e) == int or type(e) == float]\r\n if not localList: return\r\n return float(sum(localList)) / len(localList)\r\n\r\ndef math_median(myList):\r\n localList = sorted([e for e in myList if type(e) == int or type(e) == float])\r\n if not localList: return\r\n if len(localList) % 2 == 0:\r\n return (localList[len(localList) // 2 - 1] + localList[len(localList) // 2]) / 2.0\r\n else:\r\n return localList[(len(localList) - 1) // 2]\r\n\r\ndef math_modes(some_list):\r\n modes = []\r\n # Using a lists of [item, count] to keep count rather than dict\r\n # to avoid "unhashable" errors when the counted item is itself a list or dict.\r\n counts = []\r\n maxCount = 1\r\n for item in some_list:\r\n found = False\r\n for count in counts:\r\n if count[0] == item:\r\n count[1] += 1\r\n maxCount = max(maxCount, count[1])\r\n found = True\r\n if not found:\r\n counts.append([item, 1])\r\n for counted_item, item_count in counts:\r\n if item_count == maxCount:\r\n modes.append(counted_item)\r\n return modes\r\n\r\ndef math_standard_deviation(numbers):\r\n n = len(numbers)\r\n if n == 0: return\r\n mean = float(sum(numbers)) / n\r\n variance = sum((x - mean) ** 2 for x in numbers) / n\r\n return math.sqrt(variance)\r\n\r\ndef lists_sort(my_list, type, reverse):\r\n def try_float(s):\r\n try:\r\n return float(s)\r\n except:\r\n return 0\r\n key_funcs = {\r\n "NUMERIC": try_float,\r\n "TEXT": str,\r\n "IGNORE_CASE": lambda s: str(s).lower()\r\n }\r\n key_func = key_funcs[type]\r\n list_cpy = list(my_list)\r\n return sorted(list_cpy, key=key_func, reverse=reverse)'}readFile(t){if(void 0!==Em[t])return wm.misceval.promiseToSuspension(fetch(Em[t]).then((t=>t.text())));if(void 0===wm.builtinFiles||void 0===wm.builtinFiles.files[t])throw"File not found: '"+t+"'";return wm.builtinFiles.files[t]}fileread(t,e){return this.mixpyProject.exist(t)?this.mixpyProject.getFileContent(t):-1!==e.indexOf("w")?(this.mixpyProject.add(t,"",1),""):null}filewrite(t,e){var n=t.name;this.mixpyProject.modify(n,e),this.mixpyProject.select(n)}skInput(t){return new Promise(((e,n)=>{this.#t.run("input",{content:{prompt:t},resolve:e,reject:n})}))}reset(){wm.execLimit=Number.POSITIVE_INFINITY,wm.TurtleGraphics.reset&&wm.TurtleGraphics.reset()}kill(){window.SPRITE.kill(),wm.execLimit=0,this.executionEnd_()}step(t,e,n,i){if(".py"==i){var s=this.executionBuffer.step,r=this.parseGlobals(t);this.executionBuffer.trace.push({step:s,filename:i,line:e,column:n,properties:r.properties,modules:r.modules}),this.executionBuffer.step=s+1,this.executionBuffer.last_step=s+1,this.executionBuffer.line_number=e}}analyzeVariables(){if(""==this.main.model.programs.__main__().trim())return{}}analyze(){return this.main.model.execution.status("analyzing"),""!=this.main.model.programs.__main__().trim()||(this.main.components.feedback.emptyProgram("You haven't written any code yet!"),!1)}run(t){this.reset(),-1===t.indexOf("import sprite")&&-1===t.indexOf("from sprite import")||window.SPRITE.runit(wm.TurtleGraphics.target),this.programStatus.running=!0,wm.misceval.asyncToPromise((()=>wm.importMainWithBody("",!1,t,!0))).then((()=>{window.SPRITE.running=!1,this.programStatus.running=!1,this.#t.run("finished")})).catch((t=>{j.Debug.error(t),window.SPRITE.running=!1,this.programStatus.running=!1,this.#t.run("error",t);var e=function(t){return"string"==typeof t?t:void 0!==t.tp$str?t.tp$str().v:t.name+": "+t.message}(t);this.#t.run("finished"),-1===e.indexOf("TimeLimitError")&&this.executionEnd_()}))}setupEnvironment(t,e,n,i,s){var r=this.main.model;this._backup_execution=wm.afterSingleExecution,wm.afterSingleExecution=void 0,wm.builtins.get_output=new wm.builtin.func((function(){return wm.builtin.pyCheckArgs("get_output",arguments,0,0),wm.ffi.remapToPy(r.execution.output())})),wm.builtins.reset_output=new wm.builtin.func((function(){wm.builtin.pyCheckArgs("reset_output",arguments,0,0),r.execution.output.removeAll()})),wm.builtins.log=new wm.builtin.func((function(t){wm.builtin.pyCheckArgs("log",arguments,1,1),console.log(t)})),wm.builtins._trace=e,wm.builtins._final_values=s,wm.builtins.code=wm.ffi.remapToPy(t),wm.builtins.set_success=this.instructor_module.set_success,wm.builtins.set_feedback=this.instructor_module.set_feedback,wm.builtins.set_finished=this.instructor_module.set_finished,wm.builtins.count_components=this.instructor_module.count_components,wm.builtins.no_nonlist_nums=this.instructor_module.no_nonlist_nums,wm.builtins.only_printing_properties=this.instructor_module.only_printing_properties,wm.builtins.calls_function=this.instructor_module.calls_function,wm.builtins.get_property=this.instructor_module.get_property,wm.builtins.get_value_by_name=this.instructor_module.get_value_by_name,wm.builtins.get_value_by_type=this.instructor_module.get_value_by_type,wm.builtins.parse_json=this.instructor_module.parse_json,wm.skip_drawing=!0,r.settings.mute_printer(!0)}disposeEnvironment(){wm.afterSingleExecution=this._backup_execution,wm.builtins.get_output=void 0,wm.builtins.reset_output=void 0,wm.builtins.log=void 0,wm.builtins._trace=void 0,wm.builtins.trace=void 0,wm.builtins.code=void 0,wm.builtins.set_success=void 0,wm.builtins.set_feedback=void 0,wm.builtins.set_finished=void 0,wm.builtins.count_components=void 0,wm.builtins.calls_function=void 0,wm.builtins.get_property=void 0,wm.builtins.get_value_by_name=void 0,wm.builtins.get_value_by_type=void 0,wm.builtins.no_nonlist_nums=void 0,wm.builtins.only_printing_properties=void 0,wm.builtins.parse_json=void 0,wm.skip_drawing=!1,Im=void 0,this.main.model.settings.mute_printer(!1)}parseGlobals(t){var e=Array(),n=Array();for(var i in t){var s=t[i];if("__name__"!==i&&"__doc__"!==i){i=i.replace("_$rw$","").replace("_$rn$","");var r=this.parseValue(i,s);null!==r?e.push(r):s.constructor==wm.builtin.module&&n.push(s.$d.__name__.v)}}return{properties:e,modules:n}}parseValue(t,e){if(null==e)return{name:t,type:"Unknown",value:"Undefined"};switch(e.constructor){case wm.builtin.func:return{name:t,type:"Function",value:void 0!==e.func_code.co_varnames?" Arguments: "+e.func_code.co_varnames.join(", "):" No arguments"};case wm.builtin.module:return null;case wm.builtin.str:return{name:t,type:"String",value:e.$r().v};case wm.builtin.none:return{name:t,type:"None",value:"None"};case wm.builtin.bool:return{name:t,type:"Boolean",value:e.$r().v};case wm.builtin.nmber:return{name:t,type:"int"==e.skType?"Integer":"Float",value:e.$r().v};case wm.builtin.int_:return{name:t,type:"Integer",value:e.$r().v};case wm.builtin.float_:return{name:t,type:"Float",value:e.$r().v};case wm.builtin.tuple:return{name:t,type:"Tuple",value:e.$r().v};case wm.builtin.list:return e.v.length<=20?{name:t,type:"List",value:e.$r().v,exact_value:e}:{name:t,type:"List",value:"[... "+e.v.length+" elements ...]",exact_value:e};case wm.builtin.dict:return{name:t,type:"Dictionary",value:e.$r().v};case Number:return{name:t,type:e%1==0?"Integer":"Float",value:e};case String:return{name:t,type:"String",value:e};case Boolean:return{name:t,type:"Boolean",value:e?"True":"False"};default:return{name:t,type:null==e.tp$name?e:e.tp$name,value:null==e.$r?e:e.$r().v}}}}const Om=$;var Mm=n.n(Om);class Cm extends j.PageBase{static{j.HTMLTemplate.add("html/statusbar/statusbar-image.html",new j.HTMLTemplate('\r\n
\r\n
\r\n
')),this.init=function(){j.StatusBarsManager.typesRegistry.register(["images"],Cm);const t=j.Workspace.getMain().getStatusBarsManager();t.add({type:"images",id:"images",name:Y.Msg.MIXLY_MICROBIT_IMAGE,title:Y.Msg.MIXLY_MICROBIT_IMAGE}),t.changeTo("output")}}constructor(){super();const t=Mm()(j.HTMLTemplate.get("html/statusbar/statusbar-image.html").render());this.setContent(t)}init(){super.init(),this.hideCloseBtn()}clean(){this.getContent().empty()}display(t){const e=this.getContent(),n=function(t){t.style.width="auto",t.style.height="auto",t.style.maxWidth="100%",t.style.maxHeight="100%"};this.clean();let i=t.content,s=null,r=null;switch(t.display_type){case"p5":i.style.width="100%",i.style.height="100%",i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center",new MutationObserver((function(t){t.forEach((t=>t.addedNodes.forEach((t=>{const e=t;null!=e.tagName&&["canvas","video"].includes(e.tagName.toLowerCase())&&n(e)}))))})).observe(i,{childList:!0}),i.querySelectorAll("canvas,video").forEach(n),e.append(i);break;case"matplotlib":s=i.querySelector("canvas"),s&&(i=s),i.style.width="",i.style.height="",i.style.maxWidth="100%",i.style.maxHeight="100%",e.append(i);break;case"ocaml-canvas":i.style.width="",i.style.height="",i.style.maxWidth="100%",i.style.maxHeight="100%",e.append(i);break;case"turtle":i.setAttribute("width","100%"),i.setAttribute("height","100%"),e.append(i.outerHTML);break;case"sympy":e.append(t.content),void 0===window.MathJax?(console.log("Loading MathJax (Sympy expression needs it)."),function(){let t=document.createElement("script");t.type="text/javascript",t.src="https://cdn.jsdelivr.net/npm/mathjax@3.0.5/es5/tex-mml-chtml.js",document.getElementsByTagName("head")[0].appendChild(t)}()):window.MathJax.typeset();break;case"multiple":for(let n of["image/svg+xml","image/png","text/html","text/plain"])if(n in t.content){let i=t.content[n];"image/png"===n&&(i=''),e.append(i);break}break;case"tutor":if(e.append(Mm()(t.content.replace("overflow-y%3A%20hidden%3B",""))),r=this.getContent()[0].getElementsByTagName("iframe")[0],null==r)return;r.style.maxHeight=r.style.minHeight="100%",new IntersectionObserver(((t,e)=>{const n=t[0];n&&!n.isIntersecting||(r.contentWindow?.postMessage({type:"redraw"},"*"),e.disconnect())})).observe(r);break;default:console.error(`Not supported node type '${t.display_type}' in eval.display result processing.`)}}}const Rm=Cm;class xm{static{this.pythonShell=null,this.init=async function(){Rm.init(),this.pythonShell=new xm},this.run=function(){const t=j.Workspace.getMain().getEditorsManager().getActive().getCode();return this.pythonShell.run(t)},this.stop=function(){return this.pythonShell.stop()}}#e=null;#n=null;#i=null;#s={row:0,column:0};#r="";#o=null;#a=null;#l=!1;#u=!1;#c=null;#p=()=>this.#h();#_=[{name:"REPL-Enter",bindKey:"Enter",exec:t=>{if(t.getSession().selection.getCursor().row===this.#s.row){const t=this.#e.getEndPos();let e=this.#e.getValueRange(this.#s,t);return e=e.replace(this.#r,""),this.#o?.(e),this.#o=null,this.#a=null,this.#e.addValue("\n"),this.#d(),!0}return!1}},{name:"REPL-ChangeEditor",bindKey:"Delete|Ctrl-X|Backspace",exec:t=>{const e=t.getSession().selection.getCursor();return e.row{this.#u=!1,this.#e.addValue(`\n==${j.Msg.Lang["shell.finish"]}==`)})),t.bind("output",(t=>{this.#e.addValue(t.content)})),t.bind("error",(t=>{this.#u=!1,this.#e.addValue(`\n${t.toString()}\n`)})),t.bind("input",(t=>{const e=String(t?.content?.prompt);this.#e.addValue(`>>> ${e}`),this.#r=e,this.#o=t.resolve,this.#a=t.reject,this.#m()})),t.bind("display",(t=>{this.#i.changeTo("images"),this.#n.display(t)}))}#h(){const t=this.#e.getEditor(),e=t.getSession().selection.getCursor();t.setReadOnly(e.rowsetTimeout(e,t)))}}const Nm=xm,Lm={init:function(){Nm.init();const t=j.app.getNav();t.register({icon:"icon-play-circled",title:"",id:"python-run-btn",displayText:Y.Msg.MSG.run,preconditionFn:()=>!0,callback:()=>{Nm.run().catch(j.Debug.error)},scopeType:j.Nav.Scope.LEFT,weight:4}),t.register({icon:"icon-cancel",title:"",id:"python-stop-btn",displayText:Y.Msg.MSG.stop,preconditionFn:()=>!0,callback:()=>{Nm.stop().catch(j.Debug.error)},scopeType:j.Nav.Scope.LEFT,weight:5})}};Lm.init(),Object.assign(Y.Variables,X),Object.assign(Y.Procedures,q),Y.Python=J,Y.generator=J,j.Profile.default={},Object.assign(Y.Blocks,t,e,i,s,r,o,a,l,u,c,p,h,_,d,f,m,g,b,S,k),Object.assign(Y.Python.forBlock,T,y,v,w,E,I,A,O,M,C,R,x,N,L,D,F,P,B,V,U)})()})(); \ No newline at end of file +class z{constructor(t,e){if(this.variablePrefix_=e||"",this.reservedDict_=Object.create(null),t)for(var n=t.split(","),i=0;i0?e.join("\n")+n.join("\n")+i.join("\n")+o.join("\n")+a.join("")+t+"while True:\n"+l.join("")+u.join("\n"):e.join("\n")+n.join("\n")+i.join("\n")+o.join("\n")+a.join("")+t+u.join("\n")},J.scrubNakedValue=function(t){return t+"\n"},J.quote_=function(t){var e="'";return-1!==t.indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},J.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},J.scrub_=function(t,e,n){var i="";if(!t.outputConnection||!t.outputConnection.targetConnection){(r=t.getCommentText())&&(r=Y.utils.string.wrap(r,J.COMMENT_WRAP-3),i+=J.prefixLines(r+"\n","# "));for(var s=0;s0?"int("+a+" + "+s+")":s<0?"int("+a+" - "+-s+")":"int("+a+")",i&&(a="-"+a)),a};const K=330,Q={init:function(){this.setColour(K),this.appendDummyInput().appendField(new Y.FieldTextInput(""),"VAR"),this.setOutput(!0),this.setTooltip(Y.Msg.VARIABLES_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){W.equals(t,this.getFieldValue("VAR"))&&this.setFieldValue(e,"VAR")}},Z={init:function(){this.setColour(K),this.appendValueInput("VALUE").appendField(new Y.FieldTextInput(""),"VAR").appendField(Y.Msg.MIXLY_VALUE2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.VARIABLES_SET_TOOLTIP)},getVars:function(){var t=this.getFieldValue("VAR");return null==t?[]:t.split(",")},renameVar:function(t,e){W.equals(t,this.getFieldValue("VAR"))&&this.setFieldValue(e,"VAR")}},tt={init:function(){this.setColour(K);var t=[[Y.Msg.LANG_MATH_INT,"int"],[Y.Msg.LANG_MATH_FLOAT,"float"],[Y.Msg.LANG_MATH_BOOLEAN,"bool"],[Y.Msg.LANG_MATH_STRING,"str"],[Y.Msg.MIXLY_MICROBIT_TYPE_LIST,"list"],[Y.Msg.MIXLY_MICROBIT_TYPE_TUPLE,"tuple"],[Y.Msg.MIXLY_MICROBIT_TYPE_DICT,"dict"],[Y.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,"set"],[Y.Msg.LANG_MATH_BYTE,"bytes"]];this.appendValueInput("MYVALUE").appendField(new Y.FieldDropdown(t),"OP"),this.setOutput(!0)}},et={init:function(){this.setColour(K),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_PYTHON_GLOBAL).setCheck("var"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Y.Msg.TEXT_PRINT_TOOLTIP)}},nt={init:function(){this.setColour(K),this.appendValueInput("DATA").appendField(Y.Msg.MICROBIT_PYTHON_TYPE),this.setOutput(!0),this.setTooltip(Y.Msg.MICROBIT_PYTHON_TYPE)}},it={init:function(){this.setColour(K),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_CONTORL_GET_TYPE).appendField(new Y.FieldDropdown([[Y.Msg.LANG_MATH_INT,"int"],[Y.Msg.MIXLY_MICROBIT_TYPE_FLOAT,"float"],[Y.Msg.MIXLY_MICROBIT_TYPE_STRING,"str"],[Y.Msg.MIXLY_MICROBIT_TYPE_LIST,"list"],[Y.Msg.MIXLY_MICROBIT_TYPE_TUPLE,"tuple"],[Y.Msg.MIXLY_MICROBIT_TYPE_DICT,"dict"],[Y.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,"set"],[Y.Msg.LANG_MATH_BYTE,"bytes"],[Y.Msg.LOGIC_NULL,"type(None)"]]),"type"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("type");return Y.Msg.MICROBIT_controls_TypeLists+{int:Y.Msg.LANG_MATH_INT,float:Y.Msg.MIXLY_MICROBIT_TYPE_FLOAT,str:Y.Msg.MIXLY_MICROBIT_TYPE_STRING,list:Y.Msg.MIXLY_MICROBIT_TYPE_LIST,tuple:Y.Msg.MIXLY_MICROBIT_TYPE_TUPLE,dict:Y.Msg.MIXLY_MICROBIT_TYPE_DICT,set:Y.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,image:Y.Msg.MIXLY_MICROBIT_IMAGE,bytes:Y.Msg.LANG_MATH_BYTE,NoneType:Y.Msg.LOGIC_NULL}[e]}))}},st={init:function(){this.setColour(K),this.itemCount_=2,this.updateShape_(),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setMutator(new Y.icons.MutatorIcon(["lists_zip_item"],this)),this.setTooltip(Y.Msg.MIXLY_PYTHON_LISTS_ZIP_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_zip_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;i0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?n[s]=e.getInputTargetBlock("IF"+s).previousConnection:n[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?i[s]=e.getInputTargetBlock("DO"+s).previousConnection:i[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Y.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(Y.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Y.Msg.CONTROLS_IF_MSG_ELSE);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"IF"+s);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var n=e.getInput("STACK").connection,i=1;i<=this.elseifCount_;i++){var s=t.newBlock("controls_if_elseif");s.initSvg(),n.connect(s.previousConnection),n=s.nextConnection}if(this.elseCount_){var r=t.newBlock("controls_if_else");r.initSvg(),n.connect(r.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var n=t.getInputTargetBlock("STACK"),i=[null],s=[null],r=null;n;){switch(n.type){case"controls_if_elseif":this.elseifCount_++,i.push(n.valueConnection_),s.push(n.statementConnection_);break;case"controls_if_else":this.elseCount_++,r=n.statementConnection_;break;default:throw Error("Unknown block type: "+n.type)}n=n.nextConnection&&n.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(i,s,r)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),n=1;e;){switch(e.type){case"controls_if_elseif":var i=this.getInput("IF"+n),s=this.getInput("DO"+n);e.valueConnection_=i&&i.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,n++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],n=null;this.getInput("ELSE")&&(n=this.getInput("ELSE").connection.targetConnection);for(var i=1;this.getInput("IF"+i);){var s=this.getInput("IF"+i),r=this.getInput("DO"+i);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(r.connection.targetConnection),i++}this.updateShape_(),this.reconnectChildBlocks_(t,e,n)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Y.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(Y.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(Y.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,n){for(var i=1;i<=this.elseifCount_;i++)t[i]&&t[i].reconnect(this,"IF"+i),e[i]&&e[i].reconnect(this,"DO"+i);n&&n.reconnect(this,"ELSE")}},dt={init:function(){this.setColour(lt),this.appendValueInput("FROM").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.PYTHON_RANGE).appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},ft={init:function(){this.setColour(lt),this.appendValueInput("LIST").setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(Y.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(Y.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return Y.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Y.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},mt={init:function(){this.setColour(lt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(Y.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new Y.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(Y.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+Y.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:Y.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Y.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},gt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(Y.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Y.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(Y.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,n=[],i=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?n[s]=e.getInputTargetBlock("IF"+s).previousConnection:n[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?i[s]=e.getInputTargetBlock("DO"+s).previousConnection:i[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(Y.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Y.Msg.MIXLY_PYTHON_FINALLY);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"IF"+s);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var n=e.getInput("STACK").connection,i=1;i<=this.elseifCount_;i++){var s=t.newBlock("controls_except");s.initSvg(),n.connect(s.previousConnection),n=s.nextConnection}if(this.elseCount_){var r=t.newBlock("controls_finally");r.initSvg(),n.connect(r.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var n=t.getInputTargetBlock("STACK"),i=[null],s=[null],r=null;n;){switch(n.type){case"controls_except":this.elseifCount_++,i.push(n.valueConnection_),s.push(n.statementConnection_);break;case"controls_finally":this.elseCount_++,r=n.statementConnection_;break;default:throw Error("Unknown block type: "+n.type)}n=n.nextConnection&&n.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(i,s,r)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),n=1;e;){switch(e.type){case"controls_except":var i=this.getInput("IF"+n),s=this.getInput("DO"+n);e.valueConnection_=i&&i.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,n++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],n=null;this.getInput("ELSE")&&(n=this.getInput("ELSE").connection.targetConnection);for(var i=1;this.getInput("IF"+i);){var s=this.getInput("IF"+i),r=this.getInput("DO"+i);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(r.connection.targetConnection),i++}this.updateShape_(),this.reconnectChildBlocks_(t,e,n)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(Y.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(Y.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,n){for(var i=1;i<=this.elseifCount_;i++)t[i]&&t[i].reconnect(this,"IF"+i),e[i]&&e[i].reconnect(this,"DO"+i);n&&n.reconnect(this,"ELSE")}},bt={init:function(){this.setColour(lt);var t=new Y.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(Y.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:Y.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:Y.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(Y.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},St={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Y.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Y.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Y.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Y.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},kt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new Y.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(Y.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return Y.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Y.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};mt.OPERATORS=[[Y.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Y.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],bt.OPERATORS=[[Y.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Y.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Tt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(Y.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},yt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},vt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(Y.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},$t={init:function(){this.setColour(lt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},wt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(Y.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},Et={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(Y.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},It={init:function(){this.jsonInit({message0:Y.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:lt,tooltip:Y.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Y.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},At={init:function(){this.setColour(lt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(Y.Msg.MIXLY_STAT),this.setOutput(!0)}},Ot={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},Mt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(Y.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},Ct={init:function(){this.appendDummyInput().appendField(Y.Msg.CONTROLS_REPEAT_TITLE_REPEAT+Y.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(Y.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new Y.FieldDropdown([[Y.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[Y.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(lt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},Rt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},xt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},Nt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},Lt={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_GET+Y.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Y.Msg.PROCEDURES_DEFRETURN_RETURN+Y.Msg.MIXLY_GET_UNIQUE_IDEN)}},Dt={init:function(){this.setColour(lt),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(Y.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},Ft={init:function(){this.setColour(lt),this.appendDummyInput().appendField(Y.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},Pt=230;Y.FieldTextInput.math_number_validator=function(t){return String(t)},Y.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const Bt={init:function(){this.setColour(Pt),this.appendDummyInput().appendField(new Y.FieldTextInput("0",Y.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MATH_NUMBER_TOOLTIP)}},Vt={init:function(){this.setColour(Pt);this.appendDummyInput("").appendField(Y.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Y.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Y.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:Y.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},Ut={init:function(){this.setColour(Pt);this.appendDummyInput("").appendField(Y.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new Y.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:Y.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:Y.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},Yt={init:function(){this.setColour(Pt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Y.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Y.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Y.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Y.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Y.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Y.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Y.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Y.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},jt={init:function(){this.setColour(Pt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Y.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:Y.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Y.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Y.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Y.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:Y.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:Y.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Y.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Gt={init:function(){this.setColour(Pt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new Y.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Xt={init:function(){this.setColour(Pt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new Y.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:Y.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Y.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Y.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Y.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Y.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Y.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:Y.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Ht={init:function(){var t=[[Y.Msg.MATH_BIN,"bin"],[Y.Msg.MATH_OCT,"oct"],[Y.Msg.MATH_HEX,"hex"]];this.setColour(Pt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new Y.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:Y.Msg.MATH_DEC_TOOLTIP_BIN,oct:Y.Msg.MATH_DEC_TOOLTIP_OCT,hex:Y.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},qt={init:function(){var t=[[Y.Msg.LANG_MATH_TO_ROUND,"round"],[Y.Msg.LANG_MATH_TO_CEIL,"ceil"],[Y.Msg.LANG_MATH_TO_FLOOR,"floor"],[Y.Msg.MATH_ABS,"fabs"],[Y.Msg.MATH_SQRT,"sqrt"]];this.setColour(Pt),this.appendValueInput("A").setCheck(Number).appendField(new Y.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:Y.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:Y.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:Y.Msg.MATH_SINGLE_TOOLTIP_SQ,round:Y.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:Y.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:Y.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},zt={init:function(){var t=[[Y.Msg.MIXLY_MAX,"max"],[Y.Msg.MIXLY_MIN,"min"]];this.setColour(Pt),this.appendValueInput("A").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(new Y.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(Y.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:Y.Msg.MIXLY_TOOLTIP_MATH_MAX,min:Y.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Wt={init:function(){var t=[[Y.Msg.MATH_TWO,"two"],[Y.Msg.MATH_EIGHT,"eight"],[Y.Msg.MATH_TEN,"ten"],[Y.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(Pt),this.appendDummyInput("").appendField(Y.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new Y.FieldDropdown(t),"OP").appendField(Y.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(Y.Msg.MATH_ZHW).appendField(new Y.FieldDropdown(t),"OP2").appendField(Y.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),n={two:Y.Msg.MATH_Before_two,eight:Y.Msg.MATH_Before_eight,ten:Y.Msg.MATH_Before_ten,sixteen:Y.Msg.MATH_Before_sixteen},i=e.getFieldValue("OP2"),s={two:Y.Msg.MATH_Behind_two,eight:Y.Msg.MATH_Behind_eight,ten:Y.Msg.MATH_Behind_ten,sixteen:Y.Msg.MATH_Behind_sixteen};return n[t]+s[i]}))}},Jt={init:function(){var t=[[Y.Msg.LANG_MATH_INT,"int"],[Y.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Pt),this.setOutput(!0,Number),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_RANDOM).appendField(new Y.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(Y.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),n={int:Y.Msg.LANG_MATH_INT,float:Y.Msg.LANG_MATH_FLOAT_RANDOM};return Y.Msg.MATH_RANDOM_INT_TOOLTIP+n[t]}))}},Kt={init:function(){this.setColour(Pt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(Y.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(Y.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(Y.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(Y.Msg.MATH_CONSTRAIN_TOOLTIP)}},Qt={init:function(){this.setColour(Pt),this.appendValueInput("NUM",Number).appendField(Y.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(Y.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(Y.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_MATH_MAP)}},Zt={init:function(){this.setColour(Pt),this.appendDummyInput().appendField(new Y.FieldTextInput("0",Y.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(Y.Msg.MATH_NUMBER_TOOLTIP)}},te={init:function(){this.setColour(Pt),this.appendValueInput("NUM").setCheck(Number).appendField(Y.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},ee={init:function(){this.setColour(Pt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(Y.Msg.MATH_ROUND).appendField(Y.Msg.TEXT_KEEP),this.appendDummyInput().appendField(Y.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(Y.Msg.MATH_ROUND_NEW_TOOLTIP)}},ne={init:function(){var t=[[Y.Msg.MIXLY_TO_INT,"int"],[Y.Msg.MIXLY_TO_FLOAT,"float"],[Y.Msg.MIXLY_TO_BITES,"b"],[Y.Msg.LANG_MATH_BYTE+Y.Msg.MIXLY_TO_INT,"bti"]];this.setColour(Pt),this.appendValueInput("VAR").appendField(new Y.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Y.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:Y.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:Y.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},ie={init:function(){var t=[[Y.Msg.MIXLY_TO_INT,"int"],[Y.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Pt),this.appendValueInput("VAR").appendField(new Y.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:Y.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:Y.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},se=Qt,re={init:function(){this.setColour(Pt),this.appendValueInput("VAR").appendField(Y.Msg.LANG_MATH_BYTE+Y.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},oe={init:function(){this.setColour(Pt),this.itemCount_=1,this.setMutator(new Y.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(Y.Msg.MIXLY_PRODUCT+Y.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(Y.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(Y.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(Y.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;i1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const he={init:function(){this.setColour(ue),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Y.FieldTextInput("",Y.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(Y.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new Y.FieldImage(e,7,12,'"')}},_e={init:function(){this.setColour(ue),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(Y.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},de={init:function(){this.setColour(ue),this.appendValueInput("VAR").setCheck(Number).appendField(Y.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},fe={init:function(){this.setColour(ue),this.appendValueInput("VAR").setCheck(String).appendField(Y.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},me={init:function(){this.setColour(ue),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},ge={init:function(){this.setColour(ue),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},be={init:function(){this.WHERE_OPTIONS=[[Y.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Y.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Y.Msg.TEXT_GET_INDEX_RANDOM+1+Y.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(Y.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(Y.Msg.LISTS_GET_INDEX_GET,"MODE"),Y.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Y.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=t.getFieldValue("WHERE"),i="";switch(e+" "+n){case"GET FROM_START":case"GET FROM_END":i=Y.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":i=Y.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":i=Y.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":i=Y.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=n&&"FROM_END"!=n||(i+=" "+Y.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",Y.Msg.ONE_BASED_INDEXING?"#1":"#0")),i}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),n={FROM_START:Y.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:Y.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:Y.Msg.TEXT_GET_INDEX_RANDOM};return Y.Msg.PROCEDURES_DEFRETURN_RETURN+Y.Msg.MIXLY_MICROBIT_TYPE_STRING+n[t]+"n"+Y.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==Y.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),Y.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(Y.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new Y.FieldDropdown(this.WHERE_OPTIONS,(function(e){var n="FROM_START"==e||"FROM_END"==e;if(n!=t){var i=this.sourceBlock_;return i.updateAt_(n),i.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),Y.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Se={init:function(){this.setHelpUrl(Y.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(Y.Msg.LISTS_GET_INDEX_GET+" "+Y.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(Y.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(Y.Msg.PROCEDURES_DEFRETURN_RETURN+Y.Msg.MIXLY_MICROBIT_TYPE_STRING+Y.Msg.LISTS_GET_INDEX_FROM_START+"n"+Y.Msg.TEXT_CHARAT2)}},ke={init:function(){this.setHelpUrl(Y.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(Y.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(Y.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Te={init:function(){this.WHERE_OPTIONS_1=[[Y.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Y.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Y.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[Y.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Y.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Y.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(Y.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(Y.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==Y.INPUT_VALUE;t.setAttribute("at1",e);var n=this.getInput("AT2").type==Y.INPUT_VALUE;return t.setAttribute("at2",n),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),n="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,n)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),Y.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(Y.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var n=new Y.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(n){var i="FROM_START"==n||"FROM_END"==n;if(i!=e){var s=this.sourceBlock_;return s.updateAt_(t,i),s.setFieldValue(n,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(n,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},ye={init:function(){this.setHelpUrl(Y.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(Y.Msg.LISTS_GET_INDEX_GET+" "+Y.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(Y.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(Y.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(Y.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},ve={init:function(){var t=[[Y.Msg.MIXLY_EQUALS,"==="],[Y.Msg.MIXLY_STARTSWITH,"startswith"],[Y.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(ue),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new Y.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},$e={init:function(){this.setColour(ue),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(Y.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_COMPARETO_HELP)}},we={init:function(){var t=[[Y.Msg.TEXT_UPPER,"upper"],[Y.Msg.TEXT_TITLE,"title"],[Y.Msg.TEXT_CAPITALIZE,"capitalize"],[Y.Msg.TEXT_SWAPCASE,"swapcase"],[Y.Msg.TEXT_LOWER,"lower"]];this.setColour(ue),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Y.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:Y.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:Y.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:Y.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:Y.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:Y.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},Ee={init:function(){var t=[[Y.Msg.TEXT_LJUST,"ljust"],[Y.Msg.TEXT_CENTER,"center"],[Y.Msg.TEXT_RJUST,"rjust"]];this.setColour(ue),this.appendValueInput("VAR").appendField(new Y.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(Y.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(Y.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Ie={init:function(){this.setColour(ue),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(Y.Msg.MIXLY_MID+Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(Y.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Ae={init:function(){this.setColour(ue),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(Y.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(Y.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Oe={init:function(){this.setColour(ue),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(Y.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(Y.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},Me={init:function(){this.setColour(ue),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(Y.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(Y.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(Y.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},Ce={init:function(){var t=[[Y.Msg.TEXT_TRIM_BOTH,"strip"],[Y.Msg.TEXT_TRIM_LEFT,"lstrip"],[Y.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(ue),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Y.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new Y.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(Y.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:Y.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:Y.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:Y.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},Re={init:function(){this.setColour(ue),this.appendDummyInput("").appendField(Y.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new Y.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Y.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(Y.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;ie?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Y.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},On={init:function(){this.setColour(In),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(Y.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Mn={init:function(){this.setColour(In),this.appendDummyInput().appendField(Y.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Cn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_KEYS),this.setTooltip(Y.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Rn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Y.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Y.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(Y.Msg.DICTS_GET_TOOLTIP)}},xn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Y.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(Y.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(Y.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(Y.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},Nn={init:function(){this.setColour(In),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Y.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(Y.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Ln={init:function(){this.setColour(In),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(Y.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(Y.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.DICTS_DELETE_TOOLTIP)}},Dn={init:function(){this.setColour(In),this.appendValueInput("DICT2").setCheck("Dict").appendField(Y.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(Y.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(Y.Msg.MIXLY_MID),this.setTooltip(Y.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_CLEAR),this.setTooltip(Y.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Pn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_ITEMS),this.setTooltip(Y.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Bn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_VALUES),this.setTooltip(Y.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Vn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_LENGTH),this.setTooltip(Y.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Un={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.DICT_DELDICT),this.setTooltip(Y.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Yn={init:function(){this.MODE=[[Y.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[Y.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(Y.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(Y.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=Y.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=Y.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==Y.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new Y.FieldDropdown(this.MODE,(function(e){var n="INSERT"==e;if(n!=t){var i=this.sourceBlock_;return i.updateAt_(n),i.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},jn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(Y.Msg.DICTS_ADD_VALUE),this.setTooltip(Y.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},Gn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Y.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(Y.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Xn={init:function(){this.setColour(In),this.appendDummyInput("").appendField(new Y.FieldLabel(Y.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new Y.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(Y.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;ie?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Y.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Hn={init:function(){this.setColour(In),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},qn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_TO_JSON),this.setTooltip(Y.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},zn={init:function(){this.setColour(In),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(Y.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Wn={init:function(){this.setColour(In),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Jn={init:function(){this.setColour(In),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_TO_JSON),this.setTooltip(Y.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Kn=210,Qn={init:function(){var t=Y.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Kn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Y.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:Y.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Y.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Y.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Y.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Y.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Y.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},Zn={init:function(){var t=Y.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=Y.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Kn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Y.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new Y.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},ti={init:function(){var t=[[Y.Msg.LOGIC_OPERATION_AND,"AND"],[Y.Msg.LOGIC_OPERATION_OR,"OR"],[Y.Msg.LOGIC_OPERATION_NOR,"NOR"],[Y.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Kn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new Y.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:Y.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:Y.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:Y.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:Y.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},ei={init:function(){this.setColour(Kn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(Y.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(Y.Msg.LOGIC_NEGATE_TOOLTIP)}},ni={init:function(){var t=[[Y.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[Y.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Kn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new Y.FieldDropdown(t),"BOOL"),this.setTooltip(Y.Msg.LOGIC_BOOLEAN_TOOLTIP)}},ii={init:function(){this.setColour(Kn),this.setOutput(!0),this.appendDummyInput().appendField(Y.Msg.LOGIC_NULL),this.setTooltip(Y.Msg.LOGIC_NULL_TOOLTIP)}},si={init:function(){this.setColour(Kn),this.appendValueInput("A"),this.appendValueInput("B").appendField(Y.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(Y.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},ri={init:function(){var t=[[Y.Msg.TEXT_APPEND_TO,"in"],[Y.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Kn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new Y.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(Y.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Y.Msg.IN)}},oi={init:function(){var t=[[Y.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[Y.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Kn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new Y.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},ai={init:function(){this.setColour(Kn),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},li={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(Y.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},ui={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Y.Msg.MIXLY_USE,i=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,r=Y.Msg.MIXLY_BELONG;return n+{r:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+r+i+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Y.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},ci={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Y.Msg.MIXLY_USE,i=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,r=Y.Msg.MIXLY_BELONG,o=Y.Msg.PY_STORAGE_FILE_OBJECT;return n+{r:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+r+i+s+o}))}},pi={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(Y.Msg.MIXPY_TEXT_ENCODE).appendField(new Y.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Y.Msg.MIXLY_USE,i=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,r=Y.Msg.MIXLY_BELONG,o=Y.Msg.PY_STORAGE_FILE_OBJECT;return n+{r:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+r+i+s+o}))}},hi={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+Y.Msg.MIXLY_MICROBIT_TYPE_STRING+Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},_i={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},di={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,i=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return n+{read:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+i}))}},fi={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Y.Msg.MICROBIT_PYTHON_TYPE)}},mi={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Y.Msg.HTML_FILE),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},gi={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},bi={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},Si={init:function(){this.setColour(0),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};Y.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const ki={init:function(){this.setColour(0),this.appendDummyInput().appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},Ti={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+Y.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},yi={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},vi={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),n=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,i=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return n+" "+{start:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+i}))}},$i={init:function(){this.setColour(0),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},wi={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(Y.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new Y.FieldDropdown([[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Y.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+Y.Msg.MIXLY_ESP32_SET+{mkdir:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Ei={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(Y.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Ii={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Ai={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new Y.FieldDropdown([[Y.Msg.HTML_FILE,"isfile"],[Y.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return Y.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+Y.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:Y.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Oi={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(Y.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(Y.Msg.MIXLY_SETUP+Y.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(Y.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Mi={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(Y.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Ci={init:function(){var t=Y.Procedures.findLegalName("",this),e=new Y.FieldTextInput(t,Y.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new Y.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&Y.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(Y.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(Y.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(Y.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(Y.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=Y.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),Y.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{Y.Events.enable()}},mutationToDom:function(t){var e=Y.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var n=0;n"),this.appendValueInput("style").appendField(Y.Msg.MIXLY_AIP_ATTR).setAlign(Y.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ws={init:function(){this.setColour(Ss),this.appendDummyInput().appendField(Y.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},Es={init:function(){this.setColour(Ss),this.appendDummyInput().appendField(Y.Msg.HTML_FORM_CONTENT).appendField(new Y.FieldDropdown([[Y.Msg.HTML_TEXT,"text"],[Y.Msg.HTML_EMAIL,"email"],[Y.Msg.HTML_NUMBER,"number"],[Y.Msg.HTML_PASSWORD,"password"],[Y.Msg.HTML_CHECKBOX,"checkbox"],[Y.Msg.HTML_RADIOBUTTON,"radiobutton"],[Y.Msg.HTML_BUTTON,"button"],[Y.Msg.HTML_COLOUR,"colour"],[Y.Msg.HTML_DATE,"date"],[Y.Msg.HTML_LOCALTIME,"local time"],[Y.Msg.HTML_FILE,"file"],[Y.Msg.HTML_HIDDEN,"hidden"],[Y.Msg.HTML_IMAGE,"image"],[Y.Msg.HTML_MONTH,"month"],[Y.Msg.HTML_RANGE,"range"],[Y.Msg.HTML_RESET,"reset"],[Y.Msg.HTML_SEARCH,"search"],[Y.Msg.HTML_SUBMIT,"submit"],[Y.Msg.HTML_TELEPHONENUMBER,"telephone number"],[Y.Msg.HTML_TIME,"time"],[Y.Msg.HTML_URL,"url"],[Y.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(Y.Msg.HTML_NAME).appendField(new Y.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(Y.Msg.HTML_VALUE).appendField(new Y.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(Y.Msg.MIXLY_AIP_ATTR).setAlign(Y.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Is={init:function(){this.setColour(Ss),this.appendDummyInput().appendField(new Y.FieldTextInput("property"),"KEY").appendField(":").appendField(new Y.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},As={init:function(){this.setColour(Ss),this.appendDummyInput().appendField(new Y.FieldTextInput("property"),"KEY").appendField(":").appendField(new Y.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Os={init:function(){this.setColour(Ss),this.appendDummyInput().appendField(Y.Msg.HTML_TEXT).appendField(new Y.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ms=160,Cs={init:function(){this.setColour(Ms),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new Y.FieldTable(""),"TEXT")}},Rs={init:function(){this.setColour(Ms),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new Y.FieldMultilineInput(""),"TEXT")}},xs={init:function(){this.setColour(Ms),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new Y.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Ns={init:function(){this.setColour(Ms),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Ls={init:function(){this.setColour(Ms),this.appendDummyInput().appendTitle("Comment:").appendTitle(new Y.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Ds={init:function(){this.setColour(Ms),this.appendValueInput("VALUE").appendField(Y.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Fs={init:function(){this.setColour(Ms),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new Y.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(Y.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=Y.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;i"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("SER").setCheck("Series").appendField(Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Y.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new Y.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldDropdown(e),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Io={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ao={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Oo={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Mo={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Co={init:function(){this.setColour(mo);var t=[[Y.Msg.PYLAB_LABEL_X,"x"],[Y.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_SET_LABEL).appendField(new Y.FieldDropdown(t),"DIR"),this.appendValueInput("LABEL").appendField(Y.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ro={init:function(){this.setColour(mo),this.appendValueInput("FROM").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.MIXLY_SPLITBYDOU).appendField(Y.Msg.MIXPY_DATA_ARRAY_CREATE_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.MIXPY_DATA_ARRAY_CREATE_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(Y.inputs.Align.RIGHT).appendField(Y.Msg.MIXLY_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},xo={init:function(){this.setColour(mo);var t=[[Y.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[Y.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(Y.Msg.MIXLY_DISPLAY_DRAW).appendField(new Y.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{plot:Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:Y.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[t]}))}},No={init:function(){this.setColour(mo);var t=[[Y.Msg.COLOUR_RGB_BLUE,"b"],[Y.Msg.COLOUR_RGB_GREEN,"g"],[Y.Msg.COLOUR_RGB_RED,"r"],[Y.Msg.COLOUR_CYAN,"c"],[Y.Msg.COLOUR_MAGENTA,"m"],[Y.Msg.COLOUR_YELLOW,"y"],[Y.Msg.COLOUR_BLACK,"k"],[Y.Msg.COLOUR_WHITE,"w"]],e=[[Y.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Y.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_SCATTER).appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(Y.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Y.FieldDropdown(e),"DOT"),this.appendDummyInput("").appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},Lo={init:function(){this.setColour(mo);var t=[[Y.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[Y.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[Y.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[Y.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[Y.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[Y.Msg.COLOUR_RGB_BLUE,"b"],[Y.Msg.COLOUR_RGB_GREEN,"g"],[Y.Msg.COLOUR_RGB_RED,"r"],[Y.Msg.COLOUR_CYAN,"c"],[Y.Msg.COLOUR_MAGENTA,"m"],[Y.Msg.COLOUR_YELLOW,"y"],[Y.Msg.COLOUR_BLACK,"k"],[Y.Msg.COLOUR_WHITE,"w"]],n=[[Y.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Y.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[Y.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_PLOT_XY).appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Y.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new Y.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Do={init:function(){this.setColour(mo);var t=[[Y.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[Y.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_BAR).appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(Y.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(Y.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new Y.FieldDropdown(t),"ALIGN"),this.appendDummyInput().appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Fo={init:function(){this.setColour(mo);var t=[[Y.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[Y.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],e=[[Y.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[Y.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[Y.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[Y.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_PIE).appendField(Y.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(Y.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(Y.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new Y.FieldDropdown(e),"autopct"),this.appendDummyInput("").appendField(Y.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new Y.FieldDropdown(t),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Po={init:function(){this.setColour(mo),this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_HIST).appendField(Y.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(Y.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Bo={init:function(){this.setColour(mo);var t=[[Y.Msg.PYLAB_LABEL_X,"x"],[Y.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(Y.Msg.MIXLY_SETTING).appendField(new Y.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_TICKS).appendField(Y.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},Vo={init:function(){var t=[["sin","sin"],["cos","cos"],["tan","tan"],["arcsin","arcsin"],["arccos","arccos"],["arctan","arctan"],[Y.Msg.LANG_MATH_TO_ROUND,"round"],[Y.Msg.LANG_MATH_TO_CEIL,"ceil"],[Y.Msg.LANG_MATH_TO_FLOOR,"floor"]];this.setColour(mo),this.setOutput(!0),this.setInputsInline(!0),this.appendDummyInput().appendField(Y.Msg.mixpy_NUMPY_TRIG),this.appendValueInput("NUM").setCheck(Number).appendField(new Y.FieldDropdown(t),"OP"),this.setTooltip(Y.Msg.mixpy_NUMPY_TRIG_TOOLTIP)}},Uo={init:function(){this.setColour(mo),this.appendValueInput("VET").setCheck(Number).appendField(Y.Msg.mixpy_SUBPLOT).appendField(Y.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(Y.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(Y.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Yo={init:function(){this.setColour(mo),this.appendValueInput("FILENAME").appendField(Y.Msg.MIXPY_PANDAS_READ_CSV),this.appendDummyInput().appendField(new Y.FieldDropdown([[Y.Msg.mixpy_PANDAS_READCSV_HEADER_Y,"0"],[Y.Msg.mixpy_PANDAS_READCSV_HEADER_N,"None"]]),"MODE"),this.appendDummyInput().appendField(Y.Msg.mixpy_PANDAS_READCSV_TITLE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(Y.Msg.mixpy_PANDAS_READCSV_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){Y.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},jo={init:function(){this.setColour(mo),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(Y.Msg.mixpy_DATAFRAME_GET),this.appendDummyInput("").appendField(Y.Msg.mixpy_DATAFRAME_GET_INDEX).appendField(new Y.FieldDropdown([[Y.Msg.DATAFRAME_COLUMN,"column"],[Y.Msg.DATAFRAME_RAW,"raw"]]),"MODE"),this.setOutput(!0),this.setTooltip(Y.Msg.mixpy_DATAFRAME_GET_TOOLTIP)}},Go={init:function(){this.setColour(mo),this.appendValueInput("FILE").setCheck(String).appendField(Y.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Y.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},Xo={init:function(){this.setColour(mo);var t=[[Y.Msg.TEXT_TRIM_LEFT,"right"],[Y.Msg.mixpy_PL_TEXT_CENTER,"center"],[Y.Msg.TEXT_TRIM_RIGHT,"left"]],e=[[Y.Msg.mixpy_PL_TEXT_TOP,"bottom"],[Y.Msg.mixpy_PL_TEXT_CENTER,"center"],[Y.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(Y.Msg.MIXLY_SETTING).appendField(Y.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(Y.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(Y.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(Y.Msg.mixpy_PL_TEXT_HOR).appendField(new Y.FieldDropdown(t),"HALIGN"),this.appendDummyInput("").appendField(Y.Msg.mixpy_PL_TEXT_VER).appendField(new Y.FieldDropdown(e),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(Y.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PL_TEXT_TOOLTIP)}},Ho={init:function(){this.setColour(mo),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_TOARRAY),this.setOutput(!0,"List"),this.setTooltip(Y.Msg.MIXLY_PYTHON_TOOLTIP_TOARRAY)}},qo={init:function(){this.setColour(mo),this.appendValueInput("SER").setCheck("Series").appendField(Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_PLOT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zo={init:function(){this.setColour(mo);var t=[[Y.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[Y.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[Y.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[Y.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[Y.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[Y.Msg.COLOUR_RGB_BLUE,"b"],[Y.Msg.COLOUR_RGB_GREEN,"g"],[Y.Msg.COLOUR_RGB_RED,"r"],[Y.Msg.COLOUR_CYAN,"c"],[Y.Msg.COLOUR_MAGENTA,"m"],[Y.Msg.COLOUR_YELLOW,"y"],[Y.Msg.COLOUR_BLACK,"k"],[Y.Msg.COLOUR_WHITE,"w"]],n=[[Y.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Y.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("SER").setCheck("Series").appendField(Y.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Y.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new Y.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldDropdown(e),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Wo={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Jo={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ko={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qo={init:function(){this.setColour(mo),this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zo={init:function(){this.setColour(mo);var t=[[Y.Msg.PYLAB_LABEL_X,"x"],[Y.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(Y.Msg.blockpy_PYLAB_SET_LABEL).appendField(new Y.FieldDropdown(t),"DIR"),this.appendValueInput("LABEL").appendField(Y.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ta={init:function(){this.setColour(mo);var t=[[Y.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[Y.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(Y.Msg.MIXLY_DISPLAY_DRAW).appendField(new Y.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{plot:Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:Y.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[t]}))}},ea={init:function(){this.setColour(mo);var t=[[Y.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Y.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_SCATTER).appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(Y.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Y.FieldDropdown(t),"DOT"),this.appendDummyInput().appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},na={init:function(){this.setColour(mo);var t=[[Y.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[Y.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[Y.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[Y.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[Y.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[Y.Msg.COLOUR_RGB_BLUE,"b"],[Y.Msg.COLOUR_RGB_GREEN,"g"],[Y.Msg.COLOUR_RGB_RED,"r"],[Y.Msg.COLOUR_CYAN,"c"],[Y.Msg.COLOUR_MAGENTA,"m"],[Y.Msg.COLOUR_YELLOW,"y"],[Y.Msg.COLOUR_BLACK,"k"],[Y.Msg.COLOUR_WHITE,"w"]],n=[[Y.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[Y.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[Y.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_PLOT_XY).appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new Y.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(Y.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new Y.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},ia={init:function(){this.setColour(mo);var t=[[Y.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[Y.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_BAR).appendField(Y.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(Y.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(Y.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new Y.FieldDropdown(t),"ALIGN"),this.appendDummyInput().appendField(Y.Msg.HTML_COLOUR).appendField(new Y.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},sa={init:function(){this.setColour(mo);var t=[[Y.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[Y.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],e=[[Y.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[Y.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[Y.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[Y.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_PIE).appendField(Y.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(Y.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(Y.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new Y.FieldDropdown(e),"autopct"),this.appendDummyInput("").appendField(Y.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new Y.FieldDropdown(t),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},ra={init:function(){this.setColour(mo),this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_HIST).appendField(Y.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(Y.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},oa={init:function(){this.setColour(mo);var t=[[Y.Msg.PYLAB_LABEL_X,"x"],[Y.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(Y.Msg.MIXLY_SETTING).appendField(new Y.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(Y.Msg.mixpy_PYLAB_TICKS).appendField(Y.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(Y.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},aa={init:function(){this.setColour(mo),this.appendValueInput("VET").setCheck(Number).appendField(Y.Msg.mixpy_SUBPLOT).appendField(Y.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(Y.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(Y.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},la={init:function(){this.setColour(mo),this.appendDummyInput("").appendField(Y.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(Y.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},ua={init:function(){this.setColour(mo);var t=[[Y.Msg.TEXT_TRIM_LEFT,"right"],[Y.Msg.mixpy_PL_TEXT_CENTER,"center"],[Y.Msg.TEXT_TRIM_RIGHT,"left"]],e=[[Y.Msg.mixpy_PL_TEXT_TOP,"bottom"],[Y.Msg.mixpy_PL_TEXT_CENTER,"center"],[Y.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(Y.Msg.MIXLY_SETTING).appendField(Y.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(Y.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(Y.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(Y.Msg.mixpy_PL_TEXT_HOR).appendField(new Y.FieldDropdown(t),"HALIGN"),this.appendDummyInput("").appendField(Y.Msg.mixpy_PL_TEXT_VER).appendField(new Y.FieldDropdown(e),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(Y.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.mixpy_PL_TEXT_TOOLTIP)}},ca=20,pa={init:function(){this.setColour(ca),this.appendValueInput("VAR").appendField(Y.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(Y.Msg.INOUT_input_TOOLTIP)}},ha={init:function(){this.setColour(ca),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Y.Msg.BLOCKPY_PRINT_TOOLTIP)}},_a={init:function(){this.setColour(ca),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(Y.Msg.TEXT_PRINT_TOOLTIP)}},da={init:function(){this.setColour(ca),this.appendValueInput("VAR").appendField(Y.Msg.MIXLY_SERIAL_PRINT),this.appendValueInput("END").appendField(Y.Msg.MIXLY_ENDSWITH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(Y.Msg.MIXLY_PYTHON_INOUT_PRINT_END_TOOLTIP)}},fa={init:function(){var t=[[Y.Msg.LANG_MATH_STRING,"str"],[Y.Msg.LANG_MATH_INT,"int"],[Y.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(ca),this.appendDummyInput("").appendField(Y.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new Y.FieldDropdown(t),"DIR"),this.appendValueInput("VAR").appendField(Y.Msg.PROCEDURES_MUTATORCONTAINER_TITLE).setCheck(String),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{str:Y.Msg.MIXLY_MIXPY_INOUT_STR_INPUT_TOOLTIP,int:Y.Msg.MIXLY_MIXPY_INOUT_INT_INPUT_TOOLTIP,float:Y.Msg.MIXLY_MIXPY_INOUT_FLOAT_INPUT_TOOLTIP}[t]}))}},ma={init:function(){this.setColour(ca),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new Y.icons.MutatorIcon(["inout_print_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(Y.Msg.MIXLY_MIXPY_INOUT_PRINT_MANY_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("inout_print_container");e.initSvg();for(var n=e.getInput("STACK").connection,i=0;i= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,n){return"("+t+" <= "+e+") and "+l()+"("+t+", "+e+", "+n+") or "+u()+"("+t+", "+e+", "+n+")"},Y.isNumber(i)&&Y.isNumber(s)&&Y.isNumber(r))i=parseFloat(i),s=parseFloat(s),r=Math.abs(parseFloat(r)),0==i%1&&0==s%1&&0==r%1?(i<=s?(s++,t=0==i&&1==r?s:i+", "+s,1!=r&&(t+=", "+r)):t=i+", "+--s+", -"+r,t="range("+t+")"):(t=i",GTE:">="};const Ep=function(t,e){var n=this.getFieldValue("OP"),i="&&"==n?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",i)||"False",r=e.valueToCode(this,"B",i)||"False";if("AND"==n)var o=s+" and "+r;else if("OR"==n)o=s+" or "+r;else if("NOR"==n)o="not("+s+"^"+r+")";else o=s+"^"+r;return[o,i]},Ip=function(t,e){var n=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",n)||"False"),n]},Ap=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Op=function(t,e){return["None",e.ORDER_ATOMIC]},Mp=function(t,e){var n=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+n+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},Cp=function(t,e){var n=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",i=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[n+" "+this.getFieldValue("BOOL")+" "+i,e.ORDER_ATOMIC]},Rp=function(t,e){var n=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",i=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[n+" "+this.getFieldValue("BOOL")+" "+i,e.ORDER_ATOMIC]},xp=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Np=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Lp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},Dp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Fp=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},Pp=function(t,e){var n=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+n+")\n"},Bp=function(t,e){var n=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+n+"()",e.ORDER_ATOMIC]},Vp=function(t,e){var n=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+n+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Up=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Yp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},jp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},Gp=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Xp=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Hp=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},qp=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},zp=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},Wp=function(t,e){var n=this.getFieldValue("MODE"),i=0;return i="start"==n?0:"current"==n?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+i+")\n"},Jp=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Kp=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},Qp=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},Zp=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},th=function(t,e){e.definitions_.import_os="import os";var n=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+n+")",e.ORDER_ATOMIC]},eh=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},nh=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},ih=function(t,e){var n=e.variableDB_.getName(this.getFieldValue("NAME"),Y.Procedures.NAME_TYPE),i=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(i=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+i);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var r=[],o=0;o\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},Ph=function(t,e){var n=e.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");return"\n"+n+"\n"},Bh=function(t,e){var n=e.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");if("head"==i)var s="<"+i+'>\n\t\n'+n+"\n";else s="<"+i+">\n"+n+"\n";return s},Vh=function(t,e){var n=e.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");return"<"+i+">\n"+n+"\n"},Uh=function(t,e){var n=e.statementToCode(this,"DO"),i=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+i+" >\n"+n+"\n"},Yh=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},jh=function(t,e){return'"},Gh=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Xh=function(){return this.getFieldValue("TEXT")+"\n"},Hh=function(t){return t.getFieldValue("TEXT")+"\n"},qh=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},zh=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},Wh=function(){return""},Jh=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Kh=function(t,e){for(var n=t.getFieldValue("NAME"),i=t.hasReturn_,s=new Array(t.itemCount_),r=0;r6:\n print("路线错乱!程序有误!")\n exit()\n'},f_=function(t,e){return["name[now] != '小科家'",e.ORDER_ATOMIC]},m_=function(t,e){return["name[now] != '学校'",e.ORDER_ATOMIC]},g_=function(){return'res = ""\nfor i in path:\n res = res + name[i] + "→"\nprint(res[:-1])\n'},b_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n=this.getFieldValue("NUM");if(n>=7)var i="print('层数过高!不得高于6层!')\nexit()\n";else i="sprite.clearAllSprites()\n_Hanoicolor = ['blue', 'red', 'yellow', 'green', 'purple', 'black']\n_Hanoi = [[], [], []]\nA = 0\nB = 1\nC = 2\n_n = "+n+"\n_HanoiColumn = [\n sprite.Sprite('HanoiColumn', 200, 320),\n sprite.Sprite('HanoiColumn', 400, 320),\n sprite.Sprite('HanoiColumn', 600, 320)\n]\n_HanoiColumnNumber = [\n sprite.Text('A', 190, 120),\n sprite.Text('B', 390, 120),\n sprite.Text('C', 590, 120)\n]\n_HanoiBlock = []\nfor i in range(0, _n, 1):\n _HanoiBlock.append(sprite.Sprite(_Hanoicolor[i], 200, 400-(_n-i-1)*27))\n _HanoiBlock[i].setScale(25, 30*i+30)\n _Hanoi[0].insert(0, _HanoiBlock[i])\n_steptext = sprite.Text('步数:0', 30, 30)\n_steps = {'steps' : 0}\ntime.sleep(1)\n";return i},S_=function(t,e){var n=e.valueToCode(this,"FROM_NUM",e.ORDER_ATOMIC)||"0",i=e.valueToCode(this,"TO_NUM",e.ORDER_ATOMIC)||"0";return`if len(_Hanoi[${n}])>0 :\n _HanoiBlockMoved = _Hanoi[${n}].pop()\n if len(_Hanoi[${i}]) > 0 :\n _HanoiBlockSuppressed = _Hanoi[${i}].pop()\n if _HanoiBlock.index(_HanoiBlockMoved) > _HanoiBlock.index(_HanoiBlockSuppressed):\n print('非法移动!程序有误!')\n exit()\n else:\n _Hanoi[${i}].append(_HanoiBlockSuppressed)\n _HanoiBlockMoved.slideTo(${n}*200+200, 180, 0.2)\n _HanoiBlockMoved.slideTo(${i}*200+200, 180, 0.5)\n _HanoiBlockMoved.slideTo(${i}*200+200, 400-len(_Hanoi[${i}])*27, 0.2)\n _Hanoi[${i}].append(_HanoiBlockMoved)\n _steps['steps'] += 1\n _steptext.changeText('步数:'+str(_steps['steps']))\nelse :\n print('非法移动!程序有误!')\n exit()\n`},k_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"if 'mode' not in globals() or mode == 0:\n sprite.clearAllSprites()\n ring=[0,0,0,0,0,0,0,0,0,0]\n mode=1\n n=5\n ring[5]=1\n name=['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\n Books = []\n for i in range(1, 11, 1):\n Books.append(sprite.Sprite('books/book'+str(i), (130*i-650) if i>5 else 130*i, 320 if i>5 else 120))\nelse:\n mode=2\n n=len(ring)-1\nring[n]=1\ntime.sleep(1)\n"},T_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"if 'mode' not in globals() or mode == 0:\n sprite.clearAllSprites()\n ring=[0,0,0,0,0,0,0,0,0,0]\n mode=2\n n=5\n name=['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\n Books = []\n for i in range(1, 11, 1):\n Books.append(sprite.Sprite('books/book'+str(i), (130*i-650) if i>5 else 130*i, 320 if i>5 else 120))\nelse:\n mode=1\n n=len(ring)-1\nring[n]=n\nlist=ring\ntemp=Books\ntime.sleep(1)\n"},y_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"res=0\nflag=ring[res]\nBooks[res].filterBrighter()\ntime.sleep(0.1)\nBooks[res].filterOrigin()\n"},v_=function(t,e){return["(('mode' not in globals())or(mode==1 and flag==0)or(mode==2 and not any(value > 0 for value in qian))or(mode==0))",e.ORDER_ATOMIC]},$_=function(t,e){return["(('mode' in globals())and((mode==1 and flag!=0)or(mode==2 and any(value > 0 for value in qian))))",e.ORDER_ATOMIC]},w_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n="res+=1\nflag=ring[res]\n";return n="Books[res].filterGray()\ntime.sleep(0.3)\n"+(n+="Books[res].filterBrighter()\ntime.sleep(0.1)\nBooks[res].filterOrigin()\n")},E_=function(t,e){return["len(list)>=2",e.ORDER_ATOMIC]},I_=function(){return"mid = int(len(list)/2)\nqian = list[0:mid]\nhou = list[mid:]\nqiantemp = temp[0:mid]\nhoutemp = temp[mid:]\n"},A_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"quchu = qian\nlist = hou\nquchutemp = qiantemp\ntemp = houtemp\nfor i in qiantemp:\n i.filterBrighter()\ntime.sleep(0.5)\nfor i in qiantemp:\n i.filterGray()\ntime.sleep(0.5)\n"},O_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"list = quchu\ntemp = quchutemp\nfor i in qiantemp:\n i.filterBrighter()\ntime.sleep(0.5)\nfor i in qiantemp:\n i.filterOrigin()\nfor i in houtemp:\n\ti.filterBrighter()\ntime.sleep(0.5)\nfor i in houtemp:\n i.filterGray()\ntime.sleep(0.5)\n"},M_=function(){return"if 'list' in globals():\n res = list[0]\nBooks[res].filterBrighter()\nprint('未消磁的书籍是第'+str(res+1)+'本《'+name[res%10]+'》。')\nif res!=n:\n print('答案错误!请检查程序!')\nmode=0\n"},C_=function(t,e){var n=this.getFieldValue("NUM");return e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite",`sprite.clearAllSprites()\nring = []\nname = ['小王子','海底两万里','荷花镇的早市','孔子的故事','夏洛的网','草房子','月下看猫头鹰','会唱歌的咖啡磨','父与子','城南旧事']\nBooks = []\nfor i in range(${n}):\n ring.append(0)\nfor i in range(1, ${n}+1, 1):\n Books.append(sprite.Sprite('books/book'+str(i%10 if i%10!=0 else 10), ${{5:"130*i, 120",10:"(130*i-650) if i>5 else 130*i, 320 if i>5 else 120",20:"(65*i-650)+30 if i>10 else 65*i+30, 320 if i>10 else 120",50:"(26*i-650)+50 if i>25 else 26*i+50, 320 if i>25 else 120"}[n]}))\ntime.sleep(1)\nmode=3\n`},R_=function(t,e){e.definitions_.import_sprite="import sprite";return"cnt=0\ncntText = sprite.Text('计数器:0', 30, 200)\n"},x_=function(t,e){e.definitions_.import_sprite="import sprite";return"cnt+=1\ncntText.changeText('计数器:'+str(cnt))\n"},N_=function(t,e){e.definitions_.import_sprite="import sprite";return"print('计数器大小:'+str(cnt))\n"},L_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\n_head = 10\n_foot = 32\n_footText = sprite.Text('脚的数量:', 20, 10)\n_sprite = []\n"},D_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_rabbit = 0\ntime.sleep(1)\n"},F_=function(t,e){return["_rabbit < _head",e.ORDER_ATOMIC]},P_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_chick = _head - _rabbit\nfor i in range(0, _chick, 1):\n _sprite.append(sprite.Sprite('jttl/chick', len(_sprite)*130+130 if len(_sprite)<5 else len(_sprite)*130+130-650, 120 if len(_sprite)<5 else 320))\n\ntime.sleep(0.5)\n_footText.changeText('脚的数量:'+str(_rabbit*4 + _chick*2))\ntime.sleep(1)\n"},B_=function(t,e){return["_rabbit*4 + _chick*2 == _foot",e.ORDER_ATOMIC]},V_=function(t,e){e.definitions_.import_sprite="import sprite";return"print('鸡的数量:'+str(_chick)+'只;\\n兔的数量:'+str(_rabbit)+'只。')\n"},U_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_rabbit += 1\nsprite.clearAllSprites()\n_sprite = []\n_footText = sprite.Text('脚的数量:', 20, 10)\nfor i in range(0, _rabbit, 1):\n _sprite.append(sprite.Sprite('jttl/rabbit', len(_sprite)*130+130 if len(_sprite)<5 else len(_sprite)*130+130-650, 120 if len(_sprite)<5 else 320))\ntime.sleep(0.5)\n"},Y_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\nsprite.createBackground('/fzsf/map_ck_xxjsjs')\n_S1 = sprite.Sprite('/fzsf/S1',400,225,'S1')\n_S2 = sprite.Sprite('/fzsf/S2',400,225,'S2')\n_S3 = sprite.Sprite('/fzsf/S3',400,225,'S3')\n_S4 = sprite.Sprite('/fzsf/S4',400,225,'S4')\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\n_text_1 = sprite.Text('S1:',0,0,'text')\n_text_2 = sprite.Text('S2:',0,30,'text2')\n_text_3 = sprite.Text('S3:',0,60,'text3')\n_text_4 = sprite.Text('S4:',0,90,'text4')\n_position = [[60, 270], [240, 50], [260, 380], [440, 190], [730, 60], [700, 400]]\n_Llen = [0, 170, 230, 100, 150, 10, 30, 50]\n_Slen = [0, 0, 0, 0, 0]\n_tag = [0, [0, 1, 3], [0, 2, 3], [3, 4, 5], [3, 5]]\nbear = sprite.Sprite('mixbear',60,270,'bear')\nbear.enlargeTo(80)\n_pos = 0\ntime.sleep(1)\n"},j_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n=this.getFieldValue("PATHNAME");const i=[0,[1,3],[2,4],[5,7],[6]];var s="";return s+=`_S${n}.show()\ntime.sleep(1)\n`,s+=4!=n?`_Slen[${n}] = _Llen[${i[n][0]}] + _Llen[${i[n][1]}]\n_text_${n}.changeText('S${n}:'+str(_Slen[${n}])+'m')\ntime.sleep(1)\n_S${n}.hide()\ntime.sleep(1)\n`:"_Slen[4] = _Llen[6]\n_text_4.changeText('S4:'+str(_Slen[4])+'m')\ntime.sleep(1)\n_S4.hide()\ntime.sleep(1)\n"},G_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n="";return[n+=`_Slen[${this.getFieldValue("PATHNAME")}] < _Slen[${this.getFieldValue("PATHNAME2")}]`,e.ORDER_ATOMIC]},X_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n=this.getFieldValue("PATHNAME"),i="";return i+=`\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\n_Smin = ${n}\n_S${n}.show()\ntime.sleep(0.5)\n_S${n}.hide()\ntime.sleep(0.5)\n_S${n}.show()\ntime.sleep(1)\n`},H_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"if(_pos == _tag[_Smin][0]):\n for i in range(1, len(_tag[_Smin]), 1):\n bear.slideTo(_position[_tag[_Smin][i]][0], _position[_tag[_Smin][i]][1], 1)\n _pos = _tag[_Smin][len(_tag[_Smin])-1]\nelse:\n print('移动错误!程序有误!')\n exit()\n_S1.hide()\n_S2.hide()\n_S3.hide()\n_S4.hide()\nif(_pos == 5):\n print('成功抵达信息科技教室!')\n"},q_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"sprite.clearAllSprites()\nsprite.createBackground('/hxdb/hxdbbg')\n_soldier = []\n_num = sprite.Text('目前士兵数量:0',0,0,'num')\n_last = sprite.Text('剩余:0',500,0,'last')\n_line = 3\n"},z_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n="";return n+=`for i in range(0, ${this.getFieldValue("NUM")}, 1):\n _soldier.append(sprite.Sprite('/hxdb/soldier', 30 + (len(_soldier)%_line)*50 + (len(_soldier)//(4*_line))*(_line+1)*50 +(len(_soldier)%3-2), 80+(len(_soldier)//_line)*100-(len(_soldier)//(4*_line))*4*100+(len(_soldier)%2)))\n_num.changeText('目前士兵数量:'+str(len(_soldier)))\n`},W_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";var n=this.getFieldValue("NUM");return`for i in range(0, len(_soldier), 1):\n _soldier[i].slideTo(30 + (i%${n})*50 + (i//(4*${n}))*(${n}+1)*50 +(i%3-2), 80+(i//${n})*100-(i//(4*${n}))*4*100+(i%2), 0.05)\n_line = ${n}\n_last.changeText('剩余:'+str(len(_soldier)%_line))\ntime.sleep(2)\n`},J_=function(t,e){return e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite",[`len(_soldier)%_line == ${this.getFieldValue("NUM")}`,e.ORDER_ATOMIC]},K_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"_num.changeText('目前士兵数量:'+str(len(_soldier)+1))\n_last.changeText('剩余:')\ntime.sleep(0.5)\n_soldier.append(sprite.Sprite('/hxdb/soldier', 30 + (len(_soldier)%_line)*50 + (len(_soldier)//(4*_line))*(_line+1)*50 +(len(_soldier)%3-2), 80+(len(_soldier)//_line)*100-(len(_soldier)//(4*_line))*4*100+(len(_soldier)%2)))\ntime.sleep(1)\n"},Q_=function(t,e){e.definitions_.import_time="import time",e.definitions_.import_sprite="import sprite";return"print('符合要求的士兵数量为:'+str(len(_soldier)))\n"},Z_=function(t,e){e.definitions_.import_turtle="import turtle",e.definitions_.import_time="import time",e.definitions_.import_math="import math";var n=e.valueToCode(this,"VAR",e.ORDER_ATOMIC),i=this.getFieldValue("NUM");return e.setups_.init_Hanoi="\ndef init_Hanoi():\n pen = turtle.Turtle()\n pen.hideturtle()\n pen.speed(0)\n for i in range(0, 3, 1):\n pen.penup()\n pen.setheading(0)\n pen.goto(150 * i - 200,-100)\n pen.pendown()\n pen.pensize(5)\n pen.forward(100)\n pen.goto(150 * i - 150,-100)\n pen.setheading(90)\n pen.forward(200)",e.setups_.begin="\ndef begin(): \n s = turtle.Turtle()\n s.hideturtle()\n s.penup()\n s.speed(0)\n s.goto(0,-150)\n s.write('3')\n time.sleep(1)\n s.clear()\n s.write('2')\n time.sleep(1)\n s.clear()\n s.write('1')\n time.sleep(1)\n s.clear()\n s.write('Start!')\n time.sleep(1)\n s.clear()\n",e.setups_.move="\ndef move(x, y):\n try:\n t = tower[x].pop(-1)\n a = tower_num[x].pop(-1)\n if tower_num[y]!=[]:\n b = tower_num[y][-1]\n if athis.#t.on("display",t)[0],wm.configure({output:t=>{this.#t.run("output",{content:t})},read:this.readFile.bind(this),inputfun:this.skInput.bind(this),inputfunTakesPrompt:!0,execLimit:Number.POSITIVE_INFINITY,fileread:this.fileread.bind(this),filewrite:this.filewrite.bind(this),__future__:wm.python3}),wm.builtins.value=new wm.builtin.func((function(){return wm.ffi.remapToPy(void 0===Im?5:Im)})),wm.builtins.set_value=new wm.builtin.func((function(t){Im=t.v})),wm.builtinFiles.files["./mixpy.py"]='import math\r\n\r\ndef math_map(v, al, ah, bl, bh):\r\n return bl + (bh - bl) * (v - al) / (ah - al)\r\n\r\ndef math_mean(myList):\r\n localList = [e for e in myList if type(e) == int or type(e) == float]\r\n if not localList: return\r\n return float(sum(localList)) / len(localList)\r\n\r\ndef math_median(myList):\r\n localList = sorted([e for e in myList if type(e) == int or type(e) == float])\r\n if not localList: return\r\n if len(localList) % 2 == 0:\r\n return (localList[len(localList) // 2 - 1] + localList[len(localList) // 2]) / 2.0\r\n else:\r\n return localList[(len(localList) - 1) // 2]\r\n\r\ndef math_modes(some_list):\r\n modes = []\r\n # Using a lists of [item, count] to keep count rather than dict\r\n # to avoid "unhashable" errors when the counted item is itself a list or dict.\r\n counts = []\r\n maxCount = 1\r\n for item in some_list:\r\n found = False\r\n for count in counts:\r\n if count[0] == item:\r\n count[1] += 1\r\n maxCount = max(maxCount, count[1])\r\n found = True\r\n if not found:\r\n counts.append([item, 1])\r\n for counted_item, item_count in counts:\r\n if item_count == maxCount:\r\n modes.append(counted_item)\r\n return modes\r\n\r\ndef math_standard_deviation(numbers):\r\n n = len(numbers)\r\n if n == 0: return\r\n mean = float(sum(numbers)) / n\r\n variance = sum((x - mean) ** 2 for x in numbers) / n\r\n return math.sqrt(variance)\r\n\r\ndef lists_sort(my_list, type, reverse):\r\n def try_float(s):\r\n try:\r\n return float(s)\r\n except:\r\n return 0\r\n key_funcs = {\r\n "NUMERIC": try_float,\r\n "TEXT": str,\r\n "IGNORE_CASE": lambda s: str(s).lower()\r\n }\r\n key_func = key_funcs[type]\r\n list_cpy = list(my_list)\r\n return sorted(list_cpy, key=key_func, reverse=reverse)'}readFile(t){if(void 0!==Em[t])return wm.misceval.promiseToSuspension(fetch(Em[t]).then((t=>t.text())));if(void 0===wm.builtinFiles||void 0===wm.builtinFiles.files[t])throw"File not found: '"+t+"'";return wm.builtinFiles.files[t]}fileread(t,e){return this.mixpyProject.exist(t)?this.mixpyProject.getFileContent(t):-1!==e.indexOf("w")?(this.mixpyProject.add(t,"",1),""):null}filewrite(t,e){var n=t.name;this.mixpyProject.modify(n,e),this.mixpyProject.select(n)}skInput(t){return new Promise(((e,n)=>{this.#t.run("input",{content:{prompt:t},resolve:e,reject:n})}))}reset(){wm.execLimit=Number.POSITIVE_INFINITY,wm.TurtleGraphics.reset&&wm.TurtleGraphics.reset()}kill(){window.SPRITE.kill(),wm.execLimit=0,this.executionEnd_()}step(t,e,n,i){if(".py"==i){var s=this.executionBuffer.step,r=this.parseGlobals(t);this.executionBuffer.trace.push({step:s,filename:i,line:e,column:n,properties:r.properties,modules:r.modules}),this.executionBuffer.step=s+1,this.executionBuffer.last_step=s+1,this.executionBuffer.line_number=e}}analyzeVariables(){if(""==this.main.model.programs.__main__().trim())return{}}analyze(){return this.main.model.execution.status("analyzing"),""!=this.main.model.programs.__main__().trim()||(this.main.components.feedback.emptyProgram("You haven't written any code yet!"),!1)}run(t){this.reset(),-1===t.indexOf("import sprite")&&-1===t.indexOf("from sprite import")||window.SPRITE.runit(wm.TurtleGraphics.target),this.programStatus.running=!0,wm.misceval.asyncToPromise((()=>wm.importMainWithBody("",!1,t,!0))).then((()=>{window.SPRITE.running=!1,this.programStatus.running=!1,this.#t.run("finished")})).catch((t=>{j.Debug.error(t),window.SPRITE.running=!1,this.programStatus.running=!1,this.#t.run("error",t);var e=function(t){return"string"==typeof t?t:void 0!==t.tp$str?t.tp$str().v:t.name+": "+t.message}(t);this.#t.run("finished"),-1===e.indexOf("TimeLimitError")&&this.executionEnd_()}))}setupEnvironment(t,e,n,i,s){var r=this.main.model;this._backup_execution=wm.afterSingleExecution,wm.afterSingleExecution=void 0,wm.builtins.get_output=new wm.builtin.func((function(){return wm.builtin.pyCheckArgs("get_output",arguments,0,0),wm.ffi.remapToPy(r.execution.output())})),wm.builtins.reset_output=new wm.builtin.func((function(){wm.builtin.pyCheckArgs("reset_output",arguments,0,0),r.execution.output.removeAll()})),wm.builtins.log=new wm.builtin.func((function(t){wm.builtin.pyCheckArgs("log",arguments,1,1),console.log(t)})),wm.builtins._trace=e,wm.builtins._final_values=s,wm.builtins.code=wm.ffi.remapToPy(t),wm.builtins.set_success=this.instructor_module.set_success,wm.builtins.set_feedback=this.instructor_module.set_feedback,wm.builtins.set_finished=this.instructor_module.set_finished,wm.builtins.count_components=this.instructor_module.count_components,wm.builtins.no_nonlist_nums=this.instructor_module.no_nonlist_nums,wm.builtins.only_printing_properties=this.instructor_module.only_printing_properties,wm.builtins.calls_function=this.instructor_module.calls_function,wm.builtins.get_property=this.instructor_module.get_property,wm.builtins.get_value_by_name=this.instructor_module.get_value_by_name,wm.builtins.get_value_by_type=this.instructor_module.get_value_by_type,wm.builtins.parse_json=this.instructor_module.parse_json,wm.skip_drawing=!0,r.settings.mute_printer(!0)}disposeEnvironment(){wm.afterSingleExecution=this._backup_execution,wm.builtins.get_output=void 0,wm.builtins.reset_output=void 0,wm.builtins.log=void 0,wm.builtins._trace=void 0,wm.builtins.trace=void 0,wm.builtins.code=void 0,wm.builtins.set_success=void 0,wm.builtins.set_feedback=void 0,wm.builtins.set_finished=void 0,wm.builtins.count_components=void 0,wm.builtins.calls_function=void 0,wm.builtins.get_property=void 0,wm.builtins.get_value_by_name=void 0,wm.builtins.get_value_by_type=void 0,wm.builtins.no_nonlist_nums=void 0,wm.builtins.only_printing_properties=void 0,wm.builtins.parse_json=void 0,wm.skip_drawing=!1,Im=void 0,this.main.model.settings.mute_printer(!1)}parseGlobals(t){var e=Array(),n=Array();for(var i in t){var s=t[i];if("__name__"!==i&&"__doc__"!==i){i=i.replace("_$rw$","").replace("_$rn$","");var r=this.parseValue(i,s);null!==r?e.push(r):s.constructor==wm.builtin.module&&n.push(s.$d.__name__.v)}}return{properties:e,modules:n}}parseValue(t,e){if(null==e)return{name:t,type:"Unknown",value:"Undefined"};switch(e.constructor){case wm.builtin.func:return{name:t,type:"Function",value:void 0!==e.func_code.co_varnames?" Arguments: "+e.func_code.co_varnames.join(", "):" No arguments"};case wm.builtin.module:return null;case wm.builtin.str:return{name:t,type:"String",value:e.$r().v};case wm.builtin.none:return{name:t,type:"None",value:"None"};case wm.builtin.bool:return{name:t,type:"Boolean",value:e.$r().v};case wm.builtin.nmber:return{name:t,type:"int"==e.skType?"Integer":"Float",value:e.$r().v};case wm.builtin.int_:return{name:t,type:"Integer",value:e.$r().v};case wm.builtin.float_:return{name:t,type:"Float",value:e.$r().v};case wm.builtin.tuple:return{name:t,type:"Tuple",value:e.$r().v};case wm.builtin.list:return e.v.length<=20?{name:t,type:"List",value:e.$r().v,exact_value:e}:{name:t,type:"List",value:"[... "+e.v.length+" elements ...]",exact_value:e};case wm.builtin.dict:return{name:t,type:"Dictionary",value:e.$r().v};case Number:return{name:t,type:e%1==0?"Integer":"Float",value:e};case String:return{name:t,type:"String",value:e};case Boolean:return{name:t,type:"Boolean",value:e?"True":"False"};default:return{name:t,type:null==e.tp$name?e:e.tp$name,value:null==e.$r?e:e.$r().v}}}}const Om=$;var Mm=n.n(Om);class Cm extends j.PageBase{static{j.HTMLTemplate.add("html/statusbar/statusbar-image.html",new j.HTMLTemplate('\r\n
\r\n
\r\n
')),this.init=function(){j.StatusBarsManager.typesRegistry.register(["images"],Cm);const t=j.Workspace.getMain().getStatusBarsManager();t.add({type:"images",id:"images",name:Y.Msg.MIXLY_MICROBIT_IMAGE,title:Y.Msg.MIXLY_MICROBIT_IMAGE}),t.changeTo("output")}}constructor(){super();const t=Mm()(j.HTMLTemplate.get("html/statusbar/statusbar-image.html").render());this.setContent(t)}init(){super.init(),this.hideCloseBtn()}clean(){this.getContent().empty()}display(t){const e=this.getContent(),n=function(t){t.style.width="auto",t.style.height="auto",t.style.maxWidth="100%",t.style.maxHeight="100%"};this.clean();let i=t.content,s=null,r=null;switch(t.display_type){case"p5":i.style.width="100%",i.style.height="100%",i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center",new MutationObserver((function(t){t.forEach((t=>t.addedNodes.forEach((t=>{const e=t;null!=e.tagName&&["canvas","video"].includes(e.tagName.toLowerCase())&&n(e)}))))})).observe(i,{childList:!0}),i.querySelectorAll("canvas,video").forEach(n),e.append(i);break;case"matplotlib":s=i.querySelector("canvas"),s&&(i=s),i.style.width="",i.style.height="",i.style.maxWidth="100%",i.style.maxHeight="100%",e.append(i);break;case"ocaml-canvas":i.style.width="",i.style.height="",i.style.maxWidth="100%",i.style.maxHeight="100%",e.append(i);break;case"turtle":i.setAttribute("width","100%"),i.setAttribute("height","100%"),e.append(i.outerHTML);break;case"sympy":e.append(t.content),void 0===window.MathJax?(console.log("Loading MathJax (Sympy expression needs it)."),function(){let t=document.createElement("script");t.type="text/javascript",t.src="https://cdn.jsdelivr.net/npm/mathjax@3.0.5/es5/tex-mml-chtml.js",document.getElementsByTagName("head")[0].appendChild(t)}()):window.MathJax.typeset();break;case"multiple":for(let n of["image/svg+xml","image/png","text/html","text/plain"])if(n in t.content){let i=t.content[n];"image/png"===n&&(i=''),e.append(i);break}break;case"tutor":if(e.append(Mm()(t.content.replace("overflow-y%3A%20hidden%3B",""))),r=this.getContent()[0].getElementsByTagName("iframe")[0],null==r)return;r.style.maxHeight=r.style.minHeight="100%",new IntersectionObserver(((t,e)=>{const n=t[0];n&&!n.isIntersecting||(r.contentWindow?.postMessage({type:"redraw"},"*"),e.disconnect())})).observe(r);break;default:console.error(`Not supported node type '${t.display_type}' in eval.display result processing.`)}}}const Rm=Cm;class xm{static{this.pythonShell=null,this.init=async function(){Rm.init(),this.pythonShell=new xm},this.run=function(){const t=j.Workspace.getMain().getEditorsManager().getActive().getCode();return this.pythonShell.run(t)},this.stop=function(){return this.pythonShell.stop()}}#e=null;#n=null;#i=null;#s={row:0,column:0};#r="";#o=null;#a=null;#l=!1;#u=!1;#c=null;#p=()=>this.#h();#_=[{name:"REPL-Enter",bindKey:"Enter",exec:t=>{if(t.getSession().selection.getCursor().row===this.#s.row){const t=this.#e.getEndPos();let e=this.#e.getValueRange(this.#s,t);return e=e.replace(this.#r,""),this.#o?.(e),this.#o=null,this.#a=null,this.#e.addValue("\n"),this.#d(),!0}return!1}},{name:"REPL-ChangeEditor",bindKey:"Delete|Ctrl-X|Backspace",exec:t=>{const e=t.getSession().selection.getCursor();return e.row{this.#u=!1,this.#e.addValue(`\n==${j.Msg.Lang["shell.finish"]}==`)})),t.bind("output",(t=>{this.#e.addValue(t.content)})),t.bind("error",(t=>{this.#u=!1,this.#e.addValue(`\n${t.toString()}\n`)})),t.bind("input",(t=>{const e=String(t?.content?.prompt);this.#e.addValue(`>>> ${e}`),this.#r=e,this.#o=t.resolve,this.#a=t.reject,this.#m()})),t.bind("display",(t=>{this.#i.changeTo("images"),this.#n.display(t)}))}#h(){const t=this.#e.getEditor(),e=t.getSession().selection.getCursor();t.setReadOnly(e.rowsetTimeout(e,t)))}}const Nm=xm,Lm={init:function(){Nm.init();const t=j.app.getNav();t.register({icon:"icon-play-circled",title:"",id:"python-run-btn",displayText:Y.Msg.MSG.run,preconditionFn:()=>!0,callback:()=>{Nm.run().catch(j.Debug.error)},scopeType:j.Nav.Scope.LEFT,weight:4}),t.register({icon:"icon-cancel",title:"",id:"python-stop-btn",displayText:Y.Msg.MSG.stop,preconditionFn:()=>!0,callback:()=>{Nm.stop().catch(j.Debug.error)},scopeType:j.Nav.Scope.LEFT,weight:5})}};Lm.init(),Object.assign(Y.Variables,X),Object.assign(Y.Procedures,q),Y.Python=J,Y.generator=J,j.Profile.default={},Object.assign(Y.Blocks,t,e,i,s,r,o,a,l,u,c,p,h,_,d,f,m,g,b,S,k),Object.assign(Y.Python.forBlock,T,y,v,w,E,I,A,O,M,C,R,x,N,L,D,F,P,B,V,U)})()})(); \ No newline at end of file diff --git a/boards/default/python_skulpt_car/index.xml b/boards/default/python_skulpt_car/index.xml index 9914c6a8..f3e942a6 100644 --- a/boards/default/python_skulpt_car/index.xml +++ b/boards/default/python_skulpt_car/index.xml @@ -1 +1 @@ -promptHelloHelloHello,HelloMixly2100,1,2,3051i90x151100a10.998124.821100101010001100501100110000x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')dirmylist1,2,3,4,5mylist0mylist02mylist00mylist0101mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2x0 \ No newline at end of file +promptHelloHelloHello,HelloMixly2100,1,2,3051i90x151100a10.998124.821100101010001100501100110000x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')dirmylist1,2,3,4,5mylist0mylist02mylist00mylist0101mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2x0 \ No newline at end of file diff --git a/boards/default/python_skulpt_car/main.bundle.0ec8284a.js b/boards/default/python_skulpt_car/main.bundle.68000541.js similarity index 82% rename from boards/default/python_skulpt_car/main.bundle.0ec8284a.js rename to boards/default/python_skulpt_car/main.bundle.68000541.js index a868593b..228ebdc7 100644 --- a/boards/default/python_skulpt_car/main.bundle.0ec8284a.js +++ b/boards/default/python_skulpt_car/main.bundle.68000541.js @@ -18,4 +18,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -class G{constructor(e,t){if(this.variablePrefix_=t||"",this.reservedDict_=Object.create(null),e)for(var n=e.split(","),i=0;i0?t.join("\n")+n.join("\n")+i.join("\n")+o.join("\n")+a.join("")+e+"while True:\n"+l.join("")+u.join("\n"):t.join("\n")+n.join("\n")+i.join("\n")+o.join("\n")+a.join("")+e+u.join("\n")},H.scrubNakedValue=function(e){return e+"\n"},H.quote_=function(e){var t="'";return-1!==(e=e.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===e.indexOf('"')?t='"':e=e.replace(/'/g,"\\'")),t+e+t},H.multiline_quote_=function(e){return"'''"+(e=e.replace(/'''/g,"\\'\\'\\'"))+"'''"},H.scrub_=function(e,t,n){var i="";if(!e.outputConnection||!e.outputConnection.targetConnection){(s=e.getCommentText())&&(s=F.utils.string.wrap(s,H.COMMENT_WRAP-3),i+=H.prefixLines(s+"\n","# "));for(var r=0;r0?"int("+a+" + "+r+")":r<0?"int("+a+" - "+-r+")":"int("+a+")",i&&(a="-"+a)),a};const z=330,q={init:function(){this.setColour(z),this.appendDummyInput().appendField(new F.FieldTextInput(""),"VAR"),this.setOutput(!0),this.setTooltip(F.Msg.VARIABLES_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){X.equals(e,this.getFieldValue("VAR"))&&this.setFieldValue(t,"VAR")}},W={init:function(){this.setColour(z),this.appendValueInput("VALUE").appendField(new F.FieldTextInput(""),"VAR").appendField(F.Msg.MIXLY_VALUE2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.VARIABLES_SET_TOOLTIP)},getVars:function(){var e=this.getFieldValue("VAR");return null==e?[]:e.split(",")},renameVar:function(e,t){X.equals(e,this.getFieldValue("VAR"))&&this.setFieldValue(t,"VAR")}},K={init:function(){this.setColour(z);var e=[[F.Msg.LANG_MATH_INT,"int"],[F.Msg.LANG_MATH_FLOAT,"float"],[F.Msg.LANG_MATH_BOOLEAN,"bool"],[F.Msg.LANG_MATH_STRING,"str"],[F.Msg.MIXLY_MICROBIT_TYPE_LIST,"list"],[F.Msg.MIXLY_MICROBIT_TYPE_TUPLE,"tuple"],[F.Msg.MIXLY_MICROBIT_TYPE_DICT,"dict"],[F.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,"set"],[F.Msg.LANG_MATH_BYTE,"bytes"]];this.appendValueInput("MYVALUE").appendField(new F.FieldDropdown(e),"OP"),this.setOutput(!0)}},J={init:function(){this.setColour(z),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_PYTHON_GLOBAL).setCheck("var"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(F.Msg.TEXT_PRINT_TOOLTIP)}},Q={init:function(){this.setColour(z),this.appendValueInput("DATA").appendField(F.Msg.MICROBIT_PYTHON_TYPE),this.setOutput(!0),this.setTooltip(F.Msg.MICROBIT_PYTHON_TYPE)}},Z={init:function(){this.setColour(z),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_CONTORL_GET_TYPE).appendField(new F.FieldDropdown([[F.Msg.LANG_MATH_INT,"int"],[F.Msg.MIXLY_MICROBIT_TYPE_FLOAT,"float"],[F.Msg.MIXLY_MICROBIT_TYPE_STRING,"str"],[F.Msg.MIXLY_MICROBIT_TYPE_LIST,"list"],[F.Msg.MIXLY_MICROBIT_TYPE_TUPLE,"tuple"],[F.Msg.MIXLY_MICROBIT_TYPE_DICT,"dict"],[F.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,"set"],[F.Msg.LANG_MATH_BYTE,"bytes"],[F.Msg.LOGIC_NULL,"type(None)"]]),"type"),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("type");return F.Msg.MICROBIT_controls_TypeLists+{int:F.Msg.LANG_MATH_INT,float:F.Msg.MIXLY_MICROBIT_TYPE_FLOAT,str:F.Msg.MIXLY_MICROBIT_TYPE_STRING,list:F.Msg.MIXLY_MICROBIT_TYPE_LIST,tuple:F.Msg.MIXLY_MICROBIT_TYPE_TUPLE,dict:F.Msg.MIXLY_MICROBIT_TYPE_DICT,set:F.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,image:F.Msg.MIXLY_MICROBIT_IMAGE,bytes:F.Msg.LANG_MATH_BYTE,NoneType:F.Msg.LOGIC_NULL}[t]}))}},ee={init:function(){this.setColour(z),this.itemCount_=2,this.updateShape_(),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setMutator(new F.icons.MutatorIcon(["lists_zip_item"],this)),this.setTooltip(F.Msg.MIXLY_PYTHON_LISTS_ZIP_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("lists_zip_container");t.initSvg();for(var n=t.getInput("STACK").connection,i=0;i0;r--)t.getInputTargetBlock("IF"+r)&&t.getInputTargetBlock("IF"+r).previousConnection?n[r]=t.getInputTargetBlock("IF"+r).previousConnection:n[r]=null,this.removeInput("IF"+r),t.getInputTargetBlock("DO"+r)&&t.getInputTargetBlock("DO"+r).previousConnection?i[r]=t.getInputTargetBlock("DO"+r).previousConnection:i[r]=null,this.removeInput("DO"+r);this.elseifCount_=parseInt(e.getAttribute("elseif"),10),this.elseCount_=parseInt(e.getAttribute("else"),10);for(r=1;r<=this.elseifCount_;r++)this.appendValueInput("IF"+r).setCheck([Boolean,Number]).appendField(F.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+r).appendField(F.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(F.Msg.CONTROLS_IF_MSG_ELSE);for(r=n.length-2;r>0;r--)n[r]&&n[r].reconnect(this,"IF"+r);for(r=i.length-2;r>0;r--)i[r]&&i[r].reconnect(this,"DO"+r)},decompose:function(e){var t=e.newBlock("controls_if_if");t.initSvg();for(var n=t.getInput("STACK").connection,i=1;i<=this.elseifCount_;i++){var r=e.newBlock("controls_if_elseif");r.initSvg(),n.connect(r.previousConnection),n=r.nextConnection}if(this.elseCount_){var s=e.newBlock("controls_if_else");s.initSvg(),n.connect(s.previousConnection)}return t},compose:function(e){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var t=this.elseifCount_;t>0;t--)this.removeInput("IF"+t),this.removeInput("DO"+t);this.elseifCount_=0;for(var n=e.getInputTargetBlock("STACK"),i=[null],r=[null],s=null;n;){switch(n.type){case"controls_if_elseif":this.elseifCount_++,i.push(n.valueConnection_),r.push(n.statementConnection_);break;case"controls_if_else":this.elseCount_++,s=n.statementConnection_;break;default:throw Error("Unknown block type: "+n.type)}n=n.nextConnection&&n.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(i,r,s)},saveConnections:function(e){for(var t=e.getInputTargetBlock("STACK"),n=1;t;){switch(t.type){case"controls_if_elseif":var i=this.getInput("IF"+n),r=this.getInput("DO"+n);t.valueConnection_=i&&i.connection.targetConnection,t.statementConnection_=r&&r.connection.targetConnection,n++;break;case"controls_if_else":r=this.getInput("ELSE");t.statementConnection_=r&&r.connection.targetConnection;break;default:throw"Unknown block type."}t=t.nextConnection&&t.nextConnection.targetBlock()}},rebuildShape_:function(){var e=[null],t=[null],n=null;this.getInput("ELSE")&&(n=this.getInput("ELSE").connection.targetConnection);for(var i=1;this.getInput("IF"+i);){var r=this.getInput("IF"+i),s=this.getInput("DO"+i);console.log(r.connection.targetConnection),e.push(r.connection.targetConnection),t.push(s.connection.targetConnection),i++}this.updateShape_(),this.reconnectChildBlocks_(e,t,n)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var e=1;this.getInput("IF"+e);)this.removeInput("IF"+e),this.removeInput("DO"+e),e++;for(e=1;e<=this.elseifCount_;e++)this.appendValueInput("IF"+e).setCheck([Number,Boolean]).appendField(F.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+e).appendField(F.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(F.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(e,t,n){for(var i=1;i<=this.elseifCount_;i++)e[i]&&e[i].reconnect(this,"IF"+i),t[i]&&t[i].reconnect(this,"DO"+i);n&&n.reconnect(this,"ELSE")}},ce={init:function(){this.setColour(re),this.appendValueInput("FROM").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.PYTHON_RANGE).appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},pe={init:function(){this.setColour(re),this.appendValueInput("LIST").setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(F.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(F.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return F.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){F.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},he={init:function(){this.setColour(re),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(F.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new F.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(F.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+F.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return{WHILE:F.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:F.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[t]}))}},de={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(F.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new F.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(F.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var e=document.createElement("mutation");return this.elseifCount_&&e.setAttribute("elseif",this.elseifCount_),this.elseCount_&&e.setAttribute("else",1),e},domToMutation:function(e){var t=this,n=[],i=[];this.elseCount_&&this.removeInput("ELSE");for(var r=this.elseifCount_;r>0;r--)t.getInputTargetBlock("IF"+r)&&t.getInputTargetBlock("IF"+r).previousConnection?n[r]=t.getInputTargetBlock("IF"+r).previousConnection:n[r]=null,this.removeInput("IF"+r),t.getInputTargetBlock("DO"+r)&&t.getInputTargetBlock("DO"+r).previousConnection?i[r]=t.getInputTargetBlock("DO"+r).previousConnection:i[r]=null,this.removeInput("DO"+r);this.elseifCount_=parseInt(e.getAttribute("elseif"),10),this.elseCount_=parseInt(e.getAttribute("else"),10);for(r=1;r<=this.elseifCount_;r++)this.appendValueInput("IF"+r).setCheck([Boolean,Number]).appendField(F.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+r).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(F.Msg.MIXLY_PYTHON_FINALLY);for(r=n.length-2;r>0;r--)n[r]&&n[r].reconnect(this,"IF"+r);for(r=i.length-2;r>0;r--)i[r]&&i[r].reconnect(this,"DO"+r)},decompose:function(e){var t=e.newBlock("controls_try");t.initSvg();for(var n=t.getInput("STACK").connection,i=1;i<=this.elseifCount_;i++){var r=e.newBlock("controls_except");r.initSvg(),n.connect(r.previousConnection),n=r.nextConnection}if(this.elseCount_){var s=e.newBlock("controls_finally");s.initSvg(),n.connect(s.previousConnection)}return t},compose:function(e){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var t=this.elseifCount_;t>0;t--)this.removeInput("IF"+t),this.removeInput("DO"+t);this.elseifCount_=0;for(var n=e.getInputTargetBlock("STACK"),i=[null],r=[null],s=null;n;){switch(n.type){case"controls_except":this.elseifCount_++,i.push(n.valueConnection_),r.push(n.statementConnection_);break;case"controls_finally":this.elseCount_++,s=n.statementConnection_;break;default:throw Error("Unknown block type: "+n.type)}n=n.nextConnection&&n.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(i,r,s)},saveConnections:function(e){for(var t=e.getInputTargetBlock("STACK"),n=1;t;){switch(t.type){case"controls_except":var i=this.getInput("IF"+n),r=this.getInput("DO"+n);t.valueConnection_=i&&i.connection.targetConnection,t.statementConnection_=r&&r.connection.targetConnection,n++;break;case"controls_finally":r=this.getInput("ELSE");t.statementConnection_=r&&r.connection.targetConnection;break;default:throw"Unknown block type."}t=t.nextConnection&&t.nextConnection.targetBlock()}},rebuildShape_:function(){var e=[null],t=[null],n=null;this.getInput("ELSE")&&(n=this.getInput("ELSE").connection.targetConnection);for(var i=1;this.getInput("IF"+i);){var r=this.getInput("IF"+i),s=this.getInput("DO"+i);console.log(r.connection.targetConnection),e.push(r.connection.targetConnection),t.push(s.connection.targetConnection),i++}this.updateShape_(),this.reconnectChildBlocks_(e,t,n)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var e=1;this.getInput("IF"+e);)this.removeInput("IF"+e),this.removeInput("DO"+e),e++;for(e=1;e<=this.elseifCount_;e++)this.appendValueInput("IF"+e).setCheck([Number,Boolean]).appendField(F.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+e).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(F.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(e,t,n){for(var i=1;i<=this.elseifCount_;i++)e[i]&&e[i].reconnect(this,"IF"+i),t[i]&&t[i].reconnect(this,"DO"+i);n&&n.reconnect(this,"ELSE")}},fe={init:function(){this.setColour(re);var e=new F.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(e,"FLOW").appendField(F.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var t=this;this.setTooltip((function(){var e=t.getFieldValue("FLOW");return{BREAK:F.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:F.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[e]}))},onchange:function(){if(this.workspace){var e=!1,t=this;do{if("controls_repeat"==t.type||"controls_for"==t.type||"controls_forEach"==t.type||"controls_repeat_ext"==t.type||"controls_whileUntil"==t.type||"do_while"==t.type){e=!0;break}t=t.getSurroundParent()}while(t);e?this.setWarningText(null):this.setWarningText(F.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},_e={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new F.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(F.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){return F.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",e.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){F.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},me={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new F.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(F.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){return F.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",e.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){F.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}};he.OPERATORS=[[F.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[F.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],fe.OPERATORS=[[F.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[F.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const be={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(F.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},ge={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Se={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(F.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},ke={init:function(){this.setColour(re),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},ye={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(F.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},ve={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(F.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Te={init:function(){this.jsonInit({message0:F.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:re,tooltip:F.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:F.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Ee={init:function(){this.setColour(re),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(F.Msg.MIXLY_STAT),this.setOutput(!0)}},Ie={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},we={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(F.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},xe={init:function(){this.appendDummyInput().appendField(F.Msg.CONTROLS_REPEAT_TITLE_REPEAT+F.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(F.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new F.FieldDropdown([[F.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[F.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(re),this.setTooltip("do-while loop"),this.setHelpUrl("")}},Ae={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$e={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},Oe={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},Me={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_GET+F.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(F.Msg.PROCEDURES_DEFRETURN_RETURN+F.Msg.MIXLY_GET_UNIQUE_IDEN)}},Ce={init:function(){this.setColour(re),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(F.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},Re={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},Ne=230;F.FieldTextInput.math_number_validator=function(e){return String(e)},F.FieldTextInput.math_number_validator_include_blank=function(e){if(""===e)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(e)?String(e):null};const Le={init:function(){this.setColour(Ne),this.appendDummyInput().appendField(new F.FieldTextInput("0",F.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(F.Msg.MATH_NUMBER_TOOLTIP)}},De={init:function(){this.setColour(Ne);this.appendDummyInput("").appendField(F.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new F.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CONSTANT");return{pi:F.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:F.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[t]}))}},Pe={init:function(){this.setColour(Ne);this.appendDummyInput("").appendField(F.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new F.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CONSTANT");return{pi:F.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:F.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[t]}))}},Fe={init:function(){this.setColour(Ne),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new F.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{ADD:F.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:F.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:F.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:F.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:F.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:F.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:F.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[t]}))}},Be={init:function(){this.setColour(Ne),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new F.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{ADD:F.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:F.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:F.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:F.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:F.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:F.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:F.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[t]}))}},je={init:function(){this.setColour(Ne),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new F.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Ve={init:function(){this.setColour(Ne),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new F.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{SIN:F.Msg.MATH_TRIG_TOOLTIP_SIN,COS:F.Msg.MATH_TRIG_TOOLTIP_COS,TAN:F.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:F.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:F.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:F.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:F.Msg.MATH_SINGLE_TOOLTIP_LN}[t]}))}},Ue={init:function(){var e=[[F.Msg.MATH_BIN,"bin"],[F.Msg.MATH_OCT,"oct"],[F.Msg.MATH_HEX,"hex"]];this.setColour(Ne),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new F.FieldDropdown(e),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{bin:F.Msg.MATH_DEC_TOOLTIP_BIN,oct:F.Msg.MATH_DEC_TOOLTIP_OCT,hex:F.Msg.MATH_DEC_TOOLTIP_HEX}[e]}))}},Ye={init:function(){var e=[[F.Msg.LANG_MATH_TO_ROUND,"round"],[F.Msg.LANG_MATH_TO_CEIL,"ceil"],[F.Msg.LANG_MATH_TO_FLOOR,"floor"],[F.Msg.MATH_ABS,"fabs"],[F.Msg.MATH_SQRT,"sqrt"]];this.setColour(Ne),this.appendValueInput("A").setCheck(Number).appendField(new F.FieldDropdown(e),"OP"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{sqrt:F.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:F.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:F.Msg.MATH_SINGLE_TOOLTIP_SQ,round:F.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:F.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:F.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[e]}))}},Ge={init:function(){var e=[[F.Msg.MIXLY_MAX,"max"],[F.Msg.MIXLY_MIN,"min"]];this.setColour(Ne),this.appendValueInput("A").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(new F.FieldDropdown(e),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(F.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{max:F.Msg.MIXLY_TOOLTIP_MATH_MAX,min:F.Msg.MIXLY_TOOLTIP_MATH_MIN}[e]}))}},Xe={init:function(){var e=[[F.Msg.MATH_TWO,"two"],[F.Msg.MATH_EIGHT,"eight"],[F.Msg.MATH_TEN,"ten"],[F.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(Ne),this.appendDummyInput("").appendField(F.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new F.FieldDropdown(e),"OP").appendField(F.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(F.Msg.MATH_ZHW).appendField(new F.FieldDropdown(e),"OP2").appendField(F.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),n={two:F.Msg.MATH_Before_two,eight:F.Msg.MATH_Before_eight,ten:F.Msg.MATH_Before_ten,sixteen:F.Msg.MATH_Before_sixteen},i=t.getFieldValue("OP2"),r={two:F.Msg.MATH_Behind_two,eight:F.Msg.MATH_Behind_eight,ten:F.Msg.MATH_Behind_ten,sixteen:F.Msg.MATH_Behind_sixteen};return n[e]+r[i]}))}},He={init:function(){var e=[[F.Msg.LANG_MATH_INT,"int"],[F.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Ne),this.setOutput(!0,Number),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_RANDOM).appendField(new F.FieldDropdown(e),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TYPE"),n={int:F.Msg.LANG_MATH_INT,float:F.Msg.LANG_MATH_FLOAT_RANDOM};return F.Msg.MATH_RANDOM_INT_TOOLTIP+n[e]}))}},ze={init:function(){this.setColour(Ne),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(F.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(F.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(F.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(F.Msg.MATH_CONSTRAIN_TOOLTIP)}},qe={init:function(){this.setColour(Ne),this.appendValueInput("NUM",Number).appendField(F.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(F.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(F.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(F.Msg.MIXLY_TOOLTIP_MATH_MAP)}},We={init:function(){this.setColour(Ne),this.appendDummyInput().appendField(new F.FieldTextInput("0",F.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(F.Msg.MATH_NUMBER_TOOLTIP)}},Ke={init:function(){this.setColour(Ne),this.appendValueInput("NUM").setCheck(Number).appendField(F.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},Je={init:function(){this.setColour(Ne),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(F.Msg.MATH_ROUND).appendField(F.Msg.TEXT_KEEP),this.appendDummyInput().appendField(F.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(F.Msg.MATH_ROUND_NEW_TOOLTIP)}},Qe={init:function(){var e=[[F.Msg.MIXLY_TO_INT,"int"],[F.Msg.MIXLY_TO_FLOAT,"float"],[F.Msg.MIXLY_TO_BITES,"b"],[F.Msg.LANG_MATH_BYTE+F.Msg.MIXLY_TO_INT,"bti"]];this.setColour(Ne),this.appendValueInput("VAR").appendField(new F.FieldDropdown(e),"TOWHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{int:F.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:F.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:F.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[e]}))}},Ze={init:function(){var e=[[F.Msg.MIXLY_TO_INT,"int"],[F.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Ne),this.appendValueInput("VAR").appendField(new F.FieldDropdown(e),"TOWHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{int:F.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:F.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[e]}))}},et=qe,tt={init:function(){this.setColour(Ne),this.appendValueInput("VAR").appendField(F.Msg.LANG_MATH_BYTE+F.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(F.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},nt={init:function(){this.setColour(Ne),this.itemCount_=1,this.setMutator(new F.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(F.Msg.MIXLY_PRODUCT+F.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(F.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(F.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(F.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("lists_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,i=0;i1&&"\\"===e.charAt(0)){var t=e.charAt(1);if("0"===t||"b"===t||"f"===t||"n"===t||"r"===t||"t"===t||"\\"===t||"'"===t)return String(e).substring(0,2);if("x"===t&&"0"===e.charAt(2)&&"B"===e.charAt(3))return String(e).substring(0,4)}return String(e).substring(0,1)};const lt={init:function(){this.setColour(st),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new F.FieldTextInput("",F.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(F.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(e){if(1==e)var t="../../media/quote2.png";else t="../../media/quote3.png";return new F.FieldImage(t,7,12,'"')}},ut={init:function(){this.setColour(st),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(F.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},ct={init:function(){this.setColour(st),this.appendValueInput("VAR").setCheck(Number).appendField(F.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},pt={init:function(){this.setColour(st),this.appendValueInput("VAR").setCheck(String).appendField(F.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(F.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},ht={init:function(){this.setColour(st),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},dt={init:function(){this.setColour(st),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(F.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},ft={init:function(){this.WHERE_OPTIONS=[[F.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[F.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[F.Msg.TEXT_GET_INDEX_RANDOM+1+F.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(F.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(st),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(F.Msg.LISTS_GET_INDEX_GET,"MODE"),F.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(F.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=e.getFieldValue("WHERE"),i="";switch(t+" "+n){case"GET FROM_START":case"GET FROM_END":i=F.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":i=F.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":i=F.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":i=F.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=n&&"FROM_END"!=n||(i+=" "+F.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",F.Msg.ONE_BASED_INDEXING?"#1":"#0")),i}));var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHERE"),n={FROM_START:F.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:F.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:F.Msg.TEXT_GET_INDEX_RANDOM};return F.Msg.PROCEDURES_DEFRETURN_RETURN+F.Msg.MIXLY_MICROBIT_TYPE_STRING+n[e]+"n"+F.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var e=document.createElement("mutation");e.setAttribute("statement",!this.outputConnection);var t=this.getInput("AT").type==F.INPUT_VALUE;return e.setAttribute("at",t),e},domToMutation:function(e){var t="true"==e.getAttribute("statement");this.updateStatement_(t),e="false"!=e.getAttribute("at"),this.updateAt_(e)},updateStatement_:function(e){e!=!this.outputConnection&&(this.unplug(!0,!0),e?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(e){this.removeInput("AT"),this.removeInput("ORDINAL",!0),e?(this.appendValueInput("AT").setCheck(Number),F.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(F.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var t=new F.FieldDropdown(this.WHERE_OPTIONS,(function(t){var n="FROM_START"==t||"FROM_END"==t;if(n!=e){var i=this.sourceBlock_;return i.updateAt_(n),i.setFieldValue(t,"WHERE"),null}}));this.getInput("AT").appendField(t,"WHERE"),F.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},_t={init:function(){this.setHelpUrl(F.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(st),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(F.Msg.LISTS_GET_INDEX_GET+" "+F.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(F.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(F.Msg.PROCEDURES_DEFRETURN_RETURN+F.Msg.MIXLY_MICROBIT_TYPE_STRING+F.Msg.LISTS_GET_INDEX_FROM_START+"n"+F.Msg.TEXT_CHARAT2)}},mt={init:function(){this.setHelpUrl(F.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(st),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(F.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(F.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},bt={init:function(){this.WHERE_OPTIONS_1=[[F.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[F.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[F.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[F.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[F.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[F.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(F.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(st),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(F.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT1").type==F.INPUT_VALUE;e.setAttribute("at1",t);var n=this.getInput("AT2").type==F.INPUT_VALUE;return e.setAttribute("at2",n),e},domToMutation:function(e){var t="true"==e.getAttribute("at1"),n="true"==e.getAttribute("at2");this.updateAt_(1,t),this.updateAt_(2,n)},updateAt_:function(e,t){this.removeInput("AT"+e),this.removeInput("ORDINAL"+e,!0),t?(this.appendValueInput("AT"+e).setCheck(Number),F.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+e).appendField(F.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+e);var n=new F.FieldDropdown(this["WHERE_OPTIONS_"+e],(function(n){var i="FROM_START"==n||"FROM_END"==n;if(i!=t){var r=this.sourceBlock_;return r.updateAt_(e,i),r.setFieldValue(n,"WHERE"+e),null}}));this.getInput("AT"+e).appendField(n,"WHERE"+e),1==e&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},gt={init:function(){this.setHelpUrl(F.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(st),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(F.Msg.LISTS_GET_INDEX_GET+" "+F.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(F.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(F.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(F.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},St={init:function(){var e=[[F.Msg.MIXLY_EQUALS,"==="],[F.Msg.MIXLY_STARTSWITH,"startswith"],[F.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(st),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new F.FieldDropdown(e),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},kt={init:function(){this.setColour(st),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(F.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_COMPARETO_HELP)}},yt={init:function(){var e=[[F.Msg.TEXT_UPPER,"upper"],[F.Msg.TEXT_TITLE,"title"],[F.Msg.TEXT_CAPITALIZE,"capitalize"],[F.Msg.TEXT_SWAPCASE,"swapcase"],[F.Msg.TEXT_LOWER,"lower"]];this.setColour(st),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new F.FieldDropdown(e),"CAPITAL").setCheck(String),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CAPITAL");return{upper:F.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:F.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:F.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:F.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:F.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[e]}))}},vt={init:function(){var e=[[F.Msg.TEXT_LJUST,"ljust"],[F.Msg.TEXT_CENTER,"center"],[F.Msg.TEXT_RJUST,"rjust"]];this.setColour(st),this.appendValueInput("VAR").appendField(new F.FieldDropdown(e),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(F.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(F.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Tt={init:function(){this.setColour(st),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(F.Msg.MIXLY_MID+F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(F.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Et={init:function(){this.setColour(st),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(F.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(F.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},It={init:function(){this.setColour(st),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(F.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(F.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},wt={init:function(){this.setColour(st),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(F.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(F.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(F.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},xt={init:function(){var e=[[F.Msg.TEXT_TRIM_BOTH,"strip"],[F.Msg.TEXT_TRIM_LEFT,"lstrip"],[F.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(st),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(F.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new F.FieldDropdown(e),"TOWHAT"),this.appendDummyInput("").appendField(F.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{strip:F.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:F.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:F.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[e]}))}},At={init:function(){this.setColour(st),this.appendDummyInput("").appendField(F.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new F.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new F.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(F.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("text_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,i=0;it?e[t]:0==t?'"key"':'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){F.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},In={init:function(){this.setColour(Tn),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(F.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},wn={init:function(){this.setColour(Tn),this.appendDummyInput().appendField(F.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},xn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.DICT_KEYS),this.setTooltip(F.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},An={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(F.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(F.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(F.Msg.DICTS_GET_TOOLTIP)}},$n={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(F.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(F.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(F.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(F.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},On={init:function(){this.setColour(Tn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(F.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(F.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Mn={init:function(){this.setColour(Tn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(F.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(F.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.DICTS_DELETE_TOOLTIP)}},Cn={init:function(){this.setColour(Tn),this.appendValueInput("DICT2").setCheck("Dict").appendField(F.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(F.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(F.Msg.MIXLY_MID),this.setTooltip(F.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.DICT_CLEAR),this.setTooltip(F.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Nn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.DICT_ITEMS),this.setTooltip(F.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Ln={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.DICT_VALUES),this.setTooltip(F.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Dn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.MIXLY_LENGTH),this.setTooltip(F.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Pn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.DICT_DELDICT),this.setTooltip(F.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fn={init:function(){this.MODE=[[F.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[F.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(F.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(F.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t="";switch(e.getFieldValue("WHERE")){case"INSERT":t=F.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":t=F.Msg.DICTS_DELETE_TOOLTIP}return t}))},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT2").type==F.INPUT_VALUE;return e.setAttribute("at2",t),e},domToMutation:function(e){var t="true"==e.getAttribute("at2");this.updateAt_(t)},updateAt_:function(e){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),e?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var t=new F.FieldDropdown(this.MODE,(function(t){var n="INSERT"==t;if(n!=e){var i=this.sourceBlock_;return i.updateAt_(n),i.setFieldValue(t,"WHERE"),null}}));this.getInput("AT2").appendField(t,"WHERE")}},Bn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(F.Msg.DICTS_ADD_VALUE),this.setTooltip(F.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},jn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(F.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(F.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Vn={init:function(){this.setColour(Tn),this.appendDummyInput("").appendField(new F.FieldLabel(F.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new F.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(F.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("dicts_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,i=0;it?e[t]:0==t?'"key"':'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){F.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},Un={init:function(){this.setColour(Tn),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Yn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.MIXLY_TO_JSON),this.setTooltip(F.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Gn={init:function(){this.setColour(Tn),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(F.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(F.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Xn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Hn={init:function(){this.setColour(Tn),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(F.Msg.MIXLY_TO_JSON),this.setTooltip(F.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},zn=210,qn={init:function(){var e=F.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(zn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new F.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{EQ:F.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:F.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:F.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:F.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:F.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:F.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[e]})),this.prevBlocks_=[null,null]}},Wn={init:function(){var e=F.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],t=F.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(zn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new F.FieldDropdown(e),"OP1"),this.appendValueInput("C").appendField(new F.FieldDropdown(t),"OP2"),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Kn={init:function(){var e=[[F.Msg.LOGIC_OPERATION_AND,"AND"],[F.Msg.LOGIC_OPERATION_OR,"OR"],[F.Msg.LOGIC_OPERATION_NOR,"NOR"],[F.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(zn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new F.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{AND:F.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:F.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:F.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:F.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[e]}))}},Jn={init:function(){this.setColour(zn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(F.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(F.Msg.LOGIC_NEGATE_TOOLTIP)}},Qn={init:function(){var e=[[F.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[F.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(zn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new F.FieldDropdown(e),"BOOL"),this.setTooltip(F.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Zn={init:function(){this.setColour(zn),this.setOutput(!0),this.appendDummyInput().appendField(F.Msg.LOGIC_NULL),this.setTooltip(F.Msg.LOGIC_NULL_TOOLTIP)}},ei={init:function(){this.setColour(zn),this.appendValueInput("A"),this.appendValueInput("B").appendField(F.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(F.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},ti={init:function(){var e=[[F.Msg.TEXT_APPEND_TO,"in"],[F.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(zn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new F.FieldDropdown(e),"BOOL"),this.appendDummyInput("").appendField(F.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(F.Msg.IN)}},ni={init:function(){var e=[[F.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[F.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(zn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new F.FieldDropdown(e),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},ii={init:function(){this.setColour(zn),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(F.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},ri={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(F.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},si={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=F.Msg.MIXLY_USE,i=F.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,r=F.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,s=F.Msg.MIXLY_BELONG;return n+{r:F.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:F.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+s+i+r}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){F.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},oi={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=F.Msg.MIXLY_USE,i=F.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,r=F.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,s=F.Msg.MIXLY_BELONG,o=F.Msg.PY_STORAGE_FILE_OBJECT;return n+{r:F.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:F.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+s+i+r+o}))}},ai={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(F.Msg.MIXPY_TEXT_ENCODE).appendField(new F.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=F.Msg.MIXLY_USE,i=F.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,r=F.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,s=F.Msg.MIXLY_BELONG,o=F.Msg.PY_STORAGE_FILE_OBJECT;return n+{r:F.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:F.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+s+i+r+o}))}},li={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+F.Msg.MIXLY_MICROBIT_TYPE_STRING+F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},ui={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},ci={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=F.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,i=F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return n+{read:F.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:F.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:F.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[t]+"x"+i}))}},pi={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(F.Msg.MICROBIT_PYTHON_TYPE)}},hi={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(F.Msg.HTML_FILE),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},di={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},fi={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},_i={init:function(){this.setColour(0),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};F.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const mi={init:function(){this.setColour(0),this.appendDummyInput().appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},bi={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+F.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},gi={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Si={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=F.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+F.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,i=F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,r=F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return n+" "+{start:F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[t]+r+"x"+i}))}},ki={init:function(){this.setColour(0),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},yi={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(F.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return F.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+F.Msg.MIXLY_ESP32_SET+{mkdir:F.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[t]}))}},vi={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(F.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Ti={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Ei={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new F.FieldDropdown([[F.Msg.HTML_FILE,"isfile"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return F.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+F.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:F.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[t]}))}},Ii={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(F.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(F.Msg.MIXLY_SETUP+F.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(F.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},wi={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(F.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},xi={init:function(){var e=F.Procedures.findLegalName("",this),t=new F.FieldTextInput(e,F.Procedures.rename);t.setSpellcheck(!1),this.appendDummyInput().appendField(t,"NAME").appendField("","PARAMS"),this.setMutator(new F.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&F.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(F.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(F.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(F.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(e){this.hasStatements_!==e&&(e?(this.appendStatementInput("STACK").appendField(F.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=e)},updateParams_:function(){var e="";this.arguments_.length&&(e=F.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),F.Events.disable();try{this.setFieldValue(e,"PARAMS")}finally{F.Events.enable()}},mutationToDom:function(e){var t=F.utils.xml.createElement("mutation");e&&t.setAttribute("name",this.getFieldValue("NAME"));for(var n=0;n"),this.appendValueInput("style").appendField(F.Msg.MIXLY_AIP_ATTR).setAlign(F.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(F.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},vr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(F.Msg.HTML_FORM_CONTENT).appendField(new F.FieldDropdown([[F.Msg.HTML_TEXT,"text"],[F.Msg.HTML_EMAIL,"email"],[F.Msg.HTML_NUMBER,"number"],[F.Msg.HTML_PASSWORD,"password"],[F.Msg.HTML_CHECKBOX,"checkbox"],[F.Msg.HTML_RADIOBUTTON,"radiobutton"],[F.Msg.HTML_BUTTON,"button"],[F.Msg.HTML_COLOUR,"colour"],[F.Msg.HTML_DATE,"date"],[F.Msg.HTML_LOCALTIME,"local time"],[F.Msg.HTML_FILE,"file"],[F.Msg.HTML_HIDDEN,"hidden"],[F.Msg.HTML_IMAGE,"image"],[F.Msg.HTML_MONTH,"month"],[F.Msg.HTML_RANGE,"range"],[F.Msg.HTML_RESET,"reset"],[F.Msg.HTML_SEARCH,"search"],[F.Msg.HTML_SUBMIT,"submit"],[F.Msg.HTML_TELEPHONENUMBER,"telephone number"],[F.Msg.HTML_TIME,"time"],[F.Msg.HTML_URL,"url"],[F.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(F.Msg.HTML_NAME).appendField(new F.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(F.Msg.HTML_VALUE).appendField(new F.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(F.Msg.MIXLY_AIP_ATTR).setAlign(F.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(new F.FieldTextInput("property"),"KEY").appendField(":").appendField(new F.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Er={init:function(){this.setColour(_r),this.appendDummyInput().appendField(new F.FieldTextInput("property"),"KEY").appendField(":").appendField(new F.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ir={init:function(){this.setColour(_r),this.appendDummyInput().appendField(F.Msg.HTML_TEXT).appendField(new F.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wr=160,xr={init:function(){this.setColour(wr),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new F.FieldTable(""),"TEXT")}},Ar={init:function(){this.setColour(wr),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new F.FieldMultilineInput(""),"TEXT")}},$r={init:function(){this.setColour(wr),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new F.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Or={init:function(){this.setColour(wr),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Mr={init:function(){this.setColour(wr),this.appendDummyInput().appendTitle("Comment:").appendTitle(new F.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Cr={init:function(){this.setColour(wr),this.appendValueInput("VALUE").appendField(F.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Rr={init:function(){this.setColour(wr),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new F.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(F.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=F.Block.obtain(e,"text_print_multiple_container");t.initSvg();for(var n=t.getInput("STACK").connection,i=0;i"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[F.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[F.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[F.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[F.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[F.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[F.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[F.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[F.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("SER").setCheck("Series").appendField(F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new F.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new F.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldDropdown(t),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Jr={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qr={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zr={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},es={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ts={init:function(){this.setColour(jr);var e=[[F.Msg.PYLAB_LABEL_X,"x"],[F.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_SET_LABEL).appendField(new F.FieldDropdown(e),"DIR"),this.appendValueInput("LABEL").appendField(F.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ns={init:function(){this.setColour(jr),this.appendValueInput("FROM").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.MIXLY_SPLITBYDOU).appendField(F.Msg.MIXPY_DATA_ARRAY_CREATE_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.MIXPY_DATA_ARRAY_CREATE_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.MIXLY_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},is={init:function(){this.setColour(jr);var e=[[F.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[F.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(F.Msg.MIXLY_DISPLAY_DRAW).appendField(new F.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{plot:F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:F.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[e]}))}},rs={init:function(){this.setColour(jr);var e=[[F.Msg.COLOUR_RGB_BLUE,"b"],[F.Msg.COLOUR_RGB_GREEN,"g"],[F.Msg.COLOUR_RGB_RED,"r"],[F.Msg.COLOUR_CYAN,"c"],[F.Msg.COLOUR_MAGENTA,"m"],[F.Msg.COLOUR_YELLOW,"y"],[F.Msg.COLOUR_BLACK,"k"],[F.Msg.COLOUR_WHITE,"w"]],t=[[F.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[F.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[F.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[F.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[F.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[F.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[F.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[F.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[F.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[F.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[F.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_SCATTER).appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(F.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new F.FieldDropdown(t),"DOT"),this.appendDummyInput("").appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},ss={init:function(){this.setColour(jr);var e=[[F.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[F.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[F.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[F.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[F.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],t=[[F.Msg.COLOUR_RGB_BLUE,"b"],[F.Msg.COLOUR_RGB_GREEN,"g"],[F.Msg.COLOUR_RGB_RED,"r"],[F.Msg.COLOUR_CYAN,"c"],[F.Msg.COLOUR_MAGENTA,"m"],[F.Msg.COLOUR_YELLOW,"y"],[F.Msg.COLOUR_BLACK,"k"],[F.Msg.COLOUR_WHITE,"w"]],n=[[F.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[F.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[F.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[F.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[F.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[F.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[F.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[F.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[F.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[F.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[F.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_PLOT_XY).appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new F.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new F.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},os={init:function(){this.setColour(jr);var e=[[F.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[F.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_BAR).appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(F.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(F.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new F.FieldDropdown(e),"ALIGN"),this.appendDummyInput().appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},as={init:function(){this.setColour(jr);var e=[[F.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[F.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],t=[[F.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[F.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[F.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[F.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_PIE).appendField(F.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(F.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(F.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new F.FieldDropdown(t),"autopct"),this.appendDummyInput("").appendField(F.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new F.FieldDropdown(e),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},ls={init:function(){this.setColour(jr),this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_HIST).appendField(F.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(F.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},us={init:function(){this.setColour(jr);var e=[[F.Msg.PYLAB_LABEL_X,"x"],[F.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(F.Msg.MIXLY_SETTING).appendField(new F.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_TICKS).appendField(F.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},cs={init:function(){var e=[["sin","sin"],["cos","cos"],["tan","tan"],["arcsin","arcsin"],["arccos","arccos"],["arctan","arctan"],[F.Msg.LANG_MATH_TO_ROUND,"round"],[F.Msg.LANG_MATH_TO_CEIL,"ceil"],[F.Msg.LANG_MATH_TO_FLOOR,"floor"]];this.setColour(jr),this.setOutput(!0),this.setInputsInline(!0),this.appendDummyInput().appendField(F.Msg.mixpy_NUMPY_TRIG),this.appendValueInput("NUM").setCheck(Number).appendField(new F.FieldDropdown(e),"OP"),this.setTooltip(F.Msg.mixpy_NUMPY_TRIG_TOOLTIP)}},ps={init:function(){this.setColour(jr),this.appendValueInput("VET").setCheck(Number).appendField(F.Msg.mixpy_SUBPLOT).appendField(F.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(F.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(F.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},hs={init:function(){this.setColour(jr),this.appendValueInput("FILENAME").appendField(F.Msg.MIXPY_PANDAS_READ_CSV),this.appendDummyInput().appendField(new F.FieldDropdown([[F.Msg.mixpy_PANDAS_READCSV_HEADER_Y,"0"],[F.Msg.mixpy_PANDAS_READCSV_HEADER_N,"None"]]),"MODE"),this.appendDummyInput().appendField(F.Msg.mixpy_PANDAS_READCSV_TITLE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(F.Msg.mixpy_PANDAS_READCSV_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){F.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},ds={init:function(){this.setColour(jr),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(F.Msg.mixpy_DATAFRAME_GET),this.appendDummyInput("").appendField(F.Msg.mixpy_DATAFRAME_GET_INDEX).appendField(new F.FieldDropdown([[F.Msg.DATAFRAME_COLUMN,"column"],[F.Msg.DATAFRAME_RAW,"raw"]]),"MODE"),this.setOutput(!0),this.setTooltip(F.Msg.mixpy_DATAFRAME_GET_TOOLTIP)}},fs={init:function(){this.setColour(jr),this.appendValueInput("FILE").setCheck(String).appendField(F.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(F.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},_s={init:function(){this.setColour(jr);var e=[[F.Msg.TEXT_TRIM_LEFT,"right"],[F.Msg.mixpy_PL_TEXT_CENTER,"center"],[F.Msg.TEXT_TRIM_RIGHT,"left"]],t=[[F.Msg.mixpy_PL_TEXT_TOP,"bottom"],[F.Msg.mixpy_PL_TEXT_CENTER,"center"],[F.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(F.Msg.MIXLY_SETTING).appendField(F.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(F.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(F.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(F.Msg.mixpy_PL_TEXT_HOR).appendField(new F.FieldDropdown(e),"HALIGN"),this.appendDummyInput("").appendField(F.Msg.mixpy_PL_TEXT_VER).appendField(new F.FieldDropdown(t),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(F.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PL_TEXT_TOOLTIP)}},ms={init:function(){this.setColour(jr),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_TOARRAY),this.setOutput(!0,"List"),this.setTooltip(F.Msg.MIXLY_PYTHON_TOOLTIP_TOARRAY)}},bs={init:function(){this.setColour(jr),this.appendValueInput("SER").setCheck("Series").appendField(F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_PLOT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gs={init:function(){this.setColour(jr);var e=[[F.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[F.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[F.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[F.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[F.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],t=[[F.Msg.COLOUR_RGB_BLUE,"b"],[F.Msg.COLOUR_RGB_GREEN,"g"],[F.Msg.COLOUR_RGB_RED,"r"],[F.Msg.COLOUR_CYAN,"c"],[F.Msg.COLOUR_MAGENTA,"m"],[F.Msg.COLOUR_YELLOW,"y"],[F.Msg.COLOUR_BLACK,"k"],[F.Msg.COLOUR_WHITE,"w"]],n=[[F.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[F.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[F.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("SER").setCheck("Series").appendField(F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new F.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new F.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldDropdown(t),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ss={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ks={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ys={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vs={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ts={init:function(){this.setColour(jr);var e=[[F.Msg.PYLAB_LABEL_X,"x"],[F.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_SET_LABEL).appendField(new F.FieldDropdown(e),"DIR"),this.appendValueInput("LABEL").appendField(F.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Es={init:function(){this.setColour(jr);var e=[[F.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[F.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(F.Msg.MIXLY_DISPLAY_DRAW).appendField(new F.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{plot:F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:F.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[e]}))}},Is={init:function(){this.setColour(jr);var e=[[F.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[F.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[F.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_SCATTER).appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(F.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new F.FieldDropdown(e),"DOT"),this.appendDummyInput().appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},ws={init:function(){this.setColour(jr);var e=[[F.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[F.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[F.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[F.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[F.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],t=[[F.Msg.COLOUR_RGB_BLUE,"b"],[F.Msg.COLOUR_RGB_GREEN,"g"],[F.Msg.COLOUR_RGB_RED,"r"],[F.Msg.COLOUR_CYAN,"c"],[F.Msg.COLOUR_MAGENTA,"m"],[F.Msg.COLOUR_YELLOW,"y"],[F.Msg.COLOUR_BLACK,"k"],[F.Msg.COLOUR_WHITE,"w"]],n=[[F.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[F.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[F.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_PLOT_XY).appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new F.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new F.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},xs={init:function(){this.setColour(jr);var e=[[F.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[F.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_BAR).appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(F.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(F.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new F.FieldDropdown(e),"ALIGN"),this.appendDummyInput().appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},As={init:function(){this.setColour(jr);var e=[[F.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[F.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],t=[[F.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[F.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[F.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[F.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_PIE).appendField(F.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(F.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(F.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new F.FieldDropdown(t),"autopct"),this.appendDummyInput("").appendField(F.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new F.FieldDropdown(e),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},$s={init:function(){this.setColour(jr),this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_HIST).appendField(F.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(F.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Os={init:function(){this.setColour(jr);var e=[[F.Msg.PYLAB_LABEL_X,"x"],[F.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(F.Msg.MIXLY_SETTING).appendField(new F.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_TICKS).appendField(F.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},Ms={init:function(){this.setColour(jr),this.appendValueInput("VET").setCheck(Number).appendField(F.Msg.mixpy_SUBPLOT).appendField(F.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(F.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(F.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Cs={init:function(){this.setColour(jr),this.appendDummyInput("").appendField(F.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(F.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},Rs={init:function(){this.setColour(jr);var e=[[F.Msg.TEXT_TRIM_LEFT,"right"],[F.Msg.mixpy_PL_TEXT_CENTER,"center"],[F.Msg.TEXT_TRIM_RIGHT,"left"]],t=[[F.Msg.mixpy_PL_TEXT_TOP,"bottom"],[F.Msg.mixpy_PL_TEXT_CENTER,"center"],[F.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(F.Msg.MIXLY_SETTING).appendField(F.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(F.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(F.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(F.Msg.mixpy_PL_TEXT_HOR).appendField(new F.FieldDropdown(e),"HALIGN"),this.appendDummyInput("").appendField(F.Msg.mixpy_PL_TEXT_VER).appendField(new F.FieldDropdown(t),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(F.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PL_TEXT_TOOLTIP)}},Ns=20,Ls={init:function(){this.setColour(Ns),this.appendValueInput("VAR").appendField(F.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(F.Msg.INOUT_input_TOOLTIP)}},Ds={init:function(){this.setColour(Ns),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(F.Msg.BLOCKPY_PRINT_TOOLTIP)}},Ps={init:function(){this.setColour(Ns),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(F.Msg.TEXT_PRINT_TOOLTIP)}},Fs={init:function(){this.setColour(Ns),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_SERIAL_PRINT),this.appendValueInput("END").appendField(F.Msg.MIXLY_ENDSWITH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_INOUT_PRINT_END_TOOLTIP)}},Bs={init:function(){var e=[[F.Msg.LANG_MATH_STRING,"str"],[F.Msg.LANG_MATH_INT,"int"],[F.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Ns),this.appendDummyInput("").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new F.FieldDropdown(e),"DIR"),this.appendValueInput("VAR").appendField(F.Msg.PROCEDURES_MUTATORCONTAINER_TITLE).setCheck(String),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{str:F.Msg.MIXLY_MIXPY_INOUT_STR_INPUT_TOOLTIP,int:F.Msg.MIXLY_MIXPY_INOUT_INT_INPUT_TOOLTIP,float:F.Msg.MIXLY_MIXPY_INOUT_FLOAT_INPUT_TOOLTIP}[e]}))}},js={init:function(){this.setColour(Ns),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new F.icons.MutatorIcon(["inout_print_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.MIXLY_MIXPY_INOUT_PRINT_MANY_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("inout_print_container");t.initSvg();for(var n=t.getInput("STACK").connection,i=0;i0?e:[["'无可用地图'","'无可用地图'"]]}},oa={init:function(){this.appendValueInput("pathtype").setCheck(null).appendField("设置路径样式为"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},aa={init:function(){this.imgArr=this.getLocalImg(),this.appendDummyInput().appendField(new F.FieldDropdown(this.getLocalImg()),"type"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")},onchange:function(){let e=this.getFieldValue("type"),t=this.imgArr;this.haveNewSrc(this.imgArr,t)&&(this.imgArr=t,this.getField("type").menuGenerator_=this.imgArr,this.checkSrc(e,this.imgArr)?this.setFieldValue(e,"type"):this.setFieldValue(this.imgArr[0][1],"type"))},haveNewSrc:function(e,t){if(e.length!==t.length)return!0;for(var n=0;n0?e:[["'无可用路径'","'无可用路径'"]]}},la={init:function(){this.setColour(290),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("posx").setCheck(null).appendField("在("),this.appendDummyInput().appendField(","),this.appendValueInput("posy").setCheck(null).appendField(""),this.appendDummyInput().appendField(")放置").appendField(new F.FieldDropdown([["障碍","'wall'"],["金币","'coin'"]]),"item"),this.setTooltip("")}},ua={init:function(){this.imgArr=this.getLocalImg(),this.appendDummyInput().appendField(new F.FieldDropdown(this.getLocalImg()),"type"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")},onchange:function(){let e=this.getFieldValue("type"),t=this.imgArr;this.haveNewSrc(this.imgArr,t)&&(this.imgArr=t,this.getField("type").menuGenerator_=this.imgArr,this.checkSrc(e,this.imgArr)?this.setFieldValue(e,"type"):this.setFieldValue(this.imgArr[0][1],"type"))},haveNewSrc:function(e,t){if(e.length!==t.length)return!0;for(var n=0;n0?e:[["'无可用角色'","'无可用角色'"]]}},ca={init:function(){this.setColour(290),this.appendValueInput("character").setCheck(null).appendField("初始化角色为"),this.appendDummyInput().appendField("面朝").appendField(new F.FieldDropdown([["北","0"],["南","2"],["西","3"],["东","1"]]),"direction"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},pa={init:function(){this.setColour(290),this.appendDummyInput().appendField("获取⻆⾊所获分数"),this.setOutput(!0,Number),this.setTooltip("")}},ha={init:function(){this.appendDummyInput().appendField(new F.FieldDropdown([["北","0"],["南","2"],["西","3"],["东","1"]]),"direction"),this.appendDummyInput().appendField("侧有障碍"),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},da={init:function(){this.appendDummyInput().appendField("随机生成小车油量"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},fa={init:function(){this.appendDummyInput().appendField("需要加油"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},_a={init:function(){this.appendDummyInput().appendField("信号灯为绿灯"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},ma={init:function(){this.appendDummyInput().appendField("信号灯为红灯"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},ba={init:function(){this.appendDummyInput().appendField("进加油站加油"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},ga={init:function(){this.appendDummyInput().appendField("检查程序循环数目是否正确"),this.setPreviousStatement(!0),this.setColour(290),this.setTooltip("")}},Sa=function(e,t){return[t.variableDB_.getName(this.getFieldValue("VAR"),F.Variables.NAME_TYPE),t.ORDER_ATOMIC]},ka=function(e,t){if(""==this.getFieldValue("VAR"))return" = None\n";var n=t.valueToCode(this,"VALUE",t.ORDER_ASSIGNMENT)||"None";return t.variableDB_.getName(this.getFieldValue("VAR"),F.Variables.NAME_TYPE)+" = "+n+"\n"},ya=function(e,t){var n=this.getFieldValue("OP"),i=t.valueToCode(this,"MYVALUE",t.ORDER_ATOMIC)||"None";if("bytes"==n)var r=n+"("+i+',"UTF-8")';else r=n+"("+i+")";return[r,t.ORDER_ATOMIC]},va=function(e,t){return"global "+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"None")+"\n"},Ta=function(e,t){return["type("+(t.valueToCode(this,"DATA",t.ORDER_ATOMIC)||"None")+")",t.ORDER_ATOMIC]},Ea=function(e,t){return[this.getFieldValue("type"),t.ORDER_ATOMIC]},Ia=function(e,t){for(var n=new Array(this.itemCount_),i=0;i= stop:"," yield start"," start -= abs(step)"])};if(e=function(e,t,n){return"("+e+" <= "+t+") and "+l()+"("+e+", "+t+", "+n+") or "+u()+"("+e+", "+t+", "+n+")"},F.isNumber(i)&&F.isNumber(r)&&F.isNumber(s))i=parseFloat(i),r=parseFloat(r),s=Math.abs(parseFloat(s)),0==i%1&&0==r%1&&0==s%1?(i<=r?(r++,e=0==i&&1==s?r:i+", "+r,1!=s&&(e+=", "+s)):e=i+", "+--r+", -"+s,e="range("+e+")"):(e=i",GTE:">="};const oc=function(e,t){var n=this.getFieldValue("OP"),i="&&"==n?t.ORDER_LOGICAL_AND:t.ORDER_LOGICAL_OR,r=t.valueToCode(this,"A",i)||"False",s=t.valueToCode(this,"B",i)||"False";if("AND"==n)var o=r+" and "+s;else if("OR"==n)o=r+" or "+s;else if("NOR"==n)o="not("+r+"^"+s+")";else o=r+"^"+s;return[o,i]},ac=function(e,t){var n=t.ORDER_UNARY_PREFIX;return["not "+(t.valueToCode(this,"BOOL",n)||"False"),n]},lc=function(e,t){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",t.ORDER_ATOMIC]},uc=function(e,t){return["None",t.ORDER_ATOMIC]},cc=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"False";return["("+(t.valueToCode(this,"B",t.ORDER_ATOMIC)||"False")+" if "+n+" else "+(t.valueToCode(this,"C",t.ORDER_ATOMIC)||"False")+")",t.ORDER_ATOMIC]},pc=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"''",i=t.valueToCode(this,"B",t.ORDER_ATOMIC)||"''";return[n+" "+this.getFieldValue("BOOL")+" "+i,t.ORDER_ATOMIC]},hc=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"''",i=t.valueToCode(this,"B",t.ORDER_ATOMIC)||"''";return[n+" "+this.getFieldValue("BOOL")+" "+i,t.ORDER_ATOMIC]},dc=function(e,t){return["bool("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"0")+")",t.ORDER_ATOMIC]},fc=function(e,t){return t.definitions_.import_os="import os","os.startfile("+t.valueToCode(this,"fn",t.ORDER_ATOMIC)+")\n"},_c=function(e,t){return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+" = open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},mc=function(e,t){return["open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",t.ORDER_ATOMIC]},bc=function(e,t){return["open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',t.ORDER_ATOMIC]},gc=function(e,t){var n=t.valueToCode(this,"data",t.ORDER_ATOMIC);return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".write("+n+")\n"},Sc=function(e,t){var n=this.getFieldValue("MODE");return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+"."+n+"()",t.ORDER_ATOMIC]},kc=function(e,t){var n=this.getFieldValue("MODE");return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+"."+n+"("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},yc=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".readline("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},vc=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".writable()",t.ORDER_ATOMIC]},Tc=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".name()",t.ORDER_ATOMIC]},Ec=function(e,t){return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".close()\n"},Ic=function(e,t){t.definitions_.import_os="import os";return["os.listdir()",t.ORDER_ATOMIC]},wc=function(e,t){return t.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},xc=function(e,t){return t.definitions_.import_os="import os",["os.path.getsize("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},Ac=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".tell()",t.ORDER_ATOMIC]},$c=function(e,t){var n=this.getFieldValue("MODE"),i=0;return i="start"==n?0:"current"==n?1:2,t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".seek("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+","+i+")\n"},Oc=function(e,t){return t.definitions_.import_os="import os","os.chdir("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},Mc=function(e,t){t.definitions_.import_os="import os";return["os.getcwd()",t.ORDER_ATOMIC]},Cc=function(e,t){return t.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+t.valueToCode(this,"PATH",t.ORDER_ATOMIC)+")\n"},Rc=function(e,t){return t.definitions_.import_os="import os","os.rename("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+","+t.valueToCode(this,"NEWFILE",t.ORDER_ATOMIC)+")\n"},Nc=function(e,t){t.definitions_.import_os="import os";var n=t.valueToCode(this,"FILE",t.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+n+")",t.ORDER_ATOMIC]},Lc=function(e,t){return t.definitions_.import_os="import os",t.definitions_.import_sdcard="import sdcard",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+" = sdcard.SDCard("+t.valueToCode(this,"SPISUB",t.ORDER_ATOMIC)+","+t.valueToCode(this,"PINSUB",t.ORDER_ATOMIC)+")\n"},Dc=function(e,t){return t.definitions_.import_os="import os",t.definitions_.import_sdcard="import sdcard","os.mount("+t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+","+t.valueToCode(this,"DIR",t.ORDER_ATOMIC)+")\n"},Pc=function(e,t){var n=t.variableDB_.getName(this.getFieldValue("NAME"),F.Procedures.NAME_TYPE),i=(this.getInput("STACK")&&t.statementToCode(this,"STACK"))??" pass\n";t.INFINITE_LOOP_TRAP&&(i=t.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+i);var r=t.valueToCode(this,"RETURN",t.ORDER_NONE)||"";r&&(r=" return "+r+"\n");for(var s=[],o=0;o\n\n\n\t\n"+t.statementToCode(this,"HEAD")+"\n\n"+t.statementToCode(this,"BODY")+"\n\n'''",t.ORDER_ATOMIC]},gp=function(e,t){var n=t.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");return"\n"+n+"\n"},Sp=function(e,t){var n=t.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");if("head"==i)var r="<"+i+'>\n\t\n'+n+"\n";else r="<"+i+">\n"+n+"\n";return r},kp=function(e,t){var n=t.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");return"<"+i+">\n"+n+"\n"},yp=function(e,t){var n=t.statementToCode(this,"DO"),i=t.valueToCode(this,"style"),r=this.getFieldValue("LEVEL");return"<"+r+" "+i+" >\n"+n+"\n"},vp=function(e,t){return['style="'+t.statementToCode(this,"STYLE")+'"',t.ORDER_ATOMIC]},Tp=function(e,t){return'"},Ep=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Ip=function(){return this.getFieldValue("TEXT")+"\n"},wp=function(e){return e.getFieldValue("TEXT")+"\n"},xp=function(e,t){return[e.getFieldValue("TEXT"),t.ORDER_ATOMIC]},Ap=function(e,t){return(t.valueToCode(e,"VALUE",t.ORDER_ATOMIC)||"")+"\n"},$p=function(){return""},Op=function(e,t){return["type("+(t.valueToCode(e,"VALUE",t.ORDER_MEMBER)||"___")+")",t.ORDER_ATOMIC]},Mp=function(e,t){for(var n=e.getFieldValue("NAME"),i=e.hasReturn_,r=new Array(e.itemCount_),s=0;s=0&&(i[r]=i[r].replace(" ",""));n="";for(r=0;rthis.#e.on("display",e)[0],nf.configure({output:e=>{this.#e.run("output",{content:e})},read:this.readFile.bind(this),inputfun:this.skInput.bind(this),inputfunTakesPrompt:!0,execLimit:Number.POSITIVE_INFINITY,fileread:this.fileread.bind(this),filewrite:this.filewrite.bind(this),__future__:nf.python3}),nf.builtins.value=new nf.builtin.func((function(){return nf.ffi.remapToPy(void 0===of?5:of)})),nf.builtins.set_value=new nf.builtin.func((function(e){of=e.v})),nf.builtinFiles.files["./mixpy.py"]='import math\r\n\r\ndef math_map(v, al, ah, bl, bh):\r\n return bl + (bh - bl) * (v - al) / (ah - al)\r\n\r\ndef math_mean(myList):\r\n localList = [e for e in myList if type(e) == int or type(e) == float]\r\n if not localList: return\r\n return float(sum(localList)) / len(localList)\r\n\r\ndef math_median(myList):\r\n localList = sorted([e for e in myList if type(e) == int or type(e) == float])\r\n if not localList: return\r\n if len(localList) % 2 == 0:\r\n return (localList[len(localList) // 2 - 1] + localList[len(localList) // 2]) / 2.0\r\n else:\r\n return localList[(len(localList) - 1) // 2]\r\n\r\ndef math_modes(some_list):\r\n modes = []\r\n # Using a lists of [item, count] to keep count rather than dict\r\n # to avoid "unhashable" errors when the counted item is itself a list or dict.\r\n counts = []\r\n maxCount = 1\r\n for item in some_list:\r\n found = False\r\n for count in counts:\r\n if count[0] == item:\r\n count[1] += 1\r\n maxCount = max(maxCount, count[1])\r\n found = True\r\n if not found:\r\n counts.append([item, 1])\r\n for counted_item, item_count in counts:\r\n if item_count == maxCount:\r\n modes.append(counted_item)\r\n return modes\r\n\r\ndef math_standard_deviation(numbers):\r\n n = len(numbers)\r\n if n == 0: return\r\n mean = float(sum(numbers)) / n\r\n variance = sum((x - mean) ** 2 for x in numbers) / n\r\n return math.sqrt(variance)\r\n\r\ndef lists_sort(my_list, type, reverse):\r\n def try_float(s):\r\n try:\r\n return float(s)\r\n except:\r\n return 0\r\n key_funcs = {\r\n "NUMERIC": try_float,\r\n "TEXT": str,\r\n "IGNORE_CASE": lambda s: str(s).lower()\r\n }\r\n key_func = key_funcs[type]\r\n list_cpy = list(my_list)\r\n return sorted(list_cpy, key=key_func, reverse=reverse)'}readFile(e){if(rf.matchModelName(e))return rf.load(e);if(void 0!==sf[e])return nf.misceval.promiseToSuspension(fetch(sf[e]).then((e=>e.text())));if(void 0===nf.builtinFiles||void 0===nf.builtinFiles.files[e])throw"File not found: '"+e+"'";return nf.builtinFiles.files[e]}fileread(e,t){return this.mixpyProject.exist(e)?this.mixpyProject.getFileContent(e):-1!==t.indexOf("w")?(this.mixpyProject.add(e,"",1),""):null}filewrite(e,t){var n=e.name;this.mixpyProject.modify(n,t),this.mixpyProject.select(n)}skInput(e){return new Promise(((t,n)=>{this.#e.run("input",{content:{prompt:e},resolve:t,reject:n})}))}reset(){nf.execLimit=Number.POSITIVE_INFINITY,nf.TurtleGraphics.reset&&nf.TurtleGraphics.reset()}kill(){nf.execLimit=0,this.executionEnd_()}step(e,t,n,i){if(".py"==i){var r=this.executionBuffer.step,s=this.parseGlobals(e);this.executionBuffer.trace.push({step:r,filename:i,line:t,column:n,properties:s.properties,modules:s.modules}),this.executionBuffer.step=r+1,this.executionBuffer.last_step=r+1,this.executionBuffer.line_number=t}}analyzeVariables(){if(""==this.main.model.programs.__main__().trim())return{}}analyze(){return this.main.model.execution.status("analyzing"),""!=this.main.model.programs.__main__().trim()||(this.main.components.feedback.emptyProgram("You haven't written any code yet!"),!1)}steprun(e){this.reset(),-1===e.indexOf("import blocklygame")&&-1===e.indexOf("from blocklygame import")||(rf.reset(),ef()(nf.TurtleGraphics.target).empty()),-1!=e.indexOf("settedMap(4")|-1!=e.indexOf("settedMap(6")&&-1!=e.indexOf("moveDirection")&&(e+="actor.isCirculationRight()\n"),-1==e.indexOf("settedMap(5)")&&-1!=e.indexOf("moveDirection")&&(e+="actor.isSuccess()\n"),this.programStatus.running=!0,nf.misceval.asyncToPromise((()=>nf.importMainWithBody("",!1,e,!0))).then((()=>{this.programStatus.running=!1,this.#e.run("finished")})).catch((e=>{B.Debug.error(e),this.programStatus.running=!1,this.#e.run("error",e);var t=af(e);this.#e.run("finished"),-1===t.indexOf("TimeLimitError")&&this.executionEnd_()}))}run(e){if(this.reset(),-1===e.indexOf("import blocklygame")&&-1===e.indexOf("from blocklygame import")||(rf.reset(),ef()(nf.TurtleGraphics.target).empty()),-1!==e.indexOf("import blocktool")||-1!==e.indexOf("import blocklygame")||-1!==e.indexOf("from blocklygame import")){var t=[];t=e.split("\n");for(var n=0;n=0){var i="",r=/,?'block_id=[\s\S]*'/.exec(t[n]);null!=r&&(i=r[0],t[n]=t[n].replace(i,""))}(t[n].indexOf("import blocktool")>=0||t[n].indexOf("blocktool.highlight")>=0)&&(t[n]="delete"),t[n].indexOf("blocklygame")>=0&&(t[n]=t[n].replace("blocklygame","bg_nonehl"))}e="";for(n=0;nnf.importMainWithBody("",!1,e,!0))).then((()=>{this.programStatus.running=!1,this.#e.run("finished")})).catch((e=>{B.Debug.error(e),this.programStatus.running=!1,this.#e.run("error",e);var t=af(e);this.#e.run("finished"),-1===t.indexOf("TimeLimitError")&&this.executionEnd_()}))}setupEnvironment(e,t,n,i,r){var s=this.main.model;this._backup_execution=nf.afterSingleExecution,nf.afterSingleExecution=void 0,nf.builtins.get_output=new nf.builtin.func((function(){return nf.builtin.pyCheckArgs("get_output",arguments,0,0),nf.ffi.remapToPy(s.execution.output())})),nf.builtins.reset_output=new nf.builtin.func((function(){nf.builtin.pyCheckArgs("reset_output",arguments,0,0),s.execution.output.removeAll()})),nf.builtins.log=new nf.builtin.func((function(e){nf.builtin.pyCheckArgs("log",arguments,1,1),console.log(e)})),nf.builtins._trace=t,nf.builtins._final_values=r,nf.builtins.code=nf.ffi.remapToPy(e),nf.builtins.set_success=this.instructor_module.set_success,nf.builtins.set_feedback=this.instructor_module.set_feedback,nf.builtins.set_finished=this.instructor_module.set_finished,nf.builtins.count_components=this.instructor_module.count_components,nf.builtins.no_nonlist_nums=this.instructor_module.no_nonlist_nums,nf.builtins.only_printing_properties=this.instructor_module.only_printing_properties,nf.builtins.calls_function=this.instructor_module.calls_function,nf.builtins.get_property=this.instructor_module.get_property,nf.builtins.get_value_by_name=this.instructor_module.get_value_by_name,nf.builtins.get_value_by_type=this.instructor_module.get_value_by_type,nf.builtins.parse_json=this.instructor_module.parse_json,nf.skip_drawing=!0,s.settings.mute_printer(!0)}disposeEnvironment(){nf.afterSingleExecution=this._backup_execution,nf.builtins.get_output=void 0,nf.builtins.reset_output=void 0,nf.builtins.log=void 0,nf.builtins._trace=void 0,nf.builtins.trace=void 0,nf.builtins.code=void 0,nf.builtins.set_success=void 0,nf.builtins.set_feedback=void 0,nf.builtins.set_finished=void 0,nf.builtins.count_components=void 0,nf.builtins.calls_function=void 0,nf.builtins.get_property=void 0,nf.builtins.get_value_by_name=void 0,nf.builtins.get_value_by_type=void 0,nf.builtins.no_nonlist_nums=void 0,nf.builtins.only_printing_properties=void 0,nf.builtins.parse_json=void 0,nf.skip_drawing=!1,of=void 0,this.main.model.settings.mute_printer(!1)}parseGlobals(e){var t=Array(),n=Array();for(var i in e){var r=e[i];if("__name__"!==i&&"__doc__"!==i){i=i.replace("_$rw$","").replace("_$rn$","");var s=this.parseValue(i,r);null!==s?t.push(s):r.constructor==nf.builtin.module&&n.push(r.$d.__name__.v)}}return{properties:t,modules:n}}parseValue(e,t){if(null==t)return{name:e,type:"Unknown",value:"Undefined"};switch(t.constructor){case nf.builtin.func:return{name:e,type:"Function",value:void 0!==t.func_code.co_varnames?" Arguments: "+t.func_code.co_varnames.join(", "):" No arguments"};case nf.builtin.module:return null;case nf.builtin.str:return{name:e,type:"String",value:t.$r().v};case nf.builtin.none:return{name:e,type:"None",value:"None"};case nf.builtin.bool:return{name:e,type:"Boolean",value:t.$r().v};case nf.builtin.nmber:return{name:e,type:"int"==t.skType?"Integer":"Float",value:t.$r().v};case nf.builtin.int_:return{name:e,type:"Integer",value:t.$r().v};case nf.builtin.float_:return{name:e,type:"Float",value:t.$r().v};case nf.builtin.tuple:return{name:e,type:"Tuple",value:t.$r().v};case nf.builtin.list:return t.v.length<=20?{name:e,type:"List",value:t.$r().v,exact_value:t}:{name:e,type:"List",value:"[... "+t.v.length+" elements ...]",exact_value:t};case nf.builtin.dict:return{name:e,type:"Dictionary",value:t.$r().v};case Number:return{name:e,type:t%1==0?"Integer":"Float",value:t};case String:return{name:e,type:"String",value:t};case Boolean:return{name:e,type:"Boolean",value:t?"True":"False"};default:return{name:e,type:null==t.tp$name?t:t.tp$name,value:null==t.$r?t:t.$r().v}}}}class uf extends B.PageBase{static{B.HTMLTemplate.add("html/statusbar/statusbar-image.html",new B.HTMLTemplate('\r\n
\r\n
\r\n
')),this.init=function(){B.StatusBarsManager.typesRegistry.register(["images"],uf);const e=B.Workspace.getMain().getStatusBarsManager();e.add({type:"images",id:"images",name:F.Msg.MIXLY_MICROBIT_IMAGE,title:F.Msg.MIXLY_MICROBIT_IMAGE}),e.changeTo("output")}}constructor(){super();const e=ef()(B.HTMLTemplate.get("html/statusbar/statusbar-image.html").render());this.setContent(e)}init(){super.init(),this.hideCloseBtn()}clean(){this.getContent().empty()}display(e){const t=this.getContent(),n=function(e){e.style.width="auto",e.style.height="auto",e.style.maxWidth="100%",e.style.maxHeight="100%"};this.clean();let i=e.content,r=null,s=null;switch(e.display_type){case"p5":i.style.width="100%",i.style.height="100%",i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center",new MutationObserver((function(e){e.forEach((e=>e.addedNodes.forEach((e=>{const t=e;null!=t.tagName&&["canvas","video"].includes(t.tagName.toLowerCase())&&n(t)}))))})).observe(i,{childList:!0}),i.querySelectorAll("canvas,video").forEach(n),t.append(i);break;case"matplotlib":r=i.querySelector("canvas"),r&&(i=r),i.style.width="",i.style.height="",i.style.maxWidth="100%",i.style.maxHeight="100%",t.append(i);break;case"ocaml-canvas":i.style.width="",i.style.height="",i.style.maxWidth="100%",i.style.maxHeight="100%",t.append(i);break;case"turtle":i.setAttribute("width","100%"),i.setAttribute("height","100%"),t.append(i.outerHTML);break;case"sympy":t.append(e.content),void 0===window.MathJax?(console.log("Loading MathJax (Sympy expression needs it)."),function(){let e=document.createElement("script");e.type="text/javascript",e.src="https://cdn.jsdelivr.net/npm/mathjax@3.0.5/es5/tex-mml-chtml.js",document.getElementsByTagName("head")[0].appendChild(e)}()):window.MathJax.typeset();break;case"multiple":for(let n of["image/svg+xml","image/png","text/html","text/plain"])if(n in e.content){let i=e.content[n];"image/png"===n&&(i=''),t.append(i);break}break;case"tutor":if(t.append(ef()(e.content.replace("overflow-y%3A%20hidden%3B",""))),s=this.getContent()[0].getElementsByTagName("iframe")[0],null==s)return;s.style.maxHeight=s.style.minHeight="100%",new IntersectionObserver(((e,t)=>{const n=e[0];n&&!n.isIntersecting||(s.contentWindow?.postMessage({type:"redraw"},"*"),t.disconnect())})).observe(s);break;default:console.error(`Not supported node type '${e.display_type}' in eval.display result processing.`)}}}const cf=uf;class pf{static{this.pythonShell=null,this.init=async function(){cf.init(),this.pythonShell=new pf},this.steprun=function(){const e=B.Workspace.getMain().getEditorsManager().getActive().getCode();return this.pythonShell.steprun(e)},this.run=function(){const e=B.Workspace.getMain().getEditorsManager().getActive().getCode();return this.pythonShell.run(e)},this.stop=function(){return this.pythonShell.stop()}}#t=null;#n=null;#i=null;#r={row:0,column:0};#s="";#o=null;#a=null;#l=!1;#u=!1;#c=null;#p=()=>this.#h();#d=[{name:"REPL-Enter",bindKey:"Enter",exec:e=>{if(e.getSession().selection.getCursor().row===this.#r.row){const e=this.#t.getEndPos();let t=this.#t.getValueRange(this.#r,e);return t=t.replace(this.#s,""),this.#o?.(t),this.#o=null,this.#a=null,this.#t.addValue("\n"),this.#f(),!0}return!1}},{name:"REPL-ChangeEditor",bindKey:"Delete|Ctrl-X|Backspace",exec:e=>{const t=e.getSession().selection.getCursor();return t.row{this.#u=!1,this.#t.addValue(`\n==${B.Msg.Lang["shell.finish"]}==`)})),e.bind("output",(e=>{this.#t.addValue(e.content)})),e.bind("error",(e=>{this.#u=!1,this.#t.addValue(`\n${e.toString()}\n`)})),e.bind("input",(e=>{const t=String(e?.content?.prompt);this.#t.addValue(`>>> ${t}`),this.#s=t,this.#o=e.resolve,this.#a=e.reject,this.#m()})),e.bind("display",(e=>{this.#i.changeTo("images"),this.#n.display(e)}))}#h(){const e=this.#t.getEditor(),t=e.getSession().selection.getCursor();e.setReadOnly(t.rowsetTimeout(t,e)))}}const hf=pf,df={},ff=['\n \n ','\n \n ','\n \n ','\n \n ','\n \n ','\n \n ','\n \n '];df.$shadow=ef()('
'),df.count=0,df.init=function(){hf.init();const e=B.app.getNav();e.register({icon:"icon-play-circled",title:"",id:"python-steprun-btn",displayText:F.Msg.MSG.step_run,preconditionFn:()=>!0,callback:()=>{hf.steprun().catch(B.Debug.error)},scopeType:B.Nav.Scope.LEFT,weight:4}),e.register({icon:"icon-play-circled",title:"",id:"python-run-btn",displayText:F.Msg.MSG.run,preconditionFn:()=>!0,callback:()=>{hf.run().catch(B.Debug.error)},scopeType:B.Nav.Scope.LEFT,weight:5}),e.register({icon:"icon-cancel",title:"",id:"python-stop-btn",displayText:F.Msg.MSG.stop,preconditionFn:()=>!0,callback:()=>{hf.stop().catch(B.Debug.error)},scopeType:B.Nav.Scope.LEFT,weight:6});const t=new B.HTMLTemplate("\r\n"),n=ef()(t.render());e.getBoardSelector().before(n),n.select2({width:"90px",minimumResultsForSearch:1/0,dropdownCssClass:`mixly-scrollbar mixly-${t.getId()}`,dropdownAutoWidth:!0,placeholder:"",language:B.Msg.nowLang});for(let e=0;e{const{data:t}=e.params;B.Workspace.getMain().getEditorsManager().getActive().setValue(ff[parseInt(t.id)],".mix")})),n.on("select2:opening",(()=>{df.count+=1,ef()(document.body).append(df.$shadow)})),n.on("select2:closing",(()=>{df.count-=1,!df.count&&df.$shadow.detach()})),n.trigger("change"),B.Storage.board("mix",ff[0]),B.Storage.board("path","")};df.init(),Object.assign(F.Variables,V),Object.assign(F.Procedures,Y),F.Python=H,F.generator=H,B.Profile.default={},Object.assign(F.Blocks,e,t,i,r,s,o,a,l,u,c,p,h,d,f,_,m,b,g),Object.assign(F.Python.forBlock,S,k,y,v,T,E,I,w,x,A,O,M,C,R,N,L,D,P)})()})(); \ No newline at end of file +class G{constructor(e,t){if(this.variablePrefix_=t||"",this.reservedDict_=Object.create(null),e)for(var n=e.split(","),i=0;i0?t.join("\n")+n.join("\n")+i.join("\n")+o.join("\n")+a.join("")+e+"while True:\n"+l.join("")+u.join("\n"):t.join("\n")+n.join("\n")+i.join("\n")+o.join("\n")+a.join("")+e+u.join("\n")},H.scrubNakedValue=function(e){return e+"\n"},H.quote_=function(e){var t="'";return-1!==e.indexOf("'")&&(-1===e.indexOf('"')?t='"':e=e.replace(/'/g,"\\'")),t+e+t},H.multiline_quote_=function(e){return"'''"+(e=e.replace(/'''/g,"\\'\\'\\'"))+"'''"},H.scrub_=function(e,t,n){var i="";if(!e.outputConnection||!e.outputConnection.targetConnection){(s=e.getCommentText())&&(s=F.utils.string.wrap(s,H.COMMENT_WRAP-3),i+=H.prefixLines(s+"\n","# "));for(var r=0;r0?"int("+a+" + "+r+")":r<0?"int("+a+" - "+-r+")":"int("+a+")",i&&(a="-"+a)),a};const z=330,q={init:function(){this.setColour(z),this.appendDummyInput().appendField(new F.FieldTextInput(""),"VAR"),this.setOutput(!0),this.setTooltip(F.Msg.VARIABLES_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){X.equals(e,this.getFieldValue("VAR"))&&this.setFieldValue(t,"VAR")}},W={init:function(){this.setColour(z),this.appendValueInput("VALUE").appendField(new F.FieldTextInput(""),"VAR").appendField(F.Msg.MIXLY_VALUE2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.VARIABLES_SET_TOOLTIP)},getVars:function(){var e=this.getFieldValue("VAR");return null==e?[]:e.split(",")},renameVar:function(e,t){X.equals(e,this.getFieldValue("VAR"))&&this.setFieldValue(t,"VAR")}},K={init:function(){this.setColour(z);var e=[[F.Msg.LANG_MATH_INT,"int"],[F.Msg.LANG_MATH_FLOAT,"float"],[F.Msg.LANG_MATH_BOOLEAN,"bool"],[F.Msg.LANG_MATH_STRING,"str"],[F.Msg.MIXLY_MICROBIT_TYPE_LIST,"list"],[F.Msg.MIXLY_MICROBIT_TYPE_TUPLE,"tuple"],[F.Msg.MIXLY_MICROBIT_TYPE_DICT,"dict"],[F.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,"set"],[F.Msg.LANG_MATH_BYTE,"bytes"]];this.appendValueInput("MYVALUE").appendField(new F.FieldDropdown(e),"OP"),this.setOutput(!0)}},J={init:function(){this.setColour(z),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_PYTHON_GLOBAL).setCheck("var"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(F.Msg.TEXT_PRINT_TOOLTIP)}},Q={init:function(){this.setColour(z),this.appendValueInput("DATA").appendField(F.Msg.MICROBIT_PYTHON_TYPE),this.setOutput(!0),this.setTooltip(F.Msg.MICROBIT_PYTHON_TYPE)}},Z={init:function(){this.setColour(z),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_CONTORL_GET_TYPE).appendField(new F.FieldDropdown([[F.Msg.LANG_MATH_INT,"int"],[F.Msg.MIXLY_MICROBIT_TYPE_FLOAT,"float"],[F.Msg.MIXLY_MICROBIT_TYPE_STRING,"str"],[F.Msg.MIXLY_MICROBIT_TYPE_LIST,"list"],[F.Msg.MIXLY_MICROBIT_TYPE_TUPLE,"tuple"],[F.Msg.MIXLY_MICROBIT_TYPE_DICT,"dict"],[F.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,"set"],[F.Msg.LANG_MATH_BYTE,"bytes"],[F.Msg.LOGIC_NULL,"type(None)"]]),"type"),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("type");return F.Msg.MICROBIT_controls_TypeLists+{int:F.Msg.LANG_MATH_INT,float:F.Msg.MIXLY_MICROBIT_TYPE_FLOAT,str:F.Msg.MIXLY_MICROBIT_TYPE_STRING,list:F.Msg.MIXLY_MICROBIT_TYPE_LIST,tuple:F.Msg.MIXLY_MICROBIT_TYPE_TUPLE,dict:F.Msg.MIXLY_MICROBIT_TYPE_DICT,set:F.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,image:F.Msg.MIXLY_MICROBIT_IMAGE,bytes:F.Msg.LANG_MATH_BYTE,NoneType:F.Msg.LOGIC_NULL}[t]}))}},ee={init:function(){this.setColour(z),this.itemCount_=2,this.updateShape_(),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setMutator(new F.icons.MutatorIcon(["lists_zip_item"],this)),this.setTooltip(F.Msg.MIXLY_PYTHON_LISTS_ZIP_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("lists_zip_container");t.initSvg();for(var n=t.getInput("STACK").connection,i=0;i0;r--)t.getInputTargetBlock("IF"+r)&&t.getInputTargetBlock("IF"+r).previousConnection?n[r]=t.getInputTargetBlock("IF"+r).previousConnection:n[r]=null,this.removeInput("IF"+r),t.getInputTargetBlock("DO"+r)&&t.getInputTargetBlock("DO"+r).previousConnection?i[r]=t.getInputTargetBlock("DO"+r).previousConnection:i[r]=null,this.removeInput("DO"+r);this.elseifCount_=parseInt(e.getAttribute("elseif"),10),this.elseCount_=parseInt(e.getAttribute("else"),10);for(r=1;r<=this.elseifCount_;r++)this.appendValueInput("IF"+r).setCheck([Boolean,Number]).appendField(F.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+r).appendField(F.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(F.Msg.CONTROLS_IF_MSG_ELSE);for(r=n.length-2;r>0;r--)n[r]&&n[r].reconnect(this,"IF"+r);for(r=i.length-2;r>0;r--)i[r]&&i[r].reconnect(this,"DO"+r)},decompose:function(e){var t=e.newBlock("controls_if_if");t.initSvg();for(var n=t.getInput("STACK").connection,i=1;i<=this.elseifCount_;i++){var r=e.newBlock("controls_if_elseif");r.initSvg(),n.connect(r.previousConnection),n=r.nextConnection}if(this.elseCount_){var s=e.newBlock("controls_if_else");s.initSvg(),n.connect(s.previousConnection)}return t},compose:function(e){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var t=this.elseifCount_;t>0;t--)this.removeInput("IF"+t),this.removeInput("DO"+t);this.elseifCount_=0;for(var n=e.getInputTargetBlock("STACK"),i=[null],r=[null],s=null;n;){switch(n.type){case"controls_if_elseif":this.elseifCount_++,i.push(n.valueConnection_),r.push(n.statementConnection_);break;case"controls_if_else":this.elseCount_++,s=n.statementConnection_;break;default:throw Error("Unknown block type: "+n.type)}n=n.nextConnection&&n.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(i,r,s)},saveConnections:function(e){for(var t=e.getInputTargetBlock("STACK"),n=1;t;){switch(t.type){case"controls_if_elseif":var i=this.getInput("IF"+n),r=this.getInput("DO"+n);t.valueConnection_=i&&i.connection.targetConnection,t.statementConnection_=r&&r.connection.targetConnection,n++;break;case"controls_if_else":r=this.getInput("ELSE");t.statementConnection_=r&&r.connection.targetConnection;break;default:throw"Unknown block type."}t=t.nextConnection&&t.nextConnection.targetBlock()}},rebuildShape_:function(){var e=[null],t=[null],n=null;this.getInput("ELSE")&&(n=this.getInput("ELSE").connection.targetConnection);for(var i=1;this.getInput("IF"+i);){var r=this.getInput("IF"+i),s=this.getInput("DO"+i);console.log(r.connection.targetConnection),e.push(r.connection.targetConnection),t.push(s.connection.targetConnection),i++}this.updateShape_(),this.reconnectChildBlocks_(e,t,n)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var e=1;this.getInput("IF"+e);)this.removeInput("IF"+e),this.removeInput("DO"+e),e++;for(e=1;e<=this.elseifCount_;e++)this.appendValueInput("IF"+e).setCheck([Number,Boolean]).appendField(F.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+e).appendField(F.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(F.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(e,t,n){for(var i=1;i<=this.elseifCount_;i++)e[i]&&e[i].reconnect(this,"IF"+i),t[i]&&t[i].reconnect(this,"DO"+i);n&&n.reconnect(this,"ELSE")}},ce={init:function(){this.setColour(re),this.appendValueInput("FROM").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.PYTHON_RANGE).appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},pe={init:function(){this.setColour(re),this.appendValueInput("LIST").setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(F.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(F.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return F.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){F.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},he={init:function(){this.setColour(re),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(F.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new F.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(F.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+F.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return{WHILE:F.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:F.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[t]}))}},de={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(F.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new F.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(F.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var e=document.createElement("mutation");return this.elseifCount_&&e.setAttribute("elseif",this.elseifCount_),this.elseCount_&&e.setAttribute("else",1),e},domToMutation:function(e){var t=this,n=[],i=[];this.elseCount_&&this.removeInput("ELSE");for(var r=this.elseifCount_;r>0;r--)t.getInputTargetBlock("IF"+r)&&t.getInputTargetBlock("IF"+r).previousConnection?n[r]=t.getInputTargetBlock("IF"+r).previousConnection:n[r]=null,this.removeInput("IF"+r),t.getInputTargetBlock("DO"+r)&&t.getInputTargetBlock("DO"+r).previousConnection?i[r]=t.getInputTargetBlock("DO"+r).previousConnection:i[r]=null,this.removeInput("DO"+r);this.elseifCount_=parseInt(e.getAttribute("elseif"),10),this.elseCount_=parseInt(e.getAttribute("else"),10);for(r=1;r<=this.elseifCount_;r++)this.appendValueInput("IF"+r).setCheck([Boolean,Number]).appendField(F.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+r).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(F.Msg.MIXLY_PYTHON_FINALLY);for(r=n.length-2;r>0;r--)n[r]&&n[r].reconnect(this,"IF"+r);for(r=i.length-2;r>0;r--)i[r]&&i[r].reconnect(this,"DO"+r)},decompose:function(e){var t=e.newBlock("controls_try");t.initSvg();for(var n=t.getInput("STACK").connection,i=1;i<=this.elseifCount_;i++){var r=e.newBlock("controls_except");r.initSvg(),n.connect(r.previousConnection),n=r.nextConnection}if(this.elseCount_){var s=e.newBlock("controls_finally");s.initSvg(),n.connect(s.previousConnection)}return t},compose:function(e){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var t=this.elseifCount_;t>0;t--)this.removeInput("IF"+t),this.removeInput("DO"+t);this.elseifCount_=0;for(var n=e.getInputTargetBlock("STACK"),i=[null],r=[null],s=null;n;){switch(n.type){case"controls_except":this.elseifCount_++,i.push(n.valueConnection_),r.push(n.statementConnection_);break;case"controls_finally":this.elseCount_++,s=n.statementConnection_;break;default:throw Error("Unknown block type: "+n.type)}n=n.nextConnection&&n.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(i,r,s)},saveConnections:function(e){for(var t=e.getInputTargetBlock("STACK"),n=1;t;){switch(t.type){case"controls_except":var i=this.getInput("IF"+n),r=this.getInput("DO"+n);t.valueConnection_=i&&i.connection.targetConnection,t.statementConnection_=r&&r.connection.targetConnection,n++;break;case"controls_finally":r=this.getInput("ELSE");t.statementConnection_=r&&r.connection.targetConnection;break;default:throw"Unknown block type."}t=t.nextConnection&&t.nextConnection.targetBlock()}},rebuildShape_:function(){var e=[null],t=[null],n=null;this.getInput("ELSE")&&(n=this.getInput("ELSE").connection.targetConnection);for(var i=1;this.getInput("IF"+i);){var r=this.getInput("IF"+i),s=this.getInput("DO"+i);console.log(r.connection.targetConnection),e.push(r.connection.targetConnection),t.push(s.connection.targetConnection),i++}this.updateShape_(),this.reconnectChildBlocks_(e,t,n)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var e=1;this.getInput("IF"+e);)this.removeInput("IF"+e),this.removeInput("DO"+e),e++;for(e=1;e<=this.elseifCount_;e++)this.appendValueInput("IF"+e).setCheck([Number,Boolean]).appendField(F.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+e).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(F.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(e,t,n){for(var i=1;i<=this.elseifCount_;i++)e[i]&&e[i].reconnect(this,"IF"+i),t[i]&&t[i].reconnect(this,"DO"+i);n&&n.reconnect(this,"ELSE")}},fe={init:function(){this.setColour(re);var e=new F.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(e,"FLOW").appendField(F.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var t=this;this.setTooltip((function(){var e=t.getFieldValue("FLOW");return{BREAK:F.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:F.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[e]}))},onchange:function(){if(this.workspace){var e=!1,t=this;do{if("controls_repeat"==t.type||"controls_for"==t.type||"controls_forEach"==t.type||"controls_repeat_ext"==t.type||"controls_whileUntil"==t.type||"do_while"==t.type){e=!0;break}t=t.getSurroundParent()}while(t);e?this.setWarningText(null):this.setWarningText(F.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},_e={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new F.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(F.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){return F.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",e.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){F.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},me={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new F.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(F.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){return F.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",e.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){F.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}};he.OPERATORS=[[F.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[F.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],fe.OPERATORS=[[F.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[F.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const be={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(F.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},ge={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Se={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(F.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},ke={init:function(){this.setColour(re),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},ye={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(F.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},ve={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(F.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},Te={init:function(){this.jsonInit({message0:F.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:re,tooltip:F.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:F.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},Ee={init:function(){this.setColour(re),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(F.Msg.MIXLY_STAT),this.setOutput(!0)}},Ie={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},we={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(F.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},xe={init:function(){this.appendDummyInput().appendField(F.Msg.CONTROLS_REPEAT_TITLE_REPEAT+F.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(F.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new F.FieldDropdown([[F.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[F.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(re),this.setTooltip("do-while loop"),this.setHelpUrl("")}},Ae={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$e={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},Oe={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},Me={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_GET+F.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(F.Msg.PROCEDURES_DEFRETURN_RETURN+F.Msg.MIXLY_GET_UNIQUE_IDEN)}},Ce={init:function(){this.setColour(re),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(F.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},Re={init:function(){this.setColour(re),this.appendDummyInput().appendField(F.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},Ne=230;F.FieldTextInput.math_number_validator=function(e){return String(e)},F.FieldTextInput.math_number_validator_include_blank=function(e){if(""===e)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(e)?String(e):null};const Le={init:function(){this.setColour(Ne),this.appendDummyInput().appendField(new F.FieldTextInput("0",F.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(F.Msg.MATH_NUMBER_TOOLTIP)}},De={init:function(){this.setColour(Ne);this.appendDummyInput("").appendField(F.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new F.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CONSTANT");return{pi:F.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:F.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[t]}))}},Pe={init:function(){this.setColour(Ne);this.appendDummyInput("").appendField(F.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new F.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CONSTANT");return{pi:F.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:F.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[t]}))}},Fe={init:function(){this.setColour(Ne),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new F.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{ADD:F.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:F.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:F.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:F.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:F.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:F.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:F.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[t]}))}},Be={init:function(){this.setColour(Ne),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new F.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{ADD:F.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:F.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:F.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:F.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:F.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:F.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:F.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[t]}))}},je={init:function(){this.setColour(Ne),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new F.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Ve={init:function(){this.setColour(Ne),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new F.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{SIN:F.Msg.MATH_TRIG_TOOLTIP_SIN,COS:F.Msg.MATH_TRIG_TOOLTIP_COS,TAN:F.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:F.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:F.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:F.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:F.Msg.MATH_SINGLE_TOOLTIP_LN}[t]}))}},Ue={init:function(){var e=[[F.Msg.MATH_BIN,"bin"],[F.Msg.MATH_OCT,"oct"],[F.Msg.MATH_HEX,"hex"]];this.setColour(Ne),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new F.FieldDropdown(e),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{bin:F.Msg.MATH_DEC_TOOLTIP_BIN,oct:F.Msg.MATH_DEC_TOOLTIP_OCT,hex:F.Msg.MATH_DEC_TOOLTIP_HEX}[e]}))}},Ye={init:function(){var e=[[F.Msg.LANG_MATH_TO_ROUND,"round"],[F.Msg.LANG_MATH_TO_CEIL,"ceil"],[F.Msg.LANG_MATH_TO_FLOOR,"floor"],[F.Msg.MATH_ABS,"fabs"],[F.Msg.MATH_SQRT,"sqrt"]];this.setColour(Ne),this.appendValueInput("A").setCheck(Number).appendField(new F.FieldDropdown(e),"OP"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{sqrt:F.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:F.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:F.Msg.MATH_SINGLE_TOOLTIP_SQ,round:F.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:F.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:F.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[e]}))}},Ge={init:function(){var e=[[F.Msg.MIXLY_MAX,"max"],[F.Msg.MIXLY_MIN,"min"]];this.setColour(Ne),this.appendValueInput("A").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(new F.FieldDropdown(e),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(F.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{max:F.Msg.MIXLY_TOOLTIP_MATH_MAX,min:F.Msg.MIXLY_TOOLTIP_MATH_MIN}[e]}))}},Xe={init:function(){var e=[[F.Msg.MATH_TWO,"two"],[F.Msg.MATH_EIGHT,"eight"],[F.Msg.MATH_TEN,"ten"],[F.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(Ne),this.appendDummyInput("").appendField(F.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new F.FieldDropdown(e),"OP").appendField(F.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(F.Msg.MATH_ZHW).appendField(new F.FieldDropdown(e),"OP2").appendField(F.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP"),n={two:F.Msg.MATH_Before_two,eight:F.Msg.MATH_Before_eight,ten:F.Msg.MATH_Before_ten,sixteen:F.Msg.MATH_Before_sixteen},i=t.getFieldValue("OP2"),r={two:F.Msg.MATH_Behind_two,eight:F.Msg.MATH_Behind_eight,ten:F.Msg.MATH_Behind_ten,sixteen:F.Msg.MATH_Behind_sixteen};return n[e]+r[i]}))}},He={init:function(){var e=[[F.Msg.LANG_MATH_INT,"int"],[F.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Ne),this.setOutput(!0,Number),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_RANDOM).appendField(new F.FieldDropdown(e),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(F.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TYPE"),n={int:F.Msg.LANG_MATH_INT,float:F.Msg.LANG_MATH_FLOAT_RANDOM};return F.Msg.MATH_RANDOM_INT_TOOLTIP+n[e]}))}},ze={init:function(){this.setColour(Ne),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(F.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(F.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(F.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(F.Msg.MATH_CONSTRAIN_TOOLTIP)}},qe={init:function(){this.setColour(Ne),this.appendValueInput("NUM",Number).appendField(F.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(F.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(F.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(F.Msg.MIXLY_TOOLTIP_MATH_MAP)}},We={init:function(){this.setColour(Ne),this.appendDummyInput().appendField(new F.FieldTextInput("0",F.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(F.Msg.MATH_NUMBER_TOOLTIP)}},Ke={init:function(){this.setColour(Ne),this.appendValueInput("NUM").setCheck(Number).appendField(F.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},Je={init:function(){this.setColour(Ne),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(F.Msg.MATH_ROUND).appendField(F.Msg.TEXT_KEEP),this.appendDummyInput().appendField(F.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(F.Msg.MATH_ROUND_NEW_TOOLTIP)}},Qe={init:function(){var e=[[F.Msg.MIXLY_TO_INT,"int"],[F.Msg.MIXLY_TO_FLOAT,"float"],[F.Msg.MIXLY_TO_BITES,"b"],[F.Msg.LANG_MATH_BYTE+F.Msg.MIXLY_TO_INT,"bti"]];this.setColour(Ne),this.appendValueInput("VAR").appendField(new F.FieldDropdown(e),"TOWHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{int:F.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:F.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:F.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[e]}))}},Ze={init:function(){var e=[[F.Msg.MIXLY_TO_INT,"int"],[F.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Ne),this.appendValueInput("VAR").appendField(new F.FieldDropdown(e),"TOWHAT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{int:F.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:F.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[e]}))}},et=qe,tt={init:function(){this.setColour(Ne),this.appendValueInput("VAR").appendField(F.Msg.LANG_MATH_BYTE+F.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(F.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},nt={init:function(){this.setColour(Ne),this.itemCount_=1,this.setMutator(new F.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(F.Msg.MIXLY_PRODUCT+F.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(F.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(F.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(F.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("lists_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,i=0;i1&&"\\"===e.charAt(0)){var t=e.charAt(1);if("0"===t||"b"===t||"f"===t||"n"===t||"r"===t||"t"===t||"\\"===t||"'"===t)return String(e).substring(0,2);if("x"===t&&"0"===e.charAt(2)&&"B"===e.charAt(3))return String(e).substring(0,4)}return String(e).substring(0,1)};const lt={init:function(){this.setColour(st),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new F.FieldTextInput("",F.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(F.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(e){if(1==e)var t="../../media/quote2.png";else t="../../media/quote3.png";return new F.FieldImage(t,7,12,'"')}},ut={init:function(){this.setColour(st),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(F.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},ct={init:function(){this.setColour(st),this.appendValueInput("VAR").setCheck(Number).appendField(F.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},pt={init:function(){this.setColour(st),this.appendValueInput("VAR").setCheck(String).appendField(F.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(F.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},ht={init:function(){this.setColour(st),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},dt={init:function(){this.setColour(st),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(F.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},ft={init:function(){this.WHERE_OPTIONS=[[F.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[F.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[F.Msg.TEXT_GET_INDEX_RANDOM+1+F.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(F.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(st),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(F.Msg.LISTS_GET_INDEX_GET,"MODE"),F.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(F.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=e.getFieldValue("WHERE"),i="";switch(t+" "+n){case"GET FROM_START":case"GET FROM_END":i=F.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":i=F.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":i=F.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":i=F.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=n&&"FROM_END"!=n||(i+=" "+F.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",F.Msg.ONE_BASED_INDEXING?"#1":"#0")),i}));var t=this;this.setTooltip((function(){var e=t.getFieldValue("WHERE"),n={FROM_START:F.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:F.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:F.Msg.TEXT_GET_INDEX_RANDOM};return F.Msg.PROCEDURES_DEFRETURN_RETURN+F.Msg.MIXLY_MICROBIT_TYPE_STRING+n[e]+"n"+F.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var e=document.createElement("mutation");e.setAttribute("statement",!this.outputConnection);var t=this.getInput("AT").type==F.INPUT_VALUE;return e.setAttribute("at",t),e},domToMutation:function(e){var t="true"==e.getAttribute("statement");this.updateStatement_(t),e="false"!=e.getAttribute("at"),this.updateAt_(e)},updateStatement_:function(e){e!=!this.outputConnection&&(this.unplug(!0,!0),e?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(e){this.removeInput("AT"),this.removeInput("ORDINAL",!0),e?(this.appendValueInput("AT").setCheck(Number),F.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(F.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var t=new F.FieldDropdown(this.WHERE_OPTIONS,(function(t){var n="FROM_START"==t||"FROM_END"==t;if(n!=e){var i=this.sourceBlock_;return i.updateAt_(n),i.setFieldValue(t,"WHERE"),null}}));this.getInput("AT").appendField(t,"WHERE"),F.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},_t={init:function(){this.setHelpUrl(F.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(st),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(F.Msg.LISTS_GET_INDEX_GET+" "+F.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(F.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(F.Msg.PROCEDURES_DEFRETURN_RETURN+F.Msg.MIXLY_MICROBIT_TYPE_STRING+F.Msg.LISTS_GET_INDEX_FROM_START+"n"+F.Msg.TEXT_CHARAT2)}},mt={init:function(){this.setHelpUrl(F.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(st),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(F.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(F.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},bt={init:function(){this.WHERE_OPTIONS_1=[[F.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[F.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[F.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[F.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[F.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[F.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(F.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(st),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(F.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT1").type==F.INPUT_VALUE;e.setAttribute("at1",t);var n=this.getInput("AT2").type==F.INPUT_VALUE;return e.setAttribute("at2",n),e},domToMutation:function(e){var t="true"==e.getAttribute("at1"),n="true"==e.getAttribute("at2");this.updateAt_(1,t),this.updateAt_(2,n)},updateAt_:function(e,t){this.removeInput("AT"+e),this.removeInput("ORDINAL"+e,!0),t?(this.appendValueInput("AT"+e).setCheck(Number),F.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+e).appendField(F.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+e);var n=new F.FieldDropdown(this["WHERE_OPTIONS_"+e],(function(n){var i="FROM_START"==n||"FROM_END"==n;if(i!=t){var r=this.sourceBlock_;return r.updateAt_(e,i),r.setFieldValue(n,"WHERE"+e),null}}));this.getInput("AT"+e).appendField(n,"WHERE"+e),1==e&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},gt={init:function(){this.setHelpUrl(F.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(st),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(F.Msg.LISTS_GET_INDEX_GET+" "+F.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(F.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(F.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(F.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},St={init:function(){var e=[[F.Msg.MIXLY_EQUALS,"==="],[F.Msg.MIXLY_STARTSWITH,"startswith"],[F.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(st),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new F.FieldDropdown(e),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},kt={init:function(){this.setColour(st),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(F.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_COMPARETO_HELP)}},yt={init:function(){var e=[[F.Msg.TEXT_UPPER,"upper"],[F.Msg.TEXT_TITLE,"title"],[F.Msg.TEXT_CAPITALIZE,"capitalize"],[F.Msg.TEXT_SWAPCASE,"swapcase"],[F.Msg.TEXT_LOWER,"lower"]];this.setColour(st),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new F.FieldDropdown(e),"CAPITAL").setCheck(String),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CAPITAL");return{upper:F.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:F.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:F.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:F.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:F.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[e]}))}},vt={init:function(){var e=[[F.Msg.TEXT_LJUST,"ljust"],[F.Msg.TEXT_CENTER,"center"],[F.Msg.TEXT_RJUST,"rjust"]];this.setColour(st),this.appendValueInput("VAR").appendField(new F.FieldDropdown(e),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(F.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(F.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Tt={init:function(){this.setColour(st),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(F.Msg.MIXLY_MID+F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(F.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},Et={init:function(){this.setColour(st),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(F.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(F.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},It={init:function(){this.setColour(st),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(F.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(F.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},wt={init:function(){this.setColour(st),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(F.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(F.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(F.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},xt={init:function(){var e=[[F.Msg.TEXT_TRIM_BOTH,"strip"],[F.Msg.TEXT_TRIM_LEFT,"lstrip"],[F.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(st),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(F.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new F.FieldDropdown(e),"TOWHAT"),this.appendDummyInput("").appendField(F.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("TOWHAT");return{strip:F.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:F.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:F.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[e]}))}},At={init:function(){this.setColour(st),this.appendDummyInput("").appendField(F.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new F.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new F.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(F.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("text_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,i=0;it?e[t]:0==t?'"key"':'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){F.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},In={init:function(){this.setColour(Tn),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(F.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},wn={init:function(){this.setColour(Tn),this.appendDummyInput().appendField(F.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},xn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.DICT_KEYS),this.setTooltip(F.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},An={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(F.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(F.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(F.Msg.DICTS_GET_TOOLTIP)}},$n={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(F.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(F.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(F.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(F.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},On={init:function(){this.setColour(Tn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(F.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(F.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Mn={init:function(){this.setColour(Tn),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(F.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(F.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.DICTS_DELETE_TOOLTIP)}},Cn={init:function(){this.setColour(Tn),this.appendValueInput("DICT2").setCheck("Dict").appendField(F.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(F.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(F.Msg.MIXLY_MID),this.setTooltip(F.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.DICT_CLEAR),this.setTooltip(F.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Nn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.DICT_ITEMS),this.setTooltip(F.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Ln={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.DICT_VALUES),this.setTooltip(F.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Dn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.MIXLY_LENGTH),this.setTooltip(F.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},Pn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.DICT_DELDICT),this.setTooltip(F.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fn={init:function(){this.MODE=[[F.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[F.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(F.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(F.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t="";switch(e.getFieldValue("WHERE")){case"INSERT":t=F.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":t=F.Msg.DICTS_DELETE_TOOLTIP}return t}))},mutationToDom:function(){var e=document.createElement("mutation"),t=this.getInput("AT2").type==F.INPUT_VALUE;return e.setAttribute("at2",t),e},domToMutation:function(e){var t="true"==e.getAttribute("at2");this.updateAt_(t)},updateAt_:function(e){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),e?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var t=new F.FieldDropdown(this.MODE,(function(t){var n="INSERT"==t;if(n!=e){var i=this.sourceBlock_;return i.updateAt_(n),i.setFieldValue(t,"WHERE"),null}}));this.getInput("AT2").appendField(t,"WHERE")}},Bn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(F.Msg.DICTS_ADD_VALUE),this.setTooltip(F.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},jn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(F.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(F.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Vn={init:function(){this.setColour(Tn),this.appendDummyInput("").appendField(new F.FieldLabel(F.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new F.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(F.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("dicts_create_with_container");t.initSvg();for(var n=t.getInput("STACK").connection,i=0;it?e[t]:0==t?'"key"':'"key'+(t+1)+'"'),"KEY"+t).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){F.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},Un={init:function(){this.setColour(Tn),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Yn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(F.Msg.MIXLY_TO_JSON),this.setTooltip(F.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Gn={init:function(){this.setColour(Tn),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(F.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(F.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Xn={init:function(){this.setColour(Tn),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Hn={init:function(){this.setColour(Tn),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(F.Msg.MIXLY_TO_JSON),this.setTooltip(F.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},zn=210,qn={init:function(){var e=F.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(zn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new F.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{EQ:F.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:F.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:F.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:F.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:F.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:F.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[e]})),this.prevBlocks_=[null,null]}},Wn={init:function(){var e=F.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],t=F.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(zn),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new F.FieldDropdown(e),"OP1"),this.appendValueInput("C").appendField(new F.FieldDropdown(t),"OP2"),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},Kn={init:function(){var e=[[F.Msg.LOGIC_OPERATION_AND,"AND"],[F.Msg.LOGIC_OPERATION_OR,"OR"],[F.Msg.LOGIC_OPERATION_NOR,"NOR"],[F.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(zn),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new F.FieldDropdown(e),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{AND:F.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:F.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:F.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:F.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[e]}))}},Jn={init:function(){this.setColour(zn),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(F.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(F.Msg.LOGIC_NEGATE_TOOLTIP)}},Qn={init:function(){var e=[[F.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[F.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(zn),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new F.FieldDropdown(e),"BOOL"),this.setTooltip(F.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Zn={init:function(){this.setColour(zn),this.setOutput(!0),this.appendDummyInput().appendField(F.Msg.LOGIC_NULL),this.setTooltip(F.Msg.LOGIC_NULL_TOOLTIP)}},ei={init:function(){this.setColour(zn),this.appendValueInput("A"),this.appendValueInput("B").appendField(F.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(F.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},ti={init:function(){var e=[[F.Msg.TEXT_APPEND_TO,"in"],[F.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(zn),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new F.FieldDropdown(e),"BOOL"),this.appendDummyInput("").appendField(F.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(F.Msg.IN)}},ni={init:function(){var e=[[F.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[F.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(zn),this.appendValueInput("A"),this.appendValueInput("B").appendField(new F.FieldDropdown(e),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},ii={init:function(){this.setColour(zn),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(F.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},ri={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(F.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},si={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=F.Msg.MIXLY_USE,i=F.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,r=F.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,s=F.Msg.MIXLY_BELONG;return n+{r:F.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:F.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+s+i+r}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){F.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},oi={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=F.Msg.MIXLY_USE,i=F.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,r=F.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,s=F.Msg.MIXLY_BELONG,o=F.Msg.PY_STORAGE_FILE_OBJECT;return n+{r:F.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:F.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+s+i+r+o}))}},ai={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(F.Msg.MIXPY_TEXT_ENCODE).appendField(new F.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=F.Msg.MIXLY_USE,i=F.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,r=F.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,s=F.Msg.MIXLY_BELONG,o=F.Msg.PY_STORAGE_FILE_OBJECT;return n+{r:F.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:F.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:F.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[t]+s+i+r+o}))}},li={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+F.Msg.MIXLY_MICROBIT_TYPE_STRING+F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},ui={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},ci={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=F.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,i=F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return n+{read:F.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:F.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:F.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[t]+"x"+i}))}},pi={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(F.Msg.MICROBIT_PYTHON_TYPE)}},hi={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(F.Msg.HTML_FILE),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},di={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},fi={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},_i={init:function(){this.setColour(0),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};F.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const mi={init:function(){this.setColour(0),this.appendDummyInput().appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},bi={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+F.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},gi={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Si={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE"),n=F.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+F.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,i=F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,r=F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return n+" "+{start:F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:F.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[t]+r+"x"+i}))}},ki={init:function(){this.setColour(0),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},yi={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(F.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new F.FieldDropdown([[F.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return F.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+F.Msg.MIXLY_ESP32_SET+{mkdir:F.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[t]}))}},vi={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(F.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},Ti={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(F.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},Ei={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new F.FieldDropdown([[F.Msg.HTML_FILE,"isfile"],[F.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let e=this;this.setTooltip((function(){var t=e.getFieldValue("MODE");return F.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+F.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:F.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[t]}))}},Ii={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(F.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(F.Msg.MIXLY_SETUP+F.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(F.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},wi={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(F.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},xi={init:function(){var e=F.Procedures.findLegalName("",this),t=new F.FieldTextInput(e,F.Procedures.rename);t.setSpellcheck(!1),this.appendDummyInput().appendField(t,"NAME").appendField("","PARAMS"),this.setMutator(new F.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&F.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(F.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(F.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(F.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(e){this.hasStatements_!==e&&(e?(this.appendStatementInput("STACK").appendField(F.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=e)},updateParams_:function(){var e="";this.arguments_.length&&(e=F.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),F.Events.disable();try{this.setFieldValue(e,"PARAMS")}finally{F.Events.enable()}},mutationToDom:function(e){var t=F.utils.xml.createElement("mutation");e&&t.setAttribute("name",this.getFieldValue("NAME"));for(var n=0;n"),this.appendValueInput("style").appendField(F.Msg.MIXLY_AIP_ATTR).setAlign(F.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},yr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(F.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},vr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(F.Msg.HTML_FORM_CONTENT).appendField(new F.FieldDropdown([[F.Msg.HTML_TEXT,"text"],[F.Msg.HTML_EMAIL,"email"],[F.Msg.HTML_NUMBER,"number"],[F.Msg.HTML_PASSWORD,"password"],[F.Msg.HTML_CHECKBOX,"checkbox"],[F.Msg.HTML_RADIOBUTTON,"radiobutton"],[F.Msg.HTML_BUTTON,"button"],[F.Msg.HTML_COLOUR,"colour"],[F.Msg.HTML_DATE,"date"],[F.Msg.HTML_LOCALTIME,"local time"],[F.Msg.HTML_FILE,"file"],[F.Msg.HTML_HIDDEN,"hidden"],[F.Msg.HTML_IMAGE,"image"],[F.Msg.HTML_MONTH,"month"],[F.Msg.HTML_RANGE,"range"],[F.Msg.HTML_RESET,"reset"],[F.Msg.HTML_SEARCH,"search"],[F.Msg.HTML_SUBMIT,"submit"],[F.Msg.HTML_TELEPHONENUMBER,"telephone number"],[F.Msg.HTML_TIME,"time"],[F.Msg.HTML_URL,"url"],[F.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(F.Msg.HTML_NAME).appendField(new F.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(F.Msg.HTML_VALUE).appendField(new F.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(F.Msg.MIXLY_AIP_ATTR).setAlign(F.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Tr={init:function(){this.setColour(_r),this.appendDummyInput().appendField(new F.FieldTextInput("property"),"KEY").appendField(":").appendField(new F.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Er={init:function(){this.setColour(_r),this.appendDummyInput().appendField(new F.FieldTextInput("property"),"KEY").appendField(":").appendField(new F.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ir={init:function(){this.setColour(_r),this.appendDummyInput().appendField(F.Msg.HTML_TEXT).appendField(new F.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},wr=160,xr={init:function(){this.setColour(wr),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new F.FieldTable(""),"TEXT")}},Ar={init:function(){this.setColour(wr),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new F.FieldMultilineInput(""),"TEXT")}},$r={init:function(){this.setColour(wr),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new F.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Or={init:function(){this.setColour(wr),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},Mr={init:function(){this.setColour(wr),this.appendDummyInput().appendTitle("Comment:").appendTitle(new F.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Cr={init:function(){this.setColour(wr),this.appendValueInput("VALUE").appendField(F.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},Rr={init:function(){this.setColour(wr),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new F.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(F.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=F.Block.obtain(e,"text_print_multiple_container");t.initSvg();for(var n=t.getInput("STACK").connection,i=0;i"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[F.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[F.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[F.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[F.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[F.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[F.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[F.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[F.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("SER").setCheck("Series").appendField(F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new F.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new F.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldDropdown(t),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Jr={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Qr={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zr={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},es={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ts={init:function(){this.setColour(jr);var e=[[F.Msg.PYLAB_LABEL_X,"x"],[F.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_SET_LABEL).appendField(new F.FieldDropdown(e),"DIR"),this.appendValueInput("LABEL").appendField(F.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ns={init:function(){this.setColour(jr),this.appendValueInput("FROM").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.MIXLY_SPLITBYDOU).appendField(F.Msg.MIXPY_DATA_ARRAY_CREATE_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.MIXPY_DATA_ARRAY_CREATE_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(F.inputs.Align.RIGHT).appendField(F.Msg.MIXLY_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},is={init:function(){this.setColour(jr);var e=[[F.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[F.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(F.Msg.MIXLY_DISPLAY_DRAW).appendField(new F.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{plot:F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:F.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[e]}))}},rs={init:function(){this.setColour(jr);var e=[[F.Msg.COLOUR_RGB_BLUE,"b"],[F.Msg.COLOUR_RGB_GREEN,"g"],[F.Msg.COLOUR_RGB_RED,"r"],[F.Msg.COLOUR_CYAN,"c"],[F.Msg.COLOUR_MAGENTA,"m"],[F.Msg.COLOUR_YELLOW,"y"],[F.Msg.COLOUR_BLACK,"k"],[F.Msg.COLOUR_WHITE,"w"]],t=[[F.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[F.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[F.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[F.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[F.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[F.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[F.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[F.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[F.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[F.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[F.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_SCATTER).appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(F.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new F.FieldDropdown(t),"DOT"),this.appendDummyInput("").appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},ss={init:function(){this.setColour(jr);var e=[[F.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[F.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[F.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[F.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[F.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],t=[[F.Msg.COLOUR_RGB_BLUE,"b"],[F.Msg.COLOUR_RGB_GREEN,"g"],[F.Msg.COLOUR_RGB_RED,"r"],[F.Msg.COLOUR_CYAN,"c"],[F.Msg.COLOUR_MAGENTA,"m"],[F.Msg.COLOUR_YELLOW,"y"],[F.Msg.COLOUR_BLACK,"k"],[F.Msg.COLOUR_WHITE,"w"]],n=[[F.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[F.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[F.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[F.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[F.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[F.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[F.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[F.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[F.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[F.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[F.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[F.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[F.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_PLOT_XY).appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new F.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new F.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},os={init:function(){this.setColour(jr);var e=[[F.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[F.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_BAR).appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(F.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(F.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new F.FieldDropdown(e),"ALIGN"),this.appendDummyInput().appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},as={init:function(){this.setColour(jr);var e=[[F.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[F.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],t=[[F.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[F.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[F.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[F.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_PIE).appendField(F.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(F.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(F.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new F.FieldDropdown(t),"autopct"),this.appendDummyInput("").appendField(F.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new F.FieldDropdown(e),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},ls={init:function(){this.setColour(jr),this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_HIST).appendField(F.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(F.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},us={init:function(){this.setColour(jr);var e=[[F.Msg.PYLAB_LABEL_X,"x"],[F.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(F.Msg.MIXLY_SETTING).appendField(new F.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_TICKS).appendField(F.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},cs={init:function(){var e=[["sin","sin"],["cos","cos"],["tan","tan"],["arcsin","arcsin"],["arccos","arccos"],["arctan","arctan"],[F.Msg.LANG_MATH_TO_ROUND,"round"],[F.Msg.LANG_MATH_TO_CEIL,"ceil"],[F.Msg.LANG_MATH_TO_FLOOR,"floor"]];this.setColour(jr),this.setOutput(!0),this.setInputsInline(!0),this.appendDummyInput().appendField(F.Msg.mixpy_NUMPY_TRIG),this.appendValueInput("NUM").setCheck(Number).appendField(new F.FieldDropdown(e),"OP"),this.setTooltip(F.Msg.mixpy_NUMPY_TRIG_TOOLTIP)}},ps={init:function(){this.setColour(jr),this.appendValueInput("VET").setCheck(Number).appendField(F.Msg.mixpy_SUBPLOT).appendField(F.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(F.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(F.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},hs={init:function(){this.setColour(jr),this.appendValueInput("FILENAME").appendField(F.Msg.MIXPY_PANDAS_READ_CSV),this.appendDummyInput().appendField(new F.FieldDropdown([[F.Msg.mixpy_PANDAS_READCSV_HEADER_Y,"0"],[F.Msg.mixpy_PANDAS_READCSV_HEADER_N,"None"]]),"MODE"),this.appendDummyInput().appendField(F.Msg.mixpy_PANDAS_READCSV_TITLE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(F.Msg.mixpy_PANDAS_READCSV_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(e,t){F.Names.equals(e,this.getFieldValue("VAR"))&&this.setTitleValue(t,"VAR")}},ds={init:function(){this.setColour(jr),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(F.Msg.mixpy_DATAFRAME_GET),this.appendDummyInput("").appendField(F.Msg.mixpy_DATAFRAME_GET_INDEX).appendField(new F.FieldDropdown([[F.Msg.DATAFRAME_COLUMN,"column"],[F.Msg.DATAFRAME_RAW,"raw"]]),"MODE"),this.setOutput(!0),this.setTooltip(F.Msg.mixpy_DATAFRAME_GET_TOOLTIP)}},fs={init:function(){this.setColour(jr),this.appendValueInput("FILE").setCheck(String).appendField(F.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(F.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},_s={init:function(){this.setColour(jr);var e=[[F.Msg.TEXT_TRIM_LEFT,"right"],[F.Msg.mixpy_PL_TEXT_CENTER,"center"],[F.Msg.TEXT_TRIM_RIGHT,"left"]],t=[[F.Msg.mixpy_PL_TEXT_TOP,"bottom"],[F.Msg.mixpy_PL_TEXT_CENTER,"center"],[F.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(F.Msg.MIXLY_SETTING).appendField(F.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(F.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(F.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(F.Msg.mixpy_PL_TEXT_HOR).appendField(new F.FieldDropdown(e),"HALIGN"),this.appendDummyInput("").appendField(F.Msg.mixpy_PL_TEXT_VER).appendField(new F.FieldDropdown(t),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(F.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PL_TEXT_TOOLTIP)}},ms={init:function(){this.setColour(jr),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_TOARRAY),this.setOutput(!0,"List"),this.setTooltip(F.Msg.MIXLY_PYTHON_TOOLTIP_TOARRAY)}},bs={init:function(){this.setColour(jr),this.appendValueInput("SER").setCheck("Series").appendField(F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_PLOT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gs={init:function(){this.setColour(jr);var e=[[F.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[F.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[F.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[F.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[F.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],t=[[F.Msg.COLOUR_RGB_BLUE,"b"],[F.Msg.COLOUR_RGB_GREEN,"g"],[F.Msg.COLOUR_RGB_RED,"r"],[F.Msg.COLOUR_CYAN,"c"],[F.Msg.COLOUR_MAGENTA,"m"],[F.Msg.COLOUR_YELLOW,"y"],[F.Msg.COLOUR_BLACK,"k"],[F.Msg.COLOUR_WHITE,"w"]],n=[[F.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[F.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[F.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("SER").setCheck("Series").appendField(F.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new F.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new F.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldDropdown(t),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ss={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ks={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},ys={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vs={init:function(){this.setColour(jr),this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ts={init:function(){this.setColour(jr);var e=[[F.Msg.PYLAB_LABEL_X,"x"],[F.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(F.Msg.blockpy_PYLAB_SET_LABEL).appendField(new F.FieldDropdown(e),"DIR"),this.appendValueInput("LABEL").appendField(F.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Es={init:function(){this.setColour(jr);var e=[[F.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[F.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(F.Msg.MIXLY_DISPLAY_DRAW).appendField(new F.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{plot:F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:F.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[e]}))}},Is={init:function(){this.setColour(jr);var e=[[F.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[F.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[F.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_SCATTER).appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(F.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new F.FieldDropdown(e),"DOT"),this.appendDummyInput().appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},ws={init:function(){this.setColour(jr);var e=[[F.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[F.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[F.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[F.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[F.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],t=[[F.Msg.COLOUR_RGB_BLUE,"b"],[F.Msg.COLOUR_RGB_GREEN,"g"],[F.Msg.COLOUR_RGB_RED,"r"],[F.Msg.COLOUR_CYAN,"c"],[F.Msg.COLOUR_MAGENTA,"m"],[F.Msg.COLOUR_YELLOW,"y"],[F.Msg.COLOUR_BLACK,"k"],[F.Msg.COLOUR_WHITE,"w"]],n=[[F.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[F.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[F.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_PLOT_XY).appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new F.FieldDropdown(n),"DOT"),this.appendDummyInput("").appendField(F.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new F.FieldDropdown(e),"LINE"),this.appendDummyInput("").appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},xs={init:function(){this.setColour(jr);var e=[[F.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[F.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_BAR).appendField(F.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(F.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(F.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new F.FieldDropdown(e),"ALIGN"),this.appendDummyInput().appendField(F.Msg.HTML_COLOUR).appendField(new F.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},As={init:function(){this.setColour(jr);var e=[[F.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[F.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],t=[[F.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[F.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[F.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[F.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_PIE).appendField(F.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(F.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(F.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new F.FieldDropdown(t),"autopct"),this.appendDummyInput("").appendField(F.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new F.FieldDropdown(e),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},$s={init:function(){this.setColour(jr),this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_HIST).appendField(F.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(F.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Os={init:function(){this.setColour(jr);var e=[[F.Msg.PYLAB_LABEL_X,"x"],[F.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(F.Msg.MIXLY_SETTING).appendField(new F.FieldDropdown(e),"DIR"),this.appendValueInput("A").appendField(F.Msg.mixpy_PYLAB_TICKS).appendField(F.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(F.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},Ms={init:function(){this.setColour(jr),this.appendValueInput("VET").setCheck(Number).appendField(F.Msg.mixpy_SUBPLOT).appendField(F.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(F.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(F.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},Cs={init:function(){this.setColour(jr),this.appendDummyInput("").appendField(F.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(F.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},Rs={init:function(){this.setColour(jr);var e=[[F.Msg.TEXT_TRIM_LEFT,"right"],[F.Msg.mixpy_PL_TEXT_CENTER,"center"],[F.Msg.TEXT_TRIM_RIGHT,"left"]],t=[[F.Msg.mixpy_PL_TEXT_TOP,"bottom"],[F.Msg.mixpy_PL_TEXT_CENTER,"center"],[F.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(F.Msg.MIXLY_SETTING).appendField(F.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(F.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(F.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(F.Msg.mixpy_PL_TEXT_HOR).appendField(new F.FieldDropdown(e),"HALIGN"),this.appendDummyInput("").appendField(F.Msg.mixpy_PL_TEXT_VER).appendField(new F.FieldDropdown(t),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(F.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.mixpy_PL_TEXT_TOOLTIP)}},Ns=20,Ls={init:function(){this.setColour(Ns),this.appendValueInput("VAR").appendField(F.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(F.Msg.INOUT_input_TOOLTIP)}},Ds={init:function(){this.setColour(Ns),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(F.Msg.BLOCKPY_PRINT_TOOLTIP)}},Ps={init:function(){this.setColour(Ns),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(F.Msg.TEXT_PRINT_TOOLTIP)}},Fs={init:function(){this.setColour(Ns),this.appendValueInput("VAR").appendField(F.Msg.MIXLY_SERIAL_PRINT),this.appendValueInput("END").appendField(F.Msg.MIXLY_ENDSWITH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(F.Msg.MIXLY_PYTHON_INOUT_PRINT_END_TOOLTIP)}},Bs={init:function(){var e=[[F.Msg.LANG_MATH_STRING,"str"],[F.Msg.LANG_MATH_INT,"int"],[F.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Ns),this.appendDummyInput("").appendField(F.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new F.FieldDropdown(e),"DIR"),this.appendValueInput("VAR").appendField(F.Msg.PROCEDURES_MUTATORCONTAINER_TITLE).setCheck(String),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("DIR");return{str:F.Msg.MIXLY_MIXPY_INOUT_STR_INPUT_TOOLTIP,int:F.Msg.MIXLY_MIXPY_INOUT_INT_INPUT_TOOLTIP,float:F.Msg.MIXLY_MIXPY_INOUT_FLOAT_INPUT_TOOLTIP}[e]}))}},js={init:function(){this.setColour(Ns),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new F.icons.MutatorIcon(["inout_print_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(F.Msg.MIXLY_MIXPY_INOUT_PRINT_MANY_TOOLTIP)},mutationToDom:function(){var e=document.createElement("mutation");return e.setAttribute("items",this.itemCount_),e},domToMutation:function(e){this.itemCount_=parseInt(e.getAttribute("items"),10),this.updateShape_()},decompose:function(e){var t=e.newBlock("inout_print_container");t.initSvg();for(var n=t.getInput("STACK").connection,i=0;i0?e:[["'无可用地图'","'无可用地图'"]]}},oa={init:function(){this.appendValueInput("pathtype").setCheck(null).appendField("设置路径样式为"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},aa={init:function(){this.imgArr=this.getLocalImg(),this.appendDummyInput().appendField(new F.FieldDropdown(this.getLocalImg()),"type"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")},onchange:function(){let e=this.getFieldValue("type"),t=this.imgArr;this.haveNewSrc(this.imgArr,t)&&(this.imgArr=t,this.getField("type").menuGenerator_=this.imgArr,this.checkSrc(e,this.imgArr)?this.setFieldValue(e,"type"):this.setFieldValue(this.imgArr[0][1],"type"))},haveNewSrc:function(e,t){if(e.length!==t.length)return!0;for(var n=0;n0?e:[["'无可用路径'","'无可用路径'"]]}},la={init:function(){this.setColour(290),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("posx").setCheck(null).appendField("在("),this.appendDummyInput().appendField(","),this.appendValueInput("posy").setCheck(null).appendField(""),this.appendDummyInput().appendField(")放置").appendField(new F.FieldDropdown([["障碍","'wall'"],["金币","'coin'"]]),"item"),this.setTooltip("")}},ua={init:function(){this.imgArr=this.getLocalImg(),this.appendDummyInput().appendField(new F.FieldDropdown(this.getLocalImg()),"type"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")},onchange:function(){let e=this.getFieldValue("type"),t=this.imgArr;this.haveNewSrc(this.imgArr,t)&&(this.imgArr=t,this.getField("type").menuGenerator_=this.imgArr,this.checkSrc(e,this.imgArr)?this.setFieldValue(e,"type"):this.setFieldValue(this.imgArr[0][1],"type"))},haveNewSrc:function(e,t){if(e.length!==t.length)return!0;for(var n=0;n0?e:[["'无可用角色'","'无可用角色'"]]}},ca={init:function(){this.setColour(290),this.appendValueInput("character").setCheck(null).appendField("初始化角色为"),this.appendDummyInput().appendField("面朝").appendField(new F.FieldDropdown([["北","0"],["南","2"],["西","3"],["东","1"]]),"direction"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},pa={init:function(){this.setColour(290),this.appendDummyInput().appendField("获取⻆⾊所获分数"),this.setOutput(!0,Number),this.setTooltip("")}},ha={init:function(){this.appendDummyInput().appendField(new F.FieldDropdown([["北","0"],["南","2"],["西","3"],["东","1"]]),"direction"),this.appendDummyInput().appendField("侧有障碍"),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},da={init:function(){this.appendDummyInput().appendField("随机生成小车油量"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},fa={init:function(){this.appendDummyInput().appendField("需要加油"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},_a={init:function(){this.appendDummyInput().appendField("信号灯为绿灯"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},ma={init:function(){this.appendDummyInput().appendField("信号灯为红灯"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},ba={init:function(){this.appendDummyInput().appendField("进加油站加油"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},ga={init:function(){this.appendDummyInput().appendField("检查程序循环数目是否正确"),this.setPreviousStatement(!0),this.setColour(290),this.setTooltip("")}},Sa=function(e,t){return[t.variableDB_.getName(this.getFieldValue("VAR"),F.Variables.NAME_TYPE),t.ORDER_ATOMIC]},ka=function(e,t){if(""==this.getFieldValue("VAR"))return" = None\n";var n=t.valueToCode(this,"VALUE",t.ORDER_ASSIGNMENT)||"None";return t.variableDB_.getName(this.getFieldValue("VAR"),F.Variables.NAME_TYPE)+" = "+n+"\n"},ya=function(e,t){var n=this.getFieldValue("OP"),i=t.valueToCode(this,"MYVALUE",t.ORDER_ATOMIC)||"None";if("bytes"==n)var r=n+"("+i+',"UTF-8")';else r=n+"("+i+")";return[r,t.ORDER_ATOMIC]},va=function(e,t){return"global "+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"None")+"\n"},Ta=function(e,t){return["type("+(t.valueToCode(this,"DATA",t.ORDER_ATOMIC)||"None")+")",t.ORDER_ATOMIC]},Ea=function(e,t){return[this.getFieldValue("type"),t.ORDER_ATOMIC]},Ia=function(e,t){for(var n=new Array(this.itemCount_),i=0;i= stop:"," yield start"," start -= abs(step)"])};if(e=function(e,t,n){return"("+e+" <= "+t+") and "+l()+"("+e+", "+t+", "+n+") or "+u()+"("+e+", "+t+", "+n+")"},F.isNumber(i)&&F.isNumber(r)&&F.isNumber(s))i=parseFloat(i),r=parseFloat(r),s=Math.abs(parseFloat(s)),0==i%1&&0==r%1&&0==s%1?(i<=r?(r++,e=0==i&&1==s?r:i+", "+r,1!=s&&(e+=", "+s)):e=i+", "+--r+", -"+s,e="range("+e+")"):(e=i",GTE:">="};const oc=function(e,t){var n=this.getFieldValue("OP"),i="&&"==n?t.ORDER_LOGICAL_AND:t.ORDER_LOGICAL_OR,r=t.valueToCode(this,"A",i)||"False",s=t.valueToCode(this,"B",i)||"False";if("AND"==n)var o=r+" and "+s;else if("OR"==n)o=r+" or "+s;else if("NOR"==n)o="not("+r+"^"+s+")";else o=r+"^"+s;return[o,i]},ac=function(e,t){var n=t.ORDER_UNARY_PREFIX;return["not "+(t.valueToCode(this,"BOOL",n)||"False"),n]},lc=function(e,t){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",t.ORDER_ATOMIC]},uc=function(e,t){return["None",t.ORDER_ATOMIC]},cc=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"False";return["("+(t.valueToCode(this,"B",t.ORDER_ATOMIC)||"False")+" if "+n+" else "+(t.valueToCode(this,"C",t.ORDER_ATOMIC)||"False")+")",t.ORDER_ATOMIC]},pc=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"''",i=t.valueToCode(this,"B",t.ORDER_ATOMIC)||"''";return[n+" "+this.getFieldValue("BOOL")+" "+i,t.ORDER_ATOMIC]},hc=function(e,t){var n=t.valueToCode(this,"A",t.ORDER_ATOMIC)||"''",i=t.valueToCode(this,"B",t.ORDER_ATOMIC)||"''";return[n+" "+this.getFieldValue("BOOL")+" "+i,t.ORDER_ATOMIC]},dc=function(e,t){return["bool("+(t.valueToCode(this,"VAR",t.ORDER_ATOMIC)||"0")+")",t.ORDER_ATOMIC]},fc=function(e,t){return t.definitions_.import_os="import os","os.startfile("+t.valueToCode(this,"fn",t.ORDER_ATOMIC)+")\n"},_c=function(e,t){return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+" = open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},mc=function(e,t){return["open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",t.ORDER_ATOMIC]},bc=function(e,t){return["open("+t.valueToCode(this,"FILENAME",t.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',t.ORDER_ATOMIC]},gc=function(e,t){var n=t.valueToCode(this,"data",t.ORDER_ATOMIC);return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".write("+n+")\n"},Sc=function(e,t){var n=this.getFieldValue("MODE");return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+"."+n+"()",t.ORDER_ATOMIC]},kc=function(e,t){var n=this.getFieldValue("MODE");return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+"."+n+"("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},yc=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".readline("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},vc=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".writable()",t.ORDER_ATOMIC]},Tc=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".name()",t.ORDER_ATOMIC]},Ec=function(e,t){return t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".close()\n"},Ic=function(e,t){t.definitions_.import_os="import os";return["os.listdir()",t.ORDER_ATOMIC]},wc=function(e,t){return t.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},xc=function(e,t){return t.definitions_.import_os="import os",["os.path.getsize("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")",t.ORDER_ATOMIC]},Ac=function(e,t){return[t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".tell()",t.ORDER_ATOMIC]},$c=function(e,t){var n=this.getFieldValue("MODE"),i=0;return i="start"==n?0:"current"==n?1:2,t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+".seek("+t.valueToCode(this,"SIZE",t.ORDER_ATOMIC)+","+i+")\n"},Oc=function(e,t){return t.definitions_.import_os="import os","os.chdir("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+")\n"},Mc=function(e,t){t.definitions_.import_os="import os";return["os.getcwd()",t.ORDER_ATOMIC]},Cc=function(e,t){return t.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+t.valueToCode(this,"PATH",t.ORDER_ATOMIC)+")\n"},Rc=function(e,t){return t.definitions_.import_os="import os","os.rename("+t.valueToCode(this,"FILE",t.ORDER_ATOMIC)+","+t.valueToCode(this,"NEWFILE",t.ORDER_ATOMIC)+")\n"},Nc=function(e,t){t.definitions_.import_os="import os";var n=t.valueToCode(this,"FILE",t.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+n+")",t.ORDER_ATOMIC]},Lc=function(e,t){return t.definitions_.import_os="import os",t.definitions_.import_sdcard="import sdcard",t.valueToCode(this,"SUB",t.ORDER_ATOMIC)+" = sdcard.SDCard("+t.valueToCode(this,"SPISUB",t.ORDER_ATOMIC)+","+t.valueToCode(this,"PINSUB",t.ORDER_ATOMIC)+")\n"},Dc=function(e,t){return t.definitions_.import_os="import os",t.definitions_.import_sdcard="import sdcard","os.mount("+t.valueToCode(this,"VAR",t.ORDER_ATOMIC)+","+t.valueToCode(this,"DIR",t.ORDER_ATOMIC)+")\n"},Pc=function(e,t){var n=t.variableDB_.getName(this.getFieldValue("NAME"),F.Procedures.NAME_TYPE),i=(this.getInput("STACK")&&t.statementToCode(this,"STACK"))??" pass\n";t.INFINITE_LOOP_TRAP&&(i=t.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+i);var r=t.valueToCode(this,"RETURN",t.ORDER_NONE)||"";r&&(r=" return "+r+"\n");for(var s=[],o=0;o\n\n\n\t\n"+t.statementToCode(this,"HEAD")+"\n\n"+t.statementToCode(this,"BODY")+"\n\n'''",t.ORDER_ATOMIC]},gp=function(e,t){var n=t.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");return"\n"+n+"\n"},Sp=function(e,t){var n=t.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");if("head"==i)var r="<"+i+'>\n\t\n'+n+"\n";else r="<"+i+">\n"+n+"\n";return r},kp=function(e,t){var n=t.statementToCode(this,"DO"),i=this.getFieldValue("LEVEL");return"<"+i+">\n"+n+"\n"},yp=function(e,t){var n=t.statementToCode(this,"DO"),i=t.valueToCode(this,"style"),r=this.getFieldValue("LEVEL");return"<"+r+" "+i+" >\n"+n+"\n"},vp=function(e,t){return['style="'+t.statementToCode(this,"STYLE")+'"',t.ORDER_ATOMIC]},Tp=function(e,t){return'"},Ep=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Ip=function(){return this.getFieldValue("TEXT")+"\n"},wp=function(e){return e.getFieldValue("TEXT")+"\n"},xp=function(e,t){return[e.getFieldValue("TEXT"),t.ORDER_ATOMIC]},Ap=function(e,t){return(t.valueToCode(e,"VALUE",t.ORDER_ATOMIC)||"")+"\n"},$p=function(){return""},Op=function(e,t){return["type("+(t.valueToCode(e,"VALUE",t.ORDER_MEMBER)||"___")+")",t.ORDER_ATOMIC]},Mp=function(e,t){for(var n=e.getFieldValue("NAME"),i=e.hasReturn_,r=new Array(e.itemCount_),s=0;s=0&&(i[r]=i[r].replace(" ",""));n="";for(r=0;rthis.#e.on("display",e)[0],nf.configure({output:e=>{this.#e.run("output",{content:e})},read:this.readFile.bind(this),inputfun:this.skInput.bind(this),inputfunTakesPrompt:!0,execLimit:Number.POSITIVE_INFINITY,fileread:this.fileread.bind(this),filewrite:this.filewrite.bind(this),__future__:nf.python3}),nf.builtins.value=new nf.builtin.func((function(){return nf.ffi.remapToPy(void 0===of?5:of)})),nf.builtins.set_value=new nf.builtin.func((function(e){of=e.v})),nf.builtinFiles.files["./mixpy.py"]='import math\r\n\r\ndef math_map(v, al, ah, bl, bh):\r\n return bl + (bh - bl) * (v - al) / (ah - al)\r\n\r\ndef math_mean(myList):\r\n localList = [e for e in myList if type(e) == int or type(e) == float]\r\n if not localList: return\r\n return float(sum(localList)) / len(localList)\r\n\r\ndef math_median(myList):\r\n localList = sorted([e for e in myList if type(e) == int or type(e) == float])\r\n if not localList: return\r\n if len(localList) % 2 == 0:\r\n return (localList[len(localList) // 2 - 1] + localList[len(localList) // 2]) / 2.0\r\n else:\r\n return localList[(len(localList) - 1) // 2]\r\n\r\ndef math_modes(some_list):\r\n modes = []\r\n # Using a lists of [item, count] to keep count rather than dict\r\n # to avoid "unhashable" errors when the counted item is itself a list or dict.\r\n counts = []\r\n maxCount = 1\r\n for item in some_list:\r\n found = False\r\n for count in counts:\r\n if count[0] == item:\r\n count[1] += 1\r\n maxCount = max(maxCount, count[1])\r\n found = True\r\n if not found:\r\n counts.append([item, 1])\r\n for counted_item, item_count in counts:\r\n if item_count == maxCount:\r\n modes.append(counted_item)\r\n return modes\r\n\r\ndef math_standard_deviation(numbers):\r\n n = len(numbers)\r\n if n == 0: return\r\n mean = float(sum(numbers)) / n\r\n variance = sum((x - mean) ** 2 for x in numbers) / n\r\n return math.sqrt(variance)\r\n\r\ndef lists_sort(my_list, type, reverse):\r\n def try_float(s):\r\n try:\r\n return float(s)\r\n except:\r\n return 0\r\n key_funcs = {\r\n "NUMERIC": try_float,\r\n "TEXT": str,\r\n "IGNORE_CASE": lambda s: str(s).lower()\r\n }\r\n key_func = key_funcs[type]\r\n list_cpy = list(my_list)\r\n return sorted(list_cpy, key=key_func, reverse=reverse)'}readFile(e){if(rf.matchModelName(e))return rf.load(e);if(void 0!==sf[e])return nf.misceval.promiseToSuspension(fetch(sf[e]).then((e=>e.text())));if(void 0===nf.builtinFiles||void 0===nf.builtinFiles.files[e])throw"File not found: '"+e+"'";return nf.builtinFiles.files[e]}fileread(e,t){return this.mixpyProject.exist(e)?this.mixpyProject.getFileContent(e):-1!==t.indexOf("w")?(this.mixpyProject.add(e,"",1),""):null}filewrite(e,t){var n=e.name;this.mixpyProject.modify(n,t),this.mixpyProject.select(n)}skInput(e){return new Promise(((t,n)=>{this.#e.run("input",{content:{prompt:e},resolve:t,reject:n})}))}reset(){nf.execLimit=Number.POSITIVE_INFINITY,nf.TurtleGraphics.reset&&nf.TurtleGraphics.reset()}kill(){nf.execLimit=0,this.executionEnd_()}step(e,t,n,i){if(".py"==i){var r=this.executionBuffer.step,s=this.parseGlobals(e);this.executionBuffer.trace.push({step:r,filename:i,line:t,column:n,properties:s.properties,modules:s.modules}),this.executionBuffer.step=r+1,this.executionBuffer.last_step=r+1,this.executionBuffer.line_number=t}}analyzeVariables(){if(""==this.main.model.programs.__main__().trim())return{}}analyze(){return this.main.model.execution.status("analyzing"),""!=this.main.model.programs.__main__().trim()||(this.main.components.feedback.emptyProgram("You haven't written any code yet!"),!1)}steprun(e){this.reset(),-1===e.indexOf("import blocklygame")&&-1===e.indexOf("from blocklygame import")||(rf.reset(),ef()(nf.TurtleGraphics.target).empty()),-1!=e.indexOf("settedMap(4")|-1!=e.indexOf("settedMap(6")&&-1!=e.indexOf("moveDirection")&&(e+="actor.isCirculationRight()\n"),-1==e.indexOf("settedMap(5)")&&-1!=e.indexOf("moveDirection")&&(e+="actor.isSuccess()\n"),this.programStatus.running=!0,nf.misceval.asyncToPromise((()=>nf.importMainWithBody("",!1,e,!0))).then((()=>{this.programStatus.running=!1,this.#e.run("finished")})).catch((e=>{B.Debug.error(e),this.programStatus.running=!1,this.#e.run("error",e);var t=af(e);this.#e.run("finished"),-1===t.indexOf("TimeLimitError")&&this.executionEnd_()}))}run(e){if(this.reset(),-1===e.indexOf("import blocklygame")&&-1===e.indexOf("from blocklygame import")||(rf.reset(),ef()(nf.TurtleGraphics.target).empty()),-1!==e.indexOf("import blocktool")||-1!==e.indexOf("import blocklygame")||-1!==e.indexOf("from blocklygame import")){var t=[];t=e.split("\n");for(var n=0;n=0){var i="",r=/,?'block_id=[\s\S]*'/.exec(t[n]);null!=r&&(i=r[0],t[n]=t[n].replace(i,""))}(t[n].indexOf("import blocktool")>=0||t[n].indexOf("blocktool.highlight")>=0)&&(t[n]="delete"),t[n].indexOf("blocklygame")>=0&&(t[n]=t[n].replace("blocklygame","bg_nonehl"))}e="";for(n=0;nnf.importMainWithBody("",!1,e,!0))).then((()=>{this.programStatus.running=!1,this.#e.run("finished")})).catch((e=>{B.Debug.error(e),this.programStatus.running=!1,this.#e.run("error",e);var t=af(e);this.#e.run("finished"),-1===t.indexOf("TimeLimitError")&&this.executionEnd_()}))}setupEnvironment(e,t,n,i,r){var s=this.main.model;this._backup_execution=nf.afterSingleExecution,nf.afterSingleExecution=void 0,nf.builtins.get_output=new nf.builtin.func((function(){return nf.builtin.pyCheckArgs("get_output",arguments,0,0),nf.ffi.remapToPy(s.execution.output())})),nf.builtins.reset_output=new nf.builtin.func((function(){nf.builtin.pyCheckArgs("reset_output",arguments,0,0),s.execution.output.removeAll()})),nf.builtins.log=new nf.builtin.func((function(e){nf.builtin.pyCheckArgs("log",arguments,1,1),console.log(e)})),nf.builtins._trace=t,nf.builtins._final_values=r,nf.builtins.code=nf.ffi.remapToPy(e),nf.builtins.set_success=this.instructor_module.set_success,nf.builtins.set_feedback=this.instructor_module.set_feedback,nf.builtins.set_finished=this.instructor_module.set_finished,nf.builtins.count_components=this.instructor_module.count_components,nf.builtins.no_nonlist_nums=this.instructor_module.no_nonlist_nums,nf.builtins.only_printing_properties=this.instructor_module.only_printing_properties,nf.builtins.calls_function=this.instructor_module.calls_function,nf.builtins.get_property=this.instructor_module.get_property,nf.builtins.get_value_by_name=this.instructor_module.get_value_by_name,nf.builtins.get_value_by_type=this.instructor_module.get_value_by_type,nf.builtins.parse_json=this.instructor_module.parse_json,nf.skip_drawing=!0,s.settings.mute_printer(!0)}disposeEnvironment(){nf.afterSingleExecution=this._backup_execution,nf.builtins.get_output=void 0,nf.builtins.reset_output=void 0,nf.builtins.log=void 0,nf.builtins._trace=void 0,nf.builtins.trace=void 0,nf.builtins.code=void 0,nf.builtins.set_success=void 0,nf.builtins.set_feedback=void 0,nf.builtins.set_finished=void 0,nf.builtins.count_components=void 0,nf.builtins.calls_function=void 0,nf.builtins.get_property=void 0,nf.builtins.get_value_by_name=void 0,nf.builtins.get_value_by_type=void 0,nf.builtins.no_nonlist_nums=void 0,nf.builtins.only_printing_properties=void 0,nf.builtins.parse_json=void 0,nf.skip_drawing=!1,of=void 0,this.main.model.settings.mute_printer(!1)}parseGlobals(e){var t=Array(),n=Array();for(var i in e){var r=e[i];if("__name__"!==i&&"__doc__"!==i){i=i.replace("_$rw$","").replace("_$rn$","");var s=this.parseValue(i,r);null!==s?t.push(s):r.constructor==nf.builtin.module&&n.push(r.$d.__name__.v)}}return{properties:t,modules:n}}parseValue(e,t){if(null==t)return{name:e,type:"Unknown",value:"Undefined"};switch(t.constructor){case nf.builtin.func:return{name:e,type:"Function",value:void 0!==t.func_code.co_varnames?" Arguments: "+t.func_code.co_varnames.join(", "):" No arguments"};case nf.builtin.module:return null;case nf.builtin.str:return{name:e,type:"String",value:t.$r().v};case nf.builtin.none:return{name:e,type:"None",value:"None"};case nf.builtin.bool:return{name:e,type:"Boolean",value:t.$r().v};case nf.builtin.nmber:return{name:e,type:"int"==t.skType?"Integer":"Float",value:t.$r().v};case nf.builtin.int_:return{name:e,type:"Integer",value:t.$r().v};case nf.builtin.float_:return{name:e,type:"Float",value:t.$r().v};case nf.builtin.tuple:return{name:e,type:"Tuple",value:t.$r().v};case nf.builtin.list:return t.v.length<=20?{name:e,type:"List",value:t.$r().v,exact_value:t}:{name:e,type:"List",value:"[... "+t.v.length+" elements ...]",exact_value:t};case nf.builtin.dict:return{name:e,type:"Dictionary",value:t.$r().v};case Number:return{name:e,type:t%1==0?"Integer":"Float",value:t};case String:return{name:e,type:"String",value:t};case Boolean:return{name:e,type:"Boolean",value:t?"True":"False"};default:return{name:e,type:null==t.tp$name?t:t.tp$name,value:null==t.$r?t:t.$r().v}}}}class uf extends B.PageBase{static{B.HTMLTemplate.add("html/statusbar/statusbar-image.html",new B.HTMLTemplate('\r\n
\r\n
\r\n
')),this.init=function(){B.StatusBarsManager.typesRegistry.register(["images"],uf);const e=B.Workspace.getMain().getStatusBarsManager();e.add({type:"images",id:"images",name:F.Msg.MIXLY_MICROBIT_IMAGE,title:F.Msg.MIXLY_MICROBIT_IMAGE}),e.changeTo("output")}}constructor(){super();const e=ef()(B.HTMLTemplate.get("html/statusbar/statusbar-image.html").render());this.setContent(e)}init(){super.init(),this.hideCloseBtn()}clean(){this.getContent().empty()}display(e){const t=this.getContent(),n=function(e){e.style.width="auto",e.style.height="auto",e.style.maxWidth="100%",e.style.maxHeight="100%"};this.clean();let i=e.content,r=null,s=null;switch(e.display_type){case"p5":i.style.width="100%",i.style.height="100%",i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center",new MutationObserver((function(e){e.forEach((e=>e.addedNodes.forEach((e=>{const t=e;null!=t.tagName&&["canvas","video"].includes(t.tagName.toLowerCase())&&n(t)}))))})).observe(i,{childList:!0}),i.querySelectorAll("canvas,video").forEach(n),t.append(i);break;case"matplotlib":r=i.querySelector("canvas"),r&&(i=r),i.style.width="",i.style.height="",i.style.maxWidth="100%",i.style.maxHeight="100%",t.append(i);break;case"ocaml-canvas":i.style.width="",i.style.height="",i.style.maxWidth="100%",i.style.maxHeight="100%",t.append(i);break;case"turtle":i.setAttribute("width","100%"),i.setAttribute("height","100%"),t.append(i.outerHTML);break;case"sympy":t.append(e.content),void 0===window.MathJax?(console.log("Loading MathJax (Sympy expression needs it)."),function(){let e=document.createElement("script");e.type="text/javascript",e.src="https://cdn.jsdelivr.net/npm/mathjax@3.0.5/es5/tex-mml-chtml.js",document.getElementsByTagName("head")[0].appendChild(e)}()):window.MathJax.typeset();break;case"multiple":for(let n of["image/svg+xml","image/png","text/html","text/plain"])if(n in e.content){let i=e.content[n];"image/png"===n&&(i=''),t.append(i);break}break;case"tutor":if(t.append(ef()(e.content.replace("overflow-y%3A%20hidden%3B",""))),s=this.getContent()[0].getElementsByTagName("iframe")[0],null==s)return;s.style.maxHeight=s.style.minHeight="100%",new IntersectionObserver(((e,t)=>{const n=e[0];n&&!n.isIntersecting||(s.contentWindow?.postMessage({type:"redraw"},"*"),t.disconnect())})).observe(s);break;default:console.error(`Not supported node type '${e.display_type}' in eval.display result processing.`)}}}const cf=uf;class pf{static{this.pythonShell=null,this.init=async function(){cf.init(),this.pythonShell=new pf},this.steprun=function(){const e=B.Workspace.getMain().getEditorsManager().getActive().getCode();return this.pythonShell.steprun(e)},this.run=function(){const e=B.Workspace.getMain().getEditorsManager().getActive().getCode();return this.pythonShell.run(e)},this.stop=function(){return this.pythonShell.stop()}}#t=null;#n=null;#i=null;#r={row:0,column:0};#s="";#o=null;#a=null;#l=!1;#u=!1;#c=null;#p=()=>this.#h();#d=[{name:"REPL-Enter",bindKey:"Enter",exec:e=>{if(e.getSession().selection.getCursor().row===this.#r.row){const e=this.#t.getEndPos();let t=this.#t.getValueRange(this.#r,e);return t=t.replace(this.#s,""),this.#o?.(t),this.#o=null,this.#a=null,this.#t.addValue("\n"),this.#f(),!0}return!1}},{name:"REPL-ChangeEditor",bindKey:"Delete|Ctrl-X|Backspace",exec:e=>{const t=e.getSession().selection.getCursor();return t.row{this.#u=!1,this.#t.addValue(`\n==${B.Msg.Lang["shell.finish"]}==`)})),e.bind("output",(e=>{this.#t.addValue(e.content)})),e.bind("error",(e=>{this.#u=!1,this.#t.addValue(`\n${e.toString()}\n`)})),e.bind("input",(e=>{const t=String(e?.content?.prompt);this.#t.addValue(`>>> ${t}`),this.#s=t,this.#o=e.resolve,this.#a=e.reject,this.#m()})),e.bind("display",(e=>{this.#i.changeTo("images"),this.#n.display(e)}))}#h(){const e=this.#t.getEditor(),t=e.getSession().selection.getCursor();e.setReadOnly(t.rowsetTimeout(t,e)))}}const hf=pf,df={},ff=['\n \n ','\n \n ','\n \n ','\n \n ','\n \n ','\n \n ','\n \n '];df.$shadow=ef()('
'),df.count=0,df.init=function(){hf.init();const e=B.app.getNav();e.register({icon:"icon-play-circled",title:"",id:"python-steprun-btn",displayText:F.Msg.MSG.step_run,preconditionFn:()=>!0,callback:()=>{hf.steprun().catch(B.Debug.error)},scopeType:B.Nav.Scope.LEFT,weight:4}),e.register({icon:"icon-play-circled",title:"",id:"python-run-btn",displayText:F.Msg.MSG.run,preconditionFn:()=>!0,callback:()=>{hf.run().catch(B.Debug.error)},scopeType:B.Nav.Scope.LEFT,weight:5}),e.register({icon:"icon-cancel",title:"",id:"python-stop-btn",displayText:F.Msg.MSG.stop,preconditionFn:()=>!0,callback:()=>{hf.stop().catch(B.Debug.error)},scopeType:B.Nav.Scope.LEFT,weight:6});const t=new B.HTMLTemplate("\r\n"),n=ef()(t.render());e.getBoardSelector().before(n),n.select2({width:"90px",minimumResultsForSearch:1/0,dropdownCssClass:`mixly-scrollbar mixly-${t.getId()}`,dropdownAutoWidth:!0,placeholder:"",language:B.Msg.nowLang});for(let e=0;e{const{data:t}=e.params;B.Workspace.getMain().getEditorsManager().getActive().setValue(ff[parseInt(t.id)],".mix")})),n.on("select2:opening",(()=>{df.count+=1,ef()(document.body).append(df.$shadow)})),n.on("select2:closing",(()=>{df.count-=1,!df.count&&df.$shadow.detach()})),n.trigger("change"),B.Storage.board("mix",ff[0]),B.Storage.board("path","")};df.init(),Object.assign(F.Variables,V),Object.assign(F.Procedures,Y),F.Python=H,F.generator=H,B.Profile.default={},Object.assign(F.Blocks,e,t,i,r,s,o,a,l,u,c,p,h,d,f,_,m,b,g),Object.assign(F.Python.forBlock,S,k,y,v,T,E,I,w,x,A,O,M,C,R,N,L,D,P)})()})(); \ No newline at end of file diff --git a/boards/default/python_skulpt_mixtoy/index.xml b/boards/default/python_skulpt_mixtoy/index.xml index 2a3e2537..487d4e35 100644 --- a/boards/default/python_skulpt_mixtoy/index.xml +++ b/boards/default/python_skulpt_mixtoy/index.xml @@ -1 +1 @@ -promptHelloHelloHello,HelloMixly100,1,2,3051i90x151100a10.998124.821100101010001100501100110000x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')dirmylist1,2,3,4,5mylist0mylist02mylist00mylist0101mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2x000000000000 \ No newline at end of file +promptHelloHelloHello,HelloMixly100,1,2,3051i90x151100a10.998124.821100101010001100501100110000x2x0,1,2,30,1,2,30,1,2,3xMixlyHelloMixly65axMixlyMixly0Mixly02MixlyMixlyHello,mixlyHello,mixly50*Hello,mixlyl--mylistHello,mixlymixlymixpyI love mixly!I love mixlyRandom No. is {}int1100input('1+2*3')dirmylist1,2,3,4,5mylist0mylist02mylist00mylist0101mylistmylist2mylistmylist0mylist00mylist00mylist0mylist0mylist0mylistmylistmylistxmytup1,2,3,4,5mytup0mytup02mytupmytupmytupmytup0mytupmytup1mytup2xmydictmydictkeymydictkey0mydictkey0mydictkeymydictkeymydictkey0mydictmydictmydictmydictxmydict{"name":"Mixly","color":"green"}s11,2,3,4,5s1s1s1s2s1s2s10s1Mixlys1s2x000000000000 \ No newline at end of file diff --git a/boards/default/python_skulpt_mixtoy/main.bundle.1d0fe71d.js b/boards/default/python_skulpt_mixtoy/main.bundle.1d0fe71d.js new file mode 100644 index 00000000..85ce6632 --- /dev/null +++ b/boards/default/python_skulpt_mixtoy/main.bundle.1d0fe71d.js @@ -0,0 +1,21 @@ +(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>Z,controls_typeLists:()=>z,lists_zip:()=>$,lists_zip_container:()=>tt,lists_zip_item:()=>et,unpack_iterable_object:()=>it,variables_change:()=>Q,variables_get:()=>j,variables_global:()=>J,variables_set:()=>q});var i={};t.r(i),t.d(i,{base_setup:()=>ot,controls_delay:()=>_t,controls_end_program:()=>pt,controls_except:()=>Rt,controls_finally:()=>mt,controls_flow_statements:()=>dt,controls_for:()=>It,controls_forEach:()=>lt,controls_for_range:()=>ht,controls_if:()=>ut,controls_if_else:()=>Mt,controls_if_elseif:()=>Ot,controls_if_if:()=>Et,controls_lambda:()=>gt,controls_main:()=>st,controls_pass:()=>Lt,controls_range:()=>at,controls_repeat_ext:()=>At,controls_thread:()=>Ct,controls_try:()=>ct,controls_try_finally:()=>Tt,controls_whileUntil:()=>rt,datetime_fromtimestamp:()=>Ft,do_while:()=>St,garbage_collection:()=>Dt,gene_unique_identifier:()=>vt,get_mem_alloc:()=>Nt,get_mem_free:()=>Pt,get_unique_identifier:()=>ft});var n={};t.r(n),t.d(n,{base_map:()=>$t,generate_cartesian_product:()=>ee,math_arithmetic:()=>kt,math_bit:()=>Ut,math_constant:()=>yt,math_constant_mp:()=>bt,math_constrain:()=>Kt,math_dec:()=>Bt,math_degree_to_radian:()=>ne,math_indexer_number:()=>qt,math_map:()=>jt,math_max_min:()=>wt,math_number:()=>Yt,math_number_base_conversion:()=>Ht,math_radian_to_degree:()=>ie,math_random:()=>Wt,math_random_seed:()=>Qt,math_round:()=>Jt,math_selfcalcu:()=>Xt,math_to_int:()=>xt,math_trig:()=>Gt,text_to_number:()=>Zt,text_to_number_skulpt:()=>zt,turn_to_int:()=>te});var s={};t.r(s),t.d(s,{ascii_to_char:()=>ae,char_to_ascii:()=>le,number_to_text:()=>re,os_system:()=>be,text:()=>oe,text_capital:()=>Re,text_center:()=>me,text_char:()=>pe,text_char_at:()=>Ie,text_char_at2:()=>de,text_char_at3:()=>ve,text_compareTo:()=>Fe,text_compare_to:()=>ce,text_create_with_container:()=>Ne,text_create_with_item:()=>Pe,text_encode:()=>Ye,text_equals_starts_ends:()=>Me,text_eval:()=>ye,text_find:()=>Ae,text_format:()=>De,text_format_noreturn:()=>Ve,text_join:()=>ue,text_join_seq:()=>ge,text_length:()=>Te,text_random_char:()=>he,text_replace:()=>Le,text_split:()=>Ce,text_strip:()=>Se,text_substring:()=>Oe,text_substring2:()=>Ee,text_substring3:()=>fe,text_textarea:()=>_e});var o={};t.r(o),t.d(o,{ENUMERATE:()=>Mi,content_in_lists:()=>Ri,enumerate:()=>ci,list_many_input:()=>oi,list_tolist:()=>ai,list_tolist2:()=>Oi,list_trig:()=>ii,lists_2d_get_col_row_data:()=>Be,lists_2d_get_data_with_col_row:()=>Ge,lists_append_extend:()=>je,lists_change_to:()=>si,lists_change_to_general:()=>pi,lists_clear:()=>ze,lists_create_with:()=>xe,lists_create_with2:()=>li,lists_create_with_container:()=>He,lists_create_with_item:()=>We,lists_create_with_noreturn:()=>_i,lists_create_with_text:()=>we,lists_create_with_text2:()=>ri,lists_del_general:()=>ui,lists_find:()=>ei,lists_getIndex3:()=>Ti,lists_getSublist3:()=>di,lists_get_index:()=>Xe,lists_get_random_item:()=>qe,lists_get_random_sublist:()=>Qe,lists_get_sublist:()=>Ue,lists_insert_value:()=>Je,lists_insert_value2:()=>hi,lists_pop:()=>ti,lists_remove_at:()=>$e,lists_remove_at2:()=>Ei,lists_reverse:()=>Ze,lists_setIndex3:()=>Ii,lists_set_index:()=>Ke,lists_sort:()=>ni});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>bi,dicts_add_or_change:()=>Ni,dicts_clear:()=>Fi,dicts_create_with:()=>Ai,dicts_create_with_container:()=>gi,dicts_create_with_item:()=>Li,dicts_create_with_noreturn:()=>Ui,dicts_deldict:()=>yi,dicts_delete:()=>Pi,dicts_get:()=>Si,dicts_get_default:()=>Di,dicts_items:()=>vi,dicts_keys:()=>Ci,dicts_length:()=>Yi,dicts_pop:()=>ki,dicts_setdefault:()=>Xi,dicts_to_json:()=>Bi,dicts_to_json2:()=>Hi,dicts_to_to:()=>wi,dicts_todict:()=>Gi,dicts_update:()=>fi,dicts_values:()=>Vi,json_to_dicts:()=>xi});var p={};t.r(p),t.d(p,{logic_boolean:()=>Ji,logic_compare:()=>Ki,logic_compare_continous:()=>ji,logic_is:()=>tn,logic_is_in:()=>$i,logic_negate:()=>Qi,logic_null:()=>Zi,logic_operation:()=>qi,logic_tobool:()=>en,logic_true_or_false:()=>zi});var u={};t.r(u),t.d(u,{sdcard_mount:()=>Cn,sdcard_use_spi_init:()=>Ln,storage_can_write_ornot:()=>rn,storage_change_dir:()=>An,storage_close_file:()=>dn,storage_delete_file:()=>hn,storage_file_seek:()=>Mn,storage_file_tell:()=>On,storage_file_write:()=>pn,storage_fileopen:()=>sn,storage_fileopen_new:()=>on,storage_fileopen_new_encoding:()=>_n,storage_get_a_line:()=>ln,storage_get_contents:()=>an,storage_get_contents_without_para:()=>un,storage_get_current_dir:()=>cn,storage_get_file_size:()=>En,storage_get_filename:()=>Tn,storage_is_file:()=>gn,storage_list_all_files:()=>In,storage_make_dir:()=>Rn,storage_open_file_with_os:()=>nn,storage_rename:()=>mn});var a={};t.r(a),t.d(a,{procedures_callnoreturn:()=>fn,procedures_callreturn:()=>Fn,procedures_defnoreturn:()=>Sn,procedures_defreturn:()=>Dn,procedures_ifreturn:()=>vn,procedures_mutatorarg:()=>Pn,procedures_mutatorcontainer:()=>Nn,procedures_return:()=>Vn});var l={};t.r(l),t.d(l,{tuple_change_to:()=>Wn,tuple_create_with:()=>yn,tuple_create_with_container:()=>bn,tuple_create_with_item:()=>kn,tuple_create_with_noreturn:()=>Qn,tuple_create_with_text2:()=>Xn,tuple_create_with_text_return:()=>Un,tuple_del:()=>xn,tuple_find:()=>Kn,tuple_getIndex:()=>Gn,tuple_getSublist:()=>qn,tuple_get_random_item:()=>Zn,tuple_get_sublist:()=>Jn,tuple_input:()=>$n,tuple_join:()=>wn,tuple_length:()=>Bn,tuple_max:()=>Hn,tuple_totuple:()=>zn,tuple_trig:()=>jn});var r={};t.r(r),t.d(r,{set_add_discard:()=>as,set_clear:()=>_s,set_create_with:()=>es,set_create_with_container:()=>is,set_create_with_item:()=>ns,set_create_with_text_return:()=>Ts,set_length:()=>ss,set_operate:()=>ps,set_operate_update:()=>us,set_pop:()=>os,set_sub:()=>ls,set_toset:()=>ds,set_update:()=>rs});var T={};t.r(T),t.d(T,{html_content:()=>Ms,html_content_more:()=>cs,html_document:()=>hs,html_form:()=>ms,html_head_body:()=>Os,html_style:()=>Rs,html_style_color:()=>gs,html_style_content:()=>As,html_text:()=>Ls,html_title:()=>Es});var d={};t.r(d),t.d(d,{attribute_access:()=>Xs,function_call:()=>ys,function_call_container:()=>bs,function_call_item:()=>ks,raw_block:()=>Ds,raw_empty:()=>Ps,raw_expression:()=>Ns,raw_table:()=>Ss,text_comment:()=>fs,text_print_multiple:()=>vs,text_print_multiple_container:()=>Vs,text_print_multiple_item:()=>Ys,type_check:()=>Fs});var I={};t.r(I),t.d(I,{array_create:()=>eo,array_toarray:()=>Eo,dataframe_create:()=>xs,dataframe_create_from_index:()=>Hs,dataframe_create_from_one_index:()=>ws,dataframe_get:()=>To,numpy_trig:()=>ao,pandas_readcsv:()=>ro,pl_axes:()=>Zs,pl_bar:()=>oo,pl_hist:()=>po,pl_label:()=>to,pl_legend:()=>zs,pl_pie:()=>_o,pl_plot:()=>Qs,pl_plot_bar:()=>io,pl_plot_easy:()=>qs,pl_plot_scatter:()=>no,pl_plot_xy:()=>so,pl_savefig:()=>Io,pl_show:()=>Js,pl_subplot:()=>lo,pl_text:()=>ho,pl_ticks:()=>uo,pl_title:()=>$s,plot_axes:()=>Ro,plot_bar:()=>Do,plot_hist:()=>Po,plot_label:()=>go,plot_legend:()=>mo,plot_pie:()=>No,plot_plot:()=>Mo,plot_plot_bar:()=>Lo,plot_plot_easy:()=>Oo,plot_plot_scatter:()=>Co,plot_plot_xy:()=>So,plot_savefig:()=>vo,plot_show:()=>co,plot_subplot:()=>Fo,plot_text:()=>Vo,plot_ticks:()=>fo,plot_title:()=>Ao,series_create:()=>Gs,series_create_from_index:()=>Bs,series_create_from_text:()=>Ws,series_get_num:()=>js,series_index_value:()=>Ks});var h={};t.r(h),t.d(h,{inout_input:()=>yo,inout_print:()=>bo,inout_print_container:()=>Bo,inout_print_end:()=>Xo,inout_print_inline:()=>ko,inout_print_item:()=>xo,inout_print_many:()=>Go,inout_type_input:()=>Uo});var E={};t.r(E),t.d(E,{Panic_with_status_code:()=>jo,base_delay:()=>Ho,controls_millis:()=>Wo,controls_mstimer2:()=>Qo,controls_mstimer2_start:()=>Jo,controls_mstimer2_stop:()=>Zo,reset:()=>qo,time_localtime:()=>Ko,time_sleep:()=>zo});var O={};t.r(O),t.d(O,{turtle_bgcolor:()=>c_,turtle_bgcolor_hex:()=>N_,turtle_bgcolor_hex_new:()=>g_,turtle_circle:()=>E_,turtle_circle_advanced:()=>O_,turtle_clear:()=>l_,turtle_clone:()=>A_,turtle_color:()=>S_,turtle_color_hex:()=>D_,turtle_color_seclet:()=>X_,turtle_create:()=>t_,turtle_done:()=>e_,turtle_exitonclick:()=>i_,turtle_fill:()=>T_,turtle_fillcolor:()=>m_,turtle_fillcolor_hex:()=>f_,turtle_fillcolor_hex_new:()=>C_,turtle_getscreen:()=>U_,turtle_goto:()=>p_,turtle_listen:()=>w_,turtle_move:()=>n_,turtle_numinput:()=>V_,turtle_onclick:()=>B_,turtle_onkey:()=>G_,turtle_ontimer:()=>x_,turtle_pencolor:()=>R_,turtle_pencolor_hex:()=>P_,turtle_pencolor_hex_new:()=>L_,turtle_penup:()=>r_,turtle_pos_shape:()=>a_,turtle_rotate:()=>s_,turtle_screen_delay:()=>__,turtle_screen_savefig:()=>H_,turtle_setheading:()=>o_,turtle_setxy:()=>u_,turtle_shape:()=>F_,turtle_shapesize:()=>v_,turtle_size:()=>I_,turtle_size_speed:()=>d_,turtle_speed:()=>h_,turtle_textinput:()=>Y_,turtle_visible:()=>M_,turtle_write:()=>y_,turtle_write_format:()=>b_,turtle_write_format_skulpt:()=>k_});var M={};t.r(M),t.d(M,{Turn:()=>J_,addOil:()=>Ip,checkMarker:()=>Ep,find_books_by_dichotomy:()=>Rp,find_books_by_sequence:()=>mp,game_get_character_img:()=>_p,game_get_local_img:()=>ip,game_get_path_img:()=>sp,game_init:()=>j_,getMarkerNum:()=>Op,get_actor_point:()=>up,initSettedMap:()=>K_,initialize:()=>pp,isBarrier:()=>ap,isCirculationRight:()=>hp,isDone:()=>Z_,isLightGreen:()=>dp,isOilFull:()=>Tp,isPath:()=>z_,is_Related_Barrier:()=>lp,is_Related_Path:()=>$_,move_direction_steps:()=>q_,move_related_to_spirite:()=>Q_,place_item:()=>op,randomOil:()=>rp,randomPlaceBarrier:()=>Mp,set_map:()=>ep,set_map_bg:()=>tp,set_pathtype:()=>np,settedSimpleMap:()=>cp});var c={};t.r(c),t.d(c,{controls_type:()=>Sp,controls_typeLists:()=>Dp,lists_zip:()=>Np,unpack_iterable_object:()=>Pp,variables_change:()=>Lp,variables_get:()=>Ap,variables_global:()=>Cp,variables_set:()=>gp});var R={};t.r(R),t.d(R,{Panic_with_status_code:()=>Up,base_setup:()=>Fp,controls_delay:()=>Xp,controls_flow_statements:()=>kp,controls_for:()=>Yp,controls_forEach:()=>Hp,controls_for_range:()=>yp,controls_if:()=>vp,controls_interrupts:()=>xp,controls_lambda:()=>Kp,controls_main:()=>fp,controls_millis:()=>Gp,controls_nointerrupts:()=>wp,controls_pass:()=>qp,controls_range:()=>Wp,controls_repeat:()=>iu,controls_repeat_ext:()=>Zp,controls_thread:()=>Qp,controls_try_finally:()=>Vp,controls_whileUntil:()=>bp,datetime_fromtimestamp:()=>nu,do_while:()=>Jp,garbage_collection:()=>zp,gene_unique_identifier:()=>su,get_mem_alloc:()=>$p,get_mem_free:()=>tu,get_unique_identifier:()=>eu,reset:()=>Bp,time_sleep:()=>jp});var m={};t.r(m),t.d(m,{base_map:()=>Cu,generate_cartesian_product:()=>Du,math_arithmetic:()=>au,math_bit:()=>uu,math_constant:()=>_u,math_constant_mp:()=>pu,math_constrain:()=>Mu,math_dec:()=>du,math_degree_to_radian:()=>Pu,math_indexer_number:()=>mu,math_map:()=>Ou,math_max_min:()=>hu,math_number:()=>ou,math_number_base_conversion:()=>cu,math_radian_to_degree:()=>Nu,math_random:()=>Eu,math_random_seed:()=>Ru,math_round:()=>Au,math_selfcalcu:()=>lu,math_single:()=>ru,math_to_int:()=>Iu,math_trig:()=>Tu,text_to_number:()=>gu,text_to_number_skulpt:()=>Lu,turn_to_int:()=>Su});var A={};t.r(A),t.d(A,{ascii_to_char:()=>Yu,char_to_ascii:()=>yu,number_to_text:()=>bu,os_system:()=>oa,text:()=>fu,text_capital:()=>Wu,text_center:()=>Ku,text_char:()=>vu,text_char_at:()=>Uu,text_char_at2:()=>Xu,text_char_at3:()=>ia,text_compareTo:()=>ea,text_compare_to:()=>xu,text_encode:()=>na,text_equals_starts_ends:()=>Bu,text_eval:()=>sa,text_find:()=>ju,text_format:()=>zu,text_format_noreturn:()=>$u,text_join:()=>Vu,text_join_seq:()=>qu,text_length:()=>ku,text_random_char:()=>Gu,text_replace:()=>Qu,text_split:()=>Ju,text_strip:()=>Zu,text_substring:()=>Hu,text_substring2:()=>wu,text_substring3:()=>ta,text_textarea:()=>Fu});var g={};t.r(g),t.d(g,{content_in_lists:()=>Ua,enumerate:()=>Xa,list_many_input:()=>Ca,list_tolist:()=>ba,list_tolist2:()=>ka,list_trig:()=>Aa,lists_2d_get_col_row_data:()=>ua,lists_2d_get_data_with_col_row:()=>pa,lists_append_extend:()=>da,lists_change_to:()=>La,lists_change_to_general:()=>Da,lists_clear:()=>Ma,lists_create_with:()=>aa,lists_create_with2:()=>Pa,lists_create_with_noreturn:()=>Sa,lists_create_with_text:()=>la,lists_create_with_text2:()=>fa,lists_del_general:()=>Na,lists_find:()=>ca,lists_getIndex3:()=>Fa,lists_getSublist3:()=>va,lists_get_index:()=>ra,lists_get_random_item:()=>Ia,lists_get_random_sublist:()=>ha,lists_get_sublist:()=>_a,lists_insert_value:()=>Ea,lists_insert_value2:()=>Ya,lists_pop:()=>ma,lists_remove_at:()=>Ra,lists_remove_at2:()=>ya,lists_reverse:()=>Oa,lists_setIndex3:()=>Va,lists_set_index:()=>Ta,lists_sort:()=>ga});var L={};t.r(L),t.d(L,{dicts_add_change_del:()=>za,dicts_add_or_change:()=>Ha,dicts_clear:()=>ja,dicts_create_with:()=>Ga,dicts_create_with_noreturn:()=>el,dicts_deldict:()=>Za,dicts_delete:()=>Wa,dicts_get:()=>xa,dicts_get_default:()=>wa,dicts_items:()=>qa,dicts_keys:()=>Ba,dicts_length:()=>Ja,dicts_pop:()=>$a,dicts_setdefault:()=>tl,dicts_to_json:()=>nl,dicts_to_json2:()=>_l,dicts_to_to:()=>ol,dicts_todict:()=>il,dicts_update:()=>Ka,dicts_values:()=>Qa,json_to_dicts:()=>sl});var C={};t.r(C),t.d(C,{logic_boolean:()=>rl,logic_compare:()=>pl,logic_compare_continous:()=>ul,logic_is:()=>hl,logic_is_in:()=>Il,logic_negate:()=>ll,logic_null:()=>Tl,logic_operation:()=>al,logic_tobool:()=>El,logic_true_or_false:()=>dl});var S={};t.r(S),t.d(S,{sdcard_mount:()=>Ul,sdcard_use_spi_init:()=>Xl,storage_can_write_ornot:()=>Cl,storage_change_dir:()=>Vl,storage_close_file:()=>Dl,storage_delete_file:()=>Pl,storage_file_seek:()=>vl,storage_file_tell:()=>Fl,storage_file_write:()=>ml,storage_fileopen:()=>Ml,storage_fileopen_new:()=>cl,storage_fileopen_new_encoding:()=>Rl,storage_get_a_line:()=>Ll,storage_get_contents:()=>gl,storage_get_contents_without_para:()=>Al,storage_get_current_dir:()=>Yl,storage_get_file_size:()=>fl,storage_get_filename:()=>Sl,storage_is_file:()=>kl,storage_list_all_files:()=>Nl,storage_make_dir:()=>yl,storage_open_file_with_os:()=>Ol,storage_rename:()=>bl});var D={};t.r(D),t.d(D,{procedures_callnoreturn:()=>wl,procedures_callreturn:()=>xl,procedures_defnoreturn:()=>Bl,procedures_defreturn:()=>Gl,procedures_ifreturn:()=>Hl,procedures_return:()=>Wl});var N={};t.r(N),t.d(N,{tuple_change_to:()=>tr,tuple_create_with:()=>Kl,tuple_create_with_noreturn:()=>sr,tuple_create_with_text2:()=>jl,tuple_create_with_text_return:()=>ql,tuple_del:()=>Zl,tuple_find:()=>er,tuple_getIndex:()=>Ql,tuple_getSublist:()=>nr,tuple_get_random_item:()=>_r,tuple_get_sublist:()=>or,tuple_input:()=>ur,tuple_join:()=>zl,tuple_length:()=>Jl,tuple_max:()=>$l,tuple_totuple:()=>pr,tuple_trig:()=>ir});var P={};t.r(P),t.d(P,{set_add_discard:()=>hr,set_clear:()=>Tr,set_create_with:()=>ar,set_create_with_text_return:()=>Mr,set_length:()=>lr,set_operate:()=>dr,set_operate_update:()=>Ir,set_pop:()=>rr,set_sub:()=>Er,set_toset:()=>cr,set_update:()=>Or});var f={};t.r(f),t.d(f,{html_content:()=>gr,html_content_more:()=>Lr,html_document:()=>Rr,html_form:()=>Sr,html_head_body:()=>Ar,html_style:()=>Cr,html_style_content:()=>Dr,html_text:()=>Nr,html_title:()=>mr});var F={};t.r(F),t.d(F,{attribute_access:()=>yr,function_call:()=>Yr,raw_block:()=>Pr,raw_empty:()=>Fr,raw_expression:()=>fr,raw_table:()=>vr,type_check:()=>Vr});var v={};t.r(v),t.d(v,{array_create:()=>Zr,array_toarray:()=>rT,dataframe_create:()=>Xr,dataframe_create_from_index:()=>Ur,dataframe_create_from_one_index:()=>Gr,dataframe_get:()=>uT,numpy_trig:()=>oT,pandas_readcsv:()=>pT,pl_axes:()=>Wr,pl_bar:()=>eT,pl_hist:()=>nT,pl_label:()=>Jr,pl_legend:()=>qr,pl_pie:()=>iT,pl_plot:()=>jr,pl_plot_bar:()=>zr,pl_plot_easy:()=>Kr,pl_plot_scatter:()=>$r,pl_plot_xy:()=>tT,pl_savefig:()=>aT,pl_show:()=>Hr,pl_subplot:()=>_T,pl_text:()=>lT,pl_ticks:()=>sT,pl_title:()=>Qr,plot_axes:()=>dT,plot_bar:()=>AT,plot_hist:()=>LT,plot_label:()=>MT,plot_legend:()=>ET,plot_pie:()=>gT,plot_plot:()=>hT,plot_plot_bar:()=>cT,plot_plot_easy:()=>IT,plot_plot_scatter:()=>RT,plot_plot_xy:()=>mT,plot_savefig:()=>DT,plot_show:()=>TT,plot_subplot:()=>ST,plot_text:()=>NT,plot_ticks:()=>CT,plot_title:()=>OT,series_create:()=>br,series_create_from_index:()=>kr,series_create_from_text:()=>Br,series_get_num:()=>wr,series_index_value:()=>xr});var V={};t.r(V),t.d(V,{inout_input:()=>PT,inout_print:()=>fT,inout_print_end:()=>vT,inout_print_inline:()=>FT,inout_print_many:()=>YT,inout_type_input:()=>VT});var Y={};t.r(Y),t.d(Y,{controls_end_program:()=>bT,controls_millis:()=>yT,time_localtime:()=>kT});var y={};t.r(y),t.d(y,{turtle_bgcolor:()=>nd,turtle_bgcolor_hex:()=>pd,turtle_bgcolor_hex_new:()=>ld,turtle_circle:()=>$T,turtle_circle_advanced:()=>ed,turtle_clear:()=>jT,turtle_clone:()=>_d,turtle_color:()=>Id,turtle_color_hex:()=>dd,turtle_color_seclet:()=>Ad,turtle_create:()=>XT,turtle_done:()=>UT,turtle_exitonclick:()=>GT,turtle_fill:()=>QT,turtle_fillcolor:()=>od,turtle_fillcolor_hex:()=>ad,turtle_fillcolor_hex_new:()=>Td,turtle_getscreen:()=>gd,turtle_goto:()=>WT,turtle_listen:()=>Dd,turtle_move:()=>BT,turtle_numinput:()=>Md,turtle_onclick:()=>Cd,turtle_onkey:()=>Ld,turtle_ontimer:()=>Sd,turtle_pencolor:()=>sd,turtle_pencolor_hex:()=>ud,turtle_pencolor_hex_new:()=>rd,turtle_penup:()=>qT,turtle_pos_shape:()=>KT,turtle_rotate:()=>xT,turtle_screen_delay:()=>HT,turtle_screen_savefig:()=>Nd,turtle_setheading:()=>wT,turtle_setxy:()=>td,turtle_shape:()=>hd,turtle_shapesize:()=>Ed,turtle_size:()=>ZT,turtle_size_speed:()=>JT,turtle_speed:()=>zT,turtle_textinput:()=>Od,turtle_visible:()=>id,turtle_write:()=>cd,turtle_write_format:()=>Rd,turtle_write_format_skulpt:()=>md});var b={};t.r(b),t.d(b,{Turn:()=>Vd,addOil:()=>Zd,checkMarker:()=>$d,find_books_by_dichotomy:()=>nI,find_books_by_sequence:()=>sI,game_get_character_img:()=>Bd,game_get_local_img:()=>Xd,game_get_path_img:()=>Hd,game_init:()=>Pd,getMarkerNum:()=>tI,get_actor_point:()=>kd,initSettedMap:()=>vd,initialize:()=>xd,isBarrier:()=>Kd,isCirculationRight:()=>zd,isDone:()=>Yd,isLightGreen:()=>Jd,isOilFull:()=>Qd,isPath:()=>yd,is_Related_Barrier:()=>jd,is_Related_Path:()=>bd,move_direction_steps:()=>fd,move_related_to_spirite:()=>Fd,place_item:()=>wd,randomOil:()=>qd,randomPlaceBarrier:()=>eI,set_map:()=>Ud,set_map_bg:()=>Gd,set_pathtype:()=>Wd,settedSimpleMap:()=>iI});const k=Blockly,X=Mixly,U={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(_+=n)):i=_}else i="i";return i}},G=U,B={};B.NAME_TYPE=k.PROCEDURE_CATEGORY_NAME,B.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+"while True:\n"+u.join("")+a.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+a.join("\n")},W.scrubNakedValue=function(t){return t+"\n"},W.quote_=function(t){var e="'";return-1!==t.indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},W.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},W.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=k.utils.string.wrap(o,W.COMMENT_WRAP-3),n+=W.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const K=330,j={init:function(){this.setColour(K),this.appendDummyInput().appendField(new k.FieldTextInput(""),"VAR"),this.setOutput(!0),this.setTooltip(k.Msg.VARIABLES_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){H.equals(t,this.getFieldValue("VAR"))&&this.setFieldValue(e,"VAR")}},q={init:function(){this.setColour(K),this.appendValueInput("VALUE").appendField(new k.FieldTextInput(""),"VAR").appendField(k.Msg.MIXLY_VALUE2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.VARIABLES_SET_TOOLTIP)},getVars:function(){var t=this.getFieldValue("VAR");return null==t?[]:t.split(",")},renameVar:function(t,e){H.equals(t,this.getFieldValue("VAR"))&&this.setFieldValue(e,"VAR")}},Q={init:function(){this.setColour(K);var t=[[k.Msg.LANG_MATH_INT,"int"],[k.Msg.LANG_MATH_FLOAT,"float"],[k.Msg.LANG_MATH_BOOLEAN,"bool"],[k.Msg.LANG_MATH_STRING,"str"],[k.Msg.MIXLY_MICROBIT_TYPE_LIST,"list"],[k.Msg.MIXLY_MICROBIT_TYPE_TUPLE,"tuple"],[k.Msg.MIXLY_MICROBIT_TYPE_DICT,"dict"],[k.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,"set"],[k.Msg.LANG_MATH_BYTE,"bytes"]];this.appendValueInput("MYVALUE").appendField(new k.FieldDropdown(t),"OP"),this.setOutput(!0)}},J={init:function(){this.setColour(K),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_PYTHON_GLOBAL).setCheck("var"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(k.Msg.TEXT_PRINT_TOOLTIP)}},Z={init:function(){this.setColour(K),this.appendValueInput("DATA").appendField(k.Msg.MICROBIT_PYTHON_TYPE),this.setOutput(!0),this.setTooltip(k.Msg.MICROBIT_PYTHON_TYPE)}},z={init:function(){this.setColour(K),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_CONTORL_GET_TYPE).appendField(new k.FieldDropdown([[k.Msg.LANG_MATH_INT,"int"],[k.Msg.MIXLY_MICROBIT_TYPE_FLOAT,"float"],[k.Msg.MIXLY_MICROBIT_TYPE_STRING,"str"],[k.Msg.MIXLY_MICROBIT_TYPE_LIST,"list"],[k.Msg.MIXLY_MICROBIT_TYPE_TUPLE,"tuple"],[k.Msg.MIXLY_MICROBIT_TYPE_DICT,"dict"],[k.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,"set"],[k.Msg.LANG_MATH_BYTE,"bytes"],[k.Msg.LOGIC_NULL,"type(None)"]]),"type"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("type");return k.Msg.MICROBIT_controls_TypeLists+{int:k.Msg.LANG_MATH_INT,float:k.Msg.MIXLY_MICROBIT_TYPE_FLOAT,str:k.Msg.MIXLY_MICROBIT_TYPE_STRING,list:k.Msg.MIXLY_MICROBIT_TYPE_LIST,tuple:k.Msg.MIXLY_MICROBIT_TYPE_TUPLE,dict:k.Msg.MIXLY_MICROBIT_TYPE_DICT,set:k.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,image:k.Msg.MIXLY_MICROBIT_IMAGE,bytes:k.Msg.LANG_MATH_BYTE,NoneType:k.Msg.LOGIC_NULL}[e]}))}},$={init:function(){this.setColour(K),this.itemCount_=2,this.updateShape_(),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setMutator(new k.icons.MutatorIcon(["lists_zip_item"],this)),this.setTooltip(k.Msg.MIXLY_PYTHON_LISTS_ZIP_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_zip_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(k.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(k.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(k.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_if_else");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(k.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(k.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(k.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},at={init:function(){this.setColour(nt),this.appendValueInput("FROM").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.PYTHON_RANGE).appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},lt={init:function(){this.setColour(nt),this.appendValueInput("LIST").setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(k.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(k.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return k.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){k.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},rt={init:function(){this.setColour(nt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(k.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new k.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(k.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+k.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:k.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:k.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Tt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(k.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new k.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(k.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(k.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(k.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_finally");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(k.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(k.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},dt={init:function(){this.setColour(nt);var t=new k.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(k.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:k.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:k.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(k.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},It={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new k.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(k.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return k.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){k.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},ht={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new k.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(k.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return k.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){k.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};rt.OPERATORS=[[k.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[k.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],dt.OPERATORS=[[k.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[k.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Et={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(k.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Ot={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Mt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(k.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},ct={init:function(){this.setColour(nt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},Rt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(k.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},mt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(k.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},At={init:function(){this.jsonInit({message0:k.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:nt,tooltip:k.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:k.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},gt={init:function(){this.setColour(nt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(k.Msg.MIXLY_STAT),this.setOutput(!0)}},Lt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},Ct={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(k.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},St={init:function(){this.appendDummyInput().appendField(k.Msg.CONTROLS_REPEAT_TITLE_REPEAT+k.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(k.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new k.FieldDropdown([[k.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[k.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(nt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},Dt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Nt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},Pt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},ft={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_GET+k.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(k.Msg.PROCEDURES_DEFRETURN_RETURN+k.Msg.MIXLY_GET_UNIQUE_IDEN)}},Ft={init:function(){this.setColour(nt),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(k.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},vt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},Vt=230;k.FieldTextInput.math_number_validator=function(t){return String(t)},k.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const Yt={init:function(){this.setColour(Vt),this.appendDummyInput().appendField(new k.FieldTextInput("0",k.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(k.Msg.MATH_NUMBER_TOOLTIP)}},yt={init:function(){this.setColour(Vt);this.appendDummyInput("").appendField(k.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new k.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:k.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:k.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},bt={init:function(){this.setColour(Vt);this.appendDummyInput("").appendField(k.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new k.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:k.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:k.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},kt={init:function(){this.setColour(Vt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new k.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:k.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:k.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:k.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:k.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:k.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:k.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:k.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Xt={init:function(){this.setColour(Vt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new k.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:k.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:k.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:k.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:k.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:k.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:k.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:k.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Ut={init:function(){this.setColour(Vt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new k.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Gt={init:function(){this.setColour(Vt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new k.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:k.Msg.MATH_TRIG_TOOLTIP_SIN,COS:k.Msg.MATH_TRIG_TOOLTIP_COS,TAN:k.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:k.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:k.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:k.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:k.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Bt={init:function(){var t=[[k.Msg.MATH_BIN,"bin"],[k.Msg.MATH_OCT,"oct"],[k.Msg.MATH_HEX,"hex"]];this.setColour(Vt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new k.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:k.Msg.MATH_DEC_TOOLTIP_BIN,oct:k.Msg.MATH_DEC_TOOLTIP_OCT,hex:k.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},xt={init:function(){var t=[[k.Msg.LANG_MATH_TO_ROUND,"round"],[k.Msg.LANG_MATH_TO_CEIL,"ceil"],[k.Msg.LANG_MATH_TO_FLOOR,"floor"],[k.Msg.MATH_ABS,"fabs"],[k.Msg.MATH_SQRT,"sqrt"]];this.setColour(Vt),this.appendValueInput("A").setCheck(Number).appendField(new k.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:k.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:k.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:k.Msg.MATH_SINGLE_TOOLTIP_SQ,round:k.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:k.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:k.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},wt={init:function(){var t=[[k.Msg.MIXLY_MAX,"max"],[k.Msg.MIXLY_MIN,"min"]];this.setColour(Vt),this.appendValueInput("A").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(new k.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(k.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:k.Msg.MIXLY_TOOLTIP_MATH_MAX,min:k.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Ht={init:function(){var t=[[k.Msg.MATH_TWO,"two"],[k.Msg.MATH_EIGHT,"eight"],[k.Msg.MATH_TEN,"ten"],[k.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(Vt),this.appendDummyInput("").appendField(k.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new k.FieldDropdown(t),"OP").appendField(k.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(k.Msg.MATH_ZHW).appendField(new k.FieldDropdown(t),"OP2").appendField(k.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:k.Msg.MATH_Before_two,eight:k.Msg.MATH_Before_eight,ten:k.Msg.MATH_Before_ten,sixteen:k.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:k.Msg.MATH_Behind_two,eight:k.Msg.MATH_Behind_eight,ten:k.Msg.MATH_Behind_ten,sixteen:k.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},Wt={init:function(){var t=[[k.Msg.LANG_MATH_INT,"int"],[k.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Vt),this.setOutput(!0,Number),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_RANDOM).appendField(new k.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:k.Msg.LANG_MATH_INT,float:k.Msg.LANG_MATH_FLOAT_RANDOM};return k.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Kt={init:function(){this.setColour(Vt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(k.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(k.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(k.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(k.Msg.MATH_CONSTRAIN_TOOLTIP)}},jt={init:function(){this.setColour(Vt),this.appendValueInput("NUM",Number).appendField(k.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(k.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(k.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(k.Msg.MIXLY_TOOLTIP_MATH_MAP)}},qt={init:function(){this.setColour(Vt),this.appendDummyInput().appendField(new k.FieldTextInput("0",k.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(k.Msg.MATH_NUMBER_TOOLTIP)}},Qt={init:function(){this.setColour(Vt),this.appendValueInput("NUM").setCheck(Number).appendField(k.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},Jt={init:function(){this.setColour(Vt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(k.Msg.MATH_ROUND).appendField(k.Msg.TEXT_KEEP),this.appendDummyInput().appendField(k.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(k.Msg.MATH_ROUND_NEW_TOOLTIP)}},Zt={init:function(){var t=[[k.Msg.MIXLY_TO_INT,"int"],[k.Msg.MIXLY_TO_FLOAT,"float"],[k.Msg.MIXLY_TO_BITES,"b"],[k.Msg.LANG_MATH_BYTE+k.Msg.MIXLY_TO_INT,"bti"]];this.setColour(Vt),this.appendValueInput("VAR").appendField(new k.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:k.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:k.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:k.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},zt={init:function(){var t=[[k.Msg.MIXLY_TO_INT,"int"],[k.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Vt),this.appendValueInput("VAR").appendField(new k.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:k.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:k.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},$t=jt,te={init:function(){this.setColour(Vt),this.appendValueInput("VAR").appendField(k.Msg.LANG_MATH_BYTE+k.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},ee={init:function(){this.setColour(Vt),this.itemCount_=1,this.setMutator(new k.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(k.Msg.MIXLY_PRODUCT+k.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(k.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(k.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(k.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const pe={init:function(){this.setColour(se),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new k.FieldTextInput("",k.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(k.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new k.FieldImage(e,7,12,'"')}},ue={init:function(){this.setColour(se),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(k.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},ae={init:function(){this.setColour(se),this.appendValueInput("VAR").setCheck(Number).appendField(k.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},le={init:function(){this.setColour(se),this.appendValueInput("VAR").setCheck(String).appendField(k.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},re={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Te={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},de={init:function(){this.WHERE_OPTIONS=[[k.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[k.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[k.Msg.TEXT_GET_INDEX_RANDOM+1+k.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(k.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(k.Msg.LISTS_GET_INDEX_GET,"MODE"),k.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(k.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=k.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=k.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=k.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=k.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+k.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",k.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:k.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:k.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:k.Msg.TEXT_GET_INDEX_RANDOM};return k.Msg.PROCEDURES_DEFRETURN_RETURN+k.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+k.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==k.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),k.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(k.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new k.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),k.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Ie={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(k.Msg.LISTS_GET_INDEX_GET+" "+k.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(k.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(k.Msg.PROCEDURES_DEFRETURN_RETURN+k.Msg.MIXLY_MICROBIT_TYPE_STRING+k.Msg.LISTS_GET_INDEX_FROM_START+"n"+k.Msg.TEXT_CHARAT2)}},he={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(k.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(k.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Ee={init:function(){this.WHERE_OPTIONS_1=[[k.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[k.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[k.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[k.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[k.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[k.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(k.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(k.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==k.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==k.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),k.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(k.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new k.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Oe={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(k.Msg.LISTS_GET_INDEX_GET+" "+k.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(k.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(k.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(k.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},Me={init:function(){var t=[[k.Msg.MIXLY_EQUALS,"==="],[k.Msg.MIXLY_STARTSWITH,"startswith"],[k.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(se),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new k.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},ce={init:function(){this.setColour(se),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(k.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_COMPARETO_HELP)}},Re={init:function(){var t=[[k.Msg.TEXT_UPPER,"upper"],[k.Msg.TEXT_TITLE,"title"],[k.Msg.TEXT_CAPITALIZE,"capitalize"],[k.Msg.TEXT_SWAPCASE,"swapcase"],[k.Msg.TEXT_LOWER,"lower"]];this.setColour(se),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new k.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:k.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:k.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:k.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:k.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:k.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},me={init:function(){var t=[[k.Msg.TEXT_LJUST,"ljust"],[k.Msg.TEXT_CENTER,"center"],[k.Msg.TEXT_RJUST,"rjust"]];this.setColour(se),this.appendValueInput("VAR").appendField(new k.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(k.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(k.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Ae={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(k.Msg.MIXLY_MID+k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(k.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ge={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(k.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(k.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Le={init:function(){this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(k.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(k.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},Ce={init:function(){this.setColour(se),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(k.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(k.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(k.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},Se={init:function(){var t=[[k.Msg.TEXT_TRIM_BOTH,"strip"],[k.Msg.TEXT_TRIM_LEFT,"lstrip"],[k.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(se),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(k.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new k.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(k.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:k.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:k.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:k.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},De={init:function(){this.setColour(se),this.appendDummyInput("").appendField(k.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new k.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new k.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(k.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){k.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},gi={init:function(){this.setColour(mi),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(k.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Li={init:function(){this.setColour(mi),this.appendDummyInput().appendField(k.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Ci={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_KEYS),this.setTooltip(k.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Si={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(k.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(k.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(k.Msg.DICTS_GET_TOOLTIP)}},Di={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(k.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(k.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(k.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(k.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},Ni={init:function(){this.setColour(mi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(k.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(k.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Pi={init:function(){this.setColour(mi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(k.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(k.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.DICTS_DELETE_TOOLTIP)}},fi={init:function(){this.setColour(mi),this.appendValueInput("DICT2").setCheck("Dict").appendField(k.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(k.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(k.Msg.MIXLY_MID),this.setTooltip(k.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_CLEAR),this.setTooltip(k.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_ITEMS),this.setTooltip(k.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Vi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_VALUES),this.setTooltip(k.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Yi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.MIXLY_LENGTH),this.setTooltip(k.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},yi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_DELDICT),this.setTooltip(k.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bi={init:function(){this.MODE=[[k.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[k.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(k.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(k.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=k.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=k.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==k.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new k.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},ki={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(k.Msg.DICTS_ADD_VALUE),this.setTooltip(k.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},Xi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(k.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(k.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Ui={init:function(){this.setColour(mi),this.appendDummyInput("").appendField(new k.FieldLabel(k.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new k.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(k.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){k.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Gi={init:function(){this.setColour(mi),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Bi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.MIXLY_TO_JSON),this.setTooltip(k.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},xi={init:function(){this.setColour(mi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(k.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(k.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},wi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Hi={init:function(){this.setColour(mi),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(k.Msg.MIXLY_TO_JSON),this.setTooltip(k.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Wi=210,Ki={init:function(){var t=k.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Wi),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new k.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:k.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:k.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:k.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:k.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:k.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:k.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},ji={init:function(){var t=k.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=k.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Wi),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new k.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new k.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},qi={init:function(){var t=[[k.Msg.LOGIC_OPERATION_AND,"AND"],[k.Msg.LOGIC_OPERATION_OR,"OR"],[k.Msg.LOGIC_OPERATION_NOR,"NOR"],[k.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Wi),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new k.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:k.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:k.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:k.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:k.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},Qi={init:function(){this.setColour(Wi),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(k.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(k.Msg.LOGIC_NEGATE_TOOLTIP)}},Ji={init:function(){var t=[[k.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[k.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Wi),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new k.FieldDropdown(t),"BOOL"),this.setTooltip(k.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Zi={init:function(){this.setColour(Wi),this.setOutput(!0),this.appendDummyInput().appendField(k.Msg.LOGIC_NULL),this.setTooltip(k.Msg.LOGIC_NULL_TOOLTIP)}},zi={init:function(){this.setColour(Wi),this.appendValueInput("A"),this.appendValueInput("B").appendField(k.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(k.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},$i={init:function(){var t=[[k.Msg.TEXT_APPEND_TO,"in"],[k.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Wi),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new k.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(k.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(k.Msg.IN)}},tn={init:function(){var t=[[k.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[k.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Wi),this.appendValueInput("A"),this.appendValueInput("B").appendField(new k.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},en={init:function(){this.setColour(Wi),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},nn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(k.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},sn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=k.Msg.MIXLY_USE,n=k.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=k.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=k.Msg.MIXLY_BELONG;return i+{r:k.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:k.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){k.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},on={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=k.Msg.MIXLY_USE,n=k.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=k.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=k.Msg.MIXLY_BELONG,_=k.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:k.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:k.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},_n={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(k.Msg.MIXPY_TEXT_ENCODE).appendField(new k.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=k.Msg.MIXLY_USE,n=k.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=k.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=k.Msg.MIXLY_BELONG,_=k.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:k.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:k.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},pn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+k.Msg.MIXLY_MICROBIT_TYPE_STRING+k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},an={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=k.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:k.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:k.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:k.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},ln={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(k.Msg.MICROBIT_PYTHON_TYPE)}},rn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(k.Msg.HTML_FILE),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Tn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},dn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},In={init:function(){this.setColour(0),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};k.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const hn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},En={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+k.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},On={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Mn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=k.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+k.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},cn={init:function(){this.setColour(0),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Rn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(k.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return k.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+k.Msg.MIXLY_ESP32_SET+{mkdir:k.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},mn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(k.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},An={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},gn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.HTML_FILE,"isfile"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return k.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+k.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:k.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Ln={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(k.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(k.Msg.MIXLY_SETUP+k.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(k.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Cn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(k.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Sn={init:function(){var t=k.Procedures.findLegalName("",this),e=new k.FieldTextInput(t,k.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new k.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&k.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(k.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(k.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(k.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(k.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=k.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),k.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{k.Events.enable()}},mutationToDom:function(t){var e=k.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(k.Msg.MIXLY_AIP_ATTR).setAlign(k.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rs={init:function(){this.setColour(Is),this.appendDummyInput().appendField(k.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},ms={init:function(){this.setColour(Is),this.appendDummyInput().appendField(k.Msg.HTML_FORM_CONTENT).appendField(new k.FieldDropdown([[k.Msg.HTML_TEXT,"text"],[k.Msg.HTML_EMAIL,"email"],[k.Msg.HTML_NUMBER,"number"],[k.Msg.HTML_PASSWORD,"password"],[k.Msg.HTML_CHECKBOX,"checkbox"],[k.Msg.HTML_RADIOBUTTON,"radiobutton"],[k.Msg.HTML_BUTTON,"button"],[k.Msg.HTML_COLOUR,"colour"],[k.Msg.HTML_DATE,"date"],[k.Msg.HTML_LOCALTIME,"local time"],[k.Msg.HTML_FILE,"file"],[k.Msg.HTML_HIDDEN,"hidden"],[k.Msg.HTML_IMAGE,"image"],[k.Msg.HTML_MONTH,"month"],[k.Msg.HTML_RANGE,"range"],[k.Msg.HTML_RESET,"reset"],[k.Msg.HTML_SEARCH,"search"],[k.Msg.HTML_SUBMIT,"submit"],[k.Msg.HTML_TELEPHONENUMBER,"telephone number"],[k.Msg.HTML_TIME,"time"],[k.Msg.HTML_URL,"url"],[k.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(k.Msg.HTML_NAME).appendField(new k.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(k.Msg.HTML_VALUE).appendField(new k.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(k.Msg.MIXLY_AIP_ATTR).setAlign(k.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},As={init:function(){this.setColour(Is),this.appendDummyInput().appendField(new k.FieldTextInput("property"),"KEY").appendField(":").appendField(new k.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gs={init:function(){this.setColour(Is),this.appendDummyInput().appendField(new k.FieldTextInput("property"),"KEY").appendField(":").appendField(new k.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ls={init:function(){this.setColour(Is),this.appendDummyInput().appendField(k.Msg.HTML_TEXT).appendField(new k.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Cs=160,Ss={init:function(){this.setColour(Cs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new k.FieldTable(""),"TEXT")}},Ds={init:function(){this.setColour(Cs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new k.FieldMultilineInput(""),"TEXT")}},Ns={init:function(){this.setColour(Cs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new k.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Ps={init:function(){this.setColour(Cs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},fs={init:function(){this.setColour(Cs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new k.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Fs={init:function(){this.setColour(Cs),this.appendValueInput("VALUE").appendField(k.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},vs={init:function(){this.setColour(Cs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new k.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(k.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=k.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[k.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[k.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[k.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[k.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[k.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[k.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[k.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[k.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("SER").setCheck("Series").appendField(k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new k.FieldDropdown(i),"DOT"),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new k.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldDropdown(e),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Js={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zs={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zs={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$s={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},to={init:function(){this.setColour(Us);var t=[[k.Msg.PYLAB_LABEL_X,"x"],[k.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SET_LABEL).appendField(new k.FieldDropdown(t),"DIR"),this.appendValueInput("LABEL").appendField(k.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},eo={init:function(){this.setColour(Us),this.appendValueInput("FROM").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.MIXLY_SPLITBYDOU).appendField(k.Msg.MIXPY_DATA_ARRAY_CREATE_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.MIXPY_DATA_ARRAY_CREATE_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.MIXLY_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},io={init:function(){this.setColour(Us);var t=[[k.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[k.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(k.Msg.MIXLY_DISPLAY_DRAW).appendField(new k.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{plot:k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:k.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[t]}))}},no={init:function(){this.setColour(Us);var t=[[k.Msg.COLOUR_RGB_BLUE,"b"],[k.Msg.COLOUR_RGB_GREEN,"g"],[k.Msg.COLOUR_RGB_RED,"r"],[k.Msg.COLOUR_CYAN,"c"],[k.Msg.COLOUR_MAGENTA,"m"],[k.Msg.COLOUR_YELLOW,"y"],[k.Msg.COLOUR_BLACK,"k"],[k.Msg.COLOUR_WHITE,"w"]],e=[[k.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[k.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[k.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[k.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[k.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[k.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[k.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[k.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[k.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[k.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[k.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_SCATTER).appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(k.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new k.FieldDropdown(e),"DOT"),this.appendDummyInput("").appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},so={init:function(){this.setColour(Us);var t=[[k.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[k.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[k.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[k.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[k.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[k.Msg.COLOUR_RGB_BLUE,"b"],[k.Msg.COLOUR_RGB_GREEN,"g"],[k.Msg.COLOUR_RGB_RED,"r"],[k.Msg.COLOUR_CYAN,"c"],[k.Msg.COLOUR_MAGENTA,"m"],[k.Msg.COLOUR_YELLOW,"y"],[k.Msg.COLOUR_BLACK,"k"],[k.Msg.COLOUR_WHITE,"w"]],i=[[k.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[k.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[k.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[k.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[k.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[k.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[k.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[k.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[k.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[k.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[k.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_PLOT_XY).appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new k.FieldDropdown(i),"DOT"),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new k.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},oo={init:function(){this.setColour(Us);var t=[[k.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[k.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_BAR).appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(k.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(k.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new k.FieldDropdown(t),"ALIGN"),this.appendDummyInput().appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},_o={init:function(){this.setColour(Us);var t=[[k.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[k.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],e=[[k.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[k.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[k.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[k.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_PIE).appendField(k.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(k.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(k.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new k.FieldDropdown(e),"autopct"),this.appendDummyInput("").appendField(k.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new k.FieldDropdown(t),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},po={init:function(){this.setColour(Us),this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_HIST).appendField(k.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(k.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},uo={init:function(){this.setColour(Us);var t=[[k.Msg.PYLAB_LABEL_X,"x"],[k.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(k.Msg.MIXLY_SETTING).appendField(new k.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_TICKS).appendField(k.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},ao={init:function(){var t=[["sin","sin"],["cos","cos"],["tan","tan"],["arcsin","arcsin"],["arccos","arccos"],["arctan","arctan"],[k.Msg.LANG_MATH_TO_ROUND,"round"],[k.Msg.LANG_MATH_TO_CEIL,"ceil"],[k.Msg.LANG_MATH_TO_FLOOR,"floor"]];this.setColour(Us),this.setOutput(!0),this.setInputsInline(!0),this.appendDummyInput().appendField(k.Msg.mixpy_NUMPY_TRIG),this.appendValueInput("NUM").setCheck(Number).appendField(new k.FieldDropdown(t),"OP"),this.setTooltip(k.Msg.mixpy_NUMPY_TRIG_TOOLTIP)}},lo={init:function(){this.setColour(Us),this.appendValueInput("VET").setCheck(Number).appendField(k.Msg.mixpy_SUBPLOT).appendField(k.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(k.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(k.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},ro={init:function(){this.setColour(Us),this.appendValueInput("FILENAME").appendField(k.Msg.MIXPY_PANDAS_READ_CSV),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.mixpy_PANDAS_READCSV_HEADER_Y,"0"],[k.Msg.mixpy_PANDAS_READCSV_HEADER_N,"None"]]),"MODE"),this.appendDummyInput().appendField(k.Msg.mixpy_PANDAS_READCSV_TITLE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(k.Msg.mixpy_PANDAS_READCSV_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){k.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},To={init:function(){this.setColour(Us),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(k.Msg.mixpy_DATAFRAME_GET),this.appendDummyInput("").appendField(k.Msg.mixpy_DATAFRAME_GET_INDEX).appendField(new k.FieldDropdown([[k.Msg.DATAFRAME_COLUMN,"column"],[k.Msg.DATAFRAME_RAW,"raw"]]),"MODE"),this.setOutput(!0),this.setTooltip(k.Msg.mixpy_DATAFRAME_GET_TOOLTIP)}},Io={init:function(){this.setColour(Us),this.appendValueInput("FILE").setCheck(String).appendField(k.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(k.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},ho={init:function(){this.setColour(Us);var t=[[k.Msg.TEXT_TRIM_LEFT,"right"],[k.Msg.mixpy_PL_TEXT_CENTER,"center"],[k.Msg.TEXT_TRIM_RIGHT,"left"]],e=[[k.Msg.mixpy_PL_TEXT_TOP,"bottom"],[k.Msg.mixpy_PL_TEXT_CENTER,"center"],[k.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(k.Msg.MIXLY_SETTING).appendField(k.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(k.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(k.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(k.Msg.mixpy_PL_TEXT_HOR).appendField(new k.FieldDropdown(t),"HALIGN"),this.appendDummyInput("").appendField(k.Msg.mixpy_PL_TEXT_VER).appendField(new k.FieldDropdown(e),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(k.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PL_TEXT_TOOLTIP)}},Eo={init:function(){this.setColour(Us),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOARRAY),this.setOutput(!0,"List"),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOARRAY)}},Oo={init:function(){this.setColour(Us),this.appendValueInput("SER").setCheck("Series").appendField(k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_PLOT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Mo={init:function(){this.setColour(Us);var t=[[k.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[k.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[k.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[k.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[k.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[k.Msg.COLOUR_RGB_BLUE,"b"],[k.Msg.COLOUR_RGB_GREEN,"g"],[k.Msg.COLOUR_RGB_RED,"r"],[k.Msg.COLOUR_CYAN,"c"],[k.Msg.COLOUR_MAGENTA,"m"],[k.Msg.COLOUR_YELLOW,"y"],[k.Msg.COLOUR_BLACK,"k"],[k.Msg.COLOUR_WHITE,"w"]],i=[[k.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[k.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[k.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("SER").setCheck("Series").appendField(k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new k.FieldDropdown(i),"DOT"),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new k.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldDropdown(e),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},co={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ro={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mo={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ao={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},go={init:function(){this.setColour(Us);var t=[[k.Msg.PYLAB_LABEL_X,"x"],[k.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SET_LABEL).appendField(new k.FieldDropdown(t),"DIR"),this.appendValueInput("LABEL").appendField(k.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Lo={init:function(){this.setColour(Us);var t=[[k.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[k.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(k.Msg.MIXLY_DISPLAY_DRAW).appendField(new k.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{plot:k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:k.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[t]}))}},Co={init:function(){this.setColour(Us);var t=[[k.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[k.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[k.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_SCATTER).appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(k.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new k.FieldDropdown(t),"DOT"),this.appendDummyInput().appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},So={init:function(){this.setColour(Us);var t=[[k.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[k.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[k.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[k.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[k.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[k.Msg.COLOUR_RGB_BLUE,"b"],[k.Msg.COLOUR_RGB_GREEN,"g"],[k.Msg.COLOUR_RGB_RED,"r"],[k.Msg.COLOUR_CYAN,"c"],[k.Msg.COLOUR_MAGENTA,"m"],[k.Msg.COLOUR_YELLOW,"y"],[k.Msg.COLOUR_BLACK,"k"],[k.Msg.COLOUR_WHITE,"w"]],i=[[k.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[k.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[k.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_PLOT_XY).appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new k.FieldDropdown(i),"DOT"),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new k.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Do={init:function(){this.setColour(Us);var t=[[k.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[k.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_BAR).appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(k.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(k.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new k.FieldDropdown(t),"ALIGN"),this.appendDummyInput().appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},No={init:function(){this.setColour(Us);var t=[[k.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[k.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],e=[[k.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[k.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[k.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[k.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_PIE).appendField(k.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(k.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(k.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new k.FieldDropdown(e),"autopct"),this.appendDummyInput("").appendField(k.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new k.FieldDropdown(t),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Po={init:function(){this.setColour(Us),this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_HIST).appendField(k.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(k.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},fo={init:function(){this.setColour(Us);var t=[[k.Msg.PYLAB_LABEL_X,"x"],[k.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(k.Msg.MIXLY_SETTING).appendField(new k.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_TICKS).appendField(k.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},Fo={init:function(){this.setColour(Us),this.appendValueInput("VET").setCheck(Number).appendField(k.Msg.mixpy_SUBPLOT).appendField(k.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(k.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(k.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},vo={init:function(){this.setColour(Us),this.appendDummyInput("").appendField(k.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(k.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},Vo={init:function(){this.setColour(Us);var t=[[k.Msg.TEXT_TRIM_LEFT,"right"],[k.Msg.mixpy_PL_TEXT_CENTER,"center"],[k.Msg.TEXT_TRIM_RIGHT,"left"]],e=[[k.Msg.mixpy_PL_TEXT_TOP,"bottom"],[k.Msg.mixpy_PL_TEXT_CENTER,"center"],[k.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(k.Msg.MIXLY_SETTING).appendField(k.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(k.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(k.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(k.Msg.mixpy_PL_TEXT_HOR).appendField(new k.FieldDropdown(t),"HALIGN"),this.appendDummyInput("").appendField(k.Msg.mixpy_PL_TEXT_VER).appendField(new k.FieldDropdown(e),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(k.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PL_TEXT_TOOLTIP)}},Yo=20,yo={init:function(){this.setColour(Yo),this.appendValueInput("VAR").appendField(k.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(k.Msg.INOUT_input_TOOLTIP)}},bo={init:function(){this.setColour(Yo),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(k.Msg.BLOCKPY_PRINT_TOOLTIP)}},ko={init:function(){this.setColour(Yo),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(k.Msg.TEXT_PRINT_TOOLTIP)}},Xo={init:function(){this.setColour(Yo),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SERIAL_PRINT),this.appendValueInput("END").appendField(k.Msg.MIXLY_ENDSWITH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_INOUT_PRINT_END_TOOLTIP)}},Uo={init:function(){var t=[[k.Msg.LANG_MATH_STRING,"str"],[k.Msg.LANG_MATH_INT,"int"],[k.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Yo),this.appendDummyInput("").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new k.FieldDropdown(t),"DIR"),this.appendValueInput("VAR").appendField(k.Msg.PROCEDURES_MUTATORCONTAINER_TITLE).setCheck(String),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{str:k.Msg.MIXLY_MIXPY_INOUT_STR_INPUT_TOOLTIP,int:k.Msg.MIXLY_MIXPY_INOUT_INT_INPUT_TOOLTIP,float:k.Msg.MIXLY_MIXPY_INOUT_FLOAT_INPUT_TOOLTIP}[t]}))}},Go={init:function(){this.setColour(Yo),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new k.icons.MutatorIcon(["inout_print_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.MIXLY_MIXPY_INOUT_PRINT_MANY_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("inout_print_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n0?t:[["'无可用地图'","'无可用地图'"]]}},np={init:function(){this.appendValueInput("pathtype").setCheck(null).appendField(k.Msg.MIXLY_GAME_SETPATHTYPE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},sp={init:function(){this.imgArr=this.getLocalImg(),this.appendDummyInput().appendField(new k.FieldDropdown(this.getLocalImg()),"type"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")},onchange:function(){let t=this.getFieldValue("type"),e=this.imgArr;this.haveNewSrc(this.imgArr,e)&&(this.imgArr=e,this.getField("type").menuGenerator_=this.imgArr,this.checkSrc(t,this.imgArr)?this.setFieldValue(t,"type"):this.setFieldValue(this.imgArr[0][1],"type"))},haveNewSrc:function(t,e){if(t.length!==e.length)return!0;for(var i=0;i0?t:[["'无可用路径'","'无可用路径'"]]}},op={init:function(){this.setColour(290),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("posx").setCheck(null).appendField(k.Msg.TEXT_APPEND_TO+"("),this.appendDummyInput().appendField(","),this.appendValueInput("posy").setCheck(null).appendField(""),this.appendDummyInput().appendField(")"+k.Msg.MIXLY_GAME_LAY).appendField(new k.FieldDropdown([[k.Msg.MIXLY_GAME_WALL,"'wall'"],[k.Msg.MIXLY_GAME_BARRIER,"'barrier'"],[k.Msg.MIXLY_GAME_COIN,"'coin'"],[k.Msg.MIXLY_GAME_REDMARKER,"'redmarker'"],[k.Msg.MIXLY_GAME_YELLOWMARKER,"'yellowmarker'"],[k.Msg.MIXLY_GAME_BLUEMARKER,"'bluemarker'"],[k.Msg.MIXLY_GAME_GREENMARKER,"'greenmarker'"]]),"item"),this.setTooltip("")}},_p={init:function(){this.imgArr=this.getLocalImg(),this.appendDummyInput().appendField(new k.FieldDropdown(this.getLocalImg()),"type"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")},onchange:function(){let t=this.getFieldValue("type"),e=this.imgArr;this.haveNewSrc(this.imgArr,e)&&(this.imgArr=e,this.getField("type").menuGenerator_=this.imgArr,this.checkSrc(t,this.imgArr)?this.setFieldValue(t,"type"):this.setFieldValue(this.imgArr[0][1],"type"))},haveNewSrc:function(t,e){if(t.length!==e.length)return!0;for(var i=0;i0?t:[["'无可用角色'","'无可用角色'"]]}},pp={init:function(){this.setColour(290),this.appendValueInput("character").setCheck(null).appendField(k.Msg.MIXLY_GAME_INIT_CHARA),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_FACE+k.Msg.MIXLY_GAME_RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},up={init:function(){this.setColour(290),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_GETPOINT),this.setOutput(!0,Number),this.setTooltip("")}},ap={init:function(){this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_GAME_UP,"0"],[k.Msg.MIXLY_GAME_DOWN,"2"],[k.Msg.MIXLY_GAME_LEFT,"3"],[k.Msg.MIXLY_GAME_RIGHT,"1"]]),"direction"),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_ISBARRIER),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},lp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_RE_SPIRITE).appendField(new k.FieldDropdown([[k.Msg.MIXLY_GAME_FORWARD,"f"],[k.Msg.MIXLY_GAME_BACKWARD,"b"],[k.Msg.MIXLY_GAME_LEFT,"l"],[k.Msg.MIXLY_GAME_RIGHT,"r"]]),"direction"),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_ISBARRIER),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},rp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_RANDOMCAROIL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},Tp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_NEEDOIL),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},dp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_ISGREEN),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},Ip={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_ADDOIL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},hp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_CHECKCIRCURIGHT),this.setPreviousStatement(!0),this.setColour(290),this.setTooltip("")}},Ep={init:function(){this.setColour(290),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_CHECK_WHETHER_PASS),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_GAME_REDMARKER,"'redmarker'"],[k.Msg.MIXLY_GAME_YELLOWMARKER,"'yellowmarker'"],[k.Msg.MIXLY_GAME_BLUEMARKER,"'bluemarker'"],[k.Msg.MIXLY_GAME_GREENMARKER,"'greenmarker'"]]),"marker"),this.appendDummyInput().appendField("?"),this.setInputsInline(!0),this.setOutput(!0,null),this.setTooltip("")}},Op={init:function(){this.setColour(290),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_GET_MARKER_NUM),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_GAME_REDMARKER,"'redmarker'"],[k.Msg.MIXLY_GAME_YELLOWMARKER,"'yellowmarker'"],[k.Msg.MIXLY_GAME_BLUEMARKER,"'bluemarker'"],[k.Msg.MIXLY_GAME_GREENMARKER,"'greenmarker'"]]),"marker"),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_NUMBER_OF_MARKER),this.setInputsInline(!0),this.setOutput(!0,null),this.setTooltip("")}},Mp={init:function(){this.setColour(290),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("posx").setCheck(null).appendField(k.Msg.TEXT_APPEND_TO+"("),this.appendDummyInput().appendField(","),this.appendValueInput("posy").setCheck(null).appendField(""),this.appendDummyInput().appendField(")"+k.Msg.TEXT_GET_INDEX_RANDOM+k.Msg.MIXLY_GAME_LAY+k.Msg.MIXLY_GAME_BARRIER),this.setTooltip("")}},cp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_INIT_AS).appendField(new k.FieldDropdown([[k.Msg.MIXLY_GAME_ONE,"0"],[k.Msg.MIXLY_GAME_TWO,"1"],[k.Msg.MIXLY_GAME_THREE,"2"],[k.Msg.MIXLY_GAME_FOUR,"3"],[k.Msg.MIXLY_GAME_FIVE,"4"],[k.Msg.MIXLY_GAME_SIX,"5"],[k.Msg.MIXLY_GAME_SEVEN,"6"],[k.Msg.MIXLY_GAME_EIGHT,"7"],[k.Msg.MIXLY_GAME_NINE,"8"],[k.Msg.MIXLY_GAME_TEN,"9"],[k.Msg.MIXLY_GAME_ELE,"10"],[k.Msg.MIXLY_GAME_TWEL,"11"],[k.Msg.MIXLY_GAME_THIR,"12"],[k.Msg.MIXLY_GAME_FORT,"13"],[k.Msg.MIXLY_GAME_FIFT,"14"],[k.Msg.MIXLY_GAME_SIXT,"15"],[k.Msg.MIXLY_GAME_SEVENT,"16"]]),"level"),this.setInputsInline(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},Rp={init:function(){this.appendValueInput("N").setCheck(null).setAlign(k.inputs.Align.LEFT).appendField("二分法查找书籍").appendField("N"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},mp={init:function(){this.appendValueInput("N").setCheck(null).setAlign(k.inputs.Align.LEFT).appendField("顺序法查找书籍").appendField("N"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},Ap=function(t,e){return[e.variableDB_.getName(this.getFieldValue("VAR"),k.Variables.NAME_TYPE),e.ORDER_ATOMIC]},gp=function(t,e){if(""==this.getFieldValue("VAR"))return" = None\n";var i=e.valueToCode(this,"VALUE",e.ORDER_ASSIGNMENT)||"None";return e.variableDB_.getName(this.getFieldValue("VAR"),k.Variables.NAME_TYPE)+" = "+i+"\n"},Lp=function(t,e){var i=this.getFieldValue("OP"),n=e.valueToCode(this,"MYVALUE",e.ORDER_ATOMIC)||"None";if("bytes"==i)var s=i+"("+n+',"UTF-8")';else s=i+"("+n+")";return[s,e.ORDER_ATOMIC]},Cp=function(t,e){return"global "+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"None")+"\n"},Sp=function(t,e){return["type("+(e.valueToCode(this,"DATA",e.ORDER_ATOMIC)||"None")+")",e.ORDER_ATOMIC]},Dp=function(t,e){return[this.getFieldValue("type"),e.ORDER_ATOMIC]},Np=function(t,e){for(var i=new Array(this.itemCount_),n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+u()+"("+t+", "+e+", "+i+") or "+a()+"("+t+", "+e+", "+i+")"},k.isNumber(n)&&k.isNumber(s)&&k.isNumber(o))n=parseFloat(n),s=parseFloat(s),o=Math.abs(parseFloat(o)),0==n%1&&0==s%1&&0==o%1?(n<=s?(s++,t=0==n&&1==o?s:n+", "+s,1!=o&&(t+=", "+o)):t=n+", "+--s+", -"+o,t="range("+t+")"):(t=n",GTE:">="};const al=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",o=e.valueToCode(this,"B",n)||"False";if("AND"==i)var _=s+" and "+o;else if("OR"==i)_=s+" or "+o;else if("NOR"==i)_="not("+s+"^"+o+")";else _=s+"^"+o;return[_,n]},ll=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},rl=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Tl=function(t,e){return["None",e.ORDER_ATOMIC]},dl=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},Il=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},hl=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},El=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Ol=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Ml=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},cl=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Rl=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ml=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Al=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},gl=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ll=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Cl=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Sl=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},Dl=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Nl=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Pl=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},fl=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Fl=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},vl=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},Vl=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Yl=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},yl=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},bl=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},kl=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},Xl=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Ul=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},Gl=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),k.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var o=[],_=0;_\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},mr=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Ar=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},gr=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Lr=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Cr=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Sr=function(t,e){return'"},Dr=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Nr=function(){return this.getFieldValue("TEXT")+"\n"},Pr=function(t){return t.getFieldValue("TEXT")+"\n"},fr=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Fr=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},vr=function(){return""},Vr=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Yr=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o=0&&(n[s]=n[s].replace(" ",""));i="";for(s=0;s{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{controls_type:()=>Z,controls_typeLists:()=>z,lists_zip:()=>$,lists_zip_container:()=>tt,lists_zip_item:()=>et,unpack_iterable_object:()=>it,variables_change:()=>Q,variables_get:()=>j,variables_global:()=>J,variables_set:()=>q});var i={};t.r(i),t.d(i,{base_setup:()=>ot,controls_delay:()=>_t,controls_end_program:()=>pt,controls_except:()=>Rt,controls_finally:()=>mt,controls_flow_statements:()=>dt,controls_for:()=>It,controls_forEach:()=>lt,controls_for_range:()=>ht,controls_if:()=>ut,controls_if_else:()=>Mt,controls_if_elseif:()=>Ot,controls_if_if:()=>Et,controls_lambda:()=>gt,controls_main:()=>st,controls_pass:()=>Lt,controls_range:()=>at,controls_repeat_ext:()=>At,controls_thread:()=>Ct,controls_try:()=>ct,controls_try_finally:()=>Tt,controls_whileUntil:()=>rt,datetime_fromtimestamp:()=>Ft,do_while:()=>St,garbage_collection:()=>Dt,gene_unique_identifier:()=>vt,get_mem_alloc:()=>Nt,get_mem_free:()=>Pt,get_unique_identifier:()=>ft});var n={};t.r(n),t.d(n,{base_map:()=>$t,generate_cartesian_product:()=>ee,math_arithmetic:()=>kt,math_bit:()=>Ut,math_constant:()=>yt,math_constant_mp:()=>bt,math_constrain:()=>Kt,math_dec:()=>Bt,math_degree_to_radian:()=>ne,math_indexer_number:()=>qt,math_map:()=>jt,math_max_min:()=>wt,math_number:()=>Yt,math_number_base_conversion:()=>Ht,math_radian_to_degree:()=>ie,math_random:()=>Wt,math_random_seed:()=>Qt,math_round:()=>Jt,math_selfcalcu:()=>Xt,math_to_int:()=>xt,math_trig:()=>Gt,text_to_number:()=>Zt,text_to_number_skulpt:()=>zt,turn_to_int:()=>te});var s={};t.r(s),t.d(s,{ascii_to_char:()=>ae,char_to_ascii:()=>le,number_to_text:()=>re,os_system:()=>be,text:()=>oe,text_capital:()=>Re,text_center:()=>me,text_char:()=>pe,text_char_at:()=>Ie,text_char_at2:()=>de,text_char_at3:()=>ve,text_compareTo:()=>Fe,text_compare_to:()=>ce,text_create_with_container:()=>Ne,text_create_with_item:()=>Pe,text_encode:()=>Ye,text_equals_starts_ends:()=>Me,text_eval:()=>ye,text_find:()=>Ae,text_format:()=>De,text_format_noreturn:()=>Ve,text_join:()=>ue,text_join_seq:()=>ge,text_length:()=>Te,text_random_char:()=>he,text_replace:()=>Le,text_split:()=>Ce,text_strip:()=>Se,text_substring:()=>Oe,text_substring2:()=>Ee,text_substring3:()=>fe,text_textarea:()=>_e});var o={};t.r(o),t.d(o,{ENUMERATE:()=>Mi,content_in_lists:()=>Ri,enumerate:()=>ci,list_many_input:()=>oi,list_tolist:()=>ai,list_tolist2:()=>Oi,list_trig:()=>ii,lists_2d_get_col_row_data:()=>Be,lists_2d_get_data_with_col_row:()=>Ge,lists_append_extend:()=>je,lists_change_to:()=>si,lists_change_to_general:()=>pi,lists_clear:()=>ze,lists_create_with:()=>xe,lists_create_with2:()=>li,lists_create_with_container:()=>He,lists_create_with_item:()=>We,lists_create_with_noreturn:()=>_i,lists_create_with_text:()=>we,lists_create_with_text2:()=>ri,lists_del_general:()=>ui,lists_find:()=>ei,lists_getIndex3:()=>Ti,lists_getSublist3:()=>di,lists_get_index:()=>Xe,lists_get_random_item:()=>qe,lists_get_random_sublist:()=>Qe,lists_get_sublist:()=>Ue,lists_insert_value:()=>Je,lists_insert_value2:()=>hi,lists_pop:()=>ti,lists_remove_at:()=>$e,lists_remove_at2:()=>Ei,lists_reverse:()=>Ze,lists_setIndex3:()=>Ii,lists_set_index:()=>Ke,lists_sort:()=>ni});var _={};t.r(_),t.d(_,{dicts_add_change_del:()=>bi,dicts_add_or_change:()=>Ni,dicts_clear:()=>Fi,dicts_create_with:()=>Ai,dicts_create_with_container:()=>gi,dicts_create_with_item:()=>Li,dicts_create_with_noreturn:()=>Ui,dicts_deldict:()=>yi,dicts_delete:()=>Pi,dicts_get:()=>Si,dicts_get_default:()=>Di,dicts_items:()=>vi,dicts_keys:()=>Ci,dicts_length:()=>Yi,dicts_pop:()=>ki,dicts_setdefault:()=>Xi,dicts_to_json:()=>Bi,dicts_to_json2:()=>Hi,dicts_to_to:()=>wi,dicts_todict:()=>Gi,dicts_update:()=>fi,dicts_values:()=>Vi,json_to_dicts:()=>xi});var p={};t.r(p),t.d(p,{logic_boolean:()=>Ji,logic_compare:()=>Ki,logic_compare_continous:()=>ji,logic_is:()=>tn,logic_is_in:()=>$i,logic_negate:()=>Qi,logic_null:()=>Zi,logic_operation:()=>qi,logic_tobool:()=>en,logic_true_or_false:()=>zi});var u={};t.r(u),t.d(u,{sdcard_mount:()=>Cn,sdcard_use_spi_init:()=>Ln,storage_can_write_ornot:()=>rn,storage_change_dir:()=>An,storage_close_file:()=>dn,storage_delete_file:()=>hn,storage_file_seek:()=>Mn,storage_file_tell:()=>On,storage_file_write:()=>pn,storage_fileopen:()=>sn,storage_fileopen_new:()=>on,storage_fileopen_new_encoding:()=>_n,storage_get_a_line:()=>ln,storage_get_contents:()=>an,storage_get_contents_without_para:()=>un,storage_get_current_dir:()=>cn,storage_get_file_size:()=>En,storage_get_filename:()=>Tn,storage_is_file:()=>gn,storage_list_all_files:()=>In,storage_make_dir:()=>Rn,storage_open_file_with_os:()=>nn,storage_rename:()=>mn});var a={};t.r(a),t.d(a,{procedures_callnoreturn:()=>fn,procedures_callreturn:()=>Fn,procedures_defnoreturn:()=>Sn,procedures_defreturn:()=>Dn,procedures_ifreturn:()=>vn,procedures_mutatorarg:()=>Pn,procedures_mutatorcontainer:()=>Nn,procedures_return:()=>Vn});var l={};t.r(l),t.d(l,{tuple_change_to:()=>Wn,tuple_create_with:()=>yn,tuple_create_with_container:()=>bn,tuple_create_with_item:()=>kn,tuple_create_with_noreturn:()=>Qn,tuple_create_with_text2:()=>Xn,tuple_create_with_text_return:()=>Un,tuple_del:()=>xn,tuple_find:()=>Kn,tuple_getIndex:()=>Gn,tuple_getSublist:()=>qn,tuple_get_random_item:()=>Zn,tuple_get_sublist:()=>Jn,tuple_input:()=>$n,tuple_join:()=>wn,tuple_length:()=>Bn,tuple_max:()=>Hn,tuple_totuple:()=>zn,tuple_trig:()=>jn});var r={};t.r(r),t.d(r,{set_add_discard:()=>as,set_clear:()=>_s,set_create_with:()=>es,set_create_with_container:()=>is,set_create_with_item:()=>ns,set_create_with_text_return:()=>Ts,set_length:()=>ss,set_operate:()=>ps,set_operate_update:()=>us,set_pop:()=>os,set_sub:()=>ls,set_toset:()=>ds,set_update:()=>rs});var T={};t.r(T),t.d(T,{html_content:()=>Ms,html_content_more:()=>cs,html_document:()=>hs,html_form:()=>ms,html_head_body:()=>Os,html_style:()=>Rs,html_style_color:()=>gs,html_style_content:()=>As,html_text:()=>Ls,html_title:()=>Es});var d={};t.r(d),t.d(d,{attribute_access:()=>Xs,function_call:()=>ys,function_call_container:()=>bs,function_call_item:()=>ks,raw_block:()=>Ds,raw_empty:()=>Ps,raw_expression:()=>Ns,raw_table:()=>Ss,text_comment:()=>fs,text_print_multiple:()=>vs,text_print_multiple_container:()=>Vs,text_print_multiple_item:()=>Ys,type_check:()=>Fs});var I={};t.r(I),t.d(I,{array_create:()=>eo,array_toarray:()=>Eo,dataframe_create:()=>xs,dataframe_create_from_index:()=>Hs,dataframe_create_from_one_index:()=>ws,dataframe_get:()=>To,numpy_trig:()=>ao,pandas_readcsv:()=>ro,pl_axes:()=>Zs,pl_bar:()=>oo,pl_hist:()=>po,pl_label:()=>to,pl_legend:()=>zs,pl_pie:()=>_o,pl_plot:()=>Qs,pl_plot_bar:()=>io,pl_plot_easy:()=>qs,pl_plot_scatter:()=>no,pl_plot_xy:()=>so,pl_savefig:()=>Io,pl_show:()=>Js,pl_subplot:()=>lo,pl_text:()=>ho,pl_ticks:()=>uo,pl_title:()=>$s,plot_axes:()=>Ro,plot_bar:()=>Do,plot_hist:()=>Po,plot_label:()=>go,plot_legend:()=>mo,plot_pie:()=>No,plot_plot:()=>Mo,plot_plot_bar:()=>Lo,plot_plot_easy:()=>Oo,plot_plot_scatter:()=>Co,plot_plot_xy:()=>So,plot_savefig:()=>vo,plot_show:()=>co,plot_subplot:()=>Fo,plot_text:()=>Vo,plot_ticks:()=>fo,plot_title:()=>Ao,series_create:()=>Gs,series_create_from_index:()=>Bs,series_create_from_text:()=>Ws,series_get_num:()=>js,series_index_value:()=>Ks});var h={};t.r(h),t.d(h,{inout_input:()=>yo,inout_print:()=>bo,inout_print_container:()=>Bo,inout_print_end:()=>Xo,inout_print_inline:()=>ko,inout_print_item:()=>xo,inout_print_many:()=>Go,inout_type_input:()=>Uo});var E={};t.r(E),t.d(E,{Panic_with_status_code:()=>jo,base_delay:()=>Ho,controls_millis:()=>Wo,controls_mstimer2:()=>Qo,controls_mstimer2_start:()=>Jo,controls_mstimer2_stop:()=>Zo,reset:()=>qo,time_localtime:()=>Ko,time_sleep:()=>zo});var O={};t.r(O),t.d(O,{turtle_bgcolor:()=>c_,turtle_bgcolor_hex:()=>N_,turtle_bgcolor_hex_new:()=>g_,turtle_circle:()=>E_,turtle_circle_advanced:()=>O_,turtle_clear:()=>l_,turtle_clone:()=>A_,turtle_color:()=>S_,turtle_color_hex:()=>D_,turtle_color_seclet:()=>X_,turtle_create:()=>t_,turtle_done:()=>e_,turtle_exitonclick:()=>i_,turtle_fill:()=>T_,turtle_fillcolor:()=>m_,turtle_fillcolor_hex:()=>f_,turtle_fillcolor_hex_new:()=>C_,turtle_getscreen:()=>U_,turtle_goto:()=>p_,turtle_listen:()=>w_,turtle_move:()=>n_,turtle_numinput:()=>V_,turtle_onclick:()=>B_,turtle_onkey:()=>G_,turtle_ontimer:()=>x_,turtle_pencolor:()=>R_,turtle_pencolor_hex:()=>P_,turtle_pencolor_hex_new:()=>L_,turtle_penup:()=>r_,turtle_pos_shape:()=>a_,turtle_rotate:()=>s_,turtle_screen_delay:()=>__,turtle_screen_savefig:()=>H_,turtle_setheading:()=>o_,turtle_setxy:()=>u_,turtle_shape:()=>F_,turtle_shapesize:()=>v_,turtle_size:()=>I_,turtle_size_speed:()=>d_,turtle_speed:()=>h_,turtle_textinput:()=>Y_,turtle_visible:()=>M_,turtle_write:()=>y_,turtle_write_format:()=>b_,turtle_write_format_skulpt:()=>k_});var M={};t.r(M),t.d(M,{Turn:()=>J_,addOil:()=>Ip,checkMarker:()=>Ep,find_books_by_dichotomy:()=>Rp,find_books_by_sequence:()=>mp,game_get_character_img:()=>_p,game_get_local_img:()=>ip,game_get_path_img:()=>sp,game_init:()=>j_,getMarkerNum:()=>Op,get_actor_point:()=>up,initSettedMap:()=>K_,initialize:()=>pp,isBarrier:()=>ap,isCirculationRight:()=>hp,isDone:()=>Z_,isLightGreen:()=>dp,isOilFull:()=>Tp,isPath:()=>z_,is_Related_Barrier:()=>lp,is_Related_Path:()=>$_,move_direction_steps:()=>q_,move_related_to_spirite:()=>Q_,place_item:()=>op,randomOil:()=>rp,randomPlaceBarrier:()=>Mp,set_map:()=>ep,set_map_bg:()=>tp,set_pathtype:()=>np,settedSimpleMap:()=>cp});var c={};t.r(c),t.d(c,{controls_type:()=>Sp,controls_typeLists:()=>Dp,lists_zip:()=>Np,unpack_iterable_object:()=>Pp,variables_change:()=>Lp,variables_get:()=>Ap,variables_global:()=>Cp,variables_set:()=>gp});var R={};t.r(R),t.d(R,{Panic_with_status_code:()=>Up,base_setup:()=>Fp,controls_delay:()=>Xp,controls_flow_statements:()=>kp,controls_for:()=>Yp,controls_forEach:()=>Hp,controls_for_range:()=>yp,controls_if:()=>vp,controls_interrupts:()=>xp,controls_lambda:()=>Kp,controls_main:()=>fp,controls_millis:()=>Gp,controls_nointerrupts:()=>wp,controls_pass:()=>qp,controls_range:()=>Wp,controls_repeat:()=>iu,controls_repeat_ext:()=>Zp,controls_thread:()=>Qp,controls_try_finally:()=>Vp,controls_whileUntil:()=>bp,datetime_fromtimestamp:()=>nu,do_while:()=>Jp,garbage_collection:()=>zp,gene_unique_identifier:()=>su,get_mem_alloc:()=>$p,get_mem_free:()=>tu,get_unique_identifier:()=>eu,reset:()=>Bp,time_sleep:()=>jp});var m={};t.r(m),t.d(m,{base_map:()=>Cu,generate_cartesian_product:()=>Du,math_arithmetic:()=>au,math_bit:()=>uu,math_constant:()=>_u,math_constant_mp:()=>pu,math_constrain:()=>Mu,math_dec:()=>du,math_degree_to_radian:()=>Pu,math_indexer_number:()=>mu,math_map:()=>Ou,math_max_min:()=>hu,math_number:()=>ou,math_number_base_conversion:()=>cu,math_radian_to_degree:()=>Nu,math_random:()=>Eu,math_random_seed:()=>Ru,math_round:()=>Au,math_selfcalcu:()=>lu,math_single:()=>ru,math_to_int:()=>Iu,math_trig:()=>Tu,text_to_number:()=>gu,text_to_number_skulpt:()=>Lu,turn_to_int:()=>Su});var A={};t.r(A),t.d(A,{ascii_to_char:()=>Yu,char_to_ascii:()=>yu,number_to_text:()=>bu,os_system:()=>oa,text:()=>fu,text_capital:()=>Wu,text_center:()=>Ku,text_char:()=>vu,text_char_at:()=>Uu,text_char_at2:()=>Xu,text_char_at3:()=>ia,text_compareTo:()=>ea,text_compare_to:()=>xu,text_encode:()=>na,text_equals_starts_ends:()=>Bu,text_eval:()=>sa,text_find:()=>ju,text_format:()=>zu,text_format_noreturn:()=>$u,text_join:()=>Vu,text_join_seq:()=>qu,text_length:()=>ku,text_random_char:()=>Gu,text_replace:()=>Qu,text_split:()=>Ju,text_strip:()=>Zu,text_substring:()=>Hu,text_substring2:()=>wu,text_substring3:()=>ta,text_textarea:()=>Fu});var g={};t.r(g),t.d(g,{content_in_lists:()=>Ua,enumerate:()=>Xa,list_many_input:()=>Ca,list_tolist:()=>ba,list_tolist2:()=>ka,list_trig:()=>Aa,lists_2d_get_col_row_data:()=>ua,lists_2d_get_data_with_col_row:()=>pa,lists_append_extend:()=>da,lists_change_to:()=>La,lists_change_to_general:()=>Da,lists_clear:()=>Ma,lists_create_with:()=>aa,lists_create_with2:()=>Pa,lists_create_with_noreturn:()=>Sa,lists_create_with_text:()=>la,lists_create_with_text2:()=>fa,lists_del_general:()=>Na,lists_find:()=>ca,lists_getIndex3:()=>Fa,lists_getSublist3:()=>va,lists_get_index:()=>ra,lists_get_random_item:()=>Ia,lists_get_random_sublist:()=>ha,lists_get_sublist:()=>_a,lists_insert_value:()=>Ea,lists_insert_value2:()=>Ya,lists_pop:()=>ma,lists_remove_at:()=>Ra,lists_remove_at2:()=>ya,lists_reverse:()=>Oa,lists_setIndex3:()=>Va,lists_set_index:()=>Ta,lists_sort:()=>ga});var L={};t.r(L),t.d(L,{dicts_add_change_del:()=>za,dicts_add_or_change:()=>Ha,dicts_clear:()=>ja,dicts_create_with:()=>Ga,dicts_create_with_noreturn:()=>el,dicts_deldict:()=>Za,dicts_delete:()=>Wa,dicts_get:()=>xa,dicts_get_default:()=>wa,dicts_items:()=>qa,dicts_keys:()=>Ba,dicts_length:()=>Ja,dicts_pop:()=>$a,dicts_setdefault:()=>tl,dicts_to_json:()=>nl,dicts_to_json2:()=>_l,dicts_to_to:()=>ol,dicts_todict:()=>il,dicts_update:()=>Ka,dicts_values:()=>Qa,json_to_dicts:()=>sl});var C={};t.r(C),t.d(C,{logic_boolean:()=>rl,logic_compare:()=>pl,logic_compare_continous:()=>ul,logic_is:()=>hl,logic_is_in:()=>Il,logic_negate:()=>ll,logic_null:()=>Tl,logic_operation:()=>al,logic_tobool:()=>El,logic_true_or_false:()=>dl});var S={};t.r(S),t.d(S,{sdcard_mount:()=>Ul,sdcard_use_spi_init:()=>Xl,storage_can_write_ornot:()=>Cl,storage_change_dir:()=>Vl,storage_close_file:()=>Dl,storage_delete_file:()=>Pl,storage_file_seek:()=>vl,storage_file_tell:()=>Fl,storage_file_write:()=>ml,storage_fileopen:()=>Ml,storage_fileopen_new:()=>cl,storage_fileopen_new_encoding:()=>Rl,storage_get_a_line:()=>Ll,storage_get_contents:()=>gl,storage_get_contents_without_para:()=>Al,storage_get_current_dir:()=>Yl,storage_get_file_size:()=>fl,storage_get_filename:()=>Sl,storage_is_file:()=>kl,storage_list_all_files:()=>Nl,storage_make_dir:()=>yl,storage_open_file_with_os:()=>Ol,storage_rename:()=>bl});var D={};t.r(D),t.d(D,{procedures_callnoreturn:()=>wl,procedures_callreturn:()=>xl,procedures_defnoreturn:()=>Bl,procedures_defreturn:()=>Gl,procedures_ifreturn:()=>Hl,procedures_return:()=>Wl});var N={};t.r(N),t.d(N,{tuple_change_to:()=>tr,tuple_create_with:()=>Kl,tuple_create_with_noreturn:()=>sr,tuple_create_with_text2:()=>jl,tuple_create_with_text_return:()=>ql,tuple_del:()=>Zl,tuple_find:()=>er,tuple_getIndex:()=>Ql,tuple_getSublist:()=>nr,tuple_get_random_item:()=>_r,tuple_get_sublist:()=>or,tuple_input:()=>ur,tuple_join:()=>zl,tuple_length:()=>Jl,tuple_max:()=>$l,tuple_totuple:()=>pr,tuple_trig:()=>ir});var P={};t.r(P),t.d(P,{set_add_discard:()=>hr,set_clear:()=>Tr,set_create_with:()=>ar,set_create_with_text_return:()=>Mr,set_length:()=>lr,set_operate:()=>dr,set_operate_update:()=>Ir,set_pop:()=>rr,set_sub:()=>Er,set_toset:()=>cr,set_update:()=>Or});var f={};t.r(f),t.d(f,{html_content:()=>gr,html_content_more:()=>Lr,html_document:()=>Rr,html_form:()=>Sr,html_head_body:()=>Ar,html_style:()=>Cr,html_style_content:()=>Dr,html_text:()=>Nr,html_title:()=>mr});var F={};t.r(F),t.d(F,{attribute_access:()=>yr,function_call:()=>Yr,raw_block:()=>Pr,raw_empty:()=>Fr,raw_expression:()=>fr,raw_table:()=>vr,type_check:()=>Vr});var v={};t.r(v),t.d(v,{array_create:()=>Zr,array_toarray:()=>rT,dataframe_create:()=>Xr,dataframe_create_from_index:()=>Ur,dataframe_create_from_one_index:()=>Gr,dataframe_get:()=>uT,numpy_trig:()=>oT,pandas_readcsv:()=>pT,pl_axes:()=>Wr,pl_bar:()=>eT,pl_hist:()=>nT,pl_label:()=>Jr,pl_legend:()=>qr,pl_pie:()=>iT,pl_plot:()=>jr,pl_plot_bar:()=>zr,pl_plot_easy:()=>Kr,pl_plot_scatter:()=>$r,pl_plot_xy:()=>tT,pl_savefig:()=>aT,pl_show:()=>Hr,pl_subplot:()=>_T,pl_text:()=>lT,pl_ticks:()=>sT,pl_title:()=>Qr,plot_axes:()=>dT,plot_bar:()=>AT,plot_hist:()=>LT,plot_label:()=>MT,plot_legend:()=>ET,plot_pie:()=>gT,plot_plot:()=>hT,plot_plot_bar:()=>cT,plot_plot_easy:()=>IT,plot_plot_scatter:()=>RT,plot_plot_xy:()=>mT,plot_savefig:()=>DT,plot_show:()=>TT,plot_subplot:()=>ST,plot_text:()=>NT,plot_ticks:()=>CT,plot_title:()=>OT,series_create:()=>br,series_create_from_index:()=>kr,series_create_from_text:()=>Br,series_get_num:()=>wr,series_index_value:()=>xr});var V={};t.r(V),t.d(V,{inout_input:()=>PT,inout_print:()=>fT,inout_print_end:()=>vT,inout_print_inline:()=>FT,inout_print_many:()=>YT,inout_type_input:()=>VT});var Y={};t.r(Y),t.d(Y,{controls_end_program:()=>bT,controls_millis:()=>yT,time_localtime:()=>kT});var y={};t.r(y),t.d(y,{turtle_bgcolor:()=>nd,turtle_bgcolor_hex:()=>pd,turtle_bgcolor_hex_new:()=>ld,turtle_circle:()=>$T,turtle_circle_advanced:()=>ed,turtle_clear:()=>jT,turtle_clone:()=>_d,turtle_color:()=>Id,turtle_color_hex:()=>dd,turtle_color_seclet:()=>Ad,turtle_create:()=>XT,turtle_done:()=>UT,turtle_exitonclick:()=>GT,turtle_fill:()=>QT,turtle_fillcolor:()=>od,turtle_fillcolor_hex:()=>ad,turtle_fillcolor_hex_new:()=>Td,turtle_getscreen:()=>gd,turtle_goto:()=>WT,turtle_listen:()=>Dd,turtle_move:()=>BT,turtle_numinput:()=>Md,turtle_onclick:()=>Cd,turtle_onkey:()=>Ld,turtle_ontimer:()=>Sd,turtle_pencolor:()=>sd,turtle_pencolor_hex:()=>ud,turtle_pencolor_hex_new:()=>rd,turtle_penup:()=>qT,turtle_pos_shape:()=>KT,turtle_rotate:()=>xT,turtle_screen_delay:()=>HT,turtle_screen_savefig:()=>Nd,turtle_setheading:()=>wT,turtle_setxy:()=>td,turtle_shape:()=>hd,turtle_shapesize:()=>Ed,turtle_size:()=>ZT,turtle_size_speed:()=>JT,turtle_speed:()=>zT,turtle_textinput:()=>Od,turtle_visible:()=>id,turtle_write:()=>cd,turtle_write_format:()=>Rd,turtle_write_format_skulpt:()=>md});var b={};t.r(b),t.d(b,{Turn:()=>Vd,addOil:()=>Zd,checkMarker:()=>$d,find_books_by_dichotomy:()=>nI,find_books_by_sequence:()=>sI,game_get_character_img:()=>Bd,game_get_local_img:()=>Xd,game_get_path_img:()=>Hd,game_init:()=>Pd,getMarkerNum:()=>tI,get_actor_point:()=>kd,initSettedMap:()=>vd,initialize:()=>xd,isBarrier:()=>Kd,isCirculationRight:()=>zd,isDone:()=>Yd,isLightGreen:()=>Jd,isOilFull:()=>Qd,isPath:()=>yd,is_Related_Barrier:()=>jd,is_Related_Path:()=>bd,move_direction_steps:()=>fd,move_related_to_spirite:()=>Fd,place_item:()=>wd,randomOil:()=>qd,randomPlaceBarrier:()=>eI,set_map:()=>Ud,set_map_bg:()=>Gd,set_pathtype:()=>Wd,settedSimpleMap:()=>iI});const k=Blockly,X=Mixly,U={NAME_TYPE:"VARIABLE",allVariables:function(t){var e;if(t.getDescendants)e=t.getDescendants();else{if(!t.getAllBlocks)throw"Not Block or Workspace: "+t;e=t.getAllBlocks()}for(var i=Object.create(null),n=0;n1&&(_+=n)):i=_}else i="i";return i}},G=U,B={};B.NAME_TYPE=k.PROCEDURE_CATEGORY_NAME,B.allProcedures=function(t){for(var e=t.getAllBlocks(!1),i=[],n=[],s=0;s0?e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+"while True:\n"+u.join("")+a.join("\n"):e.join("\n")+i.join("\n")+n.join("\n")+_.join("\n")+p.join("")+t+a.join("\n")},W.scrubNakedValue=function(t){return t+"\n"},W.quote_=function(t){var e="'";return-1!==(t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n")).indexOf("'")&&(-1===t.indexOf('"')?e='"':t=t.replace(/'/g,"\\'")),e+t+e},W.multiline_quote_=function(t){return"'''"+(t=t.replace(/'''/g,"\\'\\'\\'"))+"'''"},W.scrub_=function(t,e,i){var n="";if(!t.outputConnection||!t.outputConnection.targetConnection){(o=t.getCommentText())&&(o=k.utils.string.wrap(o,W.COMMENT_WRAP-3),n+=W.prefixLines(o+"\n","# "));for(var s=0;s0?"int("+p+" + "+s+")":s<0?"int("+p+" - "+-s+")":"int("+p+")",n&&(p="-"+p)),p};const K=330,j={init:function(){this.setColour(K),this.appendDummyInput().appendField(new k.FieldTextInput(""),"VAR"),this.setOutput(!0),this.setTooltip(k.Msg.VARIABLES_GET_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){H.equals(t,this.getFieldValue("VAR"))&&this.setFieldValue(e,"VAR")}},q={init:function(){this.setColour(K),this.appendValueInput("VALUE").appendField(new k.FieldTextInput(""),"VAR").appendField(k.Msg.MIXLY_VALUE2),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.VARIABLES_SET_TOOLTIP)},getVars:function(){var t=this.getFieldValue("VAR");return null==t?[]:t.split(",")},renameVar:function(t,e){H.equals(t,this.getFieldValue("VAR"))&&this.setFieldValue(e,"VAR")}},Q={init:function(){this.setColour(K);var t=[[k.Msg.LANG_MATH_INT,"int"],[k.Msg.LANG_MATH_FLOAT,"float"],[k.Msg.LANG_MATH_BOOLEAN,"bool"],[k.Msg.LANG_MATH_STRING,"str"],[k.Msg.MIXLY_MICROBIT_TYPE_LIST,"list"],[k.Msg.MIXLY_MICROBIT_TYPE_TUPLE,"tuple"],[k.Msg.MIXLY_MICROBIT_TYPE_DICT,"dict"],[k.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,"set"],[k.Msg.LANG_MATH_BYTE,"bytes"]];this.appendValueInput("MYVALUE").appendField(new k.FieldDropdown(t),"OP"),this.setOutput(!0)}},J={init:function(){this.setColour(K),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_PYTHON_GLOBAL).setCheck("var"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(k.Msg.TEXT_PRINT_TOOLTIP)}},Z={init:function(){this.setColour(K),this.appendValueInput("DATA").appendField(k.Msg.MICROBIT_PYTHON_TYPE),this.setOutput(!0),this.setTooltip(k.Msg.MICROBIT_PYTHON_TYPE)}},z={init:function(){this.setColour(K),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_CONTORL_GET_TYPE).appendField(new k.FieldDropdown([[k.Msg.LANG_MATH_INT,"int"],[k.Msg.MIXLY_MICROBIT_TYPE_FLOAT,"float"],[k.Msg.MIXLY_MICROBIT_TYPE_STRING,"str"],[k.Msg.MIXLY_MICROBIT_TYPE_LIST,"list"],[k.Msg.MIXLY_MICROBIT_TYPE_TUPLE,"tuple"],[k.Msg.MIXLY_MICROBIT_TYPE_DICT,"dict"],[k.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,"set"],[k.Msg.LANG_MATH_BYTE,"bytes"],[k.Msg.LOGIC_NULL,"type(None)"]]),"type"),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("type");return k.Msg.MICROBIT_controls_TypeLists+{int:k.Msg.LANG_MATH_INT,float:k.Msg.MIXLY_MICROBIT_TYPE_FLOAT,str:k.Msg.MIXLY_MICROBIT_TYPE_STRING,list:k.Msg.MIXLY_MICROBIT_TYPE_LIST,tuple:k.Msg.MIXLY_MICROBIT_TYPE_TUPLE,dict:k.Msg.MIXLY_MICROBIT_TYPE_DICT,set:k.Msg.blockpy_SET_CREATE_WITH_CONTAINER_TITLE_ADD,image:k.Msg.MIXLY_MICROBIT_IMAGE,bytes:k.Msg.LANG_MATH_BYTE,NoneType:k.Msg.LOGIC_NULL}[e]}))}},$={init:function(){this.setColour(K),this.itemCount_=2,this.updateShape_(),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setMutator(new k.icons.MutatorIcon(["lists_zip_item"],this)),this.setTooltip(k.Msg.MIXLY_PYTHON_LISTS_ZIP_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_zip_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(k.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+s).appendField(k.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(k.Msg.CONTROLS_IF_MSG_ELSE);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_if_if");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_if_elseif");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_if_else");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_if_elseif":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_if_else":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_if_elseif":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_if_else":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(k.Msg.CONTROLS_IF_MSG_ELSEIF),this.appendStatementInput("DO"+t).appendField(k.Msg.CONTROLS_IF_MSG_THEN);this.elseCount_&&this.appendStatementInput("ELSE").appendField(k.Msg.CONTROLS_IF_MSG_ELSE)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},at={init:function(){this.setColour(nt),this.appendValueInput("FROM").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.PYTHON_RANGE).appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.PYTHON_RANGE_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},lt={init:function(){this.setColour(nt),this.appendValueInput("LIST").setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.CONTROLS_FOREACH_INPUT),this.appendValueInput("VAR").appendField(k.Msg.CONTROLS_FOREACH_INPUT_ITEM),this.appendStatementInput("DO").appendField(k.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip((function(){return k.Msg.CONTROLS_FOR_TOOLTIP.replace("“%1”","")}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){k.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},rt={init:function(){this.setColour(nt),this.appendValueInput("BOOL").setCheck([Boolean,Number]).appendField(k.Msg.MIXLY_MICROBIT_JS_CURRENT).appendField(new k.FieldDropdown(this.OPERATORS),"MODE"),this.appendStatementInput("DO").appendField(k.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT+k.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return{WHILE:k.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:k.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[e]}))}},Tt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_PYTHON_TRY),this.appendStatementInput("try"),this.appendValueInput("IF1").appendField(k.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO1").appendField(""),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new k.icons.MutatorIcon(["controls_except","controls_finally"],this)),this.setTooltip(k.Msg.MIXLY_MIXPY_CONTROL_TRY_TOOLTIP),this.elseifCount_=1,this.elseCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var t=document.createElement("mutation");return this.elseifCount_&&t.setAttribute("elseif",this.elseifCount_),this.elseCount_&&t.setAttribute("else",1),t},domToMutation:function(t){var e=this,i=[],n=[];this.elseCount_&&this.removeInput("ELSE");for(var s=this.elseifCount_;s>0;s--)e.getInputTargetBlock("IF"+s)&&e.getInputTargetBlock("IF"+s).previousConnection?i[s]=e.getInputTargetBlock("IF"+s).previousConnection:i[s]=null,this.removeInput("IF"+s),e.getInputTargetBlock("DO"+s)&&e.getInputTargetBlock("DO"+s).previousConnection?n[s]=e.getInputTargetBlock("DO"+s).previousConnection:n[s]=null,this.removeInput("DO"+s);this.elseifCount_=parseInt(t.getAttribute("elseif"),10),this.elseCount_=parseInt(t.getAttribute("else"),10);for(s=1;s<=this.elseifCount_;s++)this.appendValueInput("IF"+s).setCheck([Boolean,Number]).appendField(k.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+s).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(k.Msg.MIXLY_PYTHON_FINALLY);for(s=i.length-2;s>0;s--)i[s]&&i[s].reconnect(this,"IF"+s);for(s=n.length-2;s>0;s--)n[s]&&n[s].reconnect(this,"DO"+s)},decompose:function(t){var e=t.newBlock("controls_try");e.initSvg();for(var i=e.getInput("STACK").connection,n=1;n<=this.elseifCount_;n++){var s=t.newBlock("controls_except");s.initSvg(),i.connect(s.previousConnection),i=s.nextConnection}if(this.elseCount_){var o=t.newBlock("controls_finally");o.initSvg(),i.connect(o.previousConnection)}return e},compose:function(t){this.elseCount_&&this.removeInput("ELSE"),this.elseCount_=0;for(var e=this.elseifCount_;e>0;e--)this.removeInput("IF"+e),this.removeInput("DO"+e);this.elseifCount_=0;for(var i=t.getInputTargetBlock("STACK"),n=[null],s=[null],o=null;i;){switch(i.type){case"controls_except":this.elseifCount_++,n.push(i.valueConnection_),s.push(i.statementConnection_);break;case"controls_finally":this.elseCount_++,o=i.statementConnection_;break;default:throw Error("Unknown block type: "+i.type)}i=i.nextConnection&&i.nextConnection.targetBlock()}this.updateShape_(),this.reconnectChildBlocks_(n,s,o)},saveConnections:function(t){for(var e=t.getInputTargetBlock("STACK"),i=1;e;){switch(e.type){case"controls_except":var n=this.getInput("IF"+i),s=this.getInput("DO"+i);e.valueConnection_=n&&n.connection.targetConnection,e.statementConnection_=s&&s.connection.targetConnection,i++;break;case"controls_finally":s=this.getInput("ELSE");e.statementConnection_=s&&s.connection.targetConnection;break;default:throw"Unknown block type."}e=e.nextConnection&&e.nextConnection.targetBlock()}},rebuildShape_:function(){var t=[null],e=[null],i=null;this.getInput("ELSE")&&(i=this.getInput("ELSE").connection.targetConnection);for(var n=1;this.getInput("IF"+n);){var s=this.getInput("IF"+n),o=this.getInput("DO"+n);console.log(s.connection.targetConnection),t.push(s.connection.targetConnection),e.push(o.connection.targetConnection),n++}this.updateShape_(),this.reconnectChildBlocks_(t,e,i)},updateShape_:function(){this.getInput("ELSE")&&this.removeInput("ELSE");for(var t=1;this.getInput("IF"+t);)this.removeInput("IF"+t),this.removeInput("DO"+t),t++;for(t=1;t<=this.elseifCount_;t++)this.appendValueInput("IF"+t).setCheck([Number,Boolean]).appendField(k.Msg.MIXLY_PYTHON_EXCEPT),this.appendStatementInput("DO"+t).appendField("");this.elseCount_&&this.appendStatementInput("ELSE").appendField(k.Msg.MIXLY_PYTHON_FINALLY)},reconnectChildBlocks_:function(t,e,i){for(var n=1;n<=this.elseifCount_;n++)t[n]&&t[n].reconnect(this,"IF"+n),e[n]&&e[n].reconnect(this,"DO"+n);i&&i.reconnect(this,"ELSE")}},dt={init:function(){this.setColour(nt);var t=new k.FieldDropdown(this.OPERATORS);this.appendDummyInput().appendField(t,"FLOW").appendField(k.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP),this.setPreviousStatement(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_CONTROLS_FLOW_STATEMENTS_TOOLTIP);var e=this;this.setTooltip((function(){var t=e.getFieldValue("FLOW");return{BREAK:k.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK,CONTINUE:k.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[t]}))},onchange:function(){if(this.workspace){var t=!1,e=this;do{if("controls_repeat"==e.type||"controls_for"==e.type||"controls_forEach"==e.type||"controls_repeat_ext"==e.type||"controls_whileUntil"==e.type||"do_while"==e.type){t=!0;break}e=e.getSurroundParent()}while(e);t?this.setWarningText(null):this.setWarningText(k.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING)}}},It={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new k.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(k.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return k.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){k.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},ht={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_WITH).appendField(new k.FieldTextInput("i"),"VAR"),this.appendValueInput("FROM").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.MIXLY_STEP),this.appendStatementInput("DO").appendField(k.Msg.MIXLY_DO),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){return k.Msg.MIXLY_PYTHON_CONTROLS_FOR_RANGE_TOOLTIP.replace("%1",t.getFieldValue("VAR"))}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){k.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}};rt.OPERATORS=[[k.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[k.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]],dt.OPERATORS=[[k.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[k.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];const Et={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.CONTROLS_IF_IF_TITLE_IF),this.appendStatementInput("STACK"),this.setTooltip(k.Msg.CONTROLS_IF_IF_TOOLTIP),this.contextMenu=!1}},Ot={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.CONTROLS_IF_ELSEIF_TOOLTIP),this.contextMenu=!1}},Mt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.CONTROLS_IF_ELSE_TITLE_ELSE),this.setPreviousStatement(!0),this.setTooltip(k.Msg.CONTROLS_IF_ELSE_TOOLTIP),this.contextMenu=!1}},ct={init:function(){this.setColour(nt),this.appendDummyInput().appendField("try"),this.appendStatementInput("STACK"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.contextMenu=!1}},Rt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_PYTHON_EXCEPT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.contextMenu=!1,this.setTooltip(k.Msg.MIXLY_MIXPY_CONTROL_EXCEPT_TOOLTIP)}},mt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_PYTHON_FINALLY),this.setPreviousStatement(!0),this.contextMenu=!1,this.setTooltip(k.Msg.MIXLY_MIXPY_CONTROL_FINALLY_TOOLTIP)}},At={init:function(){this.jsonInit({message0:k.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES"}],previousStatement:null,nextStatement:null,colour:nt,tooltip:k.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:k.Msg.CONTROLS_REPEAT_HELPURL}),this.appendStatementInput("DO")}},gt={init:function(){this.setColour(nt),this.appendValueInput("BOOL").appendField("lambda"),this.appendStatementInput("DO").appendField(k.Msg.MIXLY_STAT),this.setOutput(!0)}},Lt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_PYTHON_PASS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_CONTROLS_PASS_TOOLTIP)}},Ct={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_PYTHON_CONTROLS_THREAD_START),this.appendValueInput("callback").appendField(k.Msg.MIXLY_PYTHON_CONTROLS_THREAD_USE),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_PARAMS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_CONTROLS_THREAD_TOOLTIP)}},St={init:function(){this.appendDummyInput().appendField(k.Msg.CONTROLS_REPEAT_TITLE_REPEAT+k.Msg.MIXLY_DO),this.appendStatementInput("input_data").setCheck(null),this.appendValueInput("select_data").setCheck(null).appendField(k.Msg.CONTROLS_OPERATOR_UNTIL).appendField(new k.FieldDropdown([[k.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"true"],[k.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"false"]]),"type"),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(nt),this.setTooltip("do-while loop"),this.setHelpUrl("")}},Dt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_OP_GARBAGE_COLLECT),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Nt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_GET_MEM_ALLOC),this.setOutput(!0)}},Pt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_GET_MEM_FREE),this.setOutput(!0)}},ft={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_GET+k.Msg.MIXLY_DEVICE+"ID"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(k.Msg.PROCEDURES_DEFRETURN_RETURN+k.Msg.MIXLY_GET_UNIQUE_IDEN)}},Ft={init:function(){this.setColour(nt),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_RTC_TIMESTAMP),this.appendDummyInput().appendField(k.Msg.MIXLY_TIMESTAMP_TO_DATA),this.setInputsInline(!0),this.setOutput(!0,Number)}},vt={init:function(){this.setColour(nt),this.appendDummyInput().appendField(k.Msg.MIXLY_GET_UNIQUE_IDEN),this.setOutput(!0)}},Vt=230;k.FieldTextInput.math_number_validator=function(t){return String(t)},k.FieldTextInput.math_number_validator_include_blank=function(t){if(""===t)return"";return/^-?(0X|0x|0O|0o|0B|0b)?[a-fA-F0-9]{1,}(\.[a-fA-F0-9]+)?$/.test(t)?String(t):null};const Yt={init:function(){this.setColour(Vt),this.appendDummyInput().appendField(new k.FieldTextInput("0",k.FieldTextInput.math_number_validator),"NUM"),this.setOutput(!0,Number),this.setTooltip(k.Msg.MATH_NUMBER_TOOLTIP)}},yt={init:function(){this.setColour(Vt);this.appendDummyInput("").appendField(k.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new k.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:k.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_TOOLTIP,e:k.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_TOOLTIP}[e]}))}},bt={init:function(){this.setColour(Vt);this.appendDummyInput("").appendField(k.Msg.MIXLY_PYTHON_MATH_CONSTANT).appendField(new k.FieldDropdown([["π","pi"],["e","e"]]),"CONSTANT"),this.setOutput(!0,Number);var t=this;this.setTooltip((function(){var e=t.getFieldValue("CONSTANT");return{pi:k.Msg.MIXLY_PYTHON_MATH_CONSTANT_PI_MP_TOOLTIP,e:k.Msg.MIXLY_PYTHON_MATH_CONSTANT_E_MP_TOOLTIP}[e]}))}},kt={init:function(){this.setColour(Vt),this.setOutput(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new k.FieldDropdown([["+","ADD"],["-","MINUS"],["×","MULTIPLY"],["÷","DIVIDE"],["%","QUYU"],["//","ZHENGCHU"],["**","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:k.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:k.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:k.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:k.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:k.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:k.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:k.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Xt={init:function(){this.setColour(Vt),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("A"),this.appendValueInput("B").appendField(new k.FieldDropdown([["+=","ADD"],["-=","MINUS"],["×=","MULTIPLY"],["÷=","DIVIDE"],["%=","QUYU"],["//=","ZHENGCHU"],["**=","POWER"]]),"OP"),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{ADD:k.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:k.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:k.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:k.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,QUYU:k.Msg.MATH_MODULO_TOOLTIP,ZHENGCHU:k.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:k.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[e]}))}},Ut={init:function(){this.setColour(Vt),this.setOutput(!0,Number),this.appendValueInput("A").setCheck(Number),this.appendValueInput("B").setCheck(Number).appendField(new k.FieldDropdown([["&","&"],["|","|"],[">>",">>"],["<<","<<"]]),"OP"),this.setInputsInline(!0),this.setTooltip("位运算")}},Gt={init:function(){this.setColour(Vt),this.setOutput(!0,Number),this.appendValueInput("NUM").setCheck(Number).appendField(new k.FieldDropdown([["sin","SIN"],["cos","COS"],["tan","TAN"],["asin","ASIN"],["acos","ACOS"],["atan","ATAN"],["-","-"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]),"OP");var t=this;this.setTooltip((function(){var e=t.getFieldValue("OP");return{SIN:k.Msg.MATH_TRIG_TOOLTIP_SIN,COS:k.Msg.MATH_TRIG_TOOLTIP_COS,TAN:k.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:k.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:k.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:k.Msg.MATH_TRIG_TOOLTIP_ATAN,LN:k.Msg.MATH_SINGLE_TOOLTIP_LN}[e]}))}},Bt={init:function(){var t=[[k.Msg.MATH_BIN,"bin"],[k.Msg.MATH_OCT,"oct"],[k.Msg.MATH_HEX,"hex"]];this.setColour(Vt),this.setOutput(!0,String),this.appendValueInput("NUM").setCheck(Number).appendField(new k.FieldDropdown(t),"OP");var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{bin:k.Msg.MATH_DEC_TOOLTIP_BIN,oct:k.Msg.MATH_DEC_TOOLTIP_OCT,hex:k.Msg.MATH_DEC_TOOLTIP_HEX}[t]}))}},xt={init:function(){var t=[[k.Msg.LANG_MATH_TO_ROUND,"round"],[k.Msg.LANG_MATH_TO_CEIL,"ceil"],[k.Msg.LANG_MATH_TO_FLOOR,"floor"],[k.Msg.MATH_ABS,"fabs"],[k.Msg.MATH_SQRT,"sqrt"]];this.setColour(Vt),this.appendValueInput("A").setCheck(Number).appendField(new k.FieldDropdown(t),"OP"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{sqrt:k.Msg.MATH_SINGLE_TOOLTIP_ROOT,fabs:k.Msg.MATH_SINGLE_TOOLTIP_ABS,sq:k.Msg.MATH_SINGLE_TOOLTIP_SQ,round:k.Msg.MATH_SINGLE_TOOLTIP_ROUND,ceil:k.Msg.MATH_SINGLE_TOOLTIP_CEIL,floor:k.Msg.MATH_SINGLE_TOOLTIP_FLOOR}[t]}))}},wt={init:function(){var t=[[k.Msg.MIXLY_MAX,"max"],[k.Msg.MIXLY_MIN,"min"]];this.setColour(Vt),this.appendValueInput("A").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(new k.FieldDropdown(t),"OP").appendField("("),this.appendValueInput("B").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(","),this.appendDummyInput("").setAlign(k.inputs.Align.RIGHT).appendField(")"),this.setInputsInline(!0),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{max:k.Msg.MIXLY_TOOLTIP_MATH_MAX,min:k.Msg.MIXLY_TOOLTIP_MATH_MIN}[t]}))}},Ht={init:function(){var t=[[k.Msg.MATH_TWO,"two"],[k.Msg.MATH_EIGHT,"eight"],[k.Msg.MATH_TEN,"ten"],[k.Msg.MATH_SIXTEEN,"sixteen"]];this.setColour(Vt),this.appendDummyInput("").appendField(k.Msg.MATH_BA),this.appendValueInput("NUM").appendField(new k.FieldDropdown(t),"OP").appendField(k.Msg.MATH_JinZhi).setCheck(Number),this.appendDummyInput("").appendField(k.Msg.MATH_ZHW).appendField(new k.FieldDropdown(t),"OP2").appendField(k.Msg.MATH_JinZhi),this.setFieldValue("ten","OP2"),this.setOutput(!0),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP"),i={two:k.Msg.MATH_Before_two,eight:k.Msg.MATH_Before_eight,ten:k.Msg.MATH_Before_ten,sixteen:k.Msg.MATH_Before_sixteen},n=e.getFieldValue("OP2"),s={two:k.Msg.MATH_Behind_two,eight:k.Msg.MATH_Behind_eight,ten:k.Msg.MATH_Behind_ten,sixteen:k.Msg.MATH_Behind_sixteen};return i[t]+s[n]}))}},Wt={init:function(){var t=[[k.Msg.LANG_MATH_INT,"int"],[k.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Vt),this.setOutput(!0,Number),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_RANDOM).appendField(new k.FieldDropdown(t),"TYPE"),this.appendValueInput("FROM").setCheck(Number).appendField(k.Msg.LANG_CONTROLS_FOR_INPUT_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.LANG_MATH_RANDOM_INT_INPUT_TO),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TYPE"),i={int:k.Msg.LANG_MATH_INT,float:k.Msg.LANG_MATH_FLOAT_RANDOM};return k.Msg.MATH_RANDOM_INT_TOOLTIP+i[t]}))}},Kt={init:function(){this.setColour(Vt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number).appendField(k.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN),this.appendValueInput("LOW").setCheck(Number).appendField(k.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW),this.appendValueInput("HIGH").setCheck(Number).appendField(k.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH),this.setInputsInline(!0),this.setTooltip(k.Msg.MATH_CONSTRAIN_TOOLTIP)}},jt={init:function(){this.setColour(Vt),this.appendValueInput("NUM",Number).appendField(k.Msg.MIXLY_MAP).setCheck(Number),this.appendValueInput("fromLow",Number).appendField(k.Msg.MIXLY_MAP_FROM).setCheck(Number),this.appendValueInput("fromHigh",Number).appendField(",").setCheck(Number),this.appendValueInput("toLow",Number).appendField(k.Msg.MIXLY_MAP_TO).setCheck(Number),this.appendValueInput("toHigh",Number).appendField(",").setCheck(Number),this.appendDummyInput("").appendField("]"),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(k.Msg.MIXLY_TOOLTIP_MATH_MAP)}},qt={init:function(){this.setColour(Vt),this.appendDummyInput().appendField(new k.FieldTextInput("0",k.FieldTextInput.math_number_validator_include_blank),"NUM"),this.setOutput(!0),this.setTooltip(k.Msg.MATH_NUMBER_TOOLTIP)}},Qt={init:function(){this.setColour(Vt),this.appendValueInput("NUM").setCheck(Number).appendField(k.Msg.LANG_MATH_RANDOM_SEED),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.MIXLY_TOOLTIP_MATH_RANDOM_SEED)}},Jt={init:function(){this.setColour(Vt),this.setOutput(!0,Number),this.appendValueInput("VALUE").setCheck(Number),this.appendValueInput("VAR").setCheck(Number).appendField(k.Msg.MATH_ROUND).appendField(k.Msg.TEXT_KEEP),this.appendDummyInput().appendField(k.Msg.TEXT_DECIMAL),this.setInputsInline(!0),this.setTooltip(k.Msg.MATH_ROUND_NEW_TOOLTIP)}},Zt={init:function(){var t=[[k.Msg.MIXLY_TO_INT,"int"],[k.Msg.MIXLY_TO_FLOAT,"float"],[k.Msg.MIXLY_TO_BITES,"b"],[k.Msg.LANG_MATH_BYTE+k.Msg.MIXLY_TO_INT,"bti"]];this.setColour(Vt),this.appendValueInput("VAR").appendField(new k.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:k.Msg.MIXLY_PYTHON_TOOLTIP_TOINT,float:k.Msg.MIXLY_PYTHON_TOOLTIP_TOFLOAT,b:k.Msg.MIXLY_TOOLTIP_TEXT_TOBYTE}[t]}))}},zt={init:function(){var t=[[k.Msg.MIXLY_TO_INT,"int"],[k.Msg.MIXLY_TO_FLOAT,"float"]];this.setColour(Vt),this.appendValueInput("VAR").appendField(new k.FieldDropdown(t),"TOWHAT"),this.setOutput(!0,Number);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{int:k.Msg.MIXLY_TOOLTIP_TEXT_TOINT,float:k.Msg.MIXLY_TOOLTIP_TEXT_TOFLOAT}[t]}))}},$t=jt,te={init:function(){this.setColour(Vt),this.appendValueInput("VAR").appendField(k.Msg.LANG_MATH_BYTE+k.Msg.MIXLY_TO_HEX),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOHEX)}},ee={init:function(){this.setColour(Vt),this.itemCount_=1,this.setMutator(new k.icons.MutatorIcon(["lists_create_with_item"],this)),this.appendDummyInput("DUMMY").appendField(k.Msg.MIXLY_PRODUCT+k.Msg.MIXLY_GENERATE_CARTESIAN_PRODUCT),this.appendValueInput("REPEAT").appendField(k.Msg.MIXLY_EVERY_PER_ELEPER_ELEMENT),this.appendDummyInput().appendField(k.Msg.CONTROLS_REPEAT_TITLE_TIMES),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0),this.setTooltip(k.Msg.LISTS_CREATE_WITH_PYTHON_TOOLTIP),this.updateShape_()},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("lists_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n1&&"\\"===t.charAt(0)){var e=t.charAt(1);if("0"===e||"b"===e||"f"===e||"n"===e||"r"===e||"t"===e||"\\"===e||"'"===e)return String(t).substring(0,2);if("x"===e&&"0"===t.charAt(2)&&"B"===t.charAt(3))return String(t).substring(0,4)}return String(t).substring(0,1)};const pe={init:function(){this.setColour(se),this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new k.FieldTextInput("",k.FieldTextInput.char_validator),"TEXT").appendField(this.newQuote_(!1)),this.setOutput(!0,Number),this.setTooltip(k.Msg.TEXT_CHAR_TOOLTIP)},newQuote_:function(t){if(1==t)var e="../../media/quote2.png";else e="../../media/quote3.png";return new k.FieldImage(e,7,12,'"')}},ue={init:function(){this.setColour(se),this.appendValueInput("A").setCheck([String,Number]),this.appendValueInput("B").setCheck([String,Number]).appendField(k.Msg.MIXLY_TEXT_JOIN),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_JOIN)}},ae={init:function(){this.setColour(se),this.appendValueInput("VAR").setCheck(Number).appendField(k.Msg.MIXLY_TOCHAR),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_TOCHAR)}},le={init:function(){this.setColour(se),this.appendValueInput("VAR").setCheck(String).appendField(k.Msg.MIXLY_TOASCII),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_TOASCII)}},re={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOSTRING),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOTEXT)}},Te={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_LENGTH),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_TOOLTIP_TEXT_LENGTH)}},de={init:function(){this.WHERE_OPTIONS=[[k.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[k.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[k.Msg.TEXT_GET_INDEX_RANDOM+1+k.Msg.TEXT_CHARAT2,"RANDOM"]],this.setHelpUrl(k.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number),this.appendDummyInput().appendField(k.Msg.LISTS_GET_INDEX_GET,"MODE"),k.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(k.Msg.LISTS_GET_INDEX_TAIL),this.setInputsInline(!0),this.setOutput(!0),this.updateAt_(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=t.getFieldValue("WHERE"),n="";switch(e+" "+i){case"GET FROM_START":case"GET FROM_END":n=k.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM;break;case"GET RANDOM":n=k.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM;break;case"GET_REMOVE FROM_START":case"GET_REMOVE FROM_END":n=k.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM;break;case"GET_REMOVE RANDOM":n=k.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM}return"FROM_START"!=i&&"FROM_END"!=i||(n+=" "+k.Msg.LISTS_INDEX_FROM_START_TOOLTIP.replace("%1",k.Msg.ONE_BASED_INDEXING?"#1":"#0")),n}));var e=this;this.setTooltip((function(){var t=e.getFieldValue("WHERE"),i={FROM_START:k.Msg.LISTS_GET_INDEX_FROM_START,FROM_END:k.Msg.LISTS_GET_INDEX_FROM_END,RANDOM:k.Msg.TEXT_GET_INDEX_RANDOM};return k.Msg.PROCEDURES_DEFRETURN_RETURN+k.Msg.MIXLY_MICROBIT_TYPE_STRING+i[t]+"n"+k.Msg.TEXT_CHARAT2}))},mutationToDom:function(){var t=document.createElement("mutation");t.setAttribute("statement",!this.outputConnection);var e=this.getInput("AT").type==k.INPUT_VALUE;return t.setAttribute("at",e),t},domToMutation:function(t){var e="true"==t.getAttribute("statement");this.updateStatement_(e),t="false"!=t.getAttribute("at"),this.updateAt_(t)},updateStatement_:function(t){t!=!this.outputConnection&&(this.unplug(!0,!0),t?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(t){this.removeInput("AT"),this.removeInput("ORDINAL",!0),t?(this.appendValueInput("AT").setCheck(Number),k.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL").appendField(k.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT");var e=new k.FieldDropdown(this.WHERE_OPTIONS,(function(e){var i="FROM_START"==e||"FROM_END"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT").appendField(e,"WHERE"),k.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)}},Ie={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT").setCheck(Number).appendField(k.Msg.LISTS_GET_INDEX_GET+" "+k.Msg.LISTS_GET_INDEX_FROM_START),this.appendDummyInput().appendField(k.Msg.TEXT_CHARAT2),this.setOutput(!0),this.setTooltip(k.Msg.PROCEDURES_DEFRETURN_RETURN+k.Msg.MIXLY_MICROBIT_TYPE_STRING+k.Msg.LISTS_GET_INDEX_FROM_START+"n"+k.Msg.TEXT_CHARAT2)}},he={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_INDEX_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput().appendField(k.Msg.TEXT_RANDOM_CHAR),this.setOutput(!0),this.setTooltip(k.Msg.TEXT_RANDOM_CHAR_TOOLTIP)}},Ee={init:function(){this.WHERE_OPTIONS_1=[[k.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[k.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[k.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]],this.WHERE_OPTIONS_2=[[k.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[k.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[k.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]],this.setHelpUrl(k.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendDummyInput("").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput("AT1"),this.appendDummyInput("AT2"),this.setInputsInline(!0),this.setOutput(!0,"List"),this.updateAt_(1,!0),this.updateAt_(2,!0),this.setTooltip(k.Msg._GET_TEXT_SUBLIST_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT1").type==k.INPUT_VALUE;t.setAttribute("at1",e);var i=this.getInput("AT2").type==k.INPUT_VALUE;return t.setAttribute("at2",i),t},domToMutation:function(t){var e="true"==t.getAttribute("at1"),i="true"==t.getAttribute("at2");this.updateAt_(1,e),this.updateAt_(2,i)},updateAt_:function(t,e){this.removeInput("AT"+t),this.removeInput("ORDINAL"+t,!0),e?(this.appendValueInput("AT"+t).setCheck(Number),k.Msg.TEXT_CHARAT2&&this.appendDummyInput("ORDINAL"+t).appendField(k.Msg.TEXT_CHARAT2)):this.appendDummyInput("AT"+t);var i=new k.FieldDropdown(this["WHERE_OPTIONS_"+t],(function(i){var n="FROM_START"==i||"FROM_END"==i;if(n!=e){var s=this.sourceBlock_;return s.updateAt_(t,n),s.setFieldValue(i,"WHERE"+t),null}}));this.getInput("AT"+t).appendField(i,"WHERE"+t),1==t&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"))}},Oe={init:function(){this.setHelpUrl(k.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("AT1").appendField(k.Msg.LISTS_GET_INDEX_GET+" "+k.Msg.LISTS_GET_INDEX_FROM_START),this.appendValueInput("AT2").appendField(k.Msg.LISTS_GET_SUBLIST_END_FROM_START),this.appendDummyInput().appendField(k.Msg.TEXT_CHARAT2),this.setInputsInline(!0),this.setOutput(!0,["List",String]),this.setTooltip(k.Msg._GET_TEXT_SUBLIST_TOOLTIP)}},Me={init:function(){var t=[[k.Msg.MIXLY_EQUALS,"==="],[k.Msg.MIXLY_STARTSWITH,"startswith"],[k.Msg.MIXLY_ENDSWITH,"endswith"]];this.setColour(se),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(new k.FieldDropdown(t),"DOWHAT").setCheck(String),this.setOutput(!0,[Boolean,Number]),this.setInputsInline(!0)}},ce={init:function(){this.setColour(se),this.appendValueInput("STR1").setCheck(String),this.appendValueInput("STR2").appendField(k.Msg.MIXLY_COMPARETO).setCheck(String),this.setOutput(!0,Number),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_COMPARETO_HELP)}},Re={init:function(){var t=[[k.Msg.TEXT_UPPER,"upper"],[k.Msg.TEXT_TITLE,"title"],[k.Msg.TEXT_CAPITALIZE,"capitalize"],[k.Msg.TEXT_SWAPCASE,"swapcase"],[k.Msg.TEXT_LOWER,"lower"]];this.setColour(se),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new k.FieldDropdown(t),"CAPITAL").setCheck(String),this.setOutput(!0,String);var e=this;this.setTooltip((function(){var t=e.getFieldValue("CAPITAL");return{upper:k.Msg.MIXLY_MIXPY_TEXT_UPPER_TOOLTIP,title:k.Msg.MIXLY_MIXPY_TEXT_TITLE_TOOLTIP,swapcase:k.Msg.MIXLY_MIXPY_TEXT_SWAPCASE_TOOLTIP,capitalize:k.Msg.MIXLY_MIXPY_TEXT_CAPITALIZE_TOOLTIP,lower:k.Msg.MIXLY_MIXPY_TEXT_LOWER_TOOLTIP}[t]}))}},me={init:function(){var t=[[k.Msg.TEXT_LJUST,"ljust"],[k.Msg.TEXT_CENTER,"center"],[k.Msg.TEXT_RJUST,"rjust"]];this.setColour(se),this.appendValueInput("VAR").appendField(new k.FieldDropdown(t),"CENTER").setCheck(String),this.appendValueInput("WID").appendField(k.Msg.MIXLY_WIDTH).setCheck(Number),this.appendValueInput("Symbol").appendField(k.Msg.MIXLY_RECT_Fill).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_MIXPY_TEXT_CENTER_TOOLTIP)}},Ae={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).setCheck(String),this.appendValueInput("STR").appendField(k.Msg.MIXLY_MID+k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER).setCheck(String),this.appendDummyInput().appendField(k.Msg.MIXLY_LIST_INDEX),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_MIXPY_TEXT_FIND_TOOLTIP)}},ge={init:function(){this.setColour(se),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_USE_STR).setCheck(String),this.appendValueInput("LIST").appendField(k.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_SEQ).setCheck("List","Tuple","Set","Dict"),this.appendDummyInput().appendField(k.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_GET_STR),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_PYTHON_TEXT_JOIN_SEQ_TOOLTIP)}},Le={init:function(){this.setColour(se),this.appendValueInput("VAR").setCheck(String),this.appendValueInput("STR1").appendField(k.Msg.MIXLY_MIXPY_REPLACE).setCheck(String),this.appendValueInput("STR2").appendField(k.Msg.LISTS_SET_INDEX_INPUT_TO).setCheck(String),this.setInputsInline(!0),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_MIXPY_TEXT_REPLACE_TOOLTIP)}},Ce={init:function(){this.setColour(se),this.appendValueInput("VAR"),this.appendValueInput("VAL").appendField(k.Msg.LIST_SPLIT_AS),this.appendDummyInput("").appendField(k.Msg.LIST_SPLIT),this.setOutput(!0,"List"),this.setTooltip(k.Msg.MIXLY_MIXPY_TEXT_SPLIT_TOOLTIP),this.setInputsInline(!0)}},Se={init:function(){var t=[[k.Msg.TEXT_TRIM_BOTH,"strip"],[k.Msg.TEXT_TRIM_LEFT,"lstrip"],[k.Msg.TEXT_TRIM_RIGHT,"rstrip"]];this.setColour(se),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(k.Msg.TEXT_STRIM),this.appendDummyInput("").appendField(new k.FieldDropdown(t),"TOWHAT"),this.appendDummyInput("").appendField(k.Msg.TEXT_BLANK),this.setOutput(!0,String),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("TOWHAT");return{strip:k.Msg.TEXT_TRIM_BOTH_TOOLTIP,lstrip:k.Msg.TEXT_TRIM_LEFT_TOOLTIP,rstrip:k.Msg.TEXT_TRIM_RIGHT_TOOLTIP}[t]}))}},De={init:function(){this.setColour(se),this.appendDummyInput("").appendField(k.Msg.MIXLY_MICROPYTHON_FORMAT),this.appendDummyInput("").appendField(new k.FieldTextInput("str"),"VAR"),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new k.icons.MutatorIcon(["text_create_with_item"],this)),this.setOutput(!0),this.setTooltip(k.Msg.MIXLY_MIXPY_TEXT_FORMAT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("text_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){k.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},gi={init:function(){this.setColour(mi),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_TYPE_DICT),this.appendStatementInput("STACK"),this.setTooltip(k.Msg.DICTS_CREATE_WITH_CONTAINER_TOOLTIP),this.contextMenu=!1}},Li={init:function(){this.setColour(mi),this.appendDummyInput().appendField(k.Msg.DICTS_CREATE_WITH_ITEM_TITLE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.DICTS_CREATE_WITH_ITEM_TOOLTIP),this.contextMenu=!1}},Ci={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_KEYS),this.setTooltip(k.Msg.DICTS_KEYS_TOOLTIP),this.setOutput(!0,"List")}},Si={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(k.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(k.Msg.DICTS_ADD_VALUE),this.setOutput(!0),this.setTooltip(k.Msg.DICTS_GET_TOOLTIP)}},Di={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(k.Msg.DICTS_GET_IN),this.appendDummyInput("").appendField(k.Msg.DICTS_ADD_VALUE),this.appendValueInput("VAR").appendField(k.Msg.DICTS_DEFAULT_VALUE),this.setOutput(!0),this.setTooltip(k.Msg.DICTS_GET_DEFAULT_TOOLTIP)}},Ni={init:function(){this.setColour(mi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(k.Msg.DICTS_ADD),this.appendDummyInput(),this.appendValueInput("VAR").appendField(k.Msg.DICTS_ADD_VALUE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.DICTS_ADD_OR_CHANGE_TOOLTIP)}},Pi={init:function(){this.setColour(mi),this.appendValueInput("DICT"),this.appendValueInput("KEY").appendField(k.Msg.DICTS_DELETE_IN),this.appendDummyInput("").appendField(k.Msg.DICTS_DELETE_VALUE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.DICTS_DELETE_TOOLTIP)}},fi={init:function(){this.setColour(mi),this.appendValueInput("DICT2").setCheck("Dict").appendField(k.Msg.MAKE_DICT),this.appendValueInput("DICT").setCheck("Dict").appendField(k.Msg.DICT_UPDATE),this.appendDummyInput("").appendField(k.Msg.MIXLY_MID),this.setTooltip(k.Msg.DICTS_UPDATE_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Fi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_CLEAR),this.setTooltip(k.Msg.DICTS_CLEAR_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},vi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_ITEMS),this.setTooltip(k.Msg.DICTS_ITEMS_TOOLTIP),this.setOutput(!0,"List")}},Vi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_VALUES),this.setTooltip(k.Msg.DICTS_VALUES_TOOLTIP),this.setOutput(!0,"List")}},Yi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.MIXLY_LENGTH),this.setTooltip(k.Msg.DICT_LENGTH_TOOLTIP),this.setOutput(!0,Number)}},yi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.DICT_DELDICT),this.setTooltip(k.Msg.DICTS_DEL_TOOLTIP),this.setPreviousStatement(!0),this.setNextStatement(!0)}},bi={init:function(){this.MODE=[[k.Msg.DICTS_ADD_OR_CHANGE,"INSERT"],[k.Msg.MIXLY_MICROBIT_JS_DELETE_VAR,"DELETE"]],this.setHelpUrl(k.Msg.LISTS_GET_SUBLIST_HELPURL),this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("AT2"),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).appendField(k.Msg.DICTS_ADD_VALUE),this.updateAt_(!0),this.setInputsInline(!0),this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e="";switch(t.getFieldValue("WHERE")){case"INSERT":e=k.Msg.DICTS_ADD_TOOLTIP;break;case"DELETE":e=k.Msg.DICTS_DELETE_TOOLTIP}return e}))},mutationToDom:function(){var t=document.createElement("mutation"),e=this.getInput("AT2").type==k.INPUT_VALUE;return t.setAttribute("at2",e),t},domToMutation:function(t){var e="true"==t.getAttribute("at2");this.updateAt_(e)},updateAt_:function(t){this.removeInput("AT2"),this.removeInput("ORDINAL",!0),t?this.appendValueInput("AT2").setCheck(Number):this.appendDummyInput("AT2");var e=new k.FieldDropdown(this.MODE,(function(e){var i="INSERT"==e;if(i!=t){var n=this.sourceBlock_;return n.updateAt_(i),n.setFieldValue(e,"WHERE"),null}}));this.getInput("AT2").appendField(e,"WHERE")}},ki={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.blockpy_DICT_POP),this.appendValueInput("KEY"),this.appendDummyInput("").appendField(k.Msg.DICTS_ADD_VALUE),this.setTooltip(k.Msg.DICT_POP_TOOLTIP),this.setInputsInline(!0),this.setOutput(!0)}},Xi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(k.Msg.DICTS_SET_DEFAULT),this.appendDummyInput("").appendField(k.Msg.DICTS_DEFAULT_VALUE),this.appendValueInput("VAR"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.DICTS_SETDEFAULT_TOOLTIP)}},Ui={init:function(){this.setColour(mi),this.appendDummyInput("").appendField(new k.FieldLabel(k.Msg.MIXLY_MICROBIT_TYPE_DICT),"TIP").appendField(" "),this.itemCount_=3,this.updateShape_(),this.setOutput(!0,"Dict"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setMutator(new k.icons.MutatorIcon(["dicts_create_with_item"],this)),this.setTooltip(k.Msg.DICTS_CREATE_WITH_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("dicts_create_with_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;ne?t[e]:0==e?'"key"':'"key'+(e+1)+'"'),"KEY"+e).appendField(":")}},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){k.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},Gi={init:function(){this.setColour(mi),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TODICT),this.setOutput(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TODICT)}},Bi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendDummyInput("").appendField(k.Msg.MIXLY_TO_JSON),this.setTooltip(k.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},xi={init:function(){this.setColour(mi),this.appendValueInput("VAR"),this.appendDummyInput("").appendField(k.Msg.MIXLY_CONVERT_TO_JSON),this.setTooltip(k.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},wi={init:function(){this.setColour(mi),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("VAR1").appendField("key1"),this.appendValueInput("VAR2").appendField("index"),this.appendValueInput("VAR3").appendField("key2"),this.appendValueInput("VAR4").appendField("key3"),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_CONVERT_TO_JSON_TOOLTIP),this.setOutput(!0)}},Hi={init:function(){this.setColour(mi),this.appendValueInput("DICT"),this.appendDummyInput("").appendField(k.Msg.MIXLY_TO_JSON),this.setTooltip(k.Msg.MIXLY_TO_JSON_TOOLTIP),this.setOutput(!0)}},Wi=210,Ki={init:function(){var t=k.RTL?[["=","EQ"],["≠","NEQ"],[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["=","EQ"],["≠","NEQ"],["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Wi),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new k.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{EQ:k.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:k.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:k.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:k.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:k.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:k.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[t]})),this.prevBlocks_=[null,null]}},ji={init:function(){var t=k.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]],e=k.RTL?[[">","LT"],["≥","LTE"],["<","GT"],["≤","GTE"]]:[["<","LT"],["≤","LTE"],[">","GT"],["≥","GTE"]];this.setColour(Wi),this.setOutput(!0,Boolean),this.appendValueInput("A"),this.appendValueInput("B").appendField(new k.FieldDropdown(t),"OP1"),this.appendValueInput("C").appendField(new k.FieldDropdown(e),"OP2"),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_LOGIC_COMPARE_CONTINOUS_TOOLTIP)}},qi={init:function(){var t=[[k.Msg.LOGIC_OPERATION_AND,"AND"],[k.Msg.LOGIC_OPERATION_OR,"OR"],[k.Msg.LOGIC_OPERATION_NOR,"NOR"],[k.Msg.LOGIC_OPERATION_XOR,"XOR"]];this.setColour(Wi),this.setOutput(!0,Boolean),this.appendValueInput("A").setCheck([Boolean,Number]),this.appendValueInput("B").setCheck([Boolean,Number]).appendField(new k.FieldDropdown(t),"OP"),this.setInputsInline(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("OP");return{AND:k.Msg.LOGIC_OPERATION_TOOLTIP_AND,OR:k.Msg.LOGIC_OPERATION_TOOLTIP_OR,NOR:k.Msg.LOGIC_OPERATION_TOOLTIP_NOR,XOR:k.Msg.LOGIC_OPERATION_TOOLTIP_XOR}[t]}))}},Qi={init:function(){this.setColour(Wi),this.setOutput(!0,Boolean),this.appendValueInput("BOOL").setCheck([Number,Boolean]).appendField(k.Msg.LOGIC_NEGATE_TITLE),this.setTooltip(k.Msg.LOGIC_NEGATE_TOOLTIP)}},Ji={init:function(){var t=[[k.Msg.LOGIC_BOOLEAN_TRUE,"TRUE"],[k.Msg.LOGIC_BOOLEAN_FALSE,"FALSE"]];this.setColour(Wi),this.setOutput(!0,Boolean),this.appendDummyInput().appendField(new k.FieldDropdown(t),"BOOL"),this.setTooltip(k.Msg.LOGIC_BOOLEAN_TOOLTIP)}},Zi={init:function(){this.setColour(Wi),this.setOutput(!0),this.appendDummyInput().appendField(k.Msg.LOGIC_NULL),this.setTooltip(k.Msg.LOGIC_NULL_TOOLTIP)}},zi={init:function(){this.setColour(Wi),this.appendValueInput("A"),this.appendValueInput("B").appendField(k.Msg.LOGIC_TERNARY_IF_TRUE),this.appendValueInput("C").appendField(k.Msg.LOGIC_TERNARY_IF_FALSE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE)}},$i={init:function(){var t=[[k.Msg.TEXT_APPEND_TO,"in"],[k.Msg.MIXLY_PYTHON_LOGIC_IS_NOT_IN,"not in"]];this.setColour(Wi),this.appendValueInput("A"),this.appendValueInput("B").setCheck([String,"List"]).appendField(new k.FieldDropdown(t),"BOOL"),this.appendDummyInput("").appendField(k.Msg.MICROBIT_LOGIC_IS_IN),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(k.Msg.IN)}},tn={init:function(){var t=[[k.Msg.MIXLY_PYTHON_LOGIC_IS,"is"],[k.Msg.MIXLY_PYTHON_LOGIC_IS_NOT,"is not"]];this.setColour(Wi),this.appendValueInput("A"),this.appendValueInput("B").appendField(new k.FieldDropdown(t),"BOOL"),this.setOutput(!0,Boolean),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_LOGIC_IS_TOOLTIP)}},en={init:function(){this.setColour(Wi),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOBOOL),this.setOutput(!0,Boolean),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOBOOL)}},nn={init:function(){this.setColour(0),this.appendValueInput("fn").setCheck(String).appendField(k.Msg.MIXLY_PYTHON_STORAGE_OPEN_FILE_WITH_OS+"(For Windows)"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0)}},sn={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendValueInput("FILE").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_AS),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=k.Msg.MIXLY_USE,n=k.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=k.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=k.Msg.MIXLY_BELONG;return i+{r:k.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:k.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s}))},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){k.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},on={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=k.Msg.MIXLY_USE,n=k.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=k.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=k.Msg.MIXLY_BELONG,_=k.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:k.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:k.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},_n={init:function(){this.setColour(0),this.appendValueInput("FILENAME").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE);this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE).appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,"r"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,"w"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,"rb"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE,"wb"]]),"MODE"),this.appendDummyInput().appendField(k.Msg.MIXPY_TEXT_ENCODE).appendField(new k.FieldDropdown([["ANSI","ANSI"],["gbk","gbk"],["utf-8","utf-8"]]),"CODE"),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setOutput(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=k.Msg.MIXLY_USE,n=k.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE,s=k.Msg.MIXLY_MICROBIT_PY_STORAGE_OPEN_FILE,o=k.Msg.MIXLY_BELONG,_=k.Msg.PY_STORAGE_FILE_OBJECT;return i+{r:k.Msg.MIXLY_MICROBIT_PY_STORAGE_READ,w:k.Msg.MIXLY_MICROBIT_PY_STORAGE_WRITE,rb:k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_READ,wb:k.Msg.MIXLY_MICROBIT_PY_STORAGE_BIT_WRITE}[e]+o+n+s+_}))}},pn={init:function(){this.setColour(0),this.appendValueInput("data").setCheck(String).appendField(k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendValueInput("FILE").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE+k.Msg.MIXLY_MICROBIT_TYPE_STRING+k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_WRITE)}},un={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL,"read"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE,"readline"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES,"readlines"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String)}},an={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,"read"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,"readline"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE,"readlines"]]),"MODE"),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=k.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE,n=k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER;return i+{read:k.Msg.MIXLY_MICROBIT_PY_STORAGE_NO_MORE_THAN_SIZE,readline:k.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE,readlines:k.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL_LINES_NO_MORE_THAN_SIZE}[e]+"x"+n}))}},ln={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_FROM_FILE),this.setNextStatement(!0),this.appendValueInput("SIZE").setCheck(Number).appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_ONE_LINE_NO_MORE_THAN_SIZE),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(k.Msg.MICROBIT_PYTHON_TYPE)}},rn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(k.Msg.HTML_FILE),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CAN_WRITE_ORNOT1)}},Tn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILENAME),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,String),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILENAME)}},dn={init:function(){this.setColour(0),this.appendValueInput("FILE").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CLOSE_FILE)}},In={init:function(){this.setColour(0),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_LIST_ALL_FILES)}};k.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE;const hn={init:function(){this.setColour(0),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE,"remove"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_DIRS,"removedirs"]]),"MODE"),this.appendValueInput("FILE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_DELETE_FILE)}},En={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_FILE_SIZE+k.Msg.MIXLY_MICROBIT_PY_STORAGE_SIZE)}},On={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_RETURN_FILE),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_PRESENT_LOCATION),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Number),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_TELL)}},Mn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck("Variable").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,"start"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,"current"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END,"end"]]),"MODE"),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET),this.appendValueInput("SIZE").setCheck(Number),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE"),i=k.Msg.MIXLY_MICROBIT_PY_STORAGE_SET_FILE_POSITION+k.Msg.MIXLY_MICROBIT_PY_STORAGE_CURRENT_POSITION,n=k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHARACTER,s=k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_OFFSET;return i+" "+{start:k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_START,current:k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_CURRENT,end:k.Msg.MIXLY_MICROBIT_PY_STORAGE_FILE_SEEK_END}[e]+s+"x"+n}))}},cn={init:function(){this.setColour(0),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,"List"),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET_CURRENT_DIR)}},Rn={init:function(){this.setColour(0),this.appendValueInput("PATH").setCheck(String).appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH),this.appendDummyInput().appendField(k.Msg.MIXLY_ESP32_SET),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,"mkdir"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_MAKEDIRS,"makedirs"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1);var t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return k.Msg.MIXLY_MICROBIT_PY_STORAGE_PATH+"x"+k.Msg.MIXLY_ESP32_SET+{mkdir:k.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,makedirs:k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},mn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME),this.appendValueInput("NEWFILE").setCheck(String).appendField(k.Msg.MIXLY_AS),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_RENAME)}},An={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(k.Msg.MIXLY_MICROBIT_PY_STORAGE_CHANGE_DIR)}},gn={init:function(){this.setColour(0),this.appendValueInput("FILE").setCheck(String).appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH),this.appendDummyInput().appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.HTML_FILE,"isfile"],[k.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_DIR,"isdir"]]),"MODE"),this.setInputsInline(!0),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0,Boolean);let t=this;this.setTooltip((function(){var e=t.getFieldValue("MODE");return k.Msg.MIXLY_MICROBIT_PY_STORAGE_THE_PATH+"x"+k.Msg.MIXLY_MICROBIT_PY_STORAGE_IS_OR_NOT+{isfile:k.Msg.MIXLY_MICROBIT_PY_STORAGE_MKDIR,isdir:k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKEDIRS}[e]}))}},Ln={init:function(){this.setColour(0),this.appendValueInput("SPISUB").appendField(k.Msg.CONTROLS_FOR_INPUT_WITH+"SPI").setCheck("var"),this.appendValueInput("PINSUB").appendField("CS"),this.appendValueInput("SUB").appendField(k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE).setCheck("var"),this.appendDummyInput("").appendField(k.Msg.MIXLY_SETUP+k.Msg.LISTS_SET_INDEX_INPUT_TO).appendField(k.Msg.MIXLY_SD_CARD),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null)}},Cn={init:function(){this.setColour(0),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SD_CARD),this.appendValueInput("DIR").setCheck(String).appendField(k.Msg.MIXLY_SDCARD_MOUNT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setInputsInline(!0),this.setTooltip()}},Sn={init:function(){var t=k.Procedures.findLegalName("",this),e=new k.FieldTextInput(t,k.Procedures.rename);e.setSpellcheck(!1),this.appendDummyInput().appendField(e,"NAME").appendField("","PARAMS"),this.setMutator(new k.icons.MutatorIcon(["procedures_mutatorarg"],this)),(this.workspace.options.comments||this.workspace.options.parentWorkspace&&this.workspace.options.parentWorkspace.options.comments)&&k.Msg.PROCEDURES_DEFNORETURN_COMMENT&&this.setCommentText(k.Msg.PROCEDURES_DEFNORETURN_COMMENT),this.setStyle("procedure_blocks"),this.setTooltip(k.Msg.PROCEDURES_DEFNORETURN_TOOLTIP),this.setHelpUrl(k.Msg.PROCEDURES_DEFNORETURN_HELPURL),this.arguments_=[],this.argumentVarModels_=[],this.setStatements_(!0),this.statementConnection_=null},setStatements_:function(t){this.hasStatements_!==t&&(t?(this.appendStatementInput("STACK").appendField(k.Msg.PROCEDURES_DEFNORETURN_DO),this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=t)},updateParams_:function(){var t="";this.arguments_.length&&(t=k.Msg.PROCEDURES_BEFORE_PARAMS+" "+this.arguments_.join(", ")),k.Events.disable();try{this.setFieldValue(t,"PARAMS")}finally{k.Events.enable()}},mutationToDom:function(t){var e=k.utils.xml.createElement("mutation");t&&e.setAttribute("name",this.getFieldValue("NAME"));for(var i=0;i"),this.appendValueInput("style").appendField(k.Msg.MIXLY_AIP_ATTR).setAlign(k.inputs.Align.RIGHT),this.appendStatementInput("DO").appendField(""),this.setInputsInline(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Rs={init:function(){this.setColour(Is),this.appendDummyInput().appendField(k.Msg.HTML_STYLE),this.appendStatementInput("STYLE"),this.setOutput(!0)}},ms={init:function(){this.setColour(Is),this.appendDummyInput().appendField(k.Msg.HTML_FORM_CONTENT).appendField(new k.FieldDropdown([[k.Msg.HTML_TEXT,"text"],[k.Msg.HTML_EMAIL,"email"],[k.Msg.HTML_NUMBER,"number"],[k.Msg.HTML_PASSWORD,"password"],[k.Msg.HTML_CHECKBOX,"checkbox"],[k.Msg.HTML_RADIOBUTTON,"radiobutton"],[k.Msg.HTML_BUTTON,"button"],[k.Msg.HTML_COLOUR,"colour"],[k.Msg.HTML_DATE,"date"],[k.Msg.HTML_LOCALTIME,"local time"],[k.Msg.HTML_FILE,"file"],[k.Msg.HTML_HIDDEN,"hidden"],[k.Msg.HTML_IMAGE,"image"],[k.Msg.HTML_MONTH,"month"],[k.Msg.HTML_RANGE,"range"],[k.Msg.HTML_RESET,"reset"],[k.Msg.HTML_SEARCH,"search"],[k.Msg.HTML_SUBMIT,"submit"],[k.Msg.HTML_TELEPHONENUMBER,"telephone number"],[k.Msg.HTML_TIME,"time"],[k.Msg.HTML_URL,"url"],[k.Msg.HTML_WEEK,"week"]]),"LEVEL"),this.appendDummyInput().appendField(k.Msg.HTML_NAME).appendField(new k.FieldTextInput("car"),"NAME"),this.appendDummyInput().appendField(k.Msg.HTML_VALUE).appendField(new k.FieldTextInput("go"),"VALUE"),this.appendValueInput("style").appendField(k.Msg.MIXLY_AIP_ATTR).setAlign(k.inputs.Align.RIGHT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},As={init:function(){this.setColour(Is),this.appendDummyInput().appendField(new k.FieldTextInput("property"),"KEY").appendField(":").appendField(new k.FieldTextInput("value"),"VALUE"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},gs={init:function(){this.setColour(Is),this.appendDummyInput().appendField(new k.FieldTextInput("property"),"KEY").appendField(":").appendField(new k.FieldColour("#ff0000"),"RGB_LED_COLOR"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ls={init:function(){this.setColour(Is),this.appendDummyInput().appendField(k.Msg.HTML_TEXT).appendField(new k.FieldTextInput("text"),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Cs=160,Ss={init:function(){this.setColour(Cs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Tabular Abstraction:"),this.appendDummyInput().appendField(new k.FieldTable(""),"TEXT")}},Ds={init:function(){this.setColour(Cs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendDummyInput().appendField("Code Block:"),this.appendDummyInput().appendField(new k.FieldMultilineInput(""),"TEXT")}},Ns={init:function(){this.setColour(Cs),this.appendDummyInput().appendField("Code Expression:"),this.appendDummyInput().appendField(new k.FieldMultilineInput(""),"TEXT"),this.setOutput(!0)}},Ps={init:function(){this.setColour(Cs),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("VALUE").appendField(""),this.setInputsInline(!1)}},fs={init:function(){this.setColour(Cs),this.appendDummyInput().appendTitle("Comment:").appendTitle(new k.FieldTextInput(""),"TEXT"),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("This comment will be ignored by Python")}},Fs={init:function(){this.setColour(Cs),this.appendValueInput("VALUE").appendField(k.Msg.TYPE_CHECK),this.setInputsInline(!1),this.setOutput(!0,"Type")}},vs={init:function(){this.setColour(Cs),this.itemCount_=1,this.updateShape_(),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setMutator(new k.icons.MutatorIcon(["text_print_multiple_item"],this)),this.setTooltip(k.Msg.TEXT_PRINT_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=k.Block.obtain(t,"text_print_multiple_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[k.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[k.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[k.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[k.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[k.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[k.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[k.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[k.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("SER").setCheck("Series").appendField(k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new k.FieldDropdown(i),"DOT"),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new k.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldDropdown(e),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Js={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Zs={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},zs={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},$s={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},to={init:function(){this.setColour(Us);var t=[[k.Msg.PYLAB_LABEL_X,"x"],[k.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SET_LABEL).appendField(new k.FieldDropdown(t),"DIR"),this.appendValueInput("LABEL").appendField(k.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},eo={init:function(){this.setColour(Us),this.appendValueInput("FROM").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.MIXLY_SPLITBYDOU).appendField(k.Msg.MIXPY_DATA_ARRAY_CREATE_FROM),this.appendValueInput("TO").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.MIXPY_DATA_ARRAY_CREATE_TO),this.appendValueInput("STEP").setCheck(Number).setAlign(k.inputs.Align.RIGHT).appendField(k.Msg.MIXLY_STEP),this.setInputsInline(!0),this.setOutput(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},io={init:function(){this.setColour(Us);var t=[[k.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[k.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(k.Msg.MIXLY_DISPLAY_DRAW).appendField(new k.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{plot:k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:k.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[t]}))}},no={init:function(){this.setColour(Us);var t=[[k.Msg.COLOUR_RGB_BLUE,"b"],[k.Msg.COLOUR_RGB_GREEN,"g"],[k.Msg.COLOUR_RGB_RED,"r"],[k.Msg.COLOUR_CYAN,"c"],[k.Msg.COLOUR_MAGENTA,"m"],[k.Msg.COLOUR_YELLOW,"y"],[k.Msg.COLOUR_BLACK,"k"],[k.Msg.COLOUR_WHITE,"w"]],e=[[k.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[k.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[k.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[k.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[k.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[k.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[k.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[k.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[k.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[k.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[k.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_SCATTER).appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(k.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new k.FieldDropdown(e),"DOT"),this.appendDummyInput("").appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldDropdown(t),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},so={init:function(){this.setColour(Us);var t=[[k.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[k.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[k.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[k.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[k.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[k.Msg.COLOUR_RGB_BLUE,"b"],[k.Msg.COLOUR_RGB_GREEN,"g"],[k.Msg.COLOUR_RGB_RED,"r"],[k.Msg.COLOUR_CYAN,"c"],[k.Msg.COLOUR_MAGENTA,"m"],[k.Msg.COLOUR_YELLOW,"y"],[k.Msg.COLOUR_BLACK,"k"],[k.Msg.COLOUR_WHITE,"w"]],i=[[k.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[k.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[k.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_DOWN,"v"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_UP,"^"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_LEFT,"<"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIANGLE_RIGHT,">"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_UP,"1"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_DOWN,"2"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_LEFT,"3"],[k.Msg.blockpy_PYLAB_PLOT_DOT_TRIMARKER_RIGHT,"4"],[k.Msg.blockpy_PYLAB_PLOT_DOT_SQUARE,"s"],[k.Msg.blockpy_PYLAB_PLOT_DOT_PENTAGON,"p"],[k.Msg.blockpy_PYLAB_PLOT_DOT_STAR,"*"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_VERTICAL,"h"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HEXAGON_HORIZONTAL,"H"],[k.Msg.blockpy_PYLAB_PLOT_DOT_PLUS,"+"],[k.Msg.blockpy_PYLAB_PLOT_DOT_CROSS,"x"],[k.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND,"D"],[k.Msg.blockpy_PYLAB_PLOT_DOT_DIAMOND_SMALL,"d"],[k.Msg.blockpy_PYLAB_PLOT_DOT_VERTICAL,"|"],[k.Msg.blockpy_PYLAB_PLOT_DOT_HORIZONTAL,"_"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_PLOT_XY).appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new k.FieldDropdown(i),"DOT"),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new k.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},oo={init:function(){this.setColour(Us);var t=[[k.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[k.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_BAR).appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(k.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(k.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new k.FieldDropdown(t),"ALIGN"),this.appendDummyInput().appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},_o={init:function(){this.setColour(Us);var t=[[k.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[k.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],e=[[k.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[k.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[k.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[k.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_PIE).appendField(k.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(k.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(k.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new k.FieldDropdown(e),"autopct"),this.appendDummyInput("").appendField(k.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new k.FieldDropdown(t),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},po={init:function(){this.setColour(Us),this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_HIST).appendField(k.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(k.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},uo={init:function(){this.setColour(Us);var t=[[k.Msg.PYLAB_LABEL_X,"x"],[k.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(k.Msg.MIXLY_SETTING).appendField(new k.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_TICKS).appendField(k.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},ao={init:function(){var t=[["sin","sin"],["cos","cos"],["tan","tan"],["arcsin","arcsin"],["arccos","arccos"],["arctan","arctan"],[k.Msg.LANG_MATH_TO_ROUND,"round"],[k.Msg.LANG_MATH_TO_CEIL,"ceil"],[k.Msg.LANG_MATH_TO_FLOOR,"floor"]];this.setColour(Us),this.setOutput(!0),this.setInputsInline(!0),this.appendDummyInput().appendField(k.Msg.mixpy_NUMPY_TRIG),this.appendValueInput("NUM").setCheck(Number).appendField(new k.FieldDropdown(t),"OP"),this.setTooltip(k.Msg.mixpy_NUMPY_TRIG_TOOLTIP)}},lo={init:function(){this.setColour(Us),this.appendValueInput("VET").setCheck(Number).appendField(k.Msg.mixpy_SUBPLOT).appendField(k.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(k.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(k.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},ro={init:function(){this.setColour(Us),this.appendValueInput("FILENAME").appendField(k.Msg.MIXPY_PANDAS_READ_CSV),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.mixpy_PANDAS_READCSV_HEADER_Y,"0"],[k.Msg.mixpy_PANDAS_READCSV_HEADER_N,"None"]]),"MODE"),this.appendDummyInput().appendField(k.Msg.mixpy_PANDAS_READCSV_TITLE),this.setOutput(!0),this.setInputsInline(!0),this.setTooltip(k.Msg.mixpy_PANDAS_READCSV_TOOLTIP)},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(t,e){k.Names.equals(t,this.getFieldValue("VAR"))&&this.setTitleValue(e,"VAR")}},To={init:function(){this.setColour(Us),this.appendValueInput("DICT").setCheck("Dict"),this.appendValueInput("KEY").appendField(k.Msg.mixpy_DATAFRAME_GET),this.appendDummyInput("").appendField(k.Msg.mixpy_DATAFRAME_GET_INDEX).appendField(new k.FieldDropdown([[k.Msg.DATAFRAME_COLUMN,"column"],[k.Msg.DATAFRAME_RAW,"raw"]]),"MODE"),this.setOutput(!0),this.setTooltip(k.Msg.mixpy_DATAFRAME_GET_TOOLTIP)}},Io={init:function(){this.setColour(Us),this.appendValueInput("FILE").setCheck(String).appendField(k.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(k.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},ho={init:function(){this.setColour(Us);var t=[[k.Msg.TEXT_TRIM_LEFT,"right"],[k.Msg.mixpy_PL_TEXT_CENTER,"center"],[k.Msg.TEXT_TRIM_RIGHT,"left"]],e=[[k.Msg.mixpy_PL_TEXT_TOP,"bottom"],[k.Msg.mixpy_PL_TEXT_CENTER,"center"],[k.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(k.Msg.MIXLY_SETTING).appendField(k.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(k.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(k.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(k.Msg.mixpy_PL_TEXT_HOR).appendField(new k.FieldDropdown(t),"HALIGN"),this.appendDummyInput("").appendField(k.Msg.mixpy_PL_TEXT_VER).appendField(new k.FieldDropdown(e),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(k.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PL_TEXT_TOOLTIP)}},Eo={init:function(){this.setColour(Us),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_TOARRAY),this.setOutput(!0,"List"),this.setTooltip(k.Msg.MIXLY_PYTHON_TOOLTIP_TOARRAY)}},Oo={init:function(){this.setColour(Us),this.appendValueInput("SER").setCheck("Series").appendField(k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_PLOT),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Mo={init:function(){this.setColour(Us);var t=[[k.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[k.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[k.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[k.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[k.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[k.Msg.COLOUR_RGB_BLUE,"b"],[k.Msg.COLOUR_RGB_GREEN,"g"],[k.Msg.COLOUR_RGB_RED,"r"],[k.Msg.COLOUR_CYAN,"c"],[k.Msg.COLOUR_MAGENTA,"m"],[k.Msg.COLOUR_YELLOW,"y"],[k.Msg.COLOUR_BLACK,"k"],[k.Msg.COLOUR_WHITE,"w"]],i=[[k.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[k.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[k.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("SER").setCheck("Series").appendField(k.Msg.MIXLY_MICROPYTHON_SOCKET_MAKE),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_PLOT),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new k.FieldDropdown(i),"DOT"),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new k.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldDropdown(e),"COLOR"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},co={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SHOW),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ro={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.mixpy_PL_AXES),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},mo={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_LEGEND),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Ao={init:function(){this.setColour(Us),this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_TITLE),this.appendValueInput("TITLE").setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},go={init:function(){this.setColour(Us);var t=[[k.Msg.PYLAB_LABEL_X,"x"],[k.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(k.Msg.blockpy_PYLAB_SET_LABEL).appendField(new k.FieldDropdown(t),"DIR"),this.appendValueInput("LABEL").appendField(k.Msg.blockpy_PYLAB_LABEL).setCheck(String),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},Lo={init:function(){this.setColour(Us);var t=[[k.Msg.mixpy_PYLAB_PLOT_BAR_PLOT,"plot"],[k.Msg.mixpy_PYLAB_PLOT_BAR_BAR,"bar"]];this.appendDummyInput().appendField(k.Msg.MIXLY_DISPLAY_DRAW).appendField(new k.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{plot:k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP,bar:k.Msg.mixpy_PYLAB_PLOT_BAR_EASY_TOOLTIP}[t]}))}},Co={init:function(){this.setColour(Us);var t=[[k.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[k.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[k.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_SCATTER).appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("S").appendField(k.Msg.MIXLY_MICROBIT_JS_NUMBER),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new k.FieldDropdown(t),"DOT"),this.appendDummyInput().appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},So={init:function(){this.setColour(Us);var t=[[k.Msg.blockpy_PYLAB_PLOT_LINE_SOLID,"-"],[k.Msg.blockpy_PYLAB_PLOT_LINE_DOTTED,"--"],[k.Msg.blockpy_PYLAB_PLOT_LINE_CHAIN,"-."],[k.Msg.blockpy_PYLAB_PLOT_LINE_POINT_DOTTED,":"],[k.Msg.MIXLY_MICROBIT_JS_INOUT_PULL_NONE,""]],e=[[k.Msg.COLOUR_RGB_BLUE,"b"],[k.Msg.COLOUR_RGB_GREEN,"g"],[k.Msg.COLOUR_RGB_RED,"r"],[k.Msg.COLOUR_CYAN,"c"],[k.Msg.COLOUR_MAGENTA,"m"],[k.Msg.COLOUR_YELLOW,"y"],[k.Msg.COLOUR_BLACK,"k"],[k.Msg.COLOUR_WHITE,"w"]],i=[[k.Msg.blockpy_PYLAB_PLOT_DOT_CIRCULAR,"."],[k.Msg.blockpy_PYLAB_PLOT_DOT_PIXEL,","],[k.Msg.blockpy_PYLAB_PLOT_DOT_LARGE_DOT,"o"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_PLOT_XY).appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_DOT).appendField(new k.FieldDropdown(i),"DOT"),this.appendDummyInput("").appendField(k.Msg.blockpy_PYLAB_PLOT_LINE).appendField(new k.FieldDropdown(t),"LINE"),this.appendDummyInput("").appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldDropdown(e),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Do={init:function(){this.setColour(Us);var t=[[k.Msg.MIXLY_TURTLE_WRITE_ALIGN_CENTER,"center"],[k.Msg.AILGN_EDGE,"edge"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_BAR).appendField(k.Msg.mixpy_PYLAB_PLOT_X),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_PLOT_Y),this.appendValueInput("WIDTH").setCheck(Number).appendField(k.Msg.MIXLY_WIDTH),this.appendDummyInput("").appendField(k.Msg.mixpy_PYLAB_BAR_ALIGN).appendField(new k.FieldDropdown(t),"ALIGN"),this.appendDummyInput().appendField(k.Msg.HTML_COLOUR).appendField(new k.FieldColour("#0000ff"),"COLOR"),this.appendValueInput("TAG").setCheck(String).appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},No={init:function(){this.setColour(Us);var t=[[k.Msg.mixpy_PL_PIE_SHADOW_N,"False"],[k.Msg.mixpy_PL_PIE_SHADOW_Y,"True"]],e=[[k.Msg.mixpy_PL_PIE_SHADOW_N,"None"],[k.Msg.mixpy_PYLAB_PIE_AUTOPCT_Z,"%.0f%%"],[k.Msg.mixpy_PYLAB_PIE_AUTOPCT_O,"%.1f%%"],[k.Msg.mixpy_PYLAB_PIE_AUTOPCT_T,"%.2f%%"]];this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_PIE).appendField(k.Msg.COLOUR_BLEND_RATIO),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.appendValueInput("EXPLODE").appendField(k.Msg.mixpy_PYLAB_PIE_EXPLODE),this.appendDummyInput("").appendField(k.Msg.mixpy_PYLAB_PIE_AUTOPCT).appendField(new k.FieldDropdown(e),"autopct"),this.appendDummyInput("").appendField(k.Msg.mixpy_PYLAB_PIE_SHADOW).appendField(new k.FieldDropdown(t),"SHADOW"),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_PLOT_XY_TOOLTIP)}},Po={init:function(){this.setColour(Us),this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_HIST).appendField(k.Msg.MIXLY_SD_DATA),this.appendValueInput("B").appendField(k.Msg.MIXLY_MICROBIT_JS_MONITOR_SCROLL_INTERVAL),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0)}},fo={init:function(){this.setColour(Us);var t=[[k.Msg.PYLAB_LABEL_X,"x"],[k.Msg.PYLAB_LABEL_Y,"y"]];this.appendDummyInput().appendField(k.Msg.MIXLY_SETTING).appendField(new k.FieldDropdown(t),"DIR"),this.appendValueInput("A").appendField(k.Msg.mixpy_PYLAB_TICKS).appendField(k.Msg.MIXLY_MICROBIT_JS_I2C_VALUE),this.appendValueInput("B").appendField(k.Msg.mixpy_PYLAB_TICKS_TAG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PYLAB_TICKS_TOOLTIP)}},Fo={init:function(){this.setColour(Us),this.appendValueInput("VET").setCheck(Number).appendField(k.Msg.mixpy_SUBPLOT).appendField(k.Msg.mixpy_SUBPLOT_VERTICLE),this.appendValueInput("HOR").setCheck(Number).appendField(k.Msg.mixpy_SUBPLOT_HORIZEN),this.appendValueInput("NUM").setCheck(Number).appendField(k.Msg.mixpy_SUBPLOT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_CONTROLS_RANGE_TOOLTIP)}},vo={init:function(){this.setColour(Us),this.appendDummyInput("").appendField(k.Msg.mixpy_PL_SAVEFIG),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setOutput(!1),this.setTooltip(k.Msg.mixpy_PL_SAVEFIG_TOOLTIP)}},Vo={init:function(){this.setColour(Us);var t=[[k.Msg.TEXT_TRIM_LEFT,"right"],[k.Msg.mixpy_PL_TEXT_CENTER,"center"],[k.Msg.TEXT_TRIM_RIGHT,"left"]],e=[[k.Msg.mixpy_PL_TEXT_TOP,"bottom"],[k.Msg.mixpy_PL_TEXT_CENTER,"center"],[k.Msg.mixpy_PL_TEXT_BOTTOM,"top"]];this.appendValueInput("VET").setCheck(Number).appendField(k.Msg.MIXLY_SETTING).appendField(k.Msg.mixpy_PL_TEXT_X),this.appendValueInput("HOR").setCheck(Number).appendField(k.Msg.mixpy_PL_TEXT_Y),this.appendValueInput("NUM").setCheck(Number).appendField(k.Msg.mixpy_PL_TEXT_TAG),this.appendDummyInput("").appendField(k.Msg.mixpy_PL_TEXT_HOR).appendField(new k.FieldDropdown(t),"HALIGN"),this.appendDummyInput("").appendField(k.Msg.mixpy_PL_TEXT_VER).appendField(new k.FieldDropdown(e),"VALIGN"),this.appendValueInput("FONTNUM").setCheck(Number).appendField(k.Msg.MIXLY_TURTLE_WRITE_FONT_NUM),this.setInputsInline(!0),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.mixpy_PL_TEXT_TOOLTIP)}},Yo=20,yo={init:function(){this.setColour(Yo),this.appendValueInput("VAR").appendField(k.Msg.blockpy_inout_raw_input).setCheck(String),this.setOutput(!0),this.setTooltip(k.Msg.INOUT_input_TOOLTIP)}},bo={init:function(){this.setColour(Yo),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SERIAL_PRINTLN),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(k.Msg.BLOCKPY_PRINT_TOOLTIP)}},ko={init:function(){this.setColour(Yo),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SERIAL_PRINT),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setTooltip(k.Msg.TEXT_PRINT_TOOLTIP)}},Xo={init:function(){this.setColour(Yo),this.appendValueInput("VAR").appendField(k.Msg.MIXLY_SERIAL_PRINT),this.appendValueInput("END").appendField(k.Msg.MIXLY_ENDSWITH),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setInputsInline(!0),this.setTooltip(k.Msg.MIXLY_PYTHON_INOUT_PRINT_END_TOOLTIP)}},Uo={init:function(){var t=[[k.Msg.LANG_MATH_STRING,"str"],[k.Msg.LANG_MATH_INT,"int"],[k.Msg.LANG_MATH_FLOAT,"float"]];this.setColour(Yo),this.appendDummyInput("").appendField(k.Msg.MIXLY_MICROBIT_PY_STORAGE_GET).appendField(new k.FieldDropdown(t),"DIR"),this.appendValueInput("VAR").appendField(k.Msg.PROCEDURES_MUTATORCONTAINER_TITLE).setCheck(String),this.setInputsInline(!0),this.setOutput(!0);var e=this;this.setTooltip((function(){var t=e.getFieldValue("DIR");return{str:k.Msg.MIXLY_MIXPY_INOUT_STR_INPUT_TOOLTIP,int:k.Msg.MIXLY_MIXPY_INOUT_INT_INPUT_TOOLTIP,float:k.Msg.MIXLY_MIXPY_INOUT_FLOAT_INPUT_TOOLTIP}[t]}))}},Go={init:function(){this.setColour(Yo),this.itemCount_=2,this.updateShape_(),this.setPreviousStatement(!1),this.setNextStatement(!1),this.setInputsInline(!0),this.setMutator(new k.icons.MutatorIcon(["inout_print_item"],this)),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip(k.Msg.MIXLY_MIXPY_INOUT_PRINT_MANY_TOOLTIP)},mutationToDom:function(){var t=document.createElement("mutation");return t.setAttribute("items",this.itemCount_),t},domToMutation:function(t){this.itemCount_=parseInt(t.getAttribute("items"),10),this.updateShape_()},decompose:function(t){var e=t.newBlock("inout_print_container");e.initSvg();for(var i=e.getInput("STACK").connection,n=0;n0?t:[["'无可用地图'","'无可用地图'"]]}},np={init:function(){this.appendValueInput("pathtype").setCheck(null).appendField(k.Msg.MIXLY_GAME_SETPATHTYPE),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},sp={init:function(){this.imgArr=this.getLocalImg(),this.appendDummyInput().appendField(new k.FieldDropdown(this.getLocalImg()),"type"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")},onchange:function(){let t=this.getFieldValue("type"),e=this.imgArr;this.haveNewSrc(this.imgArr,e)&&(this.imgArr=e,this.getField("type").menuGenerator_=this.imgArr,this.checkSrc(t,this.imgArr)?this.setFieldValue(t,"type"):this.setFieldValue(this.imgArr[0][1],"type"))},haveNewSrc:function(t,e){if(t.length!==e.length)return!0;for(var i=0;i0?t:[["'无可用路径'","'无可用路径'"]]}},op={init:function(){this.setColour(290),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("posx").setCheck(null).appendField(k.Msg.TEXT_APPEND_TO+"("),this.appendDummyInput().appendField(","),this.appendValueInput("posy").setCheck(null).appendField(""),this.appendDummyInput().appendField(")"+k.Msg.MIXLY_GAME_LAY).appendField(new k.FieldDropdown([[k.Msg.MIXLY_GAME_WALL,"'wall'"],[k.Msg.MIXLY_GAME_BARRIER,"'barrier'"],[k.Msg.MIXLY_GAME_COIN,"'coin'"],[k.Msg.MIXLY_GAME_REDMARKER,"'redmarker'"],[k.Msg.MIXLY_GAME_YELLOWMARKER,"'yellowmarker'"],[k.Msg.MIXLY_GAME_BLUEMARKER,"'bluemarker'"],[k.Msg.MIXLY_GAME_GREENMARKER,"'greenmarker'"]]),"item"),this.setTooltip("")}},_p={init:function(){this.imgArr=this.getLocalImg(),this.appendDummyInput().appendField(new k.FieldDropdown(this.getLocalImg()),"type"),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")},onchange:function(){let t=this.getFieldValue("type"),e=this.imgArr;this.haveNewSrc(this.imgArr,e)&&(this.imgArr=e,this.getField("type").menuGenerator_=this.imgArr,this.checkSrc(t,this.imgArr)?this.setFieldValue(t,"type"):this.setFieldValue(this.imgArr[0][1],"type"))},haveNewSrc:function(t,e){if(t.length!==e.length)return!0;for(var i=0;i0?t:[["'无可用角色'","'无可用角色'"]]}},pp={init:function(){this.setColour(290),this.appendValueInput("character").setCheck(null).appendField(k.Msg.MIXLY_GAME_INIT_CHARA),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_FACE+k.Msg.MIXLY_GAME_RIGHT),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setTooltip("")}},up={init:function(){this.setColour(290),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_GETPOINT),this.setOutput(!0,Number),this.setTooltip("")}},ap={init:function(){this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_GAME_UP,"0"],[k.Msg.MIXLY_GAME_DOWN,"2"],[k.Msg.MIXLY_GAME_LEFT,"3"],[k.Msg.MIXLY_GAME_RIGHT,"1"]]),"direction"),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_ISBARRIER),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},lp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_RE_SPIRITE).appendField(new k.FieldDropdown([[k.Msg.MIXLY_GAME_FORWARD,"f"],[k.Msg.MIXLY_GAME_BACKWARD,"b"],[k.Msg.MIXLY_GAME_LEFT,"l"],[k.Msg.MIXLY_GAME_RIGHT,"r"]]),"direction"),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_ISBARRIER),this.setInputsInline(!0),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},rp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_RANDOMCAROIL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},Tp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_NEEDOIL),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},dp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_ISGREEN),this.setOutput(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},Ip={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_ADDOIL),this.setPreviousStatement(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},hp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_CHECKCIRCURIGHT),this.setPreviousStatement(!0),this.setColour(290),this.setTooltip("")}},Ep={init:function(){this.setColour(290),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_CHECK_WHETHER_PASS),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_GAME_REDMARKER,"'redmarker'"],[k.Msg.MIXLY_GAME_YELLOWMARKER,"'yellowmarker'"],[k.Msg.MIXLY_GAME_BLUEMARKER,"'bluemarker'"],[k.Msg.MIXLY_GAME_GREENMARKER,"'greenmarker'"]]),"marker"),this.appendDummyInput().appendField("?"),this.setInputsInline(!0),this.setOutput(!0,null),this.setTooltip("")}},Op={init:function(){this.setColour(290),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_GET_MARKER_NUM),this.appendDummyInput().appendField(new k.FieldDropdown([[k.Msg.MIXLY_GAME_REDMARKER,"'redmarker'"],[k.Msg.MIXLY_GAME_YELLOWMARKER,"'yellowmarker'"],[k.Msg.MIXLY_GAME_BLUEMARKER,"'bluemarker'"],[k.Msg.MIXLY_GAME_GREENMARKER,"'greenmarker'"]]),"marker"),this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_NUMBER_OF_MARKER),this.setInputsInline(!0),this.setOutput(!0,null),this.setTooltip("")}},Mp={init:function(){this.setColour(290),this.setPreviousStatement(!0),this.setNextStatement(!0),this.appendValueInput("posx").setCheck(null).appendField(k.Msg.TEXT_APPEND_TO+"("),this.appendDummyInput().appendField(","),this.appendValueInput("posy").setCheck(null).appendField(""),this.appendDummyInput().appendField(")"+k.Msg.TEXT_GET_INDEX_RANDOM+k.Msg.MIXLY_GAME_LAY+k.Msg.MIXLY_GAME_BARRIER),this.setTooltip("")}},cp={init:function(){this.appendDummyInput().appendField(k.Msg.MIXLY_GAME_INIT_AS).appendField(new k.FieldDropdown([[k.Msg.MIXLY_GAME_ONE,"0"],[k.Msg.MIXLY_GAME_TWO,"1"],[k.Msg.MIXLY_GAME_THREE,"2"],[k.Msg.MIXLY_GAME_FOUR,"3"],[k.Msg.MIXLY_GAME_FIVE,"4"],[k.Msg.MIXLY_GAME_SIX,"5"],[k.Msg.MIXLY_GAME_SEVEN,"6"],[k.Msg.MIXLY_GAME_EIGHT,"7"],[k.Msg.MIXLY_GAME_NINE,"8"],[k.Msg.MIXLY_GAME_TEN,"9"],[k.Msg.MIXLY_GAME_ELE,"10"],[k.Msg.MIXLY_GAME_TWEL,"11"],[k.Msg.MIXLY_GAME_THIR,"12"],[k.Msg.MIXLY_GAME_FORT,"13"],[k.Msg.MIXLY_GAME_FIFT,"14"],[k.Msg.MIXLY_GAME_SIXT,"15"],[k.Msg.MIXLY_GAME_SEVENT,"16"]]),"level"),this.setInputsInline(!0),this.setNextStatement(!0),this.setColour(290),this.setTooltip("")}},Rp={init:function(){this.appendValueInput("N").setCheck(null).setAlign(k.inputs.Align.LEFT).appendField("二分法查找书籍").appendField("N"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},mp={init:function(){this.appendValueInput("N").setCheck(null).setAlign(k.inputs.Align.LEFT).appendField("顺序法查找书籍").appendField("N"),this.setInputsInline(!0),this.setPreviousStatement(!0,null),this.setNextStatement(!0,null),this.setColour(290),this.setTooltip(""),this.setHelpUrl("")}},Ap=function(t,e){return[e.variableDB_.getName(this.getFieldValue("VAR"),k.Variables.NAME_TYPE),e.ORDER_ATOMIC]},gp=function(t,e){if(""==this.getFieldValue("VAR"))return" = None\n";var i=e.valueToCode(this,"VALUE",e.ORDER_ASSIGNMENT)||"None";return e.variableDB_.getName(this.getFieldValue("VAR"),k.Variables.NAME_TYPE)+" = "+i+"\n"},Lp=function(t,e){var i=this.getFieldValue("OP"),n=e.valueToCode(this,"MYVALUE",e.ORDER_ATOMIC)||"None";if("bytes"==i)var s=i+"("+n+',"UTF-8")';else s=i+"("+n+")";return[s,e.ORDER_ATOMIC]},Cp=function(t,e){return"global "+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"None")+"\n"},Sp=function(t,e){return["type("+(e.valueToCode(this,"DATA",e.ORDER_ATOMIC)||"None")+")",e.ORDER_ATOMIC]},Dp=function(t,e){return[this.getFieldValue("type"),e.ORDER_ATOMIC]},Np=function(t,e){for(var i=new Array(this.itemCount_),n=0;n= stop:"," yield start"," start -= abs(step)"])};if(t=function(t,e,i){return"("+t+" <= "+e+") and "+u()+"("+t+", "+e+", "+i+") or "+a()+"("+t+", "+e+", "+i+")"},k.isNumber(n)&&k.isNumber(s)&&k.isNumber(o))n=parseFloat(n),s=parseFloat(s),o=Math.abs(parseFloat(o)),0==n%1&&0==s%1&&0==o%1?(n<=s?(s++,t=0==n&&1==o?s:n+", "+s,1!=o&&(t+=", "+o)):t=n+", "+--s+", -"+o,t="range("+t+")"):(t=n",GTE:">="};const al=function(t,e){var i=this.getFieldValue("OP"),n="&&"==i?e.ORDER_LOGICAL_AND:e.ORDER_LOGICAL_OR,s=e.valueToCode(this,"A",n)||"False",o=e.valueToCode(this,"B",n)||"False";if("AND"==i)var _=s+" and "+o;else if("OR"==i)_=s+" or "+o;else if("NOR"==i)_="not("+s+"^"+o+")";else _=s+"^"+o;return[_,n]},ll=function(t,e){var i=e.ORDER_UNARY_PREFIX;return["not "+(e.valueToCode(this,"BOOL",i)||"False"),i]},rl=function(t,e){return["TRUE"==this.getFieldValue("BOOL")?"True":"False",e.ORDER_ATOMIC]},Tl=function(t,e){return["None",e.ORDER_ATOMIC]},dl=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"False";return["("+(e.valueToCode(this,"B",e.ORDER_ATOMIC)||"False")+" if "+i+" else "+(e.valueToCode(this,"C",e.ORDER_ATOMIC)||"False")+")",e.ORDER_ATOMIC]},Il=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},hl=function(t,e){var i=e.valueToCode(this,"A",e.ORDER_ATOMIC)||"''",n=e.valueToCode(this,"B",e.ORDER_ATOMIC)||"''";return[i+" "+this.getFieldValue("BOOL")+" "+n,e.ORDER_ATOMIC]},El=function(t,e){return["bool("+(e.valueToCode(this,"VAR",e.ORDER_ATOMIC)||"0")+")",e.ORDER_ATOMIC]},Ol=function(t,e){return e.definitions_.import_os="import os","os.startfile("+e.valueToCode(this,"fn",e.ORDER_ATOMIC)+")\n"},Ml=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+" = open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')\n"},cl=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"')",e.ORDER_ATOMIC]},Rl=function(t,e){return["open("+e.valueToCode(this,"FILENAME",e.ORDER_ATOMIC)+", '"+this.getFieldValue("MODE")+"', encoding=\""+this.getFieldValue("CODE")+'")',e.ORDER_ATOMIC]},ml=function(t,e){var i=e.valueToCode(this,"data",e.ORDER_ATOMIC);return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".write("+i+")\n"},Al=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"()",e.ORDER_ATOMIC]},gl=function(t,e){var i=this.getFieldValue("MODE");return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+"."+i+"("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Ll=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".readline("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Cl=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".writable()",e.ORDER_ATOMIC]},Sl=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".name()",e.ORDER_ATOMIC]},Dl=function(t,e){return e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".close()\n"},Nl=function(t,e){e.definitions_.import_os="import os";return["os.listdir()",e.ORDER_ATOMIC]},Pl=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},fl=function(t,e){return e.definitions_.import_os="import os",["os.path.getsize("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")",e.ORDER_ATOMIC]},Fl=function(t,e){return[e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".tell()",e.ORDER_ATOMIC]},vl=function(t,e){var i=this.getFieldValue("MODE"),n=0;return n="start"==i?0:"current"==i?1:2,e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+".seek("+e.valueToCode(this,"SIZE",e.ORDER_ATOMIC)+","+n+")\n"},Vl=function(t,e){return e.definitions_.import_os="import os","os.chdir("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+")\n"},Yl=function(t,e){e.definitions_.import_os="import os";return["os.getcwd()",e.ORDER_ATOMIC]},yl=function(t,e){return e.definitions_.import_os="import os","os."+this.getFieldValue("MODE")+"("+e.valueToCode(this,"PATH",e.ORDER_ATOMIC)+")\n"},bl=function(t,e){return e.definitions_.import_os="import os","os.rename("+e.valueToCode(this,"FILE",e.ORDER_ATOMIC)+","+e.valueToCode(this,"NEWFILE",e.ORDER_ATOMIC)+")\n"},kl=function(t,e){e.definitions_.import_os="import os";var i=e.valueToCode(this,"FILE",e.ORDER_ATOMIC);return["os."+this.getFieldValue("MODE")+"("+i+")",e.ORDER_ATOMIC]},Xl=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard",e.valueToCode(this,"SUB",e.ORDER_ATOMIC)+" = sdcard.SDCard("+e.valueToCode(this,"SPISUB",e.ORDER_ATOMIC)+","+e.valueToCode(this,"PINSUB",e.ORDER_ATOMIC)+")\n"},Ul=function(t,e){return e.definitions_.import_os="import os",e.definitions_.import_sdcard="import sdcard","os.mount("+e.valueToCode(this,"VAR",e.ORDER_ATOMIC)+","+e.valueToCode(this,"DIR",e.ORDER_ATOMIC)+")\n"},Gl=function(t,e){var i=e.variableDB_.getName(this.getFieldValue("NAME"),k.Procedures.NAME_TYPE),n=(this.getInput("STACK")&&e.statementToCode(this,"STACK"))??" pass\n";e.INFINITE_LOOP_TRAP&&(n=e.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+this.id+"'")+n);var s=e.valueToCode(this,"RETURN",e.ORDER_NONE)||"";s&&(s=" return "+s+"\n");for(var o=[],_=0;_\n\n\n\t\n"+e.statementToCode(this,"HEAD")+"\n\n"+e.statementToCode(this,"BODY")+"\n\n'''",e.ORDER_ATOMIC]},mr=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"\n"+i+"\n"},Ar=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");if("head"==n)var s="<"+n+'>\n\t\n'+i+"\n";else s="<"+n+">\n"+i+"\n";return s},gr=function(t,e){var i=e.statementToCode(this,"DO"),n=this.getFieldValue("LEVEL");return"<"+n+">\n"+i+"\n"},Lr=function(t,e){var i=e.statementToCode(this,"DO"),n=e.valueToCode(this,"style"),s=this.getFieldValue("LEVEL");return"<"+s+" "+n+" >\n"+i+"\n"},Cr=function(t,e){return['style="'+e.statementToCode(this,"STYLE")+'"',e.ORDER_ATOMIC]},Sr=function(t,e){return'"},Dr=function(){return this.getFieldValue("KEY")+":"+this.getFieldValue("VALUE")+";"},Nr=function(){return this.getFieldValue("TEXT")+"\n"},Pr=function(t){return t.getFieldValue("TEXT")+"\n"},fr=function(t,e){return[t.getFieldValue("TEXT"),e.ORDER_ATOMIC]},Fr=function(t,e){return(e.valueToCode(t,"VALUE",e.ORDER_ATOMIC)||"")+"\n"},vr=function(){return""},Vr=function(t,e){return["type("+(e.valueToCode(t,"VALUE",e.ORDER_MEMBER)||"___")+")",e.ORDER_ATOMIC]},Yr=function(t,e){for(var i=t.getFieldValue("NAME"),n=t.hasReturn_,s=new Array(t.itemCount_),o=0;o=0&&(n[s]=n[s].replace(" ",""));i="";for(s=0;s